create-auto-app 0.2.1 → 0.2.3
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 +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/shopping-app/auto.config.ts +134 -9
- package/templates/shopping-app/client/auto-configure.ts +1 -1
- package/templates/shopping-app/client/package.json +1 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-build.log +4 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-format.log +12 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-lint.log +4 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-test.log +12 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-type-check.log +5 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/CHANGELOG.md +134 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts +23 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js +41 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js.map +1 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts +2 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js +2 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/eslint.config.ts +12 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/eslint +21 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/jiti +21 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/msw +21 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsc +21 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsserver +21 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vite +21 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vitest +21 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/package.json +29 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/src/ai-integration.ts +76 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/src/index.ts +1 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/tsconfig.json +10 -0
- package/templates/shopping-app/example-integrations/ai-chat-completion/tsconfig.test.json +7 -0
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-build.log +4 -0
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-format.log +12 -0
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-lint.log +5 -0
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-test.log +12 -0
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-type-check.log +5 -0
- package/templates/shopping-app/example-integrations/cart/CHANGELOG.md +124 -0
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts +30 -0
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js +134 -0
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts +3 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js +149 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts +8 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js +6 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts +123 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js +3 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts +46 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js +285 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts +13 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js +6 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts +19 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js +15 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts +18 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js +58 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts +34 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js +89 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts +34 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js +115 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts +79 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js +3 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts +2 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js +3 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts +158 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js +3 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts +382 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js +68 -0
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/index.d.ts +2 -0
- package/templates/shopping-app/example-integrations/cart/dist/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart/dist/index.js +2 -0
- package/templates/shopping-app/example-integrations/cart/dist/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart/eslint.config.ts +12 -0
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/eslint +21 -0
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/jiti +21 -0
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/msw +21 -0
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsc +21 -0
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsserver +21 -0
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/vitest +21 -0
- package/templates/shopping-app/example-integrations/cart/package.json +31 -0
- package/templates/shopping-app/example-integrations/cart/src/cart-integration.ts +198 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/client.gen.ts +199 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/index.ts +25 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/types.gen.ts +232 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/utils.gen.ts +419 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/client.gen.ts +18 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/auth.gen.ts +42 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/bodySerializer.gen.ts +92 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/params.gen.ts +153 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/pathSerializer.gen.ts +181 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/types.gen.ts +120 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/index.ts +2 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/types.gen.ts +175 -0
- package/templates/shopping-app/example-integrations/cart/src/generated/cart/zod.gen.ts +78 -0
- package/templates/shopping-app/example-integrations/cart/src/index.ts +1 -0
- package/templates/shopping-app/example-integrations/cart/tsconfig.json +10 -0
- package/templates/shopping-app/example-integrations/cart/tsconfig.test.json +7 -0
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-build.log +4 -0
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-format.log +10 -0
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-lint.log +4 -0
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-test.log +12 -0
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-type-check.log +4 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts +18 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js +28 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts +4 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/index.js +49 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts +4 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js +261 -0
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js.map +1 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/nodemon +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/swagger-jsdoc +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-cwd +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-esm +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-script +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-transpile-only +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-script +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsc +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsserver +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsx +21 -0
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/vitest +21 -0
- package/templates/shopping-app/example-integrations/cart-api/package.json +49 -0
- package/templates/shopping-app/example-integrations/cart-api/src/data/cart.ts +45 -0
- package/templates/shopping-app/example-integrations/cart-api/src/index.ts +59 -0
- package/templates/shopping-app/example-integrations/cart-api/src/routes/cart.ts +289 -0
- package/templates/shopping-app/example-integrations/cart-api/tsconfig.json +9 -0
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-build.log +4 -0
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-format.log +12 -0
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-lint.log +5 -0
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-test.log +12 -0
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-type-check.log +5 -0
- package/templates/shopping-app/example-integrations/product-catalogue/CHANGELOG.md +124 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts +3 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js +149 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts +8 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js +6 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts +123 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js +3 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts +46 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js +285 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts +13 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js +6 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts +19 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js +15 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts +18 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js +58 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts +34 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js +89 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts +34 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js +115 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts +79 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js +3 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts +2 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js +3 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts +115 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js +3 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts +206 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js +53 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts +2 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js +2 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts +32 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js +163 -0
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/eslint.config.ts +12 -0
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/eslint +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/jiti +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/msw +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsc +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsserver +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/vitest +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue/package.json +31 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/client.gen.ts +199 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/index.ts +25 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/types.gen.ts +232 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/utils.gen.ts +419 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client.gen.ts +18 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/auth.gen.ts +42 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/bodySerializer.gen.ts +92 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/params.gen.ts +153 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/pathSerializer.gen.ts +181 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/types.gen.ts +120 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/index.ts +2 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/types.gen.ts +133 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/zod.gen.ts +62 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/index.ts +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue/src/product-catalogue-integration.ts +225 -0
- package/templates/shopping-app/example-integrations/product-catalogue/tsconfig.json +10 -0
- package/templates/shopping-app/example-integrations/product-catalogue/tsconfig.test.json +7 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-build.log +4 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-format.log +10 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-lint.log +5 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-test.log +13 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-type-check.log +5 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts +10 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js +75 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts +4 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js +49 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts +4 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js +170 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js.map +1 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/nodemon +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/swagger-jsdoc +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-cwd +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-esm +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-script +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-transpile-only +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-script +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsc +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsserver +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsx +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/vitest +21 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/package.json +51 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/src/data/products.ts +90 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/src/index.ts +59 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/src/routes/products.ts +181 -0
- package/templates/shopping-app/example-integrations/product-catalogue-api/tsconfig.json +9 -0
- package/templates/shopping-app/flows/shopping-assistant.flow.ts +1 -1
- package/templates/shopping-app/package.json +10 -6
- package/templates/shopping-app/server/package.json +1 -1
- package/templates/shopping-app/server/src/integrations/ai-integration.ts +1 -1
- package/templates/shopping-app/server/src/integrations/cart-integration.ts +1 -1
- package/templates/shopping-app/server/src/integrations/product-catalogue-integration.ts +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
export const zProductCatalogItem = z.object({
|
|
6
|
+
productId: z.string(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
category: z.string(),
|
|
9
|
+
price: z.number(),
|
|
10
|
+
tags: z.array(z.string()),
|
|
11
|
+
imageUrl: z.string()
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const zGetApiProductsData = z.object({
|
|
15
|
+
body: z.optional(z.never()),
|
|
16
|
+
path: z.optional(z.never()),
|
|
17
|
+
query: z.optional(z.never())
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* List of all products
|
|
22
|
+
*/
|
|
23
|
+
export const zGetApiProductsResponse = z.array(zProductCatalogItem);
|
|
24
|
+
|
|
25
|
+
export const zGetApiProductsSearchData = z.object({
|
|
26
|
+
body: z.optional(z.never()),
|
|
27
|
+
path: z.optional(z.never()),
|
|
28
|
+
query: z.object({
|
|
29
|
+
q: z.string()
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* List of matching products
|
|
35
|
+
*/
|
|
36
|
+
export const zGetApiProductsSearchResponse = z.array(zProductCatalogItem);
|
|
37
|
+
|
|
38
|
+
export const zGetApiProductsCategoryByCategoryData = z.object({
|
|
39
|
+
body: z.optional(z.never()),
|
|
40
|
+
path: z.object({
|
|
41
|
+
category: z.string()
|
|
42
|
+
}),
|
|
43
|
+
query: z.optional(z.never())
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* List of products in the category
|
|
48
|
+
*/
|
|
49
|
+
export const zGetApiProductsCategoryByCategoryResponse = z.array(zProductCatalogItem);
|
|
50
|
+
|
|
51
|
+
export const zGetApiProductsByIdData = z.object({
|
|
52
|
+
body: z.optional(z.never()),
|
|
53
|
+
path: z.object({
|
|
54
|
+
id: z.string()
|
|
55
|
+
}),
|
|
56
|
+
query: z.optional(z.never())
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Product details
|
|
61
|
+
*/
|
|
62
|
+
export const zGetApiProductsByIdResponse = zProductCatalogItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './product-catalogue-integration';
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import type { State, Integration } from '@auto-engineer/flow';
|
|
2
|
+
import { registerTool, z } from '@auto-engineer/ai-gateway';
|
|
3
|
+
|
|
4
|
+
import { createClient } from './generated/product-catalog/client';
|
|
5
|
+
import type {
|
|
6
|
+
ProductCatalogItem,
|
|
7
|
+
GetApiProductsResponses,
|
|
8
|
+
GetApiProductsSearchResponses,
|
|
9
|
+
GetApiProductsSearchErrors,
|
|
10
|
+
GetApiProductsCategoryByCategoryResponses,
|
|
11
|
+
GetApiProductsByIdResponses,
|
|
12
|
+
GetApiProductsByIdErrors,
|
|
13
|
+
} from './generated/product-catalog';
|
|
14
|
+
import {
|
|
15
|
+
zGetApiProductsResponse,
|
|
16
|
+
zGetApiProductsSearchResponse,
|
|
17
|
+
zGetApiProductsCategoryByCategoryResponse,
|
|
18
|
+
zGetApiProductsByIdResponse,
|
|
19
|
+
} from './generated/product-catalog/zod.gen';
|
|
20
|
+
|
|
21
|
+
export type Product = ProductCatalogItem;
|
|
22
|
+
|
|
23
|
+
export type Products = State<'Products', { products: Product[] }>;
|
|
24
|
+
export type ProductsByCategory = State<'ProductsByCategory', { category: string; products: Product[] }>;
|
|
25
|
+
export type ProductSearchResults = State<'ProductSearchResults', { query: string; products: Product[] }>;
|
|
26
|
+
export type ProductDetails = State<'ProductDetails', { product: Product | null }>;
|
|
27
|
+
|
|
28
|
+
// ---------- Generated client instance ----------
|
|
29
|
+
const productClient = createClient({
|
|
30
|
+
baseUrl: 'http://localhost:3001',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// ---------- Integration facade ----------
|
|
34
|
+
type ProductCatalogQueries = {
|
|
35
|
+
Products: () => Promise<Products>;
|
|
36
|
+
ProductsByCategory: (params: { category: string }) => Promise<ProductsByCategory>;
|
|
37
|
+
ProductSearchResults: (params: { query: string }) => Promise<ProductSearchResults>;
|
|
38
|
+
ProductDetails: (params: { id: string }) => Promise<ProductDetails>;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const ProductCatalog: Integration<'product-catalog', ProductCatalogQueries> = {
|
|
42
|
+
__brand: 'Integration' as const,
|
|
43
|
+
type: 'product-catalog' as const,
|
|
44
|
+
name: 'product-catalog',
|
|
45
|
+
|
|
46
|
+
Queries: {
|
|
47
|
+
// GET /api/products
|
|
48
|
+
Products: async (): Promise<Products> => {
|
|
49
|
+
try {
|
|
50
|
+
const res = await productClient.get<GetApiProductsResponses, unknown, false>({
|
|
51
|
+
url: '/api/products',
|
|
52
|
+
});
|
|
53
|
+
if (res.error !== undefined) console.error('Failed to fetch products:', res.error);
|
|
54
|
+
return { type: 'Products', data: { products: (res.data as Product[]) ?? [] } };
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.error('Failed to fetch products:', err);
|
|
57
|
+
return { type: 'Products', data: { products: [] as Product[] } };
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
// GET /api/products/category/{category}
|
|
62
|
+
ProductsByCategory: async ({ category }): Promise<ProductsByCategory> => {
|
|
63
|
+
try {
|
|
64
|
+
const res = await productClient.get<GetApiProductsCategoryByCategoryResponses, unknown, false>({
|
|
65
|
+
url: '/api/products/category/{category}',
|
|
66
|
+
path: { category },
|
|
67
|
+
});
|
|
68
|
+
if (res.error !== undefined) console.error(`Category "${category}" error:`, res.error);
|
|
69
|
+
return { type: 'ProductsByCategory', data: { category, products: (res.data as Product[]) ?? [] } };
|
|
70
|
+
} catch (err) {
|
|
71
|
+
console.error(`Failed to fetch products for category ${category}:`, err);
|
|
72
|
+
return { type: 'ProductsByCategory', data: { category, products: [] as Product[] } };
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
// GET /api/products/search?q=...
|
|
77
|
+
ProductSearchResults: async ({ query }): Promise<ProductSearchResults> => {
|
|
78
|
+
try {
|
|
79
|
+
const res = await productClient.get<GetApiProductsSearchResponses, GetApiProductsSearchErrors, false>({
|
|
80
|
+
url: '/api/products/search',
|
|
81
|
+
query: { q: query },
|
|
82
|
+
});
|
|
83
|
+
if (res.error !== undefined) console.error(`Search "${query}" error:`, res.error);
|
|
84
|
+
return { type: 'ProductSearchResults', data: { query, products: (res.data as Product[]) ?? [] } };
|
|
85
|
+
} catch (err) {
|
|
86
|
+
console.error(`Failed to search products with query "${query}":`, err);
|
|
87
|
+
return { type: 'ProductSearchResults', data: { query, products: [] as Product[] } };
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// GET /api/products/{id}
|
|
92
|
+
ProductDetails: async ({ id }): Promise<ProductDetails> => {
|
|
93
|
+
try {
|
|
94
|
+
const res = await productClient.get<GetApiProductsByIdResponses, GetApiProductsByIdErrors, false>({
|
|
95
|
+
url: '/api/products/{id}',
|
|
96
|
+
path: { id },
|
|
97
|
+
});
|
|
98
|
+
if (res.response.status === 404 || res.error !== undefined) {
|
|
99
|
+
if (res.response.status !== 404) {
|
|
100
|
+
console.error(`Error fetching product "${id}":`, res.error);
|
|
101
|
+
}
|
|
102
|
+
return { type: 'ProductDetails', data: { product: null } };
|
|
103
|
+
}
|
|
104
|
+
return { type: 'ProductDetails', data: { product: res.data ?? null } };
|
|
105
|
+
} catch (err) {
|
|
106
|
+
console.error(`Failed to fetch product details for ID ${id}:`, err);
|
|
107
|
+
return { type: 'ProductDetails', data: { product: null } };
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// ---------- MCP tools ----------
|
|
114
|
+
|
|
115
|
+
// All products
|
|
116
|
+
registerTool<Record<string, unknown>>(
|
|
117
|
+
'PRODUCT_CATALOGUE_PRODUCTS',
|
|
118
|
+
{
|
|
119
|
+
title: 'Get All Products',
|
|
120
|
+
description: 'Fetches all products from the product catalog',
|
|
121
|
+
inputSchema: {},
|
|
122
|
+
schema: zGetApiProductsResponse,
|
|
123
|
+
schemaName: 'GetApiProductsResponse',
|
|
124
|
+
schemaDescription: 'Array of ProductCatalogItem',
|
|
125
|
+
},
|
|
126
|
+
async () => {
|
|
127
|
+
const queries = ProductCatalog.Queries as ProductCatalogQueries;
|
|
128
|
+
if (queries?.Products == null) {
|
|
129
|
+
return {
|
|
130
|
+
content: [{ type: 'text' as const, text: 'ProductCatalog.Queries.Products is not available' }],
|
|
131
|
+
isError: true,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const productsQuery = queries.Products;
|
|
135
|
+
const result = await productsQuery();
|
|
136
|
+
return { content: [{ type: 'text' as const, text: JSON.stringify(result.data.products, null, 2) }] };
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
// By category
|
|
141
|
+
interface ProductsByCategoryParams extends Record<string, unknown> {
|
|
142
|
+
category: string;
|
|
143
|
+
}
|
|
144
|
+
registerTool<ProductsByCategoryParams>(
|
|
145
|
+
'PRODUCT_CATALOGUE_PRODUCTS_BY_CATEGORY',
|
|
146
|
+
{
|
|
147
|
+
title: 'Get Products by Category',
|
|
148
|
+
description: 'Fetches products from a specific category',
|
|
149
|
+
inputSchema: { category: z.string().min(1, 'Category is required') },
|
|
150
|
+
schema: zGetApiProductsCategoryByCategoryResponse,
|
|
151
|
+
schemaName: 'GetApiProductsCategoryByCategoryResponse',
|
|
152
|
+
schemaDescription: 'Array of ProductCatalogItem',
|
|
153
|
+
},
|
|
154
|
+
async ({ category }) => {
|
|
155
|
+
const queries = ProductCatalog.Queries as ProductCatalogQueries;
|
|
156
|
+
if (queries?.ProductsByCategory == null) {
|
|
157
|
+
return {
|
|
158
|
+
content: [{ type: 'text' as const, text: 'ProductCatalog.Queries.ProductsByCategory is not available' }],
|
|
159
|
+
isError: true,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const categoryQuery = queries.ProductsByCategory;
|
|
163
|
+
const result = await categoryQuery({ category });
|
|
164
|
+
return { content: [{ type: 'text' as const, text: JSON.stringify(result.data.products, null, 2) }] };
|
|
165
|
+
},
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
// Search
|
|
169
|
+
interface ProductSearchParams extends Record<string, unknown> {
|
|
170
|
+
query: string;
|
|
171
|
+
}
|
|
172
|
+
registerTool<ProductSearchParams>(
|
|
173
|
+
'PRODUCT_CATALOGUE_SEARCH',
|
|
174
|
+
{
|
|
175
|
+
title: 'Search Products',
|
|
176
|
+
description: 'Search for products using a query string',
|
|
177
|
+
inputSchema: { query: z.string().min(1, 'Search query is required') },
|
|
178
|
+
schema: zGetApiProductsSearchResponse,
|
|
179
|
+
schemaName: 'GetApiProductsSearchResponse',
|
|
180
|
+
schemaDescription: 'Array of ProductCatalogItem',
|
|
181
|
+
},
|
|
182
|
+
async ({ query }) => {
|
|
183
|
+
const queries = ProductCatalog.Queries as ProductCatalogQueries;
|
|
184
|
+
if (queries?.ProductSearchResults == null) {
|
|
185
|
+
return {
|
|
186
|
+
content: [{ type: 'text' as const, text: 'ProductCatalog.Queries.ProductSearchResults is not available' }],
|
|
187
|
+
isError: true,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
const searchQuery = queries.ProductSearchResults;
|
|
191
|
+
const result = await searchQuery({ query });
|
|
192
|
+
return { content: [{ type: 'text' as const, text: JSON.stringify(result.data.products, null, 2) }] };
|
|
193
|
+
},
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
// Details
|
|
197
|
+
interface ProductDetailsParams extends Record<string, unknown> {
|
|
198
|
+
id: string;
|
|
199
|
+
}
|
|
200
|
+
registerTool<ProductDetailsParams>(
|
|
201
|
+
'PRODUCT_CATALOGUE_PRODUCT_DETAILS',
|
|
202
|
+
{
|
|
203
|
+
title: 'Get Product Details',
|
|
204
|
+
description: 'Fetches detailed information about a specific product',
|
|
205
|
+
inputSchema: { id: z.string().min(1, 'Product ID is required') },
|
|
206
|
+
schema: zGetApiProductsByIdResponse,
|
|
207
|
+
schemaName: 'GetApiProductsByIdResponse',
|
|
208
|
+
schemaDescription: 'Single ProductCatalogItem',
|
|
209
|
+
},
|
|
210
|
+
async ({ id }) => {
|
|
211
|
+
const queries = ProductCatalog.Queries as ProductCatalogQueries;
|
|
212
|
+
if (queries?.ProductDetails == null) {
|
|
213
|
+
return {
|
|
214
|
+
content: [{ type: 'text' as const, text: 'ProductCatalog.Queries.ProductDetails is not available' }],
|
|
215
|
+
isError: true,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const detailsQuery = queries.ProductDetails;
|
|
219
|
+
const result = await detailsQuery({ id });
|
|
220
|
+
if (result.data.product === null) {
|
|
221
|
+
return { content: [{ type: 'text' as const, text: `Product with ID "${id}" not found` }], isError: true };
|
|
222
|
+
}
|
|
223
|
+
return { content: [{ type: 'text' as const, text: JSON.stringify(result.data.product, null, 2) }] };
|
|
224
|
+
},
|
|
225
|
+
);
|
package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-format.log
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @examples/product-catalogue-service@0.0.1 format /Users/sam/WebstormProjects/top/auto-engineer/examples/product-catalogue-api
|
|
4
|
+
> prettier --write "**/*.{js,ts,json,md,yml,yaml}" --ignore-path ../../.prettierignore
|
|
5
|
+
|
|
6
|
+
package.json[2K[1G[90mpackage.json[39m 16ms (unchanged)
|
|
7
|
+
src/data/products.ts[2K[1G[90msrc/data/products.ts[39m 29ms (unchanged)
|
|
8
|
+
src/index.ts[2K[1G[90msrc/index.ts[39m 10ms (unchanged)
|
|
9
|
+
src/routes/products.ts[2K[1G[90msrc/routes/products.ts[39m 10ms (unchanged)
|
|
10
|
+
tsconfig.json[2K[1G[90mtsconfig.json[39m 1ms (unchanged)
|
package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-test.log
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @examples/product-catalogue-service@0.0.1 test /Users/sam/WebstormProjects/top/auto-engineer/examples/product-catalogue-api
|
|
4
|
+
> vitest run
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
[7m[1m[36m RUN [39m[22m[27m [36mv1.6.1[39m [90m/Users/sam/WebstormProjects/top/auto-engineer/examples/product-catalogue-api[39m
|
|
8
|
+
|
|
9
|
+
[31m[2minclude: [22m[33m**/*.specs.{js,ts}[39m[39m
|
|
10
|
+
[31m[2mexclude: [22m[33m**/.tmp/**[2m, [22m**/node_modules/**[2m, [22m**/dist/**[39m[39m
|
|
11
|
+
[31m[2mwatch exclude: [22m[33m**/node_modules/**[2m, [22m**/dist/**[39m[39m
|
|
12
|
+
No test files found, exiting with code 0
|
|
13
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../src/data/products.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAgF5C,CAAC"}
|
package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export const mockProducts = [
|
|
2
|
+
{
|
|
3
|
+
productId: 'prod-soccer-ball',
|
|
4
|
+
name: 'Super Soccer Ball',
|
|
5
|
+
category: 'Sports',
|
|
6
|
+
price: 10,
|
|
7
|
+
tags: ['soccer', 'sports'],
|
|
8
|
+
imageUrl: 'https://plus.unsplash.com/premium_photo-1658506638118-524a66dc5cee?q=80&w=3544&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
productId: 'prod-craft-kit',
|
|
12
|
+
name: 'Deluxe Craft Kit',
|
|
13
|
+
category: 'Arts & Crafts',
|
|
14
|
+
price: 25,
|
|
15
|
+
tags: ['crafts', 'art', 'creative'],
|
|
16
|
+
imageUrl: 'https://m.media-amazon.com/images/I/81ekd9gpb5L._UF894,1000_QL80_.jpg',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
productId: 'prod-laptop-bag',
|
|
20
|
+
name: 'Tech Laptop Backpack',
|
|
21
|
+
category: 'School Supplies',
|
|
22
|
+
price: 45,
|
|
23
|
+
tags: ['computers', 'tech', 'school'],
|
|
24
|
+
imageUrl: 'https://images.unsplash.com/photo-1630522521764-9ec0064a7e6e?q=80&w=1587&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
productId: 'prod-mtg-starter',
|
|
28
|
+
name: 'Magic the Gathering Starter Set',
|
|
29
|
+
category: 'Games',
|
|
30
|
+
price: 30,
|
|
31
|
+
tags: ['magic', 'tcg', 'games'],
|
|
32
|
+
imageUrl: 'https://www.steelcitycollectibles.com/storage/img/uploads/products/full/mtgbloomstarterbox90586.jpg',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
productId: 'prod-pencils',
|
|
36
|
+
name: 'Colorful Pencil Set',
|
|
37
|
+
category: 'School Supplies',
|
|
38
|
+
price: 8,
|
|
39
|
+
tags: ['school', 'art', 'writing'],
|
|
40
|
+
imageUrl: 'https://images.unsplash.com/photo-1616014578457-c7f3cd043291?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
productId: 'prod-notebook',
|
|
44
|
+
name: 'Spiral Notebook',
|
|
45
|
+
category: 'School Supplies',
|
|
46
|
+
price: 5,
|
|
47
|
+
tags: ['school', 'writing', 'paper'],
|
|
48
|
+
imageUrl: 'https://images.unsplash.com/photo-1598620616337-cb8f766489bd?q=80&w=1943&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
productId: 'prod-running-shoes',
|
|
52
|
+
name: 'Kids Running Shoes',
|
|
53
|
+
category: 'Sports',
|
|
54
|
+
price: 35,
|
|
55
|
+
tags: ['sports', 'running', 'shoes'],
|
|
56
|
+
imageUrl: 'https://images.unsplash.com/photo-1571395770221-867c6e2251bc?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
productId: 'prod-paint-set',
|
|
60
|
+
name: 'Watercolor Paint Set',
|
|
61
|
+
category: 'Arts & Crafts',
|
|
62
|
+
price: 15,
|
|
63
|
+
tags: ['art', 'paint', 'creative'],
|
|
64
|
+
imageUrl: 'https://images.unsplash.com/photo-1748100377329-429f657842de?q=80&w=3534&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
productId: 'prod-craft-glue',
|
|
68
|
+
name: 'All-Purpose Craft Glue',
|
|
69
|
+
category: 'Arts & Crafts',
|
|
70
|
+
price: 6,
|
|
71
|
+
tags: ['crafts', 'glue', 'art'],
|
|
72
|
+
imageUrl: 'https://images.unsplash.com/photo-1511944239253-86eb39473667?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
//# sourceMappingURL=products.js.map
|
package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/data/products.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,YAAY,GAAyB;IAChD;QACE,SAAS,EAAE,kBAAkB;QAC7B,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC1B,QAAQ,EACN,8KAA8K;KACjL;IACD;QACE,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,eAAe;QACzB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC;QACnC,QAAQ,EAAE,uEAAuE;KAClF;IACD;QACE,SAAS,EAAE,iBAAiB;QAC5B,IAAI,EAAE,sBAAsB;QAC5B,QAAQ,EAAE,iBAAiB;QAC3B,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC;QACrC,QAAQ,EACN,wKAAwK;KAC3K;IACD;QACE,SAAS,EAAE,kBAAkB;QAC7B,IAAI,EAAE,iCAAiC;QACvC,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;QAC/B,QAAQ,EAAE,qGAAqG;KAChH;IACD;QACE,SAAS,EAAE,cAAc;QACzB,IAAI,EAAE,qBAAqB;QAC3B,QAAQ,EAAE,iBAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC;QAClC,QAAQ,EACN,wKAAwK;KAC3K;IACD;QACE,SAAS,EAAE,eAAe;QAC1B,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,iBAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;QACpC,QAAQ,EACN,wKAAwK;KAC3K;IACD;QACE,SAAS,EAAE,oBAAoB;QAC/B,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;QACpC,QAAQ,EACN,wKAAwK;KAC3K;IACD;QACE,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE,sBAAsB;QAC5B,QAAQ,EAAE,eAAe;QACzB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC;QAClC,QAAQ,EACN,wKAAwK;KAC3K;IACD;QACE,SAAS,EAAE,iBAAiB;QAC5B,IAAI,EAAE,wBAAwB;QAC9B,QAAQ,EAAE,eAAe;QACzB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC;QAC/B,QAAQ,EACN,wKAAwK;KAC3K;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAMhD,QAAA,MAAM,GAAG,EAAE,OAAmB,CAAC;AAoD/B,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import cors from 'cors';
|
|
3
|
+
import swaggerUi from 'swagger-ui-express';
|
|
4
|
+
import swaggerJsdoc from 'swagger-jsdoc';
|
|
5
|
+
import productsRouter from './routes/products';
|
|
6
|
+
const app = express();
|
|
7
|
+
const PORT = process.env.PORT ?? '3001';
|
|
8
|
+
// Swagger configuration
|
|
9
|
+
const swaggerOptions = {
|
|
10
|
+
definition: {
|
|
11
|
+
openapi: '3.0.0',
|
|
12
|
+
info: {
|
|
13
|
+
title: 'Product Catalog Service API',
|
|
14
|
+
version: '1.0.0',
|
|
15
|
+
description: 'A product catalog service with interactive documentation',
|
|
16
|
+
},
|
|
17
|
+
servers: [
|
|
18
|
+
{
|
|
19
|
+
url: `http://localhost:${PORT}`,
|
|
20
|
+
description: 'Development server',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
apis: ['./src/routes/products.ts'],
|
|
25
|
+
};
|
|
26
|
+
const swaggerSpec = swaggerJsdoc(swaggerOptions);
|
|
27
|
+
// Middleware
|
|
28
|
+
app.use(cors({
|
|
29
|
+
origin: '*',
|
|
30
|
+
}));
|
|
31
|
+
app.use(express.json());
|
|
32
|
+
// Swagger UI
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
+
app.use('/docs', ...swaggerUi.serve, swaggerUi.setup(swaggerSpec));
|
|
35
|
+
// Routes
|
|
36
|
+
app.use('/api/products', productsRouter);
|
|
37
|
+
// Health check endpoint
|
|
38
|
+
app.get('/health', (req, res) => {
|
|
39
|
+
res.json({ status: 'OK', timestamp: new Date().toISOString() });
|
|
40
|
+
});
|
|
41
|
+
// Only start server if not in test environment
|
|
42
|
+
if (process.env.NODE_ENV !== 'test') {
|
|
43
|
+
app.listen(PORT, () => {
|
|
44
|
+
console.log(`Product catalog service running on port ${PORT}`);
|
|
45
|
+
console.log(`Swagger UI available at http://localhost:${PORT}/docs`);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export default app;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAyB,MAAM,SAAS,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,MAAM,GAAG,GAAY,OAAO,EAAE,CAAC;AAC/B,MAAM,IAAI,GAAW,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC;AAEhD,wBAAwB;AACxB,MAAM,cAAc,GAAG;IACrB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE;YACJ,KAAK,EAAE,6BAA6B;YACpC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,0DAA0D;SACxE;QACD,OAAO,EAAE;YACP;gBACE,GAAG,EAAE,oBAAoB,IAAI,EAAE;gBAC/B,WAAW,EAAE,oBAAoB;aAClC;SACF;KACF;IACD,IAAI,EAAE,CAAC,0BAA0B,CAAC;CACnC,CAAC;AAEF,MAAM,WAAW,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;AAEjD,aAAa;AACb,GAAG,CAAC,GAAG,CACL,IAAI,CAAC;IACH,MAAM,EAAE,GAAG;CACZ,CAAC,CACH,CAAC;AACF,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAExB,aAAa;AACb,8DAA8D;AAC9D,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,GAAI,SAAS,CAAC,KAAa,EAAE,SAAS,CAAC,KAAK,CAAC,WAAW,CAAQ,CAAC,CAAC;AAEnF,SAAS;AACT,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AAEzC,wBAAwB;AACxB,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9B,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC,CAAC,CAAC;AAEH,+CAA+C;AAC/C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;IACpC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;QACpB,OAAO,CAAC,GAAG,CAAC,2CAA2C,IAAI,EAAE,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,4CAA4C,IAAI,OAAO,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../src/routes/products.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAGvD,QAAA,MAAM,MAAM,EAAE,aAAwB,CAAC;AAgLvC,eAAe,MAAM,CAAC"}
|