From ddc187853fc2591d6c5851f976c45d3b2f516594 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 18 Nov 2024 17:12:50 +0900 Subject: [PATCH] Add `ISwaggerSchemaPaymentPlugin.ITargetOrder` type. --- package.json | 6 +++--- src/IOpenAiSchema.ts | 3 +++ src/ISwaggerSchema.ts | 3 +++ src/ISwaggerSchemaPaymentPlugin.ts | 21 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d01fbba..d74f967 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/src/IOpenAiSchema.ts b/src/IOpenAiSchema.ts index 0d7be01..d15a1a2 100644 --- a/src/IOpenAiSchema.ts +++ b/src/IOpenAiSchema.ts @@ -47,6 +47,7 @@ export namespace IOpenAiSchema { export interface IInteger extends ILlmSchema.IInteger, ISwaggerSchemaCommonPlugin, + ISwaggerSchemaPaymentPlugin.ITargetOrder, ISwaggerSchemaPaymentPlugin.IPriceAmount {} /** @@ -55,6 +56,7 @@ export namespace IOpenAiSchema { export interface INumber extends ILlmSchema.INumber, ISwaggerSchemaCommonPlugin, + ISwaggerSchemaPaymentPlugin.ITargetOrder, ISwaggerSchemaPaymentPlugin.IPriceAmount {} /** @@ -63,6 +65,7 @@ export namespace IOpenAiSchema { export interface IString extends ILlmSchema.IString, ISwaggerSchemaCommonPlugin, + ISwaggerSchemaPaymentPlugin.ITargetOrder, ISwaggerSchemaPaymentPlugin.IPriceCurrency, ISwaggerSchemaPaymentPlugin.IVendor, ISwaggerSchemaSecurityPlugin {} diff --git a/src/ISwaggerSchema.ts b/src/ISwaggerSchema.ts index 7d6290d..1ea8755 100644 --- a/src/ISwaggerSchema.ts +++ b/src/ISwaggerSchema.ts @@ -64,6 +64,7 @@ export namespace ISwaggerSchema { export interface IInteger extends OpenApi.IJsonSchema.IInteger, ISwaggerSchemaCommonPlugin, + ISwaggerSchemaPaymentPlugin.ITargetOrder, ISwaggerSchemaPaymentPlugin.IPriceAmount {} /** @@ -71,6 +72,7 @@ export namespace ISwaggerSchema { */ export interface INumber extends OpenApi.IJsonSchema.INumber, + ISwaggerSchemaPaymentPlugin.ITargetOrder, ISwaggerSchemaPaymentPlugin.IPriceAmount {} /** @@ -79,6 +81,7 @@ export namespace ISwaggerSchema { export interface IString extends OpenApi.IJsonSchema.IString, ISwaggerSchemaCommonPlugin, + ISwaggerSchemaPaymentPlugin.ITargetOrder, ISwaggerSchemaPaymentPlugin.IPriceCurrency, ISwaggerSchemaPaymentPlugin.IVendor, ISwaggerSchemaSecurityPlugin {} diff --git a/src/ISwaggerSchemaPaymentPlugin.ts b/src/ISwaggerSchemaPaymentPlugin.ts index c8c7e26..9d59255 100644 --- a/src/ISwaggerSchemaPaymentPlugin.ts +++ b/src/ISwaggerSchemaPaymentPlugin.ts @@ -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. */