create-auto-app 0.2.1 → 0.2.2

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 +6 -6
  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,153 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ type Slot = 'body' | 'headers' | 'path' | 'query';
4
+
5
+ export type Field =
6
+ | {
7
+ in: Exclude<Slot, 'body'>;
8
+ /**
9
+ * Field name. This is the name we want the user to see and use.
10
+ */
11
+ key: string;
12
+ /**
13
+ * Field mapped name. This is the name we want to use in the request.
14
+ * If omitted, we use the same value as `key`.
15
+ */
16
+ map?: string;
17
+ }
18
+ | {
19
+ in: Extract<Slot, 'body'>;
20
+ /**
21
+ * Key isn't required for bodies.
22
+ */
23
+ key?: string;
24
+ map?: string;
25
+ };
26
+
27
+ export interface Fields {
28
+ allowExtra?: Partial<Record<Slot, boolean>>;
29
+ args?: ReadonlyArray<Field>;
30
+ }
31
+
32
+ export type FieldsConfig = ReadonlyArray<Field | Fields>;
33
+
34
+ const extraPrefixesMap: Record<string, Slot> = {
35
+ $body_: 'body',
36
+ $headers_: 'headers',
37
+ $path_: 'path',
38
+ $query_: 'query',
39
+ };
40
+ const extraPrefixes = Object.entries(extraPrefixesMap);
41
+
42
+ type KeyMap = Map<
43
+ string,
44
+ {
45
+ in: Slot;
46
+ map?: string;
47
+ }
48
+ >;
49
+
50
+ const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => {
51
+ if (!map) {
52
+ map = new Map();
53
+ }
54
+
55
+ for (const config of fields) {
56
+ if ('in' in config) {
57
+ if (config.key) {
58
+ map.set(config.key, {
59
+ in: config.in,
60
+ map: config.map,
61
+ });
62
+ }
63
+ } else if (config.args) {
64
+ buildKeyMap(config.args, map);
65
+ }
66
+ }
67
+
68
+ return map;
69
+ };
70
+
71
+ interface Params {
72
+ body: unknown;
73
+ headers: Record<string, unknown>;
74
+ path: Record<string, unknown>;
75
+ query: Record<string, unknown>;
76
+ }
77
+
78
+ const stripEmptySlots = (params: Params) => {
79
+ for (const [slot, value] of Object.entries(params)) {
80
+ if (value && typeof value === 'object' && !Object.keys(value).length) {
81
+ delete params[slot as Slot];
82
+ }
83
+ }
84
+ };
85
+
86
+ export const buildClientParams = (
87
+ args: ReadonlyArray<unknown>,
88
+ fields: FieldsConfig,
89
+ ) => {
90
+ const params: Params = {
91
+ body: {},
92
+ headers: {},
93
+ path: {},
94
+ query: {},
95
+ };
96
+
97
+ const map = buildKeyMap(fields);
98
+
99
+ let config: FieldsConfig[number] | undefined;
100
+
101
+ for (const [index, arg] of args.entries()) {
102
+ if (fields[index]) {
103
+ config = fields[index];
104
+ }
105
+
106
+ if (!config) {
107
+ continue;
108
+ }
109
+
110
+ if ('in' in config) {
111
+ if (config.key) {
112
+ const field = map.get(config.key)!;
113
+ const name = field.map || config.key;
114
+ (params[field.in] as Record<string, unknown>)[name] = arg;
115
+ } else {
116
+ params.body = arg;
117
+ }
118
+ } else {
119
+ for (const [key, value] of Object.entries(arg ?? {})) {
120
+ const field = map.get(key);
121
+
122
+ if (field) {
123
+ const name = field.map || key;
124
+ (params[field.in] as Record<string, unknown>)[name] = value;
125
+ } else {
126
+ const extra = extraPrefixes.find(([prefix]) =>
127
+ key.startsWith(prefix),
128
+ );
129
+
130
+ if (extra) {
131
+ const [prefix, slot] = extra;
132
+ (params[slot] as Record<string, unknown>)[
133
+ key.slice(prefix.length)
134
+ ] = value;
135
+ } else {
136
+ for (const [slot, allowed] of Object.entries(
137
+ config.allowExtra ?? {},
138
+ )) {
139
+ if (allowed) {
140
+ (params[slot as Slot] as Record<string, unknown>)[key] = value;
141
+ break;
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+
150
+ stripEmptySlots(params);
151
+
152
+ return params;
153
+ };
@@ -0,0 +1,181 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ interface SerializeOptions<T>
4
+ extends SerializePrimitiveOptions,
5
+ SerializerOptions<T> {}
6
+
7
+ interface SerializePrimitiveOptions {
8
+ allowReserved?: boolean;
9
+ name: string;
10
+ }
11
+
12
+ export interface SerializerOptions<T> {
13
+ /**
14
+ * @default true
15
+ */
16
+ explode: boolean;
17
+ style: T;
18
+ }
19
+
20
+ export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
21
+ export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
22
+ type MatrixStyle = 'label' | 'matrix' | 'simple';
23
+ export type ObjectStyle = 'form' | 'deepObject';
24
+ type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;
25
+
26
+ interface SerializePrimitiveParam extends SerializePrimitiveOptions {
27
+ value: string;
28
+ }
29
+
30
+ export const separatorArrayExplode = (style: ArraySeparatorStyle) => {
31
+ switch (style) {
32
+ case 'label':
33
+ return '.';
34
+ case 'matrix':
35
+ return ';';
36
+ case 'simple':
37
+ return ',';
38
+ default:
39
+ return '&';
40
+ }
41
+ };
42
+
43
+ export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => {
44
+ switch (style) {
45
+ case 'form':
46
+ return ',';
47
+ case 'pipeDelimited':
48
+ return '|';
49
+ case 'spaceDelimited':
50
+ return '%20';
51
+ default:
52
+ return ',';
53
+ }
54
+ };
55
+
56
+ export const separatorObjectExplode = (style: ObjectSeparatorStyle) => {
57
+ switch (style) {
58
+ case 'label':
59
+ return '.';
60
+ case 'matrix':
61
+ return ';';
62
+ case 'simple':
63
+ return ',';
64
+ default:
65
+ return '&';
66
+ }
67
+ };
68
+
69
+ export const serializeArrayParam = ({
70
+ allowReserved,
71
+ explode,
72
+ name,
73
+ style,
74
+ value,
75
+ }: SerializeOptions<ArraySeparatorStyle> & {
76
+ value: unknown[];
77
+ }) => {
78
+ if (!explode) {
79
+ const joinedValues = (
80
+ allowReserved ? value : value.map((v) => encodeURIComponent(v as string))
81
+ ).join(separatorArrayNoExplode(style));
82
+ switch (style) {
83
+ case 'label':
84
+ return `.${joinedValues}`;
85
+ case 'matrix':
86
+ return `;${name}=${joinedValues}`;
87
+ case 'simple':
88
+ return joinedValues;
89
+ default:
90
+ return `${name}=${joinedValues}`;
91
+ }
92
+ }
93
+
94
+ const separator = separatorArrayExplode(style);
95
+ const joinedValues = value
96
+ .map((v) => {
97
+ if (style === 'label' || style === 'simple') {
98
+ return allowReserved ? v : encodeURIComponent(v as string);
99
+ }
100
+
101
+ return serializePrimitiveParam({
102
+ allowReserved,
103
+ name,
104
+ value: v as string,
105
+ });
106
+ })
107
+ .join(separator);
108
+ return style === 'label' || style === 'matrix'
109
+ ? separator + joinedValues
110
+ : joinedValues;
111
+ };
112
+
113
+ export const serializePrimitiveParam = ({
114
+ allowReserved,
115
+ name,
116
+ value,
117
+ }: SerializePrimitiveParam) => {
118
+ if (value === undefined || value === null) {
119
+ return '';
120
+ }
121
+
122
+ if (typeof value === 'object') {
123
+ throw new Error(
124
+ 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',
125
+ );
126
+ }
127
+
128
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
129
+ };
130
+
131
+ export const serializeObjectParam = ({
132
+ allowReserved,
133
+ explode,
134
+ name,
135
+ style,
136
+ value,
137
+ valueOnly,
138
+ }: SerializeOptions<ObjectSeparatorStyle> & {
139
+ value: Record<string, unknown> | Date;
140
+ valueOnly?: boolean;
141
+ }) => {
142
+ if (value instanceof Date) {
143
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
144
+ }
145
+
146
+ if (style !== 'deepObject' && !explode) {
147
+ let values: string[] = [];
148
+ Object.entries(value).forEach(([key, v]) => {
149
+ values = [
150
+ ...values,
151
+ key,
152
+ allowReserved ? (v as string) : encodeURIComponent(v as string),
153
+ ];
154
+ });
155
+ const joinedValues = values.join(',');
156
+ switch (style) {
157
+ case 'form':
158
+ return `${name}=${joinedValues}`;
159
+ case 'label':
160
+ return `.${joinedValues}`;
161
+ case 'matrix':
162
+ return `;${name}=${joinedValues}`;
163
+ default:
164
+ return joinedValues;
165
+ }
166
+ }
167
+
168
+ const separator = separatorObjectExplode(style);
169
+ const joinedValues = Object.entries(value)
170
+ .map(([key, v]) =>
171
+ serializePrimitiveParam({
172
+ allowReserved,
173
+ name: style === 'deepObject' ? `${name}[${key}]` : key,
174
+ value: v as string,
175
+ }),
176
+ )
177
+ .join(separator);
178
+ return style === 'label' || style === 'matrix'
179
+ ? separator + joinedValues
180
+ : joinedValues;
181
+ };
@@ -0,0 +1,120 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { Auth, AuthToken } from './auth.gen';
4
+ import type {
5
+ BodySerializer,
6
+ QuerySerializer,
7
+ QuerySerializerOptions,
8
+ } from './bodySerializer.gen';
9
+
10
+ export interface Client<
11
+ RequestFn = never,
12
+ Config = unknown,
13
+ MethodFn = never,
14
+ BuildUrlFn = never,
15
+ > {
16
+ /**
17
+ * Returns the final request URL.
18
+ */
19
+ buildUrl: BuildUrlFn;
20
+ connect: MethodFn;
21
+ delete: MethodFn;
22
+ get: MethodFn;
23
+ getConfig: () => Config;
24
+ head: MethodFn;
25
+ options: MethodFn;
26
+ patch: MethodFn;
27
+ post: MethodFn;
28
+ put: MethodFn;
29
+ request: RequestFn;
30
+ setConfig: (config: Config) => Config;
31
+ trace: MethodFn;
32
+ }
33
+
34
+ export interface Config {
35
+ /**
36
+ * Auth token or a function returning auth token. The resolved value will be
37
+ * added to the request payload as defined by its `security` array.
38
+ */
39
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
40
+ /**
41
+ * A function for serializing request body parameter. By default,
42
+ * {@link JSON.stringify()} will be used.
43
+ */
44
+ bodySerializer?: BodySerializer | null;
45
+ /**
46
+ * An object containing any HTTP headers that you want to pre-populate your
47
+ * `Headers` object with.
48
+ *
49
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
50
+ */
51
+ headers?:
52
+ | RequestInit['headers']
53
+ | Record<
54
+ string,
55
+ | string
56
+ | number
57
+ | boolean
58
+ | (string | number | boolean)[]
59
+ | null
60
+ | undefined
61
+ | unknown
62
+ >;
63
+ /**
64
+ * The request method.
65
+ *
66
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
67
+ */
68
+ method?:
69
+ | 'CONNECT'
70
+ | 'DELETE'
71
+ | 'GET'
72
+ | 'HEAD'
73
+ | 'OPTIONS'
74
+ | 'PATCH'
75
+ | 'POST'
76
+ | 'PUT'
77
+ | 'TRACE';
78
+ /**
79
+ * A function for serializing request query parameters. By default, arrays
80
+ * will be exploded in form style, objects will be exploded in deepObject
81
+ * style, and reserved characters are percent-encoded.
82
+ *
83
+ * This method will have no effect if the native `paramsSerializer()` Axios
84
+ * API function is used.
85
+ *
86
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
87
+ */
88
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
89
+ /**
90
+ * A function validating request data. This is useful if you want to ensure
91
+ * the request conforms to the desired shape, so it can be safely sent to
92
+ * the server.
93
+ */
94
+ requestValidator?: (data: unknown) => Promise<unknown>;
95
+ /**
96
+ * A function transforming response data before it's returned. This is useful
97
+ * for post-processing data, e.g. converting ISO strings into Date objects.
98
+ */
99
+ responseTransformer?: (data: unknown) => Promise<unknown>;
100
+ /**
101
+ * A function validating response data. This is useful if you want to ensure
102
+ * the response conforms to the desired shape, so it can be safely passed to
103
+ * the transformers and returned to the user.
104
+ */
105
+ responseValidator?: (data: unknown) => Promise<unknown>;
106
+ }
107
+
108
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
109
+ ? true
110
+ : [T] extends [never | undefined]
111
+ ? [undefined] extends [T]
112
+ ? false
113
+ : true
114
+ : false;
115
+
116
+ export type OmitNever<T extends Record<string, unknown>> = {
117
+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true
118
+ ? never
119
+ : K]: T[K];
120
+ };
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export * from './types.gen';
@@ -0,0 +1,175 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export type CartItem = {
4
+ /**
5
+ * Unique identifier for the product
6
+ */
7
+ productId: string;
8
+ /**
9
+ * Product name
10
+ */
11
+ name: string;
12
+ /**
13
+ * Product price in dollars
14
+ */
15
+ price: number;
16
+ /**
17
+ * Quantity of the product in cart
18
+ */
19
+ quantity: number;
20
+ };
21
+
22
+ export type CartSession = {
23
+ /**
24
+ * Unique cart session identifier
25
+ */
26
+ sessionId: string;
27
+ /**
28
+ * Array of items in the cart
29
+ */
30
+ items: Array<CartItem>;
31
+ /**
32
+ * Total cost of all items in cart
33
+ */
34
+ total: number;
35
+ /**
36
+ * When the cart session was created
37
+ */
38
+ createdAt: string;
39
+ /**
40
+ * When the cart was last updated
41
+ */
42
+ updatedAt: string;
43
+ };
44
+
45
+ export type GetApiCartBySessionIdData = {
46
+ body?: never;
47
+ path: {
48
+ /**
49
+ * Cart session identifier
50
+ */
51
+ sessionId: string;
52
+ };
53
+ query?: never;
54
+ url: '/api/cart/{sessionId}';
55
+ };
56
+
57
+ export type GetApiCartBySessionIdResponses = {
58
+ /**
59
+ * Cart session details
60
+ */
61
+ 200: CartSession;
62
+ };
63
+
64
+ export type GetApiCartBySessionIdResponse = GetApiCartBySessionIdResponses[keyof GetApiCartBySessionIdResponses];
65
+
66
+ export type PostApiCartBySessionIdAddData = {
67
+ body: {
68
+ /**
69
+ * Product identifier
70
+ */
71
+ productId: string;
72
+ /**
73
+ * Product name
74
+ */
75
+ name: string;
76
+ /**
77
+ * Product price
78
+ */
79
+ price: number;
80
+ /**
81
+ * Quantity to add
82
+ */
83
+ quantity: number;
84
+ };
85
+ path: {
86
+ /**
87
+ * Cart session identifier
88
+ */
89
+ sessionId: string;
90
+ };
91
+ query?: never;
92
+ url: '/api/cart/{sessionId}/add';
93
+ };
94
+
95
+ export type PostApiCartBySessionIdAddErrors = {
96
+ /**
97
+ * Invalid request data
98
+ */
99
+ 400: unknown;
100
+ };
101
+
102
+ export type PostApiCartBySessionIdAddResponses = {
103
+ /**
104
+ * Item added to cart successfully
105
+ */
106
+ 200: CartSession;
107
+ };
108
+
109
+ export type PostApiCartBySessionIdAddResponse = PostApiCartBySessionIdAddResponses[keyof PostApiCartBySessionIdAddResponses];
110
+
111
+ export type PostApiCartBySessionIdRemoveData = {
112
+ body: {
113
+ /**
114
+ * Product identifier to remove
115
+ */
116
+ productId: string;
117
+ /**
118
+ * Quantity to remove (optional, removes all if not specified)
119
+ */
120
+ quantity: number;
121
+ };
122
+ path: {
123
+ /**
124
+ * Cart session identifier
125
+ */
126
+ sessionId: string;
127
+ };
128
+ query?: never;
129
+ url: '/api/cart/{sessionId}/remove';
130
+ };
131
+
132
+ export type PostApiCartBySessionIdRemoveErrors = {
133
+ /**
134
+ * Invalid request data
135
+ */
136
+ 400: unknown;
137
+ /**
138
+ * Product not found in cart
139
+ */
140
+ 404: unknown;
141
+ };
142
+
143
+ export type PostApiCartBySessionIdRemoveResponses = {
144
+ /**
145
+ * Item removed from cart successfully
146
+ */
147
+ 200: CartSession;
148
+ };
149
+
150
+ export type PostApiCartBySessionIdRemoveResponse = PostApiCartBySessionIdRemoveResponses[keyof PostApiCartBySessionIdRemoveResponses];
151
+
152
+ export type PostApiCartBySessionIdClearData = {
153
+ body?: never;
154
+ path: {
155
+ /**
156
+ * Cart session identifier
157
+ */
158
+ sessionId: string;
159
+ };
160
+ query?: never;
161
+ url: '/api/cart/{sessionId}/clear';
162
+ };
163
+
164
+ export type PostApiCartBySessionIdClearResponses = {
165
+ /**
166
+ * Cart cleared successfully
167
+ */
168
+ 200: CartSession;
169
+ };
170
+
171
+ export type PostApiCartBySessionIdClearResponse = PostApiCartBySessionIdClearResponses[keyof PostApiCartBySessionIdClearResponses];
172
+
173
+ export type ClientOptions = {
174
+ baseUrl: 'http://localhost:3002' | (string & {});
175
+ };
@@ -0,0 +1,78 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import { z } from 'zod';
4
+
5
+ export const zCartItem = z.object({
6
+ productId: z.string(),
7
+ name: z.string(),
8
+ price: z.number(),
9
+ quantity: z.number()
10
+ });
11
+
12
+ export const zCartSession = z.object({
13
+ sessionId: z.string(),
14
+ items: z.array(zCartItem),
15
+ total: z.number(),
16
+ createdAt: z.coerce.date(),
17
+ updatedAt: z.coerce.date()
18
+ });
19
+
20
+ export const zGetApiCartBySessionIdData = z.object({
21
+ body: z.optional(z.never()),
22
+ path: z.object({
23
+ sessionId: z.string()
24
+ }),
25
+ query: z.optional(z.never())
26
+ });
27
+
28
+ /**
29
+ * Cart session details
30
+ */
31
+ export const zGetApiCartBySessionIdResponse = zCartSession;
32
+
33
+ export const zPostApiCartBySessionIdAddData = z.object({
34
+ body: z.object({
35
+ productId: z.string(),
36
+ name: z.string(),
37
+ price: z.number(),
38
+ quantity: z.number()
39
+ }),
40
+ path: z.object({
41
+ sessionId: z.string()
42
+ }),
43
+ query: z.optional(z.never())
44
+ });
45
+
46
+ /**
47
+ * Item added to cart successfully
48
+ */
49
+ export const zPostApiCartBySessionIdAddResponse = zCartSession;
50
+
51
+ export const zPostApiCartBySessionIdRemoveData = z.object({
52
+ body: z.object({
53
+ productId: z.string(),
54
+ quantity: z.number()
55
+ }),
56
+ path: z.object({
57
+ sessionId: z.string()
58
+ }),
59
+ query: z.optional(z.never())
60
+ });
61
+
62
+ /**
63
+ * Item removed from cart successfully
64
+ */
65
+ export const zPostApiCartBySessionIdRemoveResponse = zCartSession;
66
+
67
+ export const zPostApiCartBySessionIdClearData = z.object({
68
+ body: z.optional(z.never()),
69
+ path: z.object({
70
+ sessionId: z.string()
71
+ }),
72
+ query: z.optional(z.never())
73
+ });
74
+
75
+ /**
76
+ * Cart cleared successfully
77
+ */
78
+ export const zPostApiCartBySessionIdClearResponse = zCartSession;
@@ -0,0 +1 @@
1
+ export * from './cart-integration';