UNPKG

@autobe/agent

Version:

AI backend server code generator

766 lines 159 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.orchestrateInterfaceAuthorization = orchestrateInterfaceAuthorization; const __typia_transform__isTypeUint32 = __importStar(require("typia/lib/internal/_isTypeUint32")); const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport")); const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize")); const utils_1 = require("@typia/utils"); const tstl_1 = require("tstl"); const typia_1 = __importDefault(require("typia")); const uuid_1 = require("uuid"); const executeCachedBatch_1 = require("../../utils/executeCachedBatch"); const AutoBePreliminaryController_1 = require("../common/AutoBePreliminaryController"); const transformInterfaceAuthorizationHistory_1 = require("./histories/transformInterfaceAuthorizationHistory"); const AutoBeInterfaceAuthorizationProgrammer_1 = require("./programmers/AutoBeInterfaceAuthorizationProgrammer"); const AutoBeJsonSchemaFactory_1 = require("./utils/AutoBeJsonSchemaFactory"); function orchestrateInterfaceAuthorization(ctx, props) { return __awaiter(this, void 0, void 0, function* () { var _a, _b; const actors = (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.actors) !== null && _b !== void 0 ? _b : []; const progress = { total: actors.length, completed: 0, }; return yield (0, executeCachedBatch_1.executeCachedBatch)(ctx, actors.map((a) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () { const counter = new tstl_1.Singleton(() => ++progress.completed); try { const event = yield process(ctx, { actor: a, progress, counter, promptCacheKey, instruction: props.instruction, }); ctx.dispatch(event); return { name: a.name, operations: event.operations, }; } catch (error) { counter.get(); throw error; } }))); }); } function process(ctx, props) { return __awaiter(this, void 0, void 0, function* () { const prefix = utils_1.NamingConvention.camel(ctx.state().analyze.prefix); const preliminary = new AutoBePreliminaryController_1.AutoBePreliminaryController({ application: { version: "3.1", components: { schemas: { "IAutoBeInterfaceAuthorizationApplication.IProps": { type: "object", properties: { thinking: { type: "string", description: "Reasoning: what's missing (preliminary), what you're submitting (write),\nor why you're finalizing (complete)." }, request: { oneOf: [ { $ref: "#/components/schemas/IAutoBePreliminaryComplete" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetAnalysisSections" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetDatabaseSchemas" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetPreviousAnalysisSections" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetPreviousDatabaseSchemas" }, { $ref: "#/components/schemas/IAutoBeInterfaceAuthorizationApplication.IWrite" } ], discriminator: { propertyName: "type", mapping: { complete: "#/components/schemas/IAutoBePreliminaryComplete", getAnalysisSections: "#/components/schemas/IAutoBePreliminaryGetAnalysisSections", getDatabaseSchemas: "#/components/schemas/IAutoBePreliminaryGetDatabaseSchemas", getPreviousAnalysisSections: "#/components/schemas/IAutoBePreliminaryGetPreviousAnalysisSections", getPreviousDatabaseSchemas: "#/components/schemas/IAutoBePreliminaryGetPreviousDatabaseSchemas", write: "#/components/schemas/IAutoBeInterfaceAuthorizationApplication.IWrite" } }, description: "Action to perform. Exhausted preliminary types are removed from the\nunion." } }, required: [ "thinking", "request" ] }, IAutoBePreliminaryComplete: { type: "object", properties: { type: { "const": "complete", description: "Type discriminator for completion request." } }, required: [ "type" ], description: "Finalize the write loop by accepting your most recent `write` as-is.\n\nAfter submitting a `write`, review it yourself thoroughly against the review\nchecklist in your instructions. If you find issues worth fixing, submit\nanother `write` with corrections. When you are satisfied with the quality,\ncall `complete` to finalize.\n\nYou have a maximum of 3 write attempts, but this is a safety cap \u2014 not a\ntarget to fill.\n\nOnly valid after at least one `write` submission \u2014 rejected otherwise." }, IAutoBePreliminaryGetAnalysisSections: { type: "object", properties: { type: { "const": "getAnalysisSections", description: "Type discriminator." }, sectionIds: { type: "array", items: { type: "integer", minimum: 0 }, minItems: 1, maxItems: 100, description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls." } }, required: [ "type", "sectionIds" ], description: "Request to retrieve individual analysis sections by numeric ID." }, IAutoBePreliminaryGetDatabaseSchemas: { type: "object", properties: { type: { "const": "getDatabaseSchemas", description: "Type discriminator." }, schemaNames: { type: "array", items: { type: "string" }, minItems: 1, description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls." } }, required: [ "type", "schemaNames" ], description: "Request to retrieve database schema definitions for context." }, IAutoBePreliminaryGetPreviousAnalysisSections: { type: "object", properties: { type: { "const": "getPreviousAnalysisSections", description: "Type discriminator." }, sectionIds: { type: "array", items: { type: "integer", minimum: 0 }, minItems: 1, description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls." } }, required: [ "type", "sectionIds" ], description: "Request to retrieve analysis sections from the previous iteration by numeric\nID." }, IAutoBePreliminaryGetPreviousDatabaseSchemas: { type: "object", properties: { type: { "const": "getPreviousDatabaseSchemas", description: "Type discriminator." }, schemaNames: { type: "array", items: { type: "string" }, minItems: 1, description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls." } }, required: [ "type", "schemaNames" ], description: "Request to retrieve database schemas from the previous iteration.\n\nLoads database table definitions from the last successfully generated\nversion, used as reference context during regeneration or modification\ncycles." }, "IAutoBeInterfaceAuthorizationApplication.IWrite": { type: "object", properties: { type: { "const": "write", description: "Type discriminator for write submission." }, analysis: { type: "string", description: "Analysis of the actor's authentication requirements and schema context." }, rationale: { type: "string", description: "Rationale for authorization operation design decisions." }, operations: { type: "array", items: { $ref: "#/components/schemas/AutoBeOpenApi.IOperation" }, minItems: 1, description: "Array of API operations to generate for authorization." } }, required: [ "type", "analysis", "rationale", "operations" ], description: "Submit authorization operations." }, "AutoBeOpenApi.IOperation": { type: "object", properties: { specification: { type: "string", description: "Internal implementation guidance for downstream agents (Realize, Test).\n\nDescribe HOW this operation should be implemented: service logic, DB\nqueries, business rules, edge cases, and error handling.\n\n> MUST be written in English. Never use other languages." }, description: { type: "string", description: "API documentation for consumers. Describe the operation's purpose,\nbusiness logic, relationships, and error handling.\n\nFormat: summary sentence first, `\\n\\n`, then paragraphs grouped by topic.\nReference DB schema table/column descriptions for consistency.\n\nDo NOT use \"soft delete\" / \"soft-delete\" unless the operation actually\nimplements soft deletion (triggers validation expecting\nsoft_delete_column).\n\n> MUST be written in English. Never use other languages." }, authorizationType: { oneOf: [ { type: "null" }, { "const": "login" }, { "const": "join" }, { "const": "refresh" } ], description: "Authorization type of the API operation.\n\n- `\"login\"`: Credential validation operations\n- `\"join\"`: Account registration operations\n- `\"refresh\"`: Token renewal operations\n- `null`: All other operations" }, parameters: { type: "array", items: { $ref: "#/components/schemas/AutoBeOpenApi.IParameter" }, description: "List of path parameters.\n\nEach parameter name must correspond to a `{paramName}` in the\n{@link path}." }, requestBody: { oneOf: [ { type: "null" }, { $ref: "#/components/schemas/AutoBeOpenApi.IRequestBody" } ], description: "Request body of the API operation, or `null` if none." }, responseBody: { oneOf: [ { type: "null" }, { $ref: "#/components/schemas/AutoBeOpenApi.IResponseBody" } ], description: "Response body of the API operation, or `null` if none." }, authorizationActor: { oneOf: [ { type: "null" }, { type: "string", pattern: "^[a-z][a-zA-Z0-9]*$", minLength: 1 } ], description: "Authorization actor required to access this API operation.\n\nMUST use camelCase. The actor name MUST match exactly with a user\ntype/table defined in the database schema.\n\nSet to `null` for public endpoints requiring no authentication." }, name: { type: "string", pattern: "^[a-z][a-zA-Z0-9]*$", description: "Functional name of the API endpoint. MUST use camelCase.\n\nMUST NOT be a JS/TS reserved word (`delete`, `for`, `if`, `class`,\n`return`, `new`, `this`, `void`, `const`, `let`, `var`, `async`, `await`,\n`export`, `import`, `switch`, `case`, `throw`, `try`). Use `erase`\ninstead of `delete`, `iterate` instead of `for`.\n\nStandard names:\n\n- `index`: list/search (PATCH), `at`: get by ID (GET)\n- `create`: POST, `update`: PUT, `erase`: DELETE\n\nAccessor uniqueness: the accessor is formed by joining non-parameter path\nsegments with dots, then appending the name. E.g., path\n`/shopping/sale/{saleId}/review/{reviewId}` + name `at` = accessor\n`shopping.sale.review.at`. Must be globally unique." }, prerequisites: { type: "array", items: { $ref: "#/components/schemas/AutoBeOpenApi.IPrerequisite" }, description: "Prerequisites: API operations that must succeed before this one.\n\nONLY for business logic dependencies (resource existence, state checks,\ndata availability). NEVER for authentication -- use `authorizationActor`\ninstead.\n\nPrerequisites are executed in array order; all must return 2xx before the\nmain operation proceeds." }, path: { type: "string", pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$", description: "HTTP path of the API operation.\n\nMust start with `/`. Parameters use curly braces: `{paramName}`. Resource\nnames in camelCase. No quotes, spaces, role prefixes (`/admin/`), or API\nversion prefixes (`/api/v1/`).\n\nAllowed characters: letters, digits, `/`, `{`, `}`, `-`, `_`, `.`" }, method: { oneOf: [ { "const": "get" }, { "const": "post" }, { "const": "put" }, { "const": "delete" }, { "const": "patch" } ], description: "HTTP method (lowercase only).\n\nUse `patch` (not `get`) when a read operation needs a complex\n{@link requestBody}. `get` cannot have a request body." } }, required: [ "specification", "description", "authorizationType", "parameters", "requestBody", "responseBody", "authorizationActor", "name", "prerequisites", "path", "method" ], description: "Single API endpoint with method, path, parameters, and request/response.\n\nAll request/response bodies must be object types referencing named\ncomponents. Content-type is always `application/json`. For file\nupload/download, use `string & tags.Format<\"uri\">` instead of binary." }, "AutoBeOpenApi.IParameter": { type: "object", properties: { description: { type: "string", description: "Description of the path parameter.\n\n> MUST be written in English. Never use other languages." }, name: { type: "string", pattern: "^[a-z][a-zA-Z0-9]*$", description: "Identifier name in camelCase. Must match the `{paramName}` in the\n{@link AutoBeOpenApi.IOperation.path}." }, schema: { oneOf: [ { $ref: "#/components/schemas/AutoBeOpenApi.IJsonSchema.INumber" }, { $ref: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IInteger" }, { $ref: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IString" } ], discriminator: { propertyName: "type", mapping: { number: "#/components/schemas/AutoBeOpenApi.IJsonSchema.INumber", integer: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IInteger", string: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IString" } }, description: "Type schema of the path parameter (primitive types only)." } }, required: [ "description", "name", "schema" ], description: "Path parameter definition for an API route." }, "AutoBeOpenApi.IJsonSchema.INumber": { type: "object", properties: { minimum: { type: "number" }, maximum: { type: "number" }, exclusiveMinimum: { type: "number" }, exclusiveMaximum: { type: "number" }, multipleOf: { type: "number", exclusiveMinimum: 0 }, type: { "const": "number", description: "Discriminator value. MUST be a single string, NEVER an array.\n\nFor nullable types, use `IOneOf` instead: `{ oneOf: [{ type: \"string\"\n}, { type: \"null\" }] }`" } }, required: [ "type" ], description: "Number (double) type info." }, "AutoBeOpenApi.IJsonSchema.IInteger": { type: "object", properties: { minimum: { type: "integer" }, maximum: { type: "integer" }, exclusiveMinimum: { type: "integer" }, exclusiveMaximum: { type: "integer" }, multipleOf: { type: "integer", exclusiveMinimum: 0 }, type: { "const": "integer", description: "Discriminator value. MUST be a single string, NEVER an array.\n\nFor nullable types, use `IOneOf` instead: `{ oneOf: [{ type: \"string\"\n}, { type: \"null\" }] }`" } }, required: [ "type" ], description: "Integer type info." }, "AutoBeOpenApi.IJsonSchema.IString": { type: "object", properties: { format: { oneOf: [ { "const": "password" }, { "const": "regex" }, { "const": "uuid" }, { "const": "email" }, { "const": "hostname" }, { "const": "idn-email" }, { "const": "idn-hostname" }, { "const": "iri" }, { "const": "iri-reference" }, { "const": "ipv4" }, { "const": "ipv6" }, { "const": "uri" }, { "const": "uri-reference" }, { "const": "uri-template" }, { "const": "url" }, { "const": "date-time" }, { "const": "date" }, { "const": "time" }, { "const": "duration" }, { "const": "json-pointer" }, { "const": "relative-json-pointer" } ], description: "Format restriction." }, pattern: { type: "string", description: "Pattern restriction." }, contentMediaType: { type: "string", description: "Content media type restriction.\n\nFor multiple media types, use `oneOf` with separate string schemas per\n`contentMediaType` value. Never use an array here." }, minLength: { type: "integer", minimum: 0 }, maxLength: { type: "integer", minimum: 0 }, type: { "const": "string", description: "Discriminator value. MUST be a single string, NEVER an array.\n\nFor nullable types, use `IOneOf` instead: `{ oneOf: [{ type: \"string\"\n}, { type: \"null\" }] }`" } }, required: [ "type" ], description: "String type info." }, "AutoBeOpenApi.IRequestBody": { type: "object", properties: { description: { type: "string", description: "Description of the request body.\n\n> MUST be written in English. Never use other languages." }, typeName: { type: "string", description: "Type name referencing a component schema.\n\nNaming convention: `IEntityName.ICreate` (POST), `IEntityName.IUpdate`\n(PUT), `IEntityName.IRequest` (list/search)." } }, required: [ "description", "typeName" ], description: "Request body for an API operation.\n\nContent-type is always `application/json`. For file uploads, use a URI\nstring property instead of `multipart/form-data`." }, "AutoBeOpenApi.IResponseBody": { type: "object", properties: { description: { type: "string", description: "Description of the response body.\n\n> MUST be written in English. Never use other languages." }, typeName: { type: "string", description: "Type name referencing a component schema.\n\nNaming convention: `IEntityName` (full), `IEntityName.ISummary`,\n`IEntityName.IInvert`, `IPageIEntityName` (paginated)." } }, required: [ "description", "typeName" ], description: "Response body for an API operation.\n\nContent-type is always `application/json`. For file downloads, use a URI\nstring property instead of `application/octet-stream`." }, "AutoBeOpenApi.IPrerequisite": { type: "object", properties: { endpoint: { $ref: "#/components/schemas/AutoBeOpenApi.IEndpoint", description: "The API endpoint that must be called first." }, description: { type: "string", description: "Why this prerequisite is required (specific condition or state).\n\n> MUST be written in English. Never use other languages." } }, required: [ "endpoint", "description" ], description: "Prerequisite API operation that must succeed before the main operation.\n\nONLY for business logic dependencies (resource existence, state checks,\ndata availability). NEVER for authentication or authorization -- those are\nhandled via `authorizationActor`.\n\nKeep prerequisite chains minimal. Descriptions should explain WHY the\ndependency is needed." }, "AutoBeOpenApi.IEndpoint": { type: "object", properties: { path: { type: "string", pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$", description: "HTTP path of the API operation.\n\nMust start with `/`. Parameters use curly braces: `{paramName}`. Resource\nnames in camelCase. No quotes, spaces, role prefixes (`/admin/`), or API\nversion prefixes (`/api/v1/`).\n\nAllowed characters: letters, digits, `/`, `{`, `}`, `-`, `_`, `.`" }, method: { oneOf: [ { "const": "get" }, { "const": "post" }, { "const": "put" }, { "const": "delete" }, { "const": "patch" } ], description: "HTTP method (lowercase only).\n\nUse `patch` (not `get`) when a read operation needs a complex\n{@link requestBody}. `get` cannot have a request body." } }, required: [ "path", "method" ], description: "API endpoint information." } } }, functions: [ { name: "process", async: false, parameters: [ { name: "props", required: true, schema: { $ref: "#/components/schemas/IAutoBeInterfaceAuthorizationApplication.IProps" } } ], description: "Process task or retrieve preliminary data." } ] }, source: SOURCE, kinds: [ "analysisSections", "previousAnalysisSections", "databaseSchemas", "previousDatabaseSchemas", "complete", ], state: ctx.state(), dispatch: (e) => ctx.dispatch(e), }); return yield preliminary.orchestrate(ctx, (out) => __awaiter(this, void 0, void 0, function* () { var _a, _b, _c, _d; const pointer = { value: null, }; const result = yield ctx.conversate(Object.assign({ source: SOURCE, controller: createController({ actor: props.actor, build: (next) => { pointer.value = next; }, preliminary, prefix, }), enforceFunctionCall: true, promptCacheKey: props.promptCacheKey }, (0, transformInterfaceAuthorizationHistory_1.transformInterfaceAuthorizationHistory)({ state: ctx.state(), prefix, instruction: props.instruction, actor: props.actor, preliminary, }))); if (pointer.value === null) return out(result)(null); const operations = AutoBeInterfaceAuthorizationProgrammer_1.AutoBeInterfaceAuthorizationProgrammer.fixOperations({ operations: (_b = (_a = pointer.value) === null || _a === void 0 ? void 0 : _a.operations) !== null && _b !== void 0 ? _b : [], prefix, }); return out(result)({ type: SOURCE, id: (0, uuid_1.v7)(), analysis: pointer.value.analysis, rationale: pointer.value.rationale, operations, acquisition: preliminary.getAcquisition(), metric: result.metric, tokenUsage: result.tokenUsage, created_at: new Date().toISOString(), step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0, total: props.progress.total, completed: props.counter.get(), }); })); }); } function createController(props) { const validate = (next) => { const result = (() => { const _iv8 = new Set(["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"]); const _vv16 = new Set(["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"]); const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "complete" === input.type; const _io2 = input => "getAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.length <= 100 && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io3 = input => "getDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io4 = input => "getPreviousAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io5 = input => "getPreviousDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io6 = input => "write" === input.type && "string" === typeof input.analysis && "string" === typeof input.rationale && (Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io7(elem)))); const _io7 = input => "string" === typeof input.specification && "string" === typeof input.description && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io12(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io13(input.responseBody)) && (null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io14(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io8 = input => "string" === typeof input.description && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && ("object" === typeof input.schema && null !== input.schema && _iu1(input.schema)); const _io9 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum && (Math.floor(input.exclusiveMinimum) === input.exclusiveMinimum && -9223372036854776000 <= input.exclusiveMinimum && input.exclusiveMinimum <= 9223372036854776000)) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum && (Math.floor(input.exclusiveMaximum) === input.exclusiveMaximum && -9223372036854776000 <= input.exclusiveMaximum && input.exclusiveMaximum <= 9223372036854776000)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io10 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io11 = input => (undefined === input.format || true === _iv8.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io12 = input => "string" === typeo