@01.software/sdk 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +16 -18
  2. package/dist/{const-dv0zuAxG.d.cts → const-DZ04SC2y.d.cts} +1 -1
  3. package/dist/{const-CCh99Gxu.d.ts → const-hXu9oG66.d.ts} +1 -1
  4. package/dist/index.cjs +48 -164
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +21 -33
  7. package/dist/index.d.ts +21 -33
  8. package/dist/index.js +48 -164
  9. package/dist/index.js.map +1 -1
  10. package/dist/{payload-types-FfZ2Zxp1.d.cts → payload-types-DICC2-Zr.d.cts} +120 -25
  11. package/dist/{payload-types-FfZ2Zxp1.d.ts → payload-types-DICC2-Zr.d.ts} +120 -25
  12. package/dist/{realtime-DupPIYx-.d.cts → realtime-D7HtUpqt.d.cts} +2 -2
  13. package/dist/{realtime-DupPIYx-.d.ts → realtime-D7HtUpqt.d.ts} +2 -2
  14. package/dist/realtime.cjs +8 -7
  15. package/dist/realtime.cjs.map +1 -1
  16. package/dist/realtime.d.cts +6 -6
  17. package/dist/realtime.d.ts +6 -6
  18. package/dist/realtime.js +8 -7
  19. package/dist/realtime.js.map +1 -1
  20. package/dist/{server-DxhuG-_s.d.cts → server-JR9TvKZ5.d.cts} +0 -2
  21. package/dist/{server-DxhuG-_s.d.ts → server-JR9TvKZ5.d.ts} +0 -2
  22. package/dist/ui/canvas/server.cjs +1 -2
  23. package/dist/ui/canvas/server.cjs.map +1 -1
  24. package/dist/ui/canvas/server.d.cts +1 -1
  25. package/dist/ui/canvas/server.d.ts +1 -1
  26. package/dist/ui/canvas/server.js +1 -2
  27. package/dist/ui/canvas/server.js.map +1 -1
  28. package/dist/ui/canvas.cjs +1 -2
  29. package/dist/ui/canvas.cjs.map +1 -1
  30. package/dist/ui/canvas.d.cts +2 -2
  31. package/dist/ui/canvas.d.ts +2 -2
  32. package/dist/ui/canvas.js +1 -2
  33. package/dist/ui/canvas.js.map +1 -1
  34. package/dist/ui/form.d.cts +1 -1
  35. package/dist/ui/form.d.ts +1 -1
  36. package/dist/ui/video.d.cts +1 -1
  37. package/dist/ui/video.d.ts +1 -1
  38. package/dist/{webhook-B9MDrH22.d.ts → webhook-BD9ivfyR.d.ts} +2 -2
  39. package/dist/{webhook-t7JGFLKQ.d.cts → webhook-D8ogsafv.d.cts} +2 -2
  40. package/dist/webhook.d.cts +3 -3
  41. package/dist/webhook.d.ts +3 -3
  42. package/package.json +3 -13
  43. package/dist/auth.cjs +0 -109
  44. package/dist/auth.cjs.map +0 -1
  45. package/dist/auth.d.cts +0 -36
  46. package/dist/auth.d.ts +0 -36
  47. package/dist/auth.js +0 -86
  48. package/dist/auth.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,17 +1,16 @@
1
- import { O as Order, a as OrderItem$1, T as Transaction, b as Fulfillment, R as Return, c as Cart, d as CartItem, P as Product } from './payload-types-FfZ2Zxp1.cjs';
2
- export { n as ApiUsage, aE as ApiUsageSelect, A as Audience, aA as AudiencesSelect, bM as Auth, p as BillingHistory, aG as BillingHistorySelect, ao as Bookmark, bB as BookmarksSelect, y as Brand, B as BrandLogo, aQ as BrandLogosSelect, aP as BrandsSelect, br as CanvasCategoriesSelect, af as CanvasCategory, ai as CanvasEdgeType, bq as CanvasEdgeTypesSelect, ah as CanvasNodeType, bp as CanvasNodeTypesSelect, ag as CanvasTag, bs as CanvasTagsSelect, ae as Canvase, bo as CanvasesSelect, b2 as CartItemsSelect, b1 as CartsSelect, g as CodeBlock, bL as CollectionsWidget, al as Comment, by as CommentsSelect, aq as CommunityBan, bE as CommunityBansSelect, C as Config, G as Customer, J as CustomerAddress, a$ as CustomerAddressesSelect, e as CustomerAuthOperations, H as CustomerGroup, b0 as CustomerGroupsSelect, a_ as CustomersSelect, Q as Discount, b3 as DiscountsSelect, _ as Document, b9 as DocumentCategoriesSelect, a0 as DocumentCategory, $ as DocumentType, ba as DocumentTypesSelect, b8 as DocumentsSelect, E as EmailLog, aB as EmailLogsSelect, k as FieldConfig, ax as FieldConfigsSelect, F as Form, ar as FormSubmission, bG as FormSubmissionsSelect, bF as FormsSelect, K as FulfillmentItem, aW as FulfillmentItemsSelect, aV as FulfillmentsSelect, bh as GalleriesSelect, a7 as Gallery, bi as GalleryCategoriesSelect, a8 as GalleryCategory, aa as GalleryItem, bk as GalleryItemsSelect, a9 as GalleryTag, bj as GalleryTagsSelect, I as IframeBlock, j as Image, ay as ImagesSelect, ab as Link, bm as LinkCategoriesSelect, ac as LinkCategory, ad as LinkTag, bn as LinkTagsSelect, bl as LinksSelect, L as LiveStream, bw as LiveStreamsSelect, a4 as Music, bf as MusicCategoriesSelect, a5 as MusicCategory, a6 as MusicTag, bg as MusicTagsSelect, be as MusicsSelect, aS as OrderItemsSelect, N as OrderStatusLog, aU as OrderStatusLogsSelect, aR as OrdersSelect, as as PayloadKv, bH as PayloadKvSelect, at as PayloadLockedDocument, bI as PayloadLockedDocumentsSelect, av as PayloadMigration, bK as PayloadMigrationsSelect, au as PayloadPreference, bJ as PayloadPreferencesSelect, f as PlayerBlock, a1 as Playlist, bc as PlaylistCategoriesSelect, a2 as PlaylistCategory, a3 as PlaylistTag, bd as PlaylistTagsSelect, bb as PlaylistsSelect, W as Post, X as PostAuthor, b5 as PostAuthorsSelect, b6 as PostCategoriesSelect, Y as PostCategory, Z as PostTag, b7 as PostTagsSelect, b4 as PostsSelect, aM as ProductCategoriesSelect, w as ProductCategory, D as ProductCollection, aO as ProductCollectionsSelect, v as ProductOption, u as ProductOptionValue, aL as ProductOptionValuesSelect, aK as ProductOptionsSelect, x as ProductTag, aN as ProductTagsSelect, t as ProductVariant, aJ as ProductVariantsSelect, aI as ProductsSelect, am as Reaction, an as ReactionType, bA as ReactionTypesSelect, bz as ReactionsSelect, ap as Report, bD as ReportsSelect, M as ReturnItem, aY as ReturnItemsSelect, aX as ReturnsSelect, aZ as ShippingPoliciesSelect, z as ShippingPolicy, o as Subscription, aF as SubscriptionsSelect, S as SupportedTimezones, l as SystemMedia, az as SystemMediaSelect, i as Tenant, q as TenantLogo, aH as TenantLogosSelect, aD as TenantMetadataSelect, m as TenantMetadatum, aC as TenantsSelect, aj as Thread, bC as ThreadCategoriesSelect, ak as ThreadCategory, bx as ThreadsSelect, aT as TransactionsSelect, h as User, U as UserAuthOperations, aw as UsersSelect, V as Video, bu as VideoCategoriesSelect, r as VideoCategory, s as VideoTag, bv as VideoTagsSelect, bt as VideosSelect } from './payload-types-FfZ2Zxp1.cjs';
1
+ import { O as Order, a as OrderItem$1, T as Transaction, b as Fulfillment, R as Return, c as Cart, d as CartItem, P as Product } from './payload-types-DICC2-Zr.cjs';
2
+ export { m as ApiKey, aE as ApiKeysSelect, p as ApiUsage, aI as ApiUsageSelect, A as Audience, aC as AudiencesSelect, bQ as Auth, r as BillingHistory, aK as BillingHistorySelect, aq as Bookmark, bF as BookmarksSelect, D as Brand, B as BrandLogo, aU as BrandLogosSelect, aT as BrandsSelect, bv as CanvasCategoriesSelect, ah as CanvasCategory, ak as CanvasEdgeType, bu as CanvasEdgeTypesSelect, aj as CanvasNodeType, bt as CanvasNodeTypesSelect, ai as CanvasTag, bw as CanvasTagsSelect, ag as Canvase, bs as CanvasesSelect, b6 as CartItemsSelect, b5 as CartsSelect, g as CodeBlock, bP as CollectionsWidget, an as Comment, bC as CommentsSelect, as as CommunityBan, bI as CommunityBansSelect, C as Config, J as Customer, M as CustomerAddress, b3 as CustomerAddressesSelect, e as CustomerAuthOperations, K as CustomerGroup, b4 as CustomerGroupsSelect, b2 as CustomersSelect, X as Discount, b7 as DiscountsSelect, a0 as Document, bd as DocumentCategoriesSelect, a2 as DocumentCategory, a1 as DocumentType, be as DocumentTypesSelect, bc as DocumentsSelect, E as EmailLog, aD as EmailLogsSelect, k as FieldConfig, az as FieldConfigsSelect, F as Form, at as FormSubmission, bK as FormSubmissionsSelect, bJ as FormsSelect, N as FulfillmentItem, a_ as FulfillmentItemsSelect, aZ as FulfillmentsSelect, bl as GalleriesSelect, a9 as Gallery, bm as GalleryCategoriesSelect, aa as GalleryCategory, ac as GalleryItem, bo as GalleryItemsSelect, ab as GalleryTag, bn as GalleryTagsSelect, I as IframeBlock, j as Image, aA as ImagesSelect, ad as Link, bq as LinkCategoriesSelect, ae as LinkCategory, af as LinkTag, br as LinkTagsSelect, bp as LinksSelect, L as LiveStream, bA as LiveStreamsSelect, a6 as Music, bj as MusicCategoriesSelect, a7 as MusicCategory, a8 as MusicTag, bk as MusicTagsSelect, bi as MusicsSelect, aW as OrderItemsSelect, W as OrderStatusLog, aY as OrderStatusLogsSelect, aV as OrdersSelect, au as PayloadKv, bL as PayloadKvSelect, av as PayloadLockedDocument, bM as PayloadLockedDocumentsSelect, ax as PayloadMigration, bO as PayloadMigrationsSelect, aw as PayloadPreference, bN as PayloadPreferencesSelect, n as PersonalAccessToken, aF as PersonalAccessTokensSelect, f as PlayerBlock, a3 as Playlist, bg as PlaylistCategoriesSelect, a4 as PlaylistCategory, a5 as PlaylistTag, bh as PlaylistTagsSelect, bf as PlaylistsSelect, Y as Post, Z as PostAuthor, b9 as PostAuthorsSelect, ba as PostCategoriesSelect, _ as PostCategory, $ as PostTag, bb as PostTagsSelect, b8 as PostsSelect, aQ as ProductCategoriesSelect, y as ProductCategory, H as ProductCollection, aS as ProductCollectionsSelect, x as ProductOption, w as ProductOptionValue, aP as ProductOptionValuesSelect, aO as ProductOptionsSelect, z as ProductTag, aR as ProductTagsSelect, v as ProductVariant, aN as ProductVariantsSelect, aM as ProductsSelect, ao as Reaction, ap as ReactionType, bE as ReactionTypesSelect, bD as ReactionsSelect, ar as Report, bH as ReportsSelect, Q as ReturnItem, b0 as ReturnItemsSelect, a$ as ReturnsSelect, b1 as ShippingPoliciesSelect, G as ShippingPolicy, q as Subscription, aJ as SubscriptionsSelect, S as SupportedTimezones, l as SystemMedia, aB as SystemMediaSelect, i as Tenant, s as TenantLogo, aL as TenantLogosSelect, aH as TenantMetadataSelect, o as TenantMetadatum, aG as TenantsSelect, al as Thread, bG as ThreadCategoriesSelect, am as ThreadCategory, bB as ThreadsSelect, aX as TransactionsSelect, h as User, U as UserAuthOperations, ay as UsersSelect, V as Video, by as VideoCategoriesSelect, t as VideoCategory, u as VideoTag, bz as VideoTagsSelect, bx as VideosSelect } from './payload-types-DICC2-Zr.cjs';
3
3
  import { Sort, Where } from 'payload';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { QueryClient, InfiniteData } from '@tanstack/react-query';
6
6
  import { Metadata } from 'next';
7
- import { P as PublicCollection } from './const-dv0zuAxG.cjs';
8
- export { a as COLLECTIONS, C as Collection } from './const-dv0zuAxG.cjs';
9
- import { C as CollectionType } from './webhook-t7JGFLKQ.cjs';
10
- export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-t7JGFLKQ.cjs';
11
- export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-DupPIYx-.cjs';
7
+ import { P as PublicCollection } from './const-DZ04SC2y.cjs';
8
+ export { a as COLLECTIONS, C as Collection } from './const-DZ04SC2y.cjs';
9
+ import { C as CollectionType } from './webhook-D8ogsafv.cjs';
10
+ export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-D8ogsafv.cjs';
11
+ export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
12
12
  export { b as IMAGE_SIZES, I as ImageData, a as ImagePalette, f as ImagePlaceholderOptions, d as getImageLqip, e as getImagePalette, h as getImagePlaceholderStyle, c as getImageSrcSet, g as getImageUrl } from './image-TT8lTsk5.cjs';
13
13
  export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from './video-DbLL8yuc.cjs';
14
- export { JwtPayload, createApiKey, createServerToken, decodeServerToken, parseApiKey, verifyServerToken } from './auth.cjs';
15
14
 
16
15
  /**
17
16
  * API URL을 반환합니다.
@@ -20,7 +19,7 @@ export { JwtPayload, createApiKey, createServerToken, decodeServerToken, parseAp
20
19
  */
21
20
  declare function resolveApiUrl(): string;
22
21
  interface ClientConfig {
23
- clientKey: string;
22
+ publishableKey: string;
24
23
  /**
25
24
  * Customer authentication options.
26
25
  * Used to initialize CustomerAuth on Client.
@@ -123,18 +122,16 @@ type DeepPartial<T> = {
123
122
  type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
124
123
 
125
124
  interface ServerApiOptions {
126
- clientKey: string;
125
+ publishableKey?: string;
127
126
  secretKey: string;
128
- baseUrl?: string;
129
127
  }
130
128
  interface RequestOptions {
131
129
  method?: 'GET' | 'POST' | 'PATCH' | 'DELETE';
132
130
  headers?: Record<string, string>;
133
131
  }
134
132
  declare abstract class BaseApi {
135
- protected readonly clientKey: string;
133
+ protected readonly publishableKey: string;
136
134
  protected readonly secretKey: string;
137
- protected readonly baseUrl?: string;
138
135
  constructor(apiName: string, options: ServerApiOptions);
139
136
  protected request<T>(endpoint: string, body: unknown, options?: RequestOptions): Promise<T>;
140
137
  }
@@ -263,10 +260,9 @@ declare class OrderApi extends BaseApi {
263
260
  }
264
261
 
265
262
  interface CartApiOptions {
266
- clientKey: string;
263
+ publishableKey?: string;
267
264
  secretKey?: string;
268
265
  customerToken?: string | (() => string | null);
269
- baseUrl?: string;
270
266
  onUnauthorized?: () => Promise<string | null>;
271
267
  }
272
268
  type AddItemParams = {
@@ -294,10 +290,9 @@ type ClearCartParams = {
294
290
  cartId: string;
295
291
  };
296
292
  declare class CartApi {
297
- private readonly clientKey;
293
+ private readonly publishableKey;
298
294
  private readonly secretKey?;
299
295
  private readonly customerToken?;
300
- private readonly baseUrl?;
301
296
  private readonly onUnauthorized?;
302
297
  constructor(options: CartApiOptions);
303
298
  private execute;
@@ -342,11 +337,10 @@ interface GenerateMetadataOptions {
342
337
  }
343
338
 
344
339
  interface FetchOptions extends RequestInit {
345
- clientKey?: string;
340
+ publishableKey?: string;
346
341
  secretKey?: string;
347
342
  customerToken?: string;
348
343
  timeout?: number;
349
- baseUrl?: string;
350
344
  debug?: boolean | DebugConfig;
351
345
  retry?: RetryConfig;
352
346
  /** Called on 401 when customerToken is set. Return a new token to retry, or null to fail. */
@@ -354,12 +348,11 @@ interface FetchOptions extends RequestInit {
354
348
  }
355
349
 
356
350
  declare class HttpClient {
357
- protected clientKey: string;
351
+ protected publishableKey: string;
358
352
  protected secretKey?: string;
359
- protected baseUrl?: string;
360
353
  private getCustomerToken?;
361
354
  private onUnauthorized?;
362
- constructor(clientKey: string, secretKey?: string, baseUrl?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
355
+ constructor(publishableKey: string, secretKey?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
363
356
  protected get defaultOptions(): FetchOptions;
364
357
  protected buildUrl(endpoint: string, options?: ApiQueryOptions): string;
365
358
  protected assertJsonResponse(response: Response): void;
@@ -381,7 +374,6 @@ declare class HttpClient {
381
374
  }
382
375
 
383
376
  declare class CollectionClient extends HttpClient {
384
- constructor(clientKey: string, secretKey?: string, baseUrl?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
385
377
  from<T extends PublicCollection>(collection: T): CollectionQueryBuilder<T>;
386
378
  /**
387
379
  * Find documents (list query)
@@ -522,10 +514,9 @@ declare class CollectionQueryBuilder<T extends PublicCollection> {
522
514
  }
523
515
 
524
516
  interface CommunityClientOptions {
525
- clientKey: string;
517
+ publishableKey?: string;
526
518
  secretKey?: string;
527
519
  customerToken?: string | (() => string | null);
528
- baseUrl?: string;
529
520
  onUnauthorized?: () => Promise<string | null>;
530
521
  }
531
522
  interface Thread {
@@ -598,10 +589,9 @@ interface PaginatedResponse<T> {
598
589
  nextPage: number | null;
599
590
  }
600
591
  declare class CommunityClient {
601
- private readonly clientKey;
592
+ private readonly publishableKey;
602
593
  private readonly secretKey?;
603
594
  private readonly customerToken?;
604
- private readonly baseUrl?;
605
595
  private readonly onUnauthorized?;
606
596
  constructor(options: CommunityClientOptions);
607
597
  private execute;
@@ -777,15 +767,15 @@ interface CustomerAuthOptions {
777
767
  * Customer authentication client.
778
768
  *
779
769
  * Manages customer registration, login, logout, and token lifecycle.
780
- * All requests include X-Client-Key for tenant resolution.
770
+ * All requests include X-Publishable-Key for tenant resolution.
781
771
  */
782
772
  declare class CustomerAuth {
783
- private clientKey;
773
+ private publishableKey;
784
774
  private baseUrl;
785
775
  private token;
786
776
  private onTokenChange?;
787
777
  private refreshPromise;
788
- constructor(clientKey: string, baseUrl: string, options?: CustomerAuthOptions);
778
+ constructor(publishableKey: string, options?: CustomerAuthOptions);
789
779
  /**
790
780
  * Register a new customer account
791
781
  */
@@ -1107,7 +1097,6 @@ declare class Client {
1107
1097
  customer: CustomerAuth;
1108
1098
  protected state: ClientState;
1109
1099
  protected config: ClientConfig;
1110
- protected baseUrl: string;
1111
1100
  constructor(options: ClientConfig);
1112
1101
  from<T extends PublicCollection>(collection: T): ReadOnlyQueryBuilder<T>;
1113
1102
  getState(): ClientState;
@@ -1130,11 +1119,10 @@ declare class ServerClient {
1130
1119
  queryClient: QueryClient;
1131
1120
  protected state: ClientState;
1132
1121
  protected config: ClientServerConfig;
1133
- protected baseUrl: string;
1134
1122
  constructor(options: ClientServerConfig);
1135
1123
  from<T extends PublicCollection>(collection: T): CollectionQueryBuilder<T>;
1136
1124
  getState(): ClientState;
1137
- getConfig(): ClientConfig;
1125
+ getConfig(): Omit<ClientServerConfig, 'secretKey'>;
1138
1126
  }
1139
1127
  /**
1140
1128
  * Create a server-only client with full read/write access. Requires secretKey.
package/dist/index.d.ts CHANGED
@@ -1,17 +1,16 @@
1
- import { O as Order, a as OrderItem$1, T as Transaction, b as Fulfillment, R as Return, c as Cart, d as CartItem, P as Product } from './payload-types-FfZ2Zxp1.js';
2
- export { n as ApiUsage, aE as ApiUsageSelect, A as Audience, aA as AudiencesSelect, bM as Auth, p as BillingHistory, aG as BillingHistorySelect, ao as Bookmark, bB as BookmarksSelect, y as Brand, B as BrandLogo, aQ as BrandLogosSelect, aP as BrandsSelect, br as CanvasCategoriesSelect, af as CanvasCategory, ai as CanvasEdgeType, bq as CanvasEdgeTypesSelect, ah as CanvasNodeType, bp as CanvasNodeTypesSelect, ag as CanvasTag, bs as CanvasTagsSelect, ae as Canvase, bo as CanvasesSelect, b2 as CartItemsSelect, b1 as CartsSelect, g as CodeBlock, bL as CollectionsWidget, al as Comment, by as CommentsSelect, aq as CommunityBan, bE as CommunityBansSelect, C as Config, G as Customer, J as CustomerAddress, a$ as CustomerAddressesSelect, e as CustomerAuthOperations, H as CustomerGroup, b0 as CustomerGroupsSelect, a_ as CustomersSelect, Q as Discount, b3 as DiscountsSelect, _ as Document, b9 as DocumentCategoriesSelect, a0 as DocumentCategory, $ as DocumentType, ba as DocumentTypesSelect, b8 as DocumentsSelect, E as EmailLog, aB as EmailLogsSelect, k as FieldConfig, ax as FieldConfigsSelect, F as Form, ar as FormSubmission, bG as FormSubmissionsSelect, bF as FormsSelect, K as FulfillmentItem, aW as FulfillmentItemsSelect, aV as FulfillmentsSelect, bh as GalleriesSelect, a7 as Gallery, bi as GalleryCategoriesSelect, a8 as GalleryCategory, aa as GalleryItem, bk as GalleryItemsSelect, a9 as GalleryTag, bj as GalleryTagsSelect, I as IframeBlock, j as Image, ay as ImagesSelect, ab as Link, bm as LinkCategoriesSelect, ac as LinkCategory, ad as LinkTag, bn as LinkTagsSelect, bl as LinksSelect, L as LiveStream, bw as LiveStreamsSelect, a4 as Music, bf as MusicCategoriesSelect, a5 as MusicCategory, a6 as MusicTag, bg as MusicTagsSelect, be as MusicsSelect, aS as OrderItemsSelect, N as OrderStatusLog, aU as OrderStatusLogsSelect, aR as OrdersSelect, as as PayloadKv, bH as PayloadKvSelect, at as PayloadLockedDocument, bI as PayloadLockedDocumentsSelect, av as PayloadMigration, bK as PayloadMigrationsSelect, au as PayloadPreference, bJ as PayloadPreferencesSelect, f as PlayerBlock, a1 as Playlist, bc as PlaylistCategoriesSelect, a2 as PlaylistCategory, a3 as PlaylistTag, bd as PlaylistTagsSelect, bb as PlaylistsSelect, W as Post, X as PostAuthor, b5 as PostAuthorsSelect, b6 as PostCategoriesSelect, Y as PostCategory, Z as PostTag, b7 as PostTagsSelect, b4 as PostsSelect, aM as ProductCategoriesSelect, w as ProductCategory, D as ProductCollection, aO as ProductCollectionsSelect, v as ProductOption, u as ProductOptionValue, aL as ProductOptionValuesSelect, aK as ProductOptionsSelect, x as ProductTag, aN as ProductTagsSelect, t as ProductVariant, aJ as ProductVariantsSelect, aI as ProductsSelect, am as Reaction, an as ReactionType, bA as ReactionTypesSelect, bz as ReactionsSelect, ap as Report, bD as ReportsSelect, M as ReturnItem, aY as ReturnItemsSelect, aX as ReturnsSelect, aZ as ShippingPoliciesSelect, z as ShippingPolicy, o as Subscription, aF as SubscriptionsSelect, S as SupportedTimezones, l as SystemMedia, az as SystemMediaSelect, i as Tenant, q as TenantLogo, aH as TenantLogosSelect, aD as TenantMetadataSelect, m as TenantMetadatum, aC as TenantsSelect, aj as Thread, bC as ThreadCategoriesSelect, ak as ThreadCategory, bx as ThreadsSelect, aT as TransactionsSelect, h as User, U as UserAuthOperations, aw as UsersSelect, V as Video, bu as VideoCategoriesSelect, r as VideoCategory, s as VideoTag, bv as VideoTagsSelect, bt as VideosSelect } from './payload-types-FfZ2Zxp1.js';
1
+ import { O as Order, a as OrderItem$1, T as Transaction, b as Fulfillment, R as Return, c as Cart, d as CartItem, P as Product } from './payload-types-DICC2-Zr.js';
2
+ export { m as ApiKey, aE as ApiKeysSelect, p as ApiUsage, aI as ApiUsageSelect, A as Audience, aC as AudiencesSelect, bQ as Auth, r as BillingHistory, aK as BillingHistorySelect, aq as Bookmark, bF as BookmarksSelect, D as Brand, B as BrandLogo, aU as BrandLogosSelect, aT as BrandsSelect, bv as CanvasCategoriesSelect, ah as CanvasCategory, ak as CanvasEdgeType, bu as CanvasEdgeTypesSelect, aj as CanvasNodeType, bt as CanvasNodeTypesSelect, ai as CanvasTag, bw as CanvasTagsSelect, ag as Canvase, bs as CanvasesSelect, b6 as CartItemsSelect, b5 as CartsSelect, g as CodeBlock, bP as CollectionsWidget, an as Comment, bC as CommentsSelect, as as CommunityBan, bI as CommunityBansSelect, C as Config, J as Customer, M as CustomerAddress, b3 as CustomerAddressesSelect, e as CustomerAuthOperations, K as CustomerGroup, b4 as CustomerGroupsSelect, b2 as CustomersSelect, X as Discount, b7 as DiscountsSelect, a0 as Document, bd as DocumentCategoriesSelect, a2 as DocumentCategory, a1 as DocumentType, be as DocumentTypesSelect, bc as DocumentsSelect, E as EmailLog, aD as EmailLogsSelect, k as FieldConfig, az as FieldConfigsSelect, F as Form, at as FormSubmission, bK as FormSubmissionsSelect, bJ as FormsSelect, N as FulfillmentItem, a_ as FulfillmentItemsSelect, aZ as FulfillmentsSelect, bl as GalleriesSelect, a9 as Gallery, bm as GalleryCategoriesSelect, aa as GalleryCategory, ac as GalleryItem, bo as GalleryItemsSelect, ab as GalleryTag, bn as GalleryTagsSelect, I as IframeBlock, j as Image, aA as ImagesSelect, ad as Link, bq as LinkCategoriesSelect, ae as LinkCategory, af as LinkTag, br as LinkTagsSelect, bp as LinksSelect, L as LiveStream, bA as LiveStreamsSelect, a6 as Music, bj as MusicCategoriesSelect, a7 as MusicCategory, a8 as MusicTag, bk as MusicTagsSelect, bi as MusicsSelect, aW as OrderItemsSelect, W as OrderStatusLog, aY as OrderStatusLogsSelect, aV as OrdersSelect, au as PayloadKv, bL as PayloadKvSelect, av as PayloadLockedDocument, bM as PayloadLockedDocumentsSelect, ax as PayloadMigration, bO as PayloadMigrationsSelect, aw as PayloadPreference, bN as PayloadPreferencesSelect, n as PersonalAccessToken, aF as PersonalAccessTokensSelect, f as PlayerBlock, a3 as Playlist, bg as PlaylistCategoriesSelect, a4 as PlaylistCategory, a5 as PlaylistTag, bh as PlaylistTagsSelect, bf as PlaylistsSelect, Y as Post, Z as PostAuthor, b9 as PostAuthorsSelect, ba as PostCategoriesSelect, _ as PostCategory, $ as PostTag, bb as PostTagsSelect, b8 as PostsSelect, aQ as ProductCategoriesSelect, y as ProductCategory, H as ProductCollection, aS as ProductCollectionsSelect, x as ProductOption, w as ProductOptionValue, aP as ProductOptionValuesSelect, aO as ProductOptionsSelect, z as ProductTag, aR as ProductTagsSelect, v as ProductVariant, aN as ProductVariantsSelect, aM as ProductsSelect, ao as Reaction, ap as ReactionType, bE as ReactionTypesSelect, bD as ReactionsSelect, ar as Report, bH as ReportsSelect, Q as ReturnItem, b0 as ReturnItemsSelect, a$ as ReturnsSelect, b1 as ShippingPoliciesSelect, G as ShippingPolicy, q as Subscription, aJ as SubscriptionsSelect, S as SupportedTimezones, l as SystemMedia, aB as SystemMediaSelect, i as Tenant, s as TenantLogo, aL as TenantLogosSelect, aH as TenantMetadataSelect, o as TenantMetadatum, aG as TenantsSelect, al as Thread, bG as ThreadCategoriesSelect, am as ThreadCategory, bB as ThreadsSelect, aX as TransactionsSelect, h as User, U as UserAuthOperations, ay as UsersSelect, V as Video, by as VideoCategoriesSelect, t as VideoCategory, u as VideoTag, bz as VideoTagsSelect, bx as VideosSelect } from './payload-types-DICC2-Zr.js';
3
3
  import { Sort, Where } from 'payload';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { QueryClient, InfiniteData } from '@tanstack/react-query';
6
6
  import { Metadata } from 'next';
7
- import { P as PublicCollection } from './const-CCh99Gxu.js';
8
- export { a as COLLECTIONS, C as Collection } from './const-CCh99Gxu.js';
9
- import { C as CollectionType } from './webhook-B9MDrH22.js';
10
- export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-B9MDrH22.js';
11
- export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-DupPIYx-.js';
7
+ import { P as PublicCollection } from './const-hXu9oG66.js';
8
+ export { a as COLLECTIONS, C as Collection } from './const-hXu9oG66.js';
9
+ import { C as CollectionType } from './webhook-BD9ivfyR.js';
10
+ export { a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, d as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-BD9ivfyR.js';
11
+ export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
12
12
  export { b as IMAGE_SIZES, I as ImageData, a as ImagePalette, f as ImagePlaceholderOptions, d as getImageLqip, e as getImagePalette, h as getImagePlaceholderStyle, c as getImageSrcSet, g as getImageUrl } from './image-TT8lTsk5.js';
13
13
  export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from './video-DbLL8yuc.js';
14
- export { JwtPayload, createApiKey, createServerToken, decodeServerToken, parseApiKey, verifyServerToken } from './auth.js';
15
14
 
16
15
  /**
17
16
  * API URL을 반환합니다.
@@ -20,7 +19,7 @@ export { JwtPayload, createApiKey, createServerToken, decodeServerToken, parseAp
20
19
  */
21
20
  declare function resolveApiUrl(): string;
22
21
  interface ClientConfig {
23
- clientKey: string;
22
+ publishableKey: string;
24
23
  /**
25
24
  * Customer authentication options.
26
25
  * Used to initialize CustomerAuth on Client.
@@ -123,18 +122,16 @@ type DeepPartial<T> = {
123
122
  type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
124
123
 
125
124
  interface ServerApiOptions {
126
- clientKey: string;
125
+ publishableKey?: string;
127
126
  secretKey: string;
128
- baseUrl?: string;
129
127
  }
130
128
  interface RequestOptions {
131
129
  method?: 'GET' | 'POST' | 'PATCH' | 'DELETE';
132
130
  headers?: Record<string, string>;
133
131
  }
134
132
  declare abstract class BaseApi {
135
- protected readonly clientKey: string;
133
+ protected readonly publishableKey: string;
136
134
  protected readonly secretKey: string;
137
- protected readonly baseUrl?: string;
138
135
  constructor(apiName: string, options: ServerApiOptions);
139
136
  protected request<T>(endpoint: string, body: unknown, options?: RequestOptions): Promise<T>;
140
137
  }
@@ -263,10 +260,9 @@ declare class OrderApi extends BaseApi {
263
260
  }
264
261
 
265
262
  interface CartApiOptions {
266
- clientKey: string;
263
+ publishableKey?: string;
267
264
  secretKey?: string;
268
265
  customerToken?: string | (() => string | null);
269
- baseUrl?: string;
270
266
  onUnauthorized?: () => Promise<string | null>;
271
267
  }
272
268
  type AddItemParams = {
@@ -294,10 +290,9 @@ type ClearCartParams = {
294
290
  cartId: string;
295
291
  };
296
292
  declare class CartApi {
297
- private readonly clientKey;
293
+ private readonly publishableKey;
298
294
  private readonly secretKey?;
299
295
  private readonly customerToken?;
300
- private readonly baseUrl?;
301
296
  private readonly onUnauthorized?;
302
297
  constructor(options: CartApiOptions);
303
298
  private execute;
@@ -342,11 +337,10 @@ interface GenerateMetadataOptions {
342
337
  }
343
338
 
344
339
  interface FetchOptions extends RequestInit {
345
- clientKey?: string;
340
+ publishableKey?: string;
346
341
  secretKey?: string;
347
342
  customerToken?: string;
348
343
  timeout?: number;
349
- baseUrl?: string;
350
344
  debug?: boolean | DebugConfig;
351
345
  retry?: RetryConfig;
352
346
  /** Called on 401 when customerToken is set. Return a new token to retry, or null to fail. */
@@ -354,12 +348,11 @@ interface FetchOptions extends RequestInit {
354
348
  }
355
349
 
356
350
  declare class HttpClient {
357
- protected clientKey: string;
351
+ protected publishableKey: string;
358
352
  protected secretKey?: string;
359
- protected baseUrl?: string;
360
353
  private getCustomerToken?;
361
354
  private onUnauthorized?;
362
- constructor(clientKey: string, secretKey?: string, baseUrl?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
355
+ constructor(publishableKey: string, secretKey?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
363
356
  protected get defaultOptions(): FetchOptions;
364
357
  protected buildUrl(endpoint: string, options?: ApiQueryOptions): string;
365
358
  protected assertJsonResponse(response: Response): void;
@@ -381,7 +374,6 @@ declare class HttpClient {
381
374
  }
382
375
 
383
376
  declare class CollectionClient extends HttpClient {
384
- constructor(clientKey: string, secretKey?: string, baseUrl?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
385
377
  from<T extends PublicCollection>(collection: T): CollectionQueryBuilder<T>;
386
378
  /**
387
379
  * Find documents (list query)
@@ -522,10 +514,9 @@ declare class CollectionQueryBuilder<T extends PublicCollection> {
522
514
  }
523
515
 
524
516
  interface CommunityClientOptions {
525
- clientKey: string;
517
+ publishableKey?: string;
526
518
  secretKey?: string;
527
519
  customerToken?: string | (() => string | null);
528
- baseUrl?: string;
529
520
  onUnauthorized?: () => Promise<string | null>;
530
521
  }
531
522
  interface Thread {
@@ -598,10 +589,9 @@ interface PaginatedResponse<T> {
598
589
  nextPage: number | null;
599
590
  }
600
591
  declare class CommunityClient {
601
- private readonly clientKey;
592
+ private readonly publishableKey;
602
593
  private readonly secretKey?;
603
594
  private readonly customerToken?;
604
- private readonly baseUrl?;
605
595
  private readonly onUnauthorized?;
606
596
  constructor(options: CommunityClientOptions);
607
597
  private execute;
@@ -777,15 +767,15 @@ interface CustomerAuthOptions {
777
767
  * Customer authentication client.
778
768
  *
779
769
  * Manages customer registration, login, logout, and token lifecycle.
780
- * All requests include X-Client-Key for tenant resolution.
770
+ * All requests include X-Publishable-Key for tenant resolution.
781
771
  */
782
772
  declare class CustomerAuth {
783
- private clientKey;
773
+ private publishableKey;
784
774
  private baseUrl;
785
775
  private token;
786
776
  private onTokenChange?;
787
777
  private refreshPromise;
788
- constructor(clientKey: string, baseUrl: string, options?: CustomerAuthOptions);
778
+ constructor(publishableKey: string, options?: CustomerAuthOptions);
789
779
  /**
790
780
  * Register a new customer account
791
781
  */
@@ -1107,7 +1097,6 @@ declare class Client {
1107
1097
  customer: CustomerAuth;
1108
1098
  protected state: ClientState;
1109
1099
  protected config: ClientConfig;
1110
- protected baseUrl: string;
1111
1100
  constructor(options: ClientConfig);
1112
1101
  from<T extends PublicCollection>(collection: T): ReadOnlyQueryBuilder<T>;
1113
1102
  getState(): ClientState;
@@ -1130,11 +1119,10 @@ declare class ServerClient {
1130
1119
  queryClient: QueryClient;
1131
1120
  protected state: ClientState;
1132
1121
  protected config: ClientServerConfig;
1133
- protected baseUrl: string;
1134
1122
  constructor(options: ClientServerConfig);
1135
1123
  from<T extends PublicCollection>(collection: T): CollectionQueryBuilder<T>;
1136
1124
  getState(): ClientState;
1137
- getConfig(): ClientConfig;
1125
+ getConfig(): Omit<ClientServerConfig, 'secretKey'>;
1138
1126
  }
1139
1127
  /**
1140
1128
  * Create a server-only client with full read/write access. Requires secretKey.