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.
Files changed (289) hide show
  1. package/dist/index.js +7 -7
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/shopping-app/auto.config.ts +134 -9
  5. package/templates/shopping-app/client/auto-configure.ts +1 -1
  6. package/templates/shopping-app/client/package.json +1 -1
  7. package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-build.log +4 -0
  8. package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-format.log +12 -0
  9. package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-lint.log +4 -0
  10. package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-test.log +12 -0
  11. package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-type-check.log +5 -0
  12. package/templates/shopping-app/example-integrations/ai-chat-completion/CHANGELOG.md +134 -0
  13. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts +23 -0
  14. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts.map +1 -0
  15. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js +41 -0
  16. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js.map +1 -0
  17. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts +2 -0
  18. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts.map +1 -0
  19. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js +2 -0
  20. package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js.map +1 -0
  21. package/templates/shopping-app/example-integrations/ai-chat-completion/eslint.config.ts +12 -0
  22. package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/eslint +21 -0
  23. package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/jiti +21 -0
  24. package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/msw +21 -0
  25. package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsc +21 -0
  26. package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsserver +21 -0
  27. package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vite +21 -0
  28. package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vitest +21 -0
  29. package/templates/shopping-app/example-integrations/ai-chat-completion/package.json +29 -0
  30. package/templates/shopping-app/example-integrations/ai-chat-completion/src/ai-integration.ts +76 -0
  31. package/templates/shopping-app/example-integrations/ai-chat-completion/src/index.ts +1 -0
  32. package/templates/shopping-app/example-integrations/ai-chat-completion/tsconfig.json +10 -0
  33. package/templates/shopping-app/example-integrations/ai-chat-completion/tsconfig.test.json +7 -0
  34. package/templates/shopping-app/example-integrations/cart/.turbo/turbo-build.log +4 -0
  35. package/templates/shopping-app/example-integrations/cart/.turbo/turbo-format.log +12 -0
  36. package/templates/shopping-app/example-integrations/cart/.turbo/turbo-lint.log +5 -0
  37. package/templates/shopping-app/example-integrations/cart/.turbo/turbo-test.log +12 -0
  38. package/templates/shopping-app/example-integrations/cart/.turbo/turbo-type-check.log +5 -0
  39. package/templates/shopping-app/example-integrations/cart/CHANGELOG.md +124 -0
  40. package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts +30 -0
  41. package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts.map +1 -0
  42. package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js +134 -0
  43. package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js.map +1 -0
  44. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts +3 -0
  45. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts.map +1 -0
  46. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js +149 -0
  47. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js.map +1 -0
  48. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts +8 -0
  49. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts.map +1 -0
  50. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js +6 -0
  51. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js.map +1 -0
  52. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts +123 -0
  53. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts.map +1 -0
  54. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js +3 -0
  55. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js.map +1 -0
  56. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts +46 -0
  57. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts.map +1 -0
  58. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js +285 -0
  59. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js.map +1 -0
  60. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts +13 -0
  61. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts.map +1 -0
  62. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js +6 -0
  63. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js.map +1 -0
  64. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts +19 -0
  65. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts.map +1 -0
  66. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js +15 -0
  67. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js.map +1 -0
  68. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts +18 -0
  69. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts.map +1 -0
  70. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js +58 -0
  71. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js.map +1 -0
  72. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts +34 -0
  73. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts.map +1 -0
  74. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js +89 -0
  75. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js.map +1 -0
  76. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts +34 -0
  77. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts.map +1 -0
  78. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js +115 -0
  79. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js.map +1 -0
  80. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts +79 -0
  81. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts.map +1 -0
  82. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js +3 -0
  83. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js.map +1 -0
  84. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts +2 -0
  85. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts.map +1 -0
  86. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js +3 -0
  87. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js.map +1 -0
  88. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts +158 -0
  89. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts.map +1 -0
  90. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js +3 -0
  91. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js.map +1 -0
  92. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts +382 -0
  93. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts.map +1 -0
  94. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js +68 -0
  95. package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js.map +1 -0
  96. package/templates/shopping-app/example-integrations/cart/dist/index.d.ts +2 -0
  97. package/templates/shopping-app/example-integrations/cart/dist/index.d.ts.map +1 -0
  98. package/templates/shopping-app/example-integrations/cart/dist/index.js +2 -0
  99. package/templates/shopping-app/example-integrations/cart/dist/index.js.map +1 -0
  100. package/templates/shopping-app/example-integrations/cart/eslint.config.ts +12 -0
  101. package/templates/shopping-app/example-integrations/cart/node_modules/.bin/eslint +21 -0
  102. package/templates/shopping-app/example-integrations/cart/node_modules/.bin/jiti +21 -0
  103. package/templates/shopping-app/example-integrations/cart/node_modules/.bin/msw +21 -0
  104. package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsc +21 -0
  105. package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsserver +21 -0
  106. package/templates/shopping-app/example-integrations/cart/node_modules/.bin/vitest +21 -0
  107. package/templates/shopping-app/example-integrations/cart/package.json +31 -0
  108. package/templates/shopping-app/example-integrations/cart/src/cart-integration.ts +198 -0
  109. package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/client.gen.ts +199 -0
  110. package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/index.ts +25 -0
  111. package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/types.gen.ts +232 -0
  112. package/templates/shopping-app/example-integrations/cart/src/generated/cart/client/utils.gen.ts +419 -0
  113. package/templates/shopping-app/example-integrations/cart/src/generated/cart/client.gen.ts +18 -0
  114. package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/auth.gen.ts +42 -0
  115. package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/bodySerializer.gen.ts +92 -0
  116. package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/params.gen.ts +153 -0
  117. package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/pathSerializer.gen.ts +181 -0
  118. package/templates/shopping-app/example-integrations/cart/src/generated/cart/core/types.gen.ts +120 -0
  119. package/templates/shopping-app/example-integrations/cart/src/generated/cart/index.ts +2 -0
  120. package/templates/shopping-app/example-integrations/cart/src/generated/cart/types.gen.ts +175 -0
  121. package/templates/shopping-app/example-integrations/cart/src/generated/cart/zod.gen.ts +78 -0
  122. package/templates/shopping-app/example-integrations/cart/src/index.ts +1 -0
  123. package/templates/shopping-app/example-integrations/cart/tsconfig.json +10 -0
  124. package/templates/shopping-app/example-integrations/cart/tsconfig.test.json +7 -0
  125. package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-build.log +4 -0
  126. package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-format.log +10 -0
  127. package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-lint.log +4 -0
  128. package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-test.log +12 -0
  129. package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-type-check.log +4 -0
  130. package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts +18 -0
  131. package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts.map +1 -0
  132. package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js +28 -0
  133. package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js.map +1 -0
  134. package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts +4 -0
  135. package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts.map +1 -0
  136. package/templates/shopping-app/example-integrations/cart-api/dist/index.js +49 -0
  137. package/templates/shopping-app/example-integrations/cart-api/dist/index.js.map +1 -0
  138. package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts +4 -0
  139. package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts.map +1 -0
  140. package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js +261 -0
  141. package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js.map +1 -0
  142. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/nodemon +21 -0
  143. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/swagger-jsdoc +21 -0
  144. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node +21 -0
  145. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-cwd +21 -0
  146. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-esm +21 -0
  147. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-script +21 -0
  148. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-transpile-only +21 -0
  149. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-script +21 -0
  150. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsc +21 -0
  151. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsserver +21 -0
  152. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsx +21 -0
  153. package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/vitest +21 -0
  154. package/templates/shopping-app/example-integrations/cart-api/package.json +49 -0
  155. package/templates/shopping-app/example-integrations/cart-api/src/data/cart.ts +45 -0
  156. package/templates/shopping-app/example-integrations/cart-api/src/index.ts +59 -0
  157. package/templates/shopping-app/example-integrations/cart-api/src/routes/cart.ts +289 -0
  158. package/templates/shopping-app/example-integrations/cart-api/tsconfig.json +9 -0
  159. package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-build.log +4 -0
  160. package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-format.log +12 -0
  161. package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-lint.log +5 -0
  162. package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-test.log +12 -0
  163. package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-type-check.log +5 -0
  164. package/templates/shopping-app/example-integrations/product-catalogue/CHANGELOG.md +124 -0
  165. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts +3 -0
  166. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts.map +1 -0
  167. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js +149 -0
  168. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js.map +1 -0
  169. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts +8 -0
  170. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts.map +1 -0
  171. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js +6 -0
  172. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js.map +1 -0
  173. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts +123 -0
  174. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts.map +1 -0
  175. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js +3 -0
  176. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js.map +1 -0
  177. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts +46 -0
  178. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts.map +1 -0
  179. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js +285 -0
  180. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js.map +1 -0
  181. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts +13 -0
  182. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts.map +1 -0
  183. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js +6 -0
  184. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js.map +1 -0
  185. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts +19 -0
  186. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts.map +1 -0
  187. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js +15 -0
  188. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js.map +1 -0
  189. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts +18 -0
  190. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts.map +1 -0
  191. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js +58 -0
  192. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js.map +1 -0
  193. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts +34 -0
  194. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts.map +1 -0
  195. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js +89 -0
  196. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js.map +1 -0
  197. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts +34 -0
  198. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts.map +1 -0
  199. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js +115 -0
  200. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js.map +1 -0
  201. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts +79 -0
  202. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts.map +1 -0
  203. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js +3 -0
  204. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js.map +1 -0
  205. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts +2 -0
  206. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts.map +1 -0
  207. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js +3 -0
  208. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js.map +1 -0
  209. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts +115 -0
  210. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts.map +1 -0
  211. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js +3 -0
  212. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js.map +1 -0
  213. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts +206 -0
  214. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts.map +1 -0
  215. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js +53 -0
  216. package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js.map +1 -0
  217. package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts +2 -0
  218. package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts.map +1 -0
  219. package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js +2 -0
  220. package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js.map +1 -0
  221. package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts +32 -0
  222. package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts.map +1 -0
  223. package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js +163 -0
  224. package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js.map +1 -0
  225. package/templates/shopping-app/example-integrations/product-catalogue/eslint.config.ts +12 -0
  226. package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/eslint +21 -0
  227. package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/jiti +21 -0
  228. package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/msw +21 -0
  229. package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsc +21 -0
  230. package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsserver +21 -0
  231. package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/vitest +21 -0
  232. package/templates/shopping-app/example-integrations/product-catalogue/package.json +31 -0
  233. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/client.gen.ts +199 -0
  234. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/index.ts +25 -0
  235. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/types.gen.ts +232 -0
  236. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client/utils.gen.ts +419 -0
  237. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/client.gen.ts +18 -0
  238. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/auth.gen.ts +42 -0
  239. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/bodySerializer.gen.ts +92 -0
  240. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/params.gen.ts +153 -0
  241. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/pathSerializer.gen.ts +181 -0
  242. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/core/types.gen.ts +120 -0
  243. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/index.ts +2 -0
  244. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/types.gen.ts +133 -0
  245. package/templates/shopping-app/example-integrations/product-catalogue/src/generated/product-catalog/zod.gen.ts +62 -0
  246. package/templates/shopping-app/example-integrations/product-catalogue/src/index.ts +1 -0
  247. package/templates/shopping-app/example-integrations/product-catalogue/src/product-catalogue-integration.ts +225 -0
  248. package/templates/shopping-app/example-integrations/product-catalogue/tsconfig.json +10 -0
  249. package/templates/shopping-app/example-integrations/product-catalogue/tsconfig.test.json +7 -0
  250. package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-build.log +4 -0
  251. package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-format.log +10 -0
  252. package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-lint.log +5 -0
  253. package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-test.log +13 -0
  254. package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-type-check.log +5 -0
  255. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts +10 -0
  256. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts.map +1 -0
  257. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js +75 -0
  258. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js.map +1 -0
  259. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts +4 -0
  260. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts.map +1 -0
  261. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js +49 -0
  262. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js.map +1 -0
  263. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts +4 -0
  264. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts.map +1 -0
  265. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js +170 -0
  266. package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js.map +1 -0
  267. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/nodemon +21 -0
  268. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/swagger-jsdoc +21 -0
  269. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node +21 -0
  270. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-cwd +21 -0
  271. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-esm +21 -0
  272. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-script +21 -0
  273. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-transpile-only +21 -0
  274. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-script +21 -0
  275. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsc +21 -0
  276. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsserver +21 -0
  277. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsx +21 -0
  278. package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/vitest +21 -0
  279. package/templates/shopping-app/example-integrations/product-catalogue-api/package.json +51 -0
  280. package/templates/shopping-app/example-integrations/product-catalogue-api/src/data/products.ts +90 -0
  281. package/templates/shopping-app/example-integrations/product-catalogue-api/src/index.ts +59 -0
  282. package/templates/shopping-app/example-integrations/product-catalogue-api/src/routes/products.ts +181 -0
  283. package/templates/shopping-app/example-integrations/product-catalogue-api/tsconfig.json +9 -0
  284. package/templates/shopping-app/flows/shopping-assistant.flow.ts +1 -1
  285. package/templates/shopping-app/package.json +10 -6
  286. package/templates/shopping-app/server/package.json +1 -1
  287. package/templates/shopping-app/server/src/integrations/ai-integration.ts +1 -1
  288. package/templates/shopping-app/server/src/integrations/cart-integration.ts +1 -1
  289. 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
+ );
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "./src",
6
+ "types": ["vitest/globals", "node"]
7
+ },
8
+ "include": ["src/**/*"],
9
+ "exclude": ["node_modules", "dist"]
10
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "types": ["vitest/globals"]
5
+ },
6
+ "include": ["src/**/*.test.ts", "src/**/*.spec.ts"]
7
+ }
@@ -0,0 +1,4 @@
1
+
2
+ > @examples/product-catalogue-service@0.0.1 build /Users/sam/WebstormProjects/top/auto-engineer/examples/product-catalogue-api
3
+ > tsc
4
+
@@ -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.jsonpackage.json 16ms (unchanged)
7
+ src/data/products.tssrc/data/products.ts 29ms (unchanged)
8
+ src/index.tssrc/index.ts 10ms (unchanged)
9
+ src/routes/products.tssrc/routes/products.ts 10ms (unchanged)
10
+ tsconfig.jsontsconfig.json 1ms (unchanged)
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > @examples/product-catalogue-service@0.0.1 lint /Users/sam/WebstormProjects/top/auto-engineer/examples/product-catalogue-api
4
+ > eslint 'src/**/*.ts' --max-warnings 0 --config ../../eslint.config.ts
5
+
@@ -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
+  RUN  v1.6.1 /Users/sam/WebstormProjects/top/auto-engineer/examples/product-catalogue-api
8
+
9
+ include: **/*.specs.{js,ts}
10
+ exclude: **/.tmp/**, **/node_modules/**, **/dist/**
11
+ watch exclude: **/node_modules/**, **/dist/**
12
+ No test files found, exiting with code 0
13
+
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > @examples/product-catalogue-service@0.0.1 type-check /Users/sam/WebstormProjects/top/auto-engineer/examples/product-catalogue-api
4
+ > tsc --noEmit
5
+
@@ -0,0 +1,10 @@
1
+ export interface ProductCatalogItem {
2
+ productId: string;
3
+ name: string;
4
+ category: string;
5
+ price: number;
6
+ tags: string[];
7
+ imageUrl: string;
8
+ }
9
+ export declare const mockProducts: ProductCatalogItem[];
10
+ //# sourceMappingURL=products.d.ts.map
@@ -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"}
@@ -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
@@ -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,4 @@
1
+ import { type Express } from 'express';
2
+ declare const app: Express;
3
+ export default app;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 @@
1
+ import type { Router as ExpressRouter } from 'express';
2
+ declare const router: ExpressRouter;
3
+ export default router;
4
+ //# sourceMappingURL=products.d.ts.map
@@ -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"}