@01.software/sdk 0.1.0-dev.260210.4ecca43 → 0.1.1

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