@autobe/agent 0.9.2 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.js +11 -4
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +7 -6
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeTokenUsage.d.ts +15 -1
- package/lib/context/AutoBeTokenUsage.js +56 -1
- package/lib/context/AutoBeTokenUsage.js.map +1 -1
- package/lib/factory/createAutoBeApplication.js +288 -653
- package/lib/factory/createAutoBeApplication.js.map +1 -1
- package/lib/index.mjs +4225 -6681
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +80 -321
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +93 -266
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/orchestrate/index.d.ts +2 -2
- package/lib/orchestrate/index.js +4 -4
- package/lib/orchestrate/index.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +54 -142
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +189 -201
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +71 -174
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +706 -1099
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +60 -177
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +502 -1073
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +519 -1125
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
- package/lib/orchestrate/realize/orchestrateRealize.js +78 -0
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +326 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +39 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
- package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
- package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTest.js +14 -9
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js +142 -448
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +258 -532
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
- package/lib/orchestrate/test/orchestrateTestWrite.js +124 -90
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
- package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
- package/lib/orchestrate/test/transformTestWriteHistories.js +161 -43
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
- package/lib/structures/IAutoBeConfig.d.ts +11 -0
- package/lib/utils/backoffRetry.d.ts +4 -7
- package/lib/utils/backoffRetry.js +19 -37
- package/lib/utils/backoffRetry.js.map +1 -1
- package/lib/utils/forceRetry.d.ts +1 -0
- package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
- package/lib/utils/forceRetry.js.map +1 -0
- package/package.json +9 -12
- package/src/AutoBeAgent.ts +17 -3
- package/src/constants/AutoBeSystemPromptConstant.ts +7 -6
- package/src/context/AutoBeTokenUsage.ts +85 -1
- package/src/factory/createAutoBeApplication.ts +2 -3
- package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
- package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
- package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
- package/src/orchestrate/index.ts +2 -2
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
- package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
- package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +129 -0
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +148 -0
- package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +46 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
- package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
- package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
- package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
- package/src/orchestrate/test/orchestrateTest.ts +33 -16
- package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
- package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
- package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
- package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
- package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
- package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
- package/src/structures/IAutoBeConfig.ts +9 -0
- package/src/utils/backoffRetry.ts +25 -36
- package/src/utils/forceRetry.ts +13 -0
- package/lib/factory/invertOpenApiDocument.d.ts +0 -3
- package/lib/factory/invertOpenApiDocument.js +0 -51
- package/lib/factory/invertOpenApiDocument.js.map +0 -1
- package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
- package/lib/orchestrate/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
- package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
- package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
- package/lib/utils/StringUtil.d.ts +0 -4
- package/lib/utils/StringUtil.js +0 -43
- package/lib/utils/StringUtil.js.map +0 -1
- package/lib/utils/types/BackoffOptions.d.ts +0 -12
- package/lib/utils/types/BackoffOptions.js.map +0 -1
- package/src/factory/invertOpenApiDocument.ts +0 -63
- package/src/orchestrate/orchestrateRealize.ts +0 -18
- package/src/utils/StringUtil.ts +0 -45
- package/src/utils/types/BackoffOptions.ts +0 -15
- /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceComponents.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceComponents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wEA+CC;;;AA9DD,yCAAoE;AAGpE,2FAAwF;AAExF,kDAA0B;AAC1B,+BAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,iEAA8D;AAC9D,+EAA4E;AAE5E,SAAsB,8BAA8B;yDAGlD,GAAyB,EACzB,UAAsC,EACtC,WAAmB,EAAE;QAErB,MAAM,SA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AAI;SACZ,CAAC;QACF,MAAM,QAAQ,GAAyB,IAAI,oBAAa,CAAC;YACvD,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,MAAM,kCACD,CAAC,MAAA,GAAG,CAAC,MAAM,mCAAI,EAAE,CAAC,KACrB,QAAQ,EAAE;oBACR,QAAQ,EAAE,IAAI;iBACf,GACF;YACD,SAAS,EAAE;gBACT,GAAG,IAAA,yDAA2B,EAC5B,GAAG,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceComponents.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceComponents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wEA+CC;;;AA9DD,yCAAoE;AAGpE,2FAAwF;AAExF,kDAA0B;AAC1B,+BAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,iEAA8D;AAC9D,+EAA4E;AAE5E,SAAsB,8BAA8B;yDAGlD,GAAyB,EACzB,UAAsC,EACtC,WAAmB,EAAE;QAErB,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;QACzC,KAAK,MAAM,EAAE,IAAI,UAAU,EAAE,CAAC;YAC5B,IAAI,EAAE,CAAC,WAAW,KAAK,IAAI;gBAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACpE,IAAI,EAAE,CAAC,YAAY,KAAK,IAAI;gBAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACxE,CAAC;QACD,MAAM,MAAM,GAAe,IAAA,yBAAW,EAAC;YACrC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAC5B,QAAQ;SACT,CAAC,CAAC;QACH,IAAI,QAAQ,GAAW,CAAC,CAAC;QAEzB,MAAM,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -68,7 +68,6 @@ function orchestrateInterfaceEndpoints(ctx_1) {
|
|
|
68
68
|
describe: null,
|
|
69
69
|
} }),
|
|
70
70
|
histories: (0, transformInterfaceHistories_1.transformInterfaceHistories)(ctx.state(), "# API Endpoint Generator System Prompt\n\n## 1. Overview\n\nYou are the API Endpoint Generator, specializing in creating comprehensive lists of REST API endpoints with their paths and HTTP methods based on requirements documents, Prisma schema files, and ERD diagrams. You must output your results by calling the `makeEndpoints()` function.\n\n## 2. Your Mission\n\nAnalyze the provided information and generate a complete array of API endpoints that includes EVERY entity from the Prisma schema and addresses ALL functional requirements. You will call the `makeEndpoints()` function with an array of endpoint definitions that contain ONLY path and method properties.\n\n## 3. Output Method\n\nYou MUST call the `makeEndpoints()` function with your results.\n\n```typescript\nmakeEndpoints({\n endpoints: [\n {\n \"path\": \"/resources\",\n \"method\": \"get\"\n },\n {\n \"path\": \"/resources/{resourceId}\",\n \"method\": \"get\"\n },\n // more endpoints...\n ],\n});\n```\n\n## 4. Endpoint Design Principles\n\n### 4.1. Follow REST principles\n\n- Resource-centric URL design (use nouns, not verbs)\n- Appropriate HTTP methods:\n - `put`: Retrieve a collection resources with searching information\n - `get`: Retrieve a single resource\n - `post`: Create new resources\n - `delete`: Remove resources\n - `patch`: Partial updates or complex queries with request bodies\n\n### 4.2. Path Formatting Rules\n\n1. **Use camelCase for all resource names in paths**\n - Example: Use `/attachmentFiles` instead of `/attachment-files`\n\n2. **Use domain prefixes with slashes**\n - Example: Use `/shopping/channels` instead of `/shopping-channels`\n - **Important**: If you identify any service-related prefix in the DB schema, use it as the global prefix for ALL API endpoints\n\n3. **Structure hierarchical relationships with slashes**\n - Example: For a child entity like \"sale-snapshots\" under \"sales\", use `/shopping/sales/snapshots` instead of `/shopping-sale-snapshots`\n\n### 4.3. Path patterns\n\n- Collection endpoints: `/domain/resources`\n- Single resource endpoints: `/domain/resources/{resourceId}`\n- Nested resources: `/domain/resources/{resourceId}/subsidiaries/{subsidiaryId}`\n\n### 4.4. Standard API operations per entity\n\nFor EACH independent entity identified in the requirements document, Prisma DB Schema, and ERD diagram, you MUST include these standard endpoints:\n\n1. `PATCH /entity-plural` - List entities with searching\n2. `GET /entity-plural/{id}` - Get specific entity\n3. `POST /entity-plural` - Create entity\n4. `PUT /entity-plural/{id}` - Update entity\n5. `DELETE /entity-plural/{id}` - Delete entity\n\n## 5. Critical Requirements\n\n- **Function Call Required**: You MUST use the `makeEndpoints()` function to submit your results\n- **Complete Coverage**: EVERY independent entity in the Prisma schema MUST have corresponding endpoints\n- **No Omissions**: Process ALL independent entities regardless of quantity\n- **Strict Output Format**: ONLY include objects with `path` and `method` properties in your function call\n- **No Additional Properties**: Do NOT include any properties beyond `path` and `method`\n\n## 6. Implementation Strategy\n\n1. Identify ALL independent entities from the Prisma schema, requirements document, and ERD\n2. Identify service-related prefixes in the DB schema to use as the global prefix for ALL API endpoints\n3. Identify domain prefixes and hierarchical relationships between entities\n4. For each independent entity:\n - Convert kebab-case names to camelCase (e.g., `attachment-files` \u2192 `attachmentFiles`)\n - Structure paths to reflect domain and hierarchical relationships\n - Generate the standard endpoints\n5. Add endpoints for relationships and complex operations\n6. Verify ALL independent entities and requirements are covered\n7. Call the `makeEndpoints()` function with your complete array\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\n## 7. Path Transformation Examples\n\n| Original Format | Improved Format | Explanation |\n|-----------------|-----------------|-------------|\n| `/attachment-files` | `/attachmentFiles` | Convert kebab-case to camelCase |\n| `/bbs-articles` | `/bbs/articles` | Separate domain prefix with slash |\n| `/bbs-article-snapshots` | `/bbs/articles/snapshots` | Reflect hierarchy in URL structure |\n| `/shopping-sale-snapshots` | `/shopping/sales/snapshots` | Both domain prefix and hierarchy properly formatted |\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\nYou're right - I removed too much of the original structure. Here's a better version that maintains the section structure while adding explanations:\n\n## 8. Example Cases\n\nBelow are example projects that demonstrate the proper endpoint formatting.\n\n### 8.1. BBS (Bulletin Board System)\n\n```json\n{\"endpoints\":[{\"path\":\"/bbs/articles\",\"method\":\"post\"},{\"path\":\"/bbs/articles\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/abridges\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"delete\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"post\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"delete\"},{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"}]}\n```\n\n**Key points**: Notice how the domain prefix \"bbs\" is separated with a slash, entities use camelCase, and hierarchical relationships are expressed (e.g., `/bbs/articles/{articleId}/comments`).\n\n### 8.2. Shopping Mall\n\n```json\n{\"endpoints\":[{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/mileages/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/donations/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/sections/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate/refresh\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/join\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/authenticate/activate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/external\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/password/change\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/tickets/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/mileages/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}/replica\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/direct\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/orders/{id}/price\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/{id}/discount\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/goods/{id}/confirm\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/deliveries/incompletes\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}/complete\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/shippers\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/open\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{id}/pause\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/suspend\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/restore\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections/{code}/get\",\"method\":\"get\"}]}\n```\n\n**Key points**: Observe how `/shopping` is used as domain prefix, hierarchical relationships are reflected in paths (e.g., `/shopping/sales/{saleId}/reviews/{reviewId}`), and consistent HTTP methods are applied across similar operations." /* AutoBeSystemPromptConstant.INTERFACE_ENDPOINT */),
|
|
71
|
-
tokenUsage: ctx.usage(),
|
|
72
71
|
controllers: [
|
|
73
72
|
createApplication({
|
|
74
73
|
model: ctx.model,
|
|
@@ -80,7 +79,12 @@ function orchestrateInterfaceEndpoints(ctx_1) {
|
|
|
80
79
|
}),
|
|
81
80
|
],
|
|
82
81
|
});
|
|
83
|
-
const histories = yield agentica
|
|
82
|
+
const histories = yield agentica
|
|
83
|
+
.conversate(content)
|
|
84
|
+
.finally(() => {
|
|
85
|
+
const tokenUsage = agentica.getTokenUsage();
|
|
86
|
+
ctx.usage().record(tokenUsage, ["interface"]);
|
|
87
|
+
});
|
|
84
88
|
if (((_b = histories.at(-1)) === null || _b === void 0 ? void 0 : _b.type) === "assistantMessage")
|
|
85
89
|
return Object.assign(Object.assign({}, histories.at(-1)), { created_at: start.toISOString(), completed_at: new Date().toISOString(), id: (0, uuid_1.v4)() });
|
|
86
90
|
else if (pointer.value === null)
|
|
@@ -121,44 +125,10 @@ const claude = {
|
|
|
121
125
|
type: "object",
|
|
122
126
|
properties: {
|
|
123
127
|
endpoints: {
|
|
124
|
-
title: "List of endpoints to generate",
|
|
125
128
|
description: "List of endpoints to generate.",
|
|
126
129
|
type: "array",
|
|
127
130
|
items: {
|
|
128
|
-
|
|
129
|
-
type: "object",
|
|
130
|
-
properties: {
|
|
131
|
-
path: {
|
|
132
|
-
title: "HTTP path of the API operation",
|
|
133
|
-
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
134
|
-
type: "string"
|
|
135
|
-
},
|
|
136
|
-
method: {
|
|
137
|
-
title: "HTTP method of the API operation",
|
|
138
|
-
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
139
|
-
oneOf: [
|
|
140
|
-
{
|
|
141
|
-
"const": "get"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"const": "post"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"const": "put"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"const": "delete"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"const": "patch"
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
required: [
|
|
159
|
-
"path",
|
|
160
|
-
"method"
|
|
161
|
-
]
|
|
131
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
162
132
|
}
|
|
163
133
|
}
|
|
164
134
|
},
|
|
@@ -166,7 +136,42 @@ const claude = {
|
|
|
166
136
|
"endpoints"
|
|
167
137
|
],
|
|
168
138
|
additionalProperties: false,
|
|
169
|
-
$defs: {
|
|
139
|
+
$defs: {
|
|
140
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
141
|
+
description: "API endpoint information.",
|
|
142
|
+
type: "object",
|
|
143
|
+
properties: {
|
|
144
|
+
path: {
|
|
145
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
146
|
+
type: "string"
|
|
147
|
+
},
|
|
148
|
+
method: {
|
|
149
|
+
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
150
|
+
oneOf: [
|
|
151
|
+
{
|
|
152
|
+
"const": "get"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"const": "post"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"const": "put"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"const": "delete"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"const": "patch"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
required: [
|
|
170
|
+
"path",
|
|
171
|
+
"method"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
170
175
|
},
|
|
171
176
|
description: "Create Restful API endpoints.\n\nCreate Restful API endpoints referencing the given documents; requirement\nanalysis documents, and Prisma schema files with ERD descriptions. The API\nendpoints must cover every requirements and every entities in the ERD.\n\nAlso, each combination of {@link AutoBeOpenApi.IEndpoint.path} and\n{@link AutoBeOpenApi.IEndpoint.method} must be unique to avoid duplicates.\nPlease don't make any duplicates.",
|
|
172
177
|
validate: (() => { const _io0 = input => Array.isArray(input.endpoints) && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.endpoints) || _report(_exceptionable, {
|
|
@@ -240,35 +245,10 @@ const collection = {
|
|
|
240
245
|
type: "object",
|
|
241
246
|
properties: {
|
|
242
247
|
endpoints: {
|
|
243
|
-
title: "List of endpoints to generate",
|
|
244
248
|
description: "List of endpoints to generate.",
|
|
245
249
|
type: "array",
|
|
246
250
|
items: {
|
|
247
|
-
|
|
248
|
-
type: "object",
|
|
249
|
-
properties: {
|
|
250
|
-
path: {
|
|
251
|
-
title: "HTTP path of the API operation",
|
|
252
|
-
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
253
|
-
type: "string"
|
|
254
|
-
},
|
|
255
|
-
method: {
|
|
256
|
-
title: "HTTP method of the API operation",
|
|
257
|
-
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
258
|
-
type: "string",
|
|
259
|
-
"enum": [
|
|
260
|
-
"get",
|
|
261
|
-
"post",
|
|
262
|
-
"put",
|
|
263
|
-
"delete",
|
|
264
|
-
"patch"
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
required: [
|
|
269
|
-
"path",
|
|
270
|
-
"method"
|
|
271
|
-
]
|
|
251
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
272
252
|
}
|
|
273
253
|
}
|
|
274
254
|
},
|
|
@@ -276,7 +256,33 @@ const collection = {
|
|
|
276
256
|
"endpoints"
|
|
277
257
|
],
|
|
278
258
|
additionalProperties: false,
|
|
279
|
-
$defs: {
|
|
259
|
+
$defs: {
|
|
260
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
261
|
+
description: "API endpoint information.",
|
|
262
|
+
type: "object",
|
|
263
|
+
properties: {
|
|
264
|
+
path: {
|
|
265
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
266
|
+
type: "string"
|
|
267
|
+
},
|
|
268
|
+
method: {
|
|
269
|
+
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
270
|
+
type: "string",
|
|
271
|
+
"enum": [
|
|
272
|
+
"get",
|
|
273
|
+
"post",
|
|
274
|
+
"put",
|
|
275
|
+
"delete",
|
|
276
|
+
"patch"
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
required: [
|
|
281
|
+
"path",
|
|
282
|
+
"method"
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
}
|
|
280
286
|
},
|
|
281
287
|
description: "Create Restful API endpoints.\n\nCreate Restful API endpoints referencing the given documents; requirement\nanalysis documents, and Prisma schema files with ERD descriptions. The API\nendpoints must cover every requirements and every entities in the ERD.\n\nAlso, each combination of {@link AutoBeOpenApi.IEndpoint.path} and\n{@link AutoBeOpenApi.IEndpoint.method} must be unique to avoid duplicates.\nPlease don't make any duplicates.",
|
|
282
288
|
validate: (() => { const _io0 = input => Array.isArray(input.endpoints) && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.endpoints) || _report(_exceptionable, {
|
|
@@ -338,114 +344,5 @@ const collection = {
|
|
|
338
344
|
llama: claude,
|
|
339
345
|
deepseek: claude,
|
|
340
346
|
"3.1": claude,
|
|
341
|
-
"3.0": {
|
|
342
|
-
model: "3.0",
|
|
343
|
-
options: {
|
|
344
|
-
constraint: true,
|
|
345
|
-
recursive: 3,
|
|
346
|
-
separate: null
|
|
347
|
-
},
|
|
348
|
-
functions: [
|
|
349
|
-
{
|
|
350
|
-
name: "makeEndpoints",
|
|
351
|
-
parameters: {
|
|
352
|
-
type: "object",
|
|
353
|
-
properties: {
|
|
354
|
-
endpoints: {
|
|
355
|
-
type: "array",
|
|
356
|
-
items: {
|
|
357
|
-
type: "object",
|
|
358
|
-
properties: {
|
|
359
|
-
path: {
|
|
360
|
-
type: "string",
|
|
361
|
-
title: "HTTP path of the API operation",
|
|
362
|
-
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage."
|
|
363
|
-
},
|
|
364
|
-
method: {
|
|
365
|
-
type: "string",
|
|
366
|
-
"enum": [
|
|
367
|
-
"get",
|
|
368
|
-
"post",
|
|
369
|
-
"put",
|
|
370
|
-
"delete",
|
|
371
|
-
"patch"
|
|
372
|
-
],
|
|
373
|
-
title: "HTTP method of the API operation",
|
|
374
|
-
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record"
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
required: [
|
|
378
|
-
"path",
|
|
379
|
-
"method"
|
|
380
|
-
],
|
|
381
|
-
description: "Description of the current {@link AutoBeOpenApi.IEndpoint} type:\n\n> API endpoint information.",
|
|
382
|
-
additionalProperties: false
|
|
383
|
-
},
|
|
384
|
-
title: "List of endpoints to generate",
|
|
385
|
-
description: "List of endpoints to generate."
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
required: [
|
|
389
|
-
"endpoints"
|
|
390
|
-
],
|
|
391
|
-
description: " Properties containing the endpoints",
|
|
392
|
-
additionalProperties: false
|
|
393
|
-
},
|
|
394
|
-
description: "Create Restful API endpoints.\n\nCreate Restful API endpoints referencing the given documents; requirement\nanalysis documents, and Prisma schema files with ERD descriptions. The API\nendpoints must cover every requirements and every entities in the ERD.\n\nAlso, each combination of {@link AutoBeOpenApi.IEndpoint.path} and\n{@link AutoBeOpenApi.IEndpoint.method} must be unique to avoid duplicates.\nPlease don't make any duplicates.",
|
|
395
|
-
validate: (() => { const _io0 = input => Array.isArray(input.endpoints) && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.endpoints) || _report(_exceptionable, {
|
|
396
|
-
path: _path + ".endpoints",
|
|
397
|
-
expected: "Array<AutoBeOpenApi.IEndpoint>",
|
|
398
|
-
value: input.endpoints
|
|
399
|
-
})) && input.endpoints.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
400
|
-
path: _path + ".endpoints[" + _index2 + "]",
|
|
401
|
-
expected: "AutoBeOpenApi.IEndpoint",
|
|
402
|
-
value: elem
|
|
403
|
-
})) && _vo1(elem, _path + ".endpoints[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
404
|
-
path: _path + ".endpoints[" + _index2 + "]",
|
|
405
|
-
expected: "AutoBeOpenApi.IEndpoint",
|
|
406
|
-
value: elem
|
|
407
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
408
|
-
path: _path + ".endpoints",
|
|
409
|
-
expected: "Array<AutoBeOpenApi.IEndpoint>",
|
|
410
|
-
value: input.endpoints
|
|
411
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.path || _report(_exceptionable, {
|
|
412
|
-
path: _path + ".path",
|
|
413
|
-
expected: "string",
|
|
414
|
-
value: input.path
|
|
415
|
-
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
416
|
-
path: _path + ".method",
|
|
417
|
-
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
418
|
-
value: input.method
|
|
419
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
420
|
-
if (false === __is(input)) {
|
|
421
|
-
errors = [];
|
|
422
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
423
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
424
|
-
path: _path + "",
|
|
425
|
-
expected: "__type",
|
|
426
|
-
value: input
|
|
427
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
428
|
-
path: _path + "",
|
|
429
|
-
expected: "__type",
|
|
430
|
-
value: input
|
|
431
|
-
}))(input, "$input", true);
|
|
432
|
-
const success = 0 === errors.length;
|
|
433
|
-
return success ? {
|
|
434
|
-
success,
|
|
435
|
-
data: input
|
|
436
|
-
} : {
|
|
437
|
-
success,
|
|
438
|
-
errors,
|
|
439
|
-
data: input
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
return {
|
|
443
|
-
success: true,
|
|
444
|
-
data: input
|
|
445
|
-
};
|
|
446
|
-
}; })()
|
|
447
|
-
}
|
|
448
|
-
]
|
|
449
|
-
},
|
|
450
347
|
};
|
|
451
348
|
//# sourceMappingURL=orchestrateInterfaceEndpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceEndpoints.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceEndpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceEndpoints.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceEndpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,sEA2DC;;AAjFD,yCAKwB;AAOxB,+BAAyC;AACzC,kDAA0B;AAC1B,+BAA0B;AAI1B,uEAAoE;AACpE,2EAAwE;AACxE,+EAA4E;AAE5E,SAAsB,6BAA6B;yDAGjD,GAAyB,EACzB,UAAkB,0CAA0C;;QAE5D,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,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