@01.software/sdk 0.1.0-dev.260211.a92d27b → 0.1.2

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.cts CHANGED
@@ -1,2802 +1,26 @@
1
- import { Sort, Where } from 'payload';
1
+ import { O as Order, a as OrderProduct, T as Transaction, P as ProductOption } from './payload-types-DFzDtXGO.cjs';
2
+ export { i as ApiUsage, a1 as ApiUsageSelect, A as Audience, X as AudiencesSelect, ay as Auth, s as Author, aj as AuthorsSelect, n as Brand, B as BrandLogo, a9 as BrandLogosSelect, a8 as BrandsSelect, c as CodeBlock, C as Config, D as Document, al as DocumentCategoriesSelect, v as DocumentCategory, w as DocumentImage, am as DocumentImagesSelect, ak as DocumentsSelect, E as EmailLog, Y as EmailLogsSelect, H as Form, J as FormSubmission, at as FormSubmissionsSelect, as as FormsSelect, aq as GalleriesSelect, G as Gallery, F as GalleryImage, ar as GalleryImagesSelect, I as IframeBlock, M as Media, W as MediaSelect, z as Music, ap as MusicsSelect, ab as OrderProductsSelect, aa as OrdersSelect, K as PayloadKv, au as PayloadKvSelect, L as PayloadLockedDocument, av as PayloadLockedDocumentsSelect, Q as PayloadMigration, ax as PayloadMigrationsSelect, N as PayloadPreference, aw as PayloadPreferencesSelect, b as PlayerBlock, x as Playlist, y as PlaylistImage, ao as PlaylistImagesSelect, an as PlaylistsSelect, q as Post, ag as PostCategoriesSelect, t as PostCategory, r as PostImage, ai as PostImagesSelect, u as PostTag, ah as PostTagsSelect, af as PostsSelect, j as Product, a5 as ProductCategoriesSelect, l as ProductCategory, k as ProductImage, a7 as ProductImagesSelect, a4 as ProductOptionsSelect, m as ProductTag, a6 as ProductTagsSelect, o as ProductVariant, a3 as ProductVariantsSelect, a2 as ProductsSelect, R as Return, p as ReturnProduct, ad as ReturnProductsSelect, ac as ReturnsSelect, S as SupportedTimezones, e as Tenant, h as TenantLogo, $ as TenantLogosSelect, _ as TenantMetadataSelect, f as TenantMetadatum, g as TenantOgImage, a0 as TenantOgImagesSelect, Z as TenantsSelect, ae as TransactionsSelect, d as User, U as UserAuthOperations, V as UsersSelect } from './payload-types-DFzDtXGO.cjs';
3
+ import { F as FetchOptions, A as ApiQueryOptions, P as PayloadFindResponse, a as PayloadMutationResponse, C as ClientBrowserConfig, b as ClientState, c as ClientServerConfig } from './auth-AVOXtnYN.cjs';
4
+ export { t as API_URLS, f as ApiError, y as ApiQueryReactOptions, w as ClientMetadata, g as ConfigError, d as DebugConfig, D as DeepPartial, s as Environment, e as ErrorLogger, E as ExtractArrayType, J as JwtPayload, N as NetworkError, x as PaginationMeta, R as RetryConfig, S as SDKError, T as TimeoutError, U as UsageLimitError, V as ValidationError, q as createApiKey, o as createServerToken, p as decodeServerToken, k as isApiError, l as isConfigError, h as isNetworkError, i as isSDKError, m as isTimeoutError, n as isUsageLimitError, j as isValidationError, r as parseApiKey, u as resolveApiUrl, v as verifyServerToken } from './auth-AVOXtnYN.cjs';
2
5
  import * as _tanstack_react_query from '@tanstack/react-query';
3
6
  import { QueryClient } from '@tanstack/react-query';
4
- import React from 'react';
5
- import { SerializedLinkNode, SerializedBlockNode } from '@payloadcms/richtext-lexical';
6
- import { SerializedEditorState, SerializedLexicalNode } from '@payloadcms/richtext-lexical/lexical';
7
- import { JSXConverter } from '@payloadcms/richtext-lexical/react';
7
+ import { C as Collection, a as CollectionType } from './webhook-DJCQSO6S.cjs';
8
+ export { b as COLLECTIONS, P as PublicCollection, c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-DJCQSO6S.cjs';
9
+ export { RichTextContent, RichTextContentProps, RichTextData } from './components.cjs';
10
+ import 'payload';
11
+ import 'react';
12
+ import '@payloadcms/richtext-lexical';
13
+ import '@payloadcms/richtext-lexical/lexical';
14
+ import '@payloadcms/richtext-lexical/react';
8
15
 
9
- /**
10
- * This file was automatically generated by Payload.
11
- * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
12
- * and re-run `payload generate:types` to regenerate this file.
13
- */
14
- /**
15
- * Supported timezones in IANA format.
16
- *
17
- * This interface was referenced by `Config`'s JSON-Schema
18
- * via the `definition` "supportedTimezones".
19
- */
20
- type SupportedTimezones = 'Pacific/Midway' | 'Pacific/Niue' | 'Pacific/Honolulu' | 'Pacific/Rarotonga' | 'America/Anchorage' | 'Pacific/Gambier' | 'America/Los_Angeles' | 'America/Tijuana' | 'America/Denver' | 'America/Phoenix' | 'America/Chicago' | 'America/Guatemala' | 'America/New_York' | 'America/Bogota' | 'America/Caracas' | 'America/Santiago' | 'America/Buenos_Aires' | 'America/Sao_Paulo' | 'Atlantic/South_Georgia' | 'Atlantic/Azores' | 'Atlantic/Cape_Verde' | 'Europe/London' | 'Europe/Berlin' | 'Africa/Lagos' | 'Europe/Athens' | 'Africa/Cairo' | 'Europe/Moscow' | 'Asia/Riyadh' | 'Asia/Dubai' | 'Asia/Baku' | 'Asia/Karachi' | 'Asia/Tashkent' | 'Asia/Calcutta' | 'Asia/Dhaka' | 'Asia/Almaty' | 'Asia/Jakarta' | 'Asia/Bangkok' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Tokyo' | 'Asia/Seoul' | 'Australia/Brisbane' | 'Australia/Sydney' | 'Pacific/Guam' | 'Pacific/Noumea' | 'Pacific/Auckland' | 'Pacific/Fiji';
21
- interface Config {
22
- auth: {
23
- users: UserAuthOperations;
24
- };
25
- blocks: {
26
- Player: PlayerBlock;
27
- Iframe: IframeBlock;
28
- };
29
- collections: {
30
- users: User;
31
- media: Media;
32
- tenants: Tenant;
33
- 'tenant-metadata': TenantMetadatum;
34
- 'tenant-logos': TenantLogo;
35
- 'tenant-og-images': TenantOgImage;
36
- products: Product;
37
- 'product-variants': ProductVariant;
38
- 'product-options': ProductOption;
39
- 'product-categories': ProductCategory;
40
- 'product-tags': ProductTag;
41
- 'product-images': ProductImage;
42
- brands: Brand;
43
- 'brand-logos': BrandLogo;
44
- orders: Order;
45
- 'order-products': OrderProduct;
46
- returns: Return;
47
- 'return-products': ReturnProduct;
48
- transactions: Transaction;
49
- documents: Document;
50
- 'document-categories': DocumentCategory;
51
- 'document-images': DocumentImage;
52
- posts: Post;
53
- 'post-categories': PostCategory;
54
- 'post-tags': PostTag;
55
- 'post-images': PostImage;
56
- playlists: Playlist;
57
- 'playlist-images': PlaylistImage;
58
- musics: Music;
59
- galleries: Gallery;
60
- 'gallery-images': GalleryImage;
61
- forms: Form;
62
- 'form-submissions': FormSubmission;
63
- 'payload-kv': PayloadKv;
64
- 'payload-locked-documents': PayloadLockedDocument;
65
- 'payload-preferences': PayloadPreference;
66
- 'payload-migrations': PayloadMigration;
67
- };
68
- collectionsJoins: {
69
- products: {
70
- variants: 'product-variants';
71
- options: 'product-options';
72
- };
73
- 'product-variants': {
74
- productOptions: 'product-options';
75
- };
76
- orders: {
77
- products: 'order-products';
78
- transactions: 'transactions';
79
- returns: 'returns';
80
- };
81
- playlists: {
82
- musics: 'musics';
83
- };
84
- };
85
- collectionsSelect: {
86
- users: UsersSelect<false> | UsersSelect<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>;
92
- products: ProductsSelect<false> | ProductsSelect<true>;
93
- 'product-variants': ProductVariantsSelect<false> | ProductVariantsSelect<true>;
94
- 'product-options': ProductOptionsSelect<false> | ProductOptionsSelect<true>;
95
- 'product-categories': ProductCategoriesSelect<false> | ProductCategoriesSelect<true>;
96
- 'product-tags': ProductTagsSelect<false> | ProductTagsSelect<true>;
97
- 'product-images': ProductImagesSelect<false> | ProductImagesSelect<true>;
98
- brands: BrandsSelect<false> | BrandsSelect<true>;
99
- 'brand-logos': BrandLogosSelect<false> | BrandLogosSelect<true>;
100
- orders: OrdersSelect<false> | OrdersSelect<true>;
101
- 'order-products': OrderProductsSelect<false> | OrderProductsSelect<true>;
102
- returns: ReturnsSelect<false> | ReturnsSelect<true>;
103
- 'return-products': ReturnProductsSelect<false> | ReturnProductsSelect<true>;
104
- transactions: TransactionsSelect<false> | TransactionsSelect<true>;
105
- documents: DocumentsSelect<false> | DocumentsSelect<true>;
106
- 'document-categories': DocumentCategoriesSelect<false> | DocumentCategoriesSelect<true>;
107
- 'document-images': DocumentImagesSelect<false> | DocumentImagesSelect<true>;
108
- posts: PostsSelect<false> | PostsSelect<true>;
109
- 'post-categories': PostCategoriesSelect<false> | PostCategoriesSelect<true>;
110
- 'post-tags': PostTagsSelect<false> | PostTagsSelect<true>;
111
- 'post-images': PostImagesSelect<false> | PostImagesSelect<true>;
112
- playlists: PlaylistsSelect<false> | PlaylistsSelect<true>;
113
- 'playlist-images': PlaylistImagesSelect<false> | PlaylistImagesSelect<true>;
114
- musics: MusicsSelect<false> | MusicsSelect<true>;
115
- galleries: GalleriesSelect<false> | GalleriesSelect<true>;
116
- 'gallery-images': GalleryImagesSelect<false> | GalleryImagesSelect<true>;
117
- forms: FormsSelect<false> | FormsSelect<true>;
118
- 'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
119
- 'payload-kv': PayloadKvSelect<false> | PayloadKvSelect<true>;
120
- 'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
121
- 'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
122
- 'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
123
- };
124
- db: {
125
- defaultIDType: number;
126
- };
127
- fallbackLocale: null;
128
- globals: {};
129
- globalsSelect: {};
130
- locale: null;
131
- user: User & {
132
- collection: 'users';
133
- };
134
- jobs: {
135
- tasks: unknown;
136
- workflows: unknown;
137
- };
138
- }
139
- interface UserAuthOperations {
140
- forgotPassword: {
141
- email: string;
142
- password: string;
143
- };
144
- login: {
145
- email: string;
146
- password: string;
147
- };
148
- registerFirstUser: {
149
- email: string;
150
- password: string;
151
- };
152
- unlock: {
153
- email: string;
154
- password: string;
155
- };
156
- }
157
- /**
158
- * This interface was referenced by `Config`'s JSON-Schema
159
- * via the `definition` "PlayerBlock".
160
- */
161
- interface PlayerBlock {
162
- url: string;
163
- width?: number | null;
164
- height?: number | null;
165
- id?: string | null;
166
- blockName?: string | null;
167
- blockType: 'Player';
168
- }
169
- /**
170
- * This interface was referenced by `Config`'s JSON-Schema
171
- * via the `definition` "IframeBlock".
172
- */
173
- interface IframeBlock {
174
- url: string;
175
- width?: number | null;
176
- height?: number | null;
177
- id?: string | null;
178
- blockName?: string | null;
179
- blockType: 'Iframe';
180
- }
181
- /**
182
- * This interface was referenced by `Config`'s JSON-Schema
183
- * via the `definition` "users".
184
- */
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;
208
- }
209
- /**
210
- * This interface was referenced by `Config`'s JSON-Schema
211
- * via the `definition` "tenants".
212
- */
213
- interface Tenant {
214
- id: number;
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;
240
- prefix?: string | null;
241
- updatedAt: string;
242
- createdAt: string;
243
- url?: string | null;
244
- thumbnailURL?: string | null;
245
- filename?: string | null;
246
- mimeType?: string | null;
247
- filesize?: number | null;
248
- width?: number | null;
249
- height?: number | null;
250
- focalX?: number | null;
251
- focalY?: number | null;
252
- }
253
- /**
254
- * This interface was referenced by `Config`'s JSON-Schema
255
- * via the `definition` "tenant-metadata".
256
- */
257
- interface TenantMetadatum {
258
- id: 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;
281
- };
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;
405
- };
406
- updatedAt: string;
407
- createdAt: string;
408
- }
409
- /**
410
- * This interface was referenced by `Config`'s JSON-Schema
411
- * via the `definition` "brand-logos".
412
- */
413
- interface BrandLogo {
414
- id: number;
415
- /**
416
- * Alternative text for accessibility
417
- */
418
- alt: string;
419
- /**
420
- * Type of logo asset
421
- */
422
- type?: ('primary' | 'secondary' | 'logomark' | 'wordmark' | 'dark' | 'light') | null;
423
- lqip?: string | null;
424
- palette?: {
425
- vibrant?: string | null;
426
- muted?: string | null;
427
- darkVibrant?: string | null;
428
- darkMuted?: string | null;
429
- lightVibrant?: string | null;
430
- lightMuted?: string | null;
431
- };
432
- prefix?: string | null;
433
- updatedAt: string;
434
- createdAt: string;
435
- url?: string | null;
436
- thumbnailURL?: string | null;
437
- filename?: string | null;
438
- mimeType?: string | null;
439
- filesize?: number | null;
440
- width?: number | null;
441
- height?: number | null;
442
- focalX?: number | null;
443
- focalY?: number | null;
444
- }
445
- /**
446
- * This interface was referenced by `Config`'s JSON-Schema
447
- * via the `definition` "tenant-og-images".
448
- */
449
- interface TenantOgImage {
450
- id: number;
451
- tenant?: (number | null) | Tenant;
452
- alt: string;
453
- lqip?: string | null;
454
- palette?: {
455
- vibrant?: string | null;
456
- muted?: string | null;
457
- darkVibrant?: string | null;
458
- darkMuted?: string | null;
459
- lightVibrant?: string | null;
460
- lightMuted?: string | null;
461
- };
462
- prefix?: string | null;
463
- updatedAt: string;
464
- createdAt: string;
465
- url?: string | null;
466
- thumbnailURL?: string | null;
467
- filename?: string | null;
468
- mimeType?: string | null;
469
- filesize?: number | null;
470
- width?: number | null;
471
- height?: number | null;
472
- focalX?: number | null;
473
- focalY?: number | null;
474
- }
475
- /**
476
- * This interface was referenced by `Config`'s JSON-Schema
477
- * via the `definition` "tenant-logos".
478
- */
479
- interface TenantLogo {
480
- id: number;
481
- tenant?: (number | null) | Tenant;
482
- alt: string;
483
- lqip?: string | null;
484
- palette?: {
485
- vibrant?: string | null;
486
- muted?: string | null;
487
- darkVibrant?: string | null;
488
- darkMuted?: string | null;
489
- lightVibrant?: string | null;
490
- lightMuted?: string | null;
491
- };
492
- prefix?: string | null;
493
- updatedAt: string;
494
- createdAt: string;
495
- url?: string | null;
496
- thumbnailURL?: string | null;
497
- filename?: string | null;
498
- mimeType?: string | null;
499
- filesize?: number | null;
500
- width?: number | null;
501
- height?: number | null;
502
- focalX?: number | null;
503
- focalY?: number | null;
504
- }
505
- /**
506
- * This interface was referenced by `Config`'s JSON-Schema
507
- * via the `definition` "products".
508
- */
509
- interface Product {
510
- id: number;
511
- _order?: string | null;
512
- tenant?: (number | null) | Tenant;
513
- title: string;
514
- subTitle?: string | null;
515
- /**
516
- * When enabled, the slug will auto-generate from the title field on save and autosave.
517
- */
518
- generateSlug?: boolean | null;
519
- slug?: string | null;
520
- status?: ('draft' | 'published' | 'archived') | null;
521
- isSoldOut?: boolean | null;
522
- thumbnail?: (number | null) | ProductImage;
523
- images?: (number | ProductImage)[] | null;
524
- description?: {
525
- root: {
526
- type: string;
527
- children: {
528
- type: any;
529
- version: number;
530
- [k: string]: unknown;
531
- }[];
532
- direction: ('ltr' | 'rtl') | null;
533
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
534
- indent: number;
535
- version: number;
536
- };
537
- [k: string]: unknown;
538
- } | null;
539
- price: number;
540
- krwPrice?: string | null;
541
- categories?: (number | ProductCategory)[] | null;
542
- tags?: (number | ProductTag)[] | null;
543
- brand?: (number | null) | Brand;
544
- variants?: {
545
- docs?: (number | ProductVariant)[];
546
- hasNextPage?: boolean;
547
- totalDocs?: number;
548
- };
549
- options?: {
550
- docs?: (number | ProductOption)[];
551
- hasNextPage?: boolean;
552
- totalDocs?: number;
553
- };
554
- updatedAt: string;
555
- createdAt: string;
556
- }
557
- /**
558
- * This interface was referenced by `Config`'s JSON-Schema
559
- * via the `definition` "product-images".
560
- */
561
- interface ProductImage {
562
- id: number;
563
- tenant?: (number | null) | Tenant;
564
- lqip?: string | null;
565
- palette?: {
566
- vibrant?: string | null;
567
- muted?: string | null;
568
- darkVibrant?: string | null;
569
- darkMuted?: string | null;
570
- lightVibrant?: string | null;
571
- lightMuted?: string | null;
572
- };
573
- prefix?: string | null;
574
- updatedAt: string;
575
- createdAt: string;
576
- url?: string | null;
577
- thumbnailURL?: string | null;
578
- filename?: string | null;
579
- mimeType?: string | null;
580
- filesize?: number | null;
581
- width?: number | null;
582
- height?: number | null;
583
- focalX?: number | null;
584
- focalY?: number | null;
585
- sizes?: {
586
- '512'?: {
587
- url?: string | null;
588
- width?: number | null;
589
- height?: number | null;
590
- mimeType?: string | null;
591
- filesize?: number | null;
592
- filename?: string | null;
593
- };
594
- '1024'?: {
595
- url?: string | null;
596
- width?: number | null;
597
- height?: number | null;
598
- mimeType?: string | null;
599
- filesize?: number | null;
600
- filename?: string | null;
601
- };
602
- };
603
- }
604
- /**
605
- * This interface was referenced by `Config`'s JSON-Schema
606
- * via the `definition` "product-categories".
607
- */
608
- interface ProductCategory {
609
- id: number;
610
- _order?: string | null;
611
- tenant?: (number | null) | Tenant;
612
- title: string;
613
- /**
614
- * When enabled, the slug will auto-generate from the title field on save and autosave.
615
- */
616
- generateSlug?: boolean | null;
617
- slug?: string | null;
618
- description?: string | null;
619
- image?: (number | null) | ProductImage;
620
- parent?: (number | null) | ProductCategory;
621
- updatedAt: string;
622
- createdAt: string;
623
- }
624
- /**
625
- * This interface was referenced by `Config`'s JSON-Schema
626
- * via the `definition` "product-tags".
627
- */
628
- interface ProductTag {
629
- id: number;
630
- _order?: string | null;
631
- tenant?: (number | null) | Tenant;
632
- title: string;
633
- /**
634
- * When enabled, the slug will auto-generate from the title field on save and autosave.
635
- */
636
- generateSlug?: boolean | null;
637
- slug: string;
638
- description?: string | null;
639
- updatedAt: string;
640
- createdAt: string;
641
- }
642
- /**
643
- * This interface was referenced by `Config`'s JSON-Schema
644
- * via the `definition` "brands".
645
- */
646
- interface Brand {
647
- id: number;
648
- _order?: string | null;
649
- tenant?: (number | null) | Tenant;
650
- name: string;
651
- /**
652
- * When enabled, the slug will auto-generate from the title field on save and autosave.
653
- */
654
- generateSlug?: boolean | null;
655
- slug?: string | null;
656
- /**
657
- * Primary brand logo
658
- */
659
- logo?: (number | null) | BrandLogo;
660
- /**
661
- * Logo for dark mode (optional)
662
- */
663
- logoDark?: (number | null) | BrandLogo;
664
- /**
665
- * Logo mark / Icon (optional)
666
- */
667
- logomark?: (number | null) | BrandLogo;
668
- description?: string | null;
669
- /**
670
- * Brand official website URL
671
- */
672
- website?: string | null;
673
- updatedAt: string;
674
- createdAt: string;
675
- }
676
- /**
677
- * This interface was referenced by `Config`'s JSON-Schema
678
- * via the `definition` "product-variants".
679
- */
680
- interface ProductVariant {
681
- id: number;
682
- _order?: string | null;
683
- '_product-variants_variants_order'?: string | null;
684
- tenant?: (number | null) | Tenant;
685
- product: number | Product;
686
- title?: string | null;
687
- images?: (number | ProductImage)[] | null;
688
- productOptions?: {
689
- docs?: (number | ProductOption)[];
690
- hasNextPage?: boolean;
691
- totalDocs?: number;
692
- };
693
- updatedAt: string;
694
- createdAt: string;
695
- }
696
- /**
697
- * This interface was referenced by `Config`'s JSON-Schema
698
- * via the `definition` "product-options".
699
- */
700
- interface ProductOption {
701
- id: number;
702
- _order?: string | null;
703
- '_product-options_productOptions_order'?: string | null;
704
- '_product-options_options_order'?: string | null;
705
- tenant?: (number | null) | Tenant;
706
- product: number | Product;
707
- variant?: (number | null) | ProductVariant;
708
- title?: string | null;
709
- stock: number;
710
- updatedAt: string;
711
- createdAt: string;
712
- }
713
- /**
714
- * This interface was referenced by `Config`'s JSON-Schema
715
- * via the `definition` "orders".
716
- */
717
- interface Order {
718
- id: number;
719
- tenant?: (number | null) | Tenant;
720
- orderNumber: string;
721
- status: 'pending' | 'paid' | 'failed' | 'canceled' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
722
- totalAmount?: number | null;
723
- name?: string | null;
724
- email?: string | null;
725
- shippingCarrier?: ('cj' | 'hanjin' | 'lotte' | 'epost' | 'logen' | 'other') | null;
726
- trackingNumber?: string | null;
727
- /**
728
- * 내부 관리용 메모 (고객에게 노출되지 않음)
729
- */
730
- notes?: string | null;
731
- shippingAddress?: {
732
- postalCode?: string | null;
733
- address1?: string | null;
734
- address2?: string | null;
735
- deliveryMessage?: string | null;
736
- recipientName?: string | null;
737
- phone?: string | null;
738
- };
739
- products?: {
740
- docs?: (number | OrderProduct)[];
741
- hasNextPage?: boolean;
742
- totalDocs?: number;
743
- };
744
- transactions?: {
745
- docs?: (number | Transaction)[];
746
- hasNextPage?: boolean;
747
- totalDocs?: number;
748
- };
749
- returns?: {
750
- docs?: (number | Return)[];
751
- hasNextPage?: boolean;
752
- totalDocs?: number;
753
- };
754
- updatedAt: string;
755
- createdAt: string;
756
- }
757
- /**
758
- * This interface was referenced by `Config`'s JSON-Schema
759
- * via the `definition` "order-products".
760
- */
761
- interface OrderProduct {
762
- id: number;
763
- tenant?: (number | null) | Tenant;
764
- order: number | Order;
765
- product: number | Product;
766
- variant?: (number | null) | ProductVariant;
767
- option?: (number | null) | ProductOption;
768
- quantity: number;
769
- title?: string | null;
770
- updatedAt: string;
771
- createdAt: string;
772
- }
773
- /**
774
- * This interface was referenced by `Config`'s JSON-Schema
775
- * via the `definition` "transactions".
776
- */
777
- interface Transaction {
778
- id: number;
779
- tenant?: (number | null) | Tenant;
780
- status: 'pending' | 'paid' | 'failed' | 'canceled';
781
- order: number | Order;
782
- paymentId?: string | null;
783
- paymentMethod?: string | null;
784
- receiptUrl?: string | null;
785
- totalAmount?: number | null;
786
- updatedAt: string;
787
- createdAt: string;
788
- }
789
- /**
790
- * This interface was referenced by `Config`'s JSON-Schema
791
- * via the `definition` "returns".
792
- */
793
- interface Return {
794
- id: number;
795
- tenant?: (number | null) | Tenant;
796
- order: number | Order;
797
- status: 'requested' | 'processing' | 'approved' | 'rejected' | 'completed';
798
- reason?: ('change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other') | null;
799
- /**
800
- * 반품 상세 사유
801
- */
802
- reasonDetail?: string | null;
803
- returnProducts?: {
804
- orderProduct: number | OrderProduct;
805
- quantity: number;
806
- id?: string | null;
807
- }[] | null;
808
- refundAmount: number;
809
- updatedAt: string;
810
- createdAt: string;
811
- }
812
- /**
813
- * This interface was referenced by `Config`'s JSON-Schema
814
- * via the `definition` "return-products".
815
- */
816
- interface ReturnProduct {
817
- id: number;
818
- tenant?: (number | null) | Tenant;
819
- order: number | Order;
820
- status: 'requested' | 'processing' | 'approved' | 'rejected';
821
- orderProduct: number | OrderProduct;
822
- product: number | Product;
823
- variant: number | ProductVariant;
824
- option: number | ProductOption;
825
- quantity: number;
826
- title?: string | null;
827
- updatedAt: string;
828
- createdAt: string;
829
- }
830
- /**
831
- * This interface was referenced by `Config`'s JSON-Schema
832
- * via the `definition` "documents".
833
- */
834
- interface Document {
835
- id: number;
836
- _order?: string | null;
837
- tenant?: (number | null) | Tenant;
838
- /**
839
- * 문서 제목 (예: 개인정보 처리방침)
840
- */
841
- title: string;
842
- /**
843
- * When enabled, the slug will auto-generate from the title field on save and autosave.
844
- */
845
- generateSlug?: boolean | null;
846
- slug: string;
847
- /**
848
- * 문서 유형 선택
849
- */
850
- type: 'terms_of_service' | 'privacy_policy' | 'service_guide' | 'notice' | 'legal_notice' | 'refund_policy' | 'other';
851
- /**
852
- * 문서 버전 (예: 1.0, 1.1, 2.0)
853
- */
854
- version: string;
855
- /**
856
- * 시행일 (이 날짜부터 문서가 효력을 발생)
857
- */
858
- effectiveDate?: string | null;
859
- /**
860
- * 만료일 (선택사항)
861
- */
862
- expiryDate?: string | null;
863
- /**
864
- * 문서 요약 (간략한 설명)
865
- */
866
- summary?: string | null;
867
- content: {
868
- root: {
869
- type: string;
870
- children: {
871
- type: any;
872
- version: number;
873
- [k: string]: unknown;
874
- }[];
875
- direction: ('ltr' | 'rtl') | null;
876
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
877
- indent: number;
878
- version: number;
879
- };
880
- [k: string]: unknown;
881
- };
882
- category?: (number | null) | DocumentCategory;
883
- /**
884
- * 검색을 위한 태그 (예: GDPR, CCPA, 개인정보)
885
- */
886
- tags?: {
887
- tag?: string | null;
888
- id?: string | null;
889
- }[] | null;
890
- /**
891
- * 사용자가 반드시 동의해야 하는 문서인가요?
892
- */
893
- isRequired?: boolean | null;
894
- /**
895
- * 변경 이력 (이전 버전과의 차이점)
896
- */
897
- changeLog?: string | null;
898
- updatedAt: string;
899
- createdAt: string;
900
- _status?: ('draft' | 'published') | null;
901
- }
902
- /**
903
- * This interface was referenced by `Config`'s JSON-Schema
904
- * via the `definition` "document-categories".
905
- */
906
- interface DocumentCategory {
907
- id: number;
908
- _order?: string | null;
909
- tenant?: (number | null) | Tenant;
910
- title: string;
911
- /**
912
- * When enabled, the slug will auto-generate from the title field on save and autosave.
913
- */
914
- generateSlug?: boolean | null;
915
- slug?: string | null;
916
- description?: string | null;
917
- updatedAt: string;
918
- createdAt: string;
919
- }
920
- /**
921
- * This interface was referenced by `Config`'s JSON-Schema
922
- * via the `definition` "document-images".
923
- */
924
- interface DocumentImage {
925
- id: number;
926
- tenant?: (number | null) | Tenant;
927
- alt?: string | null;
928
- lqip?: string | null;
929
- palette?: {
930
- vibrant?: string | null;
931
- muted?: string | null;
932
- darkVibrant?: string | null;
933
- darkMuted?: string | null;
934
- lightVibrant?: string | null;
935
- lightMuted?: string | null;
936
- };
937
- prefix?: string | null;
938
- updatedAt: string;
939
- createdAt: string;
940
- url?: string | null;
941
- thumbnailURL?: string | null;
942
- filename?: string | null;
943
- mimeType?: string | null;
944
- filesize?: number | null;
945
- width?: number | null;
946
- height?: number | null;
947
- focalX?: number | null;
948
- focalY?: number | null;
949
- sizes?: {
950
- '512'?: {
951
- url?: string | null;
952
- width?: number | null;
953
- height?: number | null;
954
- mimeType?: string | null;
955
- filesize?: number | null;
956
- filename?: string | null;
957
- };
958
- '1024'?: {
959
- url?: string | null;
960
- width?: number | null;
961
- height?: number | null;
962
- mimeType?: string | null;
963
- filesize?: number | null;
964
- filename?: string | null;
965
- };
966
- };
967
- }
968
- /**
969
- * This interface was referenced by `Config`'s JSON-Schema
970
- * via the `definition` "posts".
971
- */
972
- interface Post {
973
- id: number;
974
- _order?: string | null;
975
- tenant?: (number | null) | Tenant;
976
- thumbnail?: (number | null) | PostImage;
977
- title: string;
978
- subtitle?: string | null;
979
- /**
980
- * When enabled, the slug will auto-generate from the title field on save and autosave.
981
- */
982
- generateSlug?: boolean | null;
983
- slug?: string | null;
984
- categories?: (number | PostCategory)[] | null;
985
- tags?: (number | PostTag)[] | null;
986
- content?: {
987
- root: {
988
- type: string;
989
- children: {
990
- type: any;
991
- version: number;
992
- [k: string]: unknown;
993
- }[];
994
- direction: ('ltr' | 'rtl') | null;
995
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
996
- indent: number;
997
- version: number;
998
- };
999
- [k: string]: unknown;
1000
- } | null;
1001
- updatedAt: string;
1002
- createdAt: string;
1003
- _status?: ('draft' | 'published') | null;
1004
- }
1005
- /**
1006
- * This interface was referenced by `Config`'s JSON-Schema
1007
- * via the `definition` "post-images".
1008
- */
1009
- interface PostImage {
1010
- id: number;
1011
- tenant?: (number | null) | Tenant;
1012
- alt?: string | null;
1013
- lqip?: string | null;
1014
- palette?: {
1015
- vibrant?: string | null;
1016
- muted?: string | null;
1017
- darkVibrant?: string | null;
1018
- darkMuted?: string | null;
1019
- lightVibrant?: string | null;
1020
- lightMuted?: string | null;
1021
- };
1022
- prefix?: string | null;
1023
- updatedAt: string;
1024
- createdAt: string;
1025
- url?: string | null;
1026
- thumbnailURL?: string | null;
1027
- filename?: string | null;
1028
- mimeType?: string | null;
1029
- filesize?: number | null;
1030
- width?: number | null;
1031
- height?: number | null;
1032
- focalX?: number | null;
1033
- focalY?: number | null;
1034
- sizes?: {
1035
- '512'?: {
1036
- url?: string | null;
1037
- width?: number | null;
1038
- height?: number | null;
1039
- mimeType?: string | null;
1040
- filesize?: number | null;
1041
- filename?: string | null;
1042
- };
1043
- '1024'?: {
1044
- url?: string | null;
1045
- width?: number | null;
1046
- height?: number | null;
1047
- mimeType?: string | null;
1048
- filesize?: number | null;
1049
- filename?: string | null;
1050
- };
1051
- };
1052
- }
1053
- /**
1054
- * This interface was referenced by `Config`'s JSON-Schema
1055
- * via the `definition` "post-categories".
1056
- */
1057
- interface PostCategory {
1058
- id: number;
1059
- _order?: string | null;
1060
- tenant?: (number | null) | Tenant;
1061
- title: string;
1062
- /**
1063
- * When enabled, the slug will auto-generate from the title field on save and autosave.
1064
- */
1065
- generateSlug?: boolean | null;
1066
- slug?: string | null;
1067
- description?: string | null;
1068
- parent?: (number | null) | PostCategory;
1069
- updatedAt: string;
1070
- createdAt: string;
1071
- }
1072
- /**
1073
- * This interface was referenced by `Config`'s JSON-Schema
1074
- * via the `definition` "post-tags".
1075
- */
1076
- interface PostTag {
1077
- id: number;
1078
- _order?: string | null;
1079
- tenant?: (number | null) | Tenant;
1080
- title: string;
1081
- /**
1082
- * When enabled, the slug will auto-generate from the title field on save and autosave.
1083
- */
1084
- generateSlug?: boolean | null;
1085
- slug: string;
1086
- description?: string | null;
1087
- updatedAt: string;
1088
- createdAt: string;
1089
- }
1090
- /**
1091
- * This interface was referenced by `Config`'s JSON-Schema
1092
- * via the `definition` "playlists".
1093
- */
1094
- interface Playlist {
1095
- id: number;
1096
- tenant?: (number | null) | Tenant;
1097
- image?: (number | null) | PlaylistImage;
1098
- title: string;
1099
- /**
1100
- * When enabled, the slug will auto-generate from the title field on save and autosave.
1101
- */
1102
- generateSlug?: boolean | null;
1103
- slug: string;
1104
- description?: string | null;
1105
- musics?: {
1106
- docs?: (number | Music)[];
1107
- hasNextPage?: boolean;
1108
- totalDocs?: number;
1109
- };
1110
- updatedAt: string;
1111
- createdAt: string;
1112
- }
1113
- /**
1114
- * This interface was referenced by `Config`'s JSON-Schema
1115
- * via the `definition` "playlist-images".
1116
- */
1117
- interface PlaylistImage {
1118
- id: number;
1119
- tenant?: (number | null) | Tenant;
1120
- alt?: string | null;
1121
- lqip?: string | null;
1122
- palette?: {
1123
- vibrant?: string | null;
1124
- muted?: string | null;
1125
- darkVibrant?: string | null;
1126
- darkMuted?: string | null;
1127
- lightVibrant?: string | null;
1128
- lightMuted?: string | null;
1129
- };
1130
- prefix?: string | null;
1131
- updatedAt: string;
1132
- createdAt: string;
1133
- url?: string | null;
1134
- thumbnailURL?: string | null;
1135
- filename?: string | null;
1136
- mimeType?: string | null;
1137
- filesize?: number | null;
1138
- width?: number | null;
1139
- height?: number | null;
1140
- focalX?: number | null;
1141
- focalY?: number | null;
1142
- sizes?: {
1143
- '512'?: {
1144
- url?: string | null;
1145
- width?: number | null;
1146
- height?: number | null;
1147
- mimeType?: string | null;
1148
- filesize?: number | null;
1149
- filename?: string | null;
1150
- };
1151
- '1024'?: {
1152
- url?: string | null;
1153
- width?: number | null;
1154
- height?: number | null;
1155
- mimeType?: string | null;
1156
- filesize?: number | null;
1157
- filename?: string | null;
1158
- };
1159
- };
1160
- }
1161
- /**
1162
- * This interface was referenced by `Config`'s JSON-Schema
1163
- * via the `definition` "musics".
1164
- */
1165
- interface Music {
1166
- id: number;
1167
- _musics_musics_order?: string | null;
1168
- tenant?: (number | null) | Tenant;
1169
- playlist: number | Playlist;
1170
- url: string;
1171
- title: string;
1172
- artist?: string | null;
1173
- isValid?: boolean | null;
1174
- updatedAt: string;
1175
- createdAt: string;
1176
- }
1177
- /**
1178
- * This interface was referenced by `Config`'s JSON-Schema
1179
- * via the `definition` "galleries".
1180
- */
1181
- interface Gallery {
1182
- id: number;
1183
- _order?: string | null;
1184
- tenant?: (number | null) | Tenant;
1185
- thumbnail?: (number | null) | GalleryImage;
1186
- title: string;
1187
- /**
1188
- * When enabled, the slug will auto-generate from the title field on save and autosave.
1189
- */
1190
- generateSlug?: boolean | null;
1191
- slug: string;
1192
- description?: string | null;
1193
- images: (number | GalleryImage)[];
1194
- updatedAt: string;
1195
- createdAt: string;
1196
- }
1197
- /**
1198
- * This interface was referenced by `Config`'s JSON-Schema
1199
- * via the `definition` "gallery-images".
1200
- */
1201
- interface GalleryImage {
1202
- id: number;
1203
- tenant?: (number | null) | Tenant;
1204
- lqip?: string | null;
1205
- palette?: {
1206
- vibrant?: string | null;
1207
- muted?: string | null;
1208
- darkVibrant?: string | null;
1209
- darkMuted?: string | null;
1210
- lightVibrant?: string | null;
1211
- lightMuted?: string | null;
1212
- };
1213
- prefix?: string | null;
1214
- updatedAt: string;
1215
- createdAt: string;
1216
- url?: string | null;
1217
- thumbnailURL?: string | null;
1218
- filename?: string | null;
1219
- mimeType?: string | null;
1220
- filesize?: number | null;
1221
- width?: number | null;
1222
- height?: number | null;
1223
- focalX?: number | null;
1224
- focalY?: number | null;
1225
- sizes?: {
1226
- '512'?: {
1227
- url?: string | null;
1228
- width?: number | null;
1229
- height?: number | null;
1230
- mimeType?: string | null;
1231
- filesize?: number | null;
1232
- filename?: string | null;
1233
- };
1234
- '1024'?: {
1235
- url?: string | null;
1236
- width?: number | null;
1237
- height?: number | null;
1238
- mimeType?: string | null;
1239
- filesize?: number | null;
1240
- filename?: string | null;
1241
- };
1242
- };
1243
- }
1244
- /**
1245
- * This interface was referenced by `Config`'s JSON-Schema
1246
- * via the `definition` "forms".
1247
- */
1248
- interface Form {
1249
- id: number;
1250
- title: string;
1251
- description?: {
1252
- root: {
1253
- type: string;
1254
- children: {
1255
- type: any;
1256
- version: number;
1257
- [k: string]: unknown;
1258
- }[];
1259
- direction: ('ltr' | 'rtl') | null;
1260
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
1261
- indent: number;
1262
- version: number;
1263
- };
1264
- [k: string]: unknown;
1265
- } | null;
1266
- fields?: ({
1267
- name: string;
1268
- label?: string | null;
1269
- width?: number | null;
1270
- required?: boolean | null;
1271
- defaultValue?: boolean | null;
1272
- id?: string | null;
1273
- blockName?: string | null;
1274
- blockType: 'checkbox';
1275
- } | {
1276
- name: string;
1277
- label?: string | null;
1278
- width?: number | null;
1279
- required?: boolean | null;
1280
- id?: string | null;
1281
- blockName?: string | null;
1282
- blockType: 'country';
1283
- } | {
1284
- name: string;
1285
- label?: string | null;
1286
- width?: number | null;
1287
- required?: boolean | null;
1288
- id?: string | null;
1289
- blockName?: string | null;
1290
- blockType: 'email';
1291
- } | {
1292
- message?: {
1293
- root: {
1294
- type: string;
1295
- children: {
1296
- type: any;
1297
- version: number;
1298
- [k: string]: unknown;
1299
- }[];
1300
- direction: ('ltr' | 'rtl') | null;
1301
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
1302
- indent: number;
1303
- version: number;
1304
- };
1305
- [k: string]: unknown;
1306
- } | null;
1307
- id?: string | null;
1308
- blockName?: string | null;
1309
- blockType: 'message';
1310
- } | {
1311
- name: string;
1312
- label?: string | null;
1313
- width?: number | null;
1314
- defaultValue?: number | null;
1315
- required?: boolean | null;
1316
- id?: string | null;
1317
- blockName?: string | null;
1318
- blockType: 'number';
1319
- } | {
1320
- name: string;
1321
- label?: string | null;
1322
- width?: number | null;
1323
- defaultValue?: string | null;
1324
- placeholder?: string | null;
1325
- options?: {
1326
- label: string;
1327
- value: string;
1328
- id?: string | null;
1329
- }[] | null;
1330
- required?: boolean | null;
1331
- id?: string | null;
1332
- blockName?: string | null;
1333
- blockType: 'select';
1334
- } | {
1335
- name: string;
1336
- label?: string | null;
1337
- width?: number | null;
1338
- required?: boolean | null;
1339
- id?: string | null;
1340
- blockName?: string | null;
1341
- blockType: 'state';
1342
- } | {
1343
- name: string;
1344
- label?: string | null;
1345
- width?: number | null;
1346
- defaultValue?: string | null;
1347
- required?: boolean | null;
1348
- placeholder?: string | null;
1349
- id?: string | null;
1350
- blockName?: string | null;
1351
- blockType: 'text';
1352
- } | {
1353
- name: string;
1354
- label?: string | null;
1355
- width?: number | null;
1356
- defaultValue?: string | null;
1357
- required?: boolean | null;
1358
- id?: string | null;
1359
- blockName?: string | null;
1360
- blockType: 'textarea';
1361
- })[] | null;
1362
- submitButtonLabel?: string | null;
1363
- /**
1364
- * Choose whether to display an on-page message or redirect to a different page after they submit the form.
1365
- */
1366
- confirmationType?: ('message' | 'redirect') | null;
1367
- confirmationMessage?: {
1368
- root: {
1369
- type: string;
1370
- children: {
1371
- type: any;
1372
- version: number;
1373
- [k: string]: unknown;
1374
- }[];
1375
- direction: ('ltr' | 'rtl') | null;
1376
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
1377
- indent: number;
1378
- version: number;
1379
- };
1380
- [k: string]: unknown;
1381
- } | null;
1382
- redirect?: {
1383
- url: string;
1384
- };
1385
- /**
1386
- * Send custom emails when the form submits. Use comma separated lists to send the same email to multiple recipients. To reference a value from this form, wrap that field's name with double curly brackets, i.e. {{firstName}}. You can use a wildcard {{*}} to output all data and {{*:table}} to format it as an HTML table in the email.
1387
- */
1388
- emails?: {
1389
- emailTo?: string | null;
1390
- cc?: string | null;
1391
- bcc?: string | null;
1392
- replyTo?: string | null;
1393
- emailFrom?: string | null;
1394
- subject: string;
1395
- /**
1396
- * Enter the message that should be sent in this email.
1397
- */
1398
- message?: {
1399
- root: {
1400
- type: string;
1401
- children: {
1402
- type: any;
1403
- version: number;
1404
- [k: string]: unknown;
1405
- }[];
1406
- direction: ('ltr' | 'rtl') | null;
1407
- format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
1408
- indent: number;
1409
- version: number;
1410
- };
1411
- [k: string]: unknown;
1412
- } | null;
1413
- id?: string | null;
1414
- }[] | null;
1415
- updatedAt: string;
1416
- createdAt: string;
1417
- }
1418
- /**
1419
- * This interface was referenced by `Config`'s JSON-Schema
1420
- * via the `definition` "form-submissions".
1421
- */
1422
- interface FormSubmission {
1423
- id: number;
1424
- form: number | Form;
1425
- submissionData?: {
1426
- field: string;
1427
- value: string;
1428
- id?: string | null;
1429
- }[] | null;
1430
- updatedAt: string;
1431
- createdAt: string;
1432
- }
1433
- /**
1434
- * This interface was referenced by `Config`'s JSON-Schema
1435
- * via the `definition` "payload-kv".
1436
- */
1437
- interface PayloadKv {
1438
- id: number;
1439
- key: string;
1440
- data: {
1441
- [k: string]: unknown;
1442
- } | unknown[] | string | number | boolean | null;
1443
- }
1444
- /**
1445
- * This interface was referenced by `Config`'s JSON-Schema
1446
- * via the `definition` "payload-locked-documents".
1447
- */
1448
- interface PayloadLockedDocument {
1449
- id: number;
1450
- document?: ({
1451
- relationTo: 'users';
1452
- value: number | User;
1453
- } | null) | ({
1454
- relationTo: 'media';
1455
- value: number | Media;
1456
- } | null) | ({
1457
- relationTo: 'tenants';
1458
- value: number | Tenant;
1459
- } | null) | ({
1460
- relationTo: 'tenant-metadata';
1461
- value: number | TenantMetadatum;
1462
- } | null) | ({
1463
- relationTo: 'tenant-logos';
1464
- value: number | TenantLogo;
1465
- } | null) | ({
1466
- relationTo: 'tenant-og-images';
1467
- value: number | TenantOgImage;
1468
- } | null) | ({
1469
- relationTo: 'products';
1470
- value: number | Product;
1471
- } | null) | ({
1472
- relationTo: 'product-variants';
1473
- value: number | ProductVariant;
1474
- } | null) | ({
1475
- relationTo: 'product-options';
1476
- value: number | ProductOption;
1477
- } | null) | ({
1478
- relationTo: 'product-categories';
1479
- value: number | ProductCategory;
1480
- } | null) | ({
1481
- relationTo: 'product-tags';
1482
- value: number | ProductTag;
1483
- } | null) | ({
1484
- relationTo: 'product-images';
1485
- value: number | ProductImage;
1486
- } | null) | ({
1487
- relationTo: 'brands';
1488
- value: number | Brand;
1489
- } | null) | ({
1490
- relationTo: 'brand-logos';
1491
- value: number | BrandLogo;
1492
- } | null) | ({
1493
- relationTo: 'orders';
1494
- value: number | Order;
1495
- } | null) | ({
1496
- relationTo: 'order-products';
1497
- value: number | OrderProduct;
1498
- } | null) | ({
1499
- relationTo: 'returns';
1500
- value: number | Return;
1501
- } | null) | ({
1502
- relationTo: 'return-products';
1503
- value: number | ReturnProduct;
1504
- } | null) | ({
1505
- relationTo: 'transactions';
1506
- value: number | Transaction;
1507
- } | null) | ({
1508
- relationTo: 'documents';
1509
- value: number | Document;
1510
- } | null) | ({
1511
- relationTo: 'document-categories';
1512
- value: number | DocumentCategory;
1513
- } | null) | ({
1514
- relationTo: 'document-images';
1515
- value: number | DocumentImage;
1516
- } | null) | ({
1517
- relationTo: 'posts';
1518
- value: number | Post;
1519
- } | null) | ({
1520
- relationTo: 'post-categories';
1521
- value: number | PostCategory;
1522
- } | null) | ({
1523
- relationTo: 'post-tags';
1524
- value: number | PostTag;
1525
- } | null) | ({
1526
- relationTo: 'post-images';
1527
- value: number | PostImage;
1528
- } | null) | ({
1529
- relationTo: 'playlists';
1530
- value: number | Playlist;
1531
- } | null) | ({
1532
- relationTo: 'playlist-images';
1533
- value: number | PlaylistImage;
1534
- } | null) | ({
1535
- relationTo: 'musics';
1536
- value: number | Music;
1537
- } | null) | ({
1538
- relationTo: 'galleries';
1539
- value: number | Gallery;
1540
- } | null) | ({
1541
- relationTo: 'gallery-images';
1542
- value: number | GalleryImage;
1543
- } | null) | ({
1544
- relationTo: 'forms';
1545
- value: number | Form;
1546
- } | null) | ({
1547
- relationTo: 'form-submissions';
1548
- value: number | FormSubmission;
1549
- } | null);
1550
- globalSlug?: string | null;
1551
- user: {
1552
- relationTo: 'users';
1553
- value: number | User;
1554
- };
1555
- updatedAt: string;
1556
- createdAt: string;
1557
- }
1558
- /**
1559
- * This interface was referenced by `Config`'s JSON-Schema
1560
- * via the `definition` "payload-preferences".
1561
- */
1562
- interface PayloadPreference {
1563
- id: number;
1564
- user: {
1565
- relationTo: 'users';
1566
- value: number | User;
1567
- };
1568
- key?: string | null;
1569
- value?: {
1570
- [k: string]: unknown;
1571
- } | unknown[] | string | number | boolean | null;
1572
- updatedAt: string;
1573
- createdAt: string;
1574
- }
1575
- /**
1576
- * This interface was referenced by `Config`'s JSON-Schema
1577
- * via the `definition` "payload-migrations".
1578
- */
1579
- interface PayloadMigration {
1580
- id: number;
1581
- name?: string | null;
1582
- batch?: number | null;
1583
- updatedAt: string;
1584
- createdAt: string;
1585
- }
1586
- /**
1587
- * This interface was referenced by `Config`'s JSON-Schema
1588
- * via the `definition` "users_select".
1589
- */
1590
- interface UsersSelect<T extends boolean = true> {
1591
- roles?: T;
1592
- tenants?: T | {
1593
- tenant?: T;
1594
- roles?: T;
1595
- id?: T;
1596
- };
1597
- updatedAt?: T;
1598
- createdAt?: T;
1599
- email?: T;
1600
- resetPasswordToken?: T;
1601
- resetPasswordExpiration?: T;
1602
- salt?: T;
1603
- hash?: T;
1604
- loginAttempts?: T;
1605
- lockUntil?: T;
1606
- sessions?: T | {
1607
- id?: T;
1608
- createdAt?: T;
1609
- expiresAt?: T;
1610
- };
1611
- }
1612
- /**
1613
- * This interface was referenced by `Config`'s JSON-Schema
1614
- * via the `definition` "media_select".
1615
- */
1616
- interface MediaSelect<T extends boolean = true> {
1617
- tenant?: T;
1618
- alt?: T;
1619
- prefix?: T;
1620
- updatedAt?: T;
1621
- createdAt?: T;
1622
- url?: T;
1623
- thumbnailURL?: T;
1624
- filename?: T;
1625
- mimeType?: T;
1626
- filesize?: T;
1627
- width?: T;
1628
- height?: T;
1629
- focalX?: T;
1630
- focalY?: T;
1631
- }
1632
- /**
1633
- * This interface was referenced by `Config`'s JSON-Schema
1634
- * via the `definition` "tenants_select".
1635
- */
1636
- interface TenantsSelect<T extends boolean = true> {
1637
- name?: T;
1638
- domain?: T;
1639
- features?: T;
1640
- plan?: T;
1641
- clientKey?: T;
1642
- secretKeys?: T | {
1643
- name?: T;
1644
- value?: T;
1645
- id?: T;
1646
- };
1647
- webhookUrl?: T;
1648
- updatedAt?: T;
1649
- createdAt?: T;
1650
- }
1651
- /**
1652
- * This interface was referenced by `Config`'s JSON-Schema
1653
- * via the `definition` "tenant-metadata_select".
1654
- */
1655
- interface TenantMetadataSelect<T extends boolean = true> {
1656
- tenant?: T;
1657
- siteInfo?: T | {
1658
- title?: T;
1659
- description?: T;
1660
- keywords?: T;
1661
- author?: T;
1662
- siteUrl?: T;
1663
- };
1664
- branding?: T | {
1665
- logo?: T;
1666
- logoDark?: T;
1667
- logomark?: T;
1668
- favicon?: T;
1669
- themeColor?: T;
1670
- };
1671
- openGraph?: T | {
1672
- ogTitle?: T;
1673
- ogDescription?: T;
1674
- ogImage?: T;
1675
- ogType?: T;
1676
- ogLocale?: T;
1677
- };
1678
- twitter?: T | {
1679
- twitterCard?: T;
1680
- twitterSite?: T;
1681
- twitterCreator?: T;
1682
- twitterTitle?: T;
1683
- twitterDescription?: T;
1684
- twitterImage?: T;
1685
- };
1686
- seo?: T | {
1687
- robots?: T;
1688
- googleSiteVerification?: T;
1689
- bingSiteVerification?: T;
1690
- naverSiteVerification?: T;
1691
- canonicalUrl?: T;
1692
- };
1693
- pwa?: T | {
1694
- shortName?: T;
1695
- backgroundColor?: T;
1696
- display?: T;
1697
- };
1698
- analytics?: T | {
1699
- googleAnalyticsId?: T;
1700
- googleTagManagerId?: T;
1701
- facebookPixelId?: T;
1702
- linkedInPartnerId?: T;
1703
- };
1704
- updatedAt?: T;
1705
- createdAt?: T;
1706
- }
1707
- /**
1708
- * This interface was referenced by `Config`'s JSON-Schema
1709
- * via the `definition` "tenant-logos_select".
1710
- */
1711
- interface TenantLogosSelect<T extends boolean = true> {
1712
- tenant?: T;
1713
- alt?: T;
1714
- lqip?: T;
1715
- palette?: T | {
1716
- vibrant?: T;
1717
- muted?: T;
1718
- darkVibrant?: T;
1719
- darkMuted?: T;
1720
- lightVibrant?: T;
1721
- lightMuted?: T;
1722
- };
1723
- prefix?: T;
1724
- updatedAt?: T;
1725
- createdAt?: T;
1726
- url?: T;
1727
- thumbnailURL?: T;
1728
- filename?: T;
1729
- mimeType?: T;
1730
- filesize?: T;
1731
- width?: T;
1732
- height?: T;
1733
- focalX?: T;
1734
- focalY?: T;
1735
- }
1736
- /**
1737
- * This interface was referenced by `Config`'s JSON-Schema
1738
- * via the `definition` "tenant-og-images_select".
1739
- */
1740
- interface TenantOgImagesSelect<T extends boolean = true> {
1741
- tenant?: T;
1742
- alt?: T;
1743
- lqip?: T;
1744
- palette?: T | {
1745
- vibrant?: T;
1746
- muted?: T;
1747
- darkVibrant?: T;
1748
- darkMuted?: T;
1749
- lightVibrant?: T;
1750
- lightMuted?: T;
1751
- };
1752
- prefix?: T;
1753
- updatedAt?: T;
1754
- createdAt?: T;
1755
- url?: T;
1756
- thumbnailURL?: T;
1757
- filename?: T;
1758
- mimeType?: T;
1759
- filesize?: T;
1760
- width?: T;
1761
- height?: T;
1762
- focalX?: T;
1763
- focalY?: T;
1764
- }
1765
- /**
1766
- * This interface was referenced by `Config`'s JSON-Schema
1767
- * via the `definition` "products_select".
1768
- */
1769
- interface ProductsSelect<T extends boolean = true> {
1770
- _order?: T;
1771
- tenant?: T;
1772
- title?: T;
1773
- subTitle?: T;
1774
- generateSlug?: T;
1775
- slug?: T;
1776
- status?: T;
1777
- isSoldOut?: T;
1778
- thumbnail?: T;
1779
- images?: T;
1780
- description?: T;
1781
- price?: T;
1782
- krwPrice?: T;
1783
- categories?: T;
1784
- tags?: T;
1785
- brand?: T;
1786
- variants?: T;
1787
- options?: T;
1788
- updatedAt?: T;
1789
- createdAt?: T;
1790
- }
1791
- /**
1792
- * This interface was referenced by `Config`'s JSON-Schema
1793
- * via the `definition` "product-variants_select".
1794
- */
1795
- interface ProductVariantsSelect<T extends boolean = true> {
1796
- _order?: T;
1797
- '_product-variants_variants_order'?: T;
1798
- tenant?: T;
1799
- product?: T;
1800
- title?: T;
1801
- images?: T;
1802
- productOptions?: T;
1803
- updatedAt?: T;
1804
- createdAt?: T;
1805
- }
1806
- /**
1807
- * This interface was referenced by `Config`'s JSON-Schema
1808
- * via the `definition` "product-options_select".
1809
- */
1810
- interface ProductOptionsSelect<T extends boolean = true> {
1811
- _order?: T;
1812
- '_product-options_productOptions_order'?: T;
1813
- '_product-options_options_order'?: T;
1814
- tenant?: T;
1815
- product?: T;
1816
- variant?: T;
1817
- title?: T;
1818
- stock?: T;
1819
- updatedAt?: T;
1820
- createdAt?: T;
1821
- }
1822
- /**
1823
- * This interface was referenced by `Config`'s JSON-Schema
1824
- * via the `definition` "product-categories_select".
1825
- */
1826
- interface ProductCategoriesSelect<T extends boolean = true> {
1827
- _order?: T;
1828
- tenant?: T;
1829
- title?: T;
1830
- generateSlug?: T;
1831
- slug?: T;
1832
- description?: T;
1833
- image?: T;
1834
- parent?: T;
1835
- updatedAt?: T;
1836
- createdAt?: T;
1837
- }
1838
- /**
1839
- * This interface was referenced by `Config`'s JSON-Schema
1840
- * via the `definition` "product-tags_select".
1841
- */
1842
- interface ProductTagsSelect<T extends boolean = true> {
1843
- _order?: T;
1844
- tenant?: T;
1845
- title?: T;
1846
- generateSlug?: T;
1847
- slug?: T;
1848
- description?: T;
1849
- updatedAt?: T;
1850
- createdAt?: T;
1851
- }
1852
- /**
1853
- * This interface was referenced by `Config`'s JSON-Schema
1854
- * via the `definition` "product-images_select".
1855
- */
1856
- interface ProductImagesSelect<T extends boolean = true> {
1857
- tenant?: T;
1858
- lqip?: T;
1859
- palette?: T | {
1860
- vibrant?: T;
1861
- muted?: T;
1862
- darkVibrant?: T;
1863
- darkMuted?: T;
1864
- lightVibrant?: T;
1865
- lightMuted?: T;
1866
- };
1867
- prefix?: T;
1868
- updatedAt?: T;
1869
- createdAt?: T;
1870
- url?: T;
1871
- thumbnailURL?: T;
1872
- filename?: T;
1873
- mimeType?: T;
1874
- filesize?: T;
1875
- width?: T;
1876
- height?: T;
1877
- focalX?: T;
1878
- focalY?: T;
1879
- sizes?: T | {
1880
- '512'?: T | {
1881
- url?: T;
1882
- width?: T;
1883
- height?: T;
1884
- mimeType?: T;
1885
- filesize?: T;
1886
- filename?: T;
1887
- };
1888
- '1024'?: T | {
1889
- url?: T;
1890
- width?: T;
1891
- height?: T;
1892
- mimeType?: T;
1893
- filesize?: T;
1894
- filename?: T;
1895
- };
1896
- };
1897
- }
1898
- /**
1899
- * This interface was referenced by `Config`'s JSON-Schema
1900
- * via the `definition` "brands_select".
1901
- */
1902
- interface BrandsSelect<T extends boolean = true> {
1903
- _order?: T;
1904
- tenant?: T;
1905
- name?: T;
1906
- generateSlug?: T;
1907
- slug?: T;
1908
- logo?: T;
1909
- logoDark?: T;
1910
- logomark?: T;
1911
- description?: T;
1912
- website?: T;
1913
- updatedAt?: T;
1914
- createdAt?: T;
1915
- }
1916
- /**
1917
- * This interface was referenced by `Config`'s JSON-Schema
1918
- * via the `definition` "brand-logos_select".
1919
- */
1920
- interface BrandLogosSelect<T extends boolean = true> {
1921
- alt?: T;
1922
- type?: T;
1923
- lqip?: T;
1924
- palette?: T | {
1925
- vibrant?: T;
1926
- muted?: T;
1927
- darkVibrant?: T;
1928
- darkMuted?: T;
1929
- lightVibrant?: T;
1930
- lightMuted?: T;
1931
- };
1932
- prefix?: T;
1933
- updatedAt?: T;
1934
- createdAt?: T;
1935
- url?: T;
1936
- thumbnailURL?: T;
1937
- filename?: T;
1938
- mimeType?: T;
1939
- filesize?: T;
1940
- width?: T;
1941
- height?: T;
1942
- focalX?: T;
1943
- focalY?: T;
1944
- }
1945
- /**
1946
- * This interface was referenced by `Config`'s JSON-Schema
1947
- * via the `definition` "orders_select".
1948
- */
1949
- interface OrdersSelect<T extends boolean = true> {
1950
- tenant?: T;
1951
- orderNumber?: T;
1952
- status?: T;
1953
- totalAmount?: T;
1954
- name?: T;
1955
- email?: T;
1956
- shippingCarrier?: T;
1957
- trackingNumber?: T;
1958
- notes?: T;
1959
- shippingAddress?: T | {
1960
- postalCode?: T;
1961
- address1?: T;
1962
- address2?: T;
1963
- deliveryMessage?: T;
1964
- recipientName?: T;
1965
- phone?: T;
1966
- };
1967
- products?: T;
1968
- transactions?: T;
1969
- returns?: T;
1970
- updatedAt?: T;
1971
- createdAt?: T;
1972
- }
1973
- /**
1974
- * This interface was referenced by `Config`'s JSON-Schema
1975
- * via the `definition` "order-products_select".
1976
- */
1977
- interface OrderProductsSelect<T extends boolean = true> {
1978
- tenant?: T;
1979
- order?: T;
1980
- product?: T;
1981
- variant?: T;
1982
- option?: T;
1983
- quantity?: T;
1984
- title?: T;
1985
- updatedAt?: T;
1986
- createdAt?: T;
1987
- }
1988
- /**
1989
- * This interface was referenced by `Config`'s JSON-Schema
1990
- * via the `definition` "returns_select".
1991
- */
1992
- interface ReturnsSelect<T extends boolean = true> {
1993
- tenant?: T;
1994
- order?: T;
1995
- status?: T;
1996
- reason?: T;
1997
- reasonDetail?: T;
1998
- returnProducts?: T | {
1999
- orderProduct?: T;
2000
- quantity?: T;
2001
- id?: T;
2002
- };
2003
- refundAmount?: T;
2004
- updatedAt?: T;
2005
- createdAt?: T;
2006
- }
2007
- /**
2008
- * This interface was referenced by `Config`'s JSON-Schema
2009
- * via the `definition` "return-products_select".
2010
- */
2011
- interface ReturnProductsSelect<T extends boolean = true> {
2012
- tenant?: T;
2013
- order?: T;
2014
- status?: T;
2015
- orderProduct?: T;
2016
- product?: T;
2017
- variant?: T;
2018
- option?: T;
2019
- quantity?: T;
2020
- title?: T;
2021
- updatedAt?: T;
2022
- createdAt?: T;
2023
- }
2024
- /**
2025
- * This interface was referenced by `Config`'s JSON-Schema
2026
- * via the `definition` "transactions_select".
2027
- */
2028
- interface TransactionsSelect<T extends boolean = true> {
2029
- tenant?: T;
2030
- status?: T;
2031
- order?: T;
2032
- paymentId?: T;
2033
- paymentMethod?: T;
2034
- receiptUrl?: T;
2035
- totalAmount?: T;
2036
- updatedAt?: T;
2037
- createdAt?: T;
2038
- }
2039
- /**
2040
- * This interface was referenced by `Config`'s JSON-Schema
2041
- * via the `definition` "documents_select".
2042
- */
2043
- interface DocumentsSelect<T extends boolean = true> {
2044
- _order?: T;
2045
- tenant?: T;
2046
- title?: T;
2047
- generateSlug?: T;
2048
- slug?: T;
2049
- type?: T;
2050
- version?: T;
2051
- effectiveDate?: T;
2052
- expiryDate?: T;
2053
- summary?: T;
2054
- content?: T;
2055
- category?: T;
2056
- tags?: T | {
2057
- tag?: T;
2058
- id?: T;
2059
- };
2060
- isRequired?: T;
2061
- changeLog?: T;
2062
- updatedAt?: T;
2063
- createdAt?: T;
2064
- _status?: T;
2065
- }
2066
- /**
2067
- * This interface was referenced by `Config`'s JSON-Schema
2068
- * via the `definition` "document-categories_select".
2069
- */
2070
- interface DocumentCategoriesSelect<T extends boolean = true> {
2071
- _order?: T;
2072
- tenant?: T;
2073
- title?: T;
2074
- generateSlug?: T;
2075
- slug?: T;
2076
- description?: T;
2077
- updatedAt?: T;
2078
- createdAt?: T;
2079
- }
2080
- /**
2081
- * This interface was referenced by `Config`'s JSON-Schema
2082
- * via the `definition` "document-images_select".
2083
- */
2084
- interface DocumentImagesSelect<T extends boolean = true> {
2085
- tenant?: T;
2086
- alt?: T;
2087
- lqip?: T;
2088
- palette?: T | {
2089
- vibrant?: T;
2090
- muted?: T;
2091
- darkVibrant?: T;
2092
- darkMuted?: T;
2093
- lightVibrant?: T;
2094
- lightMuted?: T;
2095
- };
2096
- prefix?: T;
2097
- updatedAt?: T;
2098
- createdAt?: T;
2099
- url?: T;
2100
- thumbnailURL?: T;
2101
- filename?: T;
2102
- mimeType?: T;
2103
- filesize?: T;
2104
- width?: T;
2105
- height?: T;
2106
- focalX?: T;
2107
- focalY?: T;
2108
- sizes?: T | {
2109
- '512'?: T | {
2110
- url?: T;
2111
- width?: T;
2112
- height?: T;
2113
- mimeType?: T;
2114
- filesize?: T;
2115
- filename?: T;
2116
- };
2117
- '1024'?: T | {
2118
- url?: T;
2119
- width?: T;
2120
- height?: T;
2121
- mimeType?: T;
2122
- filesize?: T;
2123
- filename?: T;
2124
- };
2125
- };
2126
- }
2127
- /**
2128
- * This interface was referenced by `Config`'s JSON-Schema
2129
- * via the `definition` "posts_select".
2130
- */
2131
- interface PostsSelect<T extends boolean = true> {
2132
- _order?: T;
2133
- tenant?: T;
2134
- thumbnail?: T;
2135
- title?: T;
2136
- subtitle?: T;
2137
- generateSlug?: T;
2138
- slug?: T;
2139
- categories?: T;
2140
- tags?: T;
2141
- content?: T;
2142
- updatedAt?: T;
2143
- createdAt?: T;
2144
- _status?: T;
2145
- }
2146
- /**
2147
- * This interface was referenced by `Config`'s JSON-Schema
2148
- * via the `definition` "post-categories_select".
2149
- */
2150
- interface PostCategoriesSelect<T extends boolean = true> {
2151
- _order?: T;
2152
- tenant?: T;
2153
- title?: T;
2154
- generateSlug?: T;
2155
- slug?: T;
2156
- description?: T;
2157
- parent?: T;
2158
- updatedAt?: T;
2159
- createdAt?: T;
2160
- }
2161
- /**
2162
- * This interface was referenced by `Config`'s JSON-Schema
2163
- * via the `definition` "post-tags_select".
2164
- */
2165
- interface PostTagsSelect<T extends boolean = true> {
2166
- _order?: T;
2167
- tenant?: T;
2168
- title?: T;
2169
- generateSlug?: T;
2170
- slug?: T;
2171
- description?: T;
2172
- updatedAt?: T;
2173
- createdAt?: T;
2174
- }
2175
- /**
2176
- * This interface was referenced by `Config`'s JSON-Schema
2177
- * via the `definition` "post-images_select".
2178
- */
2179
- interface PostImagesSelect<T extends boolean = true> {
2180
- tenant?: T;
2181
- alt?: T;
2182
- lqip?: T;
2183
- palette?: T | {
2184
- vibrant?: T;
2185
- muted?: T;
2186
- darkVibrant?: T;
2187
- darkMuted?: T;
2188
- lightVibrant?: T;
2189
- lightMuted?: T;
2190
- };
2191
- prefix?: T;
2192
- updatedAt?: T;
2193
- createdAt?: T;
2194
- url?: T;
2195
- thumbnailURL?: T;
2196
- filename?: T;
2197
- mimeType?: T;
2198
- filesize?: T;
2199
- width?: T;
2200
- height?: T;
2201
- focalX?: T;
2202
- focalY?: T;
2203
- sizes?: T | {
2204
- '512'?: T | {
2205
- url?: T;
2206
- width?: T;
2207
- height?: T;
2208
- mimeType?: T;
2209
- filesize?: T;
2210
- filename?: T;
2211
- };
2212
- '1024'?: T | {
2213
- url?: T;
2214
- width?: T;
2215
- height?: T;
2216
- mimeType?: T;
2217
- filesize?: T;
2218
- filename?: T;
2219
- };
2220
- };
2221
- }
2222
- /**
2223
- * This interface was referenced by `Config`'s JSON-Schema
2224
- * via the `definition` "playlists_select".
2225
- */
2226
- interface PlaylistsSelect<T extends boolean = true> {
2227
- tenant?: T;
2228
- image?: T;
2229
- title?: T;
2230
- generateSlug?: T;
2231
- slug?: T;
2232
- description?: T;
2233
- musics?: T;
2234
- updatedAt?: T;
2235
- createdAt?: T;
2236
- }
2237
- /**
2238
- * This interface was referenced by `Config`'s JSON-Schema
2239
- * via the `definition` "playlist-images_select".
2240
- */
2241
- interface PlaylistImagesSelect<T extends boolean = true> {
2242
- tenant?: T;
2243
- alt?: T;
2244
- lqip?: T;
2245
- palette?: T | {
2246
- vibrant?: T;
2247
- muted?: T;
2248
- darkVibrant?: T;
2249
- darkMuted?: T;
2250
- lightVibrant?: T;
2251
- lightMuted?: T;
2252
- };
2253
- prefix?: T;
2254
- updatedAt?: T;
2255
- createdAt?: T;
2256
- url?: T;
2257
- thumbnailURL?: T;
2258
- filename?: T;
2259
- mimeType?: T;
2260
- filesize?: T;
2261
- width?: T;
2262
- height?: T;
2263
- focalX?: T;
2264
- focalY?: T;
2265
- sizes?: T | {
2266
- '512'?: T | {
2267
- url?: T;
2268
- width?: T;
2269
- height?: T;
2270
- mimeType?: T;
2271
- filesize?: T;
2272
- filename?: T;
2273
- };
2274
- '1024'?: T | {
2275
- url?: T;
2276
- width?: T;
2277
- height?: T;
2278
- mimeType?: T;
2279
- filesize?: T;
2280
- filename?: T;
2281
- };
2282
- };
2283
- }
2284
- /**
2285
- * This interface was referenced by `Config`'s JSON-Schema
2286
- * via the `definition` "musics_select".
2287
- */
2288
- interface MusicsSelect<T extends boolean = true> {
2289
- _musics_musics_order?: T;
2290
- tenant?: T;
2291
- playlist?: T;
2292
- url?: T;
2293
- title?: T;
2294
- artist?: T;
2295
- isValid?: T;
2296
- updatedAt?: T;
2297
- createdAt?: T;
2298
- }
2299
- /**
2300
- * This interface was referenced by `Config`'s JSON-Schema
2301
- * via the `definition` "galleries_select".
2302
- */
2303
- interface GalleriesSelect<T extends boolean = true> {
2304
- _order?: T;
2305
- tenant?: T;
2306
- thumbnail?: T;
2307
- title?: T;
2308
- generateSlug?: T;
2309
- slug?: T;
2310
- description?: T;
2311
- images?: T;
2312
- updatedAt?: T;
2313
- createdAt?: T;
2314
- }
2315
- /**
2316
- * This interface was referenced by `Config`'s JSON-Schema
2317
- * via the `definition` "gallery-images_select".
2318
- */
2319
- interface GalleryImagesSelect<T extends boolean = true> {
2320
- tenant?: T;
2321
- lqip?: T;
2322
- palette?: T | {
2323
- vibrant?: T;
2324
- muted?: T;
2325
- darkVibrant?: T;
2326
- darkMuted?: T;
2327
- lightVibrant?: T;
2328
- lightMuted?: T;
2329
- };
2330
- prefix?: T;
2331
- updatedAt?: T;
2332
- createdAt?: T;
2333
- url?: T;
2334
- thumbnailURL?: T;
2335
- filename?: T;
2336
- mimeType?: T;
2337
- filesize?: T;
2338
- width?: T;
2339
- height?: T;
2340
- focalX?: T;
2341
- focalY?: T;
2342
- sizes?: T | {
2343
- '512'?: T | {
2344
- url?: T;
2345
- width?: T;
2346
- height?: T;
2347
- mimeType?: T;
2348
- filesize?: T;
2349
- filename?: T;
2350
- };
2351
- '1024'?: T | {
2352
- url?: T;
2353
- width?: T;
2354
- height?: T;
2355
- mimeType?: T;
2356
- filesize?: T;
2357
- filename?: T;
2358
- };
2359
- };
2360
- }
2361
- /**
2362
- * This interface was referenced by `Config`'s JSON-Schema
2363
- * via the `definition` "forms_select".
2364
- */
2365
- interface FormsSelect<T extends boolean = true> {
2366
- title?: T;
2367
- description?: T;
2368
- fields?: T | {
2369
- checkbox?: T | {
2370
- name?: T;
2371
- label?: T;
2372
- width?: T;
2373
- required?: T;
2374
- defaultValue?: T;
2375
- id?: T;
2376
- blockName?: T;
2377
- };
2378
- country?: T | {
2379
- name?: T;
2380
- label?: T;
2381
- width?: T;
2382
- required?: T;
2383
- id?: T;
2384
- blockName?: T;
2385
- };
2386
- email?: T | {
2387
- name?: T;
2388
- label?: T;
2389
- width?: T;
2390
- required?: T;
2391
- id?: T;
2392
- blockName?: T;
2393
- };
2394
- message?: T | {
2395
- message?: T;
2396
- id?: T;
2397
- blockName?: T;
2398
- };
2399
- number?: T | {
2400
- name?: T;
2401
- label?: T;
2402
- width?: T;
2403
- defaultValue?: T;
2404
- required?: T;
2405
- id?: T;
2406
- blockName?: T;
2407
- };
2408
- select?: T | {
2409
- name?: T;
2410
- label?: T;
2411
- width?: T;
2412
- defaultValue?: T;
2413
- placeholder?: T;
2414
- options?: T | {
2415
- label?: T;
2416
- value?: T;
2417
- id?: T;
2418
- };
2419
- required?: T;
2420
- id?: T;
2421
- blockName?: T;
2422
- };
2423
- state?: T | {
2424
- name?: T;
2425
- label?: T;
2426
- width?: T;
2427
- required?: T;
2428
- id?: T;
2429
- blockName?: T;
2430
- };
2431
- text?: T | {
2432
- name?: T;
2433
- label?: T;
2434
- width?: T;
2435
- defaultValue?: T;
2436
- required?: T;
2437
- placeholder?: T;
2438
- id?: T;
2439
- blockName?: T;
2440
- };
2441
- textarea?: T | {
2442
- name?: T;
2443
- label?: T;
2444
- width?: T;
2445
- defaultValue?: T;
2446
- required?: T;
2447
- id?: T;
2448
- blockName?: T;
2449
- };
2450
- };
2451
- submitButtonLabel?: T;
2452
- confirmationType?: T;
2453
- confirmationMessage?: T;
2454
- redirect?: T | {
2455
- url?: T;
2456
- };
2457
- emails?: T | {
2458
- emailTo?: T;
2459
- cc?: T;
2460
- bcc?: T;
2461
- replyTo?: T;
2462
- emailFrom?: T;
2463
- subject?: T;
2464
- message?: T;
2465
- id?: T;
2466
- };
2467
- updatedAt?: T;
2468
- createdAt?: T;
2469
- }
2470
- /**
2471
- * This interface was referenced by `Config`'s JSON-Schema
2472
- * via the `definition` "form-submissions_select".
2473
- */
2474
- interface FormSubmissionsSelect<T extends boolean = true> {
2475
- form?: T;
2476
- submissionData?: T | {
2477
- field?: T;
2478
- value?: T;
2479
- id?: T;
2480
- };
2481
- updatedAt?: T;
2482
- createdAt?: T;
2483
- }
2484
- /**
2485
- * This interface was referenced by `Config`'s JSON-Schema
2486
- * via the `definition` "payload-kv_select".
2487
- */
2488
- interface PayloadKvSelect<T extends boolean = true> {
2489
- key?: T;
2490
- data?: T;
2491
- }
2492
- /**
2493
- * This interface was referenced by `Config`'s JSON-Schema
2494
- * via the `definition` "payload-locked-documents_select".
2495
- */
2496
- interface PayloadLockedDocumentsSelect<T extends boolean = true> {
2497
- document?: T;
2498
- globalSlug?: T;
2499
- user?: T;
2500
- updatedAt?: T;
2501
- createdAt?: T;
2502
- }
2503
- /**
2504
- * This interface was referenced by `Config`'s JSON-Schema
2505
- * via the `definition` "payload-preferences_select".
2506
- */
2507
- interface PayloadPreferencesSelect<T extends boolean = true> {
2508
- user?: T;
2509
- key?: T;
2510
- value?: T;
2511
- updatedAt?: T;
2512
- createdAt?: T;
2513
- }
2514
- /**
2515
- * This interface was referenced by `Config`'s JSON-Schema
2516
- * via the `definition` "payload-migrations_select".
2517
- */
2518
- interface PayloadMigrationsSelect<T extends boolean = true> {
2519
- name?: T;
2520
- batch?: T;
2521
- updatedAt?: T;
2522
- createdAt?: T;
2523
- }
2524
- /**
2525
- * This interface was referenced by `Config`'s JSON-Schema
2526
- * via the `definition` "auth".
2527
- */
2528
- interface Auth {
2529
- [k: string]: unknown;
2530
- }
2531
- declare module 'payload' {
2532
- interface GeneratedTypes extends Config {
2533
- }
2534
- }
2535
-
2536
- declare class SDKError extends Error {
2537
- readonly code: string;
2538
- readonly status?: number;
2539
- readonly details?: unknown;
2540
- readonly userMessage?: string;
2541
- readonly suggestion?: string;
2542
- constructor(code: string, message: string, status?: number, details?: unknown, userMessage?: string, suggestion?: string);
2543
- getUserMessage(): string;
2544
- toJSON(): {
2545
- name: string;
2546
- code: string;
2547
- message: string;
2548
- status: number | undefined;
2549
- details: unknown;
2550
- userMessage: string | undefined;
2551
- suggestion: string | undefined;
2552
- };
2553
- }
2554
- declare class NetworkError extends SDKError {
2555
- constructor(message: string, status?: number, details?: unknown, userMessage?: string, suggestion?: string);
2556
- }
2557
- declare class ValidationError extends SDKError {
2558
- constructor(message: string, details?: unknown, userMessage?: string, suggestion?: string);
2559
- }
2560
- declare class ApiError extends SDKError {
2561
- constructor(message: string, status: number, details?: unknown, userMessage?: string, suggestion?: string);
2562
- }
2563
- declare class ConfigError extends SDKError {
2564
- constructor(message: string, details?: unknown, userMessage?: string, suggestion?: string);
2565
- }
2566
- declare class TimeoutError extends SDKError {
2567
- constructor(message?: string, details?: unknown, userMessage?: string, suggestion?: string);
2568
- }
2569
- declare function isSDKError(error: unknown): error is SDKError;
2570
- declare function isNetworkError(error: unknown): error is NetworkError;
2571
- declare function isValidationError(error: unknown): error is ValidationError;
2572
- declare function isApiError(error: unknown): error is ApiError;
2573
- declare function isConfigError(error: unknown): error is ConfigError;
2574
- declare function isTimeoutError(error: unknown): error is TimeoutError;
2575
-
2576
- /**
2577
- * Collection type derived from Payload Config.
2578
- * This ensures type safety and automatic synchronization with payload-types.ts
2579
- */
2580
- type Collection = keyof Config['collections'];
2581
- /**
2582
- * Internal Payload collections that should not be exposed via SDK.
2583
- */
2584
- declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations"];
2585
- type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
2586
- /**
2587
- * Public collections available for SDK access.
2588
- * Excludes internal Payload system collections.
2589
- */
2590
- type PublicCollection = Exclude<Collection, InternalCollection>;
2591
- /**
2592
- * Array of all public collection names for runtime use (e.g., Zod enum validation).
2593
- * This is derived from Config to ensure type safety.
2594
- */
2595
- declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "tenant-og-images", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-images", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "transactions", "documents", "document-categories", "document-images", "posts", "post-categories", "post-tags", "post-images", "playlists", "playlist-images", "musics", "galleries", "gallery-images", "forms", "form-submissions", "media"];
2596
-
2597
- type Environment = 'local' | 'development' | 'staging' | 'production';
2598
- declare const API_URLS: Record<Environment, string>;
2599
- /**
2600
- * 환경에 맞는 API URL을 반환합니다.
2601
- * 우선순위: baseUrl > environment > 환경변수 > 기본값(production)
2602
- */
2603
- declare function resolveApiUrl(config?: {
2604
- baseUrl?: string;
2605
- environment?: Environment;
2606
- }): string;
2607
- interface ClientBrowserConfig {
2608
- clientKey: string;
2609
- /**
2610
- * API 환경 설정.
2611
- * - 'local': localhost:3000
2612
- * - 'development': dev.01.software
2613
- * - 'staging': stg.01.software
2614
- * - 'production': api.01.software
2615
- *
2616
- * baseUrl이 설정되면 이 값은 무시됩니다.
2617
- * @default 'production'
2618
- */
2619
- environment?: Environment;
2620
- /**
2621
- * 커스텀 API URL. 설정 시 environment 값은 무시됩니다.
2622
- * @example 'https://my-custom-api.example.com'
2623
- */
2624
- baseUrl?: string;
2625
- }
2626
- interface ClientServerConfig extends ClientBrowserConfig {
2627
- secretKey: string;
2628
- }
2629
- interface ClientMetadata {
2630
- userAgent?: string;
2631
- timestamp: number;
2632
- }
2633
- interface ClientState {
2634
- metadata: ClientMetadata;
2635
- }
2636
- interface PaginationMeta {
2637
- page: number;
2638
- limit: number;
2639
- totalDocs: number;
2640
- totalPages: number;
2641
- hasNextPage: boolean;
2642
- hasPrevPage: boolean;
2643
- pagingCounter: number;
2644
- prevPage: number | null;
2645
- nextPage: number | null;
2646
- }
2647
- /**
2648
- * Payload CMS Find (List) Response
2649
- * GET /api/{collection}
2650
- */
2651
- interface PayloadFindResponse<T = unknown> {
2652
- docs: T[];
2653
- totalDocs: number;
2654
- limit: number;
2655
- totalPages: number;
2656
- page: number;
2657
- pagingCounter: number;
2658
- hasPrevPage: boolean;
2659
- hasNextPage: boolean;
2660
- prevPage: number | null;
2661
- nextPage: number | null;
2662
- }
2663
- /**
2664
- * Payload CMS Create/Update Response
2665
- * POST /api/{collection}
2666
- * PATCH /api/{collection}/{id}
2667
- */
2668
- interface PayloadMutationResponse<T = unknown> {
2669
- message: string;
2670
- doc: T;
2671
- errors?: unknown[];
2672
- }
2673
- interface ApiQueryOptions {
2674
- page?: number;
2675
- limit?: number;
2676
- sort?: Sort;
2677
- where?: Where;
2678
- }
2679
- interface ApiQueryReactOptions {
2680
- keepPreviousData?: boolean;
2681
- }
2682
- interface DebugConfig {
2683
- logRequests?: boolean;
2684
- logResponses?: boolean;
2685
- logErrors?: boolean;
2686
- }
2687
- interface RetryConfig {
2688
- maxRetries?: number;
2689
- retryableStatuses?: number[];
2690
- retryDelay?: (attempt: number) => number;
2691
- }
2692
- interface ErrorLogger {
2693
- log(error: SDKError | Error, context?: Record<string, unknown>): void;
2694
- }
2695
- type DeepPartial<T> = {
2696
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
2697
- };
2698
- type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
2699
-
2700
- type CollectionType<T extends Collection> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
2701
-
2702
- interface FetchOptions extends RequestInit {
2703
- clientKey?: string;
2704
- secretKey?: string;
2705
- timeout?: number;
2706
- baseUrl?: string;
2707
- debug?: boolean | DebugConfig;
2708
- retry?: RetryConfig;
2709
- }
2710
- interface JwtPayload {
2711
- clientKey: string;
2712
- iat?: number;
2713
- exp?: number;
2714
- }
2715
- /**
2716
- * Creates a JWT token for server-side authentication.
2717
- * The token is valid for 1 hour by default.
2718
- *
2719
- * @param clientKey - Client API key
2720
- * @param secretKey - Secret key used for signing
2721
- * @param expiresIn - Token expiration time (default: '1h')
2722
- * @returns Promise<string> JWT token
2723
- *
2724
- * @example
2725
- * ```typescript
2726
- * const token = await createServerToken('client-key', 'secret-key')
2727
- * // Use in Authorization header: `Bearer ${token}`
2728
- * ```
2729
- */
2730
- declare function createServerToken(clientKey: string, secretKey: string, expiresIn?: string): Promise<string>;
2731
- /**
2732
- * Verifies a JWT token and returns the payload.
2733
- *
2734
- * @param token - JWT token to verify
2735
- * @param secretKey - Secret key used for verification
2736
- * @returns Promise<JwtPayload> Verified payload containing clientKey
2737
- * @throws Error if token is invalid or expired
2738
- *
2739
- * @example
2740
- * ```typescript
2741
- * const payload = await verifyServerToken(token, 'secret-key')
2742
- * console.log(payload.clientKey)
2743
- * ```
2744
- */
2745
- declare function verifyServerToken(token: string, secretKey: string): Promise<JwtPayload>;
2746
- /**
2747
- * Decodes a JWT token without verification.
2748
- * WARNING: Use this only when you need to inspect token contents.
2749
- * Always use verifyServerToken for authentication.
2750
- *
2751
- * @param token - JWT token to decode
2752
- * @returns JwtPayload Decoded payload (unverified)
2753
- *
2754
- * @example
2755
- * ```typescript
2756
- * const payload = decodeServerToken(token)
2757
- * console.log(payload.clientKey) // Unverified!
2758
- * ```
2759
- */
2760
- declare function decodeServerToken(token: string): JwtPayload;
2761
- /**
2762
- * Creates a Base64-encoded API key from clientKey and secretKey.
2763
- * Use this for MCP server authentication.
2764
- *
2765
- * @param clientKey - Client API key
2766
- * @param secretKey - Secret key
2767
- * @returns Base64-encoded API key
2768
- *
2769
- * @example
2770
- * ```typescript
2771
- * const apiKey = createApiKey('client-key', 'secret-key')
2772
- * // Use in x-api-key header
2773
- * ```
2774
- */
2775
- declare function createApiKey(clientKey: string, secretKey: string): string;
2776
- /**
2777
- * Parses a Base64-encoded API key to extract clientKey and secretKey.
2778
- *
2779
- * @param apiKey - Base64-encoded API key
2780
- * @returns Object containing clientKey and secretKey
2781
- * @throws Error if API key is invalid
2782
- *
2783
- * @example
2784
- * ```typescript
2785
- * const { clientKey, secretKey } = parseApiKey(apiKey)
2786
- * ```
2787
- */
2788
- declare function parseApiKey(apiKey: string): {
2789
- clientKey: string;
2790
- secretKey: string;
2791
- };
2792
-
2793
- declare class BaseApiClient {
16
+ declare class HttpClient {
2794
17
  protected clientKey: string;
2795
18
  protected secretKey?: string;
2796
19
  protected baseUrl?: string;
2797
20
  protected defaultOptions: FetchOptions;
2798
21
  constructor(clientKey: string, secretKey?: string, baseUrl?: string);
2799
22
  protected buildUrl(endpoint: string, options?: ApiQueryOptions): string;
23
+ protected assertJsonResponse(response: Response): void;
2800
24
  /**
2801
25
  * Parse Payload CMS find response (list query)
2802
26
  * Returns native Payload response structure
@@ -2814,7 +38,7 @@ declare class BaseApiClient {
2814
38
  protected parseDocumentResponse<T>(response: Response): Promise<T>;
2815
39
  }
2816
40
 
2817
- declare class CollectionsApi extends BaseApiClient {
41
+ declare class CollectionClient extends HttpClient {
2818
42
  constructor(clientKey: string, secretKey?: string, baseUrl?: string);
2819
43
  from<T extends Collection>(collection: T): CollectionQueryBuilder<T>;
2820
44
  /**
@@ -2866,10 +90,15 @@ declare class CollectionsApi extends BaseApiClient {
2866
90
  }): Promise<PayloadFindResponse<T>>;
2867
91
  }
2868
92
 
93
+ /**
94
+ * Read-only subset of CollectionQueryBuilder.
95
+ * BrowserClient.from() returns this type to prevent write operations at compile time.
96
+ */
97
+ type ReadOnlyQueryBuilder<T extends Collection> = Pick<CollectionQueryBuilder<T>, 'find' | 'findById' | 'count'>;
2869
98
  declare class CollectionQueryBuilder<T extends Collection> {
2870
99
  private api;
2871
100
  private collection;
2872
- constructor(api: CollectionsApi, collection: T);
101
+ constructor(api: CollectionClient, collection: T);
2873
102
  /**
2874
103
  * Find documents (list query)
2875
104
  * GET /api/{collection}
@@ -2922,10 +151,6 @@ declare class CollectionQueryBuilder<T extends Collection> {
2922
151
  removeMany(where: ApiQueryOptions['where']): Promise<PayloadFindResponse<CollectionType<T>>>;
2923
152
  }
2924
153
 
2925
- interface UnifiedQueryOptions {
2926
- clientKey?: string;
2927
- baseUrl?: string;
2928
- }
2929
154
  declare function collectionKeys<T extends Collection>(collection: T): {
2930
155
  all: readonly [T];
2931
156
  lists: () => readonly [T, "list"];
@@ -2949,10 +174,10 @@ interface CollectionInfiniteQueryParams<T extends Collection> {
2949
174
  options?: Omit<ApiQueryOptions, 'page'>;
2950
175
  pageSize?: number;
2951
176
  }
2952
- declare class UnifiedQueryClient {
177
+ declare class QueryHooks {
2953
178
  private queryClient;
2954
- private collectionsApi;
2955
- constructor(queryClient: QueryClient, options?: UnifiedQueryOptions);
179
+ private collectionClient;
180
+ constructor(queryClient: QueryClient, collectionClient: CollectionClient);
2956
181
  useQuery<T extends Collection>(params: CollectionQueryParams<T>, options?: {
2957
182
  enabled?: boolean;
2958
183
  staleTime?: number;
@@ -3012,6 +237,30 @@ declare class UnifiedQueryClient {
3012
237
  pages?: number;
3013
238
  staleTime?: number;
3014
239
  }): Promise<void>;
240
+ useCreate<T extends Collection>(params: {
241
+ collection: T;
242
+ }, options?: {
243
+ onSuccess?: (data: PayloadMutationResponse<CollectionType<T>>) => void;
244
+ onError?: (error: Error) => void;
245
+ onSettled?: () => void;
246
+ }): _tanstack_react_query.UseMutationResult<PayloadMutationResponse<CollectionType<T>>, Error, Partial<CollectionType<T>>, unknown>;
247
+ useUpdate<T extends Collection>(params: {
248
+ collection: T;
249
+ }, options?: {
250
+ onSuccess?: (data: PayloadMutationResponse<CollectionType<T>>) => void;
251
+ onError?: (error: Error) => void;
252
+ onSettled?: () => void;
253
+ }): _tanstack_react_query.UseMutationResult<PayloadMutationResponse<CollectionType<T>>, Error, {
254
+ id: string | number;
255
+ data: Partial<CollectionType<T>>;
256
+ }, unknown>;
257
+ useRemove<T extends Collection>(params: {
258
+ collection: T;
259
+ }, options?: {
260
+ onSuccess?: (data: CollectionType<T>) => void;
261
+ onError?: (error: Error) => void;
262
+ onSettled?: () => void;
263
+ }): _tanstack_react_query.UseMutationResult<CollectionType<T>, Error, string | number, unknown>;
3015
264
  invalidateQueries<T extends Collection>(collection: T, type?: 'list' | 'detail' | 'infinite'): Promise<void>;
3016
265
  getQueryData<T extends Collection>(collection: T, type: 'list', options?: ApiQueryOptions): CollectionType<T>[] | undefined;
3017
266
  getQueryData<T extends Collection>(collection: T, type: 'detail', id: string | number, options?: ApiQueryOptions): CollectionType<T> | null | undefined;
@@ -3019,20 +268,20 @@ declare class UnifiedQueryClient {
3019
268
  setQueryData<T extends Collection>(collection: T, type: 'detail', id: string | number, data: CollectionType<T> | null, options?: ApiQueryOptions): void;
3020
269
  }
3021
270
 
3022
- declare class BrowserClient<_Database = Config> {
3023
- query: UnifiedQueryClient;
3024
- collections: CollectionsApi;
271
+ declare class BrowserClient {
272
+ query: QueryHooks;
273
+ collections: CollectionClient;
3025
274
  queryClient: QueryClient;
3026
275
  protected state: ClientState;
3027
276
  protected config: ClientBrowserConfig;
3028
277
  protected baseUrl: string;
3029
278
  constructor(options: ClientBrowserConfig);
3030
- from<T extends Collection>(collection: T): CollectionQueryBuilder<T>;
279
+ from<T extends Collection>(collection: T): ReadOnlyQueryBuilder<T>;
3031
280
  getState(): ClientState;
3032
281
  }
3033
282
  declare function createBrowserClient(options: ClientBrowserConfig): BrowserClient;
3034
283
 
3035
- interface ApiClientOptions {
284
+ interface OrderApiOptions {
3036
285
  clientKey: string;
3037
286
  secretKey: string;
3038
287
  baseUrl?: string;
@@ -3055,20 +304,22 @@ type UpdateTransactionParams = {
3055
304
  paymentMethod: Transaction['paymentMethod'];
3056
305
  receiptUrl: Transaction['receiptUrl'];
3057
306
  };
3058
- declare class ApiClient {
307
+ declare class OrderApi {
3059
308
  private readonly clientKey;
3060
309
  private readonly secretKey;
3061
310
  private readonly baseUrl?;
3062
- constructor(options: ApiClientOptions);
311
+ constructor(options: OrderApiOptions);
3063
312
  private request;
3064
313
  createOrder(params: CreateOrderParams): Promise<Order>;
3065
314
  updateOrder(params: UpdateOrderParams): Promise<Order>;
3066
315
  updateTransaction(params: UpdateTransactionParams): Promise<Transaction>;
3067
316
  }
3068
317
 
3069
- declare class ServerClient<_Database = Config> {
3070
- api: ApiClient;
3071
- collections: CollectionsApi;
318
+ declare class ServerClient {
319
+ api: OrderApi;
320
+ query: QueryHooks;
321
+ collections: CollectionClient;
322
+ queryClient: QueryClient;
3072
323
  protected state: ClientState;
3073
324
  protected config: ClientServerConfig;
3074
325
  protected baseUrl: string;
@@ -3081,43 +332,21 @@ declare function createServerClient(options: ClientServerConfig): ServerClient;
3081
332
 
3082
333
  declare function getQueryClient(): QueryClient;
3083
334
 
3084
- type WebhookOperation = 'create' | 'update';
3085
- interface WebhookEvent<T extends Collection = Collection> {
3086
- collection: T;
3087
- operation: WebhookOperation;
3088
- data: CollectionType<T>;
3089
- }
3090
- type WebhookHandler<T extends Collection = Collection> = (event: WebhookEvent<T>) => Promise<void> | void;
3091
- declare function isValidWebhookEvent(data: unknown): data is WebhookEvent;
3092
- declare function handleWebhook<T extends Collection = Collection>(request: Request, handler: WebhookHandler<T>): Promise<Response>;
3093
- declare function createTypedWebhookHandler<T extends Collection>(collection: T, handler: (event: WebhookEvent<T>) => Promise<void> | void): WebhookHandler<T>;
3094
-
3095
335
  declare const generateOrderNumber: () => string;
3096
336
 
3097
337
  declare const formatOrderName: (options: ProductOption[]) => string;
3098
338
 
3099
- declare const objectFor: <T>(data: T | number | null | undefined) => T | null | undefined;
3100
-
3101
- type RichTextData = SerializedEditorState<SerializedLexicalNode>;
3102
- interface RichTextContentProps {
3103
- data: RichTextData;
3104
- className?: string;
3105
- internalDocToHref?: (args: {
3106
- linkNode: SerializedLinkNode;
3107
- }) => string;
3108
- blocks?: {
3109
- Iframe?: JSXConverter<SerializedBlockNode<{
3110
- blockName?: string | null;
3111
- blockType: string;
3112
- url: string;
3113
- }>>;
3114
- Player?: JSXConverter<SerializedBlockNode<{
3115
- blockName?: string | null;
3116
- blockType: string;
3117
- url: string;
3118
- }>>;
3119
- };
3120
- }
3121
- declare function RichTextContent({ data, className, internalDocToHref, blocks, }: RichTextContentProps): React.JSX.Element;
339
+ /**
340
+ * Resolves a Payload CMS relation field value.
341
+ * When depth is 0, relation fields return just the ID (number).
342
+ * When depth > 0, they return the full document object (T).
343
+ * This utility normalizes both cases to T | null.
344
+ *
345
+ * @param ref - The relation field value (T, number, null, or undefined)
346
+ * @returns The resolved document object, or null if not populated
347
+ */
348
+ declare const resolveRelation: <T>(ref: T | number | null | undefined) => T | null;
349
+ /** @deprecated Use `resolveRelation` instead */
350
+ declare const objectFor: <T>(ref: T | number | null | undefined) => T | null;
3122
351
 
3123
- export { API_URLS, ApiClient, type ApiClientOptions, ApiError, type ApiQueryOptions, type ApiQueryReactOptions, type Auth, type Brand, type BrandLogo, type BrandLogosSelect, type BrandsSelect, BrowserClient, BrowserClient as BrowserClientType, COLLECTIONS, type ClientBrowserConfig, type ClientMetadata, type ClientServerConfig, type ClientState, type Collection, type CollectionDetailQueryParams, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, type CollectionType, CollectionsApi, type Config, ConfigError, type CreateOrderParams, type DebugConfig, type DeepPartial, type Document, type DocumentCategoriesSelect, type DocumentCategory, type DocumentImage, type DocumentImagesSelect, type DocumentsSelect, type Environment, type ErrorLogger, type ExtractArrayType, type Form, type FormSubmission, type FormSubmissionsSelect, type FormsSelect, type GalleriesSelect, type Gallery, type GalleryImage, type GalleryImagesSelect, type IframeBlock, type JwtPayload, type Media, type MediaSelect, type Music, type MusicsSelect, NetworkError, type Order, type OrderProduct, type OrderProductsSelect, type OrdersSelect, type PaginationMeta, type PayloadFindResponse, type PayloadKv, type PayloadKvSelect, type PayloadLockedDocument, type PayloadLockedDocumentsSelect, type PayloadMigration, type PayloadMigrationsSelect, type PayloadMutationResponse, type PayloadPreference, type PayloadPreferencesSelect, type PlayerBlock, type Playlist, type PlaylistImage, type PlaylistImagesSelect, type PlaylistsSelect, type Post, type PostCategoriesSelect, type PostCategory, type PostImage, type PostImagesSelect, type PostTag, type PostTagsSelect, type PostsSelect, type Product, type ProductCategoriesSelect, type ProductCategory, type ProductImage, type ProductImagesSelect, type ProductOption, type ProductOptionsSelect, type ProductTag, type ProductTagsSelect, type ProductVariant, type ProductVariantsSelect, type ProductsSelect, type PublicCollection, type RetryConfig, type Return, type ReturnProduct, type ReturnProductsSelect, type ReturnsSelect, RichTextContent, type RichTextContentProps, type RichTextData, SDKError, ServerClient, ServerClient as ServerClientType, type SupportedTimezones, type Tenant, type TenantLogo, type TenantLogosSelect, type TenantMetadataSelect, type TenantMetadatum, type TenantOgImage, type TenantOgImagesSelect, type TenantsSelect, TimeoutError, type Transaction, type TransactionsSelect, UnifiedQueryClient, type UnifiedQueryOptions, type UpdateOrderParams, type UpdateTransactionParams, type User, type UserAuthOperations, type UsersSelect, ValidationError, type WebhookEvent, type WebhookHandler, type WebhookOperation, collectionKeys, createApiKey, createBrowserClient, createServerClient, createServerToken, createTypedWebhookHandler, decodeServerToken, formatOrderName, generateOrderNumber, getQueryClient, handleWebhook, isApiError, isConfigError, isNetworkError, isSDKError, isTimeoutError, isValidWebhookEvent, isValidationError, objectFor, parseApiKey, resolveApiUrl, verifyServerToken };
352
+ export { ApiQueryOptions, BrowserClient, BrowserClient as BrowserClientType, ClientBrowserConfig, ClientServerConfig, ClientState, Collection, CollectionClient, type CollectionDetailQueryParams, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, CollectionType, type CreateOrderParams, Order, OrderApi, type OrderApiOptions, OrderProduct, PayloadFindResponse, PayloadMutationResponse, ProductOption, QueryHooks, type ReadOnlyQueryBuilder, ServerClient, ServerClient as ServerClientType, Transaction, type UpdateOrderParams, type UpdateTransactionParams, collectionKeys, createBrowserClient, createServerClient, formatOrderName, generateOrderNumber, getQueryClient, objectFor, resolveRelation };