@01.software/sdk 0.0.1-260102065059 → 0.1.0-dev.260119.0a66443

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.
package/dist/index.d.ts CHANGED
@@ -23,45 +23,39 @@ interface Config {
23
23
  users: UserAuthOperations;
24
24
  };
25
25
  blocks: {
26
- Iframe: IframeBlock;
27
26
  Player: PlayerBlock;
28
- Gallery: GalleryBlock;
27
+ Iframe: IframeBlock;
29
28
  };
30
29
  collections: {
31
30
  users: User;
32
- 'static-assets': StaticAsset;
33
- brands: Brand;
34
- 'brand-logos': BrandLogo;
35
- 'brand-og-images': BrandOgImage;
36
- 'brand-settings': BrandSetting;
37
- 'brand-secret-keys': BrandSecretKey;
31
+ media: Media;
32
+ tenants: Tenant;
33
+ 'tenant-metadata': TenantMetadatum;
34
+ 'tenant-logos': TenantLogo;
35
+ 'tenant-og-images': TenantOgImage;
38
36
  products: Product;
39
37
  'product-variants': ProductVariant;
40
38
  'product-options': ProductOption;
41
39
  'product-categories': ProductCategory;
42
40
  'product-tags': ProductTag;
43
41
  'product-images': ProductImage;
42
+ brands: Brand;
43
+ 'brand-logos': BrandLogo;
44
44
  orders: Order;
45
45
  'order-products': OrderProduct;
46
46
  returns: Return;
47
47
  'return-products': ReturnProduct;
48
48
  transactions: Transaction;
49
- links: Link;
50
- 'link-images': LinkImage;
51
- playlists: Playlist;
52
- 'playlist-images': PlaylistImage;
53
- musics: Music;
49
+ documents: Document;
50
+ 'document-categories': DocumentCategory;
51
+ 'document-images': DocumentImage;
54
52
  posts: Post;
55
53
  'post-categories': PostCategory;
56
54
  'post-tags': PostTag;
57
55
  'post-images': PostImage;
58
- documents: Document;
59
- 'document-images': DocumentImage;
60
- entities: Entity;
61
- 'entity-categories': EntityCategory;
62
- 'entity-tags': EntityTag;
63
- 'entity-images': EntityImage;
64
- nodes: Node;
56
+ playlists: Playlist;
57
+ 'playlist-images': PlaylistImage;
58
+ musics: Music;
65
59
  galleries: Gallery;
66
60
  'gallery-images': GalleryImage;
67
61
  forms: Form;
@@ -72,10 +66,6 @@ interface Config {
72
66
  'payload-migrations': PayloadMigration;
73
67
  };
74
68
  collectionsJoins: {
75
- brands: {
76
- secretKeys: 'brand-secret-keys';
77
- settings: 'brand-settings';
78
- };
79
69
  products: {
80
70
  variants: 'product-variants';
81
71
  options: 'product-options';
@@ -94,39 +84,34 @@ interface Config {
94
84
  };
95
85
  collectionsSelect: {
96
86
  users: UsersSelect<false> | UsersSelect<true>;
97
- 'static-assets': StaticAssetsSelect<false> | StaticAssetsSelect<true>;
98
- brands: BrandsSelect<false> | BrandsSelect<true>;
99
- 'brand-logos': BrandLogosSelect<false> | BrandLogosSelect<true>;
100
- 'brand-og-images': BrandOgImagesSelect<false> | BrandOgImagesSelect<true>;
101
- 'brand-settings': BrandSettingsSelect<false> | BrandSettingsSelect<true>;
102
- 'brand-secret-keys': BrandSecretKeysSelect<false> | BrandSecretKeysSelect<true>;
87
+ media: MediaSelect<false> | MediaSelect<true>;
88
+ tenants: TenantsSelect<false> | TenantsSelect<true>;
89
+ 'tenant-metadata': TenantMetadataSelect<false> | TenantMetadataSelect<true>;
90
+ 'tenant-logos': TenantLogosSelect<false> | TenantLogosSelect<true>;
91
+ 'tenant-og-images': TenantOgImagesSelect<false> | TenantOgImagesSelect<true>;
103
92
  products: ProductsSelect<false> | ProductsSelect<true>;
104
93
  'product-variants': ProductVariantsSelect<false> | ProductVariantsSelect<true>;
105
94
  'product-options': ProductOptionsSelect<false> | ProductOptionsSelect<true>;
106
95
  'product-categories': ProductCategoriesSelect<false> | ProductCategoriesSelect<true>;
107
96
  'product-tags': ProductTagsSelect<false> | ProductTagsSelect<true>;
108
97
  'product-images': ProductImagesSelect<false> | ProductImagesSelect<true>;
98
+ brands: BrandsSelect<false> | BrandsSelect<true>;
99
+ 'brand-logos': BrandLogosSelect<false> | BrandLogosSelect<true>;
109
100
  orders: OrdersSelect<false> | OrdersSelect<true>;
110
101
  'order-products': OrderProductsSelect<false> | OrderProductsSelect<true>;
111
102
  returns: ReturnsSelect<false> | ReturnsSelect<true>;
112
103
  'return-products': ReturnProductsSelect<false> | ReturnProductsSelect<true>;
113
104
  transactions: TransactionsSelect<false> | TransactionsSelect<true>;
114
- links: LinksSelect<false> | LinksSelect<true>;
115
- 'link-images': LinkImagesSelect<false> | LinkImagesSelect<true>;
116
- playlists: PlaylistsSelect<false> | PlaylistsSelect<true>;
117
- 'playlist-images': PlaylistImagesSelect<false> | PlaylistImagesSelect<true>;
118
- musics: MusicsSelect<false> | MusicsSelect<true>;
105
+ documents: DocumentsSelect<false> | DocumentsSelect<true>;
106
+ 'document-categories': DocumentCategoriesSelect<false> | DocumentCategoriesSelect<true>;
107
+ 'document-images': DocumentImagesSelect<false> | DocumentImagesSelect<true>;
119
108
  posts: PostsSelect<false> | PostsSelect<true>;
120
109
  'post-categories': PostCategoriesSelect<false> | PostCategoriesSelect<true>;
121
110
  'post-tags': PostTagsSelect<false> | PostTagsSelect<true>;
122
111
  'post-images': PostImagesSelect<false> | PostImagesSelect<true>;
123
- documents: DocumentsSelect<false> | DocumentsSelect<true>;
124
- 'document-images': DocumentImagesSelect<false> | DocumentImagesSelect<true>;
125
- entities: EntitiesSelect<false> | EntitiesSelect<true>;
126
- 'entity-categories': EntityCategoriesSelect<false> | EntityCategoriesSelect<true>;
127
- 'entity-tags': EntityTagsSelect<false> | EntityTagsSelect<true>;
128
- 'entity-images': EntityImagesSelect<false> | EntityImagesSelect<true>;
129
- nodes: NodesSelect<false> | NodesSelect<true>;
112
+ playlists: PlaylistsSelect<false> | PlaylistsSelect<true>;
113
+ 'playlist-images': PlaylistImagesSelect<false> | PlaylistImagesSelect<true>;
114
+ musics: MusicsSelect<false> | MusicsSelect<true>;
130
115
  galleries: GalleriesSelect<false> | GalleriesSelect<true>;
131
116
  'gallery-images': GalleryImagesSelect<false> | GalleryImagesSelect<true>;
132
117
  forms: FormsSelect<false> | FormsSelect<true>;
@@ -171,55 +156,87 @@ interface UserAuthOperations {
171
156
  }
172
157
  /**
173
158
  * This interface was referenced by `Config`'s JSON-Schema
174
- * via the `definition` "IframeBlock".
159
+ * via the `definition` "PlayerBlock".
175
160
  */
176
- interface IframeBlock {
161
+ interface PlayerBlock {
177
162
  url: string;
178
163
  width?: number | null;
179
164
  height?: number | null;
180
165
  id?: string | null;
181
166
  blockName?: string | null;
182
- blockType: 'Iframe';
167
+ blockType: 'Player';
183
168
  }
184
169
  /**
185
170
  * This interface was referenced by `Config`'s JSON-Schema
186
- * via the `definition` "PlayerBlock".
171
+ * via the `definition` "IframeBlock".
187
172
  */
188
- interface PlayerBlock {
173
+ interface IframeBlock {
189
174
  url: string;
190
175
  width?: number | null;
191
176
  height?: number | null;
192
177
  id?: string | null;
193
178
  blockName?: string | null;
194
- blockType: 'Player';
179
+ blockType: 'Iframe';
195
180
  }
196
181
  /**
197
182
  * This interface was referenced by `Config`'s JSON-Schema
198
- * via the `definition` "GalleryBlock".
183
+ * via the `definition` "users".
199
184
  */
200
- interface GalleryBlock {
201
- images: (number | GalleryImage)[];
202
- id?: string | null;
203
- blockName?: string | null;
204
- blockType: 'Gallery';
185
+ interface User {
186
+ id: number;
187
+ roles: ('super-admin' | 'user' | 'customer')[];
188
+ tenants?: {
189
+ tenant: number | Tenant;
190
+ roles: ('tenant-admin' | 'tenant-viewer')[];
191
+ id?: string | null;
192
+ }[] | null;
193
+ updatedAt: string;
194
+ createdAt: string;
195
+ email: string;
196
+ resetPasswordToken?: string | null;
197
+ resetPasswordExpiration?: string | null;
198
+ salt?: string | null;
199
+ hash?: string | null;
200
+ loginAttempts?: number | null;
201
+ lockUntil?: string | null;
202
+ sessions?: {
203
+ id: string;
204
+ createdAt?: string | null;
205
+ expiresAt: string;
206
+ }[] | null;
207
+ password?: string | null;
205
208
  }
206
209
  /**
207
210
  * This interface was referenced by `Config`'s JSON-Schema
208
- * via the `definition` "gallery-images".
211
+ * via the `definition` "tenants".
209
212
  */
210
- interface GalleryImage {
213
+ interface Tenant {
211
214
  id: number;
212
- brand: number | Brand;
213
- alt?: string | null;
214
- lqip?: string | null;
215
- palette?: {
216
- vibrant?: string | null;
217
- muted?: string | null;
218
- darkVibrant?: string | null;
219
- darkMuted?: string | null;
220
- lightVibrant?: string | null;
221
- lightMuted?: string | null;
222
- };
215
+ name: string;
216
+ domain?: string | null;
217
+ features?: ('ecommerce' | 'playlists' | 'links' | 'forms' | 'galleries' | 'posts' | 'documents')[] | null;
218
+ plan: 'free' | 'basic' | 'pro' | 'enterprise';
219
+ clientKey: string;
220
+ secretKeys?: {
221
+ name: string;
222
+ value?: string | null;
223
+ id?: string | null;
224
+ }[] | null;
225
+ /**
226
+ * The URL to send webhooks to.
227
+ */
228
+ webhookUrl?: string | null;
229
+ updatedAt: string;
230
+ createdAt: string;
231
+ }
232
+ /**
233
+ * This interface was referenced by `Config`'s JSON-Schema
234
+ * via the `definition` "media".
235
+ */
236
+ interface Media {
237
+ id: number;
238
+ tenant?: (number | null) | Tenant;
239
+ alt: string;
223
240
  prefix?: string | null;
224
241
  updatedAt: string;
225
242
  createdAt: string;
@@ -232,194 +249,246 @@ interface GalleryImage {
232
249
  height?: number | null;
233
250
  focalX?: number | null;
234
251
  focalY?: number | null;
235
- sizes?: {
236
- thumb?: {
237
- url?: string | null;
238
- width?: number | null;
239
- height?: number | null;
240
- mimeType?: string | null;
241
- filesize?: number | null;
242
- filename?: string | null;
243
- };
244
- card?: {
245
- url?: string | null;
246
- width?: number | null;
247
- height?: number | null;
248
- mimeType?: string | null;
249
- filesize?: number | null;
250
- filename?: string | null;
251
- };
252
- };
253
252
  }
254
253
  /**
255
254
  * This interface was referenced by `Config`'s JSON-Schema
256
- * via the `definition` "brands".
255
+ * via the `definition` "tenant-metadata".
257
256
  */
258
- interface Brand {
257
+ interface TenantMetadatum {
259
258
  id: number;
260
- title: string;
261
- description?: string | null;
262
- clientKey: string;
263
- secretKeys?: {
264
- docs?: (number | BrandSecretKey)[];
265
- hasNextPage?: boolean;
266
- totalDocs?: number;
259
+ tenant?: (number | null) | Tenant;
260
+ siteInfo?: {
261
+ /**
262
+ * Site title (used in browser tab and SEO)
263
+ */
264
+ title?: string | null;
265
+ /**
266
+ * Site description (used for SEO and social media)
267
+ */
268
+ description?: string | null;
269
+ /**
270
+ * Comma-separated keywords for SEO
271
+ */
272
+ keywords?: string | null;
273
+ /**
274
+ * Site author or company name
275
+ */
276
+ author?: string | null;
277
+ /**
278
+ * Full site URL (e.g., https://example.com)
279
+ */
280
+ siteUrl?: string | null;
267
281
  };
268
- webhookUrl?: string | null;
269
- features?: ('commerce' | 'playlists' | 'links' | 'forms' | 'galleries' | 'posts' | 'documents' | 'places' | 'entities' | 'nodes')[] | null;
270
- settings?: {
271
- docs?: (number | BrandSetting)[];
272
- hasNextPage?: boolean;
273
- totalDocs?: number;
282
+ branding?: {
283
+ /**
284
+ * Primary logo
285
+ */
286
+ logo?: (number | null) | BrandLogo;
287
+ /**
288
+ * Logo for dark mode (optional)
289
+ */
290
+ logoDark?: (number | null) | BrandLogo;
291
+ /**
292
+ * Logo mark / Icon (optional)
293
+ */
294
+ logomark?: (number | null) | BrandLogo;
295
+ /**
296
+ * Favicon (will be resized automatically)
297
+ */
298
+ favicon?: (number | null) | BrandLogo;
299
+ /**
300
+ * Theme color for mobile browsers (hex color)
301
+ */
302
+ themeColor?: string | null;
303
+ };
304
+ openGraph?: {
305
+ /**
306
+ * Open Graph title (falls back to site title)
307
+ */
308
+ ogTitle?: string | null;
309
+ /**
310
+ * Open Graph description (falls back to site description)
311
+ */
312
+ ogDescription?: string | null;
313
+ /**
314
+ * Open Graph image (1200x630 recommended)
315
+ */
316
+ ogImage?: (number | null) | TenantOgImage;
317
+ /**
318
+ * Open Graph type
319
+ */
320
+ ogType?: ('website' | 'article' | 'product' | 'profile') | null;
321
+ /**
322
+ * Open Graph locale (e.g., ko_KR, en_US)
323
+ */
324
+ ogLocale?: string | null;
325
+ };
326
+ twitter?: {
327
+ /**
328
+ * Twitter card type
329
+ */
330
+ twitterCard?: ('summary' | 'summary_large_image' | 'app' | 'player') | null;
331
+ /**
332
+ * Twitter username for the site (e.g., @yoursite)
333
+ */
334
+ twitterSite?: string | null;
335
+ /**
336
+ * Twitter username for the content creator (e.g., @author)
337
+ */
338
+ twitterCreator?: string | null;
339
+ /**
340
+ * Twitter title (falls back to OG title or site title)
341
+ */
342
+ twitterTitle?: string | null;
343
+ /**
344
+ * Twitter description (falls back to OG or site description)
345
+ */
346
+ twitterDescription?: string | null;
347
+ /**
348
+ * Twitter card image (falls back to OG image)
349
+ */
350
+ twitterImage?: (number | null) | TenantOgImage;
351
+ };
352
+ seo?: {
353
+ /**
354
+ * Robots meta tag (e.g., "index, follow" or "noindex, nofollow")
355
+ */
356
+ robots?: string | null;
357
+ /**
358
+ * Google Site Verification code
359
+ */
360
+ googleSiteVerification?: string | null;
361
+ /**
362
+ * Bing Site Verification code
363
+ */
364
+ bingSiteVerification?: string | null;
365
+ /**
366
+ * Naver Site Verification code
367
+ */
368
+ naverSiteVerification?: string | null;
369
+ /**
370
+ * Canonical URL (if different from site URL)
371
+ */
372
+ canonicalUrl?: string | null;
373
+ };
374
+ pwa?: {
375
+ /**
376
+ * Short name for PWA (12 characters max)
377
+ */
378
+ shortName?: string | null;
379
+ /**
380
+ * Background color for PWA splash screen
381
+ */
382
+ backgroundColor?: string | null;
383
+ /**
384
+ * PWA display mode
385
+ */
386
+ display?: ('fullscreen' | 'standalone' | 'minimal-ui' | 'browser') | null;
387
+ };
388
+ analytics?: {
389
+ /**
390
+ * Google Analytics ID (e.g., G-XXXXXXXXXX)
391
+ */
392
+ googleAnalyticsId?: string | null;
393
+ /**
394
+ * Google Tag Manager ID (e.g., GTM-XXXXXXX)
395
+ */
396
+ googleTagManagerId?: string | null;
397
+ /**
398
+ * Facebook Pixel ID
399
+ */
400
+ facebookPixelId?: string | null;
401
+ /**
402
+ * LinkedIn Partner ID
403
+ */
404
+ linkedInPartnerId?: string | null;
274
405
  };
275
406
  updatedAt: string;
276
407
  createdAt: string;
277
408
  }
278
409
  /**
279
410
  * This interface was referenced by `Config`'s JSON-Schema
280
- * via the `definition` "brand-secret-keys".
411
+ * via the `definition` "brand-logos".
281
412
  */
282
- interface BrandSecretKey {
413
+ interface BrandLogo {
283
414
  id: number;
284
- brand: number | Brand;
285
- name: string;
286
- value: string;
415
+ /**
416
+ * Alternative text for accessibility
417
+ */
418
+ alt: string;
419
+ /**
420
+ * Type of logo asset
421
+ */
422
+ type?: ('primary' | 'secondary' | 'logomark' | 'wordmark' | 'dark' | 'light') | null;
423
+ lqip?: string | null;
424
+ palette?: {
425
+ vibrant?: string | null;
426
+ muted?: string | null;
427
+ darkVibrant?: string | null;
428
+ darkMuted?: string | null;
429
+ lightVibrant?: string | null;
430
+ lightMuted?: string | null;
431
+ };
432
+ prefix?: string | null;
287
433
  updatedAt: string;
288
434
  createdAt: string;
435
+ url?: string | null;
436
+ thumbnailURL?: string | null;
437
+ filename?: string | null;
438
+ mimeType?: string | null;
439
+ filesize?: number | null;
440
+ width?: number | null;
441
+ height?: number | null;
442
+ focalX?: number | null;
443
+ focalY?: number | null;
289
444
  }
290
445
  /**
291
446
  * This interface was referenced by `Config`'s JSON-Schema
292
- * via the `definition` "brand-settings".
447
+ * via the `definition` "tenant-og-images".
293
448
  */
294
- interface BrandSetting {
449
+ interface TenantOgImage {
295
450
  id: number;
296
- brand: number | Brand;
297
- title: string;
298
- description?: string | null;
299
- keywords?: string[] | null;
300
- /**
301
- * 512x512
302
- */
303
- logo?: (number | null) | BrandLogo;
304
- /**
305
- * 1200x630
306
- */
307
- ogImage?: (number | null) | BrandOgImage;
451
+ tenant?: (number | null) | Tenant;
452
+ alt: string;
453
+ lqip?: string | null;
454
+ palette?: {
455
+ vibrant?: string | null;
456
+ muted?: string | null;
457
+ darkVibrant?: string | null;
458
+ darkMuted?: string | null;
459
+ lightVibrant?: string | null;
460
+ lightMuted?: string | null;
461
+ };
462
+ prefix?: string | null;
308
463
  updatedAt: string;
309
464
  createdAt: string;
465
+ url?: string | null;
466
+ thumbnailURL?: string | null;
467
+ filename?: string | null;
468
+ mimeType?: string | null;
469
+ filesize?: number | null;
470
+ width?: number | null;
471
+ height?: number | null;
472
+ focalX?: number | null;
473
+ focalY?: number | null;
310
474
  }
311
475
  /**
312
476
  * This interface was referenced by `Config`'s JSON-Schema
313
- * via the `definition` "brand-logos".
477
+ * via the `definition` "tenant-logos".
314
478
  */
315
- interface BrandLogo {
479
+ interface TenantLogo {
316
480
  id: number;
317
- brand?: (number | null) | Brand;
318
- alt?: string | null;
481
+ tenant?: (number | null) | Tenant;
482
+ alt: string;
319
483
  lqip?: string | null;
320
- prefix?: string | null;
321
- updatedAt: string;
322
- createdAt: string;
323
- url?: string | null;
324
- thumbnailURL?: string | null;
325
- filename?: string | null;
326
- mimeType?: string | null;
327
- filesize?: number | null;
328
- width?: number | null;
329
- height?: number | null;
330
- focalX?: number | null;
331
- focalY?: number | null;
332
- sizes?: {
333
- favicon?: {
334
- url?: string | null;
335
- width?: number | null;
336
- height?: number | null;
337
- mimeType?: string | null;
338
- filesize?: number | null;
339
- filename?: string | null;
340
- };
341
- icon?: {
342
- url?: string | null;
343
- width?: number | null;
344
- height?: number | null;
345
- mimeType?: string | null;
346
- filesize?: number | null;
347
- filename?: string | null;
348
- };
349
- thumb?: {
350
- url?: string | null;
351
- width?: number | null;
352
- height?: number | null;
353
- mimeType?: string | null;
354
- filesize?: number | null;
355
- filename?: string | null;
356
- };
357
- };
358
- }
359
- /**
360
- * This interface was referenced by `Config`'s JSON-Schema
361
- * via the `definition` "brand-og-images".
362
- */
363
- interface BrandOgImage {
364
- id: number;
365
- brand?: (number | null) | Brand;
366
- alt?: string | null;
367
- lqip?: string | null;
368
- prefix?: string | null;
369
- updatedAt: string;
370
- createdAt: string;
371
- url?: string | null;
372
- thumbnailURL?: string | null;
373
- filename?: string | null;
374
- mimeType?: string | null;
375
- filesize?: number | null;
376
- width?: number | null;
377
- height?: number | null;
378
- focalX?: number | null;
379
- focalY?: number | null;
380
- sizes?: {
381
- ogImage?: {
382
- url?: string | null;
383
- width?: number | null;
384
- height?: number | null;
385
- mimeType?: string | null;
386
- filesize?: number | null;
387
- filename?: string | null;
388
- };
389
- };
390
- }
391
- /**
392
- * This interface was referenced by `Config`'s JSON-Schema
393
- * via the `definition` "users".
394
- */
395
- interface User {
396
- id: number;
397
- name?: string | null;
398
- role?: ('admin' | 'editor' | 'viewer') | null;
399
- brand?: (number | null) | Brand;
400
- updatedAt: string;
401
- createdAt: string;
402
- email: string;
403
- resetPasswordToken?: string | null;
404
- resetPasswordExpiration?: string | null;
405
- salt?: string | null;
406
- hash?: string | null;
407
- loginAttempts?: number | null;
408
- lockUntil?: string | null;
409
- sessions?: {
410
- id: string;
411
- createdAt?: string | null;
412
- expiresAt: string;
413
- }[] | null;
414
- password?: string | null;
415
- }
416
- /**
417
- * This interface was referenced by `Config`'s JSON-Schema
418
- * via the `definition` "static-assets".
419
- */
420
- interface StaticAsset {
421
- id: number;
422
- name?: string | null;
484
+ palette?: {
485
+ vibrant?: string | null;
486
+ muted?: string | null;
487
+ darkVibrant?: string | null;
488
+ darkMuted?: string | null;
489
+ lightVibrant?: string | null;
490
+ lightMuted?: string | null;
491
+ };
423
492
  prefix?: string | null;
424
493
  updatedAt: string;
425
494
  createdAt: string;
@@ -440,15 +509,18 @@ interface StaticAsset {
440
509
  interface Product {
441
510
  id: number;
442
511
  _order?: string | null;
443
- brand: number | Brand;
512
+ tenant?: (number | null) | Tenant;
444
513
  /**
445
514
  * 영문, 숫자, _(언더스코어), -(하이픈)만 사용가능합니다.
446
515
  */
447
516
  sku: string;
448
- slug?: string | null;
517
+ /**
518
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
519
+ */
520
+ generateSlug?: boolean | null;
521
+ slug: string;
449
522
  title: string;
450
523
  subTitle?: string | null;
451
- status?: ('draft' | 'preparing' | 'published' | 'closed' | 'archived') | null;
452
524
  thumbnail?: (number | null) | ProductImage;
453
525
  images?: (number | ProductImage)[] | null;
454
526
  description?: {
@@ -470,7 +542,7 @@ interface Product {
470
542
  krwPrice?: string | null;
471
543
  categories?: (number | ProductCategory)[] | null;
472
544
  tags?: (number | ProductTag)[] | null;
473
- entities?: (number | Entity)[] | null;
545
+ brand?: (number | null) | Brand;
474
546
  variants?: {
475
547
  docs?: (number | ProductVariant)[];
476
548
  hasNextPage?: boolean;
@@ -484,6 +556,7 @@ interface Product {
484
556
  isSoldOut?: boolean | null;
485
557
  updatedAt: string;
486
558
  createdAt: string;
559
+ _status?: ('draft' | 'published') | null;
487
560
  }
488
561
  /**
489
562
  * This interface was referenced by `Config`'s JSON-Schema
@@ -491,8 +564,7 @@ interface Product {
491
564
  */
492
565
  interface ProductImage {
493
566
  id: number;
494
- brand: number | Brand;
495
- alt?: string | null;
567
+ tenant?: (number | null) | Tenant;
496
568
  lqip?: string | null;
497
569
  palette?: {
498
570
  vibrant?: string | null;
@@ -540,9 +612,16 @@ interface ProductImage {
540
612
  interface ProductCategory {
541
613
  id: number;
542
614
  _order?: string | null;
543
- brand: number | Brand;
544
- title?: string | null;
615
+ tenant?: (number | null) | Tenant;
616
+ title: string;
617
+ /**
618
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
619
+ */
620
+ generateSlug?: boolean | null;
621
+ slug: string;
545
622
  description?: string | null;
623
+ image?: (number | null) | ProductImage;
624
+ parent?: (number | null) | ProductCategory;
546
625
  updatedAt: string;
547
626
  createdAt: string;
548
627
  }
@@ -553,105 +632,48 @@ interface ProductCategory {
553
632
  interface ProductTag {
554
633
  id: number;
555
634
  _order?: string | null;
556
- brand: number | Brand;
557
- title?: string | null;
558
- description?: string | null;
559
- updatedAt: string;
560
- createdAt: string;
561
- }
562
- /**
563
- * This interface was referenced by `Config`'s JSON-Schema
564
- * via the `definition` "entities".
565
- */
566
- interface Entity {
567
- id: number;
568
- _order?: string | null;
569
- brand: number | Brand;
570
- title: string;
571
- slug?: string | null;
572
- thumbnail?: (number | null) | EntityImage;
573
- images?: (number | EntityImage)[] | null;
574
- description?: {
575
- root: {
576
- type: string;
577
- children: {
578
- type: any;
579
- version: number;
580
- [k: string]: unknown;
581
- }[];
582
- direction: ('ltr' | 'rtl') | null;
583
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
584
- indent: number;
585
- version: number;
586
- };
587
- [k: string]: unknown;
588
- } | null;
589
- categories?: (number | EntityCategory)[] | null;
590
- tags?: (number | EntityTag)[] | null;
591
- updatedAt: string;
592
- createdAt: string;
593
- }
594
- /**
595
- * This interface was referenced by `Config`'s JSON-Schema
596
- * via the `definition` "entity-images".
597
- */
598
- interface EntityImage {
599
- id: number;
600
- brand: number | Brand;
601
- alt?: string | null;
602
- lqip?: string | null;
603
- prefix?: string | null;
604
- updatedAt: string;
605
- createdAt: string;
606
- url?: string | null;
607
- thumbnailURL?: string | null;
608
- filename?: string | null;
609
- mimeType?: string | null;
610
- filesize?: number | null;
611
- width?: number | null;
612
- height?: number | null;
613
- focalX?: number | null;
614
- focalY?: number | null;
615
- sizes?: {
616
- '512'?: {
617
- url?: string | null;
618
- width?: number | null;
619
- height?: number | null;
620
- mimeType?: string | null;
621
- filesize?: number | null;
622
- filename?: string | null;
623
- };
624
- '1024'?: {
625
- url?: string | null;
626
- width?: number | null;
627
- height?: number | null;
628
- mimeType?: string | null;
629
- filesize?: number | null;
630
- filename?: string | null;
631
- };
632
- };
633
- }
634
- /**
635
- * This interface was referenced by `Config`'s JSON-Schema
636
- * via the `definition` "entity-categories".
637
- */
638
- interface EntityCategory {
639
- id: number;
640
- _order?: string | null;
641
- brand: number | Brand;
635
+ tenant?: (number | null) | Tenant;
642
636
  title: string;
637
+ /**
638
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
639
+ */
640
+ generateSlug?: boolean | null;
641
+ slug: string;
642
+ description?: string | null;
643
643
  updatedAt: string;
644
644
  createdAt: string;
645
645
  }
646
646
  /**
647
647
  * This interface was referenced by `Config`'s JSON-Schema
648
- * via the `definition` "entity-tags".
648
+ * via the `definition` "brands".
649
649
  */
650
- interface EntityTag {
650
+ interface Brand {
651
651
  id: number;
652
652
  _order?: string | null;
653
- brand: number | Brand;
654
- title: string;
653
+ tenant?: (number | null) | Tenant;
654
+ name: string;
655
+ /**
656
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
657
+ */
658
+ generateSlug?: boolean | null;
659
+ slug: string;
660
+ /**
661
+ * Primary brand logo
662
+ */
663
+ logo?: (number | null) | BrandLogo;
664
+ /**
665
+ * Logo for dark mode (optional)
666
+ */
667
+ logoDark?: (number | null) | BrandLogo;
668
+ /**
669
+ * Logo mark / Icon (optional)
670
+ */
671
+ logomark?: (number | null) | BrandLogo;
672
+ description?: string | null;
673
+ /**
674
+ * Brand official website URL
675
+ */
676
+ website?: string | null;
655
677
  updatedAt: string;
656
678
  createdAt: string;
657
679
  }
@@ -663,7 +685,7 @@ interface ProductVariant {
663
685
  id: number;
664
686
  _order?: string | null;
665
687
  '_product-variants_variants_order'?: string | null;
666
- brand: number | Brand;
688
+ tenant?: (number | null) | Tenant;
667
689
  product: number | Product;
668
690
  title?: string | null;
669
691
  images?: (number | ProductImage)[] | null;
@@ -684,7 +706,7 @@ interface ProductOption {
684
706
  _order?: string | null;
685
707
  '_product-options_productOptions_order'?: string | null;
686
708
  '_product-options_options_order'?: string | null;
687
- brand: number | Brand;
709
+ tenant?: (number | null) | Tenant;
688
710
  product: number | Product;
689
711
  variant?: (number | null) | ProductVariant;
690
712
  title?: string | null;
@@ -698,11 +720,17 @@ interface ProductOption {
698
720
  */
699
721
  interface Order {
700
722
  id: number;
701
- brand: number | Brand;
723
+ tenant?: (number | null) | Tenant;
702
724
  orderNumber: string;
703
725
  status: 'pending' | 'paid' | 'failed' | 'canceled' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
704
726
  totalAmount?: number | null;
705
727
  email?: string | null;
728
+ shippingCarrier?: ('cj' | 'hanjin' | 'lotte' | 'epost' | 'logen' | 'other') | null;
729
+ trackingNumber?: string | null;
730
+ /**
731
+ * 내부 관리용 메모 (고객에게 노출되지 않음)
732
+ */
733
+ notes?: string | null;
706
734
  shippingAddress?: {
707
735
  postalCode?: string | null;
708
736
  address1?: string | null;
@@ -735,7 +763,7 @@ interface Order {
735
763
  */
736
764
  interface OrderProduct {
737
765
  id: number;
738
- brand: number | Brand;
766
+ tenant?: (number | null) | Tenant;
739
767
  order: number | Order;
740
768
  product: number | Product;
741
769
  variant?: (number | null) | ProductVariant;
@@ -751,7 +779,7 @@ interface OrderProduct {
751
779
  */
752
780
  interface Transaction {
753
781
  id: number;
754
- brand: number | Brand;
782
+ tenant?: (number | null) | Tenant;
755
783
  status: 'pending' | 'paid' | 'failed' | 'canceled';
756
784
  order: number | Order;
757
785
  paymentId?: string | null;
@@ -767,9 +795,14 @@ interface Transaction {
767
795
  */
768
796
  interface Return {
769
797
  id: number;
770
- brand: number | Brand;
798
+ tenant?: (number | null) | Tenant;
771
799
  order: number | Order;
772
- reason?: string | null;
800
+ status: 'requested' | 'processing' | 'approved' | 'rejected' | 'completed';
801
+ reason?: ('change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other') | null;
802
+ /**
803
+ * 반품 상세 사유
804
+ */
805
+ reasonDetail?: string | null;
773
806
  returnProducts?: {
774
807
  orderProduct: number | OrderProduct;
775
808
  quantity: number;
@@ -785,7 +818,7 @@ interface Return {
785
818
  */
786
819
  interface ReturnProduct {
787
820
  id: number;
788
- brand: number | Brand;
821
+ tenant?: (number | null) | Tenant;
789
822
  order: number | Order;
790
823
  status: 'requested' | 'processing' | 'approved' | 'rejected';
791
824
  orderProduct: number | OrderProduct;
@@ -799,27 +832,101 @@ interface ReturnProduct {
799
832
  }
800
833
  /**
801
834
  * This interface was referenced by `Config`'s JSON-Schema
802
- * via the `definition` "links".
835
+ * via the `definition` "documents".
836
+ */
837
+ interface Document {
838
+ id: number;
839
+ _order?: string | null;
840
+ tenant?: (number | null) | Tenant;
841
+ /**
842
+ * 문서 제목 (예: 개인정보 처리방침)
843
+ */
844
+ title: string;
845
+ /**
846
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
847
+ */
848
+ generateSlug?: boolean | null;
849
+ slug: string;
850
+ /**
851
+ * 문서 유형 선택
852
+ */
853
+ type: 'terms_of_service' | 'privacy_policy' | 'service_guide' | 'notice' | 'legal_notice' | 'refund_policy' | 'other';
854
+ /**
855
+ * 문서 버전 (예: 1.0, 1.1, 2.0)
856
+ */
857
+ version: string;
858
+ /**
859
+ * 시행일 (이 날짜부터 문서가 효력을 발생)
860
+ */
861
+ effectiveDate?: string | null;
862
+ /**
863
+ * 만료일 (선택사항)
864
+ */
865
+ expiryDate?: string | null;
866
+ /**
867
+ * 문서 요약 (간략한 설명)
868
+ */
869
+ summary?: string | null;
870
+ content: {
871
+ root: {
872
+ type: string;
873
+ children: {
874
+ type: any;
875
+ version: number;
876
+ [k: string]: unknown;
877
+ }[];
878
+ direction: ('ltr' | 'rtl') | null;
879
+ format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
880
+ indent: number;
881
+ version: number;
882
+ };
883
+ [k: string]: unknown;
884
+ };
885
+ category?: (number | null) | DocumentCategory;
886
+ /**
887
+ * 검색을 위한 태그 (예: GDPR, CCPA, 개인정보)
888
+ */
889
+ tags?: {
890
+ tag?: string | null;
891
+ id?: string | null;
892
+ }[] | null;
893
+ /**
894
+ * 사용자가 반드시 동의해야 하는 문서인가요?
895
+ */
896
+ isRequired?: boolean | null;
897
+ /**
898
+ * 변경 이력 (이전 버전과의 차이점)
899
+ */
900
+ changeLog?: string | null;
901
+ updatedAt: string;
902
+ createdAt: string;
903
+ _status?: ('draft' | 'published') | null;
904
+ }
905
+ /**
906
+ * This interface was referenced by `Config`'s JSON-Schema
907
+ * via the `definition` "document-categories".
803
908
  */
804
- interface Link {
909
+ interface DocumentCategory {
805
910
  id: number;
806
- brand: number | Brand;
911
+ _order?: string | null;
912
+ tenant?: (number | null) | Tenant;
807
913
  title: string;
808
914
  /**
809
- * 512x512
915
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
810
916
  */
811
- image?: (number | null) | LinkImage;
812
- link: string;
917
+ generateSlug?: boolean | null;
918
+ slug: string;
919
+ description?: string | null;
813
920
  updatedAt: string;
814
921
  createdAt: string;
815
922
  }
816
923
  /**
817
924
  * This interface was referenced by `Config`'s JSON-Schema
818
- * via the `definition` "link-images".
925
+ * via the `definition` "document-images".
819
926
  */
820
- interface LinkImage {
927
+ interface DocumentImage {
821
928
  id: number;
822
- brand: number | Brand;
929
+ tenant?: (number | null) | Tenant;
823
930
  alt?: string | null;
824
931
  lqip?: string | null;
825
932
  palette?: {
@@ -843,7 +950,15 @@ interface LinkImage {
843
950
  focalX?: number | null;
844
951
  focalY?: number | null;
845
952
  sizes?: {
846
- thumb?: {
953
+ '512'?: {
954
+ url?: string | null;
955
+ width?: number | null;
956
+ height?: number | null;
957
+ mimeType?: string | null;
958
+ filesize?: number | null;
959
+ filename?: string | null;
960
+ };
961
+ '1024'?: {
847
962
  url?: string | null;
848
963
  width?: number | null;
849
964
  height?: number | null;
@@ -855,29 +970,47 @@ interface LinkImage {
855
970
  }
856
971
  /**
857
972
  * This interface was referenced by `Config`'s JSON-Schema
858
- * via the `definition` "playlists".
973
+ * via the `definition` "posts".
859
974
  */
860
- interface Playlist {
975
+ interface Post {
861
976
  id: number;
862
- brand: number | Brand;
863
- image?: (number | null) | PlaylistImage;
977
+ _order?: string | null;
978
+ tenant?: (number | null) | Tenant;
979
+ thumbnail?: (number | null) | PostImage;
864
980
  title: string;
865
- description?: string | null;
866
- musics?: {
867
- docs?: (number | Music)[];
868
- hasNextPage?: boolean;
869
- totalDocs?: number;
870
- };
981
+ /**
982
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
983
+ */
984
+ generateSlug?: boolean | null;
985
+ slug: string;
986
+ categories?: (number | PostCategory)[] | null;
987
+ tags?: (number | PostTag)[] | null;
988
+ content?: {
989
+ root: {
990
+ type: string;
991
+ children: {
992
+ type: any;
993
+ version: number;
994
+ [k: string]: unknown;
995
+ }[];
996
+ direction: ('ltr' | 'rtl') | null;
997
+ format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
998
+ indent: number;
999
+ version: number;
1000
+ };
1001
+ [k: string]: unknown;
1002
+ } | null;
871
1003
  updatedAt: string;
872
1004
  createdAt: string;
1005
+ _status?: ('draft' | 'published') | null;
873
1006
  }
874
1007
  /**
875
1008
  * This interface was referenced by `Config`'s JSON-Schema
876
- * via the `definition` "playlist-images".
1009
+ * via the `definition` "post-images".
877
1010
  */
878
- interface PlaylistImage {
1011
+ interface PostImage {
879
1012
  id: number;
880
- brand: number | Brand;
1013
+ tenant?: (number | null) | Tenant;
881
1014
  alt?: string | null;
882
1015
  lqip?: string | null;
883
1016
  palette?: {
@@ -921,66 +1054,71 @@ interface PlaylistImage {
921
1054
  }
922
1055
  /**
923
1056
  * This interface was referenced by `Config`'s JSON-Schema
924
- * via the `definition` "musics".
1057
+ * via the `definition` "post-categories".
925
1058
  */
926
- interface Music {
1059
+ interface PostCategory {
927
1060
  id: number;
928
- _musics_musics_order?: string | null;
929
- brand: number | Brand;
930
- playlist?: (number | null) | Playlist;
931
- url: string;
1061
+ _order?: string | null;
1062
+ tenant?: (number | null) | Tenant;
932
1063
  title: string;
933
- artist?: string | null;
934
- isValid?: boolean | null;
1064
+ /**
1065
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
1066
+ */
1067
+ generateSlug?: boolean | null;
1068
+ slug: string;
1069
+ description?: string | null;
1070
+ parent?: (number | null) | PostCategory;
935
1071
  updatedAt: string;
936
1072
  createdAt: string;
937
1073
  }
938
1074
  /**
939
1075
  * This interface was referenced by `Config`'s JSON-Schema
940
- * via the `definition` "posts".
1076
+ * via the `definition` "post-tags".
941
1077
  */
942
- interface Post {
1078
+ interface PostTag {
943
1079
  id: number;
944
1080
  _order?: string | null;
945
- brand: number | Brand;
946
- thumbnail?: (number | null) | PostImage;
1081
+ tenant?: (number | null) | Tenant;
947
1082
  title: string;
948
- slug?: string | null;
949
- categories?: (number | PostCategory)[] | null;
950
- tags?: (number | PostTag)[] | null;
951
1083
  /**
952
- * The status of the post
1084
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
953
1085
  */
954
- status?: ('draft' | 'published') | null;
955
- entities?: (number | Entity)[] | null;
956
- content?: {
957
- root: {
958
- type: string;
959
- children: {
960
- type: any;
961
- version: number;
962
- [k: string]: unknown;
963
- }[];
964
- direction: ('ltr' | 'rtl') | null;
965
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
966
- indent: number;
967
- version: number;
968
- };
969
- [k: string]: unknown;
970
- } | null;
971
- metadata?: {
972
- [k: string]: unknown;
973
- } | unknown[] | string | number | boolean | null;
1086
+ generateSlug?: boolean | null;
1087
+ slug: string;
1088
+ description?: string | null;
974
1089
  updatedAt: string;
975
1090
  createdAt: string;
976
1091
  }
977
1092
  /**
978
1093
  * This interface was referenced by `Config`'s JSON-Schema
979
- * via the `definition` "post-images".
1094
+ * via the `definition` "playlists".
980
1095
  */
981
- interface PostImage {
1096
+ interface Playlist {
1097
+ id: number;
1098
+ tenant?: (number | null) | Tenant;
1099
+ image?: (number | null) | PlaylistImage;
1100
+ title: string;
1101
+ /**
1102
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
1103
+ */
1104
+ generateSlug?: boolean | null;
1105
+ slug: string;
1106
+ description?: string | null;
1107
+ musics?: {
1108
+ docs?: (number | Music)[];
1109
+ hasNextPage?: boolean;
1110
+ totalDocs?: number;
1111
+ };
1112
+ updatedAt: string;
1113
+ createdAt: string;
1114
+ }
1115
+ /**
1116
+ * This interface was referenced by `Config`'s JSON-Schema
1117
+ * via the `definition` "playlist-images".
1118
+ */
1119
+ interface PlaylistImage {
982
1120
  id: number;
983
- brand: number | Brand;
1121
+ tenant?: (number | null) | Tenant;
984
1122
  alt?: string | null;
985
1123
  lqip?: string | null;
986
1124
  palette?: {
@@ -1004,7 +1142,7 @@ interface PostImage {
1004
1142
  focalX?: number | null;
1005
1143
  focalY?: number | null;
1006
1144
  sizes?: {
1007
- thumb?: {
1145
+ '512'?: {
1008
1146
  url?: string | null;
1009
1147
  width?: number | null;
1010
1148
  height?: number | null;
@@ -1012,7 +1150,7 @@ interface PostImage {
1012
1150
  filesize?: number | null;
1013
1151
  filename?: string | null;
1014
1152
  };
1015
- card?: {
1153
+ '1024'?: {
1016
1154
  url?: string | null;
1017
1155
  width?: number | null;
1018
1156
  height?: number | null;
@@ -1024,65 +1162,47 @@ interface PostImage {
1024
1162
  }
1025
1163
  /**
1026
1164
  * This interface was referenced by `Config`'s JSON-Schema
1027
- * via the `definition` "post-categories".
1028
- */
1029
- interface PostCategory {
1030
- id: number;
1031
- _order?: string | null;
1032
- brand: number | Brand;
1033
- title?: string | null;
1034
- description?: string | null;
1035
- updatedAt: string;
1036
- createdAt: string;
1037
- }
1038
- /**
1039
- * This interface was referenced by `Config`'s JSON-Schema
1040
- * via the `definition` "post-tags".
1165
+ * via the `definition` "musics".
1041
1166
  */
1042
- interface PostTag {
1167
+ interface Music {
1043
1168
  id: number;
1044
- _order?: string | null;
1045
- brand: number | Brand;
1046
- title?: string | null;
1047
- description?: string | null;
1169
+ _musics_musics_order?: string | null;
1170
+ tenant?: (number | null) | Tenant;
1171
+ playlist: number | Playlist;
1172
+ url: string;
1173
+ title: string;
1174
+ artist?: string | null;
1175
+ isValid?: boolean | null;
1048
1176
  updatedAt: string;
1049
1177
  createdAt: string;
1050
1178
  }
1051
1179
  /**
1052
1180
  * This interface was referenced by `Config`'s JSON-Schema
1053
- * via the `definition` "documents".
1181
+ * via the `definition` "galleries".
1054
1182
  */
1055
- interface Document {
1183
+ interface Gallery {
1056
1184
  id: number;
1057
1185
  _order?: string | null;
1058
- brand: number | Brand;
1186
+ tenant?: (number | null) | Tenant;
1187
+ thumbnail?: (number | null) | GalleryImage;
1059
1188
  title: string;
1060
- content?: {
1061
- root: {
1062
- type: string;
1063
- children: {
1064
- type: any;
1065
- version: number;
1066
- [k: string]: unknown;
1067
- }[];
1068
- direction: ('ltr' | 'rtl') | null;
1069
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
1070
- indent: number;
1071
- version: number;
1072
- };
1073
- [k: string]: unknown;
1074
- } | null;
1189
+ /**
1190
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
1191
+ */
1192
+ generateSlug?: boolean | null;
1193
+ slug: string;
1194
+ description?: string | null;
1195
+ images: (number | GalleryImage)[];
1075
1196
  updatedAt: string;
1076
1197
  createdAt: string;
1077
1198
  }
1078
1199
  /**
1079
1200
  * This interface was referenced by `Config`'s JSON-Schema
1080
- * via the `definition` "document-images".
1201
+ * via the `definition` "gallery-images".
1081
1202
  */
1082
- interface DocumentImage {
1203
+ interface GalleryImage {
1083
1204
  id: number;
1084
- brand: number | Brand;
1085
- alt?: string | null;
1205
+ tenant?: (number | null) | Tenant;
1086
1206
  lqip?: string | null;
1087
1207
  palette?: {
1088
1208
  vibrant?: string | null;
@@ -1105,7 +1225,7 @@ interface DocumentImage {
1105
1225
  focalX?: number | null;
1106
1226
  focalY?: number | null;
1107
1227
  sizes?: {
1108
- thumb?: {
1228
+ '512'?: {
1109
1229
  url?: string | null;
1110
1230
  width?: number | null;
1111
1231
  height?: number | null;
@@ -1113,7 +1233,7 @@ interface DocumentImage {
1113
1233
  filesize?: number | null;
1114
1234
  filename?: string | null;
1115
1235
  };
1116
- card?: {
1236
+ '1024'?: {
1117
1237
  url?: string | null;
1118
1238
  width?: number | null;
1119
1239
  height?: number | null;
@@ -1123,54 +1243,6 @@ interface DocumentImage {
1123
1243
  };
1124
1244
  };
1125
1245
  }
1126
- /**
1127
- * This interface was referenced by `Config`'s JSON-Schema
1128
- * via the `definition` "nodes".
1129
- */
1130
- interface Node {
1131
- id: number;
1132
- _order?: string | null;
1133
- brand: number | Brand;
1134
- width: number;
1135
- height: number;
1136
- position: {
1137
- x: number;
1138
- y: number;
1139
- };
1140
- relation?: ({
1141
- relationTo: 'posts';
1142
- value: number | Post;
1143
- } | null) | ({
1144
- relationTo: 'product-variants';
1145
- value: number | ProductVariant;
1146
- } | null);
1147
- updatedAt: string;
1148
- createdAt: string;
1149
- }
1150
- /**
1151
- * This interface was referenced by `Config`'s JSON-Schema
1152
- * via the `definition` "galleries".
1153
- */
1154
- interface Gallery {
1155
- id: number;
1156
- _order?: string | null;
1157
- brand: number | Brand;
1158
- thumbnail?: (number | null) | GalleryImage;
1159
- title: string;
1160
- slug?: string | null;
1161
- description?: string | null;
1162
- images: (number | GalleryImage)[];
1163
- /**
1164
- * The status of the gallery
1165
- */
1166
- status?: ('draft' | 'published') | null;
1167
- entities?: (number | Entity)[] | null;
1168
- metadata?: {
1169
- [k: string]: unknown;
1170
- } | unknown[] | string | number | boolean | null;
1171
- updatedAt: string;
1172
- createdAt: string;
1173
- }
1174
1246
  /**
1175
1247
  * This interface was referenced by `Config`'s JSON-Schema
1176
1248
  * via the `definition` "forms".
@@ -1178,7 +1250,6 @@ interface Gallery {
1178
1250
  interface Form {
1179
1251
  id: number;
1180
1252
  title: string;
1181
- brand: number | Brand;
1182
1253
  description?: {
1183
1254
  root: {
1184
1255
  type: string;
@@ -1352,7 +1423,6 @@ interface Form {
1352
1423
  */
1353
1424
  interface FormSubmission {
1354
1425
  id: number;
1355
- brand: number | Brand;
1356
1426
  form: number | Form;
1357
1427
  submissionData?: {
1358
1428
  field: string;
@@ -1383,23 +1453,20 @@ interface PayloadLockedDocument {
1383
1453
  relationTo: 'users';
1384
1454
  value: number | User;
1385
1455
  } | null) | ({
1386
- relationTo: 'static-assets';
1387
- value: number | StaticAsset;
1388
- } | null) | ({
1389
- relationTo: 'brands';
1390
- value: number | Brand;
1456
+ relationTo: 'media';
1457
+ value: number | Media;
1391
1458
  } | null) | ({
1392
- relationTo: 'brand-logos';
1393
- value: number | BrandLogo;
1459
+ relationTo: 'tenants';
1460
+ value: number | Tenant;
1394
1461
  } | null) | ({
1395
- relationTo: 'brand-og-images';
1396
- value: number | BrandOgImage;
1462
+ relationTo: 'tenant-metadata';
1463
+ value: number | TenantMetadatum;
1397
1464
  } | null) | ({
1398
- relationTo: 'brand-settings';
1399
- value: number | BrandSetting;
1465
+ relationTo: 'tenant-logos';
1466
+ value: number | TenantLogo;
1400
1467
  } | null) | ({
1401
- relationTo: 'brand-secret-keys';
1402
- value: number | BrandSecretKey;
1468
+ relationTo: 'tenant-og-images';
1469
+ value: number | TenantOgImage;
1403
1470
  } | null) | ({
1404
1471
  relationTo: 'products';
1405
1472
  value: number | Product;
@@ -1418,6 +1485,12 @@ interface PayloadLockedDocument {
1418
1485
  } | null) | ({
1419
1486
  relationTo: 'product-images';
1420
1487
  value: number | ProductImage;
1488
+ } | null) | ({
1489
+ relationTo: 'brands';
1490
+ value: number | Brand;
1491
+ } | null) | ({
1492
+ relationTo: 'brand-logos';
1493
+ value: number | BrandLogo;
1421
1494
  } | null) | ({
1422
1495
  relationTo: 'orders';
1423
1496
  value: number | Order;
@@ -1434,20 +1507,14 @@ interface PayloadLockedDocument {
1434
1507
  relationTo: 'transactions';
1435
1508
  value: number | Transaction;
1436
1509
  } | null) | ({
1437
- relationTo: 'links';
1438
- value: number | Link;
1439
- } | null) | ({
1440
- relationTo: 'link-images';
1441
- value: number | LinkImage;
1442
- } | null) | ({
1443
- relationTo: 'playlists';
1444
- value: number | Playlist;
1510
+ relationTo: 'documents';
1511
+ value: number | Document;
1445
1512
  } | null) | ({
1446
- relationTo: 'playlist-images';
1447
- value: number | PlaylistImage;
1513
+ relationTo: 'document-categories';
1514
+ value: number | DocumentCategory;
1448
1515
  } | null) | ({
1449
- relationTo: 'musics';
1450
- value: number | Music;
1516
+ relationTo: 'document-images';
1517
+ value: number | DocumentImage;
1451
1518
  } | null) | ({
1452
1519
  relationTo: 'posts';
1453
1520
  value: number | Post;
@@ -1461,26 +1528,14 @@ interface PayloadLockedDocument {
1461
1528
  relationTo: 'post-images';
1462
1529
  value: number | PostImage;
1463
1530
  } | null) | ({
1464
- relationTo: 'documents';
1465
- value: number | Document;
1466
- } | null) | ({
1467
- relationTo: 'document-images';
1468
- value: number | DocumentImage;
1469
- } | null) | ({
1470
- relationTo: 'entities';
1471
- value: number | Entity;
1472
- } | null) | ({
1473
- relationTo: 'entity-categories';
1474
- value: number | EntityCategory;
1475
- } | null) | ({
1476
- relationTo: 'entity-tags';
1477
- value: number | EntityTag;
1531
+ relationTo: 'playlists';
1532
+ value: number | Playlist;
1478
1533
  } | null) | ({
1479
- relationTo: 'entity-images';
1480
- value: number | EntityImage;
1534
+ relationTo: 'playlist-images';
1535
+ value: number | PlaylistImage;
1481
1536
  } | null) | ({
1482
- relationTo: 'nodes';
1483
- value: number | Node;
1537
+ relationTo: 'musics';
1538
+ value: number | Music;
1484
1539
  } | null) | ({
1485
1540
  relationTo: 'galleries';
1486
1541
  value: number | Gallery;
@@ -1535,9 +1590,12 @@ interface PayloadMigration {
1535
1590
  * via the `definition` "users_select".
1536
1591
  */
1537
1592
  interface UsersSelect<T extends boolean = true> {
1538
- name?: T;
1539
- role?: T;
1540
- brand?: T;
1593
+ roles?: T;
1594
+ tenants?: T | {
1595
+ tenant?: T;
1596
+ roles?: T;
1597
+ id?: T;
1598
+ };
1541
1599
  updatedAt?: T;
1542
1600
  createdAt?: T;
1543
1601
  email?: T;
@@ -1555,10 +1613,11 @@ interface UsersSelect<T extends boolean = true> {
1555
1613
  }
1556
1614
  /**
1557
1615
  * This interface was referenced by `Config`'s JSON-Schema
1558
- * via the `definition` "static-assets_select".
1616
+ * via the `definition` "media_select".
1559
1617
  */
1560
- interface StaticAssetsSelect<T extends boolean = true> {
1561
- name?: T;
1618
+ interface MediaSelect<T extends boolean = true> {
1619
+ tenant?: T;
1620
+ alt?: T;
1562
1621
  prefix?: T;
1563
1622
  updatedAt?: T;
1564
1623
  createdAt?: T;
@@ -1574,27 +1633,95 @@ interface StaticAssetsSelect<T extends boolean = true> {
1574
1633
  }
1575
1634
  /**
1576
1635
  * This interface was referenced by `Config`'s JSON-Schema
1577
- * via the `definition` "brands_select".
1636
+ * via the `definition` "tenants_select".
1578
1637
  */
1579
- interface BrandsSelect<T extends boolean = true> {
1580
- title?: T;
1581
- description?: T;
1638
+ interface TenantsSelect<T extends boolean = true> {
1639
+ name?: T;
1640
+ domain?: T;
1641
+ features?: T;
1642
+ plan?: T;
1582
1643
  clientKey?: T;
1583
- secretKeys?: T;
1644
+ secretKeys?: T | {
1645
+ name?: T;
1646
+ value?: T;
1647
+ id?: T;
1648
+ };
1584
1649
  webhookUrl?: T;
1585
- features?: T;
1586
- settings?: T;
1587
1650
  updatedAt?: T;
1588
1651
  createdAt?: T;
1589
1652
  }
1590
1653
  /**
1591
1654
  * This interface was referenced by `Config`'s JSON-Schema
1592
- * via the `definition` "brand-logos_select".
1655
+ * via the `definition` "tenant-metadata_select".
1656
+ */
1657
+ interface TenantMetadataSelect<T extends boolean = true> {
1658
+ tenant?: T;
1659
+ siteInfo?: T | {
1660
+ title?: T;
1661
+ description?: T;
1662
+ keywords?: T;
1663
+ author?: T;
1664
+ siteUrl?: T;
1665
+ };
1666
+ branding?: T | {
1667
+ logo?: T;
1668
+ logoDark?: T;
1669
+ logomark?: T;
1670
+ favicon?: T;
1671
+ themeColor?: T;
1672
+ };
1673
+ openGraph?: T | {
1674
+ ogTitle?: T;
1675
+ ogDescription?: T;
1676
+ ogImage?: T;
1677
+ ogType?: T;
1678
+ ogLocale?: T;
1679
+ };
1680
+ twitter?: T | {
1681
+ twitterCard?: T;
1682
+ twitterSite?: T;
1683
+ twitterCreator?: T;
1684
+ twitterTitle?: T;
1685
+ twitterDescription?: T;
1686
+ twitterImage?: T;
1687
+ };
1688
+ seo?: T | {
1689
+ robots?: T;
1690
+ googleSiteVerification?: T;
1691
+ bingSiteVerification?: T;
1692
+ naverSiteVerification?: T;
1693
+ canonicalUrl?: T;
1694
+ };
1695
+ pwa?: T | {
1696
+ shortName?: T;
1697
+ backgroundColor?: T;
1698
+ display?: T;
1699
+ };
1700
+ analytics?: T | {
1701
+ googleAnalyticsId?: T;
1702
+ googleTagManagerId?: T;
1703
+ facebookPixelId?: T;
1704
+ linkedInPartnerId?: T;
1705
+ };
1706
+ updatedAt?: T;
1707
+ createdAt?: T;
1708
+ }
1709
+ /**
1710
+ * This interface was referenced by `Config`'s JSON-Schema
1711
+ * via the `definition` "tenant-logos_select".
1593
1712
  */
1594
- interface BrandLogosSelect<T extends boolean = true> {
1595
- brand?: T;
1713
+ interface TenantLogosSelect<T extends boolean = true> {
1714
+ tenant?: T;
1596
1715
  alt?: T;
1597
1716
  lqip?: T;
1717
+ palette?: T | {
1718
+ vibrant?: T;
1719
+ muted?: T;
1720
+ darkVibrant?: T;
1721
+ darkMuted?: T;
1722
+ lightVibrant?: T;
1723
+ lightMuted?: T;
1724
+ };
1598
1725
  prefix?: T;
1599
1726
  updatedAt?: T;
1600
1727
  createdAt?: T;
@@ -1607,41 +1734,23 @@ interface BrandLogosSelect<T extends boolean = true> {
1607
1734
  height?: T;
1608
1735
  focalX?: T;
1609
1736
  focalY?: T;
1610
- sizes?: T | {
1611
- favicon?: T | {
1612
- url?: T;
1613
- width?: T;
1614
- height?: T;
1615
- mimeType?: T;
1616
- filesize?: T;
1617
- filename?: T;
1618
- };
1619
- icon?: T | {
1620
- url?: T;
1621
- width?: T;
1622
- height?: T;
1623
- mimeType?: T;
1624
- filesize?: T;
1625
- filename?: T;
1626
- };
1627
- thumb?: T | {
1628
- url?: T;
1629
- width?: T;
1630
- height?: T;
1631
- mimeType?: T;
1632
- filesize?: T;
1633
- filename?: T;
1634
- };
1635
- };
1636
1737
  }
1637
1738
  /**
1638
1739
  * This interface was referenced by `Config`'s JSON-Schema
1639
- * via the `definition` "brand-og-images_select".
1740
+ * via the `definition` "tenant-og-images_select".
1640
1741
  */
1641
- interface BrandOgImagesSelect<T extends boolean = true> {
1642
- brand?: T;
1742
+ interface TenantOgImagesSelect<T extends boolean = true> {
1743
+ tenant?: T;
1643
1744
  alt?: T;
1644
1745
  lqip?: T;
1746
+ palette?: T | {
1747
+ vibrant?: T;
1748
+ muted?: T;
1749
+ darkVibrant?: T;
1750
+ darkMuted?: T;
1751
+ lightVibrant?: T;
1752
+ lightMuted?: T;
1753
+ };
1645
1754
  prefix?: T;
1646
1755
  updatedAt?: T;
1647
1756
  createdAt?: T;
@@ -1654,41 +1763,6 @@ interface BrandOgImagesSelect<T extends boolean = true> {
1654
1763
  height?: T;
1655
1764
  focalX?: T;
1656
1765
  focalY?: T;
1657
- sizes?: T | {
1658
- ogImage?: T | {
1659
- url?: T;
1660
- width?: T;
1661
- height?: T;
1662
- mimeType?: T;
1663
- filesize?: T;
1664
- filename?: T;
1665
- };
1666
- };
1667
- }
1668
- /**
1669
- * This interface was referenced by `Config`'s JSON-Schema
1670
- * via the `definition` "brand-settings_select".
1671
- */
1672
- interface BrandSettingsSelect<T extends boolean = true> {
1673
- brand?: T;
1674
- title?: T;
1675
- description?: T;
1676
- keywords?: T;
1677
- logo?: T;
1678
- ogImage?: T;
1679
- updatedAt?: T;
1680
- createdAt?: T;
1681
- }
1682
- /**
1683
- * This interface was referenced by `Config`'s JSON-Schema
1684
- * via the `definition` "brand-secret-keys_select".
1685
- */
1686
- interface BrandSecretKeysSelect<T extends boolean = true> {
1687
- brand?: T;
1688
- name?: T;
1689
- value?: T;
1690
- updatedAt?: T;
1691
- createdAt?: T;
1692
1766
  }
1693
1767
  /**
1694
1768
  * This interface was referenced by `Config`'s JSON-Schema
@@ -1696,12 +1770,12 @@ interface BrandSecretKeysSelect<T extends boolean = true> {
1696
1770
  */
1697
1771
  interface ProductsSelect<T extends boolean = true> {
1698
1772
  _order?: T;
1699
- brand?: T;
1773
+ tenant?: T;
1700
1774
  sku?: T;
1775
+ generateSlug?: T;
1701
1776
  slug?: T;
1702
1777
  title?: T;
1703
1778
  subTitle?: T;
1704
- status?: T;
1705
1779
  thumbnail?: T;
1706
1780
  images?: T;
1707
1781
  description?: T;
@@ -1709,12 +1783,13 @@ interface ProductsSelect<T extends boolean = true> {
1709
1783
  krwPrice?: T;
1710
1784
  categories?: T;
1711
1785
  tags?: T;
1712
- entities?: T;
1786
+ brand?: T;
1713
1787
  variants?: T;
1714
1788
  options?: T;
1715
1789
  isSoldOut?: T;
1716
1790
  updatedAt?: T;
1717
1791
  createdAt?: T;
1792
+ _status?: T;
1718
1793
  }
1719
1794
  /**
1720
1795
  * This interface was referenced by `Config`'s JSON-Schema
@@ -1723,7 +1798,7 @@ interface ProductsSelect<T extends boolean = true> {
1723
1798
  interface ProductVariantsSelect<T extends boolean = true> {
1724
1799
  _order?: T;
1725
1800
  '_product-variants_variants_order'?: T;
1726
- brand?: T;
1801
+ tenant?: T;
1727
1802
  product?: T;
1728
1803
  title?: T;
1729
1804
  images?: T;
@@ -1739,7 +1814,7 @@ interface ProductOptionsSelect<T extends boolean = true> {
1739
1814
  _order?: T;
1740
1815
  '_product-options_productOptions_order'?: T;
1741
1816
  '_product-options_options_order'?: T;
1742
- brand?: T;
1817
+ tenant?: T;
1743
1818
  product?: T;
1744
1819
  variant?: T;
1745
1820
  title?: T;
@@ -1753,9 +1828,13 @@ interface ProductOptionsSelect<T extends boolean = true> {
1753
1828
  */
1754
1829
  interface ProductCategoriesSelect<T extends boolean = true> {
1755
1830
  _order?: T;
1756
- brand?: T;
1831
+ tenant?: T;
1757
1832
  title?: T;
1833
+ generateSlug?: T;
1834
+ slug?: T;
1758
1835
  description?: T;
1836
+ image?: T;
1837
+ parent?: T;
1759
1838
  updatedAt?: T;
1760
1839
  createdAt?: T;
1761
1840
  }
@@ -1765,8 +1844,10 @@ interface ProductCategoriesSelect<T extends boolean = true> {
1765
1844
  */
1766
1845
  interface ProductTagsSelect<T extends boolean = true> {
1767
1846
  _order?: T;
1768
- brand?: T;
1847
+ tenant?: T;
1769
1848
  title?: T;
1849
+ generateSlug?: T;
1850
+ slug?: T;
1770
1851
  description?: T;
1771
1852
  updatedAt?: T;
1772
1853
  createdAt?: T;
@@ -1776,8 +1857,7 @@ interface ProductTagsSelect<T extends boolean = true> {
1776
1857
  * via the `definition` "product-images_select".
1777
1858
  */
1778
1859
  interface ProductImagesSelect<T extends boolean = true> {
1779
- brand?: T;
1780
- alt?: T;
1860
+ tenant?: T;
1781
1861
  lqip?: T;
1782
1862
  palette?: T | {
1783
1863
  vibrant?: T;
@@ -1818,16 +1898,66 @@ interface ProductImagesSelect<T extends boolean = true> {
1818
1898
  };
1819
1899
  };
1820
1900
  }
1901
+ /**
1902
+ * This interface was referenced by `Config`'s JSON-Schema
1903
+ * via the `definition` "brands_select".
1904
+ */
1905
+ interface BrandsSelect<T extends boolean = true> {
1906
+ _order?: T;
1907
+ tenant?: T;
1908
+ name?: T;
1909
+ generateSlug?: T;
1910
+ slug?: T;
1911
+ logo?: T;
1912
+ logoDark?: T;
1913
+ logomark?: T;
1914
+ description?: T;
1915
+ website?: T;
1916
+ updatedAt?: T;
1917
+ createdAt?: T;
1918
+ }
1919
+ /**
1920
+ * This interface was referenced by `Config`'s JSON-Schema
1921
+ * via the `definition` "brand-logos_select".
1922
+ */
1923
+ interface BrandLogosSelect<T extends boolean = true> {
1924
+ alt?: T;
1925
+ type?: T;
1926
+ lqip?: T;
1927
+ palette?: T | {
1928
+ vibrant?: T;
1929
+ muted?: T;
1930
+ darkVibrant?: T;
1931
+ darkMuted?: T;
1932
+ lightVibrant?: T;
1933
+ lightMuted?: T;
1934
+ };
1935
+ prefix?: T;
1936
+ updatedAt?: T;
1937
+ createdAt?: T;
1938
+ url?: T;
1939
+ thumbnailURL?: T;
1940
+ filename?: T;
1941
+ mimeType?: T;
1942
+ filesize?: T;
1943
+ width?: T;
1944
+ height?: T;
1945
+ focalX?: T;
1946
+ focalY?: T;
1947
+ }
1821
1948
  /**
1822
1949
  * This interface was referenced by `Config`'s JSON-Schema
1823
1950
  * via the `definition` "orders_select".
1824
1951
  */
1825
1952
  interface OrdersSelect<T extends boolean = true> {
1826
- brand?: T;
1953
+ tenant?: T;
1827
1954
  orderNumber?: T;
1828
1955
  status?: T;
1829
1956
  totalAmount?: T;
1830
1957
  email?: T;
1958
+ shippingCarrier?: T;
1959
+ trackingNumber?: T;
1960
+ notes?: T;
1831
1961
  shippingAddress?: T | {
1832
1962
  postalCode?: T;
1833
1963
  address1?: T;
@@ -1847,7 +1977,7 @@ interface OrdersSelect<T extends boolean = true> {
1847
1977
  * via the `definition` "order-products_select".
1848
1978
  */
1849
1979
  interface OrderProductsSelect<T extends boolean = true> {
1850
- brand?: T;
1980
+ tenant?: T;
1851
1981
  order?: T;
1852
1982
  product?: T;
1853
1983
  variant?: T;
@@ -1862,9 +1992,11 @@ interface OrderProductsSelect<T extends boolean = true> {
1862
1992
  * via the `definition` "returns_select".
1863
1993
  */
1864
1994
  interface ReturnsSelect<T extends boolean = true> {
1865
- brand?: T;
1995
+ tenant?: T;
1866
1996
  order?: T;
1997
+ status?: T;
1867
1998
  reason?: T;
1999
+ reasonDetail?: T;
1868
2000
  returnProducts?: T | {
1869
2001
  orderProduct?: T;
1870
2002
  quantity?: T;
@@ -1879,7 +2011,7 @@ interface ReturnsSelect<T extends boolean = true> {
1879
2011
  * via the `definition` "return-products_select".
1880
2012
  */
1881
2013
  interface ReturnProductsSelect<T extends boolean = true> {
1882
- brand?: T;
2014
+ tenant?: T;
1883
2015
  order?: T;
1884
2016
  status?: T;
1885
2017
  orderProduct?: T;
@@ -1896,7 +2028,7 @@ interface ReturnProductsSelect<T extends boolean = true> {
1896
2028
  * via the `definition` "transactions_select".
1897
2029
  */
1898
2030
  interface TransactionsSelect<T extends boolean = true> {
1899
- brand?: T;
2031
+ tenant?: T;
1900
2032
  status?: T;
1901
2033
  order?: T;
1902
2034
  paymentId?: T;
@@ -1908,74 +2040,51 @@ interface TransactionsSelect<T extends boolean = true> {
1908
2040
  }
1909
2041
  /**
1910
2042
  * This interface was referenced by `Config`'s JSON-Schema
1911
- * via the `definition` "links_select".
2043
+ * via the `definition` "documents_select".
1912
2044
  */
1913
- interface LinksSelect<T extends boolean = true> {
1914
- brand?: T;
2045
+ interface DocumentsSelect<T extends boolean = true> {
2046
+ _order?: T;
2047
+ tenant?: T;
1915
2048
  title?: T;
1916
- image?: T;
1917
- link?: T;
1918
- updatedAt?: T;
1919
- createdAt?: T;
1920
- }
1921
- /**
1922
- * This interface was referenced by `Config`'s JSON-Schema
1923
- * via the `definition` "link-images_select".
1924
- */
1925
- interface LinkImagesSelect<T extends boolean = true> {
1926
- brand?: T;
1927
- alt?: T;
1928
- lqip?: T;
1929
- palette?: T | {
1930
- vibrant?: T;
1931
- muted?: T;
1932
- darkVibrant?: T;
1933
- darkMuted?: T;
1934
- lightVibrant?: T;
1935
- lightMuted?: T;
2049
+ generateSlug?: T;
2050
+ slug?: T;
2051
+ type?: T;
2052
+ version?: T;
2053
+ effectiveDate?: T;
2054
+ expiryDate?: T;
2055
+ summary?: T;
2056
+ content?: T;
2057
+ category?: T;
2058
+ tags?: T | {
2059
+ tag?: T;
2060
+ id?: T;
1936
2061
  };
1937
- prefix?: T;
2062
+ isRequired?: T;
2063
+ changeLog?: T;
1938
2064
  updatedAt?: T;
1939
2065
  createdAt?: T;
1940
- url?: T;
1941
- thumbnailURL?: T;
1942
- filename?: T;
1943
- mimeType?: T;
1944
- filesize?: T;
1945
- width?: T;
1946
- height?: T;
1947
- focalX?: T;
1948
- focalY?: T;
1949
- sizes?: T | {
1950
- thumb?: T | {
1951
- url?: T;
1952
- width?: T;
1953
- height?: T;
1954
- mimeType?: T;
1955
- filesize?: T;
1956
- filename?: T;
1957
- };
1958
- };
2066
+ _status?: T;
1959
2067
  }
1960
2068
  /**
1961
2069
  * This interface was referenced by `Config`'s JSON-Schema
1962
- * via the `definition` "playlists_select".
2070
+ * via the `definition` "document-categories_select".
1963
2071
  */
1964
- interface PlaylistsSelect<T extends boolean = true> {
1965
- brand?: T;
1966
- image?: T;
2072
+ interface DocumentCategoriesSelect<T extends boolean = true> {
2073
+ _order?: T;
2074
+ tenant?: T;
1967
2075
  title?: T;
2076
+ generateSlug?: T;
2077
+ slug?: T;
1968
2078
  description?: T;
1969
- musics?: T;
1970
2079
  updatedAt?: T;
1971
2080
  createdAt?: T;
1972
2081
  }
1973
2082
  /**
1974
2083
  * This interface was referenced by `Config`'s JSON-Schema
1975
- * via the `definition` "playlist-images_select".
2084
+ * via the `definition` "document-images_select".
1976
2085
  */
1977
- interface PlaylistImagesSelect<T extends boolean = true> {
1978
- brand?: T;
2086
+ interface DocumentImagesSelect<T extends boolean = true> {
2087
+ tenant?: T;
1979
2088
  alt?: T;
1980
2089
  lqip?: T;
1981
2090
  palette?: T | {
@@ -2017,39 +2126,23 @@ interface PlaylistImagesSelect<T extends boolean = true> {
2017
2126
  };
2018
2127
  };
2019
2128
  }
2020
- /**
2021
- * This interface was referenced by `Config`'s JSON-Schema
2022
- * via the `definition` "musics_select".
2023
- */
2024
- interface MusicsSelect<T extends boolean = true> {
2025
- _musics_musics_order?: T;
2026
- brand?: T;
2027
- playlist?: T;
2028
- url?: T;
2029
- title?: T;
2030
- artist?: T;
2031
- isValid?: T;
2032
- updatedAt?: T;
2033
- createdAt?: T;
2034
- }
2035
2129
  /**
2036
2130
  * This interface was referenced by `Config`'s JSON-Schema
2037
2131
  * via the `definition` "posts_select".
2038
2132
  */
2039
2133
  interface PostsSelect<T extends boolean = true> {
2040
2134
  _order?: T;
2041
- brand?: T;
2135
+ tenant?: T;
2042
2136
  thumbnail?: T;
2043
2137
  title?: T;
2138
+ generateSlug?: T;
2044
2139
  slug?: T;
2045
2140
  categories?: T;
2046
2141
  tags?: T;
2047
- status?: T;
2048
- entities?: T;
2049
2142
  content?: T;
2050
- metadata?: T;
2051
2143
  updatedAt?: T;
2052
2144
  createdAt?: T;
2145
+ _status?: T;
2053
2146
  }
2054
2147
  /**
2055
2148
  * This interface was referenced by `Config`'s JSON-Schema
@@ -2057,9 +2150,12 @@ interface PostsSelect<T extends boolean = true> {
2057
2150
  */
2058
2151
  interface PostCategoriesSelect<T extends boolean = true> {
2059
2152
  _order?: T;
2060
- brand?: T;
2153
+ tenant?: T;
2061
2154
  title?: T;
2155
+ generateSlug?: T;
2156
+ slug?: T;
2062
2157
  description?: T;
2158
+ parent?: T;
2063
2159
  updatedAt?: T;
2064
2160
  createdAt?: T;
2065
2161
  }
@@ -2069,8 +2165,10 @@ interface PostCategoriesSelect<T extends boolean = true> {
2069
2165
  */
2070
2166
  interface PostTagsSelect<T extends boolean = true> {
2071
2167
  _order?: T;
2072
- brand?: T;
2168
+ tenant?: T;
2073
2169
  title?: T;
2170
+ generateSlug?: T;
2171
+ slug?: T;
2074
2172
  description?: T;
2075
2173
  updatedAt?: T;
2076
2174
  createdAt?: T;
@@ -2080,7 +2178,7 @@ interface PostTagsSelect<T extends boolean = true> {
2080
2178
  * via the `definition` "post-images_select".
2081
2179
  */
2082
2180
  interface PostImagesSelect<T extends boolean = true> {
2083
- brand?: T;
2181
+ tenant?: T;
2084
2182
  alt?: T;
2085
2183
  lqip?: T;
2086
2184
  palette?: T | {
@@ -2104,7 +2202,7 @@ interface PostImagesSelect<T extends boolean = true> {
2104
2202
  focalX?: T;
2105
2203
  focalY?: T;
2106
2204
  sizes?: T | {
2107
- thumb?: T | {
2205
+ '512'?: T | {
2108
2206
  url?: T;
2109
2207
  width?: T;
2110
2208
  height?: T;
@@ -2112,7 +2210,7 @@ interface PostImagesSelect<T extends boolean = true> {
2112
2210
  filesize?: T;
2113
2211
  filename?: T;
2114
2212
  };
2115
- card?: T | {
2213
+ '1024'?: T | {
2116
2214
  url?: T;
2117
2215
  width?: T;
2118
2216
  height?: T;
@@ -2124,22 +2222,25 @@ interface PostImagesSelect<T extends boolean = true> {
2124
2222
  }
2125
2223
  /**
2126
2224
  * This interface was referenced by `Config`'s JSON-Schema
2127
- * via the `definition` "documents_select".
2225
+ * via the `definition` "playlists_select".
2128
2226
  */
2129
- interface DocumentsSelect<T extends boolean = true> {
2130
- _order?: T;
2131
- brand?: T;
2227
+ interface PlaylistsSelect<T extends boolean = true> {
2228
+ tenant?: T;
2229
+ image?: T;
2132
2230
  title?: T;
2133
- content?: T;
2231
+ generateSlug?: T;
2232
+ slug?: T;
2233
+ description?: T;
2234
+ musics?: T;
2134
2235
  updatedAt?: T;
2135
2236
  createdAt?: T;
2136
2237
  }
2137
2238
  /**
2138
2239
  * This interface was referenced by `Config`'s JSON-Schema
2139
- * via the `definition` "document-images_select".
2240
+ * via the `definition` "playlist-images_select".
2140
2241
  */
2141
- interface DocumentImagesSelect<T extends boolean = true> {
2142
- brand?: T;
2242
+ interface PlaylistImagesSelect<T extends boolean = true> {
2243
+ tenant?: T;
2143
2244
  alt?: T;
2144
2245
  lqip?: T;
2145
2246
  palette?: T | {
@@ -2163,7 +2264,7 @@ interface DocumentImagesSelect<T extends boolean = true> {
2163
2264
  focalX?: T;
2164
2265
  focalY?: T;
2165
2266
  sizes?: T | {
2166
- thumb?: T | {
2267
+ '512'?: T | {
2167
2268
  url?: T;
2168
2269
  width?: T;
2169
2270
  height?: T;
@@ -2171,7 +2272,7 @@ interface DocumentImagesSelect<T extends boolean = true> {
2171
2272
  filesize?: T;
2172
2273
  filename?: T;
2173
2274
  };
2174
- card?: T | {
2275
+ '1024'?: T | {
2175
2276
  url?: T;
2176
2277
  width?: T;
2177
2278
  height?: T;
@@ -2183,52 +2284,51 @@ interface DocumentImagesSelect<T extends boolean = true> {
2183
2284
  }
2184
2285
  /**
2185
2286
  * This interface was referenced by `Config`'s JSON-Schema
2186
- * via the `definition` "entities_select".
2287
+ * via the `definition` "musics_select".
2187
2288
  */
2188
- interface EntitiesSelect<T extends boolean = true> {
2189
- _order?: T;
2190
- brand?: T;
2289
+ interface MusicsSelect<T extends boolean = true> {
2290
+ _musics_musics_order?: T;
2291
+ tenant?: T;
2292
+ playlist?: T;
2293
+ url?: T;
2191
2294
  title?: T;
2192
- slug?: T;
2193
- thumbnail?: T;
2194
- images?: T;
2195
- description?: T;
2196
- categories?: T;
2197
- tags?: T;
2295
+ artist?: T;
2296
+ isValid?: T;
2198
2297
  updatedAt?: T;
2199
2298
  createdAt?: T;
2200
2299
  }
2201
2300
  /**
2202
2301
  * This interface was referenced by `Config`'s JSON-Schema
2203
- * via the `definition` "entity-categories_select".
2302
+ * via the `definition` "galleries_select".
2204
2303
  */
2205
- interface EntityCategoriesSelect<T extends boolean = true> {
2304
+ interface GalleriesSelect<T extends boolean = true> {
2206
2305
  _order?: T;
2207
- brand?: T;
2306
+ tenant?: T;
2307
+ thumbnail?: T;
2208
2308
  title?: T;
2309
+ generateSlug?: T;
2310
+ slug?: T;
2311
+ description?: T;
2312
+ images?: T;
2209
2313
  updatedAt?: T;
2210
2314
  createdAt?: T;
2211
2315
  }
2212
2316
  /**
2213
2317
  * This interface was referenced by `Config`'s JSON-Schema
2214
- * via the `definition` "entity-tags_select".
2318
+ * via the `definition` "gallery-images_select".
2215
2319
  */
2216
- interface EntityTagsSelect<T extends boolean = true> {
2217
- _order?: T;
2218
- brand?: T;
2219
- title?: T;
2220
- updatedAt?: T;
2221
- createdAt?: T;
2222
- }
2223
- /**
2224
- * This interface was referenced by `Config`'s JSON-Schema
2225
- * via the `definition` "entity-images_select".
2226
- */
2227
- interface EntityImagesSelect<T extends boolean = true> {
2228
- brand?: T;
2229
- alt?: T;
2230
- lqip?: T;
2231
- prefix?: T;
2320
+ interface GalleryImagesSelect<T extends boolean = true> {
2321
+ tenant?: T;
2322
+ lqip?: T;
2323
+ palette?: T | {
2324
+ vibrant?: T;
2325
+ muted?: T;
2326
+ darkVibrant?: T;
2327
+ darkMuted?: T;
2328
+ lightVibrant?: T;
2329
+ lightMuted?: T;
2330
+ };
2331
+ prefix?: T;
2232
2332
  updatedAt?: T;
2233
2333
  createdAt?: T;
2234
2334
  url?: T;
@@ -2259,95 +2359,12 @@ interface EntityImagesSelect<T extends boolean = true> {
2259
2359
  };
2260
2360
  };
2261
2361
  }
2262
- /**
2263
- * This interface was referenced by `Config`'s JSON-Schema
2264
- * via the `definition` "nodes_select".
2265
- */
2266
- interface NodesSelect<T extends boolean = true> {
2267
- _order?: T;
2268
- brand?: T;
2269
- width?: T;
2270
- height?: T;
2271
- position?: T | {
2272
- x?: T;
2273
- y?: T;
2274
- };
2275
- relation?: T;
2276
- updatedAt?: T;
2277
- createdAt?: T;
2278
- }
2279
- /**
2280
- * This interface was referenced by `Config`'s JSON-Schema
2281
- * via the `definition` "galleries_select".
2282
- */
2283
- interface GalleriesSelect<T extends boolean = true> {
2284
- _order?: T;
2285
- brand?: T;
2286
- thumbnail?: T;
2287
- title?: T;
2288
- slug?: T;
2289
- description?: T;
2290
- images?: T;
2291
- status?: T;
2292
- entities?: T;
2293
- metadata?: T;
2294
- updatedAt?: T;
2295
- createdAt?: T;
2296
- }
2297
- /**
2298
- * This interface was referenced by `Config`'s JSON-Schema
2299
- * via the `definition` "gallery-images_select".
2300
- */
2301
- interface GalleryImagesSelect<T extends boolean = true> {
2302
- brand?: T;
2303
- alt?: T;
2304
- lqip?: T;
2305
- palette?: T | {
2306
- vibrant?: T;
2307
- muted?: T;
2308
- darkVibrant?: T;
2309
- darkMuted?: T;
2310
- lightVibrant?: T;
2311
- lightMuted?: T;
2312
- };
2313
- prefix?: T;
2314
- updatedAt?: T;
2315
- createdAt?: T;
2316
- url?: T;
2317
- thumbnailURL?: T;
2318
- filename?: T;
2319
- mimeType?: T;
2320
- filesize?: T;
2321
- width?: T;
2322
- height?: T;
2323
- focalX?: T;
2324
- focalY?: T;
2325
- sizes?: T | {
2326
- thumb?: T | {
2327
- url?: T;
2328
- width?: T;
2329
- height?: T;
2330
- mimeType?: T;
2331
- filesize?: T;
2332
- filename?: T;
2333
- };
2334
- card?: T | {
2335
- url?: T;
2336
- width?: T;
2337
- height?: T;
2338
- mimeType?: T;
2339
- filesize?: T;
2340
- filename?: T;
2341
- };
2342
- };
2343
- }
2344
2362
  /**
2345
2363
  * This interface was referenced by `Config`'s JSON-Schema
2346
2364
  * via the `definition` "forms_select".
2347
2365
  */
2348
2366
  interface FormsSelect<T extends boolean = true> {
2349
2367
  title?: T;
2350
- brand?: T;
2351
2368
  description?: T;
2352
2369
  fields?: T | {
2353
2370
  checkbox?: T | {
@@ -2456,7 +2473,6 @@ interface FormsSelect<T extends boolean = true> {
2456
2473
  * via the `definition` "form-submissions_select".
2457
2474
  */
2458
2475
  interface FormSubmissionsSelect<T extends boolean = true> {
2459
- brand?: T;
2460
2476
  form?: T;
2461
2477
  submissionData?: T | {
2462
2478
  field?: T;
@@ -2518,1120 +2534,454 @@ declare module 'payload' {
2518
2534
  }
2519
2535
  }
2520
2536
 
2521
- /**
2522
- * API 모듈 타입 정의
2523
- */
2524
- /**
2525
- * API 클라이언트 설정 옵션
2526
- */
2527
- interface ApiClientOptions {
2528
- clientKey: string;
2529
- /** 시크릿 키 (필수) */
2530
- secretKey: string;
2531
- /** API 기본 URL (선택) */
2532
- baseUrl?: string;
2537
+ declare class SDKError extends Error {
2538
+ readonly code: string;
2539
+ readonly status?: number;
2540
+ readonly details?: unknown;
2541
+ readonly userMessage?: string;
2542
+ readonly suggestion?: string;
2543
+ constructor(code: string, message: string, status?: number, details?: unknown, userMessage?: string, suggestion?: string);
2544
+ getUserMessage(): string;
2545
+ toJSON(): {
2546
+ name: string;
2547
+ code: string;
2548
+ message: string;
2549
+ status: number | undefined;
2550
+ details: unknown;
2551
+ userMessage: string | undefined;
2552
+ suggestion: string | undefined;
2553
+ };
2533
2554
  }
2555
+ declare class NetworkError extends SDKError {
2556
+ constructor(message: string, status?: number, details?: unknown, userMessage?: string, suggestion?: string);
2557
+ }
2558
+ declare class ValidationError extends SDKError {
2559
+ constructor(message: string, details?: unknown, userMessage?: string, suggestion?: string);
2560
+ }
2561
+ declare class ApiError extends SDKError {
2562
+ constructor(message: string, status: number, details?: unknown, userMessage?: string, suggestion?: string);
2563
+ }
2564
+ declare class ConfigError extends SDKError {
2565
+ constructor(message: string, details?: unknown, userMessage?: string, suggestion?: string);
2566
+ }
2567
+ declare class TimeoutError extends SDKError {
2568
+ constructor(message?: string, details?: unknown, userMessage?: string, suggestion?: string);
2569
+ }
2570
+ declare function isSDKError(error: unknown): error is SDKError;
2571
+ declare function isNetworkError(error: unknown): error is NetworkError;
2572
+ declare function isValidationError(error: unknown): error is ValidationError;
2573
+ declare function isApiError(error: unknown): error is ApiError;
2574
+ declare function isConfigError(error: unknown): error is ConfigError;
2575
+ declare function isTimeoutError(error: unknown): error is TimeoutError;
2534
2576
 
2535
2577
  /**
2536
- * 주문 생성 파라미터
2537
- */
2538
- type CreateOrderParams = {
2539
- /** 결제 ID */
2540
- paymentId: string;
2541
- /** 주문 번호 */
2542
- orderNumber: string;
2543
- /** 고객 이메일 */
2544
- email: string;
2545
- /** 배송 주소 */
2546
- shippingAddress: Order['shippingAddress'];
2547
- /** 주문 상품 목록 */
2548
- orderProducts: Omit<OrderProduct, 'id' | 'brand' | 'createdAt' | 'updatedAt' | 'order' | 'status'>[];
2549
- /** 총 주문 금액 */
2550
- totalAmount: number;
2551
- };
2552
- /**
2553
- * 주문을 생성합니다.
2554
- *
2555
- * @param params - 주문 생성 파라미터 및 클라이언트 옵션
2556
- * @returns 생성된 주문 객체
2557
- *
2558
- * @example
2559
- * ```typescript
2560
- * const order = await createOrder({
2561
- * paymentId: 'pay_123',
2562
- * orderNumber: 'ORD-001',
2563
- * email: 'user@example.com',
2564
- * orderProducts: [...],
2565
- * totalAmount: 10000,
2566
- * clientKey: 'your-client-key',
2567
- * secretKey: 'your-secret-key'
2568
- * })
2569
- * ```
2570
- */
2571
- declare const createOrder: ({ paymentId, orderNumber, orderProducts, email, shippingAddress, totalAmount, secretKey, clientKey, baseUrl, }: CreateOrderParams & ApiClientOptions) => Promise<Order>;
2572
-
2573
- /**
2574
- * 주문 업데이트 파라미터
2578
+ * Collection type derived from Payload Config.
2579
+ * This ensures type safety and automatic synchronization with payload-types.ts
2575
2580
  */
2576
- type UpdateOrderParams = {
2577
- /** 주문 번호 */
2578
- orderNumber: string;
2579
- /** 주문 상태 */
2580
- status: Order['status'];
2581
- };
2581
+ type Collection = keyof Config['collections'];
2582
2582
  /**
2583
- * 주문을 업데이트합니다.
2584
- *
2585
- * @param params - 주문 업데이트 파라미터 및 클라이언트 옵션
2586
- * @returns 업데이트된 주문 객체
2587
- *
2588
- * @example
2589
- * ```typescript
2590
- * const order = await updateOrder({
2591
- * orderNumber: 'ORD-001',
2592
- * status: 'completed',
2593
- * clientKey: 'your-client-key',
2594
- * secretKey: 'your-secret-key'
2595
- * })
2596
- * ```
2583
+ * Internal Payload collections that should not be exposed via SDK.
2597
2584
  */
2598
- declare const updateOrder: ({ orderNumber, status, secretKey, clientKey, baseUrl, }: UpdateOrderParams & ApiClientOptions) => Promise<Order>;
2599
-
2585
+ declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations"];
2586
+ type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
2600
2587
  /**
2601
- * 트랜잭션 업데이트 파라미터
2588
+ * Public collections available for SDK access.
2589
+ * Excludes internal Payload system collections.
2602
2590
  */
2603
- type UpdateTransactionParams = {
2604
- /** 결제 ID */
2605
- paymentId: string;
2606
- /** 트랜잭션 상태 */
2607
- status: Transaction['status'];
2608
- /** 결제 방법 */
2609
- paymentMethod: Transaction['paymentMethod'];
2610
- /** 영수증 URL */
2611
- receiptUrl: Transaction['receiptUrl'];
2612
- };
2591
+ type PublicCollection = Exclude<Collection, InternalCollection>;
2613
2592
  /**
2614
- * 트랜잭션을 업데이트합니다.
2615
- *
2616
- * @param params - 트랜잭션 업데이트 파라미터 및 클라이언트 옵션
2617
- * @returns 업데이트된 트랜잭션 객체
2618
- *
2619
- * @example
2620
- * ```typescript
2621
- * const transaction = await updateTransaction({
2622
- * paymentId: 'pay_123',
2623
- * status: 'completed',
2624
- * paymentMethod: 'card',
2625
- * receiptUrl: 'https://receipt.example.com/123',
2626
- * clientKey: 'your-client-key',
2627
- * secretKey: 'your-secret-key'
2628
- * })
2629
- * ```
2593
+ * Array of all public collection names for runtime use (e.g., Zod enum validation).
2594
+ * This is derived from Config to ensure type safety.
2630
2595
  */
2631
- declare const updateTransaction: ({ paymentId, status, paymentMethod, receiptUrl, secretKey, clientKey, baseUrl, }: UpdateTransactionParams & ApiClientOptions) => Promise<Transaction>;
2596
+ declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "tenant-og-images", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-images", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "transactions", "documents", "document-categories", "document-images", "posts", "post-categories", "post-tags", "post-images", "playlists", "playlist-images", "musics", "galleries", "gallery-images", "forms", "form-submissions", "media"];
2632
2597
 
2598
+ type Environment = 'local' | 'development' | 'staging' | 'production';
2599
+ declare const API_URLS: Record<Environment, string>;
2633
2600
  /**
2634
- * API 클라이언트
2635
- *
2636
- * 주문 및 트랜잭션 관련 API 메서드를 제공하는 클라이언트입니다.
2637
- * 서버 사이드에서만 사용해야 합니다.
2638
- *
2639
- * @example
2640
- * ```typescript
2641
- * const apiClient = new ApiClient({
2642
- * clientKey: 'your-client-key',
2643
- * secretKey: 'your-secret-key',
2644
- * baseUrl: 'https://api.example.com'
2645
- * })
2646
- *
2647
- * const order = await apiClient.createOrder({ ... })
2648
- * ```
2601
+ * 환경에 맞는 API URL을 반환합니다.
2602
+ * 우선순위: baseUrl > environment > 환경변수 > 기본값(production)
2649
2603
  */
2650
- declare class ApiClient {
2651
- private readonly clientKey;
2652
- private readonly secretKey;
2653
- private readonly baseUrl?;
2654
- constructor(options: ApiClientOptions);
2655
- /**
2656
- * 공통 옵션을 생성합니다.
2657
- *
2658
- * @private
2659
- */
2660
- private getCommonOptions;
2661
- /**
2662
- * 주문을 생성합니다.
2663
- *
2664
- * @param params - 주문 생성 파라미터
2665
- * @returns 생성된 주문 객체
2666
- *
2667
- * @example
2668
- * ```typescript
2669
- * const order = await apiClient.createOrder({
2670
- * paymentId: 'pay_123',
2671
- * orderNumber: 'ORD-001',
2672
- * email: 'user@example.com',
2673
- * orderProducts: [...],
2674
- * totalAmount: 10000
2675
- * })
2676
- * ```
2677
- */
2678
- createOrder(params: CreateOrderParams): Promise<Order>;
2604
+ declare function resolveApiUrl(config?: {
2605
+ baseUrl?: string;
2606
+ environment?: Environment;
2607
+ }): string;
2608
+ interface ClientBrowserConfig {
2609
+ clientKey: string;
2679
2610
  /**
2680
- * 주문을 업데이트합니다.
2681
- *
2682
- * @param params - 주문 업데이트 파라미터
2683
- * @returns 업데이트된 주문 객체
2684
- *
2685
- * @example
2686
- * ```typescript
2687
- * const order = await apiClient.updateOrder({
2688
- * paymentId: 'pay_123',
2689
- * status: 'completed'
2690
- * })
2691
- * ```
2611
+ * API 환경 설정.
2612
+ * - 'local': localhost:3000
2613
+ * - 'development': dev.01.software
2614
+ * - 'staging': stg.01.software
2615
+ * - 'production': api.01.software
2616
+ *
2617
+ * baseUrl이 설정되면 이 값은 무시됩니다.
2618
+ * @default 'production'
2692
2619
  */
2693
- updateOrder(params: UpdateOrderParams): Promise<Order>;
2620
+ environment?: Environment;
2694
2621
  /**
2695
- * 트랜잭션을 업데이트합니다.
2696
- *
2697
- * @param params - 트랜잭션 업데이트 파라미터
2698
- * @returns 업데이트된 트랜잭션 객체
2699
- *
2700
- * @example
2701
- * ```typescript
2702
- * const transaction = await apiClient.updateTransaction({
2703
- * paymentId: 'pay_123',
2704
- * status: 'completed',
2705
- * paymentMethod: 'card',
2706
- * receiptUrl: 'https://receipt.example.com/123'
2707
- * })
2708
- * ```
2622
+ * 커스텀 API URL. 설정 시 environment 값은 무시됩니다.
2623
+ * @example 'https://my-custom-api.example.com'
2709
2624
  */
2710
- updateTransaction(params: UpdateTransactionParams): Promise<Transaction>;
2625
+ baseUrl?: string;
2626
+ }
2627
+ interface ClientServerConfig extends ClientBrowserConfig {
2628
+ secretKey: string;
2711
2629
  }
2712
-
2713
- /**
2714
- * 클라이언트 메타데이터
2715
- *
2716
- * 클라이언트 생성 시점과 환경 정보를 포함합니다.
2717
- */
2718
2630
  interface ClientMetadata {
2719
- /** 사용자 에이전트 정보 */
2720
2631
  userAgent?: string;
2721
- /** 클라이언트 생성 타임스탬프 */
2722
2632
  timestamp: number;
2723
2633
  }
2724
- /**
2725
- * API 응답 기본 타입
2726
- *
2727
- * @template T - 응답 데이터 타입
2728
- */
2729
- interface ApiResponse<T = any> {
2730
- /** 응답 데이터 */
2731
- data: T;
2732
- /** 성공 여부 */
2733
- success: boolean;
2734
- /** 응답 메시지 (선택) */
2735
- message?: string;
2736
- /** 에러 메시지 (선택) */
2737
- error?: string;
2738
- /** 페이지네이션 메타데이터 (선택) */
2739
- pagination?: PaginationMeta;
2634
+ interface ClientState {
2635
+ metadata: ClientMetadata;
2740
2636
  }
2741
- /**
2742
- * 페이지네이션 메타데이터
2743
- *
2744
- * 목록 조회 시 페이지네이션 정보를 제공합니다.
2745
- */
2746
2637
  interface PaginationMeta {
2747
- /** 현재 페이지 번호 */
2748
2638
  page: number;
2749
- /** 페이지당 항목 수 */
2750
2639
  limit: number;
2751
- /** 전체 문서 수 */
2752
2640
  totalDocs: number;
2753
- /** 전체 페이지 수 */
2754
2641
  totalPages: number;
2755
- /** 다음 페이지 존재 여부 */
2756
2642
  hasNextPage: boolean;
2757
- /** 이전 페이지 존재 여부 */
2758
2643
  hasPrevPage: boolean;
2759
2644
  }
2760
- /**
2761
- * 쿼리 옵션 타입
2762
- *
2763
- * 컬렉션 조회 시 사용하는 옵션입니다.
2764
- */
2645
+ interface ApiSuccessResponse<T = unknown> {
2646
+ data: T;
2647
+ success: true;
2648
+ message?: string;
2649
+ pagination?: PaginationMeta;
2650
+ }
2651
+ interface ApiErrorResponse {
2652
+ data: null;
2653
+ success: false;
2654
+ error: {
2655
+ code: string;
2656
+ message: string;
2657
+ details?: unknown;
2658
+ };
2659
+ }
2660
+ type ApiResponse<T = unknown> = ApiSuccessResponse<T> | ApiErrorResponse;
2765
2661
  interface ApiQueryOptions {
2766
- /** 페이지 번호 */
2767
2662
  page?: number;
2768
- /** 페이지당 항목 수 */
2769
2663
  limit?: number;
2770
- /** 정렬 옵션 */
2771
2664
  sort?: Sort;
2772
- /** 필터링 조건 */
2773
2665
  where?: Where;
2774
2666
  }
2775
- /**
2776
- * 쿼리 리액트 옵션 타입
2777
- *
2778
- * 컬렉션 조회 시 사용하는 리액트 옵션입니다.
2779
- */
2780
2667
  interface ApiQueryReactOptions {
2781
2668
  keepPreviousData?: boolean;
2782
2669
  }
2783
- /**
2784
- * 클라이언트 에러 타입
2785
- *
2786
- * SDK에서 발생하는 에러를 표현합니다.
2787
- */
2788
- interface ClientError extends Error {
2789
- /** 에러 코드 */
2790
- code?: string;
2791
- /** HTTP 상태 코드 */
2792
- status?: number;
2793
- /** 추가 에러 상세 정보 */
2794
- details?: any;
2795
- }
2796
- /**
2797
- * 클라이언트 상태
2798
- *
2799
- * 클라이언트의 내부 상태를 포함합니다.
2800
- */
2801
- interface ClientState {
2802
- /** 클라이언트 메타데이터 */
2803
- metadata: ClientMetadata;
2670
+ interface DebugConfig {
2671
+ logRequests?: boolean;
2672
+ logResponses?: boolean;
2673
+ logErrors?: boolean;
2804
2674
  }
2805
- /**
2806
- * 브라우저 클라이언트 설정
2807
- *
2808
- * 브라우저 환경에서 사용하는 클라이언트 설정입니다.
2809
- */
2810
- interface ClientBrowserConfig {
2811
- /** 클라이언트 키 (필수) */
2812
- clientKey: string;
2813
- /** API 기본 URL (선택) */
2814
- baseUrl?: string;
2675
+ interface RetryConfig {
2676
+ maxRetries?: number;
2677
+ retryableStatuses?: number[];
2678
+ retryDelay?: (attempt: number) => number;
2815
2679
  }
2816
- /**
2817
- * 서버 클라이언트 설정
2818
- *
2819
- * 서버 환경에서 사용하는 클라이언트 설정입니다.
2820
- * 시크릿 키가 포함되어 있어 서버에서만 사용해야 합니다.
2821
- */
2822
- interface ClientServerConfig extends ClientBrowserConfig {
2823
- /** 시크릿 키 (필수, 서버 전용) */
2824
- secretKey: string;
2680
+ interface ErrorLogger {
2681
+ log(error: SDKError | Error, context?: Record<string, unknown>): void;
2825
2682
  }
2826
- /**
2827
- * 컬렉션 타입
2828
- *
2829
- * Payload CMS의 모든 컬렉션 이름을 나타냅니다.
2830
- * Supabase 스타일의 쿼리 빌더에서 사용됩니다.
2831
- */
2832
- type Collection = keyof Config['collections'];
2683
+ type DeepPartial<T> = {
2684
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
2685
+ };
2686
+ type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
2687
+ declare function isSuccessResponse<T>(response: ApiResponse<T>): response is ApiSuccessResponse<T>;
2688
+ declare function isErrorResponse(response: ApiResponse<unknown>): response is ApiErrorResponse;
2689
+
2690
+ type CollectionType<T extends Collection> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
2833
2691
 
2834
- /**
2835
- * Fetch 요청 옵션 인터페이스
2836
- *
2837
- * @interface FetchOptions
2838
- * @extends RequestInit
2839
- */
2840
2692
  interface FetchOptions extends RequestInit {
2841
- /** 클라이언트 키 (브랜드 식별용) */
2842
2693
  clientKey?: string;
2843
- /** 시크릿 키 (서버 사이드 인증용) */
2844
2694
  secretKey?: string;
2845
- /** 요청 타임아웃 (밀리초, 기본값: 30초) */
2846
2695
  timeout?: number;
2847
- /** 기본 API URL (기본값: https://01.software) */
2848
2696
  baseUrl?: string;
2697
+ debug?: boolean | DebugConfig;
2698
+ retry?: RetryConfig;
2699
+ }
2700
+ interface JwtPayload {
2701
+ clientKey: string;
2702
+ iat?: number;
2703
+ exp?: number;
2849
2704
  }
2850
2705
  /**
2851
- * 향상된 fetch 함수
2852
- *
2853
- * 클라이언트 키, 시크릿 키 헤더 자동 설정 및 에러 처리를 제공합니다.
2854
- *
2855
- * @param url - 요청할 URL (상대 경로)
2856
- * @param options - Fetch 옵션
2857
- * @returns Promise<Response>
2706
+ * Creates a JWT token for server-side authentication.
2707
+ * The token is valid for 1 hour by default.
2858
2708
  *
2859
- * @throws {NetworkError} 네트워크 연결 실패
2860
- * @throws {TimeoutError} 요청 타임아웃
2709
+ * @param clientKey - Client API key
2710
+ * @param secretKey - Secret key used for signing
2711
+ * @param expiresIn - Token expiration time (default: '1h')
2712
+ * @returns Promise<string> JWT token
2861
2713
  *
2862
2714
  * @example
2863
2715
  * ```typescript
2864
- * const response = await _fetch('/api/products', {
2865
- * clientKey: 'your-client-key',
2866
- * method: 'GET'
2867
- * })
2716
+ * const token = await createServerToken('client-key', 'secret-key')
2717
+ * // Use in Authorization header: `Bearer ${token}`
2868
2718
  * ```
2869
2719
  */
2870
- declare const _fetch: (url: string, options?: FetchOptions) => Promise<Response>;
2871
-
2720
+ declare function createServerToken(clientKey: string, secretKey: string, expiresIn?: string): Promise<string>;
2872
2721
  /**
2873
- * 컬렉션 관련 타입 정의
2722
+ * Verifies a JWT token and returns the payload.
2723
+ *
2724
+ * @param token - JWT token to verify
2725
+ * @param secretKey - Secret key used for verification
2726
+ * @returns Promise<JwtPayload> Verified payload containing clientKey
2727
+ * @throws Error if token is invalid or expired
2728
+ *
2729
+ * @example
2730
+ * ```typescript
2731
+ * const payload = await verifyServerToken(token, 'secret-key')
2732
+ * console.log(payload.clientKey)
2733
+ * ```
2874
2734
  */
2875
-
2735
+ declare function verifyServerToken(token: string, secretKey: string): Promise<JwtPayload>;
2876
2736
  /**
2877
- * 컬렉션 타입 매핑
2878
- *
2879
- * 컬렉션 이름을 해당 컬렉션의 타입으로 변환합니다.
2737
+ * Decodes a JWT token without verification.
2738
+ * WARNING: Use this only when you need to inspect token contents.
2739
+ * Always use verifyServerToken for authentication.
2880
2740
  *
2881
- * @template T - 컬렉션 이름
2741
+ * @param token - JWT token to decode
2742
+ * @returns JwtPayload Decoded payload (unverified)
2882
2743
  *
2883
2744
  * @example
2884
2745
  * ```typescript
2885
- * type Product = CollectionType<'products'>
2886
- * // Product는 Config['collections']['products'] 타입
2746
+ * const payload = decodeServerToken(token)
2747
+ * console.log(payload.clientKey) // Unverified!
2887
2748
  * ```
2888
2749
  */
2889
- type CollectionType<T extends Collection> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
2890
-
2750
+ declare function decodeServerToken(token: string): JwtPayload;
2891
2751
  /**
2892
- * API 클라이언트 기본 클래스
2752
+ * Creates a Base64-encoded API key from clientKey and secretKey.
2753
+ * Use this for MCP server authentication.
2893
2754
  *
2894
- * 모든 API 클라이언트의 베이스 클래스로, 공통적인 HTTP 메서드들과
2895
- * 에러 처리, 응답 파싱 기능을 제공합니다.
2755
+ * @param clientKey - Client API key
2756
+ * @param secretKey - Secret key
2757
+ * @returns Base64-encoded API key
2758
+ *
2759
+ * @example
2760
+ * ```typescript
2761
+ * const apiKey = createApiKey('client-key', 'secret-key')
2762
+ * // Use in x-api-key header
2763
+ * ```
2896
2764
  */
2897
-
2765
+ declare function createApiKey(clientKey: string, secretKey: string): string;
2898
2766
  /**
2899
- * API 클라이언트 기본 클래스
2767
+ * Parses a Base64-encoded API key to extract clientKey and secretKey.
2768
+ *
2769
+ * @param apiKey - Base64-encoded API key
2770
+ * @returns Object containing clientKey and secretKey
2771
+ * @throws Error if API key is invalid
2900
2772
  *
2901
- * @class BaseApiClient
2773
+ * @example
2774
+ * ```typescript
2775
+ * const { clientKey, secretKey } = parseApiKey(apiKey)
2776
+ * ```
2902
2777
  */
2778
+ declare function parseApiKey(apiKey: string): {
2779
+ clientKey: string;
2780
+ secretKey: string;
2781
+ };
2782
+
2903
2783
  declare class BaseApiClient {
2904
2784
  protected clientKey: string;
2905
2785
  protected secretKey?: string;
2906
2786
  protected baseUrl?: string;
2907
2787
  protected defaultOptions: FetchOptions;
2908
- /**
2909
- * BaseApiClient 생성자
2910
- *
2911
- * @param clientKey - 클라이언트 키 (필수)
2912
- * @param secretKey - 시크릿 키 (선택, 서버 사이드에서만 사용)
2913
- * @param baseUrl - 기본 API URL (선택, 기본값: https://01.software)
2914
- *
2915
- * @example
2916
- * ```typescript
2917
- * const client = new BaseApiClient('your-client-key', 'your-secret-key')
2918
- * ```
2919
- */
2920
2788
  constructor(clientKey: string, secretKey?: string, baseUrl?: string);
2921
- /**
2922
- * GET 요청을 수행합니다.
2923
- *
2924
- * @template T - 응답 데이터 타입
2925
- * @param endpoint - API 엔드포인트
2926
- * @param options - 쿼리 옵션 (페이지네이션, 필터링 등)
2927
- * @returns Promise<ApiResponse<T>>
2928
- *
2929
- * @example
2930
- * ```typescript
2931
- * const response = await client.get<Product[]>('/api/products', {
2932
- * page: 1,
2933
- * limit: 10,
2934
- * where: { status: 'published' }
2935
- * })
2936
- * ```
2937
- */
2938
- protected get<T = any>(endpoint: string, options?: ApiQueryOptions): Promise<ApiResponse<T>>;
2939
- /**
2940
- * POST 요청을 수행합니다.
2941
- *
2942
- * @template T - 응답 데이터 타입
2943
- * @param endpoint - API 엔드포인트
2944
- * @param data - 전송할 데이터
2945
- * @param options - 추가 fetch 옵션
2946
- * @returns Promise<ApiResponse<T>>
2947
- *
2948
- * @example
2949
- * ```typescript
2950
- * const response = await client.post<Product>('/api/products', {
2951
- * title: '새 제품',
2952
- * price: 10000
2953
- * })
2954
- * ```
2955
- */
2956
- protected post<T = any>(endpoint: string, data?: any, options?: FetchOptions): Promise<ApiResponse<T>>;
2957
- /**
2958
- * PATCH 요청을 수행합니다.
2959
- *
2960
- * @template T - 응답 데이터 타입
2961
- * @param endpoint - API 엔드포인트
2962
- * @param data - 전송할 데이터
2963
- * @param options - 추가 fetch 옵션
2964
- * @returns Promise<ApiResponse<T>>
2965
- */
2966
- protected patch<T = any>(endpoint: string, data?: any, options?: FetchOptions): Promise<ApiResponse<T>>;
2967
- /**
2968
- * DELETE 요청을 수행합니다.
2969
- *
2970
- * @template T - 응답 데이터 타입
2971
- * @param endpoint - API 엔드포인트
2972
- * @param options - 추가 fetch 옵션
2973
- * @returns Promise<ApiResponse<T>>
2974
- */
2975
- protected delete<T = any>(endpoint: string, options?: FetchOptions): Promise<ApiResponse<T>>;
2976
- /**
2977
- * URL에 쿼리 파라미터를 추가합니다.
2978
- *
2979
- * @param endpoint - 기본 엔드포인트
2980
- * @param options - 쿼리 옵션
2981
- * @returns 쿼리 파라미터가 추가된 URL
2982
- *
2983
- * @private
2984
- */
2789
+ protected get<T = unknown>(endpoint: string, options?: ApiQueryOptions): Promise<ApiResponse<T>>;
2790
+ protected post<T = unknown>(endpoint: string, data?: unknown, options?: FetchOptions): Promise<ApiResponse<T>>;
2791
+ protected patch<T = unknown>(endpoint: string, data?: unknown, options?: FetchOptions): Promise<ApiResponse<T>>;
2792
+ protected delete<T = unknown>(endpoint: string, options?: FetchOptions): Promise<ApiResponse<T>>;
2985
2793
  protected buildUrl(endpoint: string, options?: ApiQueryOptions): string;
2986
- /**
2987
- * HTTP 응답을 파싱하여 ApiResponse 형태로 변환합니다.
2988
- *
2989
- * Payload CMS의 응답 형식을 자동으로 감지하고 처리합니다.
2990
- *
2991
- * @template T - 응답 데이터 타입
2992
- * @param response - HTTP Response 객체
2993
- * @returns Promise<ApiResponse<T>>
2994
- *
2995
- * @throws {ApiError} JSON 파싱 실패 시
2996
- *
2997
- * @private
2998
- */
2999
2794
  protected parseResponse<T>(response: Response): Promise<ApiResponse<T>>;
3000
2795
  }
3001
2796
 
3002
- /**
3003
- * 컬렉션 API 클라이언트
3004
- *
3005
- * BaseApiClient를 상속하여 기본 HTTP 메서드를 사용하고,
3006
- * Supabase 스타일의 쿼리 빌더를 제공합니다.
3007
- */
3008
-
3009
- /**
3010
- * 통합 컬렉션 API 클라이언트
3011
- *
3012
- * BaseApiClient를 상속하여 기본 HTTP 메서드를 사용하고,
3013
- * Supabase 스타일의 쿼리 빌더를 제공합니다.
3014
- *
3015
- * @example
3016
- * ```typescript
3017
- * const api = new CollectionsApi('client-key', 'secret-key')
3018
- *
3019
- * // 목록 조회 - Product[] 타입 반환
3020
- * const { data: products } = await api.from('products').find({ page: 1 })
3021
- *
3022
- * // 단일 조회 - Product 타입 반환
3023
- * const { data: product } = await api.from('products').findById('123')
3024
- *
3025
- * // 생성 - Product 타입 반환
3026
- * const { data: newProduct } = await api.from('products').create({ title: '새 제품' })
3027
- *
3028
- * // 업데이트 - Product 타입 반환
3029
- * const { data: updated } = await api.from('products').update('123', { title: '수정된 제품' })
3030
- *
3031
- * // 삭제
3032
- * await api.from('products').remove('123')
3033
- * ```
3034
- */
3035
2797
  declare class CollectionsApi extends BaseApiClient {
3036
2798
  constructor(clientKey: string, secretKey?: string, baseUrl?: string);
3037
- /**
3038
- * 컬렉션 선택
3039
- * 선택한 컬렉션 타입에 맞는 타입 안전한 빌더를 반환합니다.
3040
- *
3041
- * @template T - 컬렉션 타입
3042
- * @param collection - 컬렉션 이름
3043
- * @returns 타입 안전한 컬렉션 쿼리 빌더
3044
- *
3045
- * @example
3046
- * ```typescript
3047
- * // 'products'를 선택하면 Product 타입이 반환됨
3048
- * const builder = api.from('products')
3049
- * const { data } = await builder.findById('123') // data는 Product 타입
3050
- *
3051
- * // 'orders'를 선택하면 Order 타입이 반환됨
3052
- * const { data: orders } = await api.from('orders').find() // orders는 Order[] 타입
3053
- * ```
3054
- */
3055
2799
  from<T extends Collection>(collection: T): CollectionQueryBuilder<T>;
3056
- /**
3057
- * GET 요청을 수행합니다.
3058
- *
3059
- * @template T - 응답 데이터 타입
3060
- * @param endpoint - API 엔드포인트
3061
- * @param options - 쿼리 옵션
3062
- * @returns Promise<ApiResponse<T>>
3063
- *
3064
- * @internal
3065
- */
3066
- requestGet<T = any>(endpoint: string, options?: ApiQueryOptions): Promise<ApiResponse<T>>;
3067
- /**
3068
- * POST 요청을 수행합니다.
3069
- *
3070
- * @template T - 응답 데이터 타입
3071
- * @param endpoint - API 엔드포인트
3072
- * @param data - 전송할 데이터
3073
- * @returns Promise<ApiResponse<T>>
3074
- *
3075
- * @internal
3076
- */
3077
- requestPost<T = any>(endpoint: string, data?: any): Promise<ApiResponse<T>>;
3078
- /**
3079
- * PATCH 요청을 수행합니다.
3080
- *
3081
- * @template T - 응답 데이터 타입
3082
- * @param endpoint - API 엔드포인트
3083
- * @param data - 전송할 데이터
3084
- * @returns Promise<ApiResponse<T>>
3085
- *
3086
- * @internal
3087
- */
3088
- requestPatch<T = any>(endpoint: string, data?: any): Promise<ApiResponse<T>>;
3089
- /**
3090
- * DELETE 요청을 수행합니다.
3091
- *
3092
- * @template T - 응답 데이터 타입
3093
- * @param endpoint - API 엔드포인트
3094
- * @returns Promise<ApiResponse<T>>
3095
- *
3096
- * @internal
3097
- */
3098
- requestDelete<T = any>(endpoint: string): Promise<ApiResponse<T>>;
2800
+ requestGet<T = unknown>(endpoint: string, options?: ApiQueryOptions): Promise<ApiResponse<T>>;
2801
+ requestPost<T = unknown>(endpoint: string, data?: unknown): Promise<ApiResponse<T>>;
2802
+ requestPatch<T = unknown>(endpoint: string, data?: unknown): Promise<ApiResponse<T>>;
2803
+ requestDelete<T = unknown>(endpoint: string): Promise<ApiResponse<T>>;
3099
2804
  }
3100
2805
 
3101
- /**
3102
- * 컬렉션 쿼리 빌더
3103
- *
3104
- * 타입 안전한 컬렉션 쿼리 빌더를 제공합니다.
3105
- */
3106
-
3107
- /**
3108
- * 타입 안전한 컬렉션 쿼리 빌더
3109
- *
3110
- * 특정 컬렉션 타입에 대한 정확한 타입 추론을 제공합니다.
3111
- *
3112
- * @template T - 선택된 컬렉션 타입
3113
- *
3114
- * @example
3115
- * ```typescript
3116
- * const builder = api.from('products')
3117
- * // builder의 모든 메서드는 Product 타입을 반환
3118
- *
3119
- * const products = await builder.find() // Product[]
3120
- * const product = await builder.findById('123') // Product
3121
- * ```
3122
- */
3123
2806
  declare class CollectionQueryBuilder<T extends Collection> {
3124
2807
  private api;
3125
2808
  private collection;
3126
2809
  constructor(api: CollectionsApi, collection: T);
3127
- /**
3128
- * 컬렉션 목록 조회
3129
- *
3130
- * @param options - 쿼리 옵션 (선택)
3131
- * @returns Promise<ApiResponse<CollectionType<T>[]>>
3132
- *
3133
- * @example
3134
- * ```typescript
3135
- * const { data } = await api.from('products').find({ page: 1, limit: 20 })
3136
- * // data는 Product[] 타입
3137
- * ```
3138
- */
3139
2810
  find(options?: ApiQueryOptions): Promise<ApiResponse<CollectionType<T>[]>>;
3140
- /**
3141
- * ID로 특정 문서 조회
3142
- *
3143
- * @param id - 문서 ID
3144
- * @param options - 쿼리 옵션 (선택)
3145
- * @returns Promise<ApiResponse<CollectionType<T>>>
3146
- *
3147
- * @example
3148
- * ```typescript
3149
- * const { data } = await api.from('products').findById('123')
3150
- * // data는 Product 타입
3151
- * ```
3152
- */
3153
2811
  findById(id: number | string, options?: ApiQueryOptions): Promise<ApiResponse<CollectionType<T>>>;
3154
- /**
3155
- * 문서 생성
3156
- *
3157
- * @param data - 생성할 문서 데이터
3158
- * @returns Promise<ApiResponse<CollectionType<T>>>
3159
- *
3160
- * @example
3161
- * ```typescript
3162
- * const { data } = await api.from('products').create({ title: '새 제품' })
3163
- * // data는 Product 타입
3164
- * ```
3165
- */
3166
2812
  create(data: Partial<CollectionType<T>>): Promise<ApiResponse<CollectionType<T>>>;
3167
- /**
3168
- * 문서 업데이트
3169
- *
3170
- * @param id - 문서 ID
3171
- * @param data - 업데이트할 문서 데이터
3172
- * @returns Promise<ApiResponse<CollectionType<T>>>
3173
- *
3174
- * @example
3175
- * ```typescript
3176
- * const { data } = await api.from('products').update('123', { title: '수정된 제품' })
3177
- * // data는 Product 타입
3178
- * ```
3179
- */
3180
2813
  update(id: number | string, data: Partial<CollectionType<T>>): Promise<ApiResponse<CollectionType<T>>>;
3181
- /**
3182
- * 문서 삭제
3183
- *
3184
- * @param id - 문서 ID
3185
- * @returns Promise<ApiResponse<void>>
3186
- *
3187
- * @example
3188
- * ```typescript
3189
- * await api.from('products').remove('123')
3190
- * ```
3191
- */
3192
2814
  remove(id: number | string): Promise<ApiResponse<void>>;
3193
2815
  }
3194
2816
 
3195
- declare const COLLECTIONS: readonly ["brands", "brand-logos", "brand-og-images", "brand-settings", "brand-secret-keys", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-images", "orders", "order-products", "returns", "return-products", "transactions", "links", "link-images", "playlists", "playlist-images", "musics", "posts", "post-categories", "post-tags", "post-images", "documents", "document-images", "entities", "entity-categories", "entity-tags", "entity-images", "nodes", "galleries", "gallery-images", "forms"];
3196
-
3197
2817
  interface UnifiedQueryOptions {
3198
- brandKey?: string;
3199
- brandSecret?: string;
2818
+ clientKey?: string;
3200
2819
  baseUrl?: string;
3201
2820
  }
3202
- /**
3203
- * 통합 쿼리 클라이언트
3204
- * React Query를 사용한 데이터 페칭 및 캐싱 관리
3205
- */
2821
+ declare function collectionKeys<T extends Collection>(collection: T): {
2822
+ all: readonly [T];
2823
+ lists: () => readonly [T, "list"];
2824
+ list: (options?: ApiQueryOptions) => readonly [T, "list", ApiQueryOptions | undefined];
2825
+ details: () => readonly [T, "detail"];
2826
+ detail: (id: string | number, options?: ApiQueryOptions) => readonly [T, "detail", string | number, ApiQueryOptions | undefined];
2827
+ infinites: () => readonly [T, "infinite"];
2828
+ infinite: (options?: Omit<ApiQueryOptions, "page">) => readonly [T, "infinite", Omit<ApiQueryOptions, "page"> | undefined];
2829
+ };
2830
+ interface CollectionQueryParams<T extends Collection> {
2831
+ collection: T;
2832
+ options?: ApiQueryOptions;
2833
+ }
2834
+ interface CollectionDetailQueryParams<T extends Collection> {
2835
+ collection: T;
2836
+ id: string | number;
2837
+ options?: ApiQueryOptions;
2838
+ }
2839
+ interface CollectionInfiniteQueryParams<T extends Collection> {
2840
+ collection: T;
2841
+ options?: Omit<ApiQueryOptions, 'page'>;
2842
+ pageSize?: number;
2843
+ }
3206
2844
  declare class UnifiedQueryClient {
3207
2845
  private queryClient;
3208
2846
  private collectionsApi;
3209
2847
  constructor(queryClient: QueryClient, options?: UnifiedQueryOptions);
3210
- /**
3211
- * 컬렉션 리스트 조회 훅
3212
- * @example const { data } = useCollection('products', { where: { status: 'published' } })
3213
- */
3214
- useCollection<T extends Collection>(collection: T, queryOptions?: ApiQueryOptions, reactQueryOptions?: ApiQueryReactOptions): _tanstack_react_query.UseQueryResult<CollectionType<T>[], Error>;
3215
- /**
3216
- * 컬렉션 단일 항목 조회 훅
3217
- * @example const { data } = useCollectionSingle('products', { where: { featured: true } })
3218
- */
3219
- useCollectionSingle<T extends Collection>(collection: T, queryOptions?: Omit<ApiQueryOptions, 'limit'>, reactQueryOptions?: ApiQueryReactOptions): _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<CollectionType<T> | null>, Error>;
3220
- /**
3221
- * 컬렉션 무한 스크롤 조회 훅
3222
- * @example const { data, fetchNextPage } = useCollectionInfinite('products', { limit: 20 })
3223
- */
3224
- useCollectionInfinite<T extends Collection>(collection: T, queryOptions?: Omit<ApiQueryOptions, 'page'>, reactQueryOptions?: ApiQueryReactOptions): _tanstack_react_query.UseInfiniteQueryResult<CollectionType<T>[], Error>;
3225
- /**
3226
- * ID로 특정 항목 조회 훅
3227
- * @example const { data } = useById('products', '123')
3228
- */
3229
- useById<T extends Collection>(collection: T, id: string | number, queryOptions?: ApiQueryOptions, reactQueryOptions?: ApiQueryReactOptions): _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<CollectionType<T>>, Error>;
3230
- /**
3231
- * 컬렉션 리스트 프리페치 (useCollection에 대응)
3232
- * @example await client.query.prefetchCollection('products', { where: { status: 'published' } })
3233
- */
3234
- prefetchCollection<T extends Collection>(collection: T, queryOptions?: ApiQueryOptions): Promise<void>;
3235
- /**
3236
- * 컬렉션 단일 항목 프리페치 (useCollectionSingle에 대응)
3237
- * @example await client.query.prefetchCollectionSingle('products', { where: { featured: true } })
3238
- */
3239
- prefetchCollectionSingle<T extends Collection>(collection: T, queryOptions?: Omit<ApiQueryOptions, 'limit'>): Promise<void>;
3240
- /**
3241
- * 컬렉션 무한 쿼리 프리페치 (useCollectionInfinite에 대응)
3242
- * @example await client.query.prefetchCollectionInfinite('products', { limit: 20 })
3243
- */
3244
- prefetchCollectionInfinite<T extends Collection>(collection: T, queryOptions?: Omit<ApiQueryOptions, 'page'>): Promise<void>;
3245
- /**
3246
- * ID로 특정 항목 프리페치 (useById에 대응)
3247
- * @example await client.query.prefetchById('products', '123')
3248
- */
3249
- prefetchById<T extends Collection>(collection: T, id: string | number, queryOptions?: ApiQueryOptions): Promise<void>;
3250
- /**
3251
- * 캐시 조작 메서드들
3252
- */
3253
- /**
3254
- * 쿼리 무효화
3255
- * @example client.invalidateQueries('products') // 모든 products 쿼리 무효화
3256
- * @example client.invalidateQueries('products', 'list') // products list 쿼리만 무효화
3257
- */
3258
- invalidateQueries(collection: Collection, operation?: string): Promise<void>;
3259
- /**
3260
- * 쿼리 데이터 조회
3261
- * @example const data = client.getQueryData('products', 'list')
3262
- */
3263
- getQueryData<T>(collection: Collection, operation: string, ...params: (string | number)[]): T | undefined;
3264
- /**
3265
- * 쿼리 데이터 설정
3266
- * @example client.setQueryData('products', 'list', newData)
3267
- */
3268
- setQueryData<T>(collection: Collection, operation: string, data: T, ...params: (string | number)[]): _tanstack_react_query.NoInfer<T> | undefined;
2848
+ useQuery<T extends Collection>(params: CollectionQueryParams<T>, options?: {
2849
+ enabled?: boolean;
2850
+ staleTime?: number;
2851
+ gcTime?: number;
2852
+ refetchOnWindowFocus?: boolean;
2853
+ refetchOnMount?: boolean;
2854
+ refetchInterval?: number | false;
2855
+ retry?: boolean | number;
2856
+ }): _tanstack_react_query.UseQueryResult<CollectionType<T>[], Error>;
2857
+ useSuspenseQuery<T extends Collection>(params: CollectionQueryParams<T>, options?: {
2858
+ staleTime?: number;
2859
+ gcTime?: number;
2860
+ refetchOnWindowFocus?: boolean;
2861
+ refetchOnMount?: boolean;
2862
+ refetchInterval?: number | false;
2863
+ retry?: boolean | number;
2864
+ }): _tanstack_react_query.UseSuspenseQueryResult<CollectionType<T>[], Error>;
2865
+ useQueryById<T extends Collection>(params: CollectionDetailQueryParams<T>, options?: {
2866
+ enabled?: boolean;
2867
+ staleTime?: number;
2868
+ gcTime?: number;
2869
+ refetchOnWindowFocus?: boolean;
2870
+ refetchOnMount?: boolean;
2871
+ refetchInterval?: number | false;
2872
+ retry?: boolean | number;
2873
+ }): _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<CollectionType<T> | null>, Error>;
2874
+ useSuspenseQueryById<T extends Collection>(params: CollectionDetailQueryParams<T>, options?: {
2875
+ staleTime?: number;
2876
+ gcTime?: number;
2877
+ refetchOnWindowFocus?: boolean;
2878
+ refetchOnMount?: boolean;
2879
+ refetchInterval?: number | false;
2880
+ retry?: boolean | number;
2881
+ }): _tanstack_react_query.UseSuspenseQueryResult<CollectionType<T> | null, Error>;
2882
+ useInfiniteQuery<T extends Collection>(params: CollectionInfiniteQueryParams<T>, options?: {
2883
+ enabled?: boolean;
2884
+ staleTime?: number;
2885
+ gcTime?: number;
2886
+ refetchOnWindowFocus?: boolean;
2887
+ refetchOnMount?: boolean;
2888
+ retry?: boolean | number;
2889
+ }): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<CollectionType<T>[], unknown>, Error>;
2890
+ useSuspenseInfiniteQuery<T extends Collection>(params: CollectionInfiniteQueryParams<T>, options?: {
2891
+ staleTime?: number;
2892
+ gcTime?: number;
2893
+ refetchOnWindowFocus?: boolean;
2894
+ refetchOnMount?: boolean;
2895
+ retry?: boolean | number;
2896
+ }): _tanstack_react_query.UseSuspenseInfiniteQueryResult<_tanstack_react_query.InfiniteData<CollectionType<T>[], unknown>, Error>;
2897
+ prefetchQuery<T extends Collection>(params: CollectionQueryParams<T>, options?: {
2898
+ staleTime?: number;
2899
+ }): Promise<void>;
2900
+ prefetchQueryById<T extends Collection>(params: CollectionDetailQueryParams<T>, options?: {
2901
+ staleTime?: number;
2902
+ }): Promise<void>;
2903
+ prefetchInfiniteQuery<T extends Collection>(params: CollectionInfiniteQueryParams<T>, options?: {
2904
+ pages?: number;
2905
+ staleTime?: number;
2906
+ }): Promise<void>;
2907
+ invalidateQueries<T extends Collection>(collection: T, type?: 'list' | 'detail' | 'infinite'): Promise<void>;
2908
+ getQueryData<T extends Collection>(collection: T, type: 'list', options?: ApiQueryOptions): CollectionType<T>[] | undefined;
2909
+ getQueryData<T extends Collection>(collection: T, type: 'detail', id: string | number, options?: ApiQueryOptions): CollectionType<T> | null | undefined;
2910
+ setQueryData<T extends Collection>(collection: T, type: 'list', data: CollectionType<T>[], options?: ApiQueryOptions): void;
2911
+ setQueryData<T extends Collection>(collection: T, type: 'detail', id: string | number, data: CollectionType<T> | null, options?: ApiQueryOptions): void;
3269
2912
  }
3270
2913
 
3271
- /**
3272
- * 브라우저 클라이언트
3273
- *
3274
- * Supabase Client와 유사한 구조로 설계된 통합 클라이언트입니다.
3275
- * 브라우저 환경에서 API 호출, 쿼리 관리, 유틸리티 기능을 제공합니다.
3276
- *
3277
- * @template _Database - 데이터베이스 스키마 타입 (기본값: Config)
3278
- *
3279
- * @example
3280
- * ```typescript
3281
- * import { createBrowserClient } from '@your-org/sdk'
3282
- *
3283
- * const client = createBrowserClient({
3284
- * clientKey: 'your-client-key'
3285
- * })
3286
- *
3287
- * // 제품 목록 조회
3288
- * const products = await client.from('products').find({
3289
- * where: { status: 'published' }
3290
- * })
3291
- *
3292
- * // React Query 훅 사용
3293
- * const { data } = client.query.useCollection('products')
3294
- * ```
3295
- */
3296
2914
  declare class BrowserClient<_Database = Config> {
3297
- /**
3298
- * 통합 Query 클라이언트
3299
- *
3300
- * React Query 기반의 데이터 페칭 훅들을 제공합니다.
3301
- *
3302
- * @example
3303
- * ```typescript
3304
- * const { data, isLoading } = client.query.useCollection('products')
3305
- * const { data: product } = client.query.useById('products', '123')
3306
- * ```
3307
- */
3308
2915
  query: UnifiedQueryClient;
3309
- /**
3310
- * 범용 컬렉션 API 클라이언트 (Supabase 스타일)
3311
- *
3312
- * 모든 컬렉션에 대한 CRUD 작업을 제공합니다.
3313
- *
3314
- * @example
3315
- * ```typescript
3316
- * const products = await client.collections.from('products').find()
3317
- * ```
3318
- */
3319
2916
  collections: CollectionsApi;
3320
- /**
3321
- * React Query 클라이언트 인스턴스
3322
- *
3323
- * 직접적인 쿼리 캐시 조작이 필요한 경우 사용합니다.
3324
- */
3325
2917
  queryClient: QueryClient;
3326
- /** 클라이언트 내부 상태 */
3327
2918
  protected state: ClientState;
3328
- /** 클라이언트 설정 */
3329
2919
  protected config: ClientBrowserConfig;
3330
- /** Fetch 함수 인스턴스 */
3331
- protected fetch: typeof _fetch;
3332
- /**
3333
- * BrowserClient 인스턴스를 생성합니다.
3334
- *
3335
- * @param options - 클라이언트 설정 옵션
3336
- * @throws {ValidationError} clientKey가 제공되지 않은 경우
3337
- *
3338
- * @example
3339
- * ```typescript
3340
- * const client = new BrowserClient({
3341
- * clientKey: 'your-client-key',
3342
- * environment: 'production',
3343
- * debug: false
3344
- * })
3345
- * ```
3346
- */
2920
+ protected baseUrl: string;
3347
2921
  constructor(options: ClientBrowserConfig);
3348
- /**
3349
- * 현재 브랜드의 설정을 조회합니다.
3350
- *
3351
- * 클라이언트 키와 일치하는 브랜드 설정을 반환합니다.
3352
- *
3353
- * @returns 브랜드 설정 객체 또는 null
3354
- *
3355
- * @example
3356
- * ```typescript
3357
- * const settings = await client.getSettings()
3358
- * if (settings) {
3359
- * console.log('브랜드 제목:', settings.title)
3360
- * }
3361
- * ```
3362
- */
3363
- getSettings(): Promise<BrandSetting | null | undefined>;
3364
- /**
3365
- * Collection에 대한 쿼리 빌더를 생성합니다.
3366
- *
3367
- * Supabase 스타일의 메서드 체이닝을 제공하며,
3368
- * 선택한 컬렉션 타입에 맞는 정확한 타입 추론을 제공합니다.
3369
- *
3370
- * @template T - 컬렉션 타입
3371
- * @param collection - 컬렉션 이름
3372
- * @returns 타입 안전한 컬렉션 쿼리 빌더
3373
- *
3374
- * @example
3375
- * ```typescript
3376
- * // 제품 목록 조회 - Product[] 타입 반환
3377
- * const { data: products } = await client.from('products').find({
3378
- * where: { status: 'published' },
3379
- * limit: 10
3380
- * })
3381
- * // products는 Product[] 타입
3382
- *
3383
- * // 특정 제품 조회 - Product 타입 반환
3384
- * const { data: product } = await client.from('products').findById('123')
3385
- * // product는 Product 타입
3386
- *
3387
- * // 제품 생성 - Product 타입 반환
3388
- * const { data: newProduct } = await client.from('products').create({
3389
- * title: '새 제품',
3390
- * price: 10000
3391
- * })
3392
- * // newProduct는 Product 타입
3393
- * ```
3394
- */
3395
2922
  from<T extends Collection>(collection: T): CollectionQueryBuilder<T>;
3396
- /**
3397
- * 클라이언트의 현재 상태를 반환합니다.
3398
- *
3399
- * @returns 클라이언트 상태의 복사본
3400
- */
3401
2923
  getState(): ClientState;
3402
2924
  }
3403
- /**
3404
- * BrowserClient 인스턴스를 생성하는 헬퍼 함수
3405
- *
3406
- * @param options - 클라이언트 설정 옵션
3407
- * @returns BrowserClient 인스턴스
3408
- *
3409
- * @example
3410
- * ```typescript
3411
- * import { createBrowserClient } from '@01.software/sdk'
3412
- *
3413
- * export const client = createBrowserClient({
3414
- * clientKey: process.env.NEXT_PUBLIC_SOFTWARE_CLIENT_KEY!,
3415
- * })
3416
- * ```
3417
- */
3418
- declare const createBrowserClient: (options: ClientBrowserConfig) => BrowserClient;
2925
+ declare function createBrowserClient(options: ClientBrowserConfig): BrowserClient;
2926
+
2927
+ interface ApiClientOptions {
2928
+ clientKey: string;
2929
+ secretKey: string;
2930
+ baseUrl?: string;
2931
+ }
2932
+ type CreateOrderParams = {
2933
+ paymentId: string;
2934
+ orderNumber: string;
2935
+ email: string;
2936
+ shippingAddress: Order['shippingAddress'];
2937
+ orderProducts: Omit<OrderProduct, 'id' | 'brand' | 'createdAt' | 'updatedAt' | 'order' | 'status'>[];
2938
+ totalAmount: number;
2939
+ };
2940
+ type UpdateOrderParams = {
2941
+ orderNumber: string;
2942
+ status: Order['status'];
2943
+ };
2944
+ type UpdateTransactionParams = {
2945
+ paymentId: string;
2946
+ status: Transaction['status'];
2947
+ paymentMethod: Transaction['paymentMethod'];
2948
+ receiptUrl: Transaction['receiptUrl'];
2949
+ };
2950
+ declare class ApiClient {
2951
+ private readonly clientKey;
2952
+ private readonly secretKey;
2953
+ private readonly baseUrl?;
2954
+ constructor(options: ApiClientOptions);
2955
+ private request;
2956
+ createOrder(params: CreateOrderParams): Promise<Order>;
2957
+ updateOrder(params: UpdateOrderParams): Promise<Order>;
2958
+ updateTransaction(params: UpdateTransactionParams): Promise<Transaction>;
2959
+ }
3419
2960
 
3420
- /**
3421
- * 서버 클라이언트
3422
- *
3423
- * Supabase Client와 유사한 구조로 설계된 통합 클라이언트입니다.
3424
- * 서버 환경에서 API 호출과 컬렉션 관리를 제공합니다.
3425
- * 시크릿 키를 사용하여 인증된 요청을 수행할 수 있습니다.
3426
- *
3427
- * @template _Database - 데이터베이스 스키마 타입 (기본값: Config)
3428
- *
3429
- * @example
3430
- * ```typescript
3431
- * import { createServerClient } from '@01.software/sdk'
3432
- *
3433
- * const client = createServerClient({
3434
- * clientKey: 'your-client-key',
3435
- * secretKey: 'your-secret-key'
3436
- * })
3437
- *
3438
- * // 제품 목록 조회
3439
- * const products = await client.from('products').find()
3440
- * ```
3441
- */
3442
2961
  declare class ServerClient<_Database = Config> {
3443
- /**
3444
- * API 클라이언트
3445
- *
3446
- * REST API 호출을 위한 메서드들을 제공합니다.
3447
- */
3448
2962
  api: ApiClient;
3449
- /**
3450
- * 범용 컬렉션 API 클라이언트
3451
- *
3452
- * Supabase 스타일의 쿼리 빌더를 제공합니다.
3453
- * 모든 컬렉션에 대한 CRUD 작업을 지원합니다.
3454
- */
3455
2963
  collections: CollectionsApi;
3456
- /** 클라이언트 내부 상태 */
3457
2964
  protected state: ClientState;
3458
- /** 클라이언트 설정 */
3459
2965
  protected config: ClientServerConfig;
3460
- /** Fetch 함수 인스턴스 */
3461
- protected fetch: typeof _fetch;
3462
- /**
3463
- * ServerClient 인스턴스를 생성합니다.
3464
- *
3465
- * @param options - 클라이언트 설정 옵션
3466
- * @throws {Error} clientKey 또는 secretKey가 제공되지 않은 경우
3467
- *
3468
- * @example
3469
- * ```typescript
3470
- * const client = new ServerClient({
3471
- * clientKey: 'your-client-key',
3472
- * secretKey: 'your-secret-key',
3473
- * baseUrl: 'https://api.example.com'
3474
- * })
3475
- * ```
3476
- */
2966
+ protected baseUrl: string;
3477
2967
  constructor(options: ClientServerConfig);
3478
- /**
3479
- * 현재 브랜드의 설정을 조회합니다.
3480
- *
3481
- * 클라이언트 키와 일치하는 브랜드 설정을 반환합니다.
3482
- *
3483
- * @returns 브랜드 설정 객체 또는 null
3484
- *
3485
- * @example
3486
- * ```typescript
3487
- * const settings = await client.getSettings()
3488
- * if (settings) {
3489
- * console.log('브랜드 제목:', settings.title)
3490
- * }
3491
- * ```
3492
- */
3493
- getSettings(): Promise<BrandSetting | null | undefined>;
3494
- /**
3495
- * Collection에 대한 쿼리 빌더를 생성합니다.
3496
- *
3497
- * Supabase 스타일의 메서드 체이닝을 제공하며,
3498
- * 선택한 컬렉션 타입에 맞는 정확한 타입 추론을 제공합니다.
3499
- *
3500
- * @template T - 컬렉션 타입
3501
- * @param collection - 컬렉션 이름
3502
- * @returns 타입 안전한 컬렉션 쿼리 빌더
3503
- *
3504
- * @example
3505
- * ```typescript
3506
- * // 제품 목록 조회 - Product[] 타입 반환
3507
- * const { data: products } = await client.from('products').find()
3508
- * // products는 Product[] 타입
3509
- *
3510
- * // 특정 제품 조회 - Product 타입 반환
3511
- * const { data: product } = await client.from('products').findById('123')
3512
- * // product는 Product 타입
3513
- *
3514
- * // 제품 생성 - Product 타입 반환
3515
- * const { data: newProduct } = await client.from('products').create({
3516
- * title: '새 제품'
3517
- * })
3518
- * // newProduct는 Product 타입
3519
- * ```
3520
- */
3521
2968
  from<T extends Collection>(collection: T): CollectionQueryBuilder<T>;
3522
- /**
3523
- * 클라이언트의 현재 상태를 반환합니다.
3524
- *
3525
- * @returns 클라이언트 상태의 복사본
3526
- */
3527
2969
  getState(): ClientState;
3528
- /**
3529
- * 클라이언트 설정을 반환합니다.
3530
- *
3531
- * 보안을 위해 시크릿 키는 제외하고 반환합니다.
3532
- *
3533
- * @returns 시크릿 키가 제외된 클라이언트 설정
3534
- */
3535
- getConfig(): ClientServerConfig;
2970
+ getConfig(): ClientBrowserConfig;
3536
2971
  }
3537
- /**
3538
- * ServerClient 인스턴스를 생성하는 헬퍼 함수
3539
- *
3540
- * @param options - 클라이언트 설정 옵션
3541
- * @returns ServerClient 인스턴스
3542
- *
3543
- * @example
3544
- * ```typescript
3545
- * import { createServerClient } from '@01.software/sdk'
3546
- *
3547
- * export const client = createServerClient({
3548
- * clientKey: process.env.NEXT_PUBLIC_SOFTWARE_CLIENT_KEY!,
3549
- * secretKey: process.env.SOFTWARE_SECRET_KEY!,
3550
- * })
3551
- * ```
3552
- */
3553
- declare const createServerClient: (options: ClientServerConfig) => ServerClient;
2972
+ declare function createServerClient(options: ClientServerConfig): ServerClient;
3554
2973
 
3555
2974
  declare function getQueryClient(): QueryClient;
3556
2975
 
3557
- /**
3558
- * Webhook 모듈
3559
- *
3560
- * Next.js 프로젝트에서 webhook을 받을 때 사용하는 함수 모음입니다.
3561
- * 서버 사이드에서만 사용됩니다.
3562
- */
3563
-
3564
- /**
3565
- * Webhook 작업 타입
3566
- *
3567
- * Payload CMS의 afterChange 훅에서 전송되는 작업 타입입니다.
3568
- */
3569
2976
  type WebhookOperation = 'create' | 'update';
3570
- /**
3571
- * Webhook 이벤트 타입
3572
- *
3573
- * @template T - 컬렉션 이름
3574
- */
3575
2977
  interface WebhookEvent<T extends Collection = Collection> {
3576
- /** 컬렉션 이름 */
3577
2978
  collection: T;
3578
- /** 작업 타입 (create 또는 update) */
3579
2979
  operation: WebhookOperation;
3580
- /** 변경된 데이터 */
3581
2980
  data: CollectionType<T>;
3582
2981
  }
3583
- /**
3584
- * Webhook 핸들러 함수 타입
3585
- *
3586
- * @template T - 컬렉션 이름
3587
- */
3588
2982
  type WebhookHandler<T extends Collection = Collection> = (event: WebhookEvent<T>) => Promise<void> | void;
3589
- /**
3590
- * Next.js API Route에서 webhook 요청을 처리하는 헬퍼 함수
3591
- *
3592
- * @param request - Next.js Request 객체
3593
- * @param handler - Webhook 이벤트 핸들러 함수
3594
- * @returns Promise<Response>
3595
- *
3596
- * @example
3597
- * ```typescript
3598
- * // app/api/webhook/route.ts
3599
- * import { handleWebhook } from '@01.software/sdk/webhook'
3600
- *
3601
- * export async function POST(request: Request) {
3602
- * return handleWebhook(request, async (event) => {
3603
- * if (event.collection === 'orders' && event.operation === 'create') {
3604
- * console.log('New order:', event.data)
3605
- * // 주문 처리 로직
3606
- * }
3607
- * })
3608
- * }
3609
- * ```
3610
- */
2983
+ declare function isValidWebhookEvent(data: unknown): data is WebhookEvent;
3611
2984
  declare function handleWebhook<T extends Collection = Collection>(request: Request, handler: WebhookHandler<T>): Promise<Response>;
3612
- /**
3613
- * Webhook 이벤트 유효성 검증 함수
3614
- *
3615
- * @param data - 검증할 데이터
3616
- * @returns boolean
3617
- */
3618
- declare function isValidWebhookEvent(data: any): data is WebhookEvent;
3619
- /**
3620
- * 컬렉션별 타입 안전한 Webhook 핸들러 생성 함수
3621
- *
3622
- * @template T - 컬렉션 이름
3623
- * @param collection - 컬렉션 이름
3624
- * @param handler - Webhook 핸들러 함수
3625
- * @returns WebhookHandler
3626
- *
3627
- * @example
3628
- * ```typescript
3629
- * const orderHandler = createTypedWebhookHandler('orders', async (event) => {
3630
- * // event.data는 Order 타입으로 추론됨
3631
- * console.log('Order ID:', event.data.id)
3632
- * })
3633
- * ```
3634
- */
3635
2985
  declare function createTypedWebhookHandler<T extends Collection>(collection: T, handler: (event: WebhookEvent<T>) => Promise<void> | void): WebhookHandler<T>;
3636
2986
 
3637
2987
  declare const generateOrderNumber: () => string;
@@ -3662,4 +3012,4 @@ interface RichTextContentProps {
3662
3012
  }
3663
3013
  declare function RichTextContent({ data, className, internalDocToHref, blocks, }: RichTextContentProps): React.JSX.Element;
3664
3014
 
3665
- export { ApiClient, type ApiClientOptions, type ApiQueryOptions, type ApiQueryReactOptions, type ApiResponse, type Auth, type Brand, type BrandLogo, type BrandLogosSelect, type BrandOgImage, type BrandOgImagesSelect, type BrandSecretKey, type BrandSecretKeysSelect, type BrandSetting, type BrandSettingsSelect, type BrandsSelect, BrowserClient, BrowserClient as BrowserClientType, COLLECTIONS, type ClientBrowserConfig, type ClientError, type ClientMetadata, type ClientServerConfig, type ClientState, type Collection, CollectionQueryBuilder, type CollectionType, CollectionsApi, type Config, type CreateOrderParams, type Document, type DocumentImage, type DocumentImagesSelect, type DocumentsSelect, type EntitiesSelect, type Entity, type EntityCategoriesSelect, type EntityCategory, type EntityImage, type EntityImagesSelect, type EntityTag, type EntityTagsSelect, type Form, type FormSubmission, type FormSubmissionsSelect, type FormsSelect, type GalleriesSelect, type Gallery, type GalleryBlock, type GalleryImage, type GalleryImagesSelect, type IframeBlock, type Link, type LinkImage, type LinkImagesSelect, type LinksSelect, type Music, type MusicsSelect, type Node, type NodesSelect, type Order, type OrderProduct, type OrderProductsSelect, type OrdersSelect, type PaginationMeta, type PayloadKv, type PayloadKvSelect, type PayloadLockedDocument, type PayloadLockedDocumentsSelect, type PayloadMigration, type PayloadMigrationsSelect, type PayloadPreference, type PayloadPreferencesSelect, type PlayerBlock, type Playlist, type PlaylistImage, type PlaylistImagesSelect, type PlaylistsSelect, type Post, type PostCategoriesSelect, type PostCategory, type PostImage, type PostImagesSelect, type PostTag, type PostTagsSelect, type PostsSelect, type Product, type ProductCategoriesSelect, type ProductCategory, type ProductImage, type ProductImagesSelect, type ProductOption, type ProductOptionsSelect, type ProductTag, type ProductTagsSelect, type ProductVariant, type ProductVariantsSelect, type ProductsSelect, type Return, type ReturnProduct, type ReturnProductsSelect, type ReturnsSelect, RichTextContent, type RichTextContentProps, type RichTextData, ServerClient, ServerClient as ServerClientType, type StaticAsset, type StaticAssetsSelect, type SupportedTimezones, type Transaction, type TransactionsSelect, UnifiedQueryClient, type UnifiedQueryOptions, type UpdateOrderParams, type UpdateTransactionParams, type User, type UserAuthOperations, type UsersSelect, type WebhookEvent, type WebhookHandler, type WebhookOperation, createBrowserClient, createOrder, createServerClient, createTypedWebhookHandler, formatOrderName, generateOrderNumber, getQueryClient, handleWebhook, isValidWebhookEvent, objectFor, updateOrder, updateTransaction };
3015
+ export { API_URLS, ApiClient, type ApiClientOptions, ApiError, type ApiErrorResponse, type ApiQueryOptions, type ApiQueryReactOptions, type ApiResponse, type ApiSuccessResponse, type Auth, type Brand, type BrandLogo, type BrandLogosSelect, type BrandsSelect, BrowserClient, BrowserClient as BrowserClientType, COLLECTIONS, type ClientBrowserConfig, type ClientMetadata, type ClientServerConfig, type ClientState, type Collection, type CollectionDetailQueryParams, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, type CollectionType, CollectionsApi, type Config, ConfigError, type CreateOrderParams, type DebugConfig, type DeepPartial, type Document, type DocumentCategoriesSelect, type DocumentCategory, type DocumentImage, type DocumentImagesSelect, type DocumentsSelect, type Environment, type ErrorLogger, type ExtractArrayType, type Form, type FormSubmission, type FormSubmissionsSelect, type FormsSelect, type GalleriesSelect, type Gallery, type GalleryImage, type GalleryImagesSelect, type IframeBlock, type JwtPayload, type Media, type MediaSelect, type Music, type MusicsSelect, NetworkError, type Order, type OrderProduct, type OrderProductsSelect, type OrdersSelect, type PaginationMeta, type PayloadKv, type PayloadKvSelect, type PayloadLockedDocument, type PayloadLockedDocumentsSelect, type PayloadMigration, type PayloadMigrationsSelect, type PayloadPreference, type PayloadPreferencesSelect, type PlayerBlock, type Playlist, type PlaylistImage, type PlaylistImagesSelect, type PlaylistsSelect, type Post, type PostCategoriesSelect, type PostCategory, type PostImage, type PostImagesSelect, type PostTag, type PostTagsSelect, type PostsSelect, type Product, type ProductCategoriesSelect, type ProductCategory, type ProductImage, type ProductImagesSelect, type ProductOption, type ProductOptionsSelect, type ProductTag, type ProductTagsSelect, type ProductVariant, type ProductVariantsSelect, type ProductsSelect, type PublicCollection, type RetryConfig, type Return, type ReturnProduct, type ReturnProductsSelect, type ReturnsSelect, RichTextContent, type RichTextContentProps, type RichTextData, SDKError, ServerClient, ServerClient as ServerClientType, type SupportedTimezones, type Tenant, type TenantLogo, type TenantLogosSelect, type TenantMetadataSelect, type TenantMetadatum, type TenantOgImage, type TenantOgImagesSelect, type TenantsSelect, TimeoutError, type Transaction, type TransactionsSelect, UnifiedQueryClient, type UnifiedQueryOptions, type UpdateOrderParams, type UpdateTransactionParams, type User, type UserAuthOperations, type UsersSelect, ValidationError, type WebhookEvent, type WebhookHandler, type WebhookOperation, collectionKeys, createApiKey, createBrowserClient, createServerClient, createServerToken, createTypedWebhookHandler, decodeServerToken, formatOrderName, generateOrderNumber, getQueryClient, handleWebhook, isApiError, isConfigError, isErrorResponse, isNetworkError, isSDKError, isSuccessResponse, isTimeoutError, isValidWebhookEvent, isValidationError, objectFor, parseApiKey, resolveApiUrl, verifyServerToken };