@kasuvia/sdk 0.0.8 → 0.0.9

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 (176) hide show
  1. package/README.md +42 -15
  2. package/dist/AddressAutocomplete-CjcqPElD.d.mts +46 -0
  3. package/dist/AddressAutocomplete-CvJHuRkf.d.ts +46 -0
  4. package/dist/components/index.d.mts +497 -0
  5. package/dist/components/index.d.ts +497 -0
  6. package/dist/components/index.js +4217 -0
  7. package/dist/components/index.js.map +1 -0
  8. package/dist/components/index.mjs +4194 -0
  9. package/dist/components/index.mjs.map +1 -0
  10. package/dist/config/server.d.mts +26 -0
  11. package/dist/config/server.d.ts +26 -0
  12. package/dist/config/server.js +38 -0
  13. package/dist/config/server.js.map +1 -0
  14. package/dist/config/server.mjs +13 -0
  15. package/dist/config/server.mjs.map +1 -0
  16. package/dist/hooks/index.d.mts +393 -160
  17. package/dist/hooks/index.d.ts +393 -160
  18. package/dist/hooks/index.js +2792 -2137
  19. package/dist/hooks/index.js.map +1 -1
  20. package/dist/hooks/index.mjs +2734 -2121
  21. package/dist/hooks/index.mjs.map +1 -1
  22. package/dist/index-CNW_LINy.d.mts +578 -0
  23. package/dist/index-CNW_LINy.d.ts +578 -0
  24. package/dist/{index-C1chUA3P.d.mts → index-F7N6UItS.d.mts} +1 -1
  25. package/dist/{index-C1chUA3P.d.ts → index-F7N6UItS.d.ts} +1 -1
  26. package/dist/index-NkI10J_E.d.mts +40 -0
  27. package/dist/index-NkI10J_E.d.ts +40 -0
  28. package/dist/index.d.mts +20437 -103
  29. package/dist/index.d.ts +20437 -103
  30. package/dist/index.js +2111 -1802
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.mjs +2006 -1786
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/media.service-Cx7dQjzX.d.mts +1393 -0
  35. package/dist/media.service-mrBFJ2UQ.d.ts +1393 -0
  36. package/dist/services/index.d.mts +908 -2
  37. package/dist/services/index.d.ts +908 -2
  38. package/dist/services/index.js +1492 -1686
  39. package/dist/services/index.js.map +1 -1
  40. package/dist/services/index.mjs +1431 -1670
  41. package/dist/services/index.mjs.map +1 -1
  42. package/package.json +46 -6
  43. package/src/components/bespoke/BespokeAvailabilityBadge.tsx +32 -0
  44. package/src/components/bespoke/BespokeProgressTracker.tsx +58 -0
  45. package/src/components/bespoke/index.ts +3 -0
  46. package/src/components/booking/SlotPicker.tsx +97 -0
  47. package/src/components/booking/index.ts +1 -0
  48. package/src/components/cart/CartItem.tsx +81 -0
  49. package/src/components/cart/CartSidebar.tsx +115 -0
  50. package/src/components/cart/CartTypeMismatchBanner.tsx +55 -0
  51. package/src/components/cart/index.ts +3 -0
  52. package/src/components/index.ts +8 -0
  53. package/src/components/orders/DeliverableReviewer.tsx +139 -0
  54. package/src/components/orders/index.ts +1 -0
  55. package/src/components/product/ProductCard.tsx +350 -0
  56. package/src/components/product/ProductGrid.tsx +84 -0
  57. package/src/components/product/index.ts +2 -0
  58. package/src/components/shared/AddressAutocomplete.tsx +212 -0
  59. package/src/components/shared/AnalyticsScripts.tsx +56 -0
  60. package/src/components/shared/CookieConsentBanner.tsx +98 -0
  61. package/src/components/shared/ImageEditorModal.tsx +1066 -0
  62. package/src/components/shared/ImageViewerModal.tsx +598 -0
  63. package/src/components/shared/LucideReactIcon.tsx +52 -0
  64. package/src/components/shared/MapPinDrop.tsx +101 -0
  65. package/src/components/shared/MultiSelectPicker.tsx +193 -0
  66. package/src/components/shared/OfflineBanner.tsx +46 -0
  67. package/src/components/shared/SearchableInput.tsx +153 -0
  68. package/src/components/shared/SearchablePopover.tsx +166 -0
  69. package/src/components/shared/SmartImage.tsx +311 -0
  70. package/src/components/shared/TruncatedValue.tsx +27 -0
  71. package/src/components/shared/UnsavedChangesGuard.tsx +138 -0
  72. package/src/components/shared/index.ts +15 -0
  73. package/src/components/skeletons/CardSkeleton.tsx +26 -0
  74. package/src/components/skeletons/CartItemSkeleton.tsx +26 -0
  75. package/src/components/skeletons/OrderItemSkeleton.tsx +26 -0
  76. package/src/components/skeletons/ProductCardSkeleton.tsx +26 -0
  77. package/src/components/skeletons/TableSkeleton.tsx +42 -0
  78. package/src/components/skeletons/index.ts +5 -0
  79. package/src/config/index.ts +22 -4
  80. package/src/config/server.ts +45 -0
  81. package/src/context/sdk-context.tsx +5 -2
  82. package/src/generated/auth-openapi.ts +2935 -0
  83. package/src/generated/cart-openapi.ts +652 -0
  84. package/src/generated/cms-openapi.ts +1668 -0
  85. package/src/generated/crm-openapi.ts +986 -0
  86. package/src/generated/graphql.ts +126 -0
  87. package/src/generated/index.ts +11 -0
  88. package/src/generated/media-openapi.ts +613 -0
  89. package/src/generated/notification-openapi.ts +862 -0
  90. package/src/generated/payment-openapi.ts +2713 -0
  91. package/src/generated/store-openapi.ts +9510 -0
  92. package/src/graphql/operations/collections.graphql +32 -0
  93. package/src/graphql/operations/products.graphql +197 -0
  94. package/src/graphql/operations/wishlist.graphql +25 -0
  95. package/src/hooks/index.ts +9 -2
  96. package/src/hooks/use-auth.ts +163 -69
  97. package/src/hooks/use-bespoke-availability.ts +39 -22
  98. package/src/hooks/use-business-config.ts +51 -0
  99. package/src/hooks/use-cart.ts +310 -238
  100. package/src/hooks/use-cms.ts +107 -127
  101. package/src/hooks/use-collections.ts +35 -55
  102. package/src/hooks/use-consultations.ts +9 -136
  103. package/src/hooks/use-countries.ts +19 -28
  104. package/src/hooks/use-currencies.ts +8 -20
  105. package/src/hooks/use-customer-address.ts +64 -0
  106. package/src/hooks/use-feedback.ts +34 -0
  107. package/src/hooks/use-languages.ts +26 -39
  108. package/src/hooks/use-media-upload.ts +23 -0
  109. package/src/hooks/use-notification-stream.ts +88 -0
  110. package/src/hooks/use-notifications.ts +163 -0
  111. package/src/hooks/use-order-stream.ts +29 -29
  112. package/src/hooks/use-orders.ts +91 -73
  113. package/src/hooks/use-payment.ts +116 -84
  114. package/src/hooks/use-products.ts +65 -269
  115. package/src/hooks/use-push-notifications.ts +122 -0
  116. package/src/hooks/use-reviews.ts +175 -0
  117. package/src/hooks/use-service-booking.ts +109 -132
  118. package/src/hooks/use-states.ts +16 -30
  119. package/src/hooks/use-wishlist.ts +44 -69
  120. package/src/index.ts +15 -11
  121. package/src/services/auth.service.ts +422 -132
  122. package/src/services/bespoke.service.ts +69 -10
  123. package/src/services/cart.service.ts +155 -186
  124. package/src/services/cms.service.ts +41 -50
  125. package/src/services/collection.service.ts +25 -63
  126. package/src/services/config.service.ts +10 -21
  127. package/src/services/consultation.service.ts +36 -93
  128. package/src/services/feedback.service.ts +76 -0
  129. package/src/services/index.ts +7 -1
  130. package/src/services/legal.service.ts +62 -0
  131. package/src/services/logistics.service.ts +235 -53
  132. package/src/services/media.service.ts +115 -0
  133. package/src/services/notifications.service.ts +204 -20
  134. package/src/services/order.service.ts +498 -127
  135. package/src/services/payment.service.ts +149 -100
  136. package/src/services/product.service.ts +157 -814
  137. package/src/services/review.service.ts +211 -0
  138. package/src/services/service-booking.service.ts +198 -99
  139. package/src/services/wishlist.service.ts +27 -74
  140. package/src/types/auth/index.ts +161 -18
  141. package/src/types/business/index.ts +9 -1
  142. package/src/types/cms/index.ts +91 -6
  143. package/src/types/cms/legal.ts +18 -0
  144. package/src/types/consultations/index.ts +60 -68
  145. package/src/types/index.ts +5 -3
  146. package/src/types/media/index.ts +35 -3
  147. package/src/types/payments/index.ts +80 -16
  148. package/src/types/reviews/index.ts +116 -0
  149. package/src/types/services/index.ts +113 -38
  150. package/src/types/store/checkout.ts +53 -0
  151. package/src/types/store/index.ts +273 -52
  152. package/src/types/store/invoice.ts +31 -0
  153. package/src/types/store/shipping.ts +84 -3
  154. package/src/types/ui/index.ts +1 -1
  155. package/src/utils/checkout.ts +19 -3
  156. package/src/utils/cookieConsent.ts +34 -0
  157. package/src/utils/format.ts +408 -0
  158. package/src/utils/geolocation.ts +134 -0
  159. package/src/utils/graphql-url.ts +47 -0
  160. package/src/utils/guest-session.ts +59 -0
  161. package/src/utils/http-client.ts +147 -0
  162. package/src/utils/index.ts +11 -4
  163. package/src/utils/status-colors.ts +79 -0
  164. package/src/utils/token-refresh.ts +115 -0
  165. package/src/utils/validators.ts +13 -0
  166. package/src/utils/youtube.ts +18 -0
  167. package/dist/index-C5YO9gTl.d.mts +0 -507
  168. package/dist/index-C5YO9gTl.d.ts +0 -507
  169. package/dist/index-CefG7_xq.d.mts +0 -793
  170. package/dist/index-DeHCf3zI.d.ts +0 -793
  171. package/src/graphql/collections.graphql.ts +0 -48
  172. package/src/graphql/index.ts +0 -7
  173. package/src/graphql/products.graphql.ts +0 -860
  174. package/src/graphql/wishlist.graphql.ts +0 -34
  175. package/src/hooks/use-consultation-stream.ts +0 -142
  176. package/src/types/bespoke/index.ts +0 -39
@@ -0,0 +1,986 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/api/v1/comments": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ put?: never;
16
+ /** Submit a product comment/Q&A (customer-facing) */
17
+ post: operations["create-comment"];
18
+ delete?: never;
19
+ options?: never;
20
+ head?: never;
21
+ patch?: never;
22
+ trace?: never;
23
+ };
24
+ "/api/v1/comments/{comment_id}": {
25
+ parameters: {
26
+ query?: never;
27
+ header?: never;
28
+ path?: never;
29
+ cookie?: never;
30
+ };
31
+ get?: never;
32
+ /** Update an existing comment (customer-facing) */
33
+ put: operations["update-comment"];
34
+ post?: never;
35
+ delete?: never;
36
+ options?: never;
37
+ head?: never;
38
+ patch?: never;
39
+ trace?: never;
40
+ };
41
+ "/api/v1/consultations/": {
42
+ parameters: {
43
+ query?: never;
44
+ header?: never;
45
+ path?: never;
46
+ cookie?: never;
47
+ };
48
+ get?: never;
49
+ put?: never;
50
+ /** Create a consultation (customer-facing) */
51
+ post: operations["create-consultation"];
52
+ delete?: never;
53
+ options?: never;
54
+ head?: never;
55
+ patch?: never;
56
+ trace?: never;
57
+ };
58
+ "/api/v1/feedback/": {
59
+ parameters: {
60
+ query?: never;
61
+ header?: never;
62
+ path?: never;
63
+ cookie?: never;
64
+ };
65
+ get?: never;
66
+ put?: never;
67
+ /** Submit feedback or a complaint to the business (customer-facing) */
68
+ post: operations["create-feedback"];
69
+ delete?: never;
70
+ options?: never;
71
+ head?: never;
72
+ patch?: never;
73
+ trace?: never;
74
+ };
75
+ "/api/v1/feedback/my": {
76
+ parameters: {
77
+ query?: never;
78
+ header?: never;
79
+ path?: never;
80
+ cookie?: never;
81
+ };
82
+ /** The authenticated customer's own submitted feedback, paginated */
83
+ get: operations["list-my-feedback"];
84
+ put?: never;
85
+ post?: never;
86
+ delete?: never;
87
+ options?: never;
88
+ head?: never;
89
+ patch?: never;
90
+ trace?: never;
91
+ };
92
+ "/api/v1/media/confirm-upload": {
93
+ parameters: {
94
+ query?: never;
95
+ header?: never;
96
+ path?: never;
97
+ cookie?: never;
98
+ };
99
+ get?: never;
100
+ put?: never;
101
+ /** Confirm a successful direct-to-R2 upload and write metadata (CRM media) */
102
+ post: operations["confirm-crm-media-upload"];
103
+ delete?: never;
104
+ options?: never;
105
+ head?: never;
106
+ patch?: never;
107
+ trace?: never;
108
+ };
109
+ "/api/v1/media/presigned-url": {
110
+ parameters: {
111
+ query?: never;
112
+ header?: never;
113
+ path?: never;
114
+ cookie?: never;
115
+ };
116
+ get?: never;
117
+ put?: never;
118
+ /** Generate a presigned PUT URL for direct client upload to R2 (CRM media) */
119
+ post: operations["get-crm-media-presigned-url"];
120
+ delete?: never;
121
+ options?: never;
122
+ head?: never;
123
+ patch?: never;
124
+ trace?: never;
125
+ };
126
+ "/api/v1/media/{media_id}": {
127
+ parameters: {
128
+ query?: never;
129
+ header?: never;
130
+ path?: never;
131
+ cookie?: never;
132
+ };
133
+ get?: never;
134
+ put?: never;
135
+ post?: never;
136
+ /** Delete a media asset from storage and the media system database */
137
+ delete: operations["delete-crm-media"];
138
+ options?: never;
139
+ head?: never;
140
+ patch?: never;
141
+ trace?: never;
142
+ };
143
+ "/api/v1/products/{product_id}/comments": {
144
+ parameters: {
145
+ query?: never;
146
+ header?: never;
147
+ path?: never;
148
+ cookie?: never;
149
+ };
150
+ /** Paginated comments for a product (public storefront) */
151
+ get: operations["get-product-comments"];
152
+ put?: never;
153
+ post?: never;
154
+ delete?: never;
155
+ options?: never;
156
+ head?: never;
157
+ patch?: never;
158
+ trace?: never;
159
+ };
160
+ "/api/v1/products/{product_id}/reviews": {
161
+ parameters: {
162
+ query?: never;
163
+ header?: never;
164
+ path?: never;
165
+ cookie?: never;
166
+ };
167
+ /** Paginated reviews for a product (public storefront) */
168
+ get: operations["get-product-reviews"];
169
+ put?: never;
170
+ post?: never;
171
+ delete?: never;
172
+ options?: never;
173
+ head?: never;
174
+ patch?: never;
175
+ trace?: never;
176
+ };
177
+ "/api/v1/reviews": {
178
+ parameters: {
179
+ query?: never;
180
+ header?: never;
181
+ path?: never;
182
+ cookie?: never;
183
+ };
184
+ get?: never;
185
+ put?: never;
186
+ /** Submit a product review (customer-facing, purchase-verified) */
187
+ post: operations["create-review"];
188
+ delete?: never;
189
+ options?: never;
190
+ head?: never;
191
+ patch?: never;
192
+ trace?: never;
193
+ };
194
+ "/api/v1/reviews/{review_id}": {
195
+ parameters: {
196
+ query?: never;
197
+ header?: never;
198
+ path?: never;
199
+ cookie?: never;
200
+ };
201
+ get?: never;
202
+ /** Update an existing review (customer-facing, within the edit window) */
203
+ put: operations["update-review"];
204
+ post?: never;
205
+ delete?: never;
206
+ options?: never;
207
+ head?: never;
208
+ patch?: never;
209
+ trace?: never;
210
+ };
211
+ }
212
+ export type webhooks = Record<string, never>;
213
+ export interface components {
214
+ schemas: {
215
+ CommentResponse: {
216
+ /**
217
+ * Format: uri
218
+ * @description A URL to the JSON Schema for this object.
219
+ * @example https://example.com/schemas/CommentResponse.json
220
+ */
221
+ readonly $schema?: string;
222
+ body: string;
223
+ business_id: string;
224
+ /** Format: date-time */
225
+ created_at: string;
226
+ customer_id: string;
227
+ customer_name_masked: string;
228
+ id: string;
229
+ is_merchant_reply: boolean;
230
+ moderation_status: string;
231
+ parent_comment_id: string;
232
+ product_id: string;
233
+ /** Format: date-time */
234
+ updated_at: string;
235
+ };
236
+ ConsultationResponse: {
237
+ /**
238
+ * Format: uri
239
+ * @description A URL to the JSON Schema for this object.
240
+ * @example https://example.com/schemas/ConsultationResponse.json
241
+ */
242
+ readonly $schema?: string;
243
+ business_id: string;
244
+ capacity_config_id: string;
245
+ /** Format: date-time */
246
+ created_at: string;
247
+ customer_id: string;
248
+ id: string;
249
+ product_id: string;
250
+ /** Format: double */
251
+ quote_amount: number | null;
252
+ slot_booking_id: string;
253
+ status: string;
254
+ structured_details: {
255
+ [key: string]: unknown;
256
+ };
257
+ /** Format: date-time */
258
+ updated_at: string;
259
+ };
260
+ "Create-commentRequest": {
261
+ /**
262
+ * Format: uri
263
+ * @description A URL to the JSON Schema for this object.
264
+ * @example https://example.com/schemas/Create-commentRequest.json
265
+ */
266
+ readonly $schema?: string;
267
+ body: string;
268
+ parent_comment_id?: string;
269
+ product_id: string;
270
+ };
271
+ "Create-consultationRequest": {
272
+ /**
273
+ * Format: uri
274
+ * @description A URL to the JSON Schema for this object.
275
+ * @example https://example.com/schemas/Create-consultationRequest.json
276
+ */
277
+ readonly $schema?: string;
278
+ customer_id?: string;
279
+ product_id?: string;
280
+ /** Format: double */
281
+ quote_amount?: number;
282
+ status?: string;
283
+ structured_details?: {
284
+ [key: string]: unknown;
285
+ };
286
+ };
287
+ "Create-feedbackRequest": {
288
+ /**
289
+ * Format: uri
290
+ * @description A URL to the JSON Schema for this object.
291
+ * @example https://example.com/schemas/Create-feedbackRequest.json
292
+ */
293
+ readonly $schema?: string;
294
+ body: string;
295
+ category?: string;
296
+ order_id?: string;
297
+ subject: string;
298
+ };
299
+ "Create-reviewRequest": {
300
+ /**
301
+ * Format: uri
302
+ * @description A URL to the JSON Schema for this object.
303
+ * @example https://example.com/schemas/Create-reviewRequest.json
304
+ */
305
+ readonly $schema?: string;
306
+ body: string;
307
+ media?: string[] | null;
308
+ media_ids?: string[] | null;
309
+ order_id: string;
310
+ product_id: string;
311
+ /** Format: int64 */
312
+ rating: number;
313
+ };
314
+ "Delete-crm-mediaResponse": {
315
+ /**
316
+ * Format: uri
317
+ * @description A URL to the JSON Schema for this object.
318
+ * @example https://example.com/schemas/Delete-crm-mediaResponse.json
319
+ */
320
+ readonly $schema?: string;
321
+ message: string;
322
+ };
323
+ EnvelopeFeedbackResponse: {
324
+ /**
325
+ * Format: uri
326
+ * @description A URL to the JSON Schema for this object.
327
+ * @example https://example.com/schemas/EnvelopeFeedbackResponse.json
328
+ */
329
+ readonly $schema?: string;
330
+ /** Format: int64 */
331
+ count: number;
332
+ /** Format: int64 */
333
+ page: number;
334
+ /** Format: int64 */
335
+ page_size: number;
336
+ results: components["schemas"]["FeedbackResponse"][] | null;
337
+ /** Format: int64 */
338
+ total_pages: number;
339
+ };
340
+ ErrorDetail: {
341
+ /** @description Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id' */
342
+ location?: string;
343
+ /** @description Error message text */
344
+ message?: string;
345
+ /** @description The value at the given location */
346
+ value?: unknown;
347
+ };
348
+ ErrorModel: {
349
+ /**
350
+ * Format: uri
351
+ * @description A URL to the JSON Schema for this object.
352
+ * @example https://example.com/schemas/ErrorModel.json
353
+ */
354
+ readonly $schema?: string;
355
+ /**
356
+ * @description A human-readable explanation specific to this occurrence of the problem.
357
+ * @example Property foo is required but is missing.
358
+ */
359
+ detail?: string;
360
+ /** @description Optional list of individual error details */
361
+ errors?: components["schemas"]["ErrorDetail"][] | null;
362
+ /**
363
+ * Format: uri
364
+ * @description A URI reference that identifies the specific occurrence of the problem.
365
+ * @example https://example.com/error-log/abc123
366
+ */
367
+ instance?: string;
368
+ /**
369
+ * Format: int64
370
+ * @description HTTP status code
371
+ * @example 400
372
+ */
373
+ status?: number;
374
+ /**
375
+ * @description A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
376
+ * @example Bad Request
377
+ */
378
+ title?: string;
379
+ /**
380
+ * Format: uri
381
+ * @description A URI reference to human-readable documentation for the error.
382
+ * @default about:blank
383
+ * @example https://example.com/errors/example
384
+ */
385
+ type: string;
386
+ };
387
+ FeedbackResponse: {
388
+ /**
389
+ * Format: uri
390
+ * @description A URL to the JSON Schema for this object.
391
+ * @example https://example.com/schemas/FeedbackResponse.json
392
+ */
393
+ readonly $schema?: string;
394
+ body: string;
395
+ business_id: string;
396
+ category: string;
397
+ /** Format: date-time */
398
+ created_at: string;
399
+ customer_id: string;
400
+ id: string;
401
+ merchant_reply: string | null;
402
+ /** Format: date-time */
403
+ merchant_reply_at: string | null;
404
+ order_id: string;
405
+ replied_by: string | null;
406
+ status: string;
407
+ subject: string;
408
+ /** Format: date-time */
409
+ updated_at: string;
410
+ };
411
+ "Get-product-commentsResponse": {
412
+ /**
413
+ * Format: uri
414
+ * @description A URL to the JSON Schema for this object.
415
+ * @example https://example.com/schemas/Get-product-commentsResponse.json
416
+ */
417
+ readonly $schema?: string;
418
+ /** Format: int64 */
419
+ count: number;
420
+ /** Format: int64 */
421
+ page: number;
422
+ /** Format: int64 */
423
+ page_size: number;
424
+ results: components["schemas"]["CommentResponse"][] | null;
425
+ /** Format: int64 */
426
+ total_pages: number;
427
+ };
428
+ "Get-product-rating-summary-internalResponse": {
429
+ /**
430
+ * Format: uri
431
+ * @description A URL to the JSON Schema for this object.
432
+ * @example https://example.com/schemas/Get-product-rating-summary-internalResponse.json
433
+ */
434
+ readonly $schema?: string;
435
+ /** Format: double */
436
+ average_rating: number | null;
437
+ product_id: string;
438
+ /** Format: int64 */
439
+ rating_count: number;
440
+ };
441
+ "Get-product-reviewsResponse": {
442
+ /**
443
+ * Format: uri
444
+ * @description A URL to the JSON Schema for this object.
445
+ * @example https://example.com/schemas/Get-product-reviewsResponse.json
446
+ */
447
+ readonly $schema?: string;
448
+ /** Format: double */
449
+ average_rating: number | null;
450
+ /** Format: int64 */
451
+ count: number;
452
+ /** Format: int64 */
453
+ page: number;
454
+ /** Format: int64 */
455
+ page_size: number;
456
+ rating_distribution: {
457
+ [key: string]: number;
458
+ };
459
+ results: components["schemas"]["ReviewResponse"][] | null;
460
+ /** Format: int64 */
461
+ total_pages: number;
462
+ };
463
+ MediaAssetResponse: {
464
+ /**
465
+ * Format: uri
466
+ * @description A URL to the JSON Schema for this object.
467
+ * @example https://example.com/schemas/MediaAssetResponse.json
468
+ */
469
+ readonly $schema?: string;
470
+ affiliation: string;
471
+ alt: string | null;
472
+ bucket_name: string;
473
+ business_id: string;
474
+ created_at: string;
475
+ description: string | null;
476
+ entity_id: string;
477
+ entity_type: string;
478
+ file_type: string;
479
+ filename: string;
480
+ id: string;
481
+ original_filename: string;
482
+ r2_url: string;
483
+ /** Format: int64 */
484
+ size: number;
485
+ storage_provider: string;
486
+ updated_at: string;
487
+ url: string;
488
+ };
489
+ PresignedUploadURLResponse: {
490
+ /**
491
+ * Format: uri
492
+ * @description A URL to the JSON Schema for this object.
493
+ * @example https://example.com/schemas/PresignedUploadURLResponse.json
494
+ */
495
+ readonly $schema?: string;
496
+ bucket: string;
497
+ /** Format: int64 */
498
+ expires_in: number;
499
+ metadata: {
500
+ [key: string]: unknown;
501
+ };
502
+ presigned_url: string;
503
+ storage_path: string;
504
+ };
505
+ ReviewResponse: {
506
+ /**
507
+ * Format: uri
508
+ * @description A URL to the JSON Schema for this object.
509
+ * @example https://example.com/schemas/ReviewResponse.json
510
+ */
511
+ readonly $schema?: string;
512
+ body: string;
513
+ business_id: string;
514
+ /** Format: date-time */
515
+ created_at: string;
516
+ customer_id: string;
517
+ customer_name_masked: string;
518
+ /** Format: int64 */
519
+ edit_count: number;
520
+ /** Format: date-time */
521
+ edited_at: string | null;
522
+ id: string;
523
+ media: string[] | null;
524
+ media_ids: string[] | null;
525
+ merchant_reply: string | null;
526
+ /** Format: date-time */
527
+ merchant_reply_at: string | null;
528
+ moderation_status: string;
529
+ order_id: string;
530
+ product_id: string;
531
+ /** Format: int64 */
532
+ rating: number;
533
+ verified_purchase: boolean;
534
+ };
535
+ "Update-commentRequest": {
536
+ /**
537
+ * Format: uri
538
+ * @description A URL to the JSON Schema for this object.
539
+ * @example https://example.com/schemas/Update-commentRequest.json
540
+ */
541
+ readonly $schema?: string;
542
+ body: string;
543
+ };
544
+ "Update-reviewRequest": {
545
+ /**
546
+ * Format: uri
547
+ * @description A URL to the JSON Schema for this object.
548
+ * @example https://example.com/schemas/Update-reviewRequest.json
549
+ */
550
+ readonly $schema?: string;
551
+ body?: string;
552
+ media?: string[];
553
+ media_ids?: string[];
554
+ /** Format: int64 */
555
+ rating?: number;
556
+ };
557
+ };
558
+ responses: never;
559
+ parameters: never;
560
+ requestBodies: never;
561
+ headers: never;
562
+ pathItems: never;
563
+ }
564
+ export type $defs = Record<string, never>;
565
+ export interface operations {
566
+ "create-comment": {
567
+ parameters: {
568
+ query?: never;
569
+ header?: never;
570
+ path?: never;
571
+ cookie?: never;
572
+ };
573
+ requestBody: {
574
+ content: {
575
+ "application/json": components["schemas"]["Create-commentRequest"];
576
+ };
577
+ };
578
+ responses: {
579
+ /** @description Created */
580
+ 201: {
581
+ headers: {
582
+ [name: string]: unknown;
583
+ };
584
+ content: {
585
+ "application/json": components["schemas"]["CommentResponse"];
586
+ };
587
+ };
588
+ /** @description Error */
589
+ default: {
590
+ headers: {
591
+ [name: string]: unknown;
592
+ };
593
+ content: {
594
+ "application/problem+json": components["schemas"]["ErrorModel"];
595
+ };
596
+ };
597
+ };
598
+ };
599
+ "update-comment": {
600
+ parameters: {
601
+ query?: never;
602
+ header?: never;
603
+ path: {
604
+ comment_id: string;
605
+ };
606
+ cookie?: never;
607
+ };
608
+ requestBody: {
609
+ content: {
610
+ "application/json": components["schemas"]["Update-commentRequest"];
611
+ };
612
+ };
613
+ responses: {
614
+ /** @description OK */
615
+ 200: {
616
+ headers: {
617
+ [name: string]: unknown;
618
+ };
619
+ content: {
620
+ "application/json": components["schemas"]["CommentResponse"];
621
+ };
622
+ };
623
+ /** @description Error */
624
+ default: {
625
+ headers: {
626
+ [name: string]: unknown;
627
+ };
628
+ content: {
629
+ "application/problem+json": components["schemas"]["ErrorModel"];
630
+ };
631
+ };
632
+ };
633
+ };
634
+ "create-consultation": {
635
+ parameters: {
636
+ query?: never;
637
+ header?: never;
638
+ path?: never;
639
+ cookie?: never;
640
+ };
641
+ requestBody: {
642
+ content: {
643
+ "application/json": components["schemas"]["Create-consultationRequest"];
644
+ };
645
+ };
646
+ responses: {
647
+ /** @description Created */
648
+ 201: {
649
+ headers: {
650
+ [name: string]: unknown;
651
+ };
652
+ content: {
653
+ "application/json": components["schemas"]["ConsultationResponse"];
654
+ };
655
+ };
656
+ /** @description Error */
657
+ default: {
658
+ headers: {
659
+ [name: string]: unknown;
660
+ };
661
+ content: {
662
+ "application/problem+json": components["schemas"]["ErrorModel"];
663
+ };
664
+ };
665
+ };
666
+ };
667
+ "create-feedback": {
668
+ parameters: {
669
+ query?: never;
670
+ header?: never;
671
+ path?: never;
672
+ cookie?: never;
673
+ };
674
+ requestBody: {
675
+ content: {
676
+ "application/json": components["schemas"]["Create-feedbackRequest"];
677
+ };
678
+ };
679
+ responses: {
680
+ /** @description Created */
681
+ 201: {
682
+ headers: {
683
+ [name: string]: unknown;
684
+ };
685
+ content: {
686
+ "application/json": components["schemas"]["FeedbackResponse"];
687
+ };
688
+ };
689
+ /** @description Error */
690
+ default: {
691
+ headers: {
692
+ [name: string]: unknown;
693
+ };
694
+ content: {
695
+ "application/problem+json": components["schemas"]["ErrorModel"];
696
+ };
697
+ };
698
+ };
699
+ };
700
+ "list-my-feedback": {
701
+ parameters: {
702
+ query?: {
703
+ /** @description 1-indexed page number */
704
+ page?: number;
705
+ /** @description Rows per page (1-100) */
706
+ page_size?: number;
707
+ };
708
+ header?: never;
709
+ path?: never;
710
+ cookie?: never;
711
+ };
712
+ requestBody?: never;
713
+ responses: {
714
+ /** @description OK */
715
+ 200: {
716
+ headers: {
717
+ [name: string]: unknown;
718
+ };
719
+ content: {
720
+ "application/json": components["schemas"]["EnvelopeFeedbackResponse"];
721
+ };
722
+ };
723
+ /** @description Error */
724
+ default: {
725
+ headers: {
726
+ [name: string]: unknown;
727
+ };
728
+ content: {
729
+ "application/problem+json": components["schemas"]["ErrorModel"];
730
+ };
731
+ };
732
+ };
733
+ };
734
+ "confirm-crm-media-upload": {
735
+ parameters: {
736
+ query?: {
737
+ storage_path?: string;
738
+ business_id?: string;
739
+ context?: string;
740
+ entity_id?: string;
741
+ original_filename?: string;
742
+ content_type?: string;
743
+ size?: number;
744
+ affiliation?: string;
745
+ owner_id?: string;
746
+ alt?: string;
747
+ description?: string;
748
+ idempotency_key?: string;
749
+ };
750
+ header?: never;
751
+ path?: never;
752
+ cookie?: never;
753
+ };
754
+ requestBody?: never;
755
+ responses: {
756
+ /** @description OK */
757
+ 200: {
758
+ headers: {
759
+ [name: string]: unknown;
760
+ };
761
+ content: {
762
+ "application/json": components["schemas"]["MediaAssetResponse"];
763
+ };
764
+ };
765
+ /** @description Error */
766
+ default: {
767
+ headers: {
768
+ [name: string]: unknown;
769
+ };
770
+ content: {
771
+ "application/problem+json": components["schemas"]["ErrorModel"];
772
+ };
773
+ };
774
+ };
775
+ };
776
+ "get-crm-media-presigned-url": {
777
+ parameters: {
778
+ query?: {
779
+ filename?: string;
780
+ content_type?: string;
781
+ business_id?: string;
782
+ owner_id?: string;
783
+ context?: string;
784
+ entity_id?: string;
785
+ affiliation?: string;
786
+ alt?: string;
787
+ description?: string;
788
+ idempotency_key?: string;
789
+ expires_in_seconds?: number;
790
+ };
791
+ header?: never;
792
+ path?: never;
793
+ cookie?: never;
794
+ };
795
+ requestBody?: never;
796
+ responses: {
797
+ /** @description OK */
798
+ 200: {
799
+ headers: {
800
+ [name: string]: unknown;
801
+ };
802
+ content: {
803
+ "application/json": components["schemas"]["PresignedUploadURLResponse"];
804
+ };
805
+ };
806
+ /** @description Error */
807
+ default: {
808
+ headers: {
809
+ [name: string]: unknown;
810
+ };
811
+ content: {
812
+ "application/problem+json": components["schemas"]["ErrorModel"];
813
+ };
814
+ };
815
+ };
816
+ };
817
+ "delete-crm-media": {
818
+ parameters: {
819
+ query?: never;
820
+ header?: never;
821
+ path: {
822
+ media_id: string;
823
+ };
824
+ cookie?: never;
825
+ };
826
+ requestBody?: never;
827
+ responses: {
828
+ /** @description OK */
829
+ 200: {
830
+ headers: {
831
+ [name: string]: unknown;
832
+ };
833
+ content: {
834
+ "application/json": components["schemas"]["Delete-crm-mediaResponse"];
835
+ };
836
+ };
837
+ /** @description Error */
838
+ default: {
839
+ headers: {
840
+ [name: string]: unknown;
841
+ };
842
+ content: {
843
+ "application/problem+json": components["schemas"]["ErrorModel"];
844
+ };
845
+ };
846
+ };
847
+ };
848
+ "get-product-comments": {
849
+ parameters: {
850
+ query?: {
851
+ page?: number;
852
+ page_size?: number;
853
+ moderation_status?: string;
854
+ };
855
+ header?: never;
856
+ path: {
857
+ product_id: string;
858
+ };
859
+ cookie?: never;
860
+ };
861
+ requestBody?: never;
862
+ responses: {
863
+ /** @description OK */
864
+ 200: {
865
+ headers: {
866
+ [name: string]: unknown;
867
+ };
868
+ content: {
869
+ "application/json": components["schemas"]["Get-product-commentsResponse"];
870
+ };
871
+ };
872
+ /** @description Error */
873
+ default: {
874
+ headers: {
875
+ [name: string]: unknown;
876
+ };
877
+ content: {
878
+ "application/problem+json": components["schemas"]["ErrorModel"];
879
+ };
880
+ };
881
+ };
882
+ };
883
+ "get-product-reviews": {
884
+ parameters: {
885
+ query?: {
886
+ page?: number;
887
+ page_size?: number;
888
+ moderation_status?: string;
889
+ };
890
+ header?: never;
891
+ path: {
892
+ product_id: string;
893
+ };
894
+ cookie?: never;
895
+ };
896
+ requestBody?: never;
897
+ responses: {
898
+ /** @description OK */
899
+ 200: {
900
+ headers: {
901
+ [name: string]: unknown;
902
+ };
903
+ content: {
904
+ "application/json": components["schemas"]["Get-product-reviewsResponse"];
905
+ };
906
+ };
907
+ /** @description Error */
908
+ default: {
909
+ headers: {
910
+ [name: string]: unknown;
911
+ };
912
+ content: {
913
+ "application/problem+json": components["schemas"]["ErrorModel"];
914
+ };
915
+ };
916
+ };
917
+ };
918
+ "create-review": {
919
+ parameters: {
920
+ query?: never;
921
+ header?: never;
922
+ path?: never;
923
+ cookie?: never;
924
+ };
925
+ requestBody: {
926
+ content: {
927
+ "application/json": components["schemas"]["Create-reviewRequest"];
928
+ };
929
+ };
930
+ responses: {
931
+ /** @description Created */
932
+ 201: {
933
+ headers: {
934
+ [name: string]: unknown;
935
+ };
936
+ content: {
937
+ "application/json": components["schemas"]["ReviewResponse"];
938
+ };
939
+ };
940
+ /** @description Error */
941
+ default: {
942
+ headers: {
943
+ [name: string]: unknown;
944
+ };
945
+ content: {
946
+ "application/problem+json": components["schemas"]["ErrorModel"];
947
+ };
948
+ };
949
+ };
950
+ };
951
+ "update-review": {
952
+ parameters: {
953
+ query?: never;
954
+ header?: never;
955
+ path: {
956
+ review_id: string;
957
+ };
958
+ cookie?: never;
959
+ };
960
+ requestBody: {
961
+ content: {
962
+ "application/json": components["schemas"]["Update-reviewRequest"];
963
+ };
964
+ };
965
+ responses: {
966
+ /** @description OK */
967
+ 200: {
968
+ headers: {
969
+ [name: string]: unknown;
970
+ };
971
+ content: {
972
+ "application/json": components["schemas"]["ReviewResponse"];
973
+ };
974
+ };
975
+ /** @description Error */
976
+ default: {
977
+ headers: {
978
+ [name: string]: unknown;
979
+ };
980
+ content: {
981
+ "application/problem+json": components["schemas"]["ErrorModel"];
982
+ };
983
+ };
984
+ };
985
+ };
986
+ }