@voyant-travel/inventory 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/LICENSE +201 -0
  2. package/dist/action-ledger-drift.d.ts +29 -0
  3. package/dist/action-ledger-drift.d.ts.map +1 -0
  4. package/dist/action-ledger-drift.js +338 -0
  5. package/dist/action-ledger.d.ts +104 -0
  6. package/dist/action-ledger.d.ts.map +1 -0
  7. package/dist/action-ledger.js +100 -0
  8. package/dist/authoring/builder.d.ts +37 -0
  9. package/dist/authoring/builder.d.ts.map +1 -0
  10. package/dist/authoring/builder.js +248 -0
  11. package/dist/authoring/clone-content.d.ts +38 -0
  12. package/dist/authoring/clone-content.d.ts.map +1 -0
  13. package/dist/authoring/clone-content.js +367 -0
  14. package/dist/authoring/clone-pricing.d.ts +9 -0
  15. package/dist/authoring/clone-pricing.d.ts.map +1 -0
  16. package/dist/authoring/clone-pricing.js +242 -0
  17. package/dist/authoring/clone.d.ts +45 -0
  18. package/dist/authoring/clone.d.ts.map +1 -0
  19. package/dist/authoring/clone.js +142 -0
  20. package/dist/authoring/errors.d.ts +21 -0
  21. package/dist/authoring/errors.d.ts.map +1 -0
  22. package/dist/authoring/errors.js +13 -0
  23. package/dist/authoring/extension.d.ts +248 -0
  24. package/dist/authoring/extension.d.ts.map +1 -0
  25. package/dist/authoring/extension.js +116 -0
  26. package/dist/authoring/index.d.ts +12 -0
  27. package/dist/authoring/index.d.ts.map +1 -0
  28. package/dist/authoring/index.js +11 -0
  29. package/dist/authoring/schema.d.ts +85 -0
  30. package/dist/authoring/schema.d.ts.map +1 -0
  31. package/dist/authoring/schema.js +16 -0
  32. package/dist/authoring/service.d.ts +28 -0
  33. package/dist/authoring/service.d.ts.map +1 -0
  34. package/dist/authoring/service.js +66 -0
  35. package/dist/authoring/spec.d.ts +524 -0
  36. package/dist/authoring/spec.d.ts.map +1 -0
  37. package/dist/authoring/spec.js +167 -0
  38. package/dist/authoring/validate.d.ts +17 -0
  39. package/dist/authoring/validate.d.ts.map +1 -0
  40. package/dist/authoring/validate.js +83 -0
  41. package/dist/authoring.d.ts +2 -0
  42. package/dist/authoring.d.ts.map +1 -0
  43. package/dist/authoring.js +1 -0
  44. package/dist/booking-engine/handler-support.d.ts +91 -0
  45. package/dist/booking-engine/handler-support.d.ts.map +1 -0
  46. package/dist/booking-engine/handler-support.js +355 -0
  47. package/dist/booking-engine/handler.d.ts +404 -0
  48. package/dist/booking-engine/handler.d.ts.map +1 -0
  49. package/dist/booking-engine/handler.js +398 -0
  50. package/dist/booking-engine/index.d.ts +8 -0
  51. package/dist/booking-engine/index.d.ts.map +1 -0
  52. package/dist/booking-engine/index.js +7 -0
  53. package/dist/booking-engine.d.ts +2 -0
  54. package/dist/booking-engine.d.ts.map +1 -0
  55. package/dist/booking-engine.js +1 -0
  56. package/dist/booking-extension.d.ts +278 -0
  57. package/dist/booking-extension.d.ts.map +1 -0
  58. package/dist/booking-extension.js +161 -0
  59. package/dist/catalog-policy-departures.d.ts +52 -0
  60. package/dist/catalog-policy-departures.d.ts.map +1 -0
  61. package/dist/catalog-policy-departures.js +169 -0
  62. package/dist/catalog-policy-destinations.d.ts +43 -0
  63. package/dist/catalog-policy-destinations.d.ts.map +1 -0
  64. package/dist/catalog-policy-destinations.js +165 -0
  65. package/dist/catalog-policy-pricing.d.ts +55 -0
  66. package/dist/catalog-policy-pricing.d.ts.map +1 -0
  67. package/dist/catalog-policy-pricing.js +109 -0
  68. package/dist/catalog-policy-promotions.d.ts +52 -0
  69. package/dist/catalog-policy-promotions.d.ts.map +1 -0
  70. package/dist/catalog-policy-promotions.js +270 -0
  71. package/dist/catalog-policy-taxonomy.d.ts +51 -0
  72. package/dist/catalog-policy-taxonomy.d.ts.map +1 -0
  73. package/dist/catalog-policy-taxonomy.js +191 -0
  74. package/dist/catalog-policy.d.ts +33 -0
  75. package/dist/catalog-policy.d.ts.map +1 -0
  76. package/dist/catalog-policy.js +733 -0
  77. package/dist/content-shape.d.ts +15 -0
  78. package/dist/content-shape.d.ts.map +1 -0
  79. package/dist/content-shape.js +28 -0
  80. package/dist/draft-shape.d.ts +43 -0
  81. package/dist/draft-shape.d.ts.map +1 -0
  82. package/dist/draft-shape.js +48 -0
  83. package/dist/events.d.ts +37 -0
  84. package/dist/events.d.ts.map +1 -0
  85. package/dist/events.js +32 -0
  86. package/dist/extras/catalog-policy.d.ts +30 -0
  87. package/dist/extras/catalog-policy.d.ts.map +1 -0
  88. package/dist/extras/catalog-policy.js +319 -0
  89. package/dist/extras/content-shape.d.ts +5 -0
  90. package/dist/extras/content-shape.d.ts.map +1 -0
  91. package/dist/extras/content-shape.js +13 -0
  92. package/dist/extras/draft-shape.d.ts +34 -0
  93. package/dist/extras/draft-shape.d.ts.map +1 -0
  94. package/dist/extras/draft-shape.js +69 -0
  95. package/dist/extras/routes.d.ts +380 -0
  96. package/dist/extras/routes.d.ts.map +1 -0
  97. package/dist/extras/routes.js +59 -0
  98. package/dist/extras/schema-sourced-content.d.ts +254 -0
  99. package/dist/extras/schema-sourced-content.d.ts.map +1 -0
  100. package/dist/extras/schema-sourced-content.js +45 -0
  101. package/dist/extras/schema.d.ts +628 -0
  102. package/dist/extras/schema.d.ts.map +1 -0
  103. package/dist/extras/schema.js +87 -0
  104. package/dist/extras/service-catalog-plane.d.ts +77 -0
  105. package/dist/extras/service-catalog-plane.d.ts.map +1 -0
  106. package/dist/extras/service-catalog-plane.js +219 -0
  107. package/dist/extras/service-content-synthesizer.d.ts +41 -0
  108. package/dist/extras/service-content-synthesizer.d.ts.map +1 -0
  109. package/dist/extras/service-content-synthesizer.js +138 -0
  110. package/dist/extras/service-content.d.ts +48 -0
  111. package/dist/extras/service-content.d.ts.map +1 -0
  112. package/dist/extras/service-content.js +253 -0
  113. package/dist/extras/service.d.ts +185 -0
  114. package/dist/extras/service.d.ts.map +1 -0
  115. package/dist/extras/service.js +96 -0
  116. package/dist/extras/validation.d.ts +437 -0
  117. package/dist/extras/validation.d.ts.map +1 -0
  118. package/dist/extras/validation.js +149 -0
  119. package/dist/extras.d.ts +267 -0
  120. package/dist/extras.d.ts.map +1 -0
  121. package/dist/extras.js +19 -0
  122. package/dist/index.d.ts +22 -0
  123. package/dist/index.d.ts.map +1 -0
  124. package/dist/index.js +32 -0
  125. package/dist/interface.d.ts +5869 -0
  126. package/dist/interface.d.ts.map +1 -0
  127. package/dist/interface.js +54 -0
  128. package/dist/public-routes.d.ts +2 -0
  129. package/dist/public-routes.d.ts.map +1 -0
  130. package/dist/public-routes.js +1 -0
  131. package/dist/public-validation.d.ts +2 -0
  132. package/dist/public-validation.d.ts.map +1 -0
  133. package/dist/public-validation.js +1 -0
  134. package/dist/read-model.d.ts +25 -0
  135. package/dist/read-model.d.ts.map +1 -0
  136. package/dist/read-model.js +99 -0
  137. package/dist/route-env.d.ts +22 -0
  138. package/dist/route-env.d.ts.map +1 -0
  139. package/dist/route-env.js +1 -0
  140. package/dist/routes-associations.d.ts +164 -0
  141. package/dist/routes-associations.d.ts.map +1 -0
  142. package/dist/routes-associations.js +100 -0
  143. package/dist/routes-catalog.d.ts +436 -0
  144. package/dist/routes-catalog.d.ts.map +1 -0
  145. package/dist/routes-catalog.js +104 -0
  146. package/dist/routes-configuration.d.ts +773 -0
  147. package/dist/routes-configuration.d.ts.map +1 -0
  148. package/dist/routes-configuration.js +364 -0
  149. package/dist/routes-content.d.ts +74 -0
  150. package/dist/routes-content.d.ts.map +1 -0
  151. package/dist/routes-content.js +117 -0
  152. package/dist/routes-core.d.ts +331 -0
  153. package/dist/routes-core.d.ts.map +1 -0
  154. package/dist/routes-core.js +95 -0
  155. package/dist/routes-itinerary.d.ts +759 -0
  156. package/dist/routes-itinerary.d.ts.map +1 -0
  157. package/dist/routes-itinerary.js +387 -0
  158. package/dist/routes-maintenance.d.ts +32 -0
  159. package/dist/routes-maintenance.d.ts.map +1 -0
  160. package/dist/routes-maintenance.js +14 -0
  161. package/dist/routes-media.d.ts +634 -0
  162. package/dist/routes-media.d.ts.map +1 -0
  163. package/dist/routes-media.js +245 -0
  164. package/dist/routes-merchandising.d.ts +1120 -0
  165. package/dist/routes-merchandising.d.ts.map +1 -0
  166. package/dist/routes-merchandising.js +377 -0
  167. package/dist/routes-options.d.ts +363 -0
  168. package/dist/routes-options.d.ts.map +1 -0
  169. package/dist/routes-options.js +173 -0
  170. package/dist/routes-public.d.ts +776 -0
  171. package/dist/routes-public.d.ts.map +1 -0
  172. package/dist/routes-public.js +119 -0
  173. package/dist/routes-translations.d.ts +489 -0
  174. package/dist/routes-translations.d.ts.map +1 -0
  175. package/dist/routes-translations.js +258 -0
  176. package/dist/routes.d.ts +5097 -0
  177. package/dist/routes.d.ts.map +1 -0
  178. package/dist/routes.js +64 -0
  179. package/dist/schema-core.d.ts +1238 -0
  180. package/dist/schema-core.d.ts.map +1 -0
  181. package/dist/schema-core.js +157 -0
  182. package/dist/schema-itinerary.d.ts +1169 -0
  183. package/dist/schema-itinerary.d.ts.map +1 -0
  184. package/dist/schema-itinerary.js +130 -0
  185. package/dist/schema-relations.d.ts +117 -0
  186. package/dist/schema-relations.d.ts.map +1 -0
  187. package/dist/schema-relations.js +192 -0
  188. package/dist/schema-settings.d.ts +1800 -0
  189. package/dist/schema-settings.d.ts.map +1 -0
  190. package/dist/schema-settings.js +220 -0
  191. package/dist/schema-shared.d.ts +15 -0
  192. package/dist/schema-shared.d.ts.map +1 -0
  193. package/dist/schema-shared.js +91 -0
  194. package/dist/schema-sourced-content.d.ts +262 -0
  195. package/dist/schema-sourced-content.d.ts.map +1 -0
  196. package/dist/schema-sourced-content.js +69 -0
  197. package/dist/schema-taxonomy.d.ts +1363 -0
  198. package/dist/schema-taxonomy.d.ts.map +1 -0
  199. package/dist/schema-taxonomy.js +203 -0
  200. package/dist/schema.d.ts +10 -0
  201. package/dist/schema.d.ts.map +1 -0
  202. package/dist/schema.js +9 -0
  203. package/dist/service-aggregates.d.ts +29 -0
  204. package/dist/service-aggregates.d.ts.map +1 -0
  205. package/dist/service-aggregates.js +56 -0
  206. package/dist/service-catalog-plane-destinations.d.ts +30 -0
  207. package/dist/service-catalog-plane-destinations.d.ts.map +1 -0
  208. package/dist/service-catalog-plane-destinations.js +143 -0
  209. package/dist/service-catalog-plane-taxonomy.d.ts +73 -0
  210. package/dist/service-catalog-plane-taxonomy.d.ts.map +1 -0
  211. package/dist/service-catalog-plane-taxonomy.js +242 -0
  212. package/dist/service-catalog-plane.d.ts +179 -0
  213. package/dist/service-catalog-plane.d.ts.map +1 -0
  214. package/dist/service-catalog-plane.js +431 -0
  215. package/dist/service-catalog.d.ts +251 -0
  216. package/dist/service-catalog.d.ts.map +1 -0
  217. package/dist/service-catalog.js +517 -0
  218. package/dist/service-configuration.d.ts +261 -0
  219. package/dist/service-configuration.d.ts.map +1 -0
  220. package/dist/service-configuration.js +343 -0
  221. package/dist/service-content-owned.d.ts +68 -0
  222. package/dist/service-content-owned.d.ts.map +1 -0
  223. package/dist/service-content-owned.js +329 -0
  224. package/dist/service-content-synthesizer.d.ts +90 -0
  225. package/dist/service-content-synthesizer.d.ts.map +1 -0
  226. package/dist/service-content-synthesizer.js +178 -0
  227. package/dist/service-content.d.ts +106 -0
  228. package/dist/service-content.d.ts.map +1 -0
  229. package/dist/service-content.js +388 -0
  230. package/dist/service-core.d.ts +194 -0
  231. package/dist/service-core.d.ts.map +1 -0
  232. package/dist/service-core.js +213 -0
  233. package/dist/service-delivery-formats.d.ts +58 -0
  234. package/dist/service-delivery-formats.d.ts.map +1 -0
  235. package/dist/service-delivery-formats.js +107 -0
  236. package/dist/service-destinations.d.ts +223 -0
  237. package/dist/service-destinations.d.ts.map +1 -0
  238. package/dist/service-destinations.js +310 -0
  239. package/dist/service-itinerary-history.d.ts +457 -0
  240. package/dist/service-itinerary-history.d.ts.map +1 -0
  241. package/dist/service-itinerary-history.js +135 -0
  242. package/dist/service-itinerary.d.ts +1149 -0
  243. package/dist/service-itinerary.d.ts.map +1 -0
  244. package/dist/service-itinerary.js +419 -0
  245. package/dist/service-media.d.ts +272 -0
  246. package/dist/service-media.d.ts.map +1 -0
  247. package/dist/service-media.js +320 -0
  248. package/dist/service-merchandising.d.ts +184 -0
  249. package/dist/service-merchandising.d.ts.map +1 -0
  250. package/dist/service-merchandising.js +181 -0
  251. package/dist/service-option-translations.d.ts +268 -0
  252. package/dist/service-option-translations.d.ts.map +1 -0
  253. package/dist/service-option-translations.js +300 -0
  254. package/dist/service-options.d.ts +181 -0
  255. package/dist/service-options.d.ts.map +1 -0
  256. package/dist/service-options.js +179 -0
  257. package/dist/service-product-destinations.d.ts +37 -0
  258. package/dist/service-product-destinations.d.ts.map +1 -0
  259. package/dist/service-product-destinations.js +94 -0
  260. package/dist/service-public.d.ts +664 -0
  261. package/dist/service-public.d.ts.map +1 -0
  262. package/dist/service-public.js +374 -0
  263. package/dist/service-taxonomy.d.ts +197 -0
  264. package/dist/service-taxonomy.d.ts.map +1 -0
  265. package/dist/service-taxonomy.js +221 -0
  266. package/dist/service.d.ts +3929 -0
  267. package/dist/service.d.ts.map +1 -0
  268. package/dist/service.js +28 -0
  269. package/dist/tasks/brochure-printers.d.ts +31 -0
  270. package/dist/tasks/brochure-printers.d.ts.map +1 -0
  271. package/dist/tasks/brochure-printers.js +149 -0
  272. package/dist/tasks/brochure-templates.d.ts +36 -0
  273. package/dist/tasks/brochure-templates.d.ts.map +1 -0
  274. package/dist/tasks/brochure-templates.js +110 -0
  275. package/dist/tasks/brochures.d.ts +43 -0
  276. package/dist/tasks/brochures.d.ts.map +1 -0
  277. package/dist/tasks/brochures.js +72 -0
  278. package/dist/tasks/generate-pdf.d.ts +8 -0
  279. package/dist/tasks/generate-pdf.d.ts.map +1 -0
  280. package/dist/tasks/generate-pdf.js +106 -0
  281. package/dist/tasks/index.d.ts +5 -0
  282. package/dist/tasks/index.d.ts.map +1 -0
  283. package/dist/tasks/index.js +4 -0
  284. package/dist/tasks/pdf-text.d.ts +2 -0
  285. package/dist/tasks/pdf-text.d.ts.map +1 -0
  286. package/dist/tasks/pdf-text.js +40 -0
  287. package/dist/tasks.d.ts +2 -0
  288. package/dist/tasks.d.ts.map +1 -0
  289. package/dist/tasks.js +1 -0
  290. package/dist/validation-catalog.d.ts +2 -0
  291. package/dist/validation-catalog.d.ts.map +1 -0
  292. package/dist/validation-catalog.js +3 -0
  293. package/dist/validation-config.d.ts +2 -0
  294. package/dist/validation-config.d.ts.map +1 -0
  295. package/dist/validation-config.js +3 -0
  296. package/dist/validation-content.d.ts +2 -0
  297. package/dist/validation-content.d.ts.map +1 -0
  298. package/dist/validation-content.js +3 -0
  299. package/dist/validation-core.d.ts +2 -0
  300. package/dist/validation-core.d.ts.map +1 -0
  301. package/dist/validation-core.js +3 -0
  302. package/dist/validation-public.d.ts +2 -0
  303. package/dist/validation-public.d.ts.map +1 -0
  304. package/dist/validation-public.js +3 -0
  305. package/dist/validation-shared.d.ts +2 -0
  306. package/dist/validation-shared.d.ts.map +1 -0
  307. package/dist/validation-shared.js +3 -0
  308. package/dist/validation.d.ts +2 -0
  309. package/dist/validation.d.ts.map +1 -0
  310. package/dist/validation.js +3 -0
  311. package/package.json +204 -0
@@ -0,0 +1,436 @@
1
+ import type { Env } from "./route-env.js";
2
+ export declare const productCatalogRoutes: import("hono/hono-base").HonoBase<Env, {
3
+ "/product-types": {
4
+ $get: {
5
+ input: {};
6
+ output: {
7
+ data: {
8
+ id: string;
9
+ name: string;
10
+ code: string;
11
+ description: string | null;
12
+ sortOrder: number;
13
+ active: boolean;
14
+ metadata: {
15
+ [x: string]: import("hono/utils/types").JSONValue;
16
+ } | null;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }[];
20
+ total: number;
21
+ limit: number;
22
+ offset: number;
23
+ };
24
+ outputFormat: "json";
25
+ status: import("hono/utils/http-status").ContentfulStatusCode;
26
+ };
27
+ };
28
+ } & {
29
+ "/product-types/:typeId": {
30
+ $get: {
31
+ input: {
32
+ param: {
33
+ typeId: string;
34
+ };
35
+ };
36
+ output: {
37
+ error: string;
38
+ };
39
+ outputFormat: "json";
40
+ status: 404;
41
+ } | {
42
+ input: {
43
+ param: {
44
+ typeId: string;
45
+ };
46
+ };
47
+ output: {
48
+ data: {
49
+ id: string;
50
+ name: string;
51
+ code: string;
52
+ description: string | null;
53
+ sortOrder: number;
54
+ active: boolean;
55
+ metadata: {
56
+ [x: string]: import("hono/utils/types").JSONValue;
57
+ } | null;
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ };
61
+ };
62
+ outputFormat: "json";
63
+ status: import("hono/utils/http-status").ContentfulStatusCode;
64
+ };
65
+ };
66
+ } & {
67
+ "/product-types": {
68
+ $post: {
69
+ input: {};
70
+ output: {
71
+ data: {
72
+ id: string;
73
+ name: string;
74
+ active: boolean;
75
+ description: string | null;
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ metadata: {
79
+ [x: string]: import("hono/utils/types").JSONValue;
80
+ } | null;
81
+ code: string;
82
+ sortOrder: number;
83
+ } | undefined;
84
+ };
85
+ outputFormat: "json";
86
+ status: 201;
87
+ };
88
+ };
89
+ } & {
90
+ "/product-types/:typeId": {
91
+ $patch: {
92
+ input: {
93
+ param: {
94
+ typeId: string;
95
+ };
96
+ };
97
+ output: {
98
+ error: string;
99
+ };
100
+ outputFormat: "json";
101
+ status: 404;
102
+ } | {
103
+ input: {
104
+ param: {
105
+ typeId: string;
106
+ };
107
+ };
108
+ output: {
109
+ data: {
110
+ id: string;
111
+ name: string;
112
+ code: string;
113
+ description: string | null;
114
+ sortOrder: number;
115
+ active: boolean;
116
+ metadata: {
117
+ [x: string]: import("hono/utils/types").JSONValue;
118
+ } | null;
119
+ createdAt: string;
120
+ updatedAt: string;
121
+ };
122
+ };
123
+ outputFormat: "json";
124
+ status: import("hono/utils/http-status").ContentfulStatusCode;
125
+ };
126
+ };
127
+ } & {
128
+ "/product-types/:typeId": {
129
+ $delete: {
130
+ input: {
131
+ param: {
132
+ typeId: string;
133
+ };
134
+ };
135
+ output: {
136
+ error: string;
137
+ };
138
+ outputFormat: "json";
139
+ status: 404;
140
+ } | {
141
+ input: {
142
+ param: {
143
+ typeId: string;
144
+ };
145
+ };
146
+ output: {
147
+ success: true;
148
+ };
149
+ outputFormat: "json";
150
+ status: 200;
151
+ };
152
+ };
153
+ } & {
154
+ "/product-categories": {
155
+ $get: {
156
+ input: {};
157
+ output: {
158
+ data: {
159
+ id: string;
160
+ parentId: string | null;
161
+ name: string;
162
+ slug: string;
163
+ description: string | null;
164
+ sortOrder: number;
165
+ active: boolean;
166
+ customerPaymentPolicy: import("hono/utils/types").JSONValue;
167
+ metadata: {
168
+ [x: string]: import("hono/utils/types").JSONValue;
169
+ } | null;
170
+ createdAt: string;
171
+ updatedAt: string;
172
+ }[];
173
+ total: number;
174
+ limit: number;
175
+ offset: number;
176
+ };
177
+ outputFormat: "json";
178
+ status: import("hono/utils/http-status").ContentfulStatusCode;
179
+ };
180
+ };
181
+ } & {
182
+ "/product-categories/:categoryId": {
183
+ $get: {
184
+ input: {
185
+ param: {
186
+ categoryId: string;
187
+ };
188
+ };
189
+ output: {
190
+ error: string;
191
+ };
192
+ outputFormat: "json";
193
+ status: 404;
194
+ } | {
195
+ input: {
196
+ param: {
197
+ categoryId: string;
198
+ };
199
+ };
200
+ output: {
201
+ data: {
202
+ id: string;
203
+ parentId: string | null;
204
+ name: string;
205
+ slug: string;
206
+ description: string | null;
207
+ sortOrder: number;
208
+ active: boolean;
209
+ customerPaymentPolicy: import("hono/utils/types").JSONValue;
210
+ metadata: {
211
+ [x: string]: import("hono/utils/types").JSONValue;
212
+ } | null;
213
+ createdAt: string;
214
+ updatedAt: string;
215
+ };
216
+ };
217
+ outputFormat: "json";
218
+ status: import("hono/utils/http-status").ContentfulStatusCode;
219
+ };
220
+ };
221
+ } & {
222
+ "/product-categories": {
223
+ $post: {
224
+ input: {};
225
+ output: {
226
+ data: {
227
+ id: string;
228
+ name: string;
229
+ active: boolean;
230
+ description: string | null;
231
+ customerPaymentPolicy: import("hono/utils/types").JSONValue;
232
+ createdAt: string;
233
+ updatedAt: string;
234
+ metadata: {
235
+ [x: string]: import("hono/utils/types").JSONValue;
236
+ } | null;
237
+ sortOrder: number;
238
+ parentId: string | null;
239
+ slug: string;
240
+ } | undefined;
241
+ };
242
+ outputFormat: "json";
243
+ status: 201;
244
+ };
245
+ };
246
+ } & {
247
+ "/product-categories/:categoryId": {
248
+ $patch: {
249
+ input: {
250
+ param: {
251
+ categoryId: string;
252
+ };
253
+ };
254
+ output: {
255
+ error: string;
256
+ };
257
+ outputFormat: "json";
258
+ status: 404;
259
+ } | {
260
+ input: {
261
+ param: {
262
+ categoryId: string;
263
+ };
264
+ };
265
+ output: {
266
+ data: {
267
+ id: string;
268
+ parentId: string | null;
269
+ name: string;
270
+ slug: string;
271
+ description: string | null;
272
+ sortOrder: number;
273
+ active: boolean;
274
+ customerPaymentPolicy: import("hono/utils/types").JSONValue;
275
+ metadata: {
276
+ [x: string]: import("hono/utils/types").JSONValue;
277
+ } | null;
278
+ createdAt: string;
279
+ updatedAt: string;
280
+ };
281
+ };
282
+ outputFormat: "json";
283
+ status: import("hono/utils/http-status").ContentfulStatusCode;
284
+ };
285
+ };
286
+ } & {
287
+ "/product-categories/:categoryId": {
288
+ $delete: {
289
+ input: {
290
+ param: {
291
+ categoryId: string;
292
+ };
293
+ };
294
+ output: {
295
+ error: string;
296
+ };
297
+ outputFormat: "json";
298
+ status: 404;
299
+ } | {
300
+ input: {
301
+ param: {
302
+ categoryId: string;
303
+ };
304
+ };
305
+ output: {
306
+ success: true;
307
+ };
308
+ outputFormat: "json";
309
+ status: 200;
310
+ };
311
+ };
312
+ } & {
313
+ "/product-tags": {
314
+ $get: {
315
+ input: {};
316
+ output: {
317
+ data: {
318
+ id: string;
319
+ name: string;
320
+ createdAt: string;
321
+ updatedAt: string;
322
+ }[];
323
+ total: number;
324
+ limit: number;
325
+ offset: number;
326
+ };
327
+ outputFormat: "json";
328
+ status: import("hono/utils/http-status").ContentfulStatusCode;
329
+ };
330
+ };
331
+ } & {
332
+ "/product-tags/:tagId": {
333
+ $get: {
334
+ input: {
335
+ param: {
336
+ tagId: string;
337
+ };
338
+ };
339
+ output: {
340
+ error: string;
341
+ };
342
+ outputFormat: "json";
343
+ status: 404;
344
+ } | {
345
+ input: {
346
+ param: {
347
+ tagId: string;
348
+ };
349
+ };
350
+ output: {
351
+ data: {
352
+ id: string;
353
+ name: string;
354
+ createdAt: string;
355
+ updatedAt: string;
356
+ };
357
+ };
358
+ outputFormat: "json";
359
+ status: import("hono/utils/http-status").ContentfulStatusCode;
360
+ };
361
+ };
362
+ } & {
363
+ "/product-tags": {
364
+ $post: {
365
+ input: {};
366
+ output: {
367
+ data: {
368
+ id: string;
369
+ name: string;
370
+ createdAt: string;
371
+ updatedAt: string;
372
+ } | undefined;
373
+ };
374
+ outputFormat: "json";
375
+ status: 201;
376
+ };
377
+ };
378
+ } & {
379
+ "/product-tags/:tagId": {
380
+ $patch: {
381
+ input: {
382
+ param: {
383
+ tagId: string;
384
+ };
385
+ };
386
+ output: {
387
+ error: string;
388
+ };
389
+ outputFormat: "json";
390
+ status: 404;
391
+ } | {
392
+ input: {
393
+ param: {
394
+ tagId: string;
395
+ };
396
+ };
397
+ output: {
398
+ data: {
399
+ id: string;
400
+ name: string;
401
+ createdAt: string;
402
+ updatedAt: string;
403
+ };
404
+ };
405
+ outputFormat: "json";
406
+ status: import("hono/utils/http-status").ContentfulStatusCode;
407
+ };
408
+ };
409
+ } & {
410
+ "/product-tags/:tagId": {
411
+ $delete: {
412
+ input: {
413
+ param: {
414
+ tagId: string;
415
+ };
416
+ };
417
+ output: {
418
+ error: string;
419
+ };
420
+ outputFormat: "json";
421
+ status: 404;
422
+ } | {
423
+ input: {
424
+ param: {
425
+ tagId: string;
426
+ };
427
+ };
428
+ output: {
429
+ success: true;
430
+ };
431
+ outputFormat: "json";
432
+ status: 200;
433
+ };
434
+ };
435
+ }, "/", "/product-tags/:tagId">;
436
+ //# sourceMappingURL=routes-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes-catalog.d.ts","sourceRoot":"","sources":["../src/routes-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAIzC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAkJ7B,CAAA"}
@@ -0,0 +1,104 @@
1
+ import { parseJsonBody, parseQuery } from "@voyant-travel/hono";
2
+ import { Hono } from "hono";
3
+ import { productsService } from "./service.js";
4
+ import * as validation from "./validation.js";
5
+ export const productCatalogRoutes = new Hono()
6
+ // ==========================================================================
7
+ // Product Types
8
+ // ==========================================================================
9
+ .get("/product-types", async (c) => {
10
+ const query = parseQuery(c, validation.productTypeListQuerySchema);
11
+ return c.json(await productsService.listProductTypes(c.get("db"), query));
12
+ })
13
+ .get("/product-types/:typeId", async (c) => {
14
+ const row = await productsService.getProductTypeById(c.get("db"), c.req.param("typeId"));
15
+ if (!row) {
16
+ return c.json({ error: "Product type not found" }, 404);
17
+ }
18
+ return c.json({ data: row });
19
+ })
20
+ .post("/product-types", async (c) => {
21
+ return c.json({
22
+ data: await productsService.createProductType(c.get("db"), await parseJsonBody(c, validation.insertProductTypeSchema)),
23
+ }, 201);
24
+ })
25
+ .patch("/product-types/:typeId", async (c) => {
26
+ const row = await productsService.updateProductType(c.get("db"), c.req.param("typeId"), await parseJsonBody(c, validation.updateProductTypeSchema));
27
+ if (!row) {
28
+ return c.json({ error: "Product type not found" }, 404);
29
+ }
30
+ return c.json({ data: row });
31
+ })
32
+ .delete("/product-types/:typeId", async (c) => {
33
+ const row = await productsService.deleteProductType(c.get("db"), c.req.param("typeId"));
34
+ if (!row) {
35
+ return c.json({ error: "Product type not found" }, 404);
36
+ }
37
+ return c.json({ success: true }, 200);
38
+ })
39
+ // ==========================================================================
40
+ // Product Categories
41
+ // ==========================================================================
42
+ .get("/product-categories", async (c) => {
43
+ const query = parseQuery(c, validation.productCategoryListQuerySchema);
44
+ return c.json(await productsService.listProductCategories(c.get("db"), query));
45
+ })
46
+ .get("/product-categories/:categoryId", async (c) => {
47
+ const row = await productsService.getProductCategoryById(c.get("db"), c.req.param("categoryId"));
48
+ if (!row) {
49
+ return c.json({ error: "Product category not found" }, 404);
50
+ }
51
+ return c.json({ data: row });
52
+ })
53
+ .post("/product-categories", async (c) => {
54
+ return c.json({
55
+ data: await productsService.createProductCategory(c.get("db"), await parseJsonBody(c, validation.insertProductCategorySchema)),
56
+ }, 201);
57
+ })
58
+ .patch("/product-categories/:categoryId", async (c) => {
59
+ const row = await productsService.updateProductCategory(c.get("db"), c.req.param("categoryId"), await parseJsonBody(c, validation.updateProductCategorySchema));
60
+ if (!row) {
61
+ return c.json({ error: "Product category not found" }, 404);
62
+ }
63
+ return c.json({ data: row });
64
+ })
65
+ .delete("/product-categories/:categoryId", async (c) => {
66
+ const row = await productsService.deleteProductCategory(c.get("db"), c.req.param("categoryId"));
67
+ if (!row) {
68
+ return c.json({ error: "Product category not found" }, 404);
69
+ }
70
+ return c.json({ success: true }, 200);
71
+ })
72
+ // ==========================================================================
73
+ // Product Tags
74
+ // ==========================================================================
75
+ .get("/product-tags", async (c) => {
76
+ const query = parseQuery(c, validation.productTagListQuerySchema);
77
+ return c.json(await productsService.listProductTags(c.get("db"), query));
78
+ })
79
+ .get("/product-tags/:tagId", async (c) => {
80
+ const row = await productsService.getProductTagById(c.get("db"), c.req.param("tagId"));
81
+ if (!row) {
82
+ return c.json({ error: "Product tag not found" }, 404);
83
+ }
84
+ return c.json({ data: row });
85
+ })
86
+ .post("/product-tags", async (c) => {
87
+ return c.json({
88
+ data: await productsService.createProductTag(c.get("db"), await parseJsonBody(c, validation.insertProductTagSchema)),
89
+ }, 201);
90
+ })
91
+ .patch("/product-tags/:tagId", async (c) => {
92
+ const row = await productsService.updateProductTag(c.get("db"), c.req.param("tagId"), await parseJsonBody(c, validation.updateProductTagSchema));
93
+ if (!row) {
94
+ return c.json({ error: "Product tag not found" }, 404);
95
+ }
96
+ return c.json({ data: row });
97
+ })
98
+ .delete("/product-tags/:tagId", async (c) => {
99
+ const row = await productsService.deleteProductTag(c.get("db"), c.req.param("tagId"));
100
+ if (!row) {
101
+ return c.json({ error: "Product tag not found" }, 404);
102
+ }
103
+ return c.json({ success: true }, 200);
104
+ });