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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.gen.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/client/utils.gen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAmFjF,eAAO,MAAM,qBAAqB,GAAI,CAAC,GAAG,OAAO,EAAE,oCAIhD,sBAA2B,mBACU,CAAC,WA2CxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GACrB,aAAa,MAAM,GAAG,IAAI,KACzB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAqCnC,CAAC;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G,CAAC,CAMxC,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js
DELETED
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { getAuthToken } from '../core/auth.gen';
|
|
3
|
-
import { jsonBodySerializer } from '../core/bodySerializer.gen';
|
|
4
|
-
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from '../core/pathSerializer.gen';
|
|
5
|
-
const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
6
|
-
const defaultPathSerializer = ({ path, url: _url }) => {
|
|
7
|
-
let url = _url;
|
|
8
|
-
const matches = _url.match(PATH_PARAM_RE);
|
|
9
|
-
if (matches) {
|
|
10
|
-
for (const match of matches) {
|
|
11
|
-
let explode = false;
|
|
12
|
-
let name = match.substring(1, match.length - 1);
|
|
13
|
-
let style = 'simple';
|
|
14
|
-
if (name.endsWith('*')) {
|
|
15
|
-
explode = true;
|
|
16
|
-
name = name.substring(0, name.length - 1);
|
|
17
|
-
}
|
|
18
|
-
if (name.startsWith('.')) {
|
|
19
|
-
name = name.substring(1);
|
|
20
|
-
style = 'label';
|
|
21
|
-
}
|
|
22
|
-
else if (name.startsWith(';')) {
|
|
23
|
-
name = name.substring(1);
|
|
24
|
-
style = 'matrix';
|
|
25
|
-
}
|
|
26
|
-
const value = path[name];
|
|
27
|
-
if (value === undefined || value === null) {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
if (Array.isArray(value)) {
|
|
31
|
-
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (typeof value === 'object') {
|
|
35
|
-
url = url.replace(match, serializeObjectParam({
|
|
36
|
-
explode,
|
|
37
|
-
name,
|
|
38
|
-
style,
|
|
39
|
-
value: value,
|
|
40
|
-
valueOnly: true,
|
|
41
|
-
}));
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
if (style === 'matrix') {
|
|
45
|
-
url = url.replace(match, `;${serializePrimitiveParam({
|
|
46
|
-
name,
|
|
47
|
-
value: value,
|
|
48
|
-
})}`);
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
|
|
52
|
-
url = url.replace(match, replaceValue);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return url;
|
|
56
|
-
};
|
|
57
|
-
export const createQuerySerializer = ({ allowReserved, array, object, } = {}) => {
|
|
58
|
-
const querySerializer = (queryParams) => {
|
|
59
|
-
const search = [];
|
|
60
|
-
if (queryParams && typeof queryParams === 'object') {
|
|
61
|
-
for (const name in queryParams) {
|
|
62
|
-
const value = queryParams[name];
|
|
63
|
-
if (value === undefined || value === null) {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
if (Array.isArray(value)) {
|
|
67
|
-
const serializedArray = serializeArrayParam({
|
|
68
|
-
allowReserved,
|
|
69
|
-
explode: true,
|
|
70
|
-
name,
|
|
71
|
-
style: 'form',
|
|
72
|
-
value,
|
|
73
|
-
...array,
|
|
74
|
-
});
|
|
75
|
-
if (serializedArray)
|
|
76
|
-
search.push(serializedArray);
|
|
77
|
-
}
|
|
78
|
-
else if (typeof value === 'object') {
|
|
79
|
-
const serializedObject = serializeObjectParam({
|
|
80
|
-
allowReserved,
|
|
81
|
-
explode: true,
|
|
82
|
-
name,
|
|
83
|
-
style: 'deepObject',
|
|
84
|
-
value: value,
|
|
85
|
-
...object,
|
|
86
|
-
});
|
|
87
|
-
if (serializedObject)
|
|
88
|
-
search.push(serializedObject);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
const serializedPrimitive = serializePrimitiveParam({
|
|
92
|
-
allowReserved,
|
|
93
|
-
name,
|
|
94
|
-
value: value,
|
|
95
|
-
});
|
|
96
|
-
if (serializedPrimitive)
|
|
97
|
-
search.push(serializedPrimitive);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return search.join('&');
|
|
102
|
-
};
|
|
103
|
-
return querySerializer;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Infers parseAs value from provided Content-Type header.
|
|
107
|
-
*/
|
|
108
|
-
export const getParseAs = (contentType) => {
|
|
109
|
-
if (!contentType) {
|
|
110
|
-
// If no Content-Type header is provided, the best we can do is return the raw response body,
|
|
111
|
-
// which is effectively the same as the 'stream' option.
|
|
112
|
-
return 'stream';
|
|
113
|
-
}
|
|
114
|
-
const cleanContent = contentType.split(';')[0]?.trim();
|
|
115
|
-
if (!cleanContent) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (cleanContent.startsWith('application/json') ||
|
|
119
|
-
cleanContent.endsWith('+json')) {
|
|
120
|
-
return 'json';
|
|
121
|
-
}
|
|
122
|
-
if (cleanContent === 'multipart/form-data') {
|
|
123
|
-
return 'formData';
|
|
124
|
-
}
|
|
125
|
-
if (['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))) {
|
|
126
|
-
return 'blob';
|
|
127
|
-
}
|
|
128
|
-
if (cleanContent.startsWith('text/')) {
|
|
129
|
-
return 'text';
|
|
130
|
-
}
|
|
131
|
-
return;
|
|
132
|
-
};
|
|
133
|
-
export const setAuthParams = async ({ security, ...options }) => {
|
|
134
|
-
for (const auth of security) {
|
|
135
|
-
const token = await getAuthToken(auth, options.auth);
|
|
136
|
-
if (!token) {
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
const name = auth.name ?? 'Authorization';
|
|
140
|
-
switch (auth.in) {
|
|
141
|
-
case 'query':
|
|
142
|
-
if (!options.query) {
|
|
143
|
-
options.query = {};
|
|
144
|
-
}
|
|
145
|
-
options.query[name] = token;
|
|
146
|
-
break;
|
|
147
|
-
case 'cookie':
|
|
148
|
-
options.headers.append('Cookie', `${name}=${token}`);
|
|
149
|
-
break;
|
|
150
|
-
case 'header':
|
|
151
|
-
default:
|
|
152
|
-
options.headers.set(name, token);
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
export const buildUrl = (options) => {
|
|
159
|
-
const url = getUrl({
|
|
160
|
-
baseUrl: options.baseUrl,
|
|
161
|
-
path: options.path,
|
|
162
|
-
query: options.query,
|
|
163
|
-
querySerializer: typeof options.querySerializer === 'function'
|
|
164
|
-
? options.querySerializer
|
|
165
|
-
: createQuerySerializer(options.querySerializer),
|
|
166
|
-
url: options.url,
|
|
167
|
-
});
|
|
168
|
-
return url;
|
|
169
|
-
};
|
|
170
|
-
export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
|
|
171
|
-
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
172
|
-
let url = (baseUrl ?? '') + pathUrl;
|
|
173
|
-
if (path) {
|
|
174
|
-
url = defaultPathSerializer({ path, url });
|
|
175
|
-
}
|
|
176
|
-
let search = query ? querySerializer(query) : '';
|
|
177
|
-
if (search.startsWith('?')) {
|
|
178
|
-
search = search.substring(1);
|
|
179
|
-
}
|
|
180
|
-
if (search) {
|
|
181
|
-
url += `?${search}`;
|
|
182
|
-
}
|
|
183
|
-
return url;
|
|
184
|
-
};
|
|
185
|
-
export const mergeConfigs = (a, b) => {
|
|
186
|
-
const config = { ...a, ...b };
|
|
187
|
-
if (config.baseUrl?.endsWith('/')) {
|
|
188
|
-
config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
189
|
-
}
|
|
190
|
-
config.headers = mergeHeaders(a.headers, b.headers);
|
|
191
|
-
return config;
|
|
192
|
-
};
|
|
193
|
-
export const mergeHeaders = (...headers) => {
|
|
194
|
-
const mergedHeaders = new Headers();
|
|
195
|
-
for (const header of headers) {
|
|
196
|
-
if (!header || typeof header !== 'object') {
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
const iterator = header instanceof Headers ? header.entries() : Object.entries(header);
|
|
200
|
-
for (const [key, value] of iterator) {
|
|
201
|
-
if (value === null) {
|
|
202
|
-
mergedHeaders.delete(key);
|
|
203
|
-
}
|
|
204
|
-
else if (Array.isArray(value)) {
|
|
205
|
-
for (const v of value) {
|
|
206
|
-
mergedHeaders.append(key, v);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
else if (value !== undefined) {
|
|
210
|
-
// assume object headers are meant to be JSON stringified, i.e. their
|
|
211
|
-
// content value in OpenAPI specification is 'application/json'
|
|
212
|
-
mergedHeaders.set(key, typeof value === 'object' ? JSON.stringify(value) : value);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
return mergedHeaders;
|
|
217
|
-
};
|
|
218
|
-
class Interceptors {
|
|
219
|
-
constructor() {
|
|
220
|
-
this._fns = [];
|
|
221
|
-
}
|
|
222
|
-
clear() {
|
|
223
|
-
this._fns = [];
|
|
224
|
-
}
|
|
225
|
-
getInterceptorIndex(id) {
|
|
226
|
-
if (typeof id === 'number') {
|
|
227
|
-
return this._fns[id] ? id : -1;
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
return this._fns.indexOf(id);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
exists(id) {
|
|
234
|
-
const index = this.getInterceptorIndex(id);
|
|
235
|
-
return !!this._fns[index];
|
|
236
|
-
}
|
|
237
|
-
eject(id) {
|
|
238
|
-
const index = this.getInterceptorIndex(id);
|
|
239
|
-
if (this._fns[index]) {
|
|
240
|
-
this._fns[index] = null;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
update(id, fn) {
|
|
244
|
-
const index = this.getInterceptorIndex(id);
|
|
245
|
-
if (this._fns[index]) {
|
|
246
|
-
this._fns[index] = fn;
|
|
247
|
-
return id;
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
use(fn) {
|
|
254
|
-
this._fns = [...this._fns, fn];
|
|
255
|
-
return this._fns.length - 1;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
// do not add `Middleware` as return type so we can use _fns internally
|
|
259
|
-
export const createInterceptors = () => ({
|
|
260
|
-
error: new Interceptors(),
|
|
261
|
-
request: new Interceptors(),
|
|
262
|
-
response: new Interceptors(),
|
|
263
|
-
});
|
|
264
|
-
const defaultQuerySerializer = createQuerySerializer({
|
|
265
|
-
allowReserved: false,
|
|
266
|
-
array: {
|
|
267
|
-
explode: true,
|
|
268
|
-
style: 'form',
|
|
269
|
-
},
|
|
270
|
-
object: {
|
|
271
|
-
explode: true,
|
|
272
|
-
style: 'deepObject',
|
|
273
|
-
},
|
|
274
|
-
});
|
|
275
|
-
const defaultHeaders = {
|
|
276
|
-
'Content-Type': 'application/json',
|
|
277
|
-
};
|
|
278
|
-
export const createConfig = (override = {}) => ({
|
|
279
|
-
...jsonBodySerializer,
|
|
280
|
-
headers: defaultHeaders,
|
|
281
|
-
parseAs: 'auto',
|
|
282
|
-
querySerializer: defaultQuerySerializer,
|
|
283
|
-
...override,
|
|
284
|
-
});
|
|
285
|
-
//# sourceMappingURL=utils.gen.js.map
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.gen.js","sourceRoot":"","sources":["../../../../src/generated/cart/client/utils.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAKhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AAQpC,MAAM,aAAa,GAAG,aAAa,CAAC;AAMpC,MAAM,qBAAqB,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAkB,EAAE,EAAE;IACpE,IA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,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,WAAqD,EAAE,EACb,EAAE,CAAC,CAAC;IAC9C,GAAG,kBAAkB;IACrB,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,sBAAsB;IACvC,GAAG,QAAQ;CACZ,CAAC,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ClientOptions } from './types.gen';
|
|
2
|
-
import { type Config, type ClientOptions as DefaultClientOptions } from './client';
|
|
3
|
-
/**
|
|
4
|
-
* The `createClientConfig()` function will be called on client initialization
|
|
5
|
-
* and the returned object will become the client's initial configuration.
|
|
6
|
-
*
|
|
7
|
-
* You may want to initialize your client this way instead of calling
|
|
8
|
-
* `setConfig()`. This is useful for example if you're using Next.js
|
|
9
|
-
* to ensure your client always has the correct values.
|
|
10
|
-
*/
|
|
11
|
-
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
|
|
12
|
-
export declare const client: import("./client").Client;
|
|
13
|
-
//# sourceMappingURL=client.gen.d.ts.map
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.d.ts","sourceRoot":"","sources":["../../../src/generated/cart/client.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,IAAI,oBAAoB,EAA8B,MAAM,UAAU,CAAC;AAE/G;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,oBAAoB,GAAG,aAAa,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,oBAAoB,GAAG,CAAC,CAAC,KAAK,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC;AAE7K,eAAO,MAAM,MAAM,2BAEhB,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.js","sourceRoot":"","sources":["../../../src/generated/cart/client.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAGrD,OAAO,EAA2D,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAY/G,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,YAAY,CAAgB;IAC3D,OAAO,EAAE,uBAAuB;CACnC,CAAC,CAAC,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type AuthToken = string | undefined;
|
|
2
|
-
export interface Auth {
|
|
3
|
-
/**
|
|
4
|
-
* Which part of the request do we use to send the auth?
|
|
5
|
-
*
|
|
6
|
-
* @default 'header'
|
|
7
|
-
*/
|
|
8
|
-
in?: 'header' | 'query' | 'cookie';
|
|
9
|
-
/**
|
|
10
|
-
* Header or query parameter name.
|
|
11
|
-
*
|
|
12
|
-
* @default 'Authorization'
|
|
13
|
-
*/
|
|
14
|
-
name?: string;
|
|
15
|
-
scheme?: 'basic' | 'bearer';
|
|
16
|
-
type: 'apiKey' | 'http';
|
|
17
|
-
}
|
|
18
|
-
export declare const getAuthToken: (auth: Auth, callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken) => Promise<string | undefined>;
|
|
19
|
-
//# sourceMappingURL=auth.gen.d.ts.map
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.gen.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/core/auth.gen.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,IAAI;IACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,GACvB,MAAM,IAAI,EACV,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,KACrE,OAAO,CAAC,MAAM,GAAG,SAAS,CAiB5B,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export const getAuthToken = async (auth, callback) => {
|
|
3
|
-
const token = typeof callback === 'function' ? await callback(auth) : callback;
|
|
4
|
-
if (!token) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
if (auth.scheme === 'bearer') {
|
|
8
|
-
return `Bearer ${token}`;
|
|
9
|
-
}
|
|
10
|
-
if (auth.scheme === 'basic') {
|
|
11
|
-
return `Basic ${btoa(token)}`;
|
|
12
|
-
}
|
|
13
|
-
return token;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=auth.gen.js.map
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.gen.js","sourceRoot":"","sources":["../../../../src/generated/cart/core/auth.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAqBrD,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,IAAU,EACV,QAAsE,EACzC,EAAE;IAC/B,MAAM,KAAK,GACT,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEnE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;IACT,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,UAAU,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC5B,OAAO,SAAS,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';
|
|
2
|
-
export type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
3
|
-
export type BodySerializer = (body: any) => any;
|
|
4
|
-
export interface QuerySerializerOptions {
|
|
5
|
-
allowReserved?: boolean;
|
|
6
|
-
array?: SerializerOptions<ArrayStyle>;
|
|
7
|
-
object?: SerializerOptions<ObjectStyle>;
|
|
8
|
-
}
|
|
9
|
-
export declare const formDataBodySerializer: {
|
|
10
|
-
bodySerializer: <T extends Record<string, any> | Array<Record<string, any>>>(body: T) => FormData;
|
|
11
|
-
};
|
|
12
|
-
export declare const jsonBodySerializer: {
|
|
13
|
-
bodySerializer: <T>(body: T) => string;
|
|
14
|
-
};
|
|
15
|
-
export declare const urlSearchParamsBodySerializer: {
|
|
16
|
-
bodySerializer: <T extends Record<string, any> | Array<Record<string, any>>>(body: T) => string;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=bodySerializer.gen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bodySerializer.gen.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/core/bodySerializer.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAEzE,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;CACzC;AA4BD,eAAO,MAAM,sBAAsB;qBAChB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QACnE,CAAC,KACN,QAAQ;CAgBZ,CAAC;AAEF,eAAO,MAAM,kBAAkB;qBACZ,CAAC,QAAQ,CAAC,KAAG,MAAM;CAIrC,CAAC;AAEF,eAAO,MAAM,6BAA6B;qBACvB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QACnE,CAAC,KACN,MAAM;CAgBV,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
const serializeFormDataPair = (data, key, value) => {
|
|
3
|
-
if (typeof value === 'string' || value instanceof Blob) {
|
|
4
|
-
data.append(key, value);
|
|
5
|
-
}
|
|
6
|
-
else if (value instanceof Date) {
|
|
7
|
-
data.append(key, value.toISOString());
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
data.append(key, JSON.stringify(value));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const serializeUrlSearchParamsPair = (data, key, value) => {
|
|
14
|
-
if (typeof value === 'string') {
|
|
15
|
-
data.append(key, value);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
data.append(key, JSON.stringify(value));
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
export const formDataBodySerializer = {
|
|
22
|
-
bodySerializer: (body) => {
|
|
23
|
-
const data = new FormData();
|
|
24
|
-
Object.entries(body).forEach(([key, value]) => {
|
|
25
|
-
if (value === undefined || value === null) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (Array.isArray(value)) {
|
|
29
|
-
value.forEach((v) => serializeFormDataPair(data, key, v));
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
serializeFormDataPair(data, key, value);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
return data;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
export const jsonBodySerializer = {
|
|
39
|
-
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === 'bigint' ? value.toString() : value),
|
|
40
|
-
};
|
|
41
|
-
export const urlSearchParamsBodySerializer = {
|
|
42
|
-
bodySerializer: (body) => {
|
|
43
|
-
const data = new URLSearchParams();
|
|
44
|
-
Object.entries(body).forEach(([key, value]) => {
|
|
45
|
-
if (value === undefined || value === null) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (Array.isArray(value)) {
|
|
49
|
-
value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
serializeUrlSearchParamsPair(data, key, value);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
return data.toString();
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=bodySerializer.gen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bodySerializer.gen.js","sourceRoot":"","sources":["../../../../src/generated/cart/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AAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;CACF,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
type Slot = 'body' | 'headers' | 'path' | 'query';
|
|
2
|
-
export type Field = {
|
|
3
|
-
in: Exclude<Slot, 'body'>;
|
|
4
|
-
/**
|
|
5
|
-
* Field name. This is the name we want the user to see and use.
|
|
6
|
-
*/
|
|
7
|
-
key: string;
|
|
8
|
-
/**
|
|
9
|
-
* Field mapped name. This is the name we want to use in the request.
|
|
10
|
-
* If omitted, we use the same value as `key`.
|
|
11
|
-
*/
|
|
12
|
-
map?: string;
|
|
13
|
-
} | {
|
|
14
|
-
in: Extract<Slot, 'body'>;
|
|
15
|
-
/**
|
|
16
|
-
* Key isn't required for bodies.
|
|
17
|
-
*/
|
|
18
|
-
key?: string;
|
|
19
|
-
map?: string;
|
|
20
|
-
};
|
|
21
|
-
export interface Fields {
|
|
22
|
-
allowExtra?: Partial<Record<Slot, boolean>>;
|
|
23
|
-
args?: ReadonlyArray<Field>;
|
|
24
|
-
}
|
|
25
|
-
export type FieldsConfig = ReadonlyArray<Field | Fields>;
|
|
26
|
-
interface Params {
|
|
27
|
-
body: unknown;
|
|
28
|
-
headers: Record<string, unknown>;
|
|
29
|
-
path: Record<string, unknown>;
|
|
30
|
-
query: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
export declare const buildClientParams: (args: ReadonlyArray<unknown>, fields: FieldsConfig) => Params;
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=params.gen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"params.gen.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/core/params.gen.ts"],"names":[],"mappings":"AAEA,KAAK,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,KAAK,GACb;IACE,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACD;IACE,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,WAAW,MAAM;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5C,IAAI,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC;AAuCzD,UAAU,MAAM;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAUD,eAAO,MAAM,iBAAiB,GAC5B,MAAM,aAAa,CAAC,OAAO,CAAC,EAC5B,QAAQ,YAAY,WAiErB,CAAC"}
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
const extraPrefixesMap = {
|
|
3
|
-
$body_: 'body',
|
|
4
|
-
$headers_: 'headers',
|
|
5
|
-
$path_: 'path',
|
|
6
|
-
$query_: 'query',
|
|
7
|
-
};
|
|
8
|
-
const extraPrefixes = Object.entries(extraPrefixesMap);
|
|
9
|
-
const buildKeyMap = (fields, map) => {
|
|
10
|
-
if (!map) {
|
|
11
|
-
map = new Map();
|
|
12
|
-
}
|
|
13
|
-
for (const config of fields) {
|
|
14
|
-
if ('in' in config) {
|
|
15
|
-
if (config.key) {
|
|
16
|
-
map.set(config.key, {
|
|
17
|
-
in: config.in,
|
|
18
|
-
map: config.map,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
else if (config.args) {
|
|
23
|
-
buildKeyMap(config.args, map);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return map;
|
|
27
|
-
};
|
|
28
|
-
const stripEmptySlots = (params) => {
|
|
29
|
-
for (const [slot, value] of Object.entries(params)) {
|
|
30
|
-
if (value && typeof value === 'object' && !Object.keys(value).length) {
|
|
31
|
-
delete params[slot];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
export const buildClientParams = (args, fields) => {
|
|
36
|
-
const params = {
|
|
37
|
-
body: {},
|
|
38
|
-
headers: {},
|
|
39
|
-
path: {},
|
|
40
|
-
query: {},
|
|
41
|
-
};
|
|
42
|
-
const map = buildKeyMap(fields);
|
|
43
|
-
let config;
|
|
44
|
-
for (const [index, arg] of args.entries()) {
|
|
45
|
-
if (fields[index]) {
|
|
46
|
-
config = fields[index];
|
|
47
|
-
}
|
|
48
|
-
if (!config) {
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
if ('in' in config) {
|
|
52
|
-
if (config.key) {
|
|
53
|
-
const field = map.get(config.key);
|
|
54
|
-
const name = field.map || config.key;
|
|
55
|
-
params[field.in][name] = arg;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
params.body = arg;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
for (const [key, value] of Object.entries(arg ?? {})) {
|
|
63
|
-
const field = map.get(key);
|
|
64
|
-
if (field) {
|
|
65
|
-
const name = field.map || key;
|
|
66
|
-
params[field.in][name] = value;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
|
|
70
|
-
if (extra) {
|
|
71
|
-
const [prefix, slot] = extra;
|
|
72
|
-
params[slot][key.slice(prefix.length)] = value;
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
for (const [slot, allowed] of Object.entries(config.allowExtra ?? {})) {
|
|
76
|
-
if (allowed) {
|
|
77
|
-
params[slot][key] = value;
|
|
78
|
-
break;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
stripEmptySlots(params);
|
|
87
|
-
return params;
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=params.gen.js.map
|
package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"params.gen.js","sourceRoot":"","sources":["../../../../src/generated/cart/core/params.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAiCrD,MAAM,gBAAgB,GAAyB;IAC7C,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,SAAS;IACpB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;CACjB,CAAC;AACF,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAUvD,MAAM,WAAW,GAAG,CAAC,MAAoB,EAAE,GAAY,EAAU,EAAE;IACjE,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IAClB,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;YACnB,IAAI,MAAM,CAAC,GAAG,EAAE,CAAC;gBACf,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;oBAClB,EAAE,EAAE,MAA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,OAAO,EAAE,CAAC;gCACX,MAAM,CAAC,IAAY,CAA6B,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;gCAC/D,MAAM;4BACR,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,eAAe,CAAC,MAAM,CAAC,CAAC;IAExB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
interface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {
|
|
2
|
-
}
|
|
3
|
-
interface SerializePrimitiveOptions {
|
|
4
|
-
allowReserved?: boolean;
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
export interface SerializerOptions<T> {
|
|
8
|
-
/**
|
|
9
|
-
* @default true
|
|
10
|
-
*/
|
|
11
|
-
explode: boolean;
|
|
12
|
-
style: T;
|
|
13
|
-
}
|
|
14
|
-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
15
|
-
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
|
|
16
|
-
type MatrixStyle = 'label' | 'matrix' | 'simple';
|
|
17
|
-
export type ObjectStyle = 'form' | 'deepObject';
|
|
18
|
-
type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;
|
|
19
|
-
interface SerializePrimitiveParam extends SerializePrimitiveOptions {
|
|
20
|
-
value: string;
|
|
21
|
-
}
|
|
22
|
-
export declare const separatorArrayExplode: (style: ArraySeparatorStyle) => "." | ";" | "," | "&";
|
|
23
|
-
export declare const separatorArrayNoExplode: (style: ArraySeparatorStyle) => "," | "|" | "%20";
|
|
24
|
-
export declare const separatorObjectExplode: (style: ObjectSeparatorStyle) => "." | ";" | "," | "&";
|
|
25
|
-
export declare const serializeArrayParam: ({ allowReserved, explode, name, style, value, }: SerializeOptions<ArraySeparatorStyle> & {
|
|
26
|
-
value: unknown[];
|
|
27
|
-
}) => string;
|
|
28
|
-
export declare const serializePrimitiveParam: ({ allowReserved, name, value, }: SerializePrimitiveParam) => string;
|
|
29
|
-
export declare const serializeObjectParam: ({ allowReserved, explode, name, style, value, valueOnly, }: SerializeOptions<ObjectSeparatorStyle> & {
|
|
30
|
-
value: Record<string, unknown> | Date;
|
|
31
|
-
valueOnly?: boolean;
|
|
32
|
-
}) => string;
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=pathSerializer.gen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pathSerializer.gen.d.ts","sourceRoot":"","sources":["../../../../src/generated/cart/core/pathSerializer.gen.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB,CAAC,CAAC,CAC1B,SAAQ,yBAAyB,EAC/B,iBAAiB,CAAC,CAAC,CAAC;CAAG;AAE3B,UAAU,yBAAyB;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,WAAW,CAAC;AAC3D,KAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,YAAY,CAAC;AAChD,KAAK,oBAAoB,GAAG,WAAW,GAAG,WAAW,CAAC;AAEtD,UAAU,uBAAwB,SAAQ,yBAAyB;IACjE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,qBAAqB,GAAI,OAAO,mBAAmB,0BAW/D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,mBAAmB,sBAWjE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,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