create-auto-app 0.2.2 → 0.3.0
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/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/templates/.gitkeep +0 -0
- package/templates/shopping-app/.context/schema.json +11 -51
- package/templates/shopping-app/.context/server/server/package.json +26 -0
- package/templates/shopping-app/.context/server/server/scripts/generate-schema.ts +34 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/commands.ts +8 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.specs.ts +46 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.ts +33 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/events.ts +10 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/evolve.ts +28 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/handle.ts +24 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/mutation.resolver.ts +25 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/register.ts +7 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/state.ts +47 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.specs.ts +51 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.ts +43 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/register.ts +24 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/commands.ts +8 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.specs.ts +38 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.ts +33 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/events.ts +10 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/evolve.ts +28 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/handle.ts +24 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/mutation.resolver.ts +25 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/register.ts +7 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/state.ts +47 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/commands.ts +8 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.specs.ts +61 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.ts +35 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/events.ts +9 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/evolve.ts +28 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/handle.ts +49 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/mutation.resolver.ts +25 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/register.ts +7 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/state.ts +47 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.specs.ts +94 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.ts +37 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/query.resolver.ts +56 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/state.ts +4 -0
- package/templates/shopping-app/.context/server/server/src/domain/shared/ReadModel.ts +26 -0
- package/templates/shopping-app/{server/src/domain/shared/index.d.ts → .context/server/server/src/domain/shared/index.ts} +0 -1
- package/templates/shopping-app/{server/src/domain/shared/reactorSpecification.js → .context/server/server/src/domain/shared/reactorSpecification.ts} +116 -22
- package/templates/shopping-app/.context/server/server/src/domain/shared/sendCommand.ts +21 -0
- package/templates/shopping-app/{server/src/domain/shared/types.d.ts → .context/server/server/src/domain/shared/types.ts} +17 -5
- package/templates/shopping-app/.context/server/server/src/server.ts +43 -0
- package/templates/shopping-app/{server/src/utils/index.d.ts → .context/server/server/src/utils/index.ts} +0 -1
- package/templates/shopping-app/{server/src/utils/loadProjections.js → .context/server/server/src/utils/loadProjections.ts} +11 -6
- package/templates/shopping-app/.context/server/server/src/utils/loadRegisterFiles.ts +41 -0
- package/templates/shopping-app/{server/src/utils/loadResolvers.js → .context/server/server/src/utils/loadResolvers.ts} +16 -7
- package/templates/shopping-app/.context/server/server/tsconfig.json +13 -0
- package/templates/shopping-app/.context/server/server/vitest.config.ts +7 -0
- package/templates/shopping-app/auto.config.ts +162 -4
- package/templates/shopping-app/client/package.json +1 -1
- package/templates/shopping-app/client/src/App.tsx +13 -13
- package/templates/shopping-app/client/src/components/molecules/QuantitySelector.tsx +4 -4
- package/templates/shopping-app/client/src/components/molecules/ShoppingCriteriaForm.tsx +4 -4
- package/templates/shopping-app/client/src/components/molecules/SuggestedItemCard.tsx +6 -6
- package/templates/shopping-app/client/src/components/organisms/AssistantChatInterface.tsx +3 -3
- package/templates/shopping-app/client/src/components/organisms/PageHeader.tsx +2 -3
- package/templates/shopping-app/client/src/components/organisms/SuggestedItemsList.tsx +3 -3
- package/templates/shopping-app/client/src/index.css +10 -14
- package/templates/shopping-app/client/src/pages/AssistantChatPage.tsx +4 -4
- package/templates/shopping-app/client/src/pages/SuggestedItemsPage.tsx +4 -4
- package/templates/shopping-app/example-integrations/ai-chat-completion/package.json +1 -1
- package/templates/shopping-app/example-integrations/cart/package.json +1 -1
- package/templates/shopping-app/example-integrations/product-catalogue/package.json +1 -1
- package/templates/shopping-app/example-integrations/product-catalogue/src/product-catalogue-integration.ts +122 -115
- package/templates/shopping-app/flows/shopping-assistant.flow.ts +0 -1
- package/templates/shopping-app/package.json +13 -10
- package/templates/shopping-app/server/package.json +2 -2
- package/templates/shopping-app/.env +0 -8
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-format.log +0 -12
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-lint.log +0 -4
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts +0 -23
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js +0 -41
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js +0 -2
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/eslint +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/jiti +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/msw +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vite +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-format.log +0 -12
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-lint.log +0 -5
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts +0 -30
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js +0 -134
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js +0 -149
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts +0 -8
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js +0 -6
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts +0 -123
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts +0 -46
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js +0 -285
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts +0 -13
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js +0 -6
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts +0 -19
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js +0 -15
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts +0 -18
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js +0 -58
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js +0 -89
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js +0 -115
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts +0 -79
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts +0 -158
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts +0 -382
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js +0 -68
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/cart/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/index.js +0 -2
- package/templates/shopping-app/example-integrations/cart/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/eslint +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/jiti +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/msw +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-format.log +0 -10
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-lint.log +0 -4
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-type-check.log +0 -4
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts +0 -18
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js +0 -28
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts +0 -4
- package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/index.js +0 -49
- package/templates/shopping-app/example-integrations/cart-api/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts +0 -4
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js +0 -261
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/nodemon +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/swagger-jsdoc +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-cwd +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-esm +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-script +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-transpile-only +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-script +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsx +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-format.log +0 -12
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-lint.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js +0 -149
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts +0 -8
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js +0 -6
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts +0 -123
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts +0 -46
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js +0 -285
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts +0 -13
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js +0 -6
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts +0 -19
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js +0 -15
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts +0 -18
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js +0 -58
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js +0 -89
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js +0 -115
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts +0 -79
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts +0 -115
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts +0 -206
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js +0 -53
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js +0 -2
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts +0 -32
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js +0 -163
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/eslint +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/jiti +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/msw +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-format.log +0 -10
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-lint.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-test.log +0 -13
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts +0 -10
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js +0 -75
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js +0 -49
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js +0 -170
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/nodemon +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/swagger-jsdoc +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-cwd +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-esm +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-script +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-transpile-only +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-script +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsx +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/pnpm-workspace.yaml +0 -2
- package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts +0 -10
- package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/ReadModel.js +0 -19
- package/templates/shopping-app/server/src/domain/shared/ReadModel.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/index.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/index.js +0 -5
- package/templates/shopping-app/server/src/domain/shared/index.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts +0 -56
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts +0 -7
- package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/sendCommand.js +0 -16
- package/templates/shopping-app/server/src/domain/shared/sendCommand.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/types.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/types.js +0 -40
- package/templates/shopping-app/server/src/domain/shared/types.js.map +0 -1
- package/templates/shopping-app/server/src/utils/index.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/index.js +0 -4
- package/templates/shopping-app/server/src/utils/index.js.map +0 -1
- package/templates/shopping-app/server/src/utils/loadProjections.d.ts +0 -3
- package/templates/shopping-app/server/src/utils/loadProjections.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/loadProjections.js.map +0 -1
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts +0 -6
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.js +0 -26
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.js.map +0 -1
- package/templates/shopping-app/server/src/utils/loadResolvers.d.ts +0 -5
- package/templates/shopping-app/server/src/utils/loadResolvers.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/loadResolvers.js.map +0 -1
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vitest
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules/vitest/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules/vitest/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../vitest/vitest.mjs" "$@"
|
|
21
|
-
fi
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> @auto-engineer/cart-integration@0.6.1 format /Users/sam/WebstormProjects/top/auto-engineer/integrations/cart
|
|
4
|
-
> prettier --write "**/*.{js,ts,json,md,yml,yaml}" --ignore-path ../../.prettierignore
|
|
5
|
-
|
|
6
|
-
CHANGELOG.md[2K[1G[90mCHANGELOG.md[39m 31ms (unchanged)
|
|
7
|
-
eslint.config.ts[2K[1G[90meslint.config.ts[39m 40ms (unchanged)
|
|
8
|
-
package.json[2K[1G[90mpackage.json[39m 13ms (unchanged)
|
|
9
|
-
src/cart-integration.ts[2K[1G[90msrc/cart-integration.ts[39m 30ms (unchanged)
|
|
10
|
-
src/index.ts[2K[1G[90msrc/index.ts[39m 1ms (unchanged)
|
|
11
|
-
tsconfig.json[2K[1G[90mtsconfig.json[39m 1ms (unchanged)
|
|
12
|
-
tsconfig.test.json[2K[1G[90mtsconfig.test.json[39m 2ms (unchanged)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @auto-engineer/cart-integration@0.6.1 test /Users/sam/WebstormProjects/top/auto-engineer/integrations/cart
|
|
3
|
-
> vitest run
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
RUN v3.2.4 /Users/sam/WebstormProjects/top/auto-engineer/integrations/cart
|
|
7
|
-
|
|
8
|
-
No test files found, exiting with code 0
|
|
9
|
-
|
|
10
|
-
include: **/*.specs.{js,ts}
|
|
11
|
-
exclude: **/.tmp/**, **/node_modules/**, **/dist/**
|
|
12
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { State, Integration } from '@auto-engineer/flow';
|
|
2
|
-
import type { CartSession } from './generated/cart';
|
|
3
|
-
export type CartState = State<'Cart', {
|
|
4
|
-
cart: CartSession;
|
|
5
|
-
}>;
|
|
6
|
-
type CartQueries = {
|
|
7
|
-
GetCart: (p: {
|
|
8
|
-
sessionId: string;
|
|
9
|
-
}) => Promise<CartState>;
|
|
10
|
-
};
|
|
11
|
-
type CartCommands = {
|
|
12
|
-
AddItem: (p: {
|
|
13
|
-
sessionId: string;
|
|
14
|
-
productId: string;
|
|
15
|
-
name: string;
|
|
16
|
-
price: number;
|
|
17
|
-
quantity: number;
|
|
18
|
-
}) => Promise<CartState>;
|
|
19
|
-
RemoveItem: (p: {
|
|
20
|
-
sessionId: string;
|
|
21
|
-
productId: string;
|
|
22
|
-
quantity: number;
|
|
23
|
-
}) => Promise<CartState>;
|
|
24
|
-
Clear: (p: {
|
|
25
|
-
sessionId: string;
|
|
26
|
-
}) => Promise<CartState>;
|
|
27
|
-
};
|
|
28
|
-
export declare const Cart: Integration<'cart', CartQueries, CartCommands>;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=cart-integration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cart-integration.d.ts","sourceRoot":"","sources":["../src/cart-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAI9D,OAAO,KAAK,EACV,WAAW,EAOZ,MAAM,kBAAkB,CAAC;AAS1B,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,CAAC;AAM7D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;CAC3D,CAAC;AACF,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,CAAC,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACzB,UAAU,EAAE,CAAC,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAClG,KAAK,EAAE,CAAC,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,CAgF/D,CAAC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { registerTool, z } from '@auto-engineer/ai-gateway';
|
|
2
|
-
import { createClient as createCartClient } from './generated/cart/client';
|
|
3
|
-
import { zGetApiCartBySessionIdResponse, zPostApiCartBySessionIdAddResponse, zPostApiCartBySessionIdRemoveResponse, zPostApiCartBySessionIdClearResponse, } from './generated/cart/zod.gen';
|
|
4
|
-
// ---------- Client ----------
|
|
5
|
-
const cartClient = createCartClient({ baseUrl: 'http://localhost:3002' });
|
|
6
|
-
export const Cart = {
|
|
7
|
-
__brand: 'Integration',
|
|
8
|
-
type: 'cart',
|
|
9
|
-
name: 'cart',
|
|
10
|
-
Queries: {
|
|
11
|
-
// GET /api/cart/{sessionId}
|
|
12
|
-
GetCart: async ({ sessionId }) => {
|
|
13
|
-
const res = await cartClient.get({
|
|
14
|
-
url: '/api/cart/{sessionId}',
|
|
15
|
-
path: { sessionId },
|
|
16
|
-
});
|
|
17
|
-
if (res.error !== undefined) {
|
|
18
|
-
console.error(`GetCart error for "${sessionId}":`, res.error);
|
|
19
|
-
const now = new Date().toISOString();
|
|
20
|
-
return { type: 'Cart', data: { cart: { sessionId, items: [], total: 0, createdAt: now, updatedAt: now } } };
|
|
21
|
-
}
|
|
22
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
Commands: {
|
|
26
|
-
// POST /api/cart/{sessionId}/add
|
|
27
|
-
AddItem: async ({ sessionId, productId, name, price, quantity }) => {
|
|
28
|
-
const res = await cartClient.post({
|
|
29
|
-
url: '/api/cart/{sessionId}/add',
|
|
30
|
-
path: { sessionId },
|
|
31
|
-
body: { productId, name, price, quantity },
|
|
32
|
-
});
|
|
33
|
-
if (res.error !== undefined) {
|
|
34
|
-
console.error(`AddItem error for "${sessionId}":`, res.error);
|
|
35
|
-
// fall back to current cart
|
|
36
|
-
const fallback = await cartClient.get({
|
|
37
|
-
url: '/api/cart/{sessionId}',
|
|
38
|
-
path: { sessionId },
|
|
39
|
-
});
|
|
40
|
-
return { type: 'Cart', data: { cart: fallback.data } };
|
|
41
|
-
}
|
|
42
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
43
|
-
},
|
|
44
|
-
// POST /api/cart/{sessionId}/remove
|
|
45
|
-
RemoveItem: async ({ sessionId, productId, quantity }) => {
|
|
46
|
-
const res = await cartClient.post({
|
|
47
|
-
url: '/api/cart/{sessionId}/remove',
|
|
48
|
-
path: { sessionId },
|
|
49
|
-
body: { productId, quantity },
|
|
50
|
-
});
|
|
51
|
-
if (res.error !== undefined) {
|
|
52
|
-
console.error(`RemoveItem error for "${sessionId}":`, res.error);
|
|
53
|
-
const fallback = await cartClient.get({
|
|
54
|
-
url: '/api/cart/{sessionId}',
|
|
55
|
-
path: { sessionId },
|
|
56
|
-
});
|
|
57
|
-
return { type: 'Cart', data: { cart: fallback.data } };
|
|
58
|
-
}
|
|
59
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
60
|
-
},
|
|
61
|
-
// POST /api/cart/{sessionId}/clear
|
|
62
|
-
Clear: async ({ sessionId }) => {
|
|
63
|
-
const res = await cartClient.post({
|
|
64
|
-
url: '/api/cart/{sessionId}/clear',
|
|
65
|
-
path: { sessionId },
|
|
66
|
-
});
|
|
67
|
-
if (res.error !== undefined) {
|
|
68
|
-
console.error(`Clear error for "${sessionId}":`, res.error);
|
|
69
|
-
const fallback = await cartClient.get({
|
|
70
|
-
url: '/api/cart/{sessionId}',
|
|
71
|
-
path: { sessionId },
|
|
72
|
-
});
|
|
73
|
-
return { type: 'Cart', data: { cart: fallback.data } };
|
|
74
|
-
}
|
|
75
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
// ---------- MCP tools ----------
|
|
80
|
-
registerTool('CART_GET', {
|
|
81
|
-
title: 'Get Cart',
|
|
82
|
-
description: 'Fetch a cart session by ID',
|
|
83
|
-
inputSchema: { sessionId: z.string().min(1) },
|
|
84
|
-
schema: zGetApiCartBySessionIdResponse,
|
|
85
|
-
schemaName: 'CartSession',
|
|
86
|
-
schemaDescription: 'Cart session details',
|
|
87
|
-
}, async ({ sessionId }) => {
|
|
88
|
-
const res = await Cart.Queries.GetCart({ sessionId });
|
|
89
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
90
|
-
});
|
|
91
|
-
registerTool('CART_ADD', {
|
|
92
|
-
title: 'Add Item to Cart',
|
|
93
|
-
description: 'Add an item to the cart',
|
|
94
|
-
inputSchema: {
|
|
95
|
-
sessionId: z.string().min(1),
|
|
96
|
-
productId: z.string().min(1),
|
|
97
|
-
name: z.string().min(1),
|
|
98
|
-
price: z.number(),
|
|
99
|
-
quantity: z.number().int().positive(),
|
|
100
|
-
},
|
|
101
|
-
schema: zPostApiCartBySessionIdAddResponse,
|
|
102
|
-
schemaName: 'CartSession',
|
|
103
|
-
schemaDescription: 'Updated cart',
|
|
104
|
-
}, async (args) => {
|
|
105
|
-
const res = await Cart.Commands.AddItem(args);
|
|
106
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
107
|
-
});
|
|
108
|
-
registerTool('CART_REMOVE', {
|
|
109
|
-
title: 'Remove Item from Cart',
|
|
110
|
-
description: 'Remove or decrement an item in the cart',
|
|
111
|
-
inputSchema: {
|
|
112
|
-
sessionId: z.string().min(1),
|
|
113
|
-
productId: z.string().min(1),
|
|
114
|
-
quantity: z.number().int().positive(),
|
|
115
|
-
},
|
|
116
|
-
schema: zPostApiCartBySessionIdRemoveResponse,
|
|
117
|
-
schemaName: 'CartSession',
|
|
118
|
-
schemaDescription: 'Updated cart',
|
|
119
|
-
}, async (args) => {
|
|
120
|
-
const res = await Cart.Commands.RemoveItem(args);
|
|
121
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
122
|
-
});
|
|
123
|
-
registerTool('CART_CLEAR', {
|
|
124
|
-
title: 'Clear Cart',
|
|
125
|
-
description: 'Remove all items from the cart',
|
|
126
|
-
inputSchema: { sessionId: z.string().min(1) },
|
|
127
|
-
schema: zPostApiCartBySessionIdClearResponse,
|
|
128
|
-
schemaName: 'CartSession',
|
|
129
|
-
schemaDescription: 'Updated cart',
|
|
130
|
-
}, async ({ sessionId }) => {
|
|
131
|
-
const res = await Cart.Commands.Clear({ sessionId });
|
|
132
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
133
|
-
});
|
|
134
|
-
//# sourceMappingURL=cart-integration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cart-integration.js","sourceRoot":"","sources":["../src/cart-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAU3E,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,qCAAqC,EACrC,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAKlC,+BAA+B;AAC/B,MAAM,UAAU,GAAG,gBAAgB,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC,CAAC;AAkB1E,MAAM,CAAC,MAAM,IAAI,GAAmD;IAClE,OAAO,EAAE,aAAsB;IAC/B,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IAEZ,OAAO,EAAE;QACP,4BAA4B;QAC5B,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC/B,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,GAAG,CAAiD;gBAC/E,GAAG,EAAE,uBAAuB;gBAC5B,IAAI,EAAE,EAAE,SAAS,EAAE;aACpB,CAAC,CAAC;YACH,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC5B,OAAO,CAAC,KAAK,CAAC,sBAAsB,SAAS,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC9D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;gBACrC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,S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AE,CAAC;AAChG,CAAC,CACF,CAAC;AAEF,YAAY,CACV,YAAY,EACZ;IACE,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,gCAAgC;IAC7C,WAAW,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;IAC7C,MAAM,EAAE,oCAAoC;IAC5C,UAAU,EAAE,aAAa;IACzB,iBAAiB,EAAE,cAAc;CAClC,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACtB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,QAAS,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACtD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAChG,CAAC,CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/client/client.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAA0B,MAAM,aAAa,CAAC;AAgB1E,eAAO,MAAM,YAAY,GAAI,SAAQ,MAAW,KAAG,MAoLlD,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { buildUrl, createConfig, createInterceptors, getParseAs, mergeConfigs, mergeHeaders, setAuthParams, } from './utils.gen';
|
|
3
|
-
export const createClient = (config = {}) => {
|
|
4
|
-
let _config = mergeConfigs(createConfig(), config);
|
|
5
|
-
const getConfig = () => ({ ..._config });
|
|
6
|
-
const setConfig = (config) => {
|
|
7
|
-
_config = mergeConfigs(_config, config);
|
|
8
|
-
return getConfig();
|
|
9
|
-
};
|
|
10
|
-
const interceptors = createInterceptors();
|
|
11
|
-
const request = async (options) => {
|
|
12
|
-
const opts = {
|
|
13
|
-
..._config,
|
|
14
|
-
...options,
|
|
15
|
-
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
16
|
-
headers: mergeHeaders(_config.headers, options.headers),
|
|
17
|
-
serializedBody: undefined,
|
|
18
|
-
};
|
|
19
|
-
if (opts.security) {
|
|
20
|
-
await setAuthParams({
|
|
21
|
-
...opts,
|
|
22
|
-
security: opts.security,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
if (opts.requestValidator) {
|
|
26
|
-
await opts.requestValidator(opts);
|
|
27
|
-
}
|
|
28
|
-
if (opts.body && opts.bodySerializer) {
|
|
29
|
-
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
30
|
-
}
|
|
31
|
-
// remove Content-Type header if body is empty to avoid sending invalid requests
|
|
32
|
-
if (opts.serializedBody === undefined || opts.serializedBody === '') {
|
|
33
|
-
opts.headers.delete('Content-Type');
|
|
34
|
-
}
|
|
35
|
-
const url = buildUrl(opts);
|
|
36
|
-
const requestInit = {
|
|
37
|
-
redirect: 'follow',
|
|
38
|
-
...opts,
|
|
39
|
-
body: opts.serializedBody,
|
|
40
|
-
};
|
|
41
|
-
let request = new Request(url, requestInit);
|
|
42
|
-
for (const fn of interceptors.request._fns) {
|
|
43
|
-
if (fn) {
|
|
44
|
-
request = await fn(request, opts);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// fetch must be assigned here, otherwise it would throw the error:
|
|
48
|
-
// TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
|
|
49
|
-
const _fetch = opts.fetch;
|
|
50
|
-
let response = await _fetch(request);
|
|
51
|
-
for (const fn of interceptors.response._fns) {
|
|
52
|
-
if (fn) {
|
|
53
|
-
response = await fn(response, request, opts);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const result = {
|
|
57
|
-
request,
|
|
58
|
-
response,
|
|
59
|
-
};
|
|
60
|
-
if (response.ok) {
|
|
61
|
-
if (response.status === 204 ||
|
|
62
|
-
response.headers.get('Content-Length') === '0') {
|
|
63
|
-
return opts.responseStyle === 'data'
|
|
64
|
-
? {}
|
|
65
|
-
: {
|
|
66
|
-
data: {},
|
|
67
|
-
...result,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
const parseAs = (opts.parseAs === 'auto'
|
|
71
|
-
? getParseAs(response.headers.get('Content-Type'))
|
|
72
|
-
: opts.parseAs) ?? 'json';
|
|
73
|
-
let data;
|
|
74
|
-
switch (parseAs) {
|
|
75
|
-
case 'arrayBuffer':
|
|
76
|
-
case 'blob':
|
|
77
|
-
case 'formData':
|
|
78
|
-
case 'json':
|
|
79
|
-
case 'text':
|
|
80
|
-
data = await response[parseAs]();
|
|
81
|
-
break;
|
|
82
|
-
case 'stream':
|
|
83
|
-
return opts.responseStyle === 'data'
|
|
84
|
-
? response.body
|
|
85
|
-
: {
|
|
86
|
-
data: response.body,
|
|
87
|
-
...result,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
if (parseAs === 'json') {
|
|
91
|
-
if (opts.responseValidator) {
|
|
92
|
-
await opts.responseValidator(data);
|
|
93
|
-
}
|
|
94
|
-
if (opts.responseTransformer) {
|
|
95
|
-
data = await opts.responseTransformer(data);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return opts.responseStyle === 'data'
|
|
99
|
-
? data
|
|
100
|
-
: {
|
|
101
|
-
data,
|
|
102
|
-
...result,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
const textError = await response.text();
|
|
106
|
-
let jsonError;
|
|
107
|
-
try {
|
|
108
|
-
jsonError = JSON.parse(textError);
|
|
109
|
-
}
|
|
110
|
-
catch {
|
|
111
|
-
// noop
|
|
112
|
-
}
|
|
113
|
-
const error = jsonError ?? textError;
|
|
114
|
-
let finalError = error;
|
|
115
|
-
for (const fn of interceptors.error._fns) {
|
|
116
|
-
if (fn) {
|
|
117
|
-
finalError = (await fn(error, response, request, opts));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
finalError = finalError || {};
|
|
121
|
-
if (opts.throwOnError) {
|
|
122
|
-
throw finalError;
|
|
123
|
-
}
|
|
124
|
-
// TODO: we probably want to return error and improve types
|
|
125
|
-
return opts.responseStyle === 'data'
|
|
126
|
-
? undefined
|
|
127
|
-
: {
|
|
128
|
-
error: finalError,
|
|
129
|
-
...result,
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
return {
|
|
133
|
-
buildUrl,
|
|
134
|
-
connect: (options) => request({ ...options, method: 'CONNECT' }),
|
|
135
|
-
delete: (options) => request({ ...options, method: 'DELETE' }),
|
|
136
|
-
get: (options) => request({ ...options, method: 'GET' }),
|
|
137
|
-
getConfig,
|
|
138
|
-
head: (options) => request({ ...options, method: 'HEAD' }),
|
|
139
|
-
interceptors,
|
|
140
|
-
options: (options) => request({ ...options, method: 'OPTIONS' }),
|
|
141
|
-
patch: (options) => request({ ...options, method: 'PATCH' }),
|
|
142
|
-
post: (options) => request({ ...options, method: 'POST' }),
|
|
143
|
-
put: (options) => request({ ...options, method: 'PUT' }),
|
|
144
|
-
request,
|
|
145
|
-
setConfig,
|
|
146
|
-
trace: (options) => request({ ...options, method: 'TRACE' }),
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
//# sourceMappingURL=client.gen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.js","sourceRoot":"","sources":["../../../../src/generated/cart/client/client.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAGrD,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AAOrB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAi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OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAChE,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QAC5D,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAC1D,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;QACxD,OAAO;QACP,SAAS;QACT,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type { Auth } from '../core/auth.gen';
|
|
2
|
-
export type { QuerySerializerOptions } from '../core/bodySerializer.gen';
|
|
3
|
-
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen';
|
|
4
|
-
export { buildClientParams } from '../core/params.gen';
|
|
5
|
-
export { createClient } from './client.gen';
|
|
6
|
-
export type { Client, ClientOptions, Config, CreateClientConfig, Options, OptionsLegacyParser, RequestOptions, RequestResult, ResolvedRequestOptions, ResponseStyle, TDataShape, } from './types.gen';
|
|
7
|
-
export { createConfig, mergeHeaders } from './utils.gen';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/client/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,YAAY,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EACV,MAAM,EACN,aAAa,EACb,MAAM,EACN,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,aAAa,EACb,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen';
|
|
3
|
-
export { buildClientParams } from '../core/params.gen';
|
|
4
|
-
export { createClient } from './client.gen';
|
|
5
|
-
export { createConfig, mergeHeaders } from './utils.gen';
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/cart/client/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAIrD,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAc5C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import type { Auth } from '../core/auth.gen';
|
|
2
|
-
import type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';
|
|
3
|
-
import type { Middleware } from './utils.gen';
|
|
4
|
-
export type ResponseStyle = 'data' | 'fields';
|
|
5
|
-
export interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Base URL for all requests made by this client.
|
|
8
|
-
*/
|
|
9
|
-
baseUrl?: T['baseUrl'];
|
|
10
|
-
/**
|
|
11
|
-
* Fetch API implementation. You can use this option to provide a custom
|
|
12
|
-
* fetch instance.
|
|
13
|
-
*
|
|
14
|
-
* @default globalThis.fetch
|
|
15
|
-
*/
|
|
16
|
-
fetch?: (request: Request) => ReturnType<typeof fetch>;
|
|
17
|
-
/**
|
|
18
|
-
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
19
|
-
* options won't have any effect.
|
|
20
|
-
*
|
|
21
|
-
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
22
|
-
*/
|
|
23
|
-
next?: never;
|
|
24
|
-
/**
|
|
25
|
-
* Return the response data parsed in a specified format. By default, `auto`
|
|
26
|
-
* will infer the appropriate method from the `Content-Type` response header.
|
|
27
|
-
* You can override this behavior with any of the {@link Body} methods.
|
|
28
|
-
* Select `stream` if you don't want to parse response data at all.
|
|
29
|
-
*
|
|
30
|
-
* @default 'auto'
|
|
31
|
-
*/
|
|
32
|
-
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
33
|
-
/**
|
|
34
|
-
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
35
|
-
*
|
|
36
|
-
* @default 'fields'
|
|
37
|
-
*/
|
|
38
|
-
responseStyle?: ResponseStyle;
|
|
39
|
-
/**
|
|
40
|
-
* Throw an error instead of returning it in the response?
|
|
41
|
-
*
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
|
-
throwOnError?: T['throwOnError'];
|
|
45
|
-
}
|
|
46
|
-
export interface RequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
47
|
-
responseStyle: TResponseStyle;
|
|
48
|
-
throwOnError: ThrowOnError;
|
|
49
|
-
}> {
|
|
50
|
-
/**
|
|
51
|
-
* Any body that you want to add to your request.
|
|
52
|
-
*
|
|
53
|
-
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
54
|
-
*/
|
|
55
|
-
body?: unknown;
|
|
56
|
-
path?: Record<string, unknown>;
|
|
57
|
-
query?: Record<string, unknown>;
|
|
58
|
-
/**
|
|
59
|
-
* Security mechanism(s) to use for the request.
|
|
60
|
-
*/
|
|
61
|
-
security?: ReadonlyArray<Auth>;
|
|
62
|
-
url: Url;
|
|
63
|
-
}
|
|
64
|
-
export interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<TResponseStyle, ThrowOnError, Url> {
|
|
65
|
-
serializedBody?: string;
|
|
66
|
-
}
|
|
67
|
-
export type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
68
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
69
|
-
request: Request;
|
|
70
|
-
response: Response;
|
|
71
|
-
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
72
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
73
|
-
error: undefined;
|
|
74
|
-
} | {
|
|
75
|
-
data: undefined;
|
|
76
|
-
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
77
|
-
}) & {
|
|
78
|
-
request: Request;
|
|
79
|
-
response: Response;
|
|
80
|
-
}>;
|
|
81
|
-
export interface ClientOptions {
|
|
82
|
-
baseUrl?: string;
|
|
83
|
-
responseStyle?: ResponseStyle;
|
|
84
|
-
throwOnError?: boolean;
|
|
85
|
-
}
|
|
86
|
-
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
87
|
-
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
88
|
-
type BuildUrlFn = <TData extends {
|
|
89
|
-
body?: unknown;
|
|
90
|
-
path?: Record<string, unknown>;
|
|
91
|
-
query?: Record<string, unknown>;
|
|
92
|
-
url: string;
|
|
93
|
-
}>(options: Pick<TData, 'url'> & Options<TData>) => string;
|
|
94
|
-
export type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {
|
|
95
|
-
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* The `createClientConfig()` function will be called on client initialization
|
|
99
|
-
* and the returned object will become the client's initial configuration.
|
|
100
|
-
*
|
|
101
|
-
* You may want to initialize your client this way instead of calling
|
|
102
|
-
* `setConfig()`. This is useful for example if you're using Next.js
|
|
103
|
-
* to ensure your client always has the correct values.
|
|
104
|
-
*/
|
|
105
|
-
export type CreateClientConfig<T extends ClientOptions = ClientOptions> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
|
106
|
-
export interface TDataShape {
|
|
107
|
-
body?: unknown;
|
|
108
|
-
headers?: unknown;
|
|
109
|
-
path?: unknown;
|
|
110
|
-
query?: unknown;
|
|
111
|
-
url: string;
|
|
112
|
-
}
|
|
113
|
-
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
114
|
-
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;
|
|
115
|
-
export type OptionsLegacyParser<TData = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = TData extends {
|
|
116
|
-
body?: any;
|
|
117
|
-
} ? TData extends {
|
|
118
|
-
headers?: any;
|
|
119
|
-
} ? OmitKeys<RequestOptions<TResponseStyle, ThrowOnError>, 'body' | 'headers' | 'url'> & TData : OmitKeys<RequestOptions<TResponseStyle, ThrowOnError>, 'body' | 'url'> & TData & Pick<RequestOptions<TResponseStyle, ThrowOnError>, 'headers'> : TData extends {
|
|
120
|
-
headers?: any;
|
|
121
|
-
} ? OmitKeys<RequestOptions<TResponseStyle, ThrowOnError>, 'headers' | 'url'> & TData & Pick<RequestOptions<TResponseStyle, ThrowOnError>, 'body'> : OmitKeys<RequestOptions<TResponseStyle, ThrowOnError>, 'url'> & TData;
|
|
122
|
-
export {};
|
|
123
|
-
//# sourceMappingURL=types.gen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/client/types.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EACV,MAAM,IAAI,UAAU,EACpB,MAAM,IAAI,UAAU,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,QAAQ,IAC7C,KAAK,SAAS;IAAE,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,GAC5B,KAAK,SAAS;IAAE,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,GAC7B,QAAQ,CACN,cAAc,CAAC,cAAc,EAAE,YAAY,CAAC,EAC5C,MAAM,GAAG,SAAS,GAAG,KAAK,CAC3B,GACC,KAAK,GACP,QAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,GACpE,KAAK,GACL,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,SAAS,CAAC,GACjE,KAAK,SAAS;IAAE,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,GAC7B,QAAQ,CACN,cAAc,CAAC,cAAc,EAAE,YAAY,CAAC,EAC5C,SAAS,GAAG,KAAK,CAClB,GACC,KAAK,GACL,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,GAC5D,QAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../../../../src/generated/cart/client/types.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { QuerySerializer, QuerySerializerOptions } from '../core/bodySerializer.gen';
|
|
2
|
-
import type { Client, ClientOptions, Config, RequestOptions } from './types.gen';
|
|
3
|
-
export declare const createQuerySerializer: <T = unknown>({ allowReserved, array, object, }?: QuerySerializerOptions) => (queryParams: T) => string;
|
|
4
|
-
/**
|
|
5
|
-
* Infers parseAs value from provided Content-Type header.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getParseAs: (contentType: string | null) => Exclude<Config["parseAs"], "auto">;
|
|
8
|
-
export declare const setAuthParams: ({ security, ...options }: Pick<Required<RequestOptions>, "security"> & Pick<RequestOptions, "auth" | "query"> & {
|
|
9
|
-
headers: Headers;
|
|
10
|
-
}) => Promise<void>;
|
|
11
|
-
export declare const buildUrl: Client['buildUrl'];
|
|
12
|
-
export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
|
|
13
|
-
baseUrl?: string;
|
|
14
|
-
path?: Record<string, unknown>;
|
|
15
|
-
query?: Record<string, unknown>;
|
|
16
|
-
querySerializer: QuerySerializer;
|
|
17
|
-
url: string;
|
|
18
|
-
}) => string;
|
|
19
|
-
export declare const mergeConfigs: (a: Config, b: Config) => Config;
|
|
20
|
-
export declare const mergeHeaders: (...headers: Array<Required<Config>["headers"] | undefined>) => Headers;
|
|
21
|
-
type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
|
|
22
|
-
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
23
|
-
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
24
|
-
declare class Interceptors<Interceptor> {
|
|
25
|
-
_fns: (Interceptor | null)[];
|
|
26
|
-
constructor();
|
|
27
|
-
clear(): void;
|
|
28
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
29
|
-
exists(id: number | Interceptor): boolean;
|
|
30
|
-
eject(id: number | Interceptor): void;
|
|
31
|
-
update(id: number | Interceptor, fn: Interceptor): number | false | Interceptor;
|
|
32
|
-
use(fn: Interceptor): number;
|
|
33
|
-
}
|
|
34
|
-
export interface Middleware<Req, Res, Err, Options> {
|
|
35
|
-
error: Pick<Interceptors<ErrInterceptor<Err, Res, Req, Options>>, 'eject' | 'use'>;
|
|
36
|
-
request: Pick<Interceptors<ReqInterceptor<Req, Options>>, 'eject' | 'use'>;
|
|
37
|
-
response: Pick<Interceptors<ResInterceptor<Res, Req, Options>>, 'eject' | 'use'>;
|
|
38
|
-
}
|
|
39
|
-
export declare const createInterceptors: <Req, Res, Err, Options>() => {
|
|
40
|
-
error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
|
|
41
|
-
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
42
|
-
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
43
|
-
};
|
|
44
|
-
export declare const createConfig: <T extends ClientOptions = ClientOptions>(override?: Config<Omit<ClientOptions, keyof T> & T>) => Config<Omit<ClientOptions, keyof T> & T>;
|
|
45
|
-
export {};
|
|
46
|
-
//# sourceMappingURL=utils.gen.d.ts.map
|