@01.software/sdk 0.0.1-260102065059 → 0.1.0-dev.260109.7cf07c9

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,91 +249,198 @@ 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".
281
- */
282
- interface BrandSecretKey {
283
- id: number;
284
- brand: number | Brand;
285
- name: string;
286
- value: string;
287
- updatedAt: string;
288
- createdAt: string;
289
- }
290
- /**
291
- * This interface was referenced by `Config`'s JSON-Schema
292
- * via the `definition` "brand-settings".
411
+ * via the `definition` "brand-logos".
293
412
  */
294
- interface BrandSetting {
413
+ interface BrandLogo {
295
414
  id: number;
296
- brand: number | Brand;
297
- title: string;
298
- description?: string | null;
299
- keywords?: string[] | null;
300
415
  /**
301
- * 512x512
416
+ * Alternative text for accessibility
302
417
  */
303
- logo?: (number | null) | BrandLogo;
418
+ alt: string;
304
419
  /**
305
- * 1200x630
420
+ * Type of logo asset
306
421
  */
307
- ogImage?: (number | null) | BrandOgImage;
422
+ type?: ('primary' | 'secondary' | 'logomark' | 'wordmark' | 'dark' | 'light') | null;
423
+ prefix?: string | null;
308
424
  updatedAt: string;
309
425
  createdAt: string;
426
+ url?: string | null;
427
+ thumbnailURL?: string | null;
428
+ filename?: string | null;
429
+ mimeType?: string | null;
430
+ filesize?: number | null;
431
+ width?: number | null;
432
+ height?: number | null;
433
+ focalX?: number | null;
434
+ focalY?: number | null;
310
435
  }
311
436
  /**
312
437
  * This interface was referenced by `Config`'s JSON-Schema
313
- * via the `definition` "brand-logos".
438
+ * via the `definition` "tenant-og-images".
314
439
  */
315
- interface BrandLogo {
440
+ interface TenantOgImage {
316
441
  id: number;
317
- brand?: (number | null) | Brand;
318
- alt?: string | null;
319
- lqip?: string | null;
442
+ tenant?: (number | null) | Tenant;
443
+ alt: string;
320
444
  prefix?: string | null;
321
445
  updatedAt: string;
322
446
  createdAt: string;
@@ -329,97 +453,15 @@ interface BrandLogo {
329
453
  height?: number | null;
330
454
  focalX?: number | null;
331
455
  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
456
  }
359
457
  /**
360
458
  * This interface was referenced by `Config`'s JSON-Schema
361
- * via the `definition` "brand-og-images".
459
+ * via the `definition` "tenant-logos".
362
460
  */
363
- interface BrandOgImage {
461
+ interface TenantLogo {
364
462
  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;
463
+ tenant?: (number | null) | Tenant;
464
+ alt: string;
423
465
  prefix?: string | null;
424
466
  updatedAt: string;
425
467
  createdAt: string;
@@ -440,12 +482,16 @@ interface StaticAsset {
440
482
  interface Product {
441
483
  id: number;
442
484
  _order?: string | null;
443
- brand: number | Brand;
485
+ tenant?: (number | null) | Tenant;
444
486
  /**
445
487
  * 영문, 숫자, _(언더스코어), -(하이픈)만 사용가능합니다.
446
488
  */
447
489
  sku: string;
448
- slug?: string | null;
490
+ /**
491
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
492
+ */
493
+ generateSlug?: boolean | null;
494
+ slug: string;
449
495
  title: string;
450
496
  subTitle?: string | null;
451
497
  status?: ('draft' | 'preparing' | 'published' | 'closed' | 'archived') | null;
@@ -470,7 +516,7 @@ interface Product {
470
516
  krwPrice?: string | null;
471
517
  categories?: (number | ProductCategory)[] | null;
472
518
  tags?: (number | ProductTag)[] | null;
473
- entities?: (number | Entity)[] | null;
519
+ brand?: (number | null) | Brand;
474
520
  variants?: {
475
521
  docs?: (number | ProductVariant)[];
476
522
  hasNextPage?: boolean;
@@ -491,8 +537,7 @@ interface Product {
491
537
  */
492
538
  interface ProductImage {
493
539
  id: number;
494
- brand: number | Brand;
495
- alt?: string | null;
540
+ tenant?: (number | null) | Tenant;
496
541
  lqip?: string | null;
497
542
  palette?: {
498
543
  vibrant?: string | null;
@@ -540,9 +585,16 @@ interface ProductImage {
540
585
  interface ProductCategory {
541
586
  id: number;
542
587
  _order?: string | null;
543
- brand: number | Brand;
544
- title?: string | null;
588
+ tenant?: (number | null) | Tenant;
589
+ title: string;
590
+ /**
591
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
592
+ */
593
+ generateSlug?: boolean | null;
594
+ slug: string;
545
595
  description?: string | null;
596
+ image?: (number | null) | ProductImage;
597
+ parent?: (number | null) | ProductCategory;
546
598
  updatedAt: string;
547
599
  createdAt: string;
548
600
  }
@@ -553,105 +605,48 @@ interface ProductCategory {
553
605
  interface ProductTag {
554
606
  id: number;
555
607
  _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;
608
+ tenant?: (number | null) | Tenant;
642
609
  title: string;
610
+ /**
611
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
612
+ */
613
+ generateSlug?: boolean | null;
614
+ slug: string;
615
+ description?: string | null;
643
616
  updatedAt: string;
644
617
  createdAt: string;
645
618
  }
646
619
  /**
647
620
  * This interface was referenced by `Config`'s JSON-Schema
648
- * via the `definition` "entity-tags".
621
+ * via the `definition` "brands".
649
622
  */
650
- interface EntityTag {
623
+ interface Brand {
651
624
  id: number;
652
625
  _order?: string | null;
653
- brand: number | Brand;
654
- title: string;
626
+ tenant?: (number | null) | Tenant;
627
+ name: string;
628
+ /**
629
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
630
+ */
631
+ generateSlug?: boolean | null;
632
+ slug: string;
633
+ /**
634
+ * Primary brand logo
635
+ */
636
+ logo?: (number | null) | BrandLogo;
637
+ /**
638
+ * Logo for dark mode (optional)
639
+ */
640
+ logoDark?: (number | null) | BrandLogo;
641
+ /**
642
+ * Logo mark / Icon (optional)
643
+ */
644
+ logomark?: (number | null) | BrandLogo;
645
+ description?: string | null;
646
+ /**
647
+ * Brand official website URL
648
+ */
649
+ website?: string | null;
655
650
  updatedAt: string;
656
651
  createdAt: string;
657
652
  }
@@ -663,7 +658,7 @@ interface ProductVariant {
663
658
  id: number;
664
659
  _order?: string | null;
665
660
  '_product-variants_variants_order'?: string | null;
666
- brand: number | Brand;
661
+ tenant?: (number | null) | Tenant;
667
662
  product: number | Product;
668
663
  title?: string | null;
669
664
  images?: (number | ProductImage)[] | null;
@@ -684,7 +679,7 @@ interface ProductOption {
684
679
  _order?: string | null;
685
680
  '_product-options_productOptions_order'?: string | null;
686
681
  '_product-options_options_order'?: string | null;
687
- brand: number | Brand;
682
+ tenant?: (number | null) | Tenant;
688
683
  product: number | Product;
689
684
  variant?: (number | null) | ProductVariant;
690
685
  title?: string | null;
@@ -698,11 +693,17 @@ interface ProductOption {
698
693
  */
699
694
  interface Order {
700
695
  id: number;
701
- brand: number | Brand;
696
+ tenant?: (number | null) | Tenant;
702
697
  orderNumber: string;
703
698
  status: 'pending' | 'paid' | 'failed' | 'canceled' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
704
699
  totalAmount?: number | null;
705
700
  email?: string | null;
701
+ shippingCarrier?: ('cj' | 'hanjin' | 'lotte' | 'epost' | 'logen' | 'other') | null;
702
+ trackingNumber?: string | null;
703
+ /**
704
+ * 내부 관리용 메모 (고객에게 노출되지 않음)
705
+ */
706
+ notes?: string | null;
706
707
  shippingAddress?: {
707
708
  postalCode?: string | null;
708
709
  address1?: string | null;
@@ -735,7 +736,7 @@ interface Order {
735
736
  */
736
737
  interface OrderProduct {
737
738
  id: number;
738
- brand: number | Brand;
739
+ tenant?: (number | null) | Tenant;
739
740
  order: number | Order;
740
741
  product: number | Product;
741
742
  variant?: (number | null) | ProductVariant;
@@ -751,7 +752,7 @@ interface OrderProduct {
751
752
  */
752
753
  interface Transaction {
753
754
  id: number;
754
- brand: number | Brand;
755
+ tenant?: (number | null) | Tenant;
755
756
  status: 'pending' | 'paid' | 'failed' | 'canceled';
756
757
  order: number | Order;
757
758
  paymentId?: string | null;
@@ -767,9 +768,14 @@ interface Transaction {
767
768
  */
768
769
  interface Return {
769
770
  id: number;
770
- brand: number | Brand;
771
+ tenant?: (number | null) | Tenant;
771
772
  order: number | Order;
772
- reason?: string | null;
773
+ status: 'requested' | 'processing' | 'approved' | 'rejected' | 'completed';
774
+ reason?: ('change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other') | null;
775
+ /**
776
+ * 반품 상세 사유
777
+ */
778
+ reasonDetail?: string | null;
773
779
  returnProducts?: {
774
780
  orderProduct: number | OrderProduct;
775
781
  quantity: number;
@@ -785,7 +791,7 @@ interface Return {
785
791
  */
786
792
  interface ReturnProduct {
787
793
  id: number;
788
- brand: number | Brand;
794
+ tenant?: (number | null) | Tenant;
789
795
  order: number | Order;
790
796
  status: 'requested' | 'processing' | 'approved' | 'rejected';
791
797
  orderProduct: number | OrderProduct;
@@ -799,85 +805,102 @@ interface ReturnProduct {
799
805
  }
800
806
  /**
801
807
  * This interface was referenced by `Config`'s JSON-Schema
802
- * via the `definition` "links".
808
+ * via the `definition` "documents".
803
809
  */
804
- interface Link {
810
+ interface Document {
805
811
  id: number;
806
- brand: number | Brand;
812
+ _order?: string | null;
813
+ tenant?: (number | null) | Tenant;
814
+ /**
815
+ * 문서 제목 (예: 개인정보 처리방침)
816
+ */
807
817
  title: string;
808
818
  /**
809
- * 512x512
819
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
810
820
  */
811
- image?: (number | null) | LinkImage;
812
- link: string;
813
- updatedAt: string;
814
- createdAt: string;
815
- }
816
- /**
817
- * This interface was referenced by `Config`'s JSON-Schema
818
- * via the `definition` "link-images".
819
- */
820
- interface LinkImage {
821
- id: number;
822
- brand: number | Brand;
823
- alt?: string | null;
824
- lqip?: string | null;
825
- palette?: {
826
- vibrant?: string | null;
827
- muted?: string | null;
828
- darkVibrant?: string | null;
829
- darkMuted?: string | null;
830
- lightVibrant?: string | null;
831
- lightMuted?: string | null;
821
+ generateSlug?: boolean | null;
822
+ slug: string;
823
+ /**
824
+ * 문서 유형 선택
825
+ */
826
+ type: 'terms_of_service' | 'privacy_policy' | 'service_guide' | 'notice' | 'legal_notice' | 'refund_policy' | 'other';
827
+ status: 'draft' | 'review' | 'approved' | 'active' | 'expired';
828
+ /**
829
+ * 문서 버전 (예: 1.0, 1.1, 2.0)
830
+ */
831
+ version: string;
832
+ /**
833
+ * 시행일 (이 날짜부터 문서가 효력을 발생)
834
+ */
835
+ effectiveDate?: string | null;
836
+ /**
837
+ * 만료일 (선택사항)
838
+ */
839
+ expiryDate?: string | null;
840
+ /**
841
+ * 문서 요약 (간략한 설명)
842
+ */
843
+ summary?: string | null;
844
+ content: {
845
+ root: {
846
+ type: string;
847
+ children: {
848
+ type: any;
849
+ version: number;
850
+ [k: string]: unknown;
851
+ }[];
852
+ direction: ('ltr' | 'rtl') | null;
853
+ format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
854
+ indent: number;
855
+ version: number;
856
+ };
857
+ [k: string]: unknown;
832
858
  };
833
- prefix?: string | null;
859
+ category?: (number | null) | DocumentCategory;
860
+ /**
861
+ * 검색을 위한 태그 (예: GDPR, CCPA, 개인정보)
862
+ */
863
+ tags?: {
864
+ tag?: string | null;
865
+ id?: string | null;
866
+ }[] | null;
867
+ /**
868
+ * 사용자가 반드시 동의해야 하는 문서인가요?
869
+ */
870
+ isRequired?: boolean | null;
871
+ /**
872
+ * 변경 이력 (이전 버전과의 차이점)
873
+ */
874
+ changeLog?: string | null;
834
875
  updatedAt: string;
835
876
  createdAt: string;
836
- url?: string | null;
837
- thumbnailURL?: string | null;
838
- filename?: string | null;
839
- mimeType?: string | null;
840
- filesize?: number | null;
841
- width?: number | null;
842
- height?: number | null;
843
- focalX?: number | null;
844
- focalY?: number | null;
845
- sizes?: {
846
- thumb?: {
847
- url?: string | null;
848
- width?: number | null;
849
- height?: number | null;
850
- mimeType?: string | null;
851
- filesize?: number | null;
852
- filename?: string | null;
853
- };
854
- };
877
+ _status?: ('draft' | 'published') | null;
855
878
  }
856
879
  /**
857
880
  * This interface was referenced by `Config`'s JSON-Schema
858
- * via the `definition` "playlists".
881
+ * via the `definition` "document-categories".
859
882
  */
860
- interface Playlist {
883
+ interface DocumentCategory {
861
884
  id: number;
862
- brand: number | Brand;
863
- image?: (number | null) | PlaylistImage;
885
+ _order?: string | null;
886
+ tenant?: (number | null) | Tenant;
864
887
  title: string;
888
+ /**
889
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
890
+ */
891
+ generateSlug?: boolean | null;
892
+ slug: string;
865
893
  description?: string | null;
866
- musics?: {
867
- docs?: (number | Music)[];
868
- hasNextPage?: boolean;
869
- totalDocs?: number;
870
- };
871
894
  updatedAt: string;
872
895
  createdAt: string;
873
896
  }
874
897
  /**
875
898
  * This interface was referenced by `Config`'s JSON-Schema
876
- * via the `definition` "playlist-images".
899
+ * via the `definition` "document-images".
877
900
  */
878
- interface PlaylistImage {
901
+ interface DocumentImage {
879
902
  id: number;
880
- brand: number | Brand;
903
+ tenant?: (number | null) | Tenant;
881
904
  alt?: string | null;
882
905
  lqip?: string | null;
883
906
  palette?: {
@@ -919,22 +942,6 @@ interface PlaylistImage {
919
942
  };
920
943
  };
921
944
  }
922
- /**
923
- * This interface was referenced by `Config`'s JSON-Schema
924
- * via the `definition` "musics".
925
- */
926
- interface Music {
927
- id: number;
928
- _musics_musics_order?: string | null;
929
- brand: number | Brand;
930
- playlist?: (number | null) | Playlist;
931
- url: string;
932
- title: string;
933
- artist?: string | null;
934
- isValid?: boolean | null;
935
- updatedAt: string;
936
- createdAt: string;
937
- }
938
945
  /**
939
946
  * This interface was referenced by `Config`'s JSON-Schema
940
947
  * via the `definition` "posts".
@@ -942,17 +949,16 @@ interface Music {
942
949
  interface Post {
943
950
  id: number;
944
951
  _order?: string | null;
945
- brand: number | Brand;
952
+ tenant?: (number | null) | Tenant;
946
953
  thumbnail?: (number | null) | PostImage;
947
954
  title: string;
948
- slug?: string | null;
949
- categories?: (number | PostCategory)[] | null;
950
- tags?: (number | PostTag)[] | null;
951
955
  /**
952
- * The status of the post
956
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
953
957
  */
954
- status?: ('draft' | 'published') | null;
955
- entities?: (number | Entity)[] | null;
958
+ generateSlug?: boolean | null;
959
+ slug: string;
960
+ categories?: (number | PostCategory)[] | null;
961
+ tags?: (number | PostTag)[] | null;
956
962
  content?: {
957
963
  root: {
958
964
  type: string;
@@ -968,11 +974,9 @@ interface Post {
968
974
  };
969
975
  [k: string]: unknown;
970
976
  } | null;
971
- metadata?: {
972
- [k: string]: unknown;
973
- } | unknown[] | string | number | boolean | null;
974
977
  updatedAt: string;
975
978
  createdAt: string;
979
+ _status?: ('draft' | 'published') | null;
976
980
  }
977
981
  /**
978
982
  * This interface was referenced by `Config`'s JSON-Schema
@@ -980,7 +984,7 @@ interface Post {
980
984
  */
981
985
  interface PostImage {
982
986
  id: number;
983
- brand: number | Brand;
987
+ tenant?: (number | null) | Tenant;
984
988
  alt?: string | null;
985
989
  lqip?: string | null;
986
990
  palette?: {
@@ -1003,24 +1007,6 @@ interface PostImage {
1003
1007
  height?: number | null;
1004
1008
  focalX?: number | null;
1005
1009
  focalY?: number | null;
1006
- sizes?: {
1007
- thumb?: {
1008
- url?: string | null;
1009
- width?: number | null;
1010
- height?: number | null;
1011
- mimeType?: string | null;
1012
- filesize?: number | null;
1013
- filename?: string | null;
1014
- };
1015
- card?: {
1016
- url?: string | null;
1017
- width?: number | null;
1018
- height?: number | null;
1019
- mimeType?: string | null;
1020
- filesize?: number | null;
1021
- filename?: string | null;
1022
- };
1023
- };
1024
1010
  }
1025
1011
  /**
1026
1012
  * This interface was referenced by `Config`'s JSON-Schema
@@ -1029,9 +1015,15 @@ interface PostImage {
1029
1015
  interface PostCategory {
1030
1016
  id: number;
1031
1017
  _order?: string | null;
1032
- brand: number | Brand;
1033
- title?: string | null;
1018
+ tenant?: (number | null) | Tenant;
1019
+ title: string;
1020
+ /**
1021
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
1022
+ */
1023
+ generateSlug?: boolean | null;
1024
+ slug: string;
1034
1025
  description?: string | null;
1026
+ parent?: (number | null) | PostCategory;
1035
1027
  updatedAt: string;
1036
1028
  createdAt: string;
1037
1029
  }
@@ -1042,46 +1034,48 @@ interface PostCategory {
1042
1034
  interface PostTag {
1043
1035
  id: number;
1044
1036
  _order?: string | null;
1045
- brand: number | Brand;
1046
- title?: string | null;
1037
+ tenant?: (number | null) | Tenant;
1038
+ title: string;
1039
+ /**
1040
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
1041
+ */
1042
+ generateSlug?: boolean | null;
1043
+ slug: string;
1047
1044
  description?: string | null;
1048
1045
  updatedAt: string;
1049
1046
  createdAt: string;
1050
1047
  }
1051
1048
  /**
1052
1049
  * This interface was referenced by `Config`'s JSON-Schema
1053
- * via the `definition` "documents".
1050
+ * via the `definition` "playlists".
1054
1051
  */
1055
- interface Document {
1052
+ interface Playlist {
1056
1053
  id: number;
1057
- _order?: string | null;
1058
- brand: number | Brand;
1054
+ tenant?: (number | null) | Tenant;
1055
+ image?: (number | null) | PlaylistImage;
1059
1056
  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;
1057
+ /**
1058
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
1059
+ */
1060
+ generateSlug?: boolean | null;
1061
+ slug: string;
1062
+ status?: ('draft' | 'published') | null;
1063
+ description?: string | null;
1064
+ musics?: {
1065
+ docs?: (number | Music)[];
1066
+ hasNextPage?: boolean;
1067
+ totalDocs?: number;
1068
+ };
1075
1069
  updatedAt: string;
1076
1070
  createdAt: string;
1077
1071
  }
1078
1072
  /**
1079
1073
  * This interface was referenced by `Config`'s JSON-Schema
1080
- * via the `definition` "document-images".
1074
+ * via the `definition` "playlist-images".
1081
1075
  */
1082
- interface DocumentImage {
1076
+ interface PlaylistImage {
1083
1077
  id: number;
1084
- brand: number | Brand;
1078
+ tenant?: (number | null) | Tenant;
1085
1079
  alt?: string | null;
1086
1080
  lqip?: string | null;
1087
1081
  palette?: {
@@ -1105,7 +1099,7 @@ interface DocumentImage {
1105
1099
  focalX?: number | null;
1106
1100
  focalY?: number | null;
1107
1101
  sizes?: {
1108
- thumb?: {
1102
+ '512'?: {
1109
1103
  url?: string | null;
1110
1104
  width?: number | null;
1111
1105
  height?: number | null;
@@ -1113,7 +1107,7 @@ interface DocumentImage {
1113
1107
  filesize?: number | null;
1114
1108
  filename?: string | null;
1115
1109
  };
1116
- card?: {
1110
+ '1024'?: {
1117
1111
  url?: string | null;
1118
1112
  width?: number | null;
1119
1113
  height?: number | null;
@@ -1125,25 +1119,17 @@ interface DocumentImage {
1125
1119
  }
1126
1120
  /**
1127
1121
  * This interface was referenced by `Config`'s JSON-Schema
1128
- * via the `definition` "nodes".
1122
+ * via the `definition` "musics".
1129
1123
  */
1130
- interface Node {
1124
+ interface Music {
1131
1125
  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);
1126
+ _musics_musics_order?: string | null;
1127
+ tenant?: (number | null) | Tenant;
1128
+ playlist: number | Playlist;
1129
+ url: string;
1130
+ title: string;
1131
+ artist?: string | null;
1132
+ isValid?: boolean | null;
1147
1133
  updatedAt: string;
1148
1134
  createdAt: string;
1149
1135
  }
@@ -1154,23 +1140,70 @@ interface Node {
1154
1140
  interface Gallery {
1155
1141
  id: number;
1156
1142
  _order?: string | null;
1157
- brand: number | Brand;
1143
+ tenant?: (number | null) | Tenant;
1158
1144
  thumbnail?: (number | null) | GalleryImage;
1159
1145
  title: string;
1160
- slug?: string | null;
1146
+ /**
1147
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
1148
+ */
1149
+ generateSlug?: boolean | null;
1150
+ slug: string;
1161
1151
  description?: string | null;
1162
1152
  images: (number | GalleryImage)[];
1163
1153
  /**
1164
1154
  * The status of the gallery
1165
1155
  */
1166
1156
  status?: ('draft' | 'published') | null;
1167
- entities?: (number | Entity)[] | null;
1168
- metadata?: {
1169
- [k: string]: unknown;
1170
- } | unknown[] | string | number | boolean | null;
1171
1157
  updatedAt: string;
1172
1158
  createdAt: string;
1173
1159
  }
1160
+ /**
1161
+ * This interface was referenced by `Config`'s JSON-Schema
1162
+ * via the `definition` "gallery-images".
1163
+ */
1164
+ interface GalleryImage {
1165
+ id: number;
1166
+ tenant?: (number | null) | Tenant;
1167
+ lqip?: string | null;
1168
+ palette?: {
1169
+ vibrant?: string | null;
1170
+ muted?: string | null;
1171
+ darkVibrant?: string | null;
1172
+ darkMuted?: string | null;
1173
+ lightVibrant?: string | null;
1174
+ lightMuted?: string | null;
1175
+ };
1176
+ prefix?: string | null;
1177
+ updatedAt: string;
1178
+ createdAt: string;
1179
+ url?: string | null;
1180
+ thumbnailURL?: string | null;
1181
+ filename?: string | null;
1182
+ mimeType?: string | null;
1183
+ filesize?: number | null;
1184
+ width?: number | null;
1185
+ height?: number | null;
1186
+ focalX?: number | null;
1187
+ focalY?: number | null;
1188
+ sizes?: {
1189
+ '512'?: {
1190
+ url?: string | null;
1191
+ width?: number | null;
1192
+ height?: number | null;
1193
+ mimeType?: string | null;
1194
+ filesize?: number | null;
1195
+ filename?: string | null;
1196
+ };
1197
+ '1024'?: {
1198
+ url?: string | null;
1199
+ width?: number | null;
1200
+ height?: number | null;
1201
+ mimeType?: string | null;
1202
+ filesize?: number | null;
1203
+ filename?: string | null;
1204
+ };
1205
+ };
1206
+ }
1174
1207
  /**
1175
1208
  * This interface was referenced by `Config`'s JSON-Schema
1176
1209
  * via the `definition` "forms".
@@ -1178,7 +1211,6 @@ interface Gallery {
1178
1211
  interface Form {
1179
1212
  id: number;
1180
1213
  title: string;
1181
- brand: number | Brand;
1182
1214
  description?: {
1183
1215
  root: {
1184
1216
  type: string;
@@ -1352,7 +1384,6 @@ interface Form {
1352
1384
  */
1353
1385
  interface FormSubmission {
1354
1386
  id: number;
1355
- brand: number | Brand;
1356
1387
  form: number | Form;
1357
1388
  submissionData?: {
1358
1389
  field: string;
@@ -1383,23 +1414,20 @@ interface PayloadLockedDocument {
1383
1414
  relationTo: 'users';
1384
1415
  value: number | User;
1385
1416
  } | null) | ({
1386
- relationTo: 'static-assets';
1387
- value: number | StaticAsset;
1388
- } | null) | ({
1389
- relationTo: 'brands';
1390
- value: number | Brand;
1417
+ relationTo: 'media';
1418
+ value: number | Media;
1391
1419
  } | null) | ({
1392
- relationTo: 'brand-logos';
1393
- value: number | BrandLogo;
1420
+ relationTo: 'tenants';
1421
+ value: number | Tenant;
1394
1422
  } | null) | ({
1395
- relationTo: 'brand-og-images';
1396
- value: number | BrandOgImage;
1423
+ relationTo: 'tenant-metadata';
1424
+ value: number | TenantMetadatum;
1397
1425
  } | null) | ({
1398
- relationTo: 'brand-settings';
1399
- value: number | BrandSetting;
1426
+ relationTo: 'tenant-logos';
1427
+ value: number | TenantLogo;
1400
1428
  } | null) | ({
1401
- relationTo: 'brand-secret-keys';
1402
- value: number | BrandSecretKey;
1429
+ relationTo: 'tenant-og-images';
1430
+ value: number | TenantOgImage;
1403
1431
  } | null) | ({
1404
1432
  relationTo: 'products';
1405
1433
  value: number | Product;
@@ -1418,6 +1446,12 @@ interface PayloadLockedDocument {
1418
1446
  } | null) | ({
1419
1447
  relationTo: 'product-images';
1420
1448
  value: number | ProductImage;
1449
+ } | null) | ({
1450
+ relationTo: 'brands';
1451
+ value: number | Brand;
1452
+ } | null) | ({
1453
+ relationTo: 'brand-logos';
1454
+ value: number | BrandLogo;
1421
1455
  } | null) | ({
1422
1456
  relationTo: 'orders';
1423
1457
  value: number | Order;
@@ -1434,20 +1468,14 @@ interface PayloadLockedDocument {
1434
1468
  relationTo: 'transactions';
1435
1469
  value: number | Transaction;
1436
1470
  } | 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;
1471
+ relationTo: 'documents';
1472
+ value: number | Document;
1445
1473
  } | null) | ({
1446
- relationTo: 'playlist-images';
1447
- value: number | PlaylistImage;
1474
+ relationTo: 'document-categories';
1475
+ value: number | DocumentCategory;
1448
1476
  } | null) | ({
1449
- relationTo: 'musics';
1450
- value: number | Music;
1477
+ relationTo: 'document-images';
1478
+ value: number | DocumentImage;
1451
1479
  } | null) | ({
1452
1480
  relationTo: 'posts';
1453
1481
  value: number | Post;
@@ -1461,26 +1489,14 @@ interface PayloadLockedDocument {
1461
1489
  relationTo: 'post-images';
1462
1490
  value: number | PostImage;
1463
1491
  } | 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;
1492
+ relationTo: 'playlists';
1493
+ value: number | Playlist;
1478
1494
  } | null) | ({
1479
- relationTo: 'entity-images';
1480
- value: number | EntityImage;
1495
+ relationTo: 'playlist-images';
1496
+ value: number | PlaylistImage;
1481
1497
  } | null) | ({
1482
- relationTo: 'nodes';
1483
- value: number | Node;
1498
+ relationTo: 'musics';
1499
+ value: number | Music;
1484
1500
  } | null) | ({
1485
1501
  relationTo: 'galleries';
1486
1502
  value: number | Gallery;
@@ -1535,9 +1551,12 @@ interface PayloadMigration {
1535
1551
  * via the `definition` "users_select".
1536
1552
  */
1537
1553
  interface UsersSelect<T extends boolean = true> {
1538
- name?: T;
1539
- role?: T;
1540
- brand?: T;
1554
+ roles?: T;
1555
+ tenants?: T | {
1556
+ tenant?: T;
1557
+ roles?: T;
1558
+ id?: T;
1559
+ };
1541
1560
  updatedAt?: T;
1542
1561
  createdAt?: T;
1543
1562
  email?: T;
@@ -1555,10 +1574,11 @@ interface UsersSelect<T extends boolean = true> {
1555
1574
  }
1556
1575
  /**
1557
1576
  * This interface was referenced by `Config`'s JSON-Schema
1558
- * via the `definition` "static-assets_select".
1577
+ * via the `definition` "media_select".
1559
1578
  */
1560
- interface StaticAssetsSelect<T extends boolean = true> {
1561
- name?: T;
1579
+ interface MediaSelect<T extends boolean = true> {
1580
+ tenant?: T;
1581
+ alt?: T;
1562
1582
  prefix?: T;
1563
1583
  updatedAt?: T;
1564
1584
  createdAt?: T;
@@ -1574,27 +1594,86 @@ interface StaticAssetsSelect<T extends boolean = true> {
1574
1594
  }
1575
1595
  /**
1576
1596
  * This interface was referenced by `Config`'s JSON-Schema
1577
- * via the `definition` "brands_select".
1597
+ * via the `definition` "tenants_select".
1578
1598
  */
1579
- interface BrandsSelect<T extends boolean = true> {
1580
- title?: T;
1581
- description?: T;
1599
+ interface TenantsSelect<T extends boolean = true> {
1600
+ name?: T;
1601
+ domain?: T;
1602
+ features?: T;
1603
+ plan?: T;
1582
1604
  clientKey?: T;
1583
- secretKeys?: T;
1605
+ secretKeys?: T | {
1606
+ name?: T;
1607
+ value?: T;
1608
+ id?: T;
1609
+ };
1584
1610
  webhookUrl?: T;
1585
- features?: T;
1586
- settings?: T;
1587
1611
  updatedAt?: T;
1588
1612
  createdAt?: T;
1589
1613
  }
1590
1614
  /**
1591
1615
  * This interface was referenced by `Config`'s JSON-Schema
1592
- * via the `definition` "brand-logos_select".
1616
+ * via the `definition` "tenant-metadata_select".
1617
+ */
1618
+ interface TenantMetadataSelect<T extends boolean = true> {
1619
+ tenant?: T;
1620
+ siteInfo?: T | {
1621
+ title?: T;
1622
+ description?: T;
1623
+ keywords?: T;
1624
+ author?: T;
1625
+ siteUrl?: T;
1626
+ };
1627
+ branding?: T | {
1628
+ logo?: T;
1629
+ logoDark?: T;
1630
+ logomark?: T;
1631
+ favicon?: T;
1632
+ themeColor?: T;
1633
+ };
1634
+ openGraph?: T | {
1635
+ ogTitle?: T;
1636
+ ogDescription?: T;
1637
+ ogImage?: T;
1638
+ ogType?: T;
1639
+ ogLocale?: T;
1640
+ };
1641
+ twitter?: T | {
1642
+ twitterCard?: T;
1643
+ twitterSite?: T;
1644
+ twitterCreator?: T;
1645
+ twitterTitle?: T;
1646
+ twitterDescription?: T;
1647
+ twitterImage?: T;
1648
+ };
1649
+ seo?: T | {
1650
+ robots?: T;
1651
+ googleSiteVerification?: T;
1652
+ bingSiteVerification?: T;
1653
+ naverSiteVerification?: T;
1654
+ canonicalUrl?: T;
1655
+ };
1656
+ pwa?: T | {
1657
+ shortName?: T;
1658
+ backgroundColor?: T;
1659
+ display?: T;
1660
+ };
1661
+ analytics?: T | {
1662
+ googleAnalyticsId?: T;
1663
+ googleTagManagerId?: T;
1664
+ facebookPixelId?: T;
1665
+ linkedInPartnerId?: T;
1666
+ };
1667
+ updatedAt?: T;
1668
+ createdAt?: T;
1669
+ }
1670
+ /**
1671
+ * This interface was referenced by `Config`'s JSON-Schema
1672
+ * via the `definition` "tenant-logos_select".
1593
1673
  */
1594
- interface BrandLogosSelect<T extends boolean = true> {
1595
- brand?: T;
1674
+ interface TenantLogosSelect<T extends boolean = true> {
1675
+ tenant?: T;
1596
1676
  alt?: T;
1597
- lqip?: T;
1598
1677
  prefix?: T;
1599
1678
  updatedAt?: T;
1600
1679
  createdAt?: T;
@@ -1607,41 +1686,14 @@ interface BrandLogosSelect<T extends boolean = true> {
1607
1686
  height?: T;
1608
1687
  focalX?: T;
1609
1688
  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
1689
  }
1637
1690
  /**
1638
1691
  * This interface was referenced by `Config`'s JSON-Schema
1639
- * via the `definition` "brand-og-images_select".
1692
+ * via the `definition` "tenant-og-images_select".
1640
1693
  */
1641
- interface BrandOgImagesSelect<T extends boolean = true> {
1642
- brand?: T;
1694
+ interface TenantOgImagesSelect<T extends boolean = true> {
1695
+ tenant?: T;
1643
1696
  alt?: T;
1644
- lqip?: T;
1645
1697
  prefix?: T;
1646
1698
  updatedAt?: T;
1647
1699
  createdAt?: T;
@@ -1654,41 +1706,6 @@ interface BrandOgImagesSelect<T extends boolean = true> {
1654
1706
  height?: T;
1655
1707
  focalX?: T;
1656
1708
  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
1709
  }
1693
1710
  /**
1694
1711
  * This interface was referenced by `Config`'s JSON-Schema
@@ -1696,8 +1713,9 @@ interface BrandSecretKeysSelect<T extends boolean = true> {
1696
1713
  */
1697
1714
  interface ProductsSelect<T extends boolean = true> {
1698
1715
  _order?: T;
1699
- brand?: T;
1716
+ tenant?: T;
1700
1717
  sku?: T;
1718
+ generateSlug?: T;
1701
1719
  slug?: T;
1702
1720
  title?: T;
1703
1721
  subTitle?: T;
@@ -1709,7 +1727,7 @@ interface ProductsSelect<T extends boolean = true> {
1709
1727
  krwPrice?: T;
1710
1728
  categories?: T;
1711
1729
  tags?: T;
1712
- entities?: T;
1730
+ brand?: T;
1713
1731
  variants?: T;
1714
1732
  options?: T;
1715
1733
  isSoldOut?: T;
@@ -1723,7 +1741,7 @@ interface ProductsSelect<T extends boolean = true> {
1723
1741
  interface ProductVariantsSelect<T extends boolean = true> {
1724
1742
  _order?: T;
1725
1743
  '_product-variants_variants_order'?: T;
1726
- brand?: T;
1744
+ tenant?: T;
1727
1745
  product?: T;
1728
1746
  title?: T;
1729
1747
  images?: T;
@@ -1739,7 +1757,7 @@ interface ProductOptionsSelect<T extends boolean = true> {
1739
1757
  _order?: T;
1740
1758
  '_product-options_productOptions_order'?: T;
1741
1759
  '_product-options_options_order'?: T;
1742
- brand?: T;
1760
+ tenant?: T;
1743
1761
  product?: T;
1744
1762
  variant?: T;
1745
1763
  title?: T;
@@ -1753,9 +1771,13 @@ interface ProductOptionsSelect<T extends boolean = true> {
1753
1771
  */
1754
1772
  interface ProductCategoriesSelect<T extends boolean = true> {
1755
1773
  _order?: T;
1756
- brand?: T;
1774
+ tenant?: T;
1757
1775
  title?: T;
1776
+ generateSlug?: T;
1777
+ slug?: T;
1758
1778
  description?: T;
1779
+ image?: T;
1780
+ parent?: T;
1759
1781
  updatedAt?: T;
1760
1782
  createdAt?: T;
1761
1783
  }
@@ -1765,8 +1787,10 @@ interface ProductCategoriesSelect<T extends boolean = true> {
1765
1787
  */
1766
1788
  interface ProductTagsSelect<T extends boolean = true> {
1767
1789
  _order?: T;
1768
- brand?: T;
1790
+ tenant?: T;
1769
1791
  title?: T;
1792
+ generateSlug?: T;
1793
+ slug?: T;
1770
1794
  description?: T;
1771
1795
  updatedAt?: T;
1772
1796
  createdAt?: T;
@@ -1776,8 +1800,7 @@ interface ProductTagsSelect<T extends boolean = true> {
1776
1800
  * via the `definition` "product-images_select".
1777
1801
  */
1778
1802
  interface ProductImagesSelect<T extends boolean = true> {
1779
- brand?: T;
1780
- alt?: T;
1803
+ tenant?: T;
1781
1804
  lqip?: T;
1782
1805
  palette?: T | {
1783
1806
  vibrant?: T;
@@ -1820,17 +1843,58 @@ interface ProductImagesSelect<T extends boolean = true> {
1820
1843
  }
1821
1844
  /**
1822
1845
  * This interface was referenced by `Config`'s JSON-Schema
1823
- * via the `definition` "orders_select".
1846
+ * via the `definition` "brands_select".
1824
1847
  */
1825
- interface OrdersSelect<T extends boolean = true> {
1826
- brand?: T;
1827
- orderNumber?: T;
1828
- status?: T;
1829
- totalAmount?: T;
1830
- email?: T;
1831
- shippingAddress?: T | {
1832
- postalCode?: T;
1833
- address1?: T;
1848
+ interface BrandsSelect<T extends boolean = true> {
1849
+ _order?: T;
1850
+ tenant?: T;
1851
+ name?: T;
1852
+ generateSlug?: T;
1853
+ slug?: T;
1854
+ logo?: T;
1855
+ logoDark?: T;
1856
+ logomark?: T;
1857
+ description?: T;
1858
+ website?: T;
1859
+ updatedAt?: T;
1860
+ createdAt?: T;
1861
+ }
1862
+ /**
1863
+ * This interface was referenced by `Config`'s JSON-Schema
1864
+ * via the `definition` "brand-logos_select".
1865
+ */
1866
+ interface BrandLogosSelect<T extends boolean = true> {
1867
+ alt?: T;
1868
+ type?: T;
1869
+ prefix?: T;
1870
+ updatedAt?: T;
1871
+ createdAt?: T;
1872
+ url?: T;
1873
+ thumbnailURL?: T;
1874
+ filename?: T;
1875
+ mimeType?: T;
1876
+ filesize?: T;
1877
+ width?: T;
1878
+ height?: T;
1879
+ focalX?: T;
1880
+ focalY?: T;
1881
+ }
1882
+ /**
1883
+ * This interface was referenced by `Config`'s JSON-Schema
1884
+ * via the `definition` "orders_select".
1885
+ */
1886
+ interface OrdersSelect<T extends boolean = true> {
1887
+ tenant?: T;
1888
+ orderNumber?: T;
1889
+ status?: T;
1890
+ totalAmount?: T;
1891
+ email?: T;
1892
+ shippingCarrier?: T;
1893
+ trackingNumber?: T;
1894
+ notes?: T;
1895
+ shippingAddress?: T | {
1896
+ postalCode?: T;
1897
+ address1?: T;
1834
1898
  address2?: T;
1835
1899
  deliveryMessage?: T;
1836
1900
  recipientName?: T;
@@ -1847,7 +1911,7 @@ interface OrdersSelect<T extends boolean = true> {
1847
1911
  * via the `definition` "order-products_select".
1848
1912
  */
1849
1913
  interface OrderProductsSelect<T extends boolean = true> {
1850
- brand?: T;
1914
+ tenant?: T;
1851
1915
  order?: T;
1852
1916
  product?: T;
1853
1917
  variant?: T;
@@ -1862,9 +1926,11 @@ interface OrderProductsSelect<T extends boolean = true> {
1862
1926
  * via the `definition` "returns_select".
1863
1927
  */
1864
1928
  interface ReturnsSelect<T extends boolean = true> {
1865
- brand?: T;
1929
+ tenant?: T;
1866
1930
  order?: T;
1931
+ status?: T;
1867
1932
  reason?: T;
1933
+ reasonDetail?: T;
1868
1934
  returnProducts?: T | {
1869
1935
  orderProduct?: T;
1870
1936
  quantity?: T;
@@ -1879,7 +1945,7 @@ interface ReturnsSelect<T extends boolean = true> {
1879
1945
  * via the `definition` "return-products_select".
1880
1946
  */
1881
1947
  interface ReturnProductsSelect<T extends boolean = true> {
1882
- brand?: T;
1948
+ tenant?: T;
1883
1949
  order?: T;
1884
1950
  status?: T;
1885
1951
  orderProduct?: T;
@@ -1896,7 +1962,7 @@ interface ReturnProductsSelect<T extends boolean = true> {
1896
1962
  * via the `definition` "transactions_select".
1897
1963
  */
1898
1964
  interface TransactionsSelect<T extends boolean = true> {
1899
- brand?: T;
1965
+ tenant?: T;
1900
1966
  status?: T;
1901
1967
  order?: T;
1902
1968
  paymentId?: T;
@@ -1908,74 +1974,52 @@ interface TransactionsSelect<T extends boolean = true> {
1908
1974
  }
1909
1975
  /**
1910
1976
  * This interface was referenced by `Config`'s JSON-Schema
1911
- * via the `definition` "links_select".
1977
+ * via the `definition` "documents_select".
1912
1978
  */
1913
- interface LinksSelect<T extends boolean = true> {
1914
- brand?: T;
1979
+ interface DocumentsSelect<T extends boolean = true> {
1980
+ _order?: T;
1981
+ tenant?: T;
1915
1982
  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;
1983
+ generateSlug?: T;
1984
+ slug?: T;
1985
+ type?: T;
1986
+ status?: T;
1987
+ version?: T;
1988
+ effectiveDate?: T;
1989
+ expiryDate?: T;
1990
+ summary?: T;
1991
+ content?: T;
1992
+ category?: T;
1993
+ tags?: T | {
1994
+ tag?: T;
1995
+ id?: T;
1936
1996
  };
1937
- prefix?: T;
1997
+ isRequired?: T;
1998
+ changeLog?: T;
1938
1999
  updatedAt?: T;
1939
2000
  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
- };
2001
+ _status?: T;
1959
2002
  }
1960
2003
  /**
1961
2004
  * This interface was referenced by `Config`'s JSON-Schema
1962
- * via the `definition` "playlists_select".
2005
+ * via the `definition` "document-categories_select".
1963
2006
  */
1964
- interface PlaylistsSelect<T extends boolean = true> {
1965
- brand?: T;
1966
- image?: T;
2007
+ interface DocumentCategoriesSelect<T extends boolean = true> {
2008
+ _order?: T;
2009
+ tenant?: T;
1967
2010
  title?: T;
2011
+ generateSlug?: T;
2012
+ slug?: T;
1968
2013
  description?: T;
1969
- musics?: T;
1970
2014
  updatedAt?: T;
1971
2015
  createdAt?: T;
1972
2016
  }
1973
2017
  /**
1974
2018
  * This interface was referenced by `Config`'s JSON-Schema
1975
- * via the `definition` "playlist-images_select".
2019
+ * via the `definition` "document-images_select".
1976
2020
  */
1977
- interface PlaylistImagesSelect<T extends boolean = true> {
1978
- brand?: T;
2021
+ interface DocumentImagesSelect<T extends boolean = true> {
2022
+ tenant?: T;
1979
2023
  alt?: T;
1980
2024
  lqip?: T;
1981
2025
  palette?: T | {
@@ -2017,39 +2061,23 @@ interface PlaylistImagesSelect<T extends boolean = true> {
2017
2061
  };
2018
2062
  };
2019
2063
  }
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
2064
  /**
2036
2065
  * This interface was referenced by `Config`'s JSON-Schema
2037
2066
  * via the `definition` "posts_select".
2038
2067
  */
2039
2068
  interface PostsSelect<T extends boolean = true> {
2040
2069
  _order?: T;
2041
- brand?: T;
2070
+ tenant?: T;
2042
2071
  thumbnail?: T;
2043
2072
  title?: T;
2073
+ generateSlug?: T;
2044
2074
  slug?: T;
2045
2075
  categories?: T;
2046
2076
  tags?: T;
2047
- status?: T;
2048
- entities?: T;
2049
2077
  content?: T;
2050
- metadata?: T;
2051
2078
  updatedAt?: T;
2052
2079
  createdAt?: T;
2080
+ _status?: T;
2053
2081
  }
2054
2082
  /**
2055
2083
  * This interface was referenced by `Config`'s JSON-Schema
@@ -2057,9 +2085,12 @@ interface PostsSelect<T extends boolean = true> {
2057
2085
  */
2058
2086
  interface PostCategoriesSelect<T extends boolean = true> {
2059
2087
  _order?: T;
2060
- brand?: T;
2088
+ tenant?: T;
2061
2089
  title?: T;
2090
+ generateSlug?: T;
2091
+ slug?: T;
2062
2092
  description?: T;
2093
+ parent?: T;
2063
2094
  updatedAt?: T;
2064
2095
  createdAt?: T;
2065
2096
  }
@@ -2069,8 +2100,10 @@ interface PostCategoriesSelect<T extends boolean = true> {
2069
2100
  */
2070
2101
  interface PostTagsSelect<T extends boolean = true> {
2071
2102
  _order?: T;
2072
- brand?: T;
2103
+ tenant?: T;
2073
2104
  title?: T;
2105
+ generateSlug?: T;
2106
+ slug?: T;
2074
2107
  description?: T;
2075
2108
  updatedAt?: T;
2076
2109
  createdAt?: T;
@@ -2080,7 +2113,7 @@ interface PostTagsSelect<T extends boolean = true> {
2080
2113
  * via the `definition` "post-images_select".
2081
2114
  */
2082
2115
  interface PostImagesSelect<T extends boolean = true> {
2083
- brand?: T;
2116
+ tenant?: T;
2084
2117
  alt?: T;
2085
2118
  lqip?: T;
2086
2119
  palette?: T | {
@@ -2103,43 +2136,29 @@ interface PostImagesSelect<T extends boolean = true> {
2103
2136
  height?: T;
2104
2137
  focalX?: T;
2105
2138
  focalY?: T;
2106
- sizes?: T | {
2107
- thumb?: T | {
2108
- url?: T;
2109
- width?: T;
2110
- height?: T;
2111
- mimeType?: T;
2112
- filesize?: T;
2113
- filename?: T;
2114
- };
2115
- card?: T | {
2116
- url?: T;
2117
- width?: T;
2118
- height?: T;
2119
- mimeType?: T;
2120
- filesize?: T;
2121
- filename?: T;
2122
- };
2123
- };
2124
2139
  }
2125
2140
  /**
2126
2141
  * This interface was referenced by `Config`'s JSON-Schema
2127
- * via the `definition` "documents_select".
2142
+ * via the `definition` "playlists_select".
2128
2143
  */
2129
- interface DocumentsSelect<T extends boolean = true> {
2130
- _order?: T;
2131
- brand?: T;
2144
+ interface PlaylistsSelect<T extends boolean = true> {
2145
+ tenant?: T;
2146
+ image?: T;
2132
2147
  title?: T;
2133
- content?: T;
2148
+ generateSlug?: T;
2149
+ slug?: T;
2150
+ status?: T;
2151
+ description?: T;
2152
+ musics?: T;
2134
2153
  updatedAt?: T;
2135
2154
  createdAt?: T;
2136
2155
  }
2137
2156
  /**
2138
2157
  * This interface was referenced by `Config`'s JSON-Schema
2139
- * via the `definition` "document-images_select".
2158
+ * via the `definition` "playlist-images_select".
2140
2159
  */
2141
- interface DocumentImagesSelect<T extends boolean = true> {
2142
- brand?: T;
2160
+ interface PlaylistImagesSelect<T extends boolean = true> {
2161
+ tenant?: T;
2143
2162
  alt?: T;
2144
2163
  lqip?: T;
2145
2164
  palette?: T | {
@@ -2162,84 +2181,6 @@ interface DocumentImagesSelect<T extends boolean = true> {
2162
2181
  height?: T;
2163
2182
  focalX?: T;
2164
2183
  focalY?: T;
2165
- sizes?: T | {
2166
- thumb?: T | {
2167
- url?: T;
2168
- width?: T;
2169
- height?: T;
2170
- mimeType?: T;
2171
- filesize?: T;
2172
- filename?: T;
2173
- };
2174
- card?: T | {
2175
- url?: T;
2176
- width?: T;
2177
- height?: T;
2178
- mimeType?: T;
2179
- filesize?: T;
2180
- filename?: T;
2181
- };
2182
- };
2183
- }
2184
- /**
2185
- * This interface was referenced by `Config`'s JSON-Schema
2186
- * via the `definition` "entities_select".
2187
- */
2188
- interface EntitiesSelect<T extends boolean = true> {
2189
- _order?: T;
2190
- brand?: T;
2191
- title?: T;
2192
- slug?: T;
2193
- thumbnail?: T;
2194
- images?: T;
2195
- description?: T;
2196
- categories?: T;
2197
- tags?: T;
2198
- updatedAt?: T;
2199
- createdAt?: T;
2200
- }
2201
- /**
2202
- * This interface was referenced by `Config`'s JSON-Schema
2203
- * via the `definition` "entity-categories_select".
2204
- */
2205
- interface EntityCategoriesSelect<T extends boolean = true> {
2206
- _order?: T;
2207
- brand?: T;
2208
- title?: T;
2209
- updatedAt?: T;
2210
- createdAt?: T;
2211
- }
2212
- /**
2213
- * This interface was referenced by `Config`'s JSON-Schema
2214
- * via the `definition` "entity-tags_select".
2215
- */
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;
2232
- updatedAt?: T;
2233
- createdAt?: T;
2234
- url?: T;
2235
- thumbnailURL?: T;
2236
- filename?: T;
2237
- mimeType?: T;
2238
- filesize?: T;
2239
- width?: T;
2240
- height?: T;
2241
- focalX?: T;
2242
- focalY?: T;
2243
2184
  sizes?: T | {
2244
2185
  '512'?: T | {
2245
2186
  url?: T;
@@ -2261,18 +2202,16 @@ interface EntityImagesSelect<T extends boolean = true> {
2261
2202
  }
2262
2203
  /**
2263
2204
  * This interface was referenced by `Config`'s JSON-Schema
2264
- * via the `definition` "nodes_select".
2205
+ * via the `definition` "musics_select".
2265
2206
  */
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;
2207
+ interface MusicsSelect<T extends boolean = true> {
2208
+ _musics_musics_order?: T;
2209
+ tenant?: T;
2210
+ playlist?: T;
2211
+ url?: T;
2212
+ title?: T;
2213
+ artist?: T;
2214
+ isValid?: T;
2276
2215
  updatedAt?: T;
2277
2216
  createdAt?: T;
2278
2217
  }
@@ -2282,15 +2221,14 @@ interface NodesSelect<T extends boolean = true> {
2282
2221
  */
2283
2222
  interface GalleriesSelect<T extends boolean = true> {
2284
2223
  _order?: T;
2285
- brand?: T;
2224
+ tenant?: T;
2286
2225
  thumbnail?: T;
2287
2226
  title?: T;
2227
+ generateSlug?: T;
2288
2228
  slug?: T;
2289
2229
  description?: T;
2290
2230
  images?: T;
2291
2231
  status?: T;
2292
- entities?: T;
2293
- metadata?: T;
2294
2232
  updatedAt?: T;
2295
2233
  createdAt?: T;
2296
2234
  }
@@ -2299,8 +2237,7 @@ interface GalleriesSelect<T extends boolean = true> {
2299
2237
  * via the `definition` "gallery-images_select".
2300
2238
  */
2301
2239
  interface GalleryImagesSelect<T extends boolean = true> {
2302
- brand?: T;
2303
- alt?: T;
2240
+ tenant?: T;
2304
2241
  lqip?: T;
2305
2242
  palette?: T | {
2306
2243
  vibrant?: T;
@@ -2323,7 +2260,7 @@ interface GalleryImagesSelect<T extends boolean = true> {
2323
2260
  focalX?: T;
2324
2261
  focalY?: T;
2325
2262
  sizes?: T | {
2326
- thumb?: T | {
2263
+ '512'?: T | {
2327
2264
  url?: T;
2328
2265
  width?: T;
2329
2266
  height?: T;
@@ -2331,7 +2268,7 @@ interface GalleryImagesSelect<T extends boolean = true> {
2331
2268
  filesize?: T;
2332
2269
  filename?: T;
2333
2270
  };
2334
- card?: T | {
2271
+ '1024'?: T | {
2335
2272
  url?: T;
2336
2273
  width?: T;
2337
2274
  height?: T;
@@ -2347,7 +2284,6 @@ interface GalleryImagesSelect<T extends boolean = true> {
2347
2284
  */
2348
2285
  interface FormsSelect<T extends boolean = true> {
2349
2286
  title?: T;
2350
- brand?: T;
2351
2287
  description?: T;
2352
2288
  fields?: T | {
2353
2289
  checkbox?: T | {
@@ -2456,7 +2392,6 @@ interface FormsSelect<T extends boolean = true> {
2456
2392
  * via the `definition` "form-submissions_select".
2457
2393
  */
2458
2394
  interface FormSubmissionsSelect<T extends boolean = true> {
2459
- brand?: T;
2460
2395
  form?: T;
2461
2396
  submissionData?: T | {
2462
2397
  field?: T;
@@ -2518,1120 +2453,250 @@ declare module 'payload' {
2518
2453
  }
2519
2454
  }
2520
2455
 
2521
- /**
2522
- * API 모듈 타입 정의
2523
- */
2524
- /**
2525
- * API 클라이언트 설정 옵션
2526
- */
2527
- interface ApiClientOptions {
2528
- clientKey: string;
2529
- /** 시크릿 키 (필수) */
2530
- secretKey: string;
2531
- /** API 기본 URL (선택) */
2532
- baseUrl?: string;
2456
+ declare class SDKError extends Error {
2457
+ readonly code: string;
2458
+ readonly status?: number;
2459
+ readonly details?: unknown;
2460
+ readonly userMessage?: string;
2461
+ readonly suggestion?: string;
2462
+ constructor(code: string, message: string, status?: number, details?: unknown, userMessage?: string, suggestion?: string);
2463
+ getUserMessage(): string;
2464
+ toJSON(): {
2465
+ name: string;
2466
+ code: string;
2467
+ message: string;
2468
+ status: number | undefined;
2469
+ details: unknown;
2470
+ userMessage: string | undefined;
2471
+ suggestion: string | undefined;
2472
+ };
2533
2473
  }
2534
-
2535
- /**
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
- * 주문 업데이트 파라미터
2575
- */
2576
- type UpdateOrderParams = {
2577
- /** 주문 번호 */
2578
- orderNumber: string;
2579
- /** 주문 상태 */
2580
- status: Order['status'];
2581
- };
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
- * ```
2597
- */
2598
- declare const updateOrder: ({ orderNumber, status, secretKey, clientKey, baseUrl, }: UpdateOrderParams & ApiClientOptions) => Promise<Order>;
2599
-
2600
- /**
2601
- * 트랜잭션 업데이트 파라미터
2602
- */
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
- };
2613
- /**
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
- * ```
2630
- */
2631
- declare const updateTransaction: ({ paymentId, status, paymentMethod, receiptUrl, secretKey, clientKey, baseUrl, }: UpdateTransactionParams & ApiClientOptions) => Promise<Transaction>;
2632
-
2633
- /**
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
- * ```
2649
- */
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>;
2679
- /**
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
- * ```
2692
- */
2693
- updateOrder(params: UpdateOrderParams): Promise<Order>;
2694
- /**
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
- * ```
2709
- */
2710
- updateTransaction(params: UpdateTransactionParams): Promise<Transaction>;
2474
+ declare class NetworkError extends SDKError {
2475
+ constructor(message: string, status?: number, details?: unknown, userMessage?: string, suggestion?: string);
2476
+ }
2477
+ declare class ValidationError extends SDKError {
2478
+ constructor(message: string, details?: unknown, userMessage?: string, suggestion?: string);
2479
+ }
2480
+ declare class ApiError extends SDKError {
2481
+ constructor(message: string, status: number, details?: unknown, userMessage?: string, suggestion?: string);
2482
+ }
2483
+ declare class ConfigError extends SDKError {
2484
+ constructor(message: string, details?: unknown, userMessage?: string, suggestion?: string);
2711
2485
  }
2486
+ declare class TimeoutError extends SDKError {
2487
+ constructor(message?: string, details?: unknown, userMessage?: string, suggestion?: string);
2488
+ }
2489
+ declare function isSDKError(error: unknown): error is SDKError;
2490
+ declare function isNetworkError(error: unknown): error is NetworkError;
2491
+ declare function isValidationError(error: unknown): error is ValidationError;
2492
+ declare function isApiError(error: unknown): error is ApiError;
2493
+ declare function isConfigError(error: unknown): error is ConfigError;
2494
+ declare function isTimeoutError(error: unknown): error is TimeoutError;
2712
2495
 
2713
- /**
2714
- * 클라이언트 메타데이터
2715
- *
2716
- * 클라이언트 생성 시점과 환경 정보를 포함합니다.
2717
- */
2496
+ interface ClientBrowserConfig {
2497
+ clientKey: string;
2498
+ }
2499
+ interface ClientServerConfig extends ClientBrowserConfig {
2500
+ secretKey: string;
2501
+ }
2718
2502
  interface ClientMetadata {
2719
- /** 사용자 에이전트 정보 */
2720
2503
  userAgent?: string;
2721
- /** 클라이언트 생성 타임스탬프 */
2722
2504
  timestamp: number;
2723
2505
  }
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;
2506
+ interface ClientState {
2507
+ metadata: ClientMetadata;
2740
2508
  }
2741
- /**
2742
- * 페이지네이션 메타데이터
2743
- *
2744
- * 목록 조회 시 페이지네이션 정보를 제공합니다.
2745
- */
2746
2509
  interface PaginationMeta {
2747
- /** 현재 페이지 번호 */
2748
2510
  page: number;
2749
- /** 페이지당 항목 수 */
2750
2511
  limit: number;
2751
- /** 전체 문서 수 */
2752
2512
  totalDocs: number;
2753
- /** 전체 페이지 수 */
2754
2513
  totalPages: number;
2755
- /** 다음 페이지 존재 여부 */
2756
2514
  hasNextPage: boolean;
2757
- /** 이전 페이지 존재 여부 */
2758
2515
  hasPrevPage: boolean;
2759
2516
  }
2760
- /**
2761
- * 쿼리 옵션 타입
2762
- *
2763
- * 컬렉션 조회 시 사용하는 옵션입니다.
2764
- */
2517
+ interface ApiSuccessResponse<T = unknown> {
2518
+ data: T;
2519
+ success: true;
2520
+ message?: string;
2521
+ pagination?: PaginationMeta;
2522
+ }
2523
+ interface ApiErrorResponse {
2524
+ data: null;
2525
+ success: false;
2526
+ error: {
2527
+ code: string;
2528
+ message: string;
2529
+ details?: unknown;
2530
+ };
2531
+ }
2532
+ type ApiResponse<T = unknown> = ApiSuccessResponse<T> | ApiErrorResponse;
2765
2533
  interface ApiQueryOptions {
2766
- /** 페이지 번호 */
2767
2534
  page?: number;
2768
- /** 페이지당 항목 수 */
2769
2535
  limit?: number;
2770
- /** 정렬 옵션 */
2771
2536
  sort?: Sort;
2772
- /** 필터링 조건 */
2773
2537
  where?: Where;
2774
2538
  }
2775
- /**
2776
- * 쿼리 리액트 옵션 타입
2777
- *
2778
- * 컬렉션 조회 시 사용하는 리액트 옵션입니다.
2779
- */
2780
2539
  interface ApiQueryReactOptions {
2781
2540
  keepPreviousData?: boolean;
2782
2541
  }
2783
- /**
2784
- * 클라이언트 에러 타입
2785
- *
2786
- * SDK에서 발생하는 에러를 표현합니다.
2787
- */
2788
- interface ClientError extends Error {
2789
- /** 에러 코드 */
2790
- code?: string;
2791
- /** HTTP 상태 코드 */
2792
- status?: number;
2793
- /** 추가 에러 상세 정보 */
2794
- details?: any;
2542
+ interface DebugConfig {
2543
+ logRequests?: boolean;
2544
+ logResponses?: boolean;
2545
+ logErrors?: boolean;
2795
2546
  }
2796
- /**
2797
- * 클라이언트 상태
2798
- *
2799
- * 클라이언트의 내부 상태를 포함합니다.
2800
- */
2801
- interface ClientState {
2802
- /** 클라이언트 메타데이터 */
2803
- metadata: ClientMetadata;
2804
- }
2805
- /**
2806
- * 브라우저 클라이언트 설정
2807
- *
2808
- * 브라우저 환경에서 사용하는 클라이언트 설정입니다.
2809
- */
2810
- interface ClientBrowserConfig {
2811
- /** 클라이언트 키 (필수) */
2812
- clientKey: string;
2813
- /** API 기본 URL (선택) */
2814
- baseUrl?: string;
2547
+ interface RetryConfig {
2548
+ maxRetries?: number;
2549
+ retryableStatuses?: number[];
2550
+ retryDelay?: (attempt: number) => number;
2815
2551
  }
2816
- /**
2817
- * 서버 클라이언트 설정
2818
- *
2819
- * 서버 환경에서 사용하는 클라이언트 설정입니다.
2820
- * 시크릿 키가 포함되어 있어 서버에서만 사용해야 합니다.
2821
- */
2822
- interface ClientServerConfig extends ClientBrowserConfig {
2823
- /** 시크릿 키 (필수, 서버 전용) */
2824
- secretKey: string;
2552
+ interface ErrorLogger {
2553
+ log(error: SDKError | Error, context?: Record<string, unknown>): void;
2825
2554
  }
2826
- /**
2827
- * 컬렉션 타입
2828
- *
2829
- * Payload CMS의 모든 컬렉션 이름을 나타냅니다.
2830
- * Supabase 스타일의 쿼리 빌더에서 사용됩니다.
2831
- */
2832
2555
  type Collection = keyof Config['collections'];
2556
+ type DeepPartial<T> = {
2557
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
2558
+ };
2559
+ type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
2560
+ declare function isSuccessResponse<T>(response: ApiResponse<T>): response is ApiSuccessResponse<T>;
2561
+ declare function isErrorResponse(response: ApiResponse<unknown>): response is ApiErrorResponse;
2562
+
2563
+ type CollectionType<T extends Collection> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
2833
2564
 
2834
- /**
2835
- * Fetch 요청 옵션 인터페이스
2836
- *
2837
- * @interface FetchOptions
2838
- * @extends RequestInit
2839
- */
2840
2565
  interface FetchOptions extends RequestInit {
2841
- /** 클라이언트 키 (브랜드 식별용) */
2842
2566
  clientKey?: string;
2843
- /** 시크릿 키 (서버 사이드 인증용) */
2844
2567
  secretKey?: string;
2845
- /** 요청 타임아웃 (밀리초, 기본값: 30초) */
2846
2568
  timeout?: number;
2847
- /** 기본 API URL (기본값: https://01.software) */
2848
2569
  baseUrl?: string;
2570
+ debug?: boolean | DebugConfig;
2571
+ retry?: RetryConfig;
2849
2572
  }
2850
- /**
2851
- * 향상된 fetch 함수
2852
- *
2853
- * 클라이언트 키, 시크릿 키 헤더 자동 설정 및 에러 처리를 제공합니다.
2854
- *
2855
- * @param url - 요청할 URL (상대 경로)
2856
- * @param options - Fetch 옵션
2857
- * @returns Promise<Response>
2858
- *
2859
- * @throws {NetworkError} 네트워크 연결 실패 시
2860
- * @throws {TimeoutError} 요청 타임아웃 시
2861
- *
2862
- * @example
2863
- * ```typescript
2864
- * const response = await _fetch('/api/products', {
2865
- * clientKey: 'your-client-key',
2866
- * method: 'GET'
2867
- * })
2868
- * ```
2869
- */
2870
- declare const _fetch: (url: string, options?: FetchOptions) => Promise<Response>;
2871
-
2872
- /**
2873
- * 컬렉션 관련 타입 정의
2874
- */
2875
2573
 
2876
- /**
2877
- * 컬렉션 타입 매핑
2878
- *
2879
- * 컬렉션 이름을 해당 컬렉션의 타입으로 변환합니다.
2880
- *
2881
- * @template T - 컬렉션 이름
2882
- *
2883
- * @example
2884
- * ```typescript
2885
- * type Product = CollectionType<'products'>
2886
- * // Product는 Config['collections']['products'] 타입
2887
- * ```
2888
- */
2889
- type CollectionType<T extends Collection> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
2890
-
2891
- /**
2892
- * API 클라이언트 기본 클래스
2893
- *
2894
- * 모든 API 클라이언트의 베이스 클래스로, 공통적인 HTTP 메서드들과
2895
- * 에러 처리, 응답 파싱 기능을 제공합니다.
2896
- */
2897
-
2898
- /**
2899
- * API 클라이언트 기본 클래스
2900
- *
2901
- * @class BaseApiClient
2902
- */
2903
2574
  declare class BaseApiClient {
2904
2575
  protected clientKey: string;
2905
2576
  protected secretKey?: string;
2906
- protected baseUrl?: string;
2907
2577
  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
- 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
- */
2578
+ constructor(clientKey: string, secretKey?: string);
2579
+ protected get<T = unknown>(endpoint: string, options?: ApiQueryOptions): Promise<ApiResponse<T>>;
2580
+ protected post<T = unknown>(endpoint: string, data?: unknown, options?: FetchOptions): Promise<ApiResponse<T>>;
2581
+ protected patch<T = unknown>(endpoint: string, data?: unknown, options?: FetchOptions): Promise<ApiResponse<T>>;
2582
+ protected delete<T = unknown>(endpoint: string, options?: FetchOptions): Promise<ApiResponse<T>>;
2985
2583
  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
2584
  protected parseResponse<T>(response: Response): Promise<ApiResponse<T>>;
3000
2585
  }
3001
2586
 
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
2587
  declare class CollectionsApi extends BaseApiClient {
3036
- 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
- */
2588
+ constructor(clientKey: string, secretKey?: string);
3055
2589
  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>>;
2590
+ requestGet<T = unknown>(endpoint: string, options?: ApiQueryOptions): Promise<ApiResponse<T>>;
2591
+ requestPost<T = unknown>(endpoint: string, data?: unknown): Promise<ApiResponse<T>>;
2592
+ requestPatch<T = unknown>(endpoint: string, data?: unknown): Promise<ApiResponse<T>>;
2593
+ requestDelete<T = unknown>(endpoint: string): Promise<ApiResponse<T>>;
3099
2594
  }
3100
2595
 
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
2596
  declare class CollectionQueryBuilder<T extends Collection> {
3124
2597
  private api;
3125
2598
  private collection;
3126
2599
  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
2600
  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
2601
  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
2602
  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
2603
  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
2604
  remove(id: number | string): Promise<ApiResponse<void>>;
3193
2605
  }
3194
2606
 
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"];
2607
+ declare const COLLECTIONS: readonly ["tenants", "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
2608
 
3197
2609
  interface UnifiedQueryOptions {
3198
2610
  brandKey?: string;
3199
2611
  brandSecret?: string;
3200
2612
  baseUrl?: string;
3201
2613
  }
3202
- /**
3203
- * 통합 쿼리 클라이언트
3204
- * React Query를 사용한 데이터 페칭 및 캐싱 관리
3205
- */
3206
2614
  declare class UnifiedQueryClient {
3207
2615
  private queryClient;
3208
2616
  private collectionsApi;
3209
2617
  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
- */
2618
+ useCollection<T extends Collection>(collection: T, queryOptions?: ApiQueryOptions, reactQueryOptions?: ApiQueryReactOptions): _tanstack_react_query.UseQueryResult<CollectionType<T>[] | null, Error>;
3219
2619
  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
2620
  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
- */
2621
+ useById<T extends Collection>(collection: T, id: string | number, queryOptions?: ApiQueryOptions, reactQueryOptions?: ApiQueryReactOptions): _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<CollectionType<T> | null>, Error>;
3234
2622
  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
2623
  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
2624
  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
2625
  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
2626
  invalidateQueries(collection: Collection, operation?: string): Promise<void>;
3259
- /**
3260
- * 쿼리 데이터 조회
3261
- * @example const data = client.getQueryData('products', 'list')
3262
- */
3263
2627
  getQueryData<T>(collection: Collection, operation: string, ...params: (string | number)[]): T | undefined;
3264
- /**
3265
- * 쿼리 데이터 설정
3266
- * @example client.setQueryData('products', 'list', newData)
3267
- */
3268
2628
  setQueryData<T>(collection: Collection, operation: string, data: T, ...params: (string | number)[]): _tanstack_react_query.NoInfer<T> | undefined;
3269
2629
  }
3270
2630
 
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
2631
  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
2632
  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
2633
  collections: CollectionsApi;
3320
- /**
3321
- * React Query 클라이언트 인스턴스
3322
- *
3323
- * 직접적인 쿼리 캐시 조작이 필요한 경우 사용합니다.
3324
- */
3325
2634
  queryClient: QueryClient;
3326
- /** 클라이언트 내부 상태 */
3327
2635
  protected state: ClientState;
3328
- /** 클라이언트 설정 */
3329
2636
  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
- */
3347
2637
  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
2638
  from<T extends Collection>(collection: T): CollectionQueryBuilder<T>;
3396
- /**
3397
- * 클라이언트의 현재 상태를 반환합니다.
3398
- *
3399
- * @returns 클라이언트 상태의 복사본
3400
- */
3401
2639
  getState(): ClientState;
3402
2640
  }
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;
2641
+ declare function createBrowserClient(options: ClientBrowserConfig): BrowserClient;
2642
+
2643
+ interface ApiClientOptions {
2644
+ clientKey: string;
2645
+ secretKey: string;
2646
+ baseUrl?: string;
2647
+ }
2648
+ type CreateOrderParams = {
2649
+ paymentId: string;
2650
+ orderNumber: string;
2651
+ email: string;
2652
+ shippingAddress: Order['shippingAddress'];
2653
+ orderProducts: Omit<OrderProduct, 'id' | 'brand' | 'createdAt' | 'updatedAt' | 'order' | 'status'>[];
2654
+ totalAmount: number;
2655
+ };
2656
+ type UpdateOrderParams = {
2657
+ orderNumber: string;
2658
+ status: Order['status'];
2659
+ };
2660
+ type UpdateTransactionParams = {
2661
+ paymentId: string;
2662
+ status: Transaction['status'];
2663
+ paymentMethod: Transaction['paymentMethod'];
2664
+ receiptUrl: Transaction['receiptUrl'];
2665
+ };
2666
+ declare class ApiClient {
2667
+ private readonly clientKey;
2668
+ private readonly secretKey;
2669
+ private readonly baseUrl?;
2670
+ constructor(options: ApiClientOptions);
2671
+ private request;
2672
+ createOrder(params: CreateOrderParams): Promise<Order>;
2673
+ updateOrder(params: UpdateOrderParams): Promise<Order>;
2674
+ updateTransaction(params: UpdateTransactionParams): Promise<Transaction>;
2675
+ }
3419
2676
 
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
2677
  declare class ServerClient<_Database = Config> {
3443
- /**
3444
- * API 클라이언트
3445
- *
3446
- * REST API 호출을 위한 메서드들을 제공합니다.
3447
- */
3448
2678
  api: ApiClient;
3449
- /**
3450
- * 범용 컬렉션 API 클라이언트
3451
- *
3452
- * Supabase 스타일의 쿼리 빌더를 제공합니다.
3453
- * 모든 컬렉션에 대한 CRUD 작업을 지원합니다.
3454
- */
3455
2679
  collections: CollectionsApi;
3456
- /** 클라이언트 내부 상태 */
3457
2680
  protected state: ClientState;
3458
- /** 클라이언트 설정 */
3459
2681
  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
- */
3477
2682
  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
2683
  from<T extends Collection>(collection: T): CollectionQueryBuilder<T>;
3522
- /**
3523
- * 클라이언트의 현재 상태를 반환합니다.
3524
- *
3525
- * @returns 클라이언트 상태의 복사본
3526
- */
3527
2684
  getState(): ClientState;
3528
- /**
3529
- * 클라이언트 설정을 반환합니다.
3530
- *
3531
- * 보안을 위해 시크릿 키는 제외하고 반환합니다.
3532
- *
3533
- * @returns 시크릿 키가 제외된 클라이언트 설정
3534
- */
3535
- getConfig(): ClientServerConfig;
2685
+ getConfig(): ClientBrowserConfig;
3536
2686
  }
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;
2687
+ declare function createServerClient(options: ClientServerConfig): ServerClient;
3554
2688
 
3555
2689
  declare function getQueryClient(): QueryClient;
3556
2690
 
3557
- /**
3558
- * Webhook 모듈
3559
- *
3560
- * Next.js 프로젝트에서 webhook을 받을 때 사용하는 함수 모음입니다.
3561
- * 서버 사이드에서만 사용됩니다.
3562
- */
3563
-
3564
- /**
3565
- * Webhook 작업 타입
3566
- *
3567
- * Payload CMS의 afterChange 훅에서 전송되는 작업 타입입니다.
3568
- */
3569
2691
  type WebhookOperation = 'create' | 'update';
3570
- /**
3571
- * Webhook 이벤트 타입
3572
- *
3573
- * @template T - 컬렉션 이름
3574
- */
3575
2692
  interface WebhookEvent<T extends Collection = Collection> {
3576
- /** 컬렉션 이름 */
3577
2693
  collection: T;
3578
- /** 작업 타입 (create 또는 update) */
3579
2694
  operation: WebhookOperation;
3580
- /** 변경된 데이터 */
3581
2695
  data: CollectionType<T>;
3582
2696
  }
3583
- /**
3584
- * Webhook 핸들러 함수 타입
3585
- *
3586
- * @template T - 컬렉션 이름
3587
- */
3588
2697
  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
- */
2698
+ declare function isValidWebhookEvent(data: unknown): data is WebhookEvent;
3611
2699
  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
2700
  declare function createTypedWebhookHandler<T extends Collection>(collection: T, handler: (event: WebhookEvent<T>) => Promise<void> | void): WebhookHandler<T>;
3636
2701
 
3637
2702
  declare const generateOrderNumber: () => string;
@@ -3662,4 +2727,4 @@ interface RichTextContentProps {
3662
2727
  }
3663
2728
  declare function RichTextContent({ data, className, internalDocToHref, blocks, }: RichTextContentProps): React.JSX.Element;
3664
2729
 
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 };
2730
+ export { 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, CollectionQueryBuilder, 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 ErrorLogger, type ExtractArrayType, type Form, type FormSubmission, type FormSubmissionsSelect, type FormsSelect, type GalleriesSelect, type Gallery, type GalleryImage, type GalleryImagesSelect, type IframeBlock, 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 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, createBrowserClient, createServerClient, createTypedWebhookHandler, formatOrderName, generateOrderNumber, getQueryClient, handleWebhook, isApiError, isConfigError, isErrorResponse, isNetworkError, isSDKError, isSuccessResponse, isTimeoutError, isValidWebhookEvent, isValidationError, objectFor };