diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a4cf62..c7b4671 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,18 +1,11 @@ name: build -on: - push: - paths: - - 'examples/**' - - 'src/**' - - 'test/**' - - 'package.json' +on: pull_request: paths: - 'examples/**' - 'src/**' - 'test/**' - 'package.json' - jobs: Ubuntu: runs-on: ubuntu-latest @@ -21,10 +14,12 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20.x - + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Install dependencies - run: npm install + run: pnpm install - name: Build - run: npm run build + run: pnpm run build - name: Test - run: npm run test \ No newline at end of file + run: pnpm run test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d1c100f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +# author: elliot-huffman +name: release +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: none + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20.x + registry-url: https://registry.npmjs.org/ + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Install dependencies + run: pnpm install + - name: Build + run: pnpm run build + - name: Test + run: pnpm run test + - name: Publish to npm + run: npm publish --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }} \ No newline at end of file diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 0000000..67dea0d --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,14 @@ +name: spell-check +on: + pull_request: + +jobs: + spell-check: + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + + - uses: crate-ci/typos@master + with: + config: ./typos.toml diff --git a/.gitignore b/.gitignore index f84e69a..15b292b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ lib/ node_modules/ package-lock.json -pnpm-lock.yaml *.log \ No newline at end of file diff --git a/README.md b/README.md index ef28b9f..5ecbe7d 100644 --- a/README.md +++ b/README.md @@ -1,139 +1,21 @@ -# `@wrtnio/schema` -[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wrtnio/schema/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@wrtnio/schema.svg)](https://www.npmjs.com/package/@wrtnio/schema) -[![Downloads](https://img.shields.io/npm/dm/@wrtnio/schema.svg)](https://www.npmjs.com/package/@wrtnio/schema) -[![Build Status](https://github.com/wrtnio/schema/workflows/build/badge.svg)](https://github.com/wrtnio/schema/actions?query=workflow%3Abuild) +# `@wrtnlabs/schema` +[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wrtnlabs/schema/blob/master/LICENSE) +[![npm version](https://img.shields.io/npm/v/@wrtnlabs/schema.svg)](https://www.npmjs.com/package/@wrtnlabs/schema) +[![Downloads](https://img.shields.io/npm/dm/@wrtnlabs/schema.svg)](https://www.npmjs.com/package/@wrtnlabs/schema) +[![Build Status](https://github.com/wrtnlabs/schema/workflows/build/badge.svg)](https://github.com/wrtnlabs/schema/actions?query=workflow%3Abuild) Extension of [`@samchon/openapi`](https://github.com/samchon/openapi) adding plugin properties. -`@wrtnio/schema` is a collection of Swagger (OpenAPI) and OpenAI (LLM, Large Language Model) function calling schemas that is extended from `@samchon/openapi` library adding some plugin properties like `x-wrtn-secret-key`, especially for the Wrtn Studio Pro. - - - Wrtn Studio Pro Application: https://studio-pro.wrtn.ai - - Wrtn Studio Pro Documents: https://wrtn.ai/studio-pro/ - -Here is the list of extended types from the `@samchon/openapi`, and you can use these `@wrtnio/schema` types just by combining with the `@samchon/openapi` provided functions like below. Note that, every types defined in the `@wrtnio/schema` are compatible with `@samchon/openapi`. +You can see the plugin properties in the [`src/index.ts`](https://github.com/wrtnlabs/schema/blob/main/src/index.ts) file. ```typescript -import { HttpLlm, OpenApi } from "@samchon/openapi"; -import { IHttpOpenAiApplication, ISwagger } from "@wrtnio/schema"; - -const document: ISwagger = OpenApi.convert(YOUR_SWAGGER_DOCUMENT); -const application: IHttpOpenAiApplication = HttpLlm.application(document); +import { OpenApi.IJsonSchema } from "@samchon/openapi"; +import "@wrtnlabs/schema"; + +const schema: OpenApi.IJsonSchema = { + type: "string", + format: "email", + "x-wrtn-placeholder": "Insert your email address please", +}; ``` -Kind | `@wrtnio/schema` | `@samchon/openapi` --------------------------------------------------------------------------------------------|------------------------------|--------------------------- -[**HTTP LLM Application**](https://wrtn.ai/studio-pro/tech-specs/meta/schema/#application) | **`IHttpOpenAiApplication`** | **`IHttpLlmApplication<"3.0">`** -[HTTP LLM Function Schema](https://wrtn.ai/studio-pro/tech-specs/meta/schema/#function) | `IHttpOpenAiFunction` | `IHttpLlmFunction<3.0">` -[LLM Type Schema](https://wrtn.ai/studio-pro/tech-specs/meta/schema/#schema) | `IOpenAiSchema` | `ILlmSchema<"3.0">` -[**OpenAPI Document**](https://wrtn.ai/studio-pro/tech-specs/openapi/document/#document) | **`ISwagger`** | **`OpenApi.IDocument`** -[Server URL Address](https://wrtn.ai/studio-pro/tech-specs/openapi/document/#server) | `ISwaggerServer` | `OpenApi.IServer` -[API Operation](https://wrtn.ai/studio-pro/tech-specs/openapi/document/#operation) | `ISwaggerOperation` | `OpenApi.IOperation` -[JSON Schema](https://wrtn.ai/studio-pro/tech-specs/openapi/json/) | `ISwaggerSchema` | `OpenApi.IJsonSchema` -[Security Scheme](https://wrtn.ai/studio-pro/tech-specs/openapi/document/#security-scheme) | `ISwaggerSecuritySchema` | `OpenApi.ISecurityScheme` -[Schema Components](https://wrtn.ai/studio-pro/tech-specs/openapi/json/#components) | `ISwaggerComponents` | `OpenApi.IComponents` - - - - -## Plugin Properties -Plugin properties starting with `x-wrtn-` in type schemas. - -Only the difference between `@wrtnio/schema` and `@samchon/openapi` is, `@wrtnio/schema` is filling JSON and LLM function calling type schemas with plugin properties which are starting from the `x-wrtn-` prefix key name. - -At first, `x-wrtn-placeholder` and `x-wrtn-prerequisite` properties are defined in the every type schemas. The `x-wrtn-placeholder` means the placeholder text in the UI input component as literally, and `x-wrtn-prerequisite` directs the pre-requisite API operation endpoint to compose the target value with JMesPath expression. - - - every types in the `ISwaggerSchema` - - every types in the `IOpenAiSchema` - -```typescript -// adjusted to every JSON and LLM type schemas -export interface ISwaggerSchemaPlugin { - /** - * Placeholder value for frontend application. - * - * Placeholder means the value to be shown in the input field as a hint. - * For example, when an email input field exists, the placeholder value - * would be "Insert your email address here". - */ - "x-wrtn-placeholder"?: string; - - /** - * Prerequisite API endpoint for the schema. - * - * `x-wrtn-prerequisite` is a property representing the prerequisite API - * interaction. It means that, the endpoint API should be called before - * calling the target API, for composing some argument value. - * - * @reference https://github.com/wrtnio/decorators/blob/main/src/Prerequisite.ts - */ - "x-wrtn-prerequisite"?: ISwaggerSchemaPlugin.IPrerequisite; -} -export namespace ISwaggerSchemaPlugin { - export interface IPrerequisite { - /** - * HTTP method to call the endpoint. - */ - method: "get" | "post" | "patch" | "put" | "delete"; - - /** - * Path of the endpoint. - */ - path: string; - - /** - * Function returning transformed values using JMESPath expression. - * - * `Prerequisite.Props.jmesPath` is a string typed property that extracts desired values - * from the prerequisite API response using a JMESPath expression. This property simplifies - * and replaces the `label`, `value`, and `array` properties. - * - * JMESPath expressions are used to extract the desired data based on the API response. - * The expression must always be a valid JMESPath syntax. - * - * - Type: `jmesPath: string` - * - Example: `"members[*].data.title"` - * - Usage: `jmespath.search(response, jmesPath)` - * - * Note: The `label`, `value`, and `array` properties are no longer in use. - */ - jmesPath: string; - } -} -``` - -Also, the `string` typed schema has two additional properties about secret identification. - - - `ISwaggerSchema.IString` - - `IOpenAiSchema.IString` - -The first property `x-wrtn-secret-key` means secret key of a specific service, and the second property `x-wrtn-secret-scopes` means a list of secret scopes that are required for the target API endpoint calling. - -```typescript -export namespace ISwaggerSchema { - /** - * String type info. - */ - export interface IString - extends OpenApi.IJsonSchema.IString, - ISwaggerSchemaPlugin { - /** - * Secret key for the schema. - * - * `x-wrtn-secret-key` is a property means a secret key that is required - * for the target API endpoint calling. If the secret key is not filled, - * the API call would be failed. - */ - "x-wrtn-secret-key"?: string; - - /** - * Secret scopes for the schema. - * - * `x-wrtn-secret-scopes` is a property means a list of secret scopes that - * are required for the target API endpoint calling. If the secret scopes - * are not satisfied, the API call would be failed. - */ - "x-wrtn-secret-scopes"?: string[]; - } -} -``` \ No newline at end of file diff --git a/package.json b/package.json index e715641..f9d197b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@wrtnio/schema", - "version": "3.2.1", + "name": "@wrtnlabs/schema", + "version": "4.0.0", "description": "JSON and LLM function calling schemas extended for Wrtn Studio Pro", "main": "lib/index.js", "module": "./lib/index.mjs", @@ -20,31 +20,25 @@ "keywords": [ "swagger", "openapi", - "llm-function-call", - "openai", - "wrtn" + "json-schema", + "llm-function-calling-schema", + "plugin" ], - "author": "Jeongho Nam", + "author": "Samchon", "license": "MIT", "bugs": { "url": "https://github.com/wrtnio/schema/issues" }, "homepage": "https://github.com/wrtnio/schema#readme", "dependencies": { - "@samchon/openapi": "^2.3.3" + "@samchon/openapi": "^3.0.0" }, "devDependencies": { - "@nestia/core": "^4.4.2", - "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^4.4.2", - "@nestia/sdk": "^4.4.2", - "@nestjs/common": "^10.4.12", - "@nestjs/core": "^10.4.12", - "@nestjs/platform-express": "^10.4.12", + "@nestia/e2e": "^0.8.2", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^11.1.6", "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "@types/multer": "^1.4.12", + "@types/node": "^22.13.9", "chalk": "4.1.2", "multer": "^1.4.5-lts.1", "prettier": "^3.3.3", @@ -52,9 +46,9 @@ "rollup": "^4.22.0", "source-map-support": "^0.5.21", "ts-patch": "^3.2.1", - "typescript": "~5.7.2", + "typescript": "~5.8.2", "typescript-transform-paths": "^3.5.2", - "typia": "^7.4.1" + "typia": "^8.0.0" }, "files": [ "lib", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..99e8f19 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1618 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@samchon/openapi': + specifier: ^3.0.0 + version: 3.0.0 + devDependencies: + '@nestia/e2e': + specifier: ^0.8.2 + version: 0.8.2 + '@rollup/plugin-terser': + specifier: ^0.4.4 + version: 0.4.4(rollup@4.28.1) + '@rollup/plugin-typescript': + specifier: ^11.1.6 + version: 11.1.6(rollup@4.28.1)(tslib@2.8.1)(typescript@5.8.2) + '@trivago/prettier-plugin-sort-imports': + specifier: ^4.3.0 + version: 4.3.0(prettier@3.4.2) + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + chalk: + specifier: 4.1.2 + version: 4.1.2 + multer: + specifier: ^1.4.5-lts.1 + version: 1.4.5-lts.1 + prettier: + specifier: ^3.3.3 + version: 3.4.2 + rimraf: + specifier: ^6.0.1 + version: 6.0.1 + rollup: + specifier: ^4.22.0 + version: 4.28.1 + source-map-support: + specifier: ^0.5.21 + version: 0.5.21 + ts-patch: + specifier: ^3.2.1 + version: 3.3.0 + typescript: + specifier: ~5.8.2 + version: 5.8.2 + typescript-transform-paths: + specifier: ^3.5.2 + version: 3.5.2(typescript@5.8.2) + typia: + specifier: ^8.0.0 + version: 8.0.0(@samchon/openapi@3.0.0)(typescript@5.8.2) + +packages: + + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.17.7': + resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.26.3': + resolution: {integrity: sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-environment-visitor@7.24.7': + resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-function-name@7.24.7': + resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-hoist-variables@7.24.7': + resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-split-export-declaration@7.24.7': + resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.26.3': + resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.23.2': + resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.17.0': + resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.26.3': + resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} + engines: {node: '>=6.9.0'} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@nestia/e2e@0.8.2': + resolution: {integrity: sha512-83mbI2MWoRbwGHjgNrh0pSPhOS/ljWMr6fXAWkz5O62mswpZu/HKfenSyAha7H70tqicoR66e8J2Hnu3W9+qtw==} + + '@rollup/plugin-terser@0.4.4': + resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-typescript@11.1.6': + resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0||^4.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.28.1': + resolution: {integrity: sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.28.1': + resolution: {integrity: sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.28.1': + resolution: {integrity: sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.28.1': + resolution: {integrity: sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.28.1': + resolution: {integrity: sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.28.1': + resolution: {integrity: sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.28.1': + resolution: {integrity: sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.28.1': + resolution: {integrity: sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.28.1': + resolution: {integrity: sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.28.1': + resolution: {integrity: sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.28.1': + resolution: {integrity: sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.28.1': + resolution: {integrity: sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.28.1': + resolution: {integrity: sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.28.1': + resolution: {integrity: sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.28.1': + resolution: {integrity: sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.28.1': + resolution: {integrity: sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.28.1': + resolution: {integrity: sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.28.1': + resolution: {integrity: sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.28.1': + resolution: {integrity: sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==} + cpu: [x64] + os: [win32] + + '@samchon/openapi@3.0.0': + resolution: {integrity: sha512-eVQlyKRYv1/C2Mikc1xZr7c0jMjg1vjPkeY/gheKB4c5WOOWyTNZ1uvnXR+ETpPHwaQ54I9NrQZhoNk6BEGuuw==} + + '@trivago/prettier-plugin-sort-imports@4.3.0': + resolution: {integrity: sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==} + peerDependencies: + '@vue/compiler-sfc': 3.x + prettier: 2.x - 3.x + peerDependenciesMeta: + '@vue/compiler-sfc': + optional: true + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/node@22.13.9': + resolution: {integrity: sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==} + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + append-field@1.0.0: + resolution: {integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==} + + array-timsort@1.0.3: + resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + comment-json@4.2.5: + resolution: {integrity: sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==} + engines: {node: '>= 6'} + + concat-stream@1.6.2: + resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} + engines: {'0': node >= 0.8} + + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + drange@1.1.1: + resolution: {integrity: sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==} + engines: {node: '>=4'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + + global-prefix@4.0.0: + resolution: {integrity: sha512-w0Uf9Y9/nyHinEk5vMJKRie+wa4kR5hmDbEhGGds/kG1PwGLLHKRoNMeJOyCQjjBkANlnScqgzcFwGHgmgLkVA==} + engines: {node: '>=16'} + + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-own-prop@2.0.0: + resolution: {integrity: sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==} + engines: {node: '>=8'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ini@4.1.3: + resolution: {integrity: sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + isexe@3.1.1: + resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} + engines: {node: '>=16'} + + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + javascript-natural-sort@0.7.1: + resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsesc@2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + lru-cache@11.0.2: + resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} + engines: {node: 20 || >=22} + + media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + multer@1.4.5-lts.1: + resolution: {integrity: sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==} + engines: {node: '>= 6.0.0'} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + package-manager-detector@0.2.7: + resolution: {integrity: sha512-g4+387DXDKlZzHkP+9FLt8yKj8+/3tOkPv7DVTJGGRm00RkEWgqbFstX1mXJ4M0VDYhUqsTOiISqNOJnhAu3PQ==} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} + engines: {node: '>=14'} + hasBin: true + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + randexp@0.5.3: + resolution: {integrity: sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==} + engines: {node: '>=4'} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + ret@0.2.2: + resolution: {integrity: sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==} + engines: {node: '>=4'} + + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} + hasBin: true + + rollup@4.28.1: + resolution: {integrity: sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + smob@1.5.0: + resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.5.7: + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} + engines: {node: '>=0.10.0'} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + terser@5.37.0: + resolution: {integrity: sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==} + engines: {node: '>=10'} + hasBin: true + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + + ts-patch@3.3.0: + resolution: {integrity: sha512-zAOzDnd5qsfEnjd9IGy1IRuvA7ygyyxxdxesbhMdutt8AHFjD8Vw8hU2rMF89HX1BKRWFYqKHrO8Q6lw0NeUZg==} + hasBin: true + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + + typedarray@0.0.6: + resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + + typescript-transform-paths@3.5.2: + resolution: {integrity: sha512-IRDVXfU7oscLwTvLabXprFrFCMUdBJbdUDtxbHFEsau9FlqrrdgS8PfwUltKDAh75vJFkQ8QdXAt/nzIWWp+fA==} + peerDependencies: + typescript: '>=3.6.5' + + typescript@5.8.2: + resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} + engines: {node: '>=14.17'} + hasBin: true + + typia@8.0.0: + resolution: {integrity: sha512-ulYqugl0rXStArmFBxTxwC796gW4KkRas7wy7hOYwtRulxfBOJlurZMZ9MA8lN9LrgOpX/bnW0bW3w75ws6wIA==} + hasBin: true + peerDependencies: + '@samchon/openapi': '>=3.0.0 <4.0.0' + typescript: '>=4.8.0 <5.9.0' + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + which@4.0.0: + resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} + engines: {node: ^16.13.0 || >=18.0.0} + hasBin: true + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + +snapshots: + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/generator@7.17.7': + dependencies: + '@babel/types': 7.17.0 + jsesc: 2.5.2 + source-map: 0.5.7 + + '@babel/generator@7.26.3': + dependencies: + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/helper-environment-visitor@7.24.7': + dependencies: + '@babel/types': 7.26.3 + + '@babel/helper-function-name@7.24.7': + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.3 + + '@babel/helper-hoist-variables@7.24.7': + dependencies: + '@babel/types': 7.26.3 + + '@babel/helper-split-export-declaration@7.24.7': + dependencies: + '@babel/types': 7.26.3 + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/parser@7.26.3': + dependencies: + '@babel/types': 7.26.3 + + '@babel/template@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + + '@babel/traverse@7.23.2': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.3 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-hoist-variables': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + debug: 4.4.0 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.17.0': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + to-fast-properties: 2.0.0 + + '@babel/types@7.26.3': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jridgewell/gen-mapping@0.3.5': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/source-map@0.3.6': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@nestia/e2e@0.8.2': {} + + '@rollup/plugin-terser@0.4.4(rollup@4.28.1)': + dependencies: + serialize-javascript: 6.0.2 + smob: 1.5.0 + terser: 5.37.0 + optionalDependencies: + rollup: 4.28.1 + + '@rollup/plugin-typescript@11.1.6(rollup@4.28.1)(tslib@2.8.1)(typescript@5.8.2)': + dependencies: + '@rollup/pluginutils': 5.1.3(rollup@4.28.1) + resolve: 1.22.8 + typescript: 5.8.2 + optionalDependencies: + rollup: 4.28.1 + tslib: 2.8.1 + + '@rollup/pluginutils@5.1.3(rollup@4.28.1)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.28.1 + + '@rollup/rollup-android-arm-eabi@4.28.1': + optional: true + + '@rollup/rollup-android-arm64@4.28.1': + optional: true + + '@rollup/rollup-darwin-arm64@4.28.1': + optional: true + + '@rollup/rollup-darwin-x64@4.28.1': + optional: true + + '@rollup/rollup-freebsd-arm64@4.28.1': + optional: true + + '@rollup/rollup-freebsd-x64@4.28.1': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.28.1': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.28.1': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.28.1': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.28.1': + optional: true + + '@rollup/rollup-linux-loongarch64-gnu@4.28.1': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.28.1': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.28.1': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.28.1': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.28.1': + optional: true + + '@rollup/rollup-linux-x64-musl@4.28.1': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.28.1': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.28.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.28.1': + optional: true + + '@samchon/openapi@3.0.0': {} + + '@trivago/prettier-plugin-sort-imports@4.3.0(prettier@3.4.2)': + dependencies: + '@babel/generator': 7.17.7 + '@babel/parser': 7.26.3 + '@babel/traverse': 7.23.2 + '@babel/types': 7.17.0 + javascript-natural-sort: 0.7.1 + lodash: 4.17.21 + prettier: 3.4.2 + transitivePeerDependencies: + - supports-color + + '@types/estree@1.0.6': {} + + '@types/node@22.13.9': + dependencies: + undici-types: 6.20.0 + + acorn@8.14.0: {} + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@5.0.1: {} + + ansi-regex@6.1.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.1: {} + + append-field@1.0.0: {} + + array-timsort@1.0.3: {} + + balanced-match@1.0.2: {} + + base64-js@1.5.1: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + buffer-from@1.1.2: {} + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + busboy@1.6.0: + dependencies: + streamsearch: 1.1.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chardet@0.7.0: {} + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-spinners@2.9.2: {} + + cli-width@3.0.0: {} + + clone@1.0.4: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + commander@10.0.1: {} + + commander@2.20.3: {} + + comment-json@4.2.5: + dependencies: + array-timsort: 1.0.3 + core-util-is: 1.0.3 + esprima: 4.0.1 + has-own-prop: 2.0.0 + repeat-string: 1.6.1 + + concat-stream@1.6.2: + dependencies: + buffer-from: 1.1.2 + inherits: 2.0.4 + readable-stream: 2.3.8 + typedarray: 0.0.6 + + core-util-is@1.0.3: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.0: + dependencies: + ms: 2.1.3 + + defaults@1.0.4: + dependencies: + clone: 1.0.4 + + drange@1.1.1: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + escape-string-regexp@1.0.5: {} + + esprima@4.0.1: {} + + estree-walker@2.0.2: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + figures@3.2.0: + dependencies: + escape-string-regexp: 1.0.5 + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + glob@11.0.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 + + global-prefix@4.0.0: + dependencies: + ini: 4.1.3 + kind-of: 6.0.3 + which: 4.0.0 + + globals@11.12.0: {} + + has-flag@4.0.0: {} + + has-own-prop@2.0.0: {} + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + inherits@2.0.4: {} + + ini@4.1.3: {} + + inquirer@8.2.6: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + + is-fullwidth-code-point@3.0.0: {} + + is-interactive@1.0.0: {} + + is-unicode-supported@0.1.0: {} + + isarray@1.0.0: {} + + isexe@2.0.0: {} + + isexe@3.1.1: {} + + jackspeak@4.0.2: + dependencies: + '@isaacs/cliui': 8.0.2 + + javascript-natural-sort@0.7.1: {} + + js-tokens@4.0.0: {} + + jsesc@2.5.2: {} + + jsesc@3.1.0: {} + + kind-of@6.0.3: {} + + lodash@4.17.21: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + lru-cache@11.0.2: {} + + media-typer@0.3.0: {} + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mimic-fn@2.1.0: {} + + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + minimist@1.2.8: {} + + minipass@7.1.2: {} + + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + + ms@2.1.3: {} + + multer@1.4.5-lts.1: + dependencies: + append-field: 1.0.0 + busboy: 1.6.0 + concat-stream: 1.6.2 + mkdirp: 0.5.6 + object-assign: 4.1.1 + type-is: 1.6.18 + xtend: 4.0.2 + + mute-stream@0.0.8: {} + + object-assign@4.1.1: {} + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + os-tmpdir@1.0.2: {} + + package-json-from-dist@1.0.1: {} + + package-manager-detector@0.2.7: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.2 + minipass: 7.1.2 + + picocolors@1.1.1: {} + + picomatch@4.0.2: {} + + prettier@3.4.2: {} + + process-nextick-args@2.0.1: {} + + randexp@0.5.3: + dependencies: + drange: 1.1.1 + ret: 0.2.2 + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readable-stream@2.3.8: + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + repeat-string@1.6.1: {} + + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + ret@0.2.2: {} + + rimraf@6.0.1: + dependencies: + glob: 11.0.0 + package-json-from-dist: 1.0.1 + + rollup@4.28.1: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.28.1 + '@rollup/rollup-android-arm64': 4.28.1 + '@rollup/rollup-darwin-arm64': 4.28.1 + '@rollup/rollup-darwin-x64': 4.28.1 + '@rollup/rollup-freebsd-arm64': 4.28.1 + '@rollup/rollup-freebsd-x64': 4.28.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.28.1 + '@rollup/rollup-linux-arm-musleabihf': 4.28.1 + '@rollup/rollup-linux-arm64-gnu': 4.28.1 + '@rollup/rollup-linux-arm64-musl': 4.28.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.28.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.28.1 + '@rollup/rollup-linux-riscv64-gnu': 4.28.1 + '@rollup/rollup-linux-s390x-gnu': 4.28.1 + '@rollup/rollup-linux-x64-gnu': 4.28.1 + '@rollup/rollup-linux-x64-musl': 4.28.1 + '@rollup/rollup-win32-arm64-msvc': 4.28.1 + '@rollup/rollup-win32-ia32-msvc': 4.28.1 + '@rollup/rollup-win32-x64-msvc': 4.28.1 + fsevents: 2.3.3 + + run-async@2.4.1: {} + + rxjs@7.8.1: + dependencies: + tslib: 2.8.1 + + safe-buffer@5.1.2: {} + + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + + semver@7.6.3: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + smob@1.5.0: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.5.7: {} + + source-map@0.6.1: {} + + streamsearch@1.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + + string_decoder@1.1.1: + dependencies: + safe-buffer: 5.1.2 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + terser@5.37.0: + dependencies: + '@jridgewell/source-map': 0.3.6 + acorn: 8.14.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + through@2.3.8: {} + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + to-fast-properties@2.0.0: {} + + ts-patch@3.3.0: + dependencies: + chalk: 4.1.2 + global-prefix: 4.0.0 + minimist: 1.2.8 + resolve: 1.22.8 + semver: 7.6.3 + strip-ansi: 6.0.1 + + tslib@2.8.1: {} + + type-fest@0.21.3: {} + + type-is@1.6.18: + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + + typedarray@0.0.6: {} + + typescript-transform-paths@3.5.2(typescript@5.8.2): + dependencies: + minimatch: 9.0.5 + typescript: 5.8.2 + + typescript@5.8.2: {} + + typia@8.0.0(@samchon/openapi@3.0.0)(typescript@5.8.2): + dependencies: + '@samchon/openapi': 3.0.0 + commander: 10.0.1 + comment-json: 4.2.5 + inquirer: 8.2.6 + package-manager-detector: 0.2.7 + randexp: 0.5.3 + typescript: 5.8.2 + + undici-types@6.20.0: {} + + util-deprecate@1.0.2: {} + + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + which@4.0.0: + dependencies: + isexe: 3.1.1 + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + + xtend@4.0.2: {} diff --git a/src/HttpOpenAi.ts b/src/HttpOpenAi.ts deleted file mode 100644 index cd196b4..0000000 --- a/src/HttpOpenAi.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { - HttpLlm, - IHttpConnection, - IHttpLlmApplication, - IHttpLlmFunction, - IHttpResponse, -} from "@samchon/openapi"; -import { LlmSchemaComposer } from "@samchon/openapi/lib/composers/LlmSchemaComposer"; - -import { IHttpOpenAiApplication } from "./IHttpOpenAiApplication"; -import { IHttpOpenAiFunction } from "./IHttpOpenAiFunction"; -import { IOpenAiSchema } from "./IOpenAiSchema"; -import { ISwagger } from "./ISwagger"; -import { ISwaggerComponents } from "./ISwaggerComponents"; -import { ISwaggerSchema } from "./ISwaggerSchema"; -import { HttpOpenAiFetcher } from "./internal/HttpOpenAiFetcher"; -import { HttpOpenAiSeparator } from "./internal/HttpOpenAiSeparator"; - -/** - * @deprecated - */ -export namespace HttpOpenAi { - /* ----------------------------------------------------------- - COMPOSERS - ----------------------------------------------------------- */ - export const application = (props: { - document: ISwagger; - options?: Partial; - }): IHttpOpenAiApplication => { - const app: IHttpLlmApplication<"3.0"> = HttpLlm.application({ - model: "3.0", - document: props.document, - options: props.options, - }); - return { - ...app, - functions: app.functions.map((f) => - functional(f, props.options?.keyword ?? false), - ), - options: { - ...app.options, - keyword: props.options?.keyword ?? false, - }, - openapi: "3.0.3", - }; - }; - - export const schema = (props: { - components: ISwaggerComponents; - schema: ISwaggerSchema; - }): IOpenAiSchema | null => { - const result = LlmSchemaComposer.schema("3.0")({ - config: LlmSchemaComposer.defaultConfig("3.0"), - components: props.components, - schema: props.schema, - }); - return result.success ? result.value : null; - }; - - const functional = ( - regular: IHttpLlmFunction<"3.0">, - keyword: boolean, - ): IHttpOpenAiFunction => { - const properties = new Map( - Object.keys(regular.parameters.properties).map((name, i) => [name, i]), - ); - return { - ...regular, - parameters: keyword - ? [regular.parameters] - : Object.values(regular.parameters.properties), - separated: regular.separated - ? keyword - ? { - llm: regular.separated.llm - ? [ - { - schema: regular.separated.llm, - index: 0, - }, - ] - : [], - human: regular.separated.human - ? [ - { - schema: regular.separated.human, - index: 0, - }, - ] - : [], - } - : { - llm: Object.entries(regular.separated.llm?.properties ?? {}).map( - ([key, value]) => ({ - schema: value, - index: properties.get(key) ?? 0, - }), - ), - human: Object.entries( - regular.separated.human?.properties ?? {}, - ).map(([key, value]) => ({ - schema: value, - index: properties.get(key) ?? 0, - })), - } - : undefined, - }; - }; - - /* ----------------------------------------------------------- - FETCHERS - ----------------------------------------------------------- */ - export interface IFetchProps { - connection: IHttpConnection; - application: IHttpOpenAiApplication; - function: IHttpOpenAiFunction; - arguments: unknown[]; - } - - export const execute = (props: IFetchProps): Promise => - HttpOpenAiFetcher.execute(props); - - export const propagate = (props: IFetchProps): Promise => - HttpOpenAiFetcher.propagate(props); - - /* ----------------------------------------------------------- - MERGERS - ----------------------------------------------------------- */ - /** - * Properties of {@link mergeParameters} function. - */ - export interface IMergeProps { - /** - * Target function to call. - */ - function: IHttpOpenAiFunction; - - /** - * Arguments composed by LLM (Large Language Model). - */ - llm: unknown[]; - - /** - * Arguments composed by human. - */ - human: unknown[]; - } - - export const mergeParameters = (props: IMergeProps): unknown[] => { - const separated: IHttpOpenAiFunction.ISeparated | undefined = - props.function.separated; - if (separated === undefined) - throw new Error( - "Error on OpenAiDataComposer.parameters(): the function parameters are not separated.", - ); - return new Array(props.function.parameters.length).fill(0).map((_, i) => { - const llm: number = separated.llm.findIndex((p) => p.index === i); - const human: number = separated.human.findIndex((p) => p.index === i); - if (llm === -1 && human === -1) - throw new Error( - "Error on OpenAiDataComposer.parameters(): failed to gather separated arguments, because both LLM and human sides are all empty.", - ); - return mergeValue(props.llm[llm], props.human[human]); - }); - }; - - export const mergeValue = (x: unknown, y: unknown): unknown => - typeof x === "object" && typeof y === "object" && x !== null && y !== null - ? combineObject(x, y) - : Array.isArray(x) && Array.isArray(y) - ? new Array(Math.max(x.length, y.length)) - .fill(0) - .map((_, i) => mergeValue(x[i], y[i])) - : (y ?? x); - - const combineObject = (x: any, y: any): any => { - const output: any = { ...x }; - for (const [k, v] of Object.entries(y)) output[k] = mergeValue(x[k], v); - return output; - }; - - /* ----------------------------------------------------------- - SEPARATORS - ----------------------------------------------------------- */ - export interface ISeparateProps { - parameters: IOpenAiSchema[]; - predicator: (schema: IOpenAiSchema) => boolean; - } - - export const separateParameters = ( - props: ISeparateProps, - ): IHttpOpenAiFunction.ISeparated => HttpOpenAiSeparator.parameters(props); - - export const separateSchema = - (predicator: (schema: IOpenAiSchema) => boolean) => - (input: IOpenAiSchema): [IOpenAiSchema | null, IOpenAiSchema | null] => - HttpOpenAiSeparator.schema(predicator)(input); -} diff --git a/src/IHttpOpenAiApplication.ts b/src/IHttpOpenAiApplication.ts deleted file mode 100644 index a7a1f92..0000000 --- a/src/IHttpOpenAiApplication.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { IHttpLlmApplication } from "@samchon/openapi"; - -import { IHttpOpenAiFunction } from "./IHttpOpenAiFunction"; -import { ISwaggerOperation } from "./ISwaggerOperation"; - -/** - * Application of OpenAI (LLM) function call from OpenAPI document. - * - * `IHttpOpenAiApplication` is a data structure representing a collection of - * {@link IHttpOpenAiFunction LLM function calling schemas} composed from the - * {@link ISwagger OpenAPI document} and its {@link ISwaggerOperation operation} - * metadata. It also contains {@link IHttpOpenAiApplication.errors failed operations}, and - * adjusted {@link IHttpOpenAiApplication.options options} during the - * `IHttpOpenAiApplication` construction. - * - * About the {@link ISwaggerOperation API operations}, they are converted to - * {@link IHttpOpenAiFunction} type which represents LLM function calling schema. - * By the way, if tehre're some recursive types which can't escape the - * {@link ISwaggerSchema.IReference} type, the operation would be failed and - * pushed into the {@link IHttpOpenAiApplication.errors}. Otherwise not, the operation - * would be successfully converted to {@link IHttpOpenAiFunction} and its type schemas - * are downgraded to {@link OpenApiV3.IJsonSchema} and converted to - * {@link IOpenAiSchema}. - * - * About the options, if you've configured {@link IHttpOpenAiApplication.options.keyword} - * (as `true`), number of {@link IHttpOpenAiFunction.parameters} are always 1 and the first - * parameter type is always {@link IOpenAiSchema.IObject}. Otherwise, the parameters would - * be multiple, and the sequence of the parameters are following below rules. - * - * - `pathParameters`: Path parameters of {@link IHttpMigrateRoute.parameters} - * - `query`: Query parameter of {@link IHttpMigrateRoute.query} - * - `body`: Body parameter of {@link IHttpMigrateRoute.body} - * - * ```typescript - * // KEYWORD TRUE - * { - * ...pathParameters, - * query, - * body, - * } - * - * // KEYWORD FALSE - * [ - * ...pathParameters, - * ...(query ? [query] : []), - * ...(body ? [body] : []), - * ] - * ``` - * - * By the way, there can be some parameters (or their nested properties) which must be - * composed by Human, not by LLM. File uploading feature or some sensitive information - * like secrety key (password) are the examples. In that case, you can separate the - * function parameters to both LLM and Human sides by configuring the - * {@link IHttpOpenAiApplication.IOptions.separate} property. The separated parameters are - * assigned to the {@link IHttpOpenAiFunction.separated} property. - * - * For reference, the actual function call execution is not by LLM, but by you. - * When the LLM selects the proper function and fills the arguments, you just call - * the function by {@link HttpOpenAi.execute} with the LLM prepared arguments. And then - * informs the return value to the LLM by system prompt. The LLM will continue the next - * conversation based on the return value. - * - * Additionally, if you've configured {@link IHttpOpenAiApplication.IOptions.separate}, - * so that the parameters are separated to Human and LLM sides, you can merge these - * humand and LLM sides' parameters into one through {@link HttpOpenAi.mergeParameters} - * before the actual LLM function call execution. - * - * @reference https://platform.openai.com/docs/guides/function-calling - * @deprecated OpenAI's JSON schema specification has been changed - * @author Samchon - */ -export interface IHttpOpenAiApplication - extends Omit, "functions" | "options"> { - /** - * List of function metadata. - * - * List of function metadata that can be used for the LLM function call. - * - * When you want to execute the function with LLM constructed arguments, - * you can do it through {@link HttpOpenAi.execute} function. - */ - functions: IHttpOpenAiFunction[]; - - /** - * Version of OpenAPI. - * - * OpenAI function call schemas are based on OpenAPI 3.0.3. - */ - openapi: "3.0.3"; - - /** - * Options for the application. - * - * Adjusted options when composing the application through - * {@link HttpOpenAi.application} function. - */ - options: IHttpOpenAiApplication.IOptions; -} -export namespace IHttpOpenAiApplication { - /** - * Error occurred in the composition. - */ - export type IError = IHttpLlmApplication.IError; - - /** - * Options for composing the LLM application. - */ - export interface IOptions extends IHttpLlmApplication.IOptions<"3.0"> { - /** - * Whether the parameters are keyworded or not. - * - * If this property value is `true`, length of the - * {@link IHttpOpenAiApplication.IFunction.parameters} is always 1, and type of - * the pararameter is always {@link IOpenAiSchema.IObject} type. - * - * Otherwise, the parameters would be multiple, and the sequence of the parameters - * are following below rules. - * - * ```typescript - * // KEYWORD TRUE - * { - * ...pathParameters, - * query, - * body, - * } - * - * // KEYWORD FALSE - * [ - * ...pathParameters, - * ...(query ? [query] : []), - * ...(body ? [body] : []), - * ] - * ``` - * - * @default false - */ - keyword: boolean; - } -} diff --git a/src/IHttpOpenAiFunction.ts b/src/IHttpOpenAiFunction.ts deleted file mode 100644 index 2c862a2..0000000 --- a/src/IHttpOpenAiFunction.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { IHttpLlmFunction } from "@samchon/openapi"; - -import { IOpenAiSchema } from "./IOpenAiSchema"; -import { ISwaggerOperation } from "./ISwaggerOperation"; - -/** - * OpenAI (LLM) function calling schema from HTTP (OpenAPI) operation. - * - * `IHttpOpenAiFunction` is a data structure representing a function converted - * from the {@link ISwaggerOperation OpenAPI operation}, used for the LLM - * (Large Language Model) function calling. It's a typical RPC (Remote Procedure Call) - * structure containing the function {@link name}, {@link parameters}, and - * {@link output return type}. - * - * If you provide this `IHttpOpenAiFunction` data to the LLM provider like "OpenAI", - * the "OpenAI" will compose a function arguments by analyzing conversations with - * the user. With the LLM composed arguments, you can execute the function through - * {@link LlmFetcher.execute} and get the result. - * - * For reference, different between `IHttpOpenAiFunction` and its origin source - * {@link ISwaggerOperation} is, `IHttpOpenAiFunction` has converted every type schema - * informations from {@link ISwaggerSchema} to {@link IOpenAiSchema} to escape - * {@link ISwaggerSchema.IReference reference types}, and downgrade the version - * of the JSON schema to OpenAPI 3.0. It's because LLM function call feature cannot - * understand both reference types and OpenAPI 3.1 specification. - * - * Additionally, if you've composed `IHttpOpenAiFunction` with - * {@link IHttpLlmApplication.IOptions.keyword} configuration as `true`, number of - * {@link IHttpOpenAiFunction.parameters} are always 1 and the first parameter's - * type is always {@link IOpenAiSchema.IObject}. The properties' rule is: - * - * - `pathParameters`: Path parameters of {@link ISwaggerOperation.parameters} - * - `query`: Query parameter of {@link IHttpMigrateRoute.query} - * - `body`: Body parameter of {@link IHttpMigrateRoute.body} - * - * ```typescript - * { - * ...pathParameters, - * query, - * body, - * } - * ``` - * - * Otherwise, the parameters would be multiple, and the sequence of the parameters - * are following below rules: - * - * ```typescript - * [ - * ...pathParameters, - * ...(query ? [query] : []), - * ...(body ? [body] : []), - * ] - * ``` - * - * @reference https://platform.openai.com/docs/guides/function-calling - * @deprecated OpenAI's JSON schema specification has been changed - * @author Samchon - */ -export interface IHttpOpenAiFunction - extends Omit, "parameters" | "separated" | "output"> { - /** - * List of parameter types. - * - * If you've configured {@link IHttpOpenAiApplication.IOptions.keyword} as - * `true`, number of {@link IHttpOpenAiFunction.parameters} are always 1 and - * the first parameter's type is always {@link IOpenAiSchema.IObject}. The - * properties' rule is: - * - * - `pathParameters`: Path parameters of {@link IHttpMigrateRoute.parameters} - * - `query`: Query parameter of {@link IHttpMigrateRoute.query} - * - `body`: Body parameter of {@link IHttpMigrateRoute.body} - * - * ```typescript - * { - * ...pathParameters, - * query, - * body, - * } - * ``` - * - * Otherwise, the parameters would be multiple, and the sequence of the - * parameters are following below rules: - * - * ```typescript - * [ - * ...pathParameters, - * ...(query ? [query] : []), - * ...(body ? [body] : []), - * ] - * ``` - */ - parameters: IOpenAiSchema[]; - - /** - * Expected return type. - * - * If the function returns nothing (`void`), then the output is `undefined`. - */ - output?: IOpenAiSchema | undefined; - - /** - * Collection of separated parameters. - * - * Filled only when {@link IHttpOpenAiApplication.IOptions.separate} is configured. - */ - separated?: IHttpOpenAiFunction.ISeparated; -} -export namespace IHttpOpenAiFunction { - export interface IOptions { - /** - * Separator function for the parameters. - * - * When composing parameter arguments through LLM function call, - * there can be a case that some parameters must be composed by human, - * or LLM cannot understand the parameter. - * - * For example, if the parameter type has configured - * {@link IOpenAiSchema.IString.contentMediaType} which indicates file - * uploading, it must be composed by human, not by LLM - * (Large Language Model). - * - * In that case, if you configure this property with a function that - * predicating whether the schema value must be composed by human or - * not, the parameters would be separated into two parts. - * - * - {@link IHttpOpenAiFunction.separated.llm} - * - {@link IHttpOpenAiFunction.separated.human} - * - * When writing the function, note that returning value `true` means - * to be a human composing the value, and `false` means to LLM - * composing the value. Also, when predicating the schema, it would - * better to utilize the {@link GeminiTypeChecker} like features. - * - * @param schema Schema to be separated. - * @returns Whether the schema value must be composed by human or not. - * @default null - */ - separate: null | ((schema: IOpenAiSchema) => boolean); - - /** - * Whether to allow recursive types or not. - * - * If allow, then how many times to repeat the recursive types. - * - * By the way, if the model is "chatgpt", the recursive types are always - * allowed without any limitation, due to it supports the reference type. - * - * @default 3 - */ - recursive: false | number; - } - - /** - * Collection of separated parameters. - */ - export interface ISeparated { - /** - * Parameters that would be composed by the LLM. - */ - llm: ISeparatedParameter[]; - - /** - * Parameters that would be composed by the human. - */ - human: ISeparatedParameter[]; - } - - /** - * Separated parameter. - */ - export interface ISeparatedParameter { - /** - * Index of the parameter. - * - * @type uint - */ - index: number; - - /** - * Type schema info of the parameter. - */ - schema: IOpenAiSchema; - } -} diff --git a/src/IOpenAiSchema.ts b/src/IOpenAiSchema.ts deleted file mode 100644 index 81764cc..0000000 --- a/src/IOpenAiSchema.ts +++ /dev/null @@ -1,430 +0,0 @@ -import { ISwaggerSchemaCommonPlugin } from "./ISwaggerSchemaCommonPlugin"; -import { ISwaggerSchemaPaymentPlugin } from "./ISwaggerSchemaPaymentPlugin"; -import { ISwaggerSchemaSecurityPlugin } from "./ISwaggerSchemaSecurityPlugin"; - -/** - * Type schema info of OpenAI function call. - * - * `IOpenAiSchema` is a type schema info of OpenAI function call. - * - * `IOpenAiSchema` is basically follows the JSON schema definition of - * OpenAI v3.0: {@link OpenApiV3.IJsonSchema}. However, `IOpenAiSchema` does not - * have the reference type {@link OpenApiV3.IJsonSchema.IReference}. It's because - * the OpenAI cannot compose - * {@link OpenAiFetcher.IProps.arguments function call arguments} of - * the reference type. - * - * For reference, the OpenAPI v3.0 based JSON schema definition can't express - * the tuple array type. It has been supported since OpenAPI v3.1. Therefore, - * it would better to avoid using the tuple array type. - * - * @author Samchon - */ -export type IOpenAiSchema = - | IOpenAiSchema.IBoolean - | IOpenAiSchema.IInteger - | IOpenAiSchema.INumber - | IOpenAiSchema.IString - | IOpenAiSchema.IArray - | IOpenAiSchema.IObject - | IOpenAiSchema.IUnknown - | IOpenAiSchema.INullOnly - | IOpenAiSchema.IOneOf; -export namespace IOpenAiSchema { - /** - * Boolean type schema info. - */ - export interface IBoolean extends __ISignificant<"boolean"> { - /** - * Default value. - */ - default?: boolean | null; - - /** - * Enumeration values. - */ - enum?: Array; - } - - /** - * Integer type schema info. - */ - export interface IInteger - extends __ISignificant<"integer">, - ISwaggerSchemaPaymentPlugin.INumeric { - /** - * Default value. - * - * @type int64 - */ - default?: number | null; - - /** - * Enumeration values. - * - * @type int64 - */ - enum?: Array; - - /** - * Minimum value restriction. - * - * @type int64 - */ - minimum?: number; - - /** - * Maximum value restriction. - * - * @type int64 - */ - maximum?: number; - - /** - * Exclusive minimum value restriction. - * - * For reference, even though your Swagger document has defined the - * `exclusiveMinimum` value as `number`, it has been forcibly converted - * to `boolean` type, and assigns the numeric value to the - * {@link minimum} property in the {@link OpenApi} conversion. - */ - exclusiveMinimum?: boolean; - - /** - * Exclusive maximum value restriction. - * - * For reference, even though your Swagger document has defined the - * `exclusiveMaximum` value as `number`, it has been forcibly converted - * to `boolean` type, and assigns the numeric value to the - * {@link maximum} property in the {@link OpenApi} conversion. - */ - exclusiveMaximum?: boolean; - - /** - * Multiple of value restriction. - * - * @type uint64 - * @exclusiveMinimum 0 - */ - multipleOf?: number; - } - - /** - * Number type schema info. - */ - export interface INumber - extends __ISignificant<"number">, - ISwaggerSchemaPaymentPlugin.INumeric { - /** - * Default value. - */ - default?: number | null; - - /** - * Enumeration values. - */ - enum?: Array; - - /** - * Minimum value restriction. - */ - minimum?: number; - - /** - * Maximum value restriction. - */ - maximum?: number; - - /** - * Exclusive minimum value restriction. - * - * For reference, even though your Swagger (or OpenAPI) document has - * defined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer} - * forcibly converts it to `boolean` type, and assign the numeric value to - * the {@link minimum} property. - */ - exclusiveMinimum?: boolean; - - /** - * Exclusive maximum value restriction. - * - * For reference, even though your Swagger (or OpenAPI) document has - * defined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer} - * forcibly converts it to `boolean` type, and assign the numeric value to - * the {@link maximum} property. - */ - exclusiveMaximum?: boolean; - - /** - * Multiple of value restriction. - * - * @exclusiveMinimum 0 - */ - multipleOf?: number; - } - - /** - * String type schema info. - */ - export interface IString - extends __ISignificant<"string">, - ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin { - /** - * Default value. - */ - default?: string | null; - - /** - * Enumeration values. - */ - enum?: Array; - - /** - * Format restriction. - */ - format?: - | "binary" - | "byte" - | "password" - | "regex" - | "uuid" - | "email" - | "hostname" - | "idn-email" - | "idn-hostname" - | "iri" - | "iri-reference" - | "ipv4" - | "ipv6" - | "uri" - | "uri-reference" - | "uri-template" - | "url" - | "date-time" - | "date" - | "time" - | "duration" - | "json-pointer" - | "relative-json-pointer" - | (string & {}); - - /** - * Pattern restriction. - */ - pattern?: string; - - /** - * Minimum length restriction. - * - * @type uint64 - */ - minLength?: number; - - /** - * Maximum length restriction. - * - * @type uint64 - */ - maxLength?: number; - - /** - * Content media type restriction. - */ - contentMediaType?: string; - } - - /** - * Array type schema info. - */ - export interface IArray extends __ISignificant<"array"> { - /** - * Items type schema info. - * - * The `items` means the type of the array elements. In other words, it is - * the type schema info of the `T` in the TypeScript array type `Array`. - */ - items: IOpenAiSchema; - - /** - * Unique items restriction. - * - * If this property value is `true`, target array must have unique items. - */ - uniqueItems?: boolean; - - /** - * Minimum items restriction. - * - * Restriction of minumum number of items in the array. - * - * @type uint64 - */ - minItems?: number; - - /** - * Maximum items restriction. - * - * Restriction of maximum number of items in the array. - * - * @type uint64 - */ - maxItems?: number; - } - - /** - * Object type schema info. - */ - export interface IObject extends __ISignificant<"object"> { - /** - * Properties of the object. - * - * The `properties` means a list of key-value pairs of the object's - * regular properties. The key is the name of the regular property, - * and the value is the type schema info. - * - * If you need additional properties that is represented by dynamic key, - * you can use the {@link additionalProperties} instead. - */ - properties?: Record; - - /** - * List of key values of the required properties. - * - * The `required` means a list of the key values of the required - * {@link properties}. If some property key is not listed in the `required` - * list, it means that property is optional. Otherwise some property key - * exists in the `required` list, it means that the property must be filled. - * - * Below is an example of the {@link properties} and `required`. - * - * ```typescript - * interface SomeObject { - * id: string; - * email: string; - * name?: string; - * } - * ``` - * - * As you can see, `id` and `email` {@link properties} are {@link required}, - * so that they are listed in the `required` list. - * - * ```json - * { - * "type": "object", - * "properties": { - * "id": { "type": "string" }, - * "email": { "type": "string" }, - * "name": { "type": "string" } - * }, - * "required": ["id", "email"] - * } - * ``` - */ - required?: string[]; - - /** - * Additional properties' info. - * - * The `additionalProperties` means the type schema info of the additional - * properties that are not listed in the {@link properties}. - * - * If the value is `true`, it means that the additional properties are not - * restricted. They can be any type. Otherwise, if the value is - * {@link IOpenAiSchema} type, it means that the additional properties must - * follow the type schema info. - * - * - `true`: `Record` - * - `IOpenAiSchema`: `Record` - */ - additionalProperties?: boolean | IOpenAiSchema; - } - - /** - * Unknown type schema info. - * - * It means the type of the value is `any`. - */ - export interface IUnknown extends __IAttribute { - /** - * Type is never be defined. - */ - type?: undefined; - } - - /** - * Null only type schema info. - */ - export interface INullOnly extends __IAttribute { - /** - * Type is always `null`. - */ - type: "null"; - - /** - * Default value. - */ - default?: null; - } - - /** - * One of type schema info. - * - * `IOneOf` represents an union type of the TypeScript (`A | B | C`). - * - * For reference, even though your Swagger (or OpenAPI) document has - * defined `anyOf` instead of the `oneOf`, it has been forcibly converted - * to `oneOf` type by {@link OpenApi.convert OpenAPI conversion}. - */ - export interface IOneOf extends __IAttribute { - /** - * List of the union types. - */ - oneOf: Exclude[]; - } - - /** - * Significant attributes that can be applied to the most types. - */ - export interface __ISignificant extends __IAttribute { - /** - * Discriminator value of the type. - */ - type: Type; - - /** - * Whether to allow `null` value or not. - */ - nullable?: boolean; - } - - /** - * Common attributes that can be applied to all types. - */ - export interface __IAttribute extends ISwaggerSchemaCommonPlugin { - /** - * Title of the schema. - */ - title?: string; - - /** - * Detailed description of the schema. - */ - description?: string; - - /** - * Whether the type is deprecated or not. - */ - deprecated?: boolean; - - /** - * Example value. - */ - example?: any; - - /** - * List of example values as key-value pairs. - */ - examples?: Record; - } -} diff --git a/src/ISwagger.ts b/src/ISwagger.ts deleted file mode 100644 index 7dbea53..0000000 --- a/src/ISwagger.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { OpenApi, OpenApiV3_1 } from "@samchon/openapi"; - -import { ISwaggerOperation } from "./ISwaggerOperation"; -import "./ISwaggerOperation"; -import { ISwaggerSchema } from "./ISwaggerSchema"; -import "./ISwaggerSchema"; - -/** - * Swagger Document. - * - * `ISwagger` is based on {@link OpenApi.IDocument}, and it is a data structure - * representing content of `swagger.json` file following OpenAPI v3.1 specification, - * but emended a little bit by [`@samchon/openapi`](https://github.com/samchon/openapi). - * - * The difference with `ISwagger` and {@link OpenApi.IDocument} is that `ISwagger` - * has more plugin properties especiallly for LLM (OpenAI) Function Calling. Below - * is the plugin properties newly added to `ISwagger`: - * - * - {@link ISwaggerOperation.x-wrtn-icon} - * - {@link ISwaggerSchema.IString.x-wrtn-secret-key} - * - {@link ISwaggerSchema.IString.x-wrtn-secret-scopes} - * - * For reference, here is the entire list of difference between OpenAPI v3.1 and - * emended {@link OpenApi.IDocument}. - * - * - Operation - * - Merged {@link OpenApiV3_1.IPath.parameters} to {@link OpenApi.IOperation.parameters} - * - Resolved {@link OpenApi.IJsonSchema.IReference references} of {@link OpenApiV3_1.IOperation} mebers - * - JSON Schema - * - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed} - * - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable} - * - Array type utilizes only single {@link OpenAPI.IJsonSchema.IArray.items} - * - Tuple type utilizes only {@link OpenApi.IJsonSchema.ITuple.prefixItems} - * - Merge {@link OpenApiV3_1.IJsonSchema.IAnyOf} to {@link OpenApi.IJsonSchema.IOneOf} - * - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link OpenApi.IJsonSchema.IReference} - * - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link OpenApi.IJsonSchema.IObject} - * - * @author Samchon - */ -export import ISwagger = OpenApi.IDocument; diff --git a/src/ISwaggerComponents.ts b/src/ISwaggerComponents.ts deleted file mode 100644 index 382efe2..0000000 --- a/src/ISwaggerComponents.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import "./ISwaggerSchema"; - -/** - * Reusable components in Swagger. - * - * `ISwaggerComponents` is a data structure representing content of `components` object - * in `swagger.json` file generated by Nestia. Note that, this is not an universal - * structure, but a dedicated structure only for Nestia. - * - * @author Samchon - */ -export import ISwaggerComponents = OpenApi.IComponents; diff --git a/src/ISwaggerInfo.ts b/src/ISwaggerInfo.ts deleted file mode 100644 index 0d86282..0000000 --- a/src/ISwaggerInfo.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -export import ISwaggerInfo = OpenApi.IDocument.IInfo; diff --git a/src/ISwaggerMigrateApplication.ts b/src/ISwaggerMigrateApplication.ts deleted file mode 100644 index 2366b5b..0000000 --- a/src/ISwaggerMigrateApplication.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IHttpMigrateApplication } from "@samchon/openapi"; - -import "./ISwaggerOperation"; -import "./ISwaggerSchema"; - -export import ISwaggerMigrateApplication = IHttpMigrateApplication; diff --git a/src/ISwaggerMigrateRoute.ts b/src/ISwaggerMigrateRoute.ts deleted file mode 100644 index fd46751..0000000 --- a/src/ISwaggerMigrateRoute.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IHttpMigrateRoute } from "@samchon/openapi"; - -import "./ISwaggerOperation"; -import "./ISwaggerSchema"; - -export import ISwaggerMigrateRoute = IHttpMigrateRoute; diff --git a/src/ISwaggerOperation.ts b/src/ISwaggerOperation.ts deleted file mode 100644 index 21bc0ed..0000000 --- a/src/ISwaggerOperation.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; -import { tags } from "typia"; - -import "./ISwaggerSchema"; - -export import ISwaggerOperation = OpenApi.IOperation; - -declare module "@samchon/openapi" { - export namespace OpenApi { - export interface IOperation { - /** - * Icon URL. - * - * `x-wrtn-icon` is a property means an icon URL representing the target API. - */ - "x-wrtn-icon"?: string & tags.Format<"uri">; - - /** - * Whether standalone API or not. - * - * `x-wrtn-standalone` is a property means whether the target API is standalone - * so that it can be called without any other APIs or not. - */ - "x-wrtn-standalone"?: boolean; - - /** - * Whether experimental or not. - * - * `x-wrtn-experimental` is a property means whether the target API is experimental - * so that it can be revealed in the production environment or not. In other words, - * if the property is `true`, the API is only available in the development environment. - */ - "x-wrtn-experimental"?: boolean; - - /** - * List of keywords selecting the operation for benchmarks. - * - * `x-wrtn-function-select-benchmarks` is a property which means a list of keywords - * that may cause the LLM function calling selection to be benchmarked. - */ - "x-wrtn-function-select-benchmarks"?: string[]; - } - } -} diff --git a/src/ISwaggerPath.ts b/src/ISwaggerPath.ts deleted file mode 100644 index 834ccbc..0000000 --- a/src/ISwaggerPath.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import "./ISwaggerOperation"; -import "./ISwaggerSchema"; - -export import ISwaggerPath = OpenApi.IPath; diff --git a/src/ISwaggerSchema.ts b/src/ISwaggerSchema.ts deleted file mode 100644 index 3cb95bb..0000000 --- a/src/ISwaggerSchema.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import { ISwaggerSchemaCommonPlugin } from "./ISwaggerSchemaCommonPlugin"; -import { ISwaggerSchemaPaymentPlugin } from "./ISwaggerSchemaPaymentPlugin"; -import { ISwaggerSchemaSecurityPlugin } from "./ISwaggerSchemaSecurityPlugin"; - -export import ISwaggerSchema = OpenApi.IJsonSchema; - -declare module "@samchon/openapi" { - export namespace OpenApi { - export namespace IJsonSchema { - export interface IInteger extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface INumber extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface IString - extends ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin {} - export interface __IAttribute extends ISwaggerSchemaCommonPlugin {} - } - } - - export namespace IChatGptSchema { - export interface IInteger extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface INumber extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface IString - extends ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin {} - export interface __IAttribute extends ISwaggerSchemaCommonPlugin {} - } - - export namespace IClaudeSchema { - export interface IInteger extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface INumber extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface IString - extends ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin {} - export interface __IAttribute extends ISwaggerSchemaCommonPlugin {} - } - - export namespace IGeminiSchema { - export interface IInteger extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface INumber extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface IString - extends ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin {} - export interface __IAttribute extends ISwaggerSchemaCommonPlugin {} - } - - export namespace ILlamaSchema { - export interface IInteger extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface INumber extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface IString - extends ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin {} - export interface __IAttribute extends ISwaggerSchemaCommonPlugin {} - } - - export namespace ILlmSchemaV3 { - export interface IInteger extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface INumber extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface IString - extends ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin {} - export interface __IAttribute extends ISwaggerSchemaCommonPlugin {} - } - - export namespace ILlmSchemaV3_1 { - export interface IInteger extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface INumber extends ISwaggerSchemaPaymentPlugin.INumeric {} - export interface IString - extends ISwaggerSchemaPaymentPlugin.IString, - ISwaggerSchemaSecurityPlugin {} - export interface __IAttribute extends ISwaggerSchemaCommonPlugin {} - } -} diff --git a/src/ISwaggerSchemaCommonPlugin.ts b/src/ISwaggerSchemaCommonPlugin.ts deleted file mode 100644 index 1efa8da..0000000 --- a/src/ISwaggerSchemaCommonPlugin.ts +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Plugin properties for every types. - * - * @author Samchon - */ -export interface ISwaggerSchemaCommonPlugin { - /** - * Placeholder value for frontend application. - * - * Placeholder means the value to be shown in the input field as a hint. - * For example, when an email input field exists, the placeholder value - * would be "Insert your email address here". - */ - "x-wrtn-placeholder"?: string; - - /** - * Prerequisite API endpoint for the schema. - * - * `x-wrtn-prerequisite` is a property representing the prerequisite API - * interaction. It means that, the endpoint API should be called before - * calling the target API, for composing some argument value. - * - * @reference https://github.com/wrtnio/decorators/blob/main/src/Prerequisite.ts - */ - "x-wrtn-prerequisite"?: ISwaggerSchemaCommonPlugin.IPrerequisite; -} -export namespace ISwaggerSchemaCommonPlugin { - /** - * Prerequisite API endpoint with accessors. - */ - export type IPrerequisite = IPrerequisiteOfJMesPath | IPrerequisiteOfFunction; - - /** - * Prerequisite by JMESPath expression. - */ - interface IPrerequisiteOfJMesPath extends IPrerequisiteBase { - /** - * Function returning transformed values using JMESPath expression. - * - * `Prerequisite.Props.jmesPath` is a string typed property that extracts desired values - * from the prerequisite API response using a JMESPath expression. This property simplifies - * and replaces the `label`, `value`, and `array` properties. - * - * JMESPath expressions are used to extract the desired data based on the API response. - * The expression must always be a valid JMESPath syntax. - * - * - Type: `jmesPath: string` - * - Example: `"members[*].data.title"` - * - Usage: `jmespath.search(response, jmesPath)` - * - * Note: The `label`, `value`, and `array` properties are no longer in use. - */ - jmesPath: string; - } - - /** - * Prerequisite by JS function. - * - * @deprecated - */ - interface IPrerequisiteOfFunction extends IPrerequisiteBase { - /** - * Transform function returning label. - * - * `Prerequisite.Props.label` is a string typed property representing - * a function returning the label from the element instance of the - * prerequisite API respond array. - * - * The function script must be a string value that can be parsed by - * `new Function(string)` statement. Also, its parameter names are - * always `elem`, `index` and `array`. Of course, the function's - * return type must be always `string`. - * - * - type: `label: (elem: Element, index: number, array: Element[]) => string` - * - example: `return elem.title` - * - how to use: `new Function("elem", "index", "array", labelScript)(...)` - */ - label: string; - - /** - * Transform function returning target value. - * - * `Prerequisite.Props.value` is a string typed property representing - * a function returning the target value from the element instance of - * the prerequisite API respond array. If you've defined this `Prerequisite` - * type to a `number` type, the returned value must be actual number type. - * - * The function script must be a string value that can be parsed by - * `new Function(string)` statement. Also, its parameter names are always - * `elem`, `index` and `array`. - * - * - type: `value: (elem: Element, index: number, array: Element[]) => Value` - * - example: `return elem.no` - * - how to use: `new Function("elem", "index", "array", valueScript)(...)` - */ - value: string; - - /** - * Transform function returning array instance. - * - * `Prerequisite.Props.array` is a string typed property representing - * a function returning an array instance from the response of the - * prerequisite API. - * - * The function script must be a string value that can be parsed by - * `new Function(string)` statement. Also, its parameter name is - * always `response`. - * - * If the prerequisite API responses an array and it is the desired one, - * you don't need to specify this property. - * - * - type: `array: (response: Response) => Elemenet[]` - * - example: `return response.members.map(m => m.data)` - * - how to use: `new Function("response", arrayScript)(response)` - */ - array?: string; - } - - interface IPrerequisiteBase { - /** - * HTTP method to call the endpoint. - */ - method: "get" | "post" | "patch" | "put" | "delete"; - - /** - * Path of the endpoint. - */ - path: string; - } -} diff --git a/src/ISwaggerSchemaPaymentPlugin.ts b/src/ISwaggerSchemaPaymentPlugin.ts deleted file mode 100644 index 0de3756..0000000 --- a/src/ISwaggerSchemaPaymentPlugin.ts +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Collection of payment plugins. - * - * @author Samchon - */ -export namespace ISwaggerSchemaPaymentPlugin { - /** - * Plugin properties for `integer` and `number` types. - */ - export interface INumeric { - /** - * 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"?: true; - - /** - * The citizen ID who've ordered the payment. - * - * If an order appliance function be called and it returns a value with - * `x-wrtn-payment-citizen-id` property, the value means the citizen - * ID who've ordered the payment. - * - * When processing the publish, you have to fill the next payment - * function's parameter with the citizen ID who've ordered the payment. - */ - "x-wrtn-payment-citizen-id"?: true; - - /** - * The amount of the payment should be paid. - * - * If an order appliance function be called and it returns a value with - * `x-wrtn-payment-amount` property, the value means the amount of the - * payment should be paid at the next publishing plan. - * - * The payment would be proceeded by the payment vendor service, and you - * may fill the next payment function's parameter with the vendor service - * code and UID of the payment transaction that is signified by the - * `x-wrtn-payment-vendor` and `x-wrtn-payment-uid` typed properties. - */ - "x-wrtn-payment-amount"?: true; - } - - /** - * Plugin properties for the `string` type. - */ - export interface IString { - /** - * The currency of the payment should be paid. - * - * If an order appliance function be called and it returns a value with - * `x-wrtn-payment-currency` property, the value means the currency of the - * payment should be paid at the next publishing plan. - * - * The payment would be proceeded by the payment vendor service, and you - * may fill the next payment function's parameter with the vendor service - * code and UID of the payment transaction that is signified by the - * `x-wrtn-payment-vendor` and `x-wrtn-payment-uid` typed properties. - */ - "x-wrtn-payment-currency"?: true; - - /** - * Code of the payment vendor service. - * - * When a payment function is called, its parameters may contain the - * code of the payment vendor service that is represented by the - * `x-wrtn-payment-vendor` typed property. - * - * If the target payment function's vendor service is "stripe", just fill - * the `x-wrtn-payment-vendor` property with the string "stripe". - * Otherwise, the vendor service code is "toss-payments", just fill the - * `x-wrtn-payment-vendor` typed property with the string "toss-payments". - * - * The `x-wrtn-payment-vendor` property is used to identify the payment - * vendor service and to check the payment status with the - * {@link x-wrtn-payment-uid} typed property. - */ - "x-wrtn-payment-vendor"?: true; - - /** - * UID of the payment transaction. - * - * When a payment function is called, its parameters may contain the - * UID of the payment transaction that is signified by the - * `x-wrtn-payment-uid` typed property. - * - * The UID is a unique identifier of the payment transaction that is - * proceeded by the payment vendor service. The UID is used to identify - * the payment transaction and to check the payment status with the - * {@link x-wrtn-payment-vendor} typed property. - */ - "x-wrtn-payment-uid"?: true; - - /** - * The payment target's order ID. - * - * 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"?: true; - - /** - * The payment target's order name. - * - * If an order appliance function be called and it returns a value with - * `x-wrtn-payment-order-name` property, the value means the name 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 name. - * - * Note that, this `x-wrtn-payment-order-name` is different with the - * {@link IVendor.x-wrtn-payment-citizen-name}. This is not the name - * or citizen, but of the target order. - */ - "x-wrtn-payment-order-name"?: true; - - /** - * The citizen ID who've ordered the payment. - * - * If an order appliance function be called and it returns a value with - * `x-wrtn-payment-citizen-id` property, the value means the citizen - * ID who've ordered the payment. - * - * When processing the publish, you have to fill the next payment - * function's parameter with the citizen ID who've ordered the payment. - */ - "x-wrtn-payment-citizen-id"?: true; - - /** - * The citizen name who've ordered the payment. - * - * If an order appliance function be called and it returns a value with - * `x-wrtn-payment-citizen-name` property, the value means the citizen - * name who've ordered the payment. - * - * When processing the publish, you have to fill the next payment - * function's parameter with the citizen name who've ordered the payment. - */ - "x-wrtn-payment-citizen-name"?: true; - - /** - * The mobile phone number of the citizen who've ordered the payment. - * - * If an order appliance function be called and it returns a value with - * `x-wrtn-payment-citizen-mobile` property, the value means the mobile - * phone number of the citizen who've ordered the payment. - * - * When processing the publish, you have to fill the next payment - * function's parameter with the mobile phone number of the citizen - * who've ordered the payment. - */ - "x-wrtn-payment-citizen-mobile"?: true; - } -} diff --git a/src/ISwaggerSchemaSecurityPlugin.ts b/src/ISwaggerSchemaSecurityPlugin.ts deleted file mode 100644 index 7b52641..0000000 --- a/src/ISwaggerSchemaSecurityPlugin.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Plugin properties about the security. - * - * @author Samchon - */ -export interface ISwaggerSchemaSecurityPlugin { - /** - * Secret key for the schema. - * - * `x-wrtn-secret-key` is a property means a secret key that is required - * for the target API endpoint calling. If the secret key is not filled, - * the API call would be failed. - */ - "x-wrtn-secret-key"?: string; - - /** - * Secret scopes for the schema. - * - * `x-wrtn-secret-scopes` is a property means a list of secret scopes that - * are required for the target API endpoint calling. If the secret scopes - * are not satisfied, the API call would be failed. - */ - "x-wrtn-secret-scopes"?: string[]; -} diff --git a/src/ISwaggerSecurityScheme.ts b/src/ISwaggerSecurityScheme.ts deleted file mode 100644 index 47e1ea3..0000000 --- a/src/ISwaggerSecurityScheme.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -export import ISwaggerSecurityScheme = OpenApi.ISecurityScheme; diff --git a/src/ISwaggerServer.ts b/src/ISwaggerServer.ts deleted file mode 100644 index db7b3d9..0000000 --- a/src/ISwaggerServer.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -export import ISwaggerServer = OpenApi.IServer; diff --git a/src/ISwaggerTag.ts b/src/ISwaggerTag.ts deleted file mode 100644 index ebd96d2..0000000 --- a/src/ISwaggerTag.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -export import ISwaggerTag = OpenApi.IDocument.ITag; diff --git a/src/OpenAiTypeChecker.ts b/src/OpenAiTypeChecker.ts deleted file mode 100644 index a159be2..0000000 --- a/src/OpenAiTypeChecker.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { IOpenAiSchema } from "./IOpenAiSchema"; - -/** - * Type checker for OpenAI function call schema. - * - * `OpenAiTypeChecker` is a type checker of {@link IOpenAiSchema}. - * - * @author Samchon - */ -export namespace OpenAiTypeChecker { - /** - * Visit every nested schemas. - * - * Visit every nested schemas of the target, and apply the callback function - * to them. - * - * If the visitor meets an union type, it will visit every individual schemas - * in the union type. Otherwise meets an object type, it will visit every - * properties and additional properties. If the visitor meets an array type, - * it will visit the item type. - * - * @param schema Target schema to visit - * @param callback Callback function to apply - */ - export const visit = ( - schema: IOpenAiSchema, - callback: (schema: IOpenAiSchema) => void, - ): void => { - callback(schema); - if (isOneOf(schema)) schema.oneOf.forEach((s) => visit(s, callback)); - else if (isObject(schema)) { - for (const [_, s] of Object.entries(schema.properties ?? {})) - visit(s, callback); - if ( - typeof schema.additionalProperties === "object" && - schema.additionalProperties !== null - ) - visit(schema.additionalProperties, callback); - } else if (isArray(schema)) visit(schema.items, callback); - }; - - /** - * Test whether the schema is an union type. - * - * @param schema Target schema - * @returns Whether union type or not - */ - export const isOneOf = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.IOneOf => - (schema as IOpenAiSchema.IOneOf).oneOf !== undefined; - - /** - * Test whether the schema is an object type. - * - * @param schema Target schema - * @returns Whether object type or not - */ - export const isObject = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.IObject => - (schema as IOpenAiSchema.IObject).type === "object"; - - /** - * Test whether the schema is an array type. - * - * @param schema Target schema - * @returns Whether array type or not - */ - export const isArray = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.IArray => - (schema as IOpenAiSchema.IArray).type === "array"; - - /** - * Test whether the schema is a boolean type. - * - * @param schema Target schema - * @returns Whether boolean type or not - */ - export const isBoolean = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.IBoolean => - (schema as IOpenAiSchema.IBoolean).type === "boolean"; - - /** - * Test whether the schema is an integer type. - * - * @param schema Target schema - * @returns Whether integer type or not - */ - export const isInteger = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.IInteger => - (schema as IOpenAiSchema.IInteger).type === "integer"; - - /** - * Test whether the schema is a number type. - * - * @param schema Target schema - * @returns Whether number type or not - */ - export const isNumber = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.INumber => - (schema as IOpenAiSchema.INumber).type === "number"; - - /** - * Test whether the schema is a string type. - * - * @param schema Target schema - * @returns Whether string type or not - */ - export const isString = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.IString => - (schema as IOpenAiSchema.IString).type === "string"; - - /** - * Test whether the schema is a null type. - * - * @param schema Target schema - * @returns Whether null type or not - */ - export const isNullOnly = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.INullOnly => - (schema as IOpenAiSchema.INullOnly).type === "null"; - - /** - * Test whether the schema is a nullable type. - * - * @param schema Target schema - * @returns Whether nullable type or not - */ - export const isNullable = (schema: IOpenAiSchema): boolean => - !isUnknown(schema) && - (isNullOnly(schema) || - (isOneOf(schema) - ? schema.oneOf.some(isNullable) - : schema.nullable === true)); - - /** - * Test whether the schema is an unknown type. - * - * @param schema Target schema - * @returns Whether unknown type or not - */ - export const isUnknown = ( - schema: IOpenAiSchema, - ): schema is IOpenAiSchema.IUnknown => - !isOneOf(schema) && (schema as IOpenAiSchema.IUnknown).type === undefined; -} diff --git a/src/index.ts b/src/index.ts index 315294c..c58f616 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,26 +1,226 @@ -// LLM TYPES -export * from "./IHttpOpenAiApplication"; -export * from "./IHttpOpenAiFunction"; -export * from "./IOpenAiSchema"; -export * from "./OpenAiTypeChecker"; -export * from "./HttpOpenAi"; - -// OPENAPI TYPES -export * from "./ISwagger"; -export * from "./ISwaggerInfo"; -export * from "./ISwaggerServer"; -export * from "./ISwaggerPath"; -export * from "./ISwaggerOperation"; -export * from "./ISwaggerTag"; - -export * from "./ISwaggerMigrateApplication"; -export * from "./ISwaggerMigrateRoute"; - -export * from "./ISwaggerComponents"; -export * from "./ISwaggerSchema"; -export * from "./ISwaggerSecurityScheme"; - -// PLUGINS -export * from "./ISwaggerSchemaCommonPlugin"; -export * from "./ISwaggerSchemaPaymentPlugin"; -export * from "./ISwaggerSchemaSecurityPlugin"; +import "@samchon/openapi"; + +declare module "@samchon/openapi" { + export namespace OpenApi { + export interface IOperation { + /** + * Icon URL. + * + * `x-wrtn-icon` is a property means an icon URL representing the target API. + * + * @format uri + */ + "x-wrtn-icon"?: string; + + /** + * Whether experimental or not. + * + * `x-wrtn-experimental` is a property means whether the target API is experimental + * so that it can be revealed in the production environment or not. In other words, + * if the property is `true`, the API is only available in the development environment. + */ + "x-wrtn-experimental"?: boolean; + + /** + * List of keywords selecting the operation for benchmarks. + * + * `x-wrtn-function-select-benchmarks` is a property which means a list of keywords + * that may cause the LLM function calling selection to be benchmarked. + */ + "x-wrtn-function-select-benchmarks"?: string[]; + } + } + + export interface IJsonSchemaAttribute { + /** + * Placeholder value for frontend application. + * + * Placeholder means the value to be shown in the input field as a hint. + * For example, when an email input field exists, the placeholder value + * would be "Insert your email address here". + */ + "x-wrtn-placeholder"?: string; + } + export namespace IJsonSchemaAttribute { + export interface IInteger extends IPaymentNumericPlugin {} + export interface INumber extends IPaymentNumericPlugin {} + export interface IString { + /** + * Secret key for the schema. + * + * `x-wrtn-secret-key` is a property means a secret key that is required + * for the target API endpoint calling. If the secret key is not filled, + * the API call would be failed. + */ + "x-wrtn-secret-key"?: string; + + /** + * Secret scopes for the schema. + * + * `x-wrtn-secret-scopes` is a property means a list of secret scopes that + * are required for the target API endpoint calling. If the secret scopes + * are not satisfied, the API call would be failed. + */ + "x-wrtn-secret-scopes"?: string[]; + + /** + * The currency of the payment should be paid. + * + * If an order appliance function be called and it returns a value with + * `x-wrtn-payment-currency` property, the value means the currency of the + * payment should be paid at the next publishing plan. + * + * The payment would be proceeded by the payment vendor service, and you + * may fill the next payment function's parameter with the vendor service + * code and UID of the payment transaction that is signified by the + * `x-wrtn-payment-vendor` and `x-wrtn-payment-uid` typed properties. + */ + "x-wrtn-payment-currency"?: true; + + /** + * Code of the payment vendor service. + * + * When a payment function is called, its parameters may contain the + * code of the payment vendor service that is represented by the + * `x-wrtn-payment-vendor` typed property. + * + * If the target payment function's vendor service is "stripe", just fill + * the `x-wrtn-payment-vendor` property with the string "stripe". + * Otherwise, the vendor service code is "toss-payments", just fill the + * `x-wrtn-payment-vendor` typed property with the string "toss-payments". + * + * The `x-wrtn-payment-vendor` property is used to identify the payment + * vendor service and to check the payment status with the + * {@link x-wrtn-payment-uid} typed property. + */ + "x-wrtn-payment-vendor"?: true; + + /** + * UID of the payment transaction. + * + * When a payment function is called, its parameters may contain the + * UID of the payment transaction that is signified by the + * `x-wrtn-payment-uid` typed property. + * + * The UID is a unique identifier of the payment transaction that is + * proceeded by the payment vendor service. The UID is used to identify + * the payment transaction and to check the payment status with the + * {@link x-wrtn-payment-vendor} typed property. + */ + "x-wrtn-payment-uid"?: true; + + /** + * The payment target's order ID. + * + * 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 transaction 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"?: true; + + /** + * The payment target's order name. + * + * If an order appliance function be called and it returns a value with + * `x-wrtn-payment-order-name` property, the value means the name 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 name. + * + * Note that, this `x-wrtn-payment-order-name` is different with the + * {@link IVendor.x-wrtn-payment-citizen-name}. This is not the name + * or citizen, but of the target order. + */ + "x-wrtn-payment-order-name"?: true; + + /** + * The citizen ID who've ordered the payment. + * + * If an order appliance function be called and it returns a value with + * `x-wrtn-payment-citizen-id` property, the value means the citizen + * ID who've ordered the payment. + * + * When processing the publish, you have to fill the next payment + * function's parameter with the citizen ID who've ordered the payment. + */ + "x-wrtn-payment-citizen-id"?: true; + + /** + * The citizen name who've ordered the payment. + * + * If an order appliance function be called and it returns a value with + * `x-wrtn-payment-citizen-name` property, the value means the citizen + * name who've ordered the payment. + * + * When processing the publish, you have to fill the next payment + * function's parameter with the citizen name who've ordered the payment. + */ + "x-wrtn-payment-citizen-name"?: true; + + /** + * The mobile phone number of the citizen who've ordered the payment. + * + * If an order appliance function be called and it returns a value with + * `x-wrtn-payment-citizen-mobile` property, the value means the mobile + * phone number of the citizen who've ordered the payment. + * + * When processing the publish, you have to fill the next payment + * function's parameter with the mobile phone number of the citizen + * who've ordered the payment. + */ + "x-wrtn-payment-citizen-mobile"?: true; + } + } +} + +interface IPaymentNumericPlugin { + /** + * 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 transaction 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"?: true; + + /** + * The citizen ID who've ordered the payment. + * + * If an order appliance function be called and it returns a value with + * `x-wrtn-payment-citizen-id` property, the value means the citizen + * ID who've ordered the payment. + * + * When processing the publish, you have to fill the next payment + * function's parameter with the citizen ID who've ordered the payment. + */ + "x-wrtn-payment-citizen-id"?: true; + + /** + * The amount of the payment should be paid. + * + * If an order appliance function be called and it returns a value with + * `x-wrtn-payment-amount` property, the value means the amount of the + * payment should be paid at the next publishing plan. + * + * The payment would be proceeded by the payment vendor service, and you + * may fill the next payment function's parameter with the vendor service + * code and UID of the payment transaction that is signified by the + * `x-wrtn-payment-vendor` and `x-wrtn-payment-uid` typed properties. + */ + "x-wrtn-payment-amount"?: true; +} diff --git a/src/internal/HttpOpenAiFetcher.ts b/src/internal/HttpOpenAiFetcher.ts deleted file mode 100644 index 98abd35..0000000 --- a/src/internal/HttpOpenAiFetcher.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { - HttpMigration, - IHttpMigrateRoute, - IHttpResponse, -} from "@samchon/openapi"; -import { HttpMigrateRouteFetcher } from "@samchon/openapi/lib/http/HttpMigrateRouteFetcher"; - -import { HttpOpenAi } from "../HttpOpenAi"; - -export namespace HttpOpenAiFetcher { - export const execute = async ( - props: HttpOpenAi.IFetchProps, - ): Promise => - HttpMigrateRouteFetcher.execute(getFetchArguments(props)); - - export const propagate = async ( - props: HttpOpenAi.IFetchProps, - ): Promise => - HttpMigrateRouteFetcher.propagate(getFetchArguments(props)); - - const getFetchArguments = ( - props: HttpOpenAi.IFetchProps, - ): HttpMigration.IFetchProps => { - const route: IHttpMigrateRoute = props.function.route(); - if (props.application.options.keyword) { - const input: Record = props.arguments[0] as Record< - string, - any - >; - return { - connection: props.connection, - route, - parameters: Object.fromEntries( - route.parameters.map((p) => [p.key, input[p.key]] as const), - ), - query: input.query, - body: input.body, - }; - } - const parameters: Array = props.arguments.slice( - 0, - route.parameters.length, - ); - const query: unknown | undefined = route.query - ? props.arguments[route.parameters.length] - : undefined; - const body: unknown | undefined = route.body - ? props.arguments[route.parameters.length + (route.query ? 1 : 0)] - : undefined; - return { - connection: props.connection, - route, - parameters: parameters as Array< - string | number | boolean | bigint | null - >, - query: query as object, - body: body as object, - }; - }; -} diff --git a/src/internal/HttpOpenAiMerger.ts b/src/internal/HttpOpenAiMerger.ts deleted file mode 100644 index 8282194..0000000 --- a/src/internal/HttpOpenAiMerger.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { IHttpOpenAiFunction } from "../IHttpOpenAiFunction"; - -/** - * Data combiner for LLM function call. - * - * @author Samchon - */ -export namespace LlmDataMerger { - /** - * Properties of {@link parameters} function. - */ - export interface IProps { - /** - * Target function to call. - */ - function: IHttpOpenAiFunction; - - /** - * Arguments composed by LLM (Large Language Model). - */ - llm: any[]; - - /** - * Arguments composed by human. - */ - human: any[]; - } - - /** - * Combine LLM and human arguments into one. - * - * When you composes {@link IOpenAiDocument} with - * {@link IOpenAiDocument.IOptions.separate} option, then the arguments of the - * target function would be separated into two parts; LLM (Large Language Model) - * and human. - * - * In that case, you can combine both LLM and human composed arguments into one - * by utilizing this {@link LlmDataMerger.parameters} function, referencing - * the target function metadata {@link IOpenAiFunction.separated}. - * - * @param props Properties to combine LLM and human arguments with metadata. - * @returns Combined arguments - */ - export const parameters = (props: IProps): unknown[] => { - const separated: IHttpOpenAiFunction.ISeparated | undefined = - props.function.separated; - if (separated === undefined) - throw new Error( - "Error on OpenAiDataComposer.parameters(): the function parameters are not separated.", - ); - return new Array(props.function.parameters.length).fill(0).map((_, i) => { - const llm: number = separated.llm.findIndex((p) => p.index === i); - const human: number = separated.human.findIndex((p) => p.index === i); - if (llm === -1 && human === -1) - throw new Error( - "Error on OpenAiDataComposer.parameters(): failed to gather separated arguments, because both LLM and human sides are all empty.", - ); - return value(props.llm[llm], props.human[human]); - }); - }; - - /** - * Combine two values into one. - * - * If both values are objects, then combines them in the properties level. - * - * Otherwise, returns the latter value if it's not null, otherwise the former value - * - * - `return (y ?? x)` - * - * @param x Value X - * @param y Value Y - * @returns Combined value - */ - export const value = (x: unknown, y: unknown): unknown => - typeof x === "object" && typeof y === "object" && x !== null && y !== null - ? combineObject(x, y) - : Array.isArray(x) && Array.isArray(y) - ? new Array(Math.max(x.length, y.length)) - .fill(0) - .map((_, i) => value(x[i], y[i])) - : (y ?? x); - - const combineObject = (x: any, y: any): any => { - const output: any = { ...x }; - for (const [k, v] of Object.entries(y)) output[k] = value(x[k], v); - return output; - }; -} diff --git a/src/internal/HttpOpenAiSeparator.ts b/src/internal/HttpOpenAiSeparator.ts deleted file mode 100644 index c9e6579..0000000 --- a/src/internal/HttpOpenAiSeparator.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { IHttpOpenAiFunction } from "../IHttpOpenAiFunction"; -import { IOpenAiSchema } from "../IOpenAiSchema"; -import { OpenAiTypeChecker } from "../OpenAiTypeChecker"; - -export namespace HttpOpenAiSeparator { - export interface IProps { - parameters: IOpenAiSchema[]; - predicator: (schema: IOpenAiSchema) => boolean; - } - - export const parameters = (props: IProps): IHttpOpenAiFunction.ISeparated => { - const indexes: Array<[IOpenAiSchema | null, IOpenAiSchema | null]> = - props.parameters.map(schema(props.predicator)); - return { - llm: indexes - .map(([llm], index) => ({ - index, - schema: llm!, - })) - .filter(({ schema }) => schema !== null), - human: indexes - .map(([, human], index) => ({ - index, - schema: human!, - })) - .filter(({ schema }) => schema !== null), - }; - }; - - export const schema = - (predicator: (schema: IOpenAiSchema) => boolean) => - (input: IOpenAiSchema): [IOpenAiSchema | null, IOpenAiSchema | null] => { - if (predicator(input) === true) return [null, input]; - else if ( - OpenAiTypeChecker.isUnknown(input) || - OpenAiTypeChecker.isOneOf(input) - ) - return [input, null]; - else if (OpenAiTypeChecker.isObject(input)) - return separateObject(predicator)(input); - else if (OpenAiTypeChecker.isArray(input)) - return separateArray(predicator)(input); - return [input, null]; - }; - - const separateArray = - (predicator: (schema: IOpenAiSchema) => boolean) => - ( - input: IOpenAiSchema.IArray, - ): [IOpenAiSchema.IArray | null, IOpenAiSchema.IArray | null] => { - const [x, y] = schema(predicator)(input.items); - return [ - x !== null ? { ...input, items: x } : null, - y !== null ? { ...input, items: y } : null, - ]; - }; - - const separateObject = - (predicator: (schema: IOpenAiSchema) => boolean) => - ( - input: IOpenAiSchema.IObject, - ): [IOpenAiSchema.IObject | null, IOpenAiSchema.IObject | null] => { - if ( - Object.keys(input.properties ?? {}).length === 0 && - !!input.additionalProperties === false - ) - return [input, null]; - - const llm = { - ...input, - properties: {} as Record, - } satisfies IOpenAiSchema.IObject; - const human = { - ...input, - properties: {} as Record, - } satisfies IOpenAiSchema.IObject; - - for (const [key, value] of Object.entries(input.properties ?? {})) { - const [x, y] = schema(predicator)(value); - if (x !== null) llm.properties[key] = x; - if (y !== null) human.properties[key] = y; - } - if ( - typeof input.additionalProperties === "object" && - input.additionalProperties !== null - ) { - const [dx, dy] = schema(predicator)(input.additionalProperties); - llm.additionalProperties = dx ?? false; - human.additionalProperties = dy ?? false; - } - return [ - Object.keys(llm.properties).length === 0 ? null : shrinkRequired(llm), - Object.keys(human.properties).length === 0 - ? null - : shrinkRequired(human), - ]; - }; - - const shrinkRequired = ( - input: IOpenAiSchema.IObject, - ): IOpenAiSchema.IObject => { - if (input.required !== undefined) - input.required = input.required.filter( - (key) => input.properties?.[key] !== undefined, - ); - return input; - }; -} diff --git a/test/controllers/AppController.ts b/test/controllers/AppController.ts deleted file mode 100644 index 34a5a90..0000000 --- a/test/controllers/AppController.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { - TypedBody, - TypedFormData, - TypedParam, - TypedQuery, - TypedRoute, -} from "@nestia/core"; -import { Controller, Query } from "@nestjs/common"; -import Multer from "multer"; -import { tags } from "typia"; - -@Controller() -export class AppController { - @TypedRoute.Get(":index/:level/:optimal/parameters") - public parameters( - @TypedParam("index") - index: string & tags.Format<"uri"> & tags.ContentMediaType<"text/html">, - @TypedParam("level") level: number, - @TypedParam("optimal") optimal: boolean, - ) { - return { index, level, optimal }; - } - - @TypedRoute.Get(":index/:level/:optimal/query") - public query( - @TypedParam("index") - index: string & tags.Format<"uri"> & tags.ContentMediaType<"text/html">, - @TypedParam("level") level: number, - @TypedParam("optimal") optimal: boolean, - @TypedQuery() query: IQuery, - ) { - return { index, level, optimal, query }; - } - - /** - * @tag body - * @tag post - */ - @TypedRoute.Post(":index/:level/:optimal/body") - public body( - @TypedParam("index") - index: string & tags.Format<"uri"> & tags.ContentMediaType<"text/html">, - @TypedParam("level") level: number, - @TypedParam("optimal") optimal: boolean, - @TypedBody() body: IBody, - ) { - return { index, level, optimal, body }; - } - - @TypedRoute.Post(":index/:level/:optimal/query/body") - public query_body( - @TypedParam("index") - index: string & tags.Format<"uri"> & tags.ContentMediaType<"text/html">, - @TypedParam("level") level: number, - @TypedParam("optimal") optimal: boolean, - @Query("thumbnail") - thumbnail: string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">, - @TypedQuery() query: { summary: string }, - @TypedBody() body: IBody, - ) { - return { - index, - level, - optimal, - query: { - ...query, - thumbnail, - }, - body, - }; - } - - @TypedRoute.Post(":index/:level/:optimal/multipart") - public query_multipart( - @TypedParam("index") - index: string & tags.Format<"uri"> & tags.ContentMediaType<"text/html">, - @TypedParam("level") level: number, - @TypedParam("optimal") optimal: boolean, - @TypedQuery() query: IQuery, - @TypedFormData.Body(() => Multer()) - body: IMultipart, - ) { - return { - index, - level, - optimal, - query, - body: { - ...body, - file: `http://localhost:3000/files/${Date.now()}.raw`, - }, - }; - } - - /** - * @deprecated - */ - @TypedRoute.Get("nothing") - public nothing(): void {} -} - -interface IQuery { - summary: string; - thumbnail: string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">; -} -interface IBody { - title: string; - body: string; - draft: boolean; -} -interface IMultipart extends IBody { - file: File; -} diff --git a/test/controllers/AppFilter.ts b/test/controllers/AppFilter.ts deleted file mode 100644 index f4d7b93..0000000 --- a/test/controllers/AppFilter.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ArgumentsHost, Catch, HttpException } from "@nestjs/common"; -import { BaseExceptionFilter } from "@nestjs/core"; - -@Catch() -export class AppFilter extends BaseExceptionFilter { - public async catch(exception: HttpException | Error, host: ArgumentsHost) { - const status: number = - exception instanceof HttpException ? exception.getStatus() : 500; - if (status === 500) console.info(exception); - return super.catch(exception, host); - } -} diff --git a/test/controllers/AppModule.ts b/test/controllers/AppModule.ts deleted file mode 100644 index 322f15a..0000000 --- a/test/controllers/AppModule.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Module } from "@nestjs/common"; - -import { AppController } from "./AppController"; - -@Module({ - controllers: [AppController], -}) -export class AppModule {} diff --git a/test/features/test_http_llm_application_keyword.ts b/test/features/test_http_llm_application_keyword.ts deleted file mode 100644 index d203b69..0000000 --- a/test/features/test_http_llm_application_keyword.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpMigrateRoute, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IOpenAiSchema, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_application_keyword = (): void => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - }, - }); - for (const func of application.functions) { - const route: IHttpMigrateRoute = func.route(); - TestValidator.equals("length")(1)(func.parameters.length); - TestValidator.equals("properties")([ - ...route.parameters.map((p) => p.key), - ...(route.query ? ["query"] : []), - ...(route.body ? ["body"] : []), - ])( - (() => { - const schema: IOpenAiSchema = func.parameters[0]; - if (!OpenAiTypeChecker.isObject(schema)) return []; - return Object.keys(schema.properties ?? {}); - })(), - ); - } -}; diff --git a/test/features/test_http_llm_application_positional.ts b/test/features/test_http_llm_application_positional.ts deleted file mode 100644 index 5ac8213..0000000 --- a/test/features/test_http_llm_application_positional.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpMigrateRoute, OpenApi } from "@samchon/openapi"; -import { HttpOpenAi, IHttpOpenAiApplication } from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_application_positional = (): void => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: false, - }, - }); - for (const func of application.functions) { - const route: IHttpMigrateRoute = func.route(); - TestValidator.equals("length")(func.parameters.length)( - route.parameters.length + (route.query ? 1 : 0) + (route.body ? 1 : 0), - ); - } -}; diff --git a/test/features/test_http_llm_fetcher_keyword_body.ts b/test/features/test_http_llm_fetcher_keyword_body.ts deleted file mode 100644 index 906dde6..0000000 --- a/test/features/test_http_llm_fetcher_keyword_body.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_keyword_body = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => f.path === "/{index}/{level}/{optimal}/body" && f.method === "post", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [ - { - level: 123, - optimal: true, - body: { - title: "some title", - body: "some body", - draft: false, - }, - }, - ], - human: [ - { - index: "https://some.url/index.html", - }, - ], - }), - }); - TestValidator.equals("response.status")(response.status)(201); -}; diff --git a/test/features/test_http_llm_fetcher_keyword_parameters.ts b/test/features/test_http_llm_fetcher_keyword_parameters.ts deleted file mode 100644 index dd291f1..0000000 --- a/test/features/test_http_llm_fetcher_keyword_parameters.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_keyword_parameters = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => - f.path === "/{index}/{level}/{optimal}/parameters" && f.method === "get", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [ - { - level: 123, - optimal: true, - }, - ], - human: [ - { - index: "https://some.url/index.html", - }, - ], - }), - }); - TestValidator.equals("response.status")(response.status)(200); -}; diff --git a/test/features/test_http_llm_fetcher_keyword_query.ts b/test/features/test_http_llm_fetcher_keyword_query.ts deleted file mode 100644 index b95e167..0000000 --- a/test/features/test_http_llm_fetcher_keyword_query.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_keyword_query = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => f.path === "/{index}/{level}/{optimal}/query" && f.method === "get", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [ - { - level: 123, - optimal: true, - query: { - summary: "some summary", - }, - }, - ], - human: [ - { - index: "https://some.url/index.html", - query: { - thumbnail: "https://some.url/file.jpg", - }, - }, - ], - }), - }); - TestValidator.equals("response.status")(response.status)(200); -}; diff --git a/test/features/test_http_llm_fetcher_keyword_query_and_body.ts b/test/features/test_http_llm_fetcher_keyword_query_and_body.ts deleted file mode 100644 index ea4ddce..0000000 --- a/test/features/test_http_llm_fetcher_keyword_query_and_body.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_keyword_query_and_body = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => - f.path === "/{index}/{level}/{optimal}/query/body" && f.method === "post", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [ - { - level: 123, - optimal: true, - query: { - summary: "some summary", - }, - body: { - title: "some title", - body: "some body", - draft: false, - }, - }, - ], - human: [ - { - index: "https://some.url/index.html", - query: { - thumbnail: "https://some.url/file.jpg", - }, - }, - ], - }), - }); - TestValidator.equals("response.status")(response.status)(201); -}; diff --git a/test/features/test_http_llm_fetcher_positional_body.ts b/test/features/test_http_llm_fetcher_positional_body.ts deleted file mode 100644 index c72237f..0000000 --- a/test/features/test_http_llm_fetcher_positional_body.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_positional_body = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: false, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => f.path === "/{index}/{level}/{optimal}/body" && f.method === "post", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [ - 123, - true, - { - title: "some title", - body: "some body", - draft: false, - }, - ], - human: ["https://some.url/index.html"], - }), - }); - TestValidator.equals("response.status")(response.status)(201); -}; diff --git a/test/features/test_http_llm_fetcher_positional_parameters.ts b/test/features/test_http_llm_fetcher_positional_parameters.ts deleted file mode 100644 index 0430e19..0000000 --- a/test/features/test_http_llm_fetcher_positional_parameters.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_keyword_parameters = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: false, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => - f.path === "/{index}/{level}/{optimal}/parameters" && f.method === "get", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [123, true], - human: ["https://some.url/index.html"], - }), - }); - TestValidator.equals("response.status")(response.status)(200); -}; diff --git a/test/features/test_http_llm_fetcher_positional_query.ts b/test/features/test_http_llm_fetcher_positional_query.ts deleted file mode 100644 index d3ac665..0000000 --- a/test/features/test_http_llm_fetcher_positional_query.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_keyword_query = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: false, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => f.path === "/{index}/{level}/{optimal}/query" && f.method === "get", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [ - 123, - true, - { - summary: "some summary", - }, - ], - human: [ - "https://some.url/index.html", - { - thumbnail: "https://some.url/file.jpg", - }, - ], - }), - }); - TestValidator.equals("response.status")(response.status)(200); -}; diff --git a/test/features/test_http_llm_fetcher_positional_query_and_body.ts b/test/features/test_http_llm_fetcher_positional_query_and_body.ts deleted file mode 100644 index d6fce45..0000000 --- a/test/features/test_http_llm_fetcher_positional_query_and_body.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpConnection, IHttpResponse, OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_fetcher_keyword_query_and_body = async ( - connection: IHttpConnection, -): Promise => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: false, - separate: (schema) => - OpenAiTypeChecker.isString(schema) && !!schema.contentMediaType, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => - f.path === "/{index}/{level}/{optimal}/query/body" && f.method === "post", - ); - if (func === undefined) throw new Error("Function not found"); - - const response: IHttpResponse = await HttpOpenAi.propagate({ - connection, - application, - function: func, - arguments: HttpOpenAi.mergeParameters({ - function: func, - llm: [ - 123, - true, - { - summary: "some summary", - }, - { - title: "some title", - body: "some body", - draft: false, - }, - ], - human: [ - "https://some.url/index.html", - { - thumbnail: "https://some.url/file.jpg", - }, - ], - }), - }); - TestValidator.equals("response.status")(response.status)(201); -}; diff --git a/test/features/test_http_llm_function_deprecated.ts b/test/features/test_http_llm_function_deprecated.ts deleted file mode 100644 index 7cda4d5..0000000 --- a/test/features/test_http_llm_function_deprecated.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_function_deprecated = (): void => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => f.method === "get" && f.path === "/nothing", - ); - TestValidator.equals("deprecated")(func?.deprecated)(true); -}; diff --git a/test/features/test_http_llm_function_multipart.ts b/test/features/test_http_llm_function_multipart.ts deleted file mode 100644 index be5d9c5..0000000 --- a/test/features/test_http_llm_function_multipart.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { OpenApi } from "@samchon/openapi"; -import { HttpOpenAi, IHttpOpenAiApplication } from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_function_multipart = (): void => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - }, - }); - TestValidator.equals("multipart not suppported")( - !!application.errors.find( - (e) => - e.method === "post" && - e.path === "/{index}/{level}/{optimal}/multipart", - ), - )(true); -}; diff --git a/test/features/test_http_llm_function_tags.ts b/test/features/test_http_llm_function_tags.ts deleted file mode 100644 index c6fa316..0000000 --- a/test/features/test_http_llm_function_tags.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, -} from "@wrtnio/schema"; - -import swagger from "../swagger.json"; - -export const test_http_llm_function_deprecated = (): void => { - const document: OpenApi.IDocument = OpenApi.convert(swagger as any); - const application: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - keyword: true, - }, - }); - const func: IHttpOpenAiFunction | undefined = application.functions.find( - (f) => f.method === "post" && f.path === "/{index}/{level}/{optimal}/body", - ); - TestValidator.equals("tags")(func?.tags)(["body", "post"]); -}; diff --git a/test/features/test_http_llm_merge_parameters.ts b/test/features/test_http_llm_merge_parameters.ts deleted file mode 100644 index 258db25..0000000 --- a/test/features/test_http_llm_merge_parameters.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { IHttpOpenAiFunction, IOpenAiSchema } from "@wrtnio/schema"; -import { LlmDataMerger } from "@wrtnio/schema/lib/internal/HttpOpenAiMerger"; - -export const test_http_llm_merge_parameters = (): void => { - const p = LlmDataMerger.parameters({ - function: { - parameters: [ - { - type: "array", - items: {}, - }, - ] satisfies IOpenAiSchema[], - separated: { - human: [ - { - index: 0, - schema: { - type: "array", - items: {}, - }, - }, - ], - llm: [ - { - index: 0, - schema: { - type: "array", - items: {}, - }, - }, - ], - } satisfies IHttpOpenAiFunction.ISeparated, - } as IHttpOpenAiFunction, - llm: [], - human: [ - { - a: 1, - }, - ], - }); - TestValidator.equals(p as any)([ - { - a: 1, - }, - ]); -}; diff --git a/test/features/test_http_llm_separate_parameters.ts b/test/features/test_http_llm_separate_parameters.ts deleted file mode 100644 index 6921a5f..0000000 --- a/test/features/test_http_llm_separate_parameters.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { OpenApi } from "@samchon/openapi"; -import { HttpOpenAi, OpenAiTypeChecker } from "@wrtnio/schema"; -import typia from "typia"; - -export const test_http_llm_separate_parameters = async (): Promise => { - const document: OpenApi.IDocument = typia.assert( - await fetch( - "https://wrtnio.github.io/connectors/swagger/swagger.json", - ).then((r) => r.json()), - ); - for (const path of Object.keys(document.paths ?? {})) - if (path !== "/connector/notion/page/bookmark") - delete document.paths?.[path]; - - const app = HttpOpenAi.application({ - document, - options: { - separate: (schema) => - OpenAiTypeChecker.isString(schema) && - schema["x-wrtn-secret-key"] !== undefined, - }, - }); - const func = app.functions.find( - (f) => f.method === "post" && f.path === "/connector/notion/page/bookmark", - ); - if (func === undefined) throw new Error("Function not found"); - TestValidator.equals("human")(func.separated?.human.at(0)?.index)(0); -}; diff --git a/test/features/test_http_llm_separate_parameters_of_empty.ts b/test/features/test_http_llm_separate_parameters_of_empty.ts deleted file mode 100644 index fb23e4e..0000000 --- a/test/features/test_http_llm_separate_parameters_of_empty.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { TestValidator } from "@nestia/e2e"; -import { OpenApi } from "@samchon/openapi"; -import { - HttpOpenAi, - IHttpOpenAiApplication, - IHttpOpenAiFunction, - OpenAiTypeChecker, -} from "@wrtnio/schema"; - -export const test_http_llm_separate_parameters_of_empty = (): void => { - const document: OpenApi.IDocument = { - openapi: "3.1.0", - "x-samchon-emended": true, - components: {}, - paths: { - "/": { - post: { - requestBody: { - content: { - "application/json": { - schema: { - type: "object", - properties: {}, - required: [], - }, - }, - }, - }, - }, - }, - }, - }; - const app: IHttpOpenAiApplication = HttpOpenAi.application({ - document, - options: { - separate: (schema) => - OpenAiTypeChecker.isString(schema) && - schema["x-wrtn-secret-key"] !== undefined, - }, - }); - const func: IHttpOpenAiFunction = app.functions[0]; - TestValidator.equals("separated")(func.separated)({ - llm: [ - { - schema: { - type: "object", - properties: {}, - required: [], - additionalProperties: false, - }, - index: 0, - }, - ], - human: [], - }); -}; diff --git a/test/features/test_json_schema_attribute.ts b/test/features/test_json_schema_attribute.ts new file mode 100644 index 0000000..5700b98 --- /dev/null +++ b/test/features/test_json_schema_attribute.ts @@ -0,0 +1,25 @@ +import { + IChatGptSchema, + IClaudeSchema, + IGeminiSchema, + ILlamaSchema, + ILlmSchemaV3, + ILlmSchemaV3_1, + OpenApi, +} from "@samchon/openapi"; +import "@wrtnlabs/schema"; +import typia from "typia"; + +export const test_json_schema_attribute = (): void => { + const schema = { + type: "boolean", + "x-wrtn-placeholder": "Required to be checked", + } satisfies OpenApi.IJsonSchema.IBoolean; + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); +}; diff --git a/test/features/test_json_schema_payment_of_numeric.ts b/test/features/test_json_schema_payment_of_numeric.ts new file mode 100644 index 0000000..795cec0 --- /dev/null +++ b/test/features/test_json_schema_payment_of_numeric.ts @@ -0,0 +1,30 @@ +import { + IChatGptSchema, + IClaudeSchema, + IGeminiSchema, + ILlamaSchema, + ILlmSchemaV3, + ILlmSchemaV3_1, + OpenApi, +} from "@samchon/openapi"; +import "@wrtnlabs/schema"; +import typia from "typia"; + +export const test_json_schema_payment_of_numeric = (): void => { + const schema = { + type: "integer", + "x-wrtn-payment-amount": true, + "x-wrtn-payment-citizen-id": true, + "x-wrtn-payment-order-id": true, + } satisfies OpenApi.IJsonSchema.IInteger; + for (const type of ["integer", "number"]) { + (schema as any).type = type; + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + } +}; diff --git a/test/features/test_json_schema_payment_of_string.ts b/test/features/test_json_schema_payment_of_string.ts new file mode 100644 index 0000000..2e4cada --- /dev/null +++ b/test/features/test_json_schema_payment_of_string.ts @@ -0,0 +1,32 @@ +import { + IChatGptSchema, + IClaudeSchema, + IGeminiSchema, + ILlamaSchema, + ILlmSchemaV3, + ILlmSchemaV3_1, + OpenApi, +} from "@samchon/openapi"; +import "@wrtnlabs/schema"; +import typia from "typia"; + +export const test_json_schema_payment_of_string = (): void => { + const schema = { + type: "string", + "x-wrtn-payment-citizen-id": true, + "x-wrtn-payment-citizen-mobile": true, + "x-wrtn-payment-citizen-name": true, + "x-wrtn-payment-currency": true, + "x-wrtn-payment-order-id": true, + "x-wrtn-payment-order-name": true, + "x-wrtn-payment-uid": true, + "x-wrtn-payment-vendor": true, + } satisfies OpenApi.IJsonSchema.IString; + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); +}; diff --git a/test/features/test_json_schema_secret.ts b/test/features/test_json_schema_secret.ts new file mode 100644 index 0000000..d7bf555 --- /dev/null +++ b/test/features/test_json_schema_secret.ts @@ -0,0 +1,26 @@ +import { + IChatGptSchema, + IClaudeSchema, + IGeminiSchema, + ILlamaSchema, + ILlmSchemaV3, + ILlmSchemaV3_1, + OpenApi, +} from "@samchon/openapi"; +import "@wrtnlabs/schema"; +import typia from "typia"; + +export const test_json_schema_secret = (): void => { + const schema = { + type: "string", + "x-wrtn-secret-key": "google", + "x-wrtn-secret-scopes": ["write", "read"], + } satisfies OpenApi.IJsonSchema.IString; + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); + typia.assertEquals(schema); +}; diff --git a/test/features/test_openapi_operation.ts b/test/features/test_openapi_operation.ts new file mode 100644 index 0000000..c856577 --- /dev/null +++ b/test/features/test_openapi_operation.ts @@ -0,0 +1,12 @@ +import { OpenApi } from "@samchon/openapi"; +import "@wrtnlabs/schema"; +import typia from "typia"; + +export const test_openapi_operation = (): void => { + const op: OpenApi.IOperation = { + "x-wrtn-icon": "https://www.google.com/favicon.ico", + "x-wrtn-experimental": true, + "x-wrtn-function-select-benchmarks": ["Show me products"], + }; + typia.assertEquals(op); +}; diff --git a/test/index.ts b/test/index.ts index d7af6c6..1f1b2e5 100644 --- a/test/index.ts +++ b/test/index.ts @@ -1,10 +1,6 @@ import { DynamicExecutor } from "@nestia/e2e"; -import { NestFactory } from "@nestjs/core"; import chalk from "chalk"; -import { AppFilter } from "./controllers/AppFilter"; -import { AppModule } from "./controllers/AppModule"; - const EXTENSION = __filename.substr(-2); if (EXTENSION === "js") require("source-map-support").install(); @@ -18,12 +14,6 @@ const getArguments = (type: string): string[] => { }; const main = async (): Promise => { - // PREPARE SERVER - const app = await NestFactory.create(AppModule, { logger: false }); - app.useGlobalFilters(new AppFilter(app.getHttpAdapter())); - await app.listen(3_000); - - // DO TEST const include: string[] = getArguments("include"); const exclude: string[] = getArguments("exclude"); const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ @@ -61,7 +51,6 @@ const main = async (): Promise => { console.log("Failed"); console.log("Elapsed time", report.time.toLocaleString(), `ms`); } - await app.close(); if (exceptions.length) process.exit(-1); }; main().catch(console.error); diff --git a/test/nestia.config.ts b/test/nestia.config.ts deleted file mode 100644 index 7d06443..0000000 --- a/test/nestia.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { INestiaConfig } from "@nestia/sdk"; -import { NestFactory } from "@nestjs/core"; - -import { AppModule } from "./controllers/AppModule"; - -export const NESTIA_CONFIG: INestiaConfig = { - input: () => NestFactory.create(AppModule), - swagger: { - output: "./swagger.json", - beautify: true, - }, -}; -export default NESTIA_CONFIG; diff --git a/test/swagger.json b/test/swagger.json deleted file mode 100644 index a889c07..0000000 --- a/test/swagger.json +++ /dev/null @@ -1,567 +0,0 @@ -{ - "openapi": "3.1.0", - "servers": [ - { - "url": "https://github.com/samchon/nestia", - "description": "insert your server url" - } - ], - "info": { - "version": "1.2.0", - "title": "@samchon/openapi", - "description": "OpenAPI definitions and converters for 'typia' and 'nestia'.", - "license": { - "name": "MIT" - } - }, - "paths": { - "/{index}/{level}/{optimal}/parameters": { - "get": { - "tags": [], - "parameters": [ - { - "name": "index", - "in": "path", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "required": true - }, - { - "name": "level", - "in": "path", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "optimal", - "in": "path", - "schema": { - "type": "boolean" - }, - "required": true - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "level": { - "type": "number" - }, - "optimal": { - "type": "boolean" - } - }, - "required": [ - "index", - "level", - "optimal" - ] - } - } - } - } - } - } - }, - "/{index}/{level}/{optimal}/query": { - "get": { - "tags": [], - "parameters": [ - { - "name": "index", - "in": "path", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "required": true - }, - { - "name": "level", - "in": "path", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "optimal", - "in": "path", - "schema": { - "type": "boolean" - }, - "required": true - }, - { - "name": "summary", - "in": "query", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "thumbnail", - "in": "query", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*" - }, - "required": true - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "level": { - "type": "number" - }, - "optimal": { - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/IQuery" - } - }, - "required": [ - "index", - "level", - "optimal", - "query" - ] - } - } - } - } - } - } - }, - "/{index}/{level}/{optimal}/body": { - "post": { - "tags": [ - "body", - "post" - ], - "parameters": [ - { - "name": "index", - "in": "path", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "required": true - }, - { - "name": "level", - "in": "path", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "optimal", - "in": "path", - "schema": { - "type": "boolean" - }, - "required": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBody" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "level": { - "type": "number" - }, - "optimal": { - "type": "boolean" - }, - "body": { - "$ref": "#/components/schemas/IBody" - } - }, - "required": [ - "index", - "level", - "optimal", - "body" - ] - } - } - } - } - } - } - }, - "/{index}/{level}/{optimal}/query/body": { - "post": { - "tags": [], - "parameters": [ - { - "name": "index", - "in": "path", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "required": true - }, - { - "name": "level", - "in": "path", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "optimal", - "in": "path", - "schema": { - "type": "boolean" - }, - "required": true - }, - { - "name": "thumbnail", - "in": "query", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*" - }, - "required": true - }, - { - "name": "summary", - "in": "query", - "schema": { - "type": "string" - }, - "required": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBody" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "level": { - "type": "number" - }, - "optimal": { - "type": "boolean" - }, - "query": { - "type": "object", - "properties": { - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "thumbnail", - "summary" - ] - }, - "body": { - "$ref": "#/components/schemas/IBody" - } - }, - "required": [ - "index", - "level", - "optimal", - "query", - "body" - ] - } - } - } - } - } - } - }, - "/{index}/{level}/{optimal}/multipart": { - "post": { - "tags": [], - "parameters": [ - { - "name": "index", - "in": "path", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "required": true - }, - { - "name": "level", - "in": "path", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "optimal", - "in": "path", - "schema": { - "type": "boolean" - }, - "required": true - }, - { - "name": "summary", - "in": "query", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "thumbnail", - "in": "query", - "schema": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*" - }, - "required": true - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/IMultipart" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "index": { - "type": "string", - "format": "uri", - "contentMediaType": "text/html" - }, - "level": { - "type": "number" - }, - "optimal": { - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/IQuery" - }, - "body": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "draft": { - "type": "boolean" - } - }, - "required": [ - "file", - "title", - "body", - "draft" - ] - } - }, - "required": [ - "index", - "level", - "optimal", - "query", - "body" - ] - } - } - } - } - } - } - }, - "/nothing": { - "get": { - "deprecated": true, - "tags": [], - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": {} - } - } - } - } - } - }, - "components": { - "schemas": { - "IQuery": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*" - } - }, - "required": [ - "summary", - "thumbnail" - ] - }, - "IBody": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "draft": { - "type": "boolean" - } - }, - "required": [ - "title", - "body", - "draft" - ] - }, - "IMultipart": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "draft": { - "type": "boolean" - } - }, - "required": [ - "file", - "title", - "body", - "draft" - ] - } - } - }, - "tags": [ - { - "name": "body" - }, - { - "name": "post" - } - ], - "x-samchon-emended": true -} \ No newline at end of file diff --git a/test/tsconfig.json b/test/tsconfig.json index cefb9a4..5d73d97 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -7,13 +7,12 @@ "experimentalDecorators": true, "resolveJsonModule": true, "paths": { - "@wrtnio/schema": ["../src/index.ts"], - "@wrtnio/schema/lib/*": ["../src/*"], + "@wrtnlabs/schema": ["../src/index.ts"], + "@wrtnlabs/schema/lib/*": ["../src/*"], }, "plugins": [ { "transform": "typescript-transform-paths" }, { "transform": "typia/lib/transform" }, - { "transform": "@nestia/core/lib/transform" }, ] }, "include": ["../src", "../test"] diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000..2d03c46 --- /dev/null +++ b/typos.toml @@ -0,0 +1,11 @@ +[default] +locale = 'en-us' +extend-ignore-re = [ + "(?Rm)^.*(|\n)?$", + "(?s)(|\n).*?(