Skip to content

Commit

Permalink
Add ISwaggerSchemaPaymentPlugin.ITargetOrder type.
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Nov 18, 2024
1 parent 969c38f commit ddc1878
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wrtnio/schema",
"version": "1.2.0",
"version": "1.2.1",
"description": "JSON and LLM function calling schemas extended for Wrtn Studio Pro",
"main": "lib/index.js",
"module": "./lib/index.mjs",
Expand Down Expand Up @@ -31,10 +31,10 @@
},
"homepage": "https://github.com/wrtnio/schema#readme",
"dependencies": {
"@samchon/openapi": "^1.2.0"
"@samchon/openapi": "^1.2.2"
},
"peerDependencies": {
"@samchon/openapi": ">=1.2.0"
"@samchon/openapi": ">=1.2.2"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
Expand Down
3 changes: 3 additions & 0 deletions src/IOpenAiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export namespace IOpenAiSchema {
export interface IInteger
extends ILlmSchema.IInteger,
ISwaggerSchemaCommonPlugin,
ISwaggerSchemaPaymentPlugin.ITargetOrder,
ISwaggerSchemaPaymentPlugin.IPriceAmount {}

/**
Expand All @@ -55,6 +56,7 @@ export namespace IOpenAiSchema {
export interface INumber
extends ILlmSchema.INumber,
ISwaggerSchemaCommonPlugin,
ISwaggerSchemaPaymentPlugin.ITargetOrder,
ISwaggerSchemaPaymentPlugin.IPriceAmount {}

/**
Expand All @@ -63,6 +65,7 @@ export namespace IOpenAiSchema {
export interface IString
extends ILlmSchema.IString,
ISwaggerSchemaCommonPlugin,
ISwaggerSchemaPaymentPlugin.ITargetOrder,
ISwaggerSchemaPaymentPlugin.IPriceCurrency,
ISwaggerSchemaPaymentPlugin.IVendor,
ISwaggerSchemaSecurityPlugin {}
Expand Down
3 changes: 3 additions & 0 deletions src/ISwaggerSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ export namespace ISwaggerSchema {
export interface IInteger
extends OpenApi.IJsonSchema.IInteger,
ISwaggerSchemaCommonPlugin,
ISwaggerSchemaPaymentPlugin.ITargetOrder,
ISwaggerSchemaPaymentPlugin.IPriceAmount {}

/**
* Number (double) type info.
*/
export interface INumber
extends OpenApi.IJsonSchema.INumber,
ISwaggerSchemaPaymentPlugin.ITargetOrder,
ISwaggerSchemaPaymentPlugin.IPriceAmount {}

/**
Expand All @@ -79,6 +81,7 @@ export namespace ISwaggerSchema {
export interface IString
extends OpenApi.IJsonSchema.IString,
ISwaggerSchemaCommonPlugin,
ISwaggerSchemaPaymentPlugin.ITargetOrder,
ISwaggerSchemaPaymentPlugin.IPriceCurrency,
ISwaggerSchemaPaymentPlugin.IVendor,
ISwaggerSchemaSecurityPlugin {}
Expand Down
21 changes: 21 additions & 0 deletions src/ISwaggerSchemaPaymentPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@
* @author Samchon
*/
export namespace ISwaggerSchemaPaymentPlugin {
/**
* Target of the payment.
*/
export interface ITargetOrder {
/**
* The payment target.
*
* If an order appliance function be called and it returns a value with
* `x-wrtn-payment-target` property, the value means the identifier
* of the payment target, as an order.
*
* When processing the publish, you have to fill the next payment
* function's parameter with the target order's ID. Note that, this
* `x-wrtn-payment-order-id` is different with the
* {@link IVendor.x-wrtn-payment-uid}, which means the transation ID
* issued by the payment vendor service. In other words,
* `x-wrtn-payment-order-id` is issued by the target API function.
*/
"x-wrtn-payment-order-id"?: string;
}

/**
* Price amount plugin property.
*/
Expand Down

0 comments on commit ddc1878

Please sign in to comment.