@01.software/sdk 0.7.1 → 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.
- package/README.md +54 -18
- package/dist/const-DZ04SC2y.d.cts +19 -0
- package/dist/const-hXu9oG66.d.ts +19 -0
- package/dist/index.cjs +57 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -64
- package/dist/index.d.ts +47 -64
- package/dist/index.js +57 -180
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-Cp10MoF6.d.cts → payload-types-DICC2-Zr.d.cts} +916 -475
- package/dist/{payload-types-Cp10MoF6.d.ts → payload-types-DICC2-Zr.d.ts} +916 -475
- package/dist/{realtime-DupPIYx-.d.cts → realtime-D7HtUpqt.d.cts} +2 -2
- package/dist/{realtime-DupPIYx-.d.ts → realtime-D7HtUpqt.d.ts} +2 -2
- package/dist/realtime.cjs +8 -7
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +6 -6
- package/dist/realtime.d.ts +6 -6
- package/dist/realtime.js +8 -7
- package/dist/realtime.js.map +1 -1
- package/dist/{server-DxhuG-_s.d.cts → server-JR9TvKZ5.d.cts} +0 -2
- package/dist/{server-DxhuG-_s.d.ts → server-JR9TvKZ5.d.ts} +0 -2
- package/dist/ui/canvas/server.cjs +1 -2
- package/dist/ui/canvas/server.cjs.map +1 -1
- package/dist/ui/canvas/server.d.cts +1 -1
- package/dist/ui/canvas/server.d.ts +1 -1
- package/dist/ui/canvas/server.js +1 -2
- package/dist/ui/canvas/server.js.map +1 -1
- package/dist/ui/canvas.cjs +1 -2
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.d.cts +2 -2
- package/dist/ui/canvas.d.ts +2 -2
- package/dist/ui/canvas.js +1 -2
- package/dist/ui/canvas.js.map +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.cjs +1 -1
- package/dist/ui/video.cjs.map +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/ui/video.js +1 -1
- package/dist/ui/video.js.map +1 -1
- package/dist/{webhook-BKhMTlFN.d.ts → webhook-BD9ivfyR.d.ts} +2 -2
- package/dist/{webhook-CiWsseVz.d.cts → webhook-D8ogsafv.d.cts} +2 -2
- package/dist/webhook.d.cts +3 -3
- package/dist/webhook.d.ts +3 -3
- package/package.json +1 -11
- package/dist/auth.cjs +0 -109
- package/dist/auth.cjs.map +0 -1
- package/dist/auth.d.cts +0 -36
- package/dist/auth.d.ts +0 -36
- package/dist/auth.js +0 -86
- package/dist/auth.js.map +0 -1
- package/dist/const-B8iE-mDN.d.cts +0 -19
- package/dist/const-Chw71pKS.d.ts +0 -19
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { O as Order, a as
|
|
2
|
-
export {
|
|
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-
|
|
8
|
-
export { a as COLLECTIONS, C as Collection } from './const-
|
|
9
|
-
import { C as CollectionType } from './webhook-
|
|
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-
|
|
11
|
-
export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
}
|
|
@@ -147,7 +144,7 @@ type CustomerSnapshot = {
|
|
|
147
144
|
};
|
|
148
145
|
type ReturnReason = 'change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other';
|
|
149
146
|
type ReturnProductItem = {
|
|
150
|
-
|
|
147
|
+
orderItem: string;
|
|
151
148
|
quantity: number;
|
|
152
149
|
};
|
|
153
150
|
type CreateOrderParams = {
|
|
@@ -155,7 +152,7 @@ type CreateOrderParams = {
|
|
|
155
152
|
customer?: string;
|
|
156
153
|
customerSnapshot: CustomerSnapshot;
|
|
157
154
|
shippingAddress: Order['shippingAddress'];
|
|
158
|
-
orderProducts: Pick<
|
|
155
|
+
orderProducts: Pick<OrderItem$1, 'product' | 'variant' | 'quantity' | 'unitPrice' | 'totalPrice'>[];
|
|
159
156
|
totalAmount: number;
|
|
160
157
|
shippingFee?: number;
|
|
161
158
|
paymentId?: string;
|
|
@@ -198,18 +195,19 @@ type CalculateShippingParams = {
|
|
|
198
195
|
};
|
|
199
196
|
type CalculateShippingResult = {
|
|
200
197
|
shippingFee: number;
|
|
201
|
-
|
|
198
|
+
baseAmount: number;
|
|
202
199
|
extraFee: number;
|
|
203
200
|
freeShipping: boolean;
|
|
204
|
-
|
|
201
|
+
freeShippingMinAmount: number | null;
|
|
205
202
|
isJeju: boolean;
|
|
203
|
+
isRemoteIsland: boolean;
|
|
206
204
|
};
|
|
207
205
|
type CreateFulfillmentParams = {
|
|
208
206
|
orderNumber: string;
|
|
209
207
|
carrier?: string;
|
|
210
208
|
trackingNumber?: string;
|
|
211
209
|
items: Array<{
|
|
212
|
-
|
|
210
|
+
orderItem: string;
|
|
213
211
|
quantity: number;
|
|
214
212
|
}>;
|
|
215
213
|
};
|
|
@@ -242,19 +240,6 @@ type ReturnWithRefundParams = {
|
|
|
242
240
|
paymentId: string;
|
|
243
241
|
refundReceiptUrl?: string;
|
|
244
242
|
};
|
|
245
|
-
type CreateExchangeParams = {
|
|
246
|
-
orderNumber: string;
|
|
247
|
-
reason?: 'wrong_size' | 'wrong_color' | 'defective' | 'other';
|
|
248
|
-
reasonDetail?: string;
|
|
249
|
-
exchangeProducts: Array<{
|
|
250
|
-
orderProduct: string;
|
|
251
|
-
quantity: number;
|
|
252
|
-
}>;
|
|
253
|
-
};
|
|
254
|
-
type UpdateExchangeParams = {
|
|
255
|
-
exchangeId: string;
|
|
256
|
-
status: 'processing' | 'shipped' | 'completed' | 'rejected';
|
|
257
|
-
};
|
|
258
243
|
declare class OrderApi extends BaseApi {
|
|
259
244
|
constructor(options: OrderApiOptions);
|
|
260
245
|
createOrder(params: CreateOrderParams): Promise<Order>;
|
|
@@ -272,15 +257,12 @@ declare class OrderApi extends BaseApi {
|
|
|
272
257
|
updateReturn(params: UpdateReturnParams): Promise<Return>;
|
|
273
258
|
validateDiscount(params: ValidateDiscountParams): Promise<ValidateDiscountResult>;
|
|
274
259
|
calculateShipping(params: CalculateShippingParams): Promise<CalculateShippingResult>;
|
|
275
|
-
createExchange(params: CreateExchangeParams): Promise<Exchange>;
|
|
276
|
-
updateExchange(params: UpdateExchangeParams): Promise<Exchange>;
|
|
277
260
|
}
|
|
278
261
|
|
|
279
262
|
interface CartApiOptions {
|
|
280
|
-
|
|
263
|
+
publishableKey?: string;
|
|
281
264
|
secretKey?: string;
|
|
282
265
|
customerToken?: string | (() => string | null);
|
|
283
|
-
baseUrl?: string;
|
|
284
266
|
onUnauthorized?: () => Promise<string | null>;
|
|
285
267
|
}
|
|
286
268
|
type AddItemParams = {
|
|
@@ -308,10 +290,9 @@ type ClearCartParams = {
|
|
|
308
290
|
cartId: string;
|
|
309
291
|
};
|
|
310
292
|
declare class CartApi {
|
|
311
|
-
private readonly
|
|
293
|
+
private readonly publishableKey;
|
|
312
294
|
private readonly secretKey?;
|
|
313
295
|
private readonly customerToken?;
|
|
314
|
-
private readonly baseUrl?;
|
|
315
296
|
private readonly onUnauthorized?;
|
|
316
297
|
constructor(options: CartApiOptions);
|
|
317
298
|
private execute;
|
|
@@ -331,12 +312,12 @@ declare class CartApi {
|
|
|
331
312
|
type ProductApiOptions = ServerApiOptions;
|
|
332
313
|
type StockCheckParams = {
|
|
333
314
|
items: Array<{
|
|
334
|
-
|
|
315
|
+
variantId: string;
|
|
335
316
|
quantity: number;
|
|
336
317
|
}>;
|
|
337
318
|
};
|
|
338
319
|
type StockCheckResult = {
|
|
339
|
-
|
|
320
|
+
variantId: string;
|
|
340
321
|
available: boolean;
|
|
341
322
|
availableStock: number;
|
|
342
323
|
requestedQuantity: number;
|
|
@@ -356,11 +337,10 @@ interface GenerateMetadataOptions {
|
|
|
356
337
|
}
|
|
357
338
|
|
|
358
339
|
interface FetchOptions extends RequestInit {
|
|
359
|
-
|
|
340
|
+
publishableKey?: string;
|
|
360
341
|
secretKey?: string;
|
|
361
342
|
customerToken?: string;
|
|
362
343
|
timeout?: number;
|
|
363
|
-
baseUrl?: string;
|
|
364
344
|
debug?: boolean | DebugConfig;
|
|
365
345
|
retry?: RetryConfig;
|
|
366
346
|
/** Called on 401 when customerToken is set. Return a new token to retry, or null to fail. */
|
|
@@ -368,12 +348,11 @@ interface FetchOptions extends RequestInit {
|
|
|
368
348
|
}
|
|
369
349
|
|
|
370
350
|
declare class HttpClient {
|
|
371
|
-
protected
|
|
351
|
+
protected publishableKey: string;
|
|
372
352
|
protected secretKey?: string;
|
|
373
|
-
protected baseUrl?: string;
|
|
374
353
|
private getCustomerToken?;
|
|
375
354
|
private onUnauthorized?;
|
|
376
|
-
constructor(
|
|
355
|
+
constructor(publishableKey: string, secretKey?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
|
|
377
356
|
protected get defaultOptions(): FetchOptions;
|
|
378
357
|
protected buildUrl(endpoint: string, options?: ApiQueryOptions): string;
|
|
379
358
|
protected assertJsonResponse(response: Response): void;
|
|
@@ -395,7 +374,6 @@ declare class HttpClient {
|
|
|
395
374
|
}
|
|
396
375
|
|
|
397
376
|
declare class CollectionClient extends HttpClient {
|
|
398
|
-
constructor(clientKey: string, secretKey?: string, baseUrl?: string, getCustomerToken?: () => string | null, onUnauthorized?: () => Promise<string | null>);
|
|
399
377
|
from<T extends PublicCollection>(collection: T): CollectionQueryBuilder<T>;
|
|
400
378
|
/**
|
|
401
379
|
* Find documents (list query)
|
|
@@ -536,10 +514,9 @@ declare class CollectionQueryBuilder<T extends PublicCollection> {
|
|
|
536
514
|
}
|
|
537
515
|
|
|
538
516
|
interface CommunityClientOptions {
|
|
539
|
-
|
|
517
|
+
publishableKey?: string;
|
|
540
518
|
secretKey?: string;
|
|
541
519
|
customerToken?: string | (() => string | null);
|
|
542
|
-
baseUrl?: string;
|
|
543
520
|
onUnauthorized?: () => Promise<string | null>;
|
|
544
521
|
}
|
|
545
522
|
interface Thread {
|
|
@@ -555,10 +532,10 @@ interface Thread {
|
|
|
555
532
|
}
|
|
556
533
|
interface Comment {
|
|
557
534
|
id: string;
|
|
558
|
-
|
|
535
|
+
body: string;
|
|
559
536
|
thread?: string;
|
|
560
537
|
parent?: string;
|
|
561
|
-
|
|
538
|
+
rootComment?: string;
|
|
562
539
|
createdAt?: string;
|
|
563
540
|
updatedAt?: string;
|
|
564
541
|
[key: string]: unknown;
|
|
@@ -612,10 +589,9 @@ interface PaginatedResponse<T> {
|
|
|
612
589
|
nextPage: number | null;
|
|
613
590
|
}
|
|
614
591
|
declare class CommunityClient {
|
|
615
|
-
private readonly
|
|
592
|
+
private readonly publishableKey;
|
|
616
593
|
private readonly secretKey?;
|
|
617
594
|
private readonly customerToken?;
|
|
618
|
-
private readonly baseUrl?;
|
|
619
595
|
private readonly onUnauthorized?;
|
|
620
596
|
constructor(options: CommunityClientOptions);
|
|
621
597
|
private execute;
|
|
@@ -648,18 +624,18 @@ declare class CommunityClient {
|
|
|
648
624
|
}>;
|
|
649
625
|
createComment(params: {
|
|
650
626
|
threadId: string;
|
|
651
|
-
|
|
627
|
+
body: string;
|
|
652
628
|
parentId?: string;
|
|
653
629
|
}): Promise<Comment>;
|
|
654
630
|
listComments(params: {
|
|
655
631
|
threadId: string;
|
|
656
632
|
page?: number;
|
|
657
633
|
limit?: number;
|
|
658
|
-
|
|
634
|
+
rootComment?: string;
|
|
659
635
|
}): Promise<PaginatedResponse<Comment>>;
|
|
660
636
|
updateComment(params: {
|
|
661
637
|
commentId: string;
|
|
662
|
-
|
|
638
|
+
body: string;
|
|
663
639
|
}): Promise<Comment>;
|
|
664
640
|
deleteComment(params: {
|
|
665
641
|
commentId: string;
|
|
@@ -726,6 +702,15 @@ interface CustomerAuthResponse {
|
|
|
726
702
|
token: string;
|
|
727
703
|
customer: CustomerProfile;
|
|
728
704
|
}
|
|
705
|
+
interface MarketingConsentChannel {
|
|
706
|
+
isConsented?: boolean;
|
|
707
|
+
}
|
|
708
|
+
interface MarketingConsent {
|
|
709
|
+
email?: MarketingConsentChannel;
|
|
710
|
+
sms?: MarketingConsentChannel;
|
|
711
|
+
push?: MarketingConsentChannel;
|
|
712
|
+
consentSource?: string;
|
|
713
|
+
}
|
|
729
714
|
interface CustomerProfile {
|
|
730
715
|
id: string;
|
|
731
716
|
name: string;
|
|
@@ -733,8 +718,8 @@ interface CustomerProfile {
|
|
|
733
718
|
phone?: string | null;
|
|
734
719
|
authProvider?: 'local' | 'google' | 'apple' | 'kakao' | 'naver' | null;
|
|
735
720
|
isGuest?: boolean | null;
|
|
736
|
-
|
|
737
|
-
marketingConsent?:
|
|
721
|
+
isEmailVerified?: boolean | null;
|
|
722
|
+
marketingConsent?: MarketingConsent | null;
|
|
738
723
|
metadata?: Record<string, unknown> | null;
|
|
739
724
|
groups?: string[];
|
|
740
725
|
}
|
|
@@ -759,7 +744,7 @@ interface CustomerRefreshResponse {
|
|
|
759
744
|
interface UpdateProfileData {
|
|
760
745
|
name?: string;
|
|
761
746
|
phone?: string;
|
|
762
|
-
marketingConsent?:
|
|
747
|
+
marketingConsent?: MarketingConsent;
|
|
763
748
|
}
|
|
764
749
|
interface CustomerAuthOptions {
|
|
765
750
|
/**
|
|
@@ -782,15 +767,15 @@ interface CustomerAuthOptions {
|
|
|
782
767
|
* Customer authentication client.
|
|
783
768
|
*
|
|
784
769
|
* Manages customer registration, login, logout, and token lifecycle.
|
|
785
|
-
* All requests include X-
|
|
770
|
+
* All requests include X-Publishable-Key for tenant resolution.
|
|
786
771
|
*/
|
|
787
772
|
declare class CustomerAuth {
|
|
788
|
-
private
|
|
773
|
+
private publishableKey;
|
|
789
774
|
private baseUrl;
|
|
790
775
|
private token;
|
|
791
776
|
private onTokenChange?;
|
|
792
777
|
private refreshPromise;
|
|
793
|
-
constructor(
|
|
778
|
+
constructor(publishableKey: string, options?: CustomerAuthOptions);
|
|
794
779
|
/**
|
|
795
780
|
* Register a new customer account
|
|
796
781
|
*/
|
|
@@ -1112,7 +1097,6 @@ declare class Client {
|
|
|
1112
1097
|
customer: CustomerAuth;
|
|
1113
1098
|
protected state: ClientState;
|
|
1114
1099
|
protected config: ClientConfig;
|
|
1115
|
-
protected baseUrl: string;
|
|
1116
1100
|
constructor(options: ClientConfig);
|
|
1117
1101
|
from<T extends PublicCollection>(collection: T): ReadOnlyQueryBuilder<T>;
|
|
1118
1102
|
getState(): ClientState;
|
|
@@ -1135,11 +1119,10 @@ declare class ServerClient {
|
|
|
1135
1119
|
queryClient: QueryClient;
|
|
1136
1120
|
protected state: ClientState;
|
|
1137
1121
|
protected config: ClientServerConfig;
|
|
1138
|
-
protected baseUrl: string;
|
|
1139
1122
|
constructor(options: ClientServerConfig);
|
|
1140
1123
|
from<T extends PublicCollection>(collection: T): CollectionQueryBuilder<T>;
|
|
1141
1124
|
getState(): ClientState;
|
|
1142
|
-
getConfig():
|
|
1125
|
+
getConfig(): Omit<ClientServerConfig, 'secretKey'>;
|
|
1143
1126
|
}
|
|
1144
1127
|
/**
|
|
1145
1128
|
* Create a server-only client with full read/write access. Requires secretKey.
|
|
@@ -1167,4 +1150,4 @@ declare const formatOrderName: (items: OrderItem[]) => string;
|
|
|
1167
1150
|
*/
|
|
1168
1151
|
declare const resolveRelation: <T>(ref: T | string | number | null | undefined) => T | null;
|
|
1169
1152
|
|
|
1170
|
-
export { type AddItemParams, ApiError, type ApiQueryOptions, type ApplyDiscountParams, BaseApi, type CalculateShippingParams, type CalculateShippingResult, Cart, CartApi, type CartApiOptions, CartItem, type CheckoutParams, type ClearCartParams, Client, type ClientConfig, type ClientMetadata, type ClientServerConfig, type ClientState, Client as ClientType, CollectionClient, type CollectionDetailQueryParams, CollectionHooks, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, CollectionType, CommunityClient, type CommunityClientOptions, ConfigError, type
|
|
1153
|
+
export { type AddItemParams, ApiError, type ApiQueryOptions, type ApplyDiscountParams, BaseApi, type CalculateShippingParams, type CalculateShippingResult, Cart, CartApi, type CartApiOptions, CartItem, type CheckoutParams, type ClearCartParams, Client, type ClientConfig, type ClientMetadata, type ClientServerConfig, type ClientState, Client as ClientType, CollectionClient, type CollectionDetailQueryParams, CollectionHooks, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, CollectionType, CommunityClient, type CommunityClientOptions, ConfigError, type CreateFulfillmentParams, type CreateOrderParams, type CreateReturnParams, CustomerAuth, type CustomerAuthOptions, type CustomerAuthResponse, CustomerHooks, type CustomerLoginData, type CustomerProfile, type CustomerRefreshResponse, type CustomerRegisterData, type CustomerRegisterResponse, type CustomerSnapshot, type DebugConfig, type DeepPartial, type ExtractArrayType, Fulfillment, type GenerateMetadataOptions, type GetOrderParams, GoneError, type InfiniteQueryOptions, NetworkError, Order, OrderApi, type OrderApiOptions, OrderItem$1 as OrderItem, type PaginationMeta, type PayloadFindResponse, type PayloadMutationResponse, Product, ProductApi, type ProductApiOptions, PublicCollection, QueryHooks, type QueryOptions, type ReadOnlyQueryBuilder, type ReadOnlyQueryHooks, type RemoveDiscountParams, type RemoveItemParams, type RequestOptions, type RetryConfig, Return, type ReturnProductItem, type ReturnReason, type ReturnWithRefundParams, SDKError, type ServerApiOptions, ServerClient, ServerClient as ServerClientType, ServiceUnavailableError, type StockCheckParams, type StockCheckResponse, type StockCheckResult, type SuspenseInfiniteQueryOptions, type SuspenseQueryOptions, TimeoutError, Transaction, type UpdateFulfillmentParams, type UpdateItemParams, type UpdateOrderParams, type UpdateProfileData, type UpdateReturnParams, type UpdateTransactionParams, UsageLimitError, type ValidateDiscountParams, type ValidateDiscountResult, ValidationError, collectionKeys, createClient, createServerClient, customerKeys, formatOrderName, generateOrderNumber, getQueryClient, isApiError, isConfigError, isGoneError, isNetworkError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError, resolveApiUrl, resolveRelation };
|