@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,613 @@
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/media/upload/presigned": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ put?: never;
16
+ /**
17
+ * Generate presigned PUT URL for direct client upload to R2
18
+ * @description Generate a presigned PUT URL for direct client uploads to R2.
19
+ *
20
+ * Flow:
21
+ * 1. Client calls this endpoint to get a presigned URL. A `MediaAsset` row is
22
+ * created immediately with status="pending" and an `expires_at` — this is
23
+ * what lets confirm-upload later verify the storage_path was actually
24
+ * issued by this service (not guessed), and what the GC job sweeps if the
25
+ * client never confirms.
26
+ * 2. Client uploads directly to R2 using the presigned URL.
27
+ * 3. Client calls /confirm-upload, which validates the real object and flips
28
+ * this row to "processing"/"ready".
29
+ */
30
+ post: operations["generate_presigned_upload_url_api_v1_media_upload_presigned_post"];
31
+ delete?: never;
32
+ options?: never;
33
+ head?: never;
34
+ patch?: never;
35
+ trace?: never;
36
+ };
37
+ "/api/v1/media/confirm-upload": {
38
+ parameters: {
39
+ query?: never;
40
+ header?: never;
41
+ path?: never;
42
+ cookie?: never;
43
+ };
44
+ get?: never;
45
+ put?: never;
46
+ /**
47
+ * Confirm direct upload and write metadata to database
48
+ * @description Called by client after successful direct upload to R2.
49
+ *
50
+ * Trust boundary: `content_type`/`size` above are the client's claims and are
51
+ * used only to select which context rules to check against and as an
52
+ * idempotency/dedup aid — the actual persisted `file_type`/`size` always come
53
+ * from the downloaded bytes. `storage_path` must match a `MediaAsset` row this
54
+ * service created at presign time (status="pending"); a storage_path with no
55
+ * such row is rejected outright rather than trusted, which also means a
56
+ * confirm-upload call can never write a record for an object this service
57
+ * didn't itself hand out a presigned URL for.
58
+ */
59
+ post: operations["confirm_upload_api_v1_media_confirm_upload_post"];
60
+ delete?: never;
61
+ options?: never;
62
+ head?: never;
63
+ patch?: never;
64
+ trace?: never;
65
+ };
66
+ "/api/v1/media/": {
67
+ parameters: {
68
+ query?: never;
69
+ header?: never;
70
+ path?: never;
71
+ cookie?: never;
72
+ };
73
+ /**
74
+ * List media assets for a business
75
+ * @description Return all (or filtered) media assets for ``business_id``, newest first.
76
+ *
77
+ * Read access is public - no authentication required. However, if authenticated,
78
+ * users can only access their own business's media assets.
79
+ */
80
+ get: operations["list_media_api_v1_media__get"];
81
+ put?: never;
82
+ post?: never;
83
+ delete?: never;
84
+ options?: never;
85
+ head?: never;
86
+ patch?: never;
87
+ trace?: never;
88
+ };
89
+ "/api/v1/media/{asset_id}/metadata": {
90
+ parameters: {
91
+ query?: never;
92
+ header?: never;
93
+ path?: never;
94
+ cookie?: never;
95
+ };
96
+ /**
97
+ * Fetch metadata of a single media asset
98
+ * @description Returns JSON metadata for the specified asset_id.
99
+ *
100
+ * For `digital_product`/`export` assets, `.url` is a freshly generated
101
+ * presigned R2 GET URL (these assets are stored non-public — the raw
102
+ * `r2_url` is not fetchable directly). For every other context, `.url`
103
+ * is the same public R2 URL as `.r2_url`.
104
+ */
105
+ get: operations["get_media_by_id_api_v1_media__asset_id__metadata_get"];
106
+ put?: never;
107
+ post?: never;
108
+ delete?: never;
109
+ options?: never;
110
+ head?: never;
111
+ patch?: never;
112
+ trace?: never;
113
+ };
114
+ "/api/v1/media/{asset_id}": {
115
+ parameters: {
116
+ query?: never;
117
+ header?: never;
118
+ path?: never;
119
+ cookie?: never;
120
+ };
121
+ get?: never;
122
+ put?: never;
123
+ post?: never;
124
+ /** Permanently delete a media asset */
125
+ delete: operations["delete_media_api_v1_media__asset_id__delete"];
126
+ options?: never;
127
+ head?: never;
128
+ /**
129
+ * Update alt text, description, or affiliation of an asset
130
+ * @description Partial update — only fields explicitly included in the JSON body are changed.
131
+ * The file itself is never modified by this endpoint.
132
+ */
133
+ patch: operations["update_media_metadata_api_v1_media__asset_id__patch"];
134
+ trace?: never;
135
+ };
136
+ }
137
+ export type webhooks = Record<string, never>;
138
+ export interface components {
139
+ schemas: {
140
+ /** Body_upload_export_csv_api_v1_media_upload_export_post */
141
+ Body_upload_export_csv_api_v1_media_upload_export_post: {
142
+ /** File */
143
+ file: string;
144
+ };
145
+ /** HTTPValidationError */
146
+ HTTPValidationError: {
147
+ /** Detail */
148
+ detail?: components["schemas"]["ValidationError"][];
149
+ };
150
+ /**
151
+ * MediaAssetResponse
152
+ * @description Full representation of a stored media asset returned to API consumers.
153
+ */
154
+ MediaAssetResponse: {
155
+ /**
156
+ * Id
157
+ * @description MongoDB document ID (string)
158
+ */
159
+ id: string;
160
+ /**
161
+ * Url
162
+ * @description Absolute public/signed URL to serve the asset
163
+ */
164
+ url: string;
165
+ /**
166
+ * Alt
167
+ * @description Accessibility alt text
168
+ */
169
+ alt?: string | null;
170
+ /**
171
+ * Description
172
+ * @description Contextual human-readable description
173
+ */
174
+ description?: string | null;
175
+ /**
176
+ * Filename
177
+ * @description Stored filename (UUID + extension)
178
+ */
179
+ filename: string;
180
+ /**
181
+ * Original Filename
182
+ * @description Original filename from the client
183
+ */
184
+ original_filename: string;
185
+ /**
186
+ * File Type
187
+ * @description MIME type, e.g. image/jpeg
188
+ */
189
+ file_type: string;
190
+ /**
191
+ * Size
192
+ * @description File size in bytes
193
+ */
194
+ size: number;
195
+ /**
196
+ * Storage Provider
197
+ * @description Storage backend: 'r2'
198
+ */
199
+ storage_provider: string;
200
+ /**
201
+ * R2 Url
202
+ * @description Direct Cloudflare R2 public URL
203
+ */
204
+ r2_url: string;
205
+ /**
206
+ * Bucket Name
207
+ * @description R2 bucket name
208
+ */
209
+ bucket_name: string;
210
+ /**
211
+ * Business Id
212
+ * @description Owning business UUID
213
+ */
214
+ business_id: string;
215
+ /**
216
+ * Affiliation
217
+ * @description Entity tag: Product | User | Business | Collection | Chat | General
218
+ */
219
+ affiliation: string;
220
+ /**
221
+ * Entity Type
222
+ * @description The context type (e.g. product, user, business)
223
+ */
224
+ entity_type: string;
225
+ /**
226
+ * Entity Id
227
+ * @description The ID of the entity this file belongs to
228
+ */
229
+ entity_id: string;
230
+ /**
231
+ * Status
232
+ * @description pending | processing | ready | failed
233
+ */
234
+ status: string;
235
+ /**
236
+ * Thumbnail Small Path
237
+ * @description R2 key of the small (150x150) derivative, once ready
238
+ */
239
+ thumbnail_small_path?: string | null;
240
+ /**
241
+ * Thumbnail Medium Path
242
+ * @description R2 key of the medium (300x300) derivative, once ready
243
+ */
244
+ thumbnail_medium_path?: string | null;
245
+ /**
246
+ * Thumbnail Large Path
247
+ * @description R2 key of the large (600x600) derivative, once ready
248
+ */
249
+ thumbnail_large_path?: string | null;
250
+ /**
251
+ * Uploaded By Name
252
+ * @description Friendly display name of the uploader
253
+ */
254
+ uploaded_by_name?: string | null;
255
+ /**
256
+ * Created At
257
+ * @description ISO 8601 creation timestamp
258
+ */
259
+ created_at: string;
260
+ /**
261
+ * Updated At
262
+ * @description ISO 8601 last-update timestamp
263
+ */
264
+ updated_at: string;
265
+ /**
266
+ * Idempotency Key
267
+ * @description Logical key for intelligent replacement
268
+ */
269
+ idempotency_key?: string | null;
270
+ };
271
+ /**
272
+ * MediaAssetUpdate
273
+ * @description Partial update payload for PATCH /media/{asset_id}.
274
+ */
275
+ MediaAssetUpdate: {
276
+ /**
277
+ * Alt
278
+ * @description New alt text
279
+ */
280
+ alt?: string | null;
281
+ /**
282
+ * Description
283
+ * @description New description
284
+ */
285
+ description?: string | null;
286
+ /**
287
+ * Affiliation
288
+ * @description New affiliation tag (Product | User | Business | Collection | Runway | Chat | General)
289
+ */
290
+ affiliation?: string | null;
291
+ };
292
+ /**
293
+ * MediaUploadResponse
294
+ * @description URL-only response for upload endpoints. Simplifies frontend integration.
295
+ */
296
+ MediaUploadResponse: {
297
+ /**
298
+ * Url
299
+ * @description Absolute public/signed URL to serve the asset
300
+ */
301
+ url: string;
302
+ };
303
+ /**
304
+ * StorageStatsResponse
305
+ * @description Aggregated storage statistics for a single business.
306
+ */
307
+ StorageStatsResponse: {
308
+ /**
309
+ * Total Size
310
+ * @description Total bytes consumed across all assets
311
+ * @default 0
312
+ */
313
+ total_size: number;
314
+ /**
315
+ * Total Count
316
+ * @description Total number of stored assets
317
+ * @default 0
318
+ */
319
+ total_count: number;
320
+ /**
321
+ * Used Gb
322
+ * @description Storage used in GB (4 decimal places)
323
+ * @default 0
324
+ */
325
+ used_gb: number;
326
+ /**
327
+ * Limit Gb
328
+ * @description Storage quota in GB for this business's plan
329
+ * @default 5
330
+ */
331
+ limit_gb: number;
332
+ /**
333
+ * Breakdown
334
+ * @description Per-affiliation asset counts (canonical: Content, Product, Collection, Chat, BusinessOwner, Staff, Customer, General)
335
+ */
336
+ breakdown?: {
337
+ [key: string]: number;
338
+ };
339
+ /**
340
+ * Grouped Breakdown
341
+ * @description Grouped affiliation counts for logical categories: {"Content": 15, "Products": 42, "Collections": 8, "Chat": 5, "Users": 10, "General": 3}
342
+ */
343
+ grouped_breakdown?: {
344
+ [key: string]: number;
345
+ };
346
+ };
347
+ /** ValidationError */
348
+ ValidationError: {
349
+ /** Location */
350
+ loc: (string | number)[];
351
+ /** Message */
352
+ msg: string;
353
+ /** Error Type */
354
+ type: string;
355
+ /** Input */
356
+ input?: unknown;
357
+ /** Context */
358
+ ctx?: Record<string, never>;
359
+ };
360
+ };
361
+ responses: never;
362
+ parameters: never;
363
+ requestBodies: never;
364
+ headers: never;
365
+ pathItems: never;
366
+ }
367
+ export type $defs = Record<string, never>;
368
+ export interface operations {
369
+ generate_presigned_upload_url_api_v1_media_upload_presigned_post: {
370
+ parameters: {
371
+ query: {
372
+ /** @description Original filename */
373
+ filename: string;
374
+ /** @description File content type (e.g., image/jpeg) */
375
+ content_type: string;
376
+ /** @description Business UUID */
377
+ business_id: string;
378
+ /** @description User UUID of uploader */
379
+ owner_id?: string | null;
380
+ /** @description Context type (e.g., product, collection, user_avatar) */
381
+ context: string;
382
+ /** @description Entity ID */
383
+ entity_id: string;
384
+ /** @description Entity tag */
385
+ affiliation?: string;
386
+ /** @description Alt text */
387
+ alt?: string | null;
388
+ /** @description Description */
389
+ description?: string | null;
390
+ /** @description Idempotency key */
391
+ idempotency_key?: string | null;
392
+ /** @description Client-reported file size in bytes — a hint for fast feedback only, re-validated against the real bytes at confirm-upload */
393
+ declared_size?: number;
394
+ /** @description URL expiration in seconds */
395
+ expires_in_seconds?: number;
396
+ };
397
+ header?: never;
398
+ path?: never;
399
+ cookie?: never;
400
+ };
401
+ requestBody?: never;
402
+ responses: {
403
+ /** @description Successful Response */
404
+ 200: {
405
+ headers: {
406
+ [name: string]: unknown;
407
+ };
408
+ content: {
409
+ "application/json": Record<string, never>;
410
+ };
411
+ };
412
+ /** @description Validation Error */
413
+ 422: {
414
+ headers: {
415
+ [name: string]: unknown;
416
+ };
417
+ content: {
418
+ "application/json": components["schemas"]["HTTPValidationError"];
419
+ };
420
+ };
421
+ };
422
+ };
423
+ confirm_upload_api_v1_media_confirm_upload_post: {
424
+ parameters: {
425
+ query: {
426
+ /** @description Storage key from presigned URL */
427
+ storage_path: string;
428
+ /** @description Business UUID */
429
+ business_id: string;
430
+ /** @description User UUID of uploader */
431
+ owner_id?: string | null;
432
+ /** @description Original filename */
433
+ original_filename: string;
434
+ /** @description File content type */
435
+ content_type: string;
436
+ /** @description File size in bytes */
437
+ size: number;
438
+ /** @description Context type */
439
+ context: string;
440
+ /** @description Entity ID */
441
+ entity_id: string;
442
+ /** @description Entity tag */
443
+ affiliation?: string;
444
+ /** @description Alt text */
445
+ alt?: string | null;
446
+ /** @description Description */
447
+ description?: string | null;
448
+ /** @description Idempotency key */
449
+ idempotency_key?: string | null;
450
+ };
451
+ header?: never;
452
+ path?: never;
453
+ cookie?: never;
454
+ };
455
+ requestBody?: never;
456
+ responses: {
457
+ /** @description Successful Response */
458
+ 201: {
459
+ headers: {
460
+ [name: string]: unknown;
461
+ };
462
+ content: {
463
+ "application/json": components["schemas"]["MediaAssetResponse"];
464
+ };
465
+ };
466
+ /** @description Validation Error */
467
+ 422: {
468
+ headers: {
469
+ [name: string]: unknown;
470
+ };
471
+ content: {
472
+ "application/json": components["schemas"]["HTTPValidationError"];
473
+ };
474
+ };
475
+ };
476
+ };
477
+ list_media_api_v1_media__get: {
478
+ parameters: {
479
+ query: {
480
+ /** @description UUID of the owning business */
481
+ business_id: string;
482
+ /** @description Filter by affiliation tag */
483
+ affiliation?: string | null;
484
+ skip?: number;
485
+ limit?: number;
486
+ };
487
+ header?: never;
488
+ path?: never;
489
+ cookie?: never;
490
+ };
491
+ requestBody?: never;
492
+ responses: {
493
+ /** @description Successful Response */
494
+ 200: {
495
+ headers: {
496
+ [name: string]: unknown;
497
+ };
498
+ content: {
499
+ "application/json": components["schemas"]["MediaAssetResponse"][];
500
+ };
501
+ };
502
+ /** @description Validation Error */
503
+ 422: {
504
+ headers: {
505
+ [name: string]: unknown;
506
+ };
507
+ content: {
508
+ "application/json": components["schemas"]["HTTPValidationError"];
509
+ };
510
+ };
511
+ };
512
+ };
513
+ get_media_by_id_api_v1_media__asset_id__metadata_get: {
514
+ parameters: {
515
+ query?: {
516
+ /** @description For digital_product/export assets only: presigned URL lifetime. Defaults to 6 days, capped at R2/S3's 7-day maximum. */
517
+ expires_in_seconds?: number | null;
518
+ };
519
+ header?: never;
520
+ path: {
521
+ asset_id: string;
522
+ };
523
+ cookie?: never;
524
+ };
525
+ requestBody?: never;
526
+ responses: {
527
+ /** @description Successful Response */
528
+ 200: {
529
+ headers: {
530
+ [name: string]: unknown;
531
+ };
532
+ content: {
533
+ "application/json": components["schemas"]["MediaAssetResponse"];
534
+ };
535
+ };
536
+ /** @description Validation Error */
537
+ 422: {
538
+ headers: {
539
+ [name: string]: unknown;
540
+ };
541
+ content: {
542
+ "application/json": components["schemas"]["HTTPValidationError"];
543
+ };
544
+ };
545
+ };
546
+ };
547
+ delete_media_api_v1_media__asset_id__delete: {
548
+ parameters: {
549
+ query?: never;
550
+ header?: never;
551
+ path: {
552
+ asset_id: string;
553
+ };
554
+ cookie?: never;
555
+ };
556
+ requestBody?: never;
557
+ responses: {
558
+ /** @description Successful Response */
559
+ 200: {
560
+ headers: {
561
+ [name: string]: unknown;
562
+ };
563
+ content: {
564
+ "application/json": unknown;
565
+ };
566
+ };
567
+ /** @description Validation Error */
568
+ 422: {
569
+ headers: {
570
+ [name: string]: unknown;
571
+ };
572
+ content: {
573
+ "application/json": components["schemas"]["HTTPValidationError"];
574
+ };
575
+ };
576
+ };
577
+ };
578
+ update_media_metadata_api_v1_media__asset_id__patch: {
579
+ parameters: {
580
+ query?: never;
581
+ header?: never;
582
+ path: {
583
+ asset_id: string;
584
+ };
585
+ cookie?: never;
586
+ };
587
+ requestBody: {
588
+ content: {
589
+ "application/json": components["schemas"]["MediaAssetUpdate"];
590
+ };
591
+ };
592
+ responses: {
593
+ /** @description Successful Response */
594
+ 200: {
595
+ headers: {
596
+ [name: string]: unknown;
597
+ };
598
+ content: {
599
+ "application/json": components["schemas"]["MediaAssetResponse"];
600
+ };
601
+ };
602
+ /** @description Validation Error */
603
+ 422: {
604
+ headers: {
605
+ [name: string]: unknown;
606
+ };
607
+ content: {
608
+ "application/json": components["schemas"]["HTTPValidationError"];
609
+ };
610
+ };
611
+ };
612
+ };
613
+ }