@01.software/sdk 0.51.0 → 0.65.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 (67) hide show
  1. package/CHANGELOG.md +313 -0
  2. package/README.md +228 -102
  3. package/dist/client.cjs +556 -60
  4. package/dist/client.cjs.map +1 -1
  5. package/dist/client.d.cts +6 -6
  6. package/dist/client.d.ts +6 -6
  7. package/dist/client.js +556 -60
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-CWAeuzV4.d.cts → collection-client-B7rsTtVj.d.cts} +6 -6
  10. package/dist/{collection-client-hYvVfHIm.d.ts → collection-client-C2sMvfme.d.ts} +6 -6
  11. package/dist/{const-JD8obaKg.d.ts → const-CRxPTDGt.d.ts} +2 -2
  12. package/dist/{const-D8LixhAJ.d.cts → const-D6ZRQLxI.d.cts} +2 -2
  13. package/dist/{index-B0Hjh3Ey.d.ts → index-1auUEYrl.d.ts} +24 -7
  14. package/dist/{index-Bu0kCc6o.d.cts → index-Bbpf5t-l.d.cts} +24 -7
  15. package/dist/index.cjs +573 -260
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +19 -12
  18. package/dist/index.d.ts +19 -12
  19. package/dist/index.js +573 -260
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-BOsckg8B.d.cts → payload-types-BnIET0xU.d.cts} +567 -438
  22. package/dist/{payload-types-BOsckg8B.d.ts → payload-types-BnIET0xU.d.ts} +567 -438
  23. package/dist/query.cjs +62 -3
  24. package/dist/query.cjs.map +1 -1
  25. package/dist/query.d.cts +5 -5
  26. package/dist/query.d.ts +5 -5
  27. package/dist/query.js +62 -3
  28. package/dist/query.js.map +1 -1
  29. package/dist/realtime.d.cts +2 -2
  30. package/dist/realtime.d.ts +2 -2
  31. package/dist/server.cjs +557 -20
  32. package/dist/server.cjs.map +1 -1
  33. package/dist/server.d.cts +14 -8
  34. package/dist/server.d.ts +14 -8
  35. package/dist/server.js +557 -20
  36. package/dist/server.js.map +1 -1
  37. package/dist/{types-5ZlcAFuU.d.ts → types-D1y4TgQm.d.ts} +2 -2
  38. package/dist/{types-Bj8j7VHU.d.ts → types-DnRC3nLG.d.ts} +464 -16
  39. package/dist/{types-B14sEt1z.d.cts → types-Dp1oYpD3.d.cts} +2 -2
  40. package/dist/{types-CM5qiR2k.d.cts → types-Dzn0LD2N.d.cts} +464 -16
  41. package/dist/ui/form.d.cts +1 -1
  42. package/dist/ui/form.d.ts +1 -1
  43. package/dist/ui/video.cjs +4 -2
  44. package/dist/ui/video.cjs.map +1 -1
  45. package/dist/ui/video.d.cts +4 -2
  46. package/dist/ui/video.d.ts +4 -2
  47. package/dist/ui/video.js +4 -2
  48. package/dist/ui/video.js.map +1 -1
  49. package/dist/webhook.cjs +13 -2
  50. package/dist/webhook.cjs.map +1 -1
  51. package/dist/webhook.d.cts +5 -5
  52. package/dist/webhook.d.ts +5 -5
  53. package/dist/webhook.js +13 -2
  54. package/dist/webhook.js.map +1 -1
  55. package/package.json +9 -28
  56. package/dist/analytics/react.cjs +0 -344
  57. package/dist/analytics/react.cjs.map +0 -1
  58. package/dist/analytics/react.d.cts +0 -24
  59. package/dist/analytics/react.d.ts +0 -24
  60. package/dist/analytics/react.js +0 -319
  61. package/dist/analytics/react.js.map +0 -1
  62. package/dist/analytics.cjs +0 -238
  63. package/dist/analytics.cjs.map +0 -1
  64. package/dist/analytics.d.cts +0 -39
  65. package/dist/analytics.d.ts +0 -39
  66. package/dist/analytics.js +0 -215
  67. package/dist/analytics.js.map +0 -1
@@ -1,6 +1,7 @@
1
- import { P as PublicCollection, C as Collection, S as ServerCollection } from './const-JD8obaKg.js';
2
- import { C as CollectionType, a as PublicProduct, P as PublicMarket } from './types-5ZlcAFuU.js';
3
- import { O as Order, k as Transaction, l as Fulfillment, R as Return } from './payload-types-BOsckg8B.js';
1
+ import { P as PublicCollection, C as Collection, S as ServerCollection } from './const-CRxPTDGt.js';
2
+ import { C as CollectionType, a as PublicProduct, P as PublicMarket } from './types-D1y4TgQm.js';
3
+ import { O as Order, k as Transaction, l as Fulfillment, R as Return } from './payload-types-BnIET0xU.js';
4
+ import { SDKError } from './errors.js';
4
5
 
5
6
  declare const operationBrand: unique symbol;
6
7
  type HttpOperation = {
@@ -476,6 +477,12 @@ type UpdateItemParams = {
476
477
  cartItemId: string;
477
478
  quantity: number;
478
479
  };
480
+ type ServerAddItemParams = AddItemParams & {
481
+ customerToken?: string;
482
+ };
483
+ type ServerUpdateItemParams = UpdateItemParams & {
484
+ customerToken?: string;
485
+ };
479
486
  type RemoveItemParams = {
480
487
  cartToken: string;
481
488
  expectedRevision: number;
@@ -600,9 +607,9 @@ declare class CartApi extends CustomerScopedApi {
600
607
  retrieve(params: RetrieveCartParams): Promise<PublicCart>;
601
608
  mine(params?: CartMineParams | ServerCartMineParams): Promise<CartMineResult>;
602
609
  merge(params: CartMergeParams | ServerCartMergeParams): Promise<CartMergeResult>;
603
- addItem(params: AddItemParams): Promise<CartMutationResult>;
610
+ addItem(params: AddItemParams | ServerAddItemParams): Promise<CartMutationResult>;
604
611
  private mutate;
605
- updateItem(params: UpdateItemParams): Promise<CartMutationResult>;
612
+ updateItem(params: UpdateItemParams | ServerUpdateItemParams): Promise<CartMutationResult>;
606
613
  removeItem(params: RemoveItemParams): Promise<CartMutationResult>;
607
614
  clear(params: ClearCartParams): Promise<CartMutationResult>;
608
615
  updateDiscountCodes(params: UpdateDiscountCodesParams): Promise<CartMutationResult>;
@@ -1022,6 +1029,41 @@ interface CustomerAuthOptions {
1022
1029
  *
1023
1030
  * Handles SSR safely (no-op on server).
1024
1031
  * When enabled, `token` and `onTokenChange` are ignored.
1032
+ *
1033
+ * Persisted browser sessions treat storage as the source of truth. The
1034
+ * canonical session is one versioned JSON record at `<key>:session`, so the
1035
+ * access/refresh pair is always written together and can never be read
1036
+ * half-updated. Every write re-reads that record first and carries forward
1037
+ * the field it does not change, which keeps a stale instance from carrying
1038
+ * its own outdated counterpart into the write. That merge is best-effort:
1039
+ * Web Storage has no compare-and-swap, so a commit landing between that read
1040
+ * and the write is lost by ordering.
1041
+ *
1042
+ * Refresh-token **rotation** is serialized across tabs and SDK instances that
1043
+ * share the key and API/tenant identity, through a Web Locks lease: the
1044
+ * rotation re-reads canonical state inside the lease and either rotates once
1045
+ * or adopts what another context already published, so a single-use refresh
1046
+ * token is not replayed. `getToken()` / `getRefreshToken()` re-read canonical
1047
+ * state before use, so another tab's rotation or logout is observed before
1048
+ * the next credential use.
1049
+ *
1050
+ * Limits worth knowing: Web Storage has no compare-and-swap and the
1051
+ * synchronous mutators (`logout`, `setToken`, `setRefreshToken`) cannot await
1052
+ * the lease, so they are not serialized against a rotation commit — those
1053
+ * races are last-writer-wins, and server-side revocation remains the
1054
+ * authority. Browsers without Web Locks and storage that denies access fall
1055
+ * back to a per-instance or memory-only session.
1056
+ *
1057
+ * `<key>` still holds the current access token as a single-value
1058
+ * compatibility publication for code that reads it directly, and an existing
1059
+ * pair under the older `<key>` / `<key>:refresh` layout is migrated on first
1060
+ * read, but only while `<key>:session` is absent — `logout()` writes a
1061
+ * cleared record even on empty storage, so an ended session is not migrated
1062
+ * back. The older refresh entry is retired before any newer access token is
1063
+ * mirrored, so those two are never published together; if that retirement
1064
+ * fails, the newer access token is not mirrored either. A context running an
1065
+ * SDK version that predates the record is outside the coordination
1066
+ * guarantee.
1025
1067
  */
1026
1068
  persist?: boolean | string;
1027
1069
  /** Initial token (e.g. from SSR cookie) */
@@ -1035,6 +1077,10 @@ interface CustomerAuthOptions {
1035
1077
  /** Optional hosted OAuth helper configuration */
1036
1078
  oauth?: CustomerOAuthConfig;
1037
1079
  }
1080
+ /** Server timestamp of a completed customer self withdrawal. */
1081
+ interface CustomerWithdrawalResult {
1082
+ withdrawnAt: string;
1083
+ }
1038
1084
 
1039
1085
  type CustomerOrderListOptions = {
1040
1086
  page?: number;
@@ -1059,6 +1105,15 @@ declare class CustomerAuth {
1059
1105
  private onTokenChange?;
1060
1106
  private onRefreshTokenChange?;
1061
1107
  private refreshPromise;
1108
+ /** Canonical record key; null unless persistence is active in a browser. */
1109
+ private persistRecordKey;
1110
+ /** Advisory single-value access mirror, plus the retired refresh mirror. */
1111
+ private persistMirrorKey;
1112
+ private persistMirrorRefreshKey;
1113
+ /** Cross-context refresh lock name; null when there is no shared storage. */
1114
+ private refreshLockName;
1115
+ /** Revision of the canonical record this instance last observed. */
1116
+ private sessionRev;
1062
1117
  constructor(publishableKey: string, options?: CustomerAuthOptions, apiUrl?: string);
1063
1118
  /**
1064
1119
  * Register a new customer account
@@ -1071,13 +1126,97 @@ declare class CustomerAuth {
1071
1126
  /**
1072
1127
  * Refresh the current token. Uses a refresh token when available, otherwise
1073
1128
  * falls back to the legacy bearer-token compatibility path.
1129
+ *
1130
+ * Refresh tokens are single-use, so a persisted session shared by several
1131
+ * tabs or SDK instances must rotate at most once: concurrent rotations of the
1132
+ * same token are replay from the server's point of view and revoke the whole
1133
+ * family. Persisted browser sessions therefore serialize rotation across
1134
+ * contexts and re-read the canonical persisted credentials inside the lock.
1074
1135
  */
1075
1136
  refreshToken(): Promise<CustomerRefreshResponse>;
1137
+ /**
1138
+ * Re-read the canonical persisted session. In persisted mode the shared
1139
+ * record — not this instance's memory — is the source of truth, so another
1140
+ * context's rotation, login, or logout is observed before the next credential
1141
+ * use. Change callbacks are deliberately not invoked: this is a read.
1142
+ */
1143
+ private syncFromPersistedStorage;
1144
+ /** `null` when this instance does not persist. */
1145
+ private readCanonicalSession;
1146
+ /**
1147
+ * Publish a change to canonical storage.
1148
+ *
1149
+ * The canonical pair is re-read immediately before the single record write so
1150
+ * that a field this call does not change is taken from that read rather than
1151
+ * from this instance's possibly stale copy. That merge is BEST-EFFORT: it
1152
+ * removes the stale counterpart an instance would otherwise carry, but it is
1153
+ * not a compare-and-swap. Web Storage offers none, and the synchronous public
1154
+ * mutators cannot await the refresh lease, so a commit that lands between
1155
+ * this read and the store operation is lost by ordering — including the
1156
+ * counterpart just read, which is then republished stale. The window is one
1157
+ * store operation wide and the server remains authoritative; see
1158
+ * `CUST-AUTH-033` for the stated limit.
1159
+ *
1160
+ * Returns `false` only when `requireLiveSession` refused a write because the
1161
+ * canonical session had already been cleared.
1162
+ */
1163
+ private commitPersistedSession;
1164
+ /**
1165
+ * Storage rejected a write or a read, so it is not a canonical store for this
1166
+ * instance. Fall back to the memory-only session and take no lease: there is
1167
+ * no shared state left to coordinate. Nothing is purged — the record commit
1168
+ * is atomic, so no inconsistent state was published, and another context's
1169
+ * valid session must not be destroyed by this instance's local failure.
1170
+ */
1171
+ private disablePersistence;
1172
+ /**
1173
+ * Compare the canonical record with the fence this call captured before it
1174
+ * left. Every persisted decision — rotate, converge, or fail closed — goes
1175
+ * through this one comparison. The revision catches a logout, a fresh login,
1176
+ * or a manual setter even when token values coincide; the value comparison
1177
+ * additionally catches a mirror-only writer that cannot bump a revision.
1178
+ */
1179
+ private classifyCanonicalState;
1180
+ /** The canonical persisted pair, as a refresh result. */
1181
+ private canonicalPair;
1182
+ /** Current credentials plus the revision they were observed at. */
1183
+ private currentFence;
1184
+ /**
1185
+ * Clear an access credential a 401 just proved unusable — but only while it
1186
+ * is still the canonical one. A rotation committed by another context while
1187
+ * the request was in flight is newer than this 401, so it must survive; the
1188
+ * instance adopts it instead. The refresh entry is never touched here: a
1189
+ * rejected access token says nothing about the refresh family.
1190
+ */
1191
+ private invalidateAccessToken;
1192
+ /** Commit both credentials in one canonical write. */
1193
+ private setSession;
1194
+ /**
1195
+ * Serialize rotation against every other context sharing the same storage
1196
+ * key and API/tenant identity. Coordination is best-effort: when it is
1197
+ * unavailable or times out the rotation still happens, so server-side reuse
1198
+ * detection is never bypassed by a client that failed to coordinate.
1199
+ */
1200
+ private rotateAcrossContexts;
1201
+ /**
1202
+ * Decide, against freshly re-read canonical state, whether this context still
1203
+ * owns the rotation.
1204
+ */
1205
+ private rotateWithCanonicalState;
1076
1206
  private _doRefreshToken;
1077
1207
  /**
1078
- * Clear the stored token
1208
+ * Clear local credentials synchronously. This compatibility API cannot
1209
+ * revoke the server-side refresh family; use logoutAsync() for that.
1210
+ * @deprecated Use logoutAsync() to end the direct server session.
1079
1211
  */
1080
1212
  logout(): void;
1213
+ /**
1214
+ * End the current direct refresh family and clear local credentials even if
1215
+ * revocation fails. A legacy access-only session has no refresh family here.
1216
+ */
1217
+ logoutAsync(): Promise<void>;
1218
+ /** Archive the current password account and clear this client's credentials on success. */
1219
+ withdraw(currentPassword: string): Promise<CustomerWithdrawalResult>;
1081
1220
  /**
1082
1221
  * Get the current authenticated customer's profile
1083
1222
  */
@@ -1103,11 +1242,15 @@ declare class CustomerAuth {
1103
1242
  */
1104
1243
  getMyOrders(options?: CustomerOrderListOptions): Promise<PayloadFindResponse<PublicOrder>>;
1105
1244
  /**
1106
- * Get the current token (or null if not authenticated)
1245
+ * Get the current token (or null if not authenticated).
1246
+ *
1247
+ * In persisted mode this re-reads shared storage first, so a rotation or
1248
+ * logout performed by another tab is observed before the token is used.
1107
1249
  */
1108
1250
  getToken(): string | null;
1109
1251
  /**
1110
- * Get the current refresh token (or null if unavailable)
1252
+ * Get the current refresh token (or null if unavailable). Persisted mode
1253
+ * re-reads shared storage first, like {@link CustomerAuth.getToken}.
1111
1254
  */
1112
1255
  getRefreshToken(): string | null;
1113
1256
  /**
@@ -2273,6 +2416,7 @@ type CreateCheckoutParams = {
2273
2416
  idempotencyKey: string;
2274
2417
  };
2275
2418
  type CreateServerCheckoutParams = CreateCheckoutParams & {
2419
+ customerToken?: string;
2276
2420
  clientReferenceId?: string;
2277
2421
  integrationMetadata?: Record<string, string>;
2278
2422
  };
@@ -2330,6 +2474,9 @@ type CreatePaymentSessionParams = {
2330
2474
  profile: 'widget_v2';
2331
2475
  };
2332
2476
  };
2477
+ type CreateServerPaymentSessionParams = CreatePaymentSessionParams & {
2478
+ customerToken?: string;
2479
+ };
2333
2480
  type CreatePortOnePaymentSessionParams = {
2334
2481
  checkoutToken: string;
2335
2482
  idempotencyKey: string;
@@ -2342,6 +2489,9 @@ type CreatePortOnePaymentSessionParams = {
2342
2489
  paymentMethod: PortOneStandardPaymentMethod;
2343
2490
  };
2344
2491
  };
2492
+ type CreateServerPortOnePaymentSessionParams = CreatePortOnePaymentSessionParams & {
2493
+ customerToken?: string;
2494
+ };
2345
2495
  type RetrieveBrowserPaymentSessionParams = {
2346
2496
  paymentSessionId: string;
2347
2497
  checkoutToken: string;
@@ -2378,6 +2528,7 @@ type CreateCustomPaymentSessionParams = {
2378
2528
  provider: string;
2379
2529
  checkoutToken: string;
2380
2530
  idempotencyKey: string;
2531
+ customerToken?: string;
2381
2532
  };
2382
2533
  type CustomPaymentSession = {
2383
2534
  id: string;
@@ -2668,8 +2819,8 @@ declare class PaymentSessionApi extends CustomerScopedApi {
2668
2819
  constructor(options: PaymentSessionApiOptions);
2669
2820
  private post;
2670
2821
  private paymentSession;
2671
- create(params: CreatePaymentSessionParams): Promise<PublicPaymentSession>;
2672
- createPortOne(params: CreatePortOnePaymentSessionParams): Promise<PortOnePublicPaymentSession>;
2822
+ create(params: CreatePaymentSessionParams | CreateServerPaymentSessionParams): Promise<PublicPaymentSession>;
2823
+ createPortOne(params: CreatePortOnePaymentSessionParams | CreateServerPortOnePaymentSessionParams): Promise<PortOnePublicPaymentSession>;
2673
2824
  retrieve(params: RetrieveBrowserPaymentSessionParams | RetrieveServerPaymentSessionParams): Promise<PublicPaymentSession>;
2674
2825
  retrievePortOne(params: RetrieveBrowserPaymentSessionParams | RetrieveServerPaymentSessionParams): Promise<PortOnePublicPaymentSession>;
2675
2826
  cancel(params: CancelBrowserPaymentSessionParams | CancelServerPaymentSessionParams): Promise<PublicPaymentSession>;
@@ -2793,7 +2944,14 @@ type StorefrontGalleryItem = {
2793
2944
  createdAt?: string | null;
2794
2945
  updatedAt?: string | null;
2795
2946
  gallery?: StorefrontContentReference | string | null;
2947
+ /** Missing on older responses; treat it as image. */
2948
+ mediaType?: 'image' | 'video';
2796
2949
  image?: PublicMediaAsset | null;
2950
+ video?: {
2951
+ id?: string | number | null;
2952
+ thumbnail?: PublicMediaAsset | null;
2953
+ availability: 'ready' | 'processing' | 'unavailable';
2954
+ };
2797
2955
  };
2798
2956
  type StorefrontLinksSort = 'createdAt' | '-createdAt' | 'updatedAt' | '-updatedAt' | 'publishedAt' | '-publishedAt' | 'title' | '-title' | 'isFeatured' | '-isFeatured';
2799
2957
  type StorefrontGalleryItemsSort = 'manual' | 'createdAt' | '-createdAt' | 'updatedAt' | '-updatedAt' | 'title' | '-title';
@@ -3115,6 +3273,22 @@ declare class EventsClient {
3115
3273
  private execute;
3116
3274
  }
3117
3275
 
3276
+ interface VideoPlaybackResponse {
3277
+ /** Absolute HLS URL. Free playback always uses the metered gateway. */
3278
+ streamUrl: string;
3279
+ mode: 'gateway' | 'public';
3280
+ }
3281
+ declare class VideoPlaybackClient {
3282
+ private readonly options;
3283
+ constructor(options: {
3284
+ publishableKey: string;
3285
+ secretKey: string;
3286
+ apiUrl?: string;
3287
+ onRequestId?: (id: string | null) => void;
3288
+ });
3289
+ playback(videoId: string): Promise<VideoPlaybackResponse>;
3290
+ }
3291
+
3118
3292
  /**
3119
3293
  * Client-safe market discovery shape (Shopify-like). Structural copy of the
3120
3294
  * private contracts package's `PublicMarketDTO` — the public SDK must not import
@@ -3296,6 +3470,227 @@ declare class TenantIntrospectionApi extends RawBaseApi implements TenantIntrosp
3296
3470
  featureProgress(params: TenantFeatureProgressInput): Promise<TenantFeatureProgressResponse>;
3297
3471
  }
3298
3472
 
3473
+ type CustomerGroupManualSource = {
3474
+ type: 'manual';
3475
+ sourceId: string;
3476
+ grantedAt: string;
3477
+ revision: number;
3478
+ };
3479
+ type CustomerGroupMembershipSource = {
3480
+ type: 'membership';
3481
+ sourceId: string;
3482
+ planId: string;
3483
+ currentPeriodEnd: string;
3484
+ };
3485
+ type CustomerGroupMemberSource = CustomerGroupManualSource | CustomerGroupMembershipSource;
3486
+ type CustomerGroupMembershipState = {
3487
+ customerId: string;
3488
+ groupId: string;
3489
+ effective: boolean;
3490
+ evaluatedAt: string;
3491
+ sources: CustomerGroupMemberSource[];
3492
+ };
3493
+ type CustomerGroupMember = {
3494
+ customer: {
3495
+ id: string;
3496
+ email: string | null;
3497
+ name: string | null;
3498
+ };
3499
+ sources: CustomerGroupMemberSource[];
3500
+ };
3501
+ type ListCustomerGroupMembersParams = {
3502
+ groupId: string;
3503
+ page?: number;
3504
+ limit?: number;
3505
+ };
3506
+ type ListCustomerGroupMembersResponse = {
3507
+ groupId: string;
3508
+ evaluatedAt: string;
3509
+ members: CustomerGroupMember[];
3510
+ page: number;
3511
+ limit: number;
3512
+ totalDocs: number;
3513
+ totalPages: number;
3514
+ hasNextPage: boolean;
3515
+ nextPage: number | null;
3516
+ };
3517
+ type GrantCustomerGroupMemberParams = {
3518
+ groupId: string;
3519
+ customerId: string;
3520
+ reason?: string;
3521
+ };
3522
+ type RevokeCustomerGroupMemberParams = {
3523
+ groupId: string;
3524
+ customerId: string;
3525
+ };
3526
+ type CustomerGroupMemberCommandResponse = {
3527
+ changed: boolean;
3528
+ membership: CustomerGroupMembershipState;
3529
+ };
3530
+ type CustomerGroupApiOptions = ServerApiOptions;
3531
+ /** Server-only source-aware Customer Group membership API. */
3532
+ declare class CustomerGroupApi extends BaseApi {
3533
+ constructor(options: CustomerGroupApiOptions);
3534
+ listMembers(params: ListCustomerGroupMembersParams): Promise<ListCustomerGroupMembersResponse>;
3535
+ grantMember(params: GrantCustomerGroupMemberParams): Promise<CustomerGroupMemberCommandResponse>;
3536
+ revokeMember(params: RevokeCustomerGroupMemberParams): Promise<CustomerGroupMemberCommandResponse>;
3537
+ }
3538
+
3539
+ /** A digest of a provider-safe locator; never send a raw coupon or token. */
3540
+ type ExternalEffectLocator = {
3541
+ kind: 'idempotency_key' | 'lookup_correlation';
3542
+ sha256: string;
3543
+ };
3544
+ type ExternalEffectClaimState = 'pre_dispatch_claimed' | 'armed_unknown' | 'reported_effect' | 'reported_no_effect' | 'reconciliation_required' | 'reconciled_effect' | 'reconciled_no_effect' | 'unresolved_closed';
3545
+ type ExternalEffectClaimErrorReason = 'invalid_evidence' | 'denied' | 'conflict' | 'lease_lost' | 'unknown' | 'quota_exceeded' | 'forbidden' | 'authority_unavailable' | 'internal_error';
3546
+ /** Returns a contract reason from a failed shaped claim operation. */
3547
+ declare function getExternalEffectClaimErrorReason(error: SDKError): ExternalEffectClaimErrorReason | undefined;
3548
+ /** Redacted platform bookkeeping, not proof that a provider performed an effect. */
3549
+ type ExternalEffectClaimSnapshot = {
3550
+ id: string;
3551
+ state: ExternalEffectClaimState;
3552
+ armedAt: string | null;
3553
+ firstReportOutcome: 'effect' | 'no_effect' | null;
3554
+ reportAuthority: 'tenant_supplied_unverified';
3555
+ leaseGranted: boolean;
3556
+ leaseToken: string | null;
3557
+ leaseGeneration: number;
3558
+ };
3559
+ type ClaimExternalEffectParams = {
3560
+ integrationId: string;
3561
+ effectKind: string;
3562
+ logicalKeySha256: string;
3563
+ requestFingerprintSha256: string;
3564
+ locator: ExternalEffectLocator | null;
3565
+ leaseMs: number;
3566
+ };
3567
+ type GetExternalEffectClaimParams = {
3568
+ integrationId: string;
3569
+ claimId: string;
3570
+ };
3571
+ type ExternalEffectLeaseParams = GetExternalEffectClaimParams & {
3572
+ leaseToken: string;
3573
+ leaseGeneration: number;
3574
+ };
3575
+ type ReportExternalEffectParams = GetExternalEffectClaimParams & {
3576
+ outcome: 'effect' | 'no_effect';
3577
+ locator: ExternalEffectLocator | null;
3578
+ providerOperationSha256: string | null;
3579
+ source: 'provider_response' | 'provider_lookup';
3580
+ referenceSha256: string;
3581
+ observedAt: string;
3582
+ };
3583
+ type RecordExternalEffectRecoveryParams = GetExternalEffectClaimParams & {
3584
+ mode: 'safe_replay' | 'lookup';
3585
+ locator: ExternalEffectLocator;
3586
+ requestFingerprintSha256: string;
3587
+ observedAt: string;
3588
+ };
3589
+ /** Server credential required; provider I/O and verification remain in your server. */
3590
+ declare class ExternalEffectClaimsApi extends BaseApi {
3591
+ constructor(options: ServerApiOptions);
3592
+ claim(params: ClaimExternalEffectParams): Promise<ExternalEffectClaimSnapshot>;
3593
+ get(params: GetExternalEffectClaimParams): Promise<ExternalEffectClaimSnapshot>;
3594
+ arm(params: ExternalEffectLeaseParams): Promise<ExternalEffectClaimSnapshot>;
3595
+ release(params: ExternalEffectLeaseParams): Promise<void>;
3596
+ report(params: ReportExternalEffectParams): Promise<ExternalEffectClaimSnapshot>;
3597
+ recovery(params: RecordExternalEffectRecoveryParams): Promise<void>;
3598
+ }
3599
+
3600
+ type InstallationCredentialSnapshot = {
3601
+ installationId: string;
3602
+ providerNamespace: string;
3603
+ providerAccountId: string;
3604
+ version: number;
3605
+ /** Opaque tenant-encrypted value. Decryption and provider use stay in your server. */
3606
+ ciphertext: string;
3607
+ };
3608
+ type InstallationCredentialIdentity = {
3609
+ installationId: string;
3610
+ };
3611
+ type CreateInstallationCredentialParams = {
3612
+ installationId: string;
3613
+ ciphertext: string;
3614
+ };
3615
+ type ReplaceInstallationCredentialParams = {
3616
+ installationId: string;
3617
+ ciphertext: string;
3618
+ expectedVersion: number;
3619
+ };
3620
+ type DisposeInstallationCredentialParams = {
3621
+ installationId: string;
3622
+ expectedVersion: number;
3623
+ };
3624
+ /** Bound server key only. This client never performs provider OAuth or refresh. */
3625
+ declare class InstallationCredentialsApi extends BaseApi {
3626
+ constructor(options: ServerApiOptions);
3627
+ create(params: CreateInstallationCredentialParams): Promise<InstallationCredentialSnapshot>;
3628
+ get(params: InstallationCredentialIdentity): Promise<InstallationCredentialSnapshot>;
3629
+ replace(params: ReplaceInstallationCredentialParams): Promise<InstallationCredentialSnapshot>;
3630
+ dispose(params: DisposeInstallationCredentialParams): Promise<{
3631
+ installationId: string;
3632
+ version: number;
3633
+ state: 'disposed';
3634
+ }>;
3635
+ }
3636
+
3637
+ type ExternalCustomerPreviousState = Record<string, string | number | boolean | null>;
3638
+ type ExternalCustomerLink = {
3639
+ id: string;
3640
+ customerId: string;
3641
+ namespace: string;
3642
+ accountScope: string;
3643
+ externalCustomerId: string | null;
3644
+ state: 'active' | 'released' | 'erased';
3645
+ connectedAt: string;
3646
+ releasedAt: string | null;
3647
+ version: number;
3648
+ previousState: ExternalCustomerPreviousState | null;
3649
+ };
3650
+ type ConnectExternalCustomerLinkParams = {
3651
+ integrationId: string;
3652
+ customerId: string;
3653
+ requestId: string;
3654
+ accountScope: string;
3655
+ externalCustomerId: string;
3656
+ };
3657
+ type GetExternalCustomerLinkParams = {
3658
+ integrationId: string;
3659
+ customerId: string;
3660
+ linkId: string;
3661
+ };
3662
+ type ListExternalCustomerLinksParams = {
3663
+ integrationId: string;
3664
+ customerId?: string;
3665
+ accountScope?: string;
3666
+ externalCustomerId?: string;
3667
+ state?: ExternalCustomerLink['state'];
3668
+ limit?: number;
3669
+ afterId?: string;
3670
+ };
3671
+ type MutateExternalCustomerLinkParams = GetExternalCustomerLinkParams & {
3672
+ requestId: string;
3673
+ expectedVersion: number;
3674
+ };
3675
+ type CaptureExternalCustomerPreviousStateParams = MutateExternalCustomerLinkParams & {
3676
+ previousState: ExternalCustomerPreviousState;
3677
+ };
3678
+ type ExternalCustomerLinkListResponse = {
3679
+ links: ExternalCustomerLink[];
3680
+ nextCursor: string | null;
3681
+ };
3682
+ /** Server-only Customer links. Provider access and changes remain in your server. */
3683
+ declare class ExternalCustomerLinksApi extends BaseApi {
3684
+ constructor(options: ServerApiOptions);
3685
+ private command;
3686
+ connect(params: ConnectExternalCustomerLinkParams): Promise<ExternalCustomerLink>;
3687
+ get(params: GetExternalCustomerLinkParams): Promise<ExternalCustomerLink>;
3688
+ list(params: ListExternalCustomerLinksParams): Promise<ExternalCustomerLinkListResponse>;
3689
+ unlink(params: MutateExternalCustomerLinkParams): Promise<ExternalCustomerLink>;
3690
+ capturePreviousState(params: CaptureExternalCustomerPreviousStateParams): Promise<ExternalCustomerLink>;
3691
+ clearPreviousState(params: MutateExternalCustomerLinkParams): Promise<ExternalCustomerLink>;
3692
+ }
3693
+
3299
3694
  /**
3300
3695
  * SDK-local hand-declarations of the membership wire contract types.
3301
3696
  *
@@ -3307,16 +3702,16 @@ declare class TenantIntrospectionApi extends RawBaseApi implements TenantIntrosp
3307
3702
  type MembershipStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'cancelled' | 'expired';
3308
3703
  /**
3309
3704
  * Parameters for the subscribe endpoint (delegated charge model).
3310
- * The storefront already collected the first payment for non-trial plans; this
3311
- * records it and activates the membership. Trial starts omit pgPaymentId until
3312
- * the renewal cron sends the first delegated charge.
3705
+ * A paid subscription prepares an immutable first charge. The tenant completes
3706
+ * that PSP payment with `firstCharge.idempotencyKey` and posts the existing
3707
+ * signed charge result before membership activation. Trial starts activate
3708
+ * immediately and do not include a first charge.
3313
3709
  */
3314
3710
  type SubscribeMembershipParams = {
3315
3711
  planId: string;
3316
3712
  priceId: string;
3317
3713
  /** Stable client-generated key used as the deduplication key for this subscription intent. */
3318
3714
  subscribeIntentKey: string;
3319
- pgPaymentId?: string;
3320
3715
  /** Internal Console customer document id. */
3321
3716
  customerId: string;
3322
3717
  /** Delegated payment provider customer reference. */
@@ -3326,9 +3721,20 @@ type SubscribeMembershipParams = {
3326
3721
  brand?: string;
3327
3722
  };
3328
3723
  };
3724
+ type PreparedFirstCharge = {
3725
+ idempotencyKey: string;
3726
+ amount: number;
3727
+ currency: string;
3728
+ periodStart: string;
3729
+ expiresAt: string;
3730
+ };
3329
3731
  type SubscribeMembershipResponse = {
3330
3732
  membershipId: string;
3331
- status: MembershipStatus;
3733
+ status: 'trialing';
3734
+ } | {
3735
+ membershipId: string;
3736
+ status: 'incomplete';
3737
+ firstCharge: PreparedFirstCharge;
3332
3738
  };
3333
3739
  /**
3334
3740
  * Parameters for cancelling a membership.
@@ -3343,6 +3749,41 @@ type CancelMembershipParams = {
3343
3749
  type CancelMembershipResponse = {
3344
3750
  status: MembershipStatus;
3345
3751
  };
3752
+ type BillingCustodyWireRequest = {
3753
+ kind: 'billing-custody.v1';
3754
+ membershipId: string;
3755
+ generation: string;
3756
+ action: 'read';
3757
+ } | {
3758
+ kind: 'billing-custody.v1';
3759
+ membershipId: string;
3760
+ generation: string;
3761
+ action: 'put';
3762
+ expectedVersion: number;
3763
+ ciphertext: string;
3764
+ } | {
3765
+ kind: 'billing-custody.v1';
3766
+ membershipId: string;
3767
+ generation: string;
3768
+ action: 'dispose';
3769
+ expectedVersion: number;
3770
+ };
3771
+ /** Server-only delegated billing connection proof is required in addition to sk01_. */
3772
+ type WithoutKind<T> = T extends unknown ? Omit<T, 'kind'> : never;
3773
+ type BillingCustodyParams = WithoutKind<BillingCustodyWireRequest> & {
3774
+ webhookSecret: string;
3775
+ };
3776
+ type BillingCustodyResponse = {
3777
+ action: 'read';
3778
+ version: number;
3779
+ ciphertext: string;
3780
+ } | {
3781
+ action: 'put';
3782
+ version: number;
3783
+ } | {
3784
+ action: 'dispose';
3785
+ version: number;
3786
+ };
3346
3787
  /**
3347
3788
  * The customer's own subscription view. Never includes a payment token or
3348
3789
  * subscribeIntentKey.
@@ -3581,9 +4022,16 @@ interface RootServerClient {
3581
4022
  memberships: {
3582
4023
  subscribe: (params: SubscribeMembershipParams) => Promise<SubscribeMembershipResponse>;
3583
4024
  cancel: (params: CancelMembershipParams) => Promise<CancelMembershipResponse>;
4025
+ billingCustody: (params: BillingCustodyParams) => Promise<BillingCustodyResponse>;
3584
4026
  };
4027
+ customerGroups: CustomerGroupApi;
4028
+ externalEffectClaims: ExternalEffectClaimsApi;
4029
+ installationCredentials: InstallationCredentialsApi;
4030
+ externalCustomerLinks: ExternalCustomerLinksApi;
3585
4031
  /** Set on {@link createServerClient} return values; optional for structural mocks. */
3586
4032
  events?: EventsClient;
4033
+ /** Quota-aware VOD admission. */
4034
+ video?: VideoPlaybackClient;
3587
4035
  community: CommunityClient & {
3588
4036
  moderation: {
3589
4037
  banCustomer: (p: BanCustomerParams) => Promise<CommunityBan>;
@@ -3610,4 +4058,4 @@ type DeepPartial<T> = {
3610
4058
  };
3611
4059
  type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
3612
4060
 
3613
- export { type PublicAttribute as $, type AddItemParams as A, type CreatePaymentSessionParams as B, CommerceClient as C, type CreatePortOnePaymentSessionParams as D, EventsClient as E, type CustomerSnapshot as F, type DebugConfig as G, type DeepPartial as H, type ExtractArrayType as I, type MembershipStatus as J, type Money as K, type PayloadMutationResponse as L, MarketDiscovery as M, type PaymentFailureReason as N, type OpenCheckoutPaymentState as O, type PayloadFindResponse as P, type PaymentNextAction as Q, type PaymentProviderStatus as R, type PaymentReconciliationReason as S, type PaymentSessionRole as T, type PortOneHostedPaymentMethod as U, type PortOnePaymentNextAction as V, type PortOnePublicPaymentSession as W, type ProductUpsertInput as X, type ProductUpsertParams as Y, type ProductUpsertResponse as Z, type ProductUpsertVariantInput as _, CommunityClient as a, type CollectionSchemaResponse as a$, type PublicCaptureEvidence as a0, type PublicCart as a1, type PublicCartItem as a2, type PublicCartItemAdmission as a3, type PublicCartMarket as a4, type PublicCartReference as a5, type PublicCheckout as a6, type PublicCheckoutItem as a7, type PublicMediaAsset as a8, type PublicMediaSize as a9, type UpdateDiscountCodesParams as aA, type UpdateItemParams as aB, type VariantInput as aC, type Where as aD, RawBaseApi as aE, type ServerApiOptions as aF, ServerCommerceClient as aG, type TenantIntrospectionClient as aH, type SubscribeMembershipParams as aI, type SubscribeMembershipResponse as aJ, type BanCustomerParams as aK, type CommunityBan as aL, type UnbanCustomerParams as aM, type ClientServerConfig as aN, type RootServerClientWithEvents as aO, type CancelServerPaymentSessionParams as aP, CartApi as aQ, type CartApiOptions as aR, CheckoutApi as aS, type CheckoutApiOptions as aT, type CheckoutListItem as aU, type CheckoutQueryParams as aV, type CheckoutQueryResult as aW, type CheckoutStatus as aX, type CollectionCustomFieldDefinition as aY, type CollectionCustomFields as aZ, type CollectionFieldSchema as a_, type PublicOrder as aa, type PublicOrderAmounts as ab, type PublicOrderItem as ac, type PublicOrderReference as ad, type PublicPaymentSession as ae, type ReconciliationRequired as af, type RemoveItemParams as ag, type RetrieveBrowserPaymentSessionParams as ah, type RetrieveCartParams as ai, type RetrieveCheckoutParams as aj, type RetryConfig as ak, type RootClient as al, type RootCollectionClient as am, type RootReadOnlyQueryBuilder as an, type ShippingLine as ao, type Sort as ap, type SpentCheckoutPaymentState as aq, type StorefrontContentListOptions as ar, type StorefrontContentReference as as, type StorefrontGalleryItem as at, type StorefrontGalleryItemsListOptions as au, type StorefrontGalleryItemsSort as av, type StorefrontLink as aw, type StorefrontLinksListOptions as ax, type StorefrontLinksSort as ay, type UpdateCartAttributesParams as az, ContentClient as b, type TenantFeatureProgressStatus as b$, type ConfirmCustomPaymentSessionOptions as b0, type ConfirmCustomPaymentSessionParams as b1, type ConfirmCustomPaymentSessionResponse as b2, type ConfirmTossPaymentSessionParams as b3, type CreateCustomPaymentSessionParams as b4, type CreateServerCheckoutParams as b5, type CreateServerCheckoutResult as b6, type CustomPaymentSession as b7, type CustomPaymentSessionProof as b8, type EventAdmissionAvailabilityParams as b9, type PaymentSessionApiOptions as bA, type PortOnePaymentCurrentState as bB, PortOnePaymentReconciliationApi as bC, type PortOnePaymentSelector as bD, type PortOneReconciliationDisposition as bE, type ReconcilePortOnePaymentParams as bF, type ReconcilePortOnePaymentResult as bG, type RetrieveCustomPaymentSessionParams as bH, type RetrieveServerCheckoutParams as bI, type RetrieveServerPaymentSessionParams as bJ, type RetrievedCustomPaymentSession as bK, type RootServerClient as bL, type ServerCartMergeParams as bM, type ServerCartMineParams as bN, type ServerCheckout as bO, TENANT_CONTEXT_PATH as bP, type TenantContextInput as bQ, type TenantContextResponse as bR, type TenantCustomFieldType as bS, type TenantFeatureProgressEvidenceValue as bT, type TenantFeatureProgressFeature as bU, type TenantFeatureProgressGroup as bV, type TenantFeatureProgressInput as bW, type TenantFeatureProgressItem as bX, type TenantFeatureProgressItemState as bY, type TenantFeatureProgressResponse as bZ, type TenantFeatureProgressSeverity as b_, type EventAdmissionAvailabilityResponse as ba, type EventAdmissionAvailabilityType as bb, type EventAdmissionPricePresentment as bc, type EventGuestCancelParams as bd, type EventGuestRegistration as be, type EventGuestRegistrationResponse as bf, type EventRegistrationAnswerInput as bg, type EventRegistrationAttendeeInput as bh, type EventRegistrationPublic as bi, type EventRegistrationRegisterParams as bj, type EventRegistrationRegisterResponse as bk, type EventsCalendarItem as bl, type EventsClientOptions as bm, type EventsDateParam as bn, type EventsExternalSource as bo, type EventsLocation as bp, type EventsOccurrenceLocation as bq, type EventsRangeEvent as br, type EventsRangeOccurrence as bs, type EventsRangeParams as bt, type EventsRangeResponse as bu, type EventsTaxonomyItem as bv, type FindPortOnePaymentParams as bw, type FindPortOnePaymentResult as bx, ModerationApi as by, PaymentSessionApi as bz, CustomerNamespace as c, type FeaturedImagePointerInput as c$, type TenantFieldConfigState as c0, TenantIntrospectionApi as c1, type TenantIntrospectionApiOptions as c2, type ApiDeleteOptions as c3, type PublicReadQueryOptions as c4, CustomerAuth as c5, type CustomerProfile as c6, type CustomerAuthResponse as c7, type CustomerLoginData as c8, type CustomerRegisterResponse as c9, type CartWarningCode as cA, type Comment as cB, type CommerceClientOptions as cC, type CommunityClientOptions as cD, type CommunityComment as cE, type CommunityCommentListSort as cF, type CommunityPost as cG, type CommunityPostCategory as cH, type CommunityPostListSort as cI, type CommunityPostTag as cJ, type CommunityPublicAuthorSnapshot as cK, type CommunityPublicMediaAsset as cL, type CommunityPublicReference as cM, type CompatibilityProductSelectionParamEvent as cN, type CreateFulfillmentParams as cO, type CreateReturnParams as cP, type CustomerAuthOptions as cQ, type CustomerAuthorizationUrlInput as cR, type CustomerAuthorizationUrlResult as cS, CustomerOAuth as cT, type CustomerOAuthCallbackResult as cU, type CustomerOAuthConfig as cV, type CustomerOAuthTokenSet as cW, type CustomerOrderListOptions as cX, DiscountApi as cY, type DiscountApiOptions as cZ, type DiscountErrorReasonCode as c_, type CustomerRegisterData as ca, type CustomerRefreshResponse as cb, type UpdateProfileData as cc, type ProductListingPageParams as cd, type ProductListingPageBaseParams as ce, type ProductDetailParams as cf, type ProductDetailCatalogResult as cg, type ProductListingPageCatalogParams as ch, type ProductListingPageResult as ci, type ProductListingGroupsCatalogItem as cj, type ProductListingPageFullParams as ck, type ProductListingGroupsItem as cl, BaseApi as cm, type ProductDetail as cn, type ProductDetailCatalog as co, type StockSnapshotResponse as cp, type RootClientWithEvents as cq, type BulkImportFulfillmentsParams as cr, type BulkImportFulfillmentsResponse as cs, type CalculateShippingParams as ct, type CalculateShippingResult as cu, type CancelOrderParams as cv, type CancelOrderResponse as cw, type CancelReasonCode as cx, type CartDiscountCode as cy, type CartWarning as cz, type CustomerMembershipView as d, type ProductMoneyRange as d$, type GetOrderByPaymentIdParams as d0, type LegacyProductSelectionParamEvent as d1, type ListingGroupsParams as d2, MAX_CART_LINE_ADMISSIONS as d3, type ManagedPaymentNextAction as d4, type ManagedPublicPaymentSession as d5, type MarketDTO as d6, type MediaValue as d7, type NormalizedOptionSwatch as d8, type NormalizedProductSelection as d9, type ProductFallbackLocaleOption as dA, type ProductHrefGroup as dB, type ProductHrefOptions as dC, type ProductHrefProduct as dD, type ProductListingCard as dE, type ProductListingCardOptions as dF, type ProductListingCardPriceRange as dG, type ProductListingCardRepresentativeVariant as dH, type ProductListingGroup as dI, type ProductListingGroupCatalogSummary as dJ, type ProductListingGroupCatalogVariant as dK, type ProductListingGroupProjection as dL, type ProductListingGroupSummary as dM, type ProductListingGroupVariant as dN, type ProductListingGroupsCatalogProduct as dO, type ProductListingGroupsCatalogResponse as dP, type ProductListingGroupsProduct as dQ, type ProductListingGroupsResponse as dR, type ProductListingPageFilters as dS, type ProductListingPageSort as dT, type ProductListingProductShape as dU, type ProductListingSwatch as dV, type ProductLocaleOption as dW, type ProductLocaleReadParams as dX, type ProductLocalizedText as dY, type ProductLocalizedValue as dZ, type ProductMediaResolutionSource as d_, OrderApi as da, type OrderApiOptions as db, type OrderByPaymentResult as dc, PRODUCT_PLP_FIND_OPTIONS as dd, PRODUCT_UPSERT_READONLY_FIELD_REASON as de, PRODUCT_UPSERT_UNKNOWN_FIELD_REASON as df, type PrepareFulfillmentOrderParams as dg, type PrepareFulfillmentOrderResponse as dh, ProductApi as di, type ProductApiOptions as dj, type ProductDetailBrand as dk, type ProductDetailCatalogVariant as dl, type ProductDetailCategory as dm, type ProductDetailImage as dn, type ProductDetailImageMedia as dp, type ProductDetailMedia as dq, type ProductDetailOption as dr, type ProductDetailOptionValue as ds, type ProductDetailResult as dt, type ProductDetailTag as du, type ProductDetailUnavailableReason as dv, type ProductDetailVariant as dw, type ProductDetailVariantOptionValue as dx, type ProductDetailVideo as dy, type ProductDisplayMediaSource as dz, type CancelMembershipParams as e, getProductSelectionImages as e$, type ProductOptionMatrix as e0, type ProductOptionMatrixOption as e1, type ProductOptionMatrixValue as e2, type ProductOptionMatrixVariant as e3, type ProductOptionShape as e4, type ProductOptionValueShape as e5, type ProductOptionValueSwatch as e6, type ProductOptionValueSwatchInput as e7, type ProductPriceRange as e8, type ProductSelectionAvailableSwatch as e9, type ResolvedCatalogPrice as eA, type ReturnCancellationReasonCode as eB, type ReturnItem as eC, type ReturnReason as eD, type ReturnWithRefundItem as eE, type ReturnWithRefundParams as eF, ShippingApi as eG, type ShippingApiOptions as eH, type StockCheckParams as eI, type StockCheckResponse as eJ, type StockCheckResult as eK, type StockSnapshotItem as eL, type StockSnapshotParams as eM, type UpdateFulfillmentParams as eN, type UpdateOrderParams as eO, type UpdateReturnParams as eP, type ValidateDiscountParams as eQ, type ValidateDiscountResult as eR, type WithIdempotencyKey as eS, buildProductHref as eT, buildProductListingCard as eU, buildProductListingGroupProjection as eV, buildProductListingGroupsByOption as eW, buildProductOptionMatrix as eX, buildProductOptionMatrixFromDetail as eY, createProductSelectionCodec as eZ, getAvailableOptionValues as e_, type ProductSelectionAvailableValue as ea, type ProductSelectionByOptionValue as eb, ProductSelectionCodecError as ec, type ProductSelectionCodecOptions as ed, type ProductSelectionInput as ee, type ProductSelectionMediaPointer as ef, type ProductSelectionMediaSource as eg, type ProductSelectionOptionValue as eh, type ProductSelectionResolution as ei, type ProductSelectionResolutionContext as ej, type ProductSelectionUrlEmit as ek, type ProductSelectionVariant$1 as el, type ProductUpsertFieldValidationErrorBody as em, type ProductUpsertFieldValidationErrorReason as en, type ProductVariantShape as eo, type PublicCheckoutBase as ep, type RequestOptions as eq, type ResolveCancelRefundFailedResponse as er, type ResolveCancelRefundOutcome as es, type ResolveCancelRefundParams as et, type ResolveCancelRefundResponse as eu, type ResolveCancelRefundSucceededResponse as ev, type ResolveProductDisplayMediaInput as ew, type ResolveProductDisplayMediaResult as ex, type ResolveProductSelectionMediaInput as ey, type ResolveProductSelectionMediaResult as ez, type CancelMembershipResponse as f, getSelectedValueByOptionId as f0, getVariantAvailableForSale as f1, getVariantAvailableStock as f2, isProductUpsertFieldValidationErrorBody as f3, normalizeProductSelection as f4, normalizeProductSelectionFromMatrix as f5, normalizeSelectedValueIds as f6, parseProductSelection as f7, projectProductToListingShape as f8, resolveFeaturedImagePointer as f9, resolveProductDisplayMedia as fa, resolveProductSelection as fb, resolveProductSelectionFromMatrix as fc, resolveProductSelectionMedia as fd, resolveVariantForSelection as fe, selectNext as ff, selectedSwatchMediaItemId as fg, stringifyProductSelection as fh, toShopifyPriceRangeV2 as fi, type ClientState as g, type ClientConfig as h, type ApiQueryOptions as i, type CancelBrowserPaymentSessionParams as j, type CartMergeParams as k, type CartMergeResult as l, type CartMineResult as m, type CartMutationResult as n, type CheckoutAbandonedReason as o, type CheckoutAmounts as p, type CheckoutOrderReference as q, type CheckoutPaymentSessionRef as r, type CheckoutShippingAddress as s, type ClearCartParams as t, type ClientMetadata as u, type ContentClientOptions as v, type CreateCartParams as w, type CreateCartResult as x, type CreateCheckoutParams as y, type CreateCheckoutResult as z };
4061
+ export { type PublicAttribute as $, type AddItemParams as A, type CreatePaymentSessionParams as B, CommerceClient as C, type CreatePortOnePaymentSessionParams as D, EventsClient as E, type CustomerSnapshot as F, type DebugConfig as G, type DeepPartial as H, type ExtractArrayType as I, type MembershipStatus as J, type Money as K, type PayloadMutationResponse as L, MarketDiscovery as M, type PaymentFailureReason as N, type OpenCheckoutPaymentState as O, type PayloadFindResponse as P, type PaymentNextAction as Q, type PaymentProviderStatus as R, type PaymentReconciliationReason as S, type PaymentSessionRole as T, type PortOneHostedPaymentMethod as U, type PortOnePaymentNextAction as V, type PortOnePublicPaymentSession as W, type ProductUpsertInput as X, type ProductUpsertParams as Y, type ProductUpsertResponse as Z, type ProductUpsertVariantInput as _, CommunityClient as a, type CheckoutApiOptions as a$, type PublicCaptureEvidence as a0, type PublicCart as a1, type PublicCartItem as a2, type PublicCartItemAdmission as a3, type PublicCartMarket as a4, type PublicCartReference as a5, type PublicCheckout as a6, type PublicCheckoutItem as a7, type PublicMediaAsset as a8, type PublicMediaSize as a9, type UpdateDiscountCodesParams as aA, type UpdateItemParams as aB, type VariantInput as aC, type Where as aD, RawBaseApi as aE, type ServerApiOptions as aF, ServerCommerceClient as aG, type TenantIntrospectionClient as aH, type SubscribeMembershipParams as aI, type SubscribeMembershipResponse as aJ, type BillingCustodyParams as aK, type BillingCustodyResponse as aL, CustomerGroupApi as aM, ExternalEffectClaimsApi as aN, InstallationCredentialsApi as aO, ExternalCustomerLinksApi as aP, VideoPlaybackClient as aQ, type BanCustomerParams as aR, type CommunityBan as aS, type UnbanCustomerParams as aT, type ClientServerConfig as aU, type RootServerClientWithEvents as aV, type CancelServerPaymentSessionParams as aW, type CaptureExternalCustomerPreviousStateParams as aX, CartApi as aY, type CartApiOptions as aZ, CheckoutApi as a_, type PublicOrder as aa, type PublicOrderAmounts as ab, type PublicOrderItem as ac, type PublicOrderReference as ad, type PublicPaymentSession as ae, type ReconciliationRequired as af, type RemoveItemParams as ag, type RetrieveBrowserPaymentSessionParams as ah, type RetrieveCartParams as ai, type RetrieveCheckoutParams as aj, type RetryConfig as ak, type RootClient as al, type RootCollectionClient as am, type RootReadOnlyQueryBuilder as an, type ShippingLine as ao, type Sort as ap, type SpentCheckoutPaymentState as aq, type StorefrontContentListOptions as ar, type StorefrontContentReference as as, type StorefrontGalleryItem as at, type StorefrontGalleryItemsListOptions as au, type StorefrontGalleryItemsSort as av, type StorefrontLink as aw, type StorefrontLinksListOptions as ax, type StorefrontLinksSort as ay, type UpdateCartAttributesParams as az, ContentClient as b, type GetExternalCustomerLinkParams as b$, type CheckoutListItem as b0, type CheckoutQueryParams as b1, type CheckoutQueryResult as b2, type CheckoutStatus as b3, type ClaimExternalEffectParams as b4, type CollectionCustomFieldDefinition as b5, type CollectionCustomFields as b6, type CollectionFieldSchema as b7, type CollectionSchemaResponse as b8, type ConfirmCustomPaymentSessionOptions as b9, type EventGuestRegistrationResponse as bA, type EventRegistrationAnswerInput as bB, type EventRegistrationAttendeeInput as bC, type EventRegistrationPublic as bD, type EventRegistrationRegisterParams as bE, type EventRegistrationRegisterResponse as bF, type EventsCalendarItem as bG, type EventsClientOptions as bH, type EventsDateParam as bI, type EventsExternalSource as bJ, type EventsLocation as bK, type EventsOccurrenceLocation as bL, type EventsRangeEvent as bM, type EventsRangeOccurrence as bN, type EventsRangeParams as bO, type EventsRangeResponse as bP, type EventsTaxonomyItem as bQ, type ExternalCustomerLink as bR, type ExternalCustomerLinkListResponse as bS, type ExternalCustomerPreviousState as bT, type ExternalEffectClaimErrorReason as bU, type ExternalEffectClaimSnapshot as bV, type ExternalEffectClaimState as bW, type ExternalEffectLeaseParams as bX, type ExternalEffectLocator as bY, type FindPortOnePaymentParams as bZ, type FindPortOnePaymentResult as b_, type ConfirmCustomPaymentSessionParams as ba, type ConfirmCustomPaymentSessionResponse as bb, type ConfirmTossPaymentSessionParams as bc, type ConnectExternalCustomerLinkParams as bd, type CreateCustomPaymentSessionParams as be, type CreateInstallationCredentialParams as bf, type CreateServerCheckoutParams as bg, type CreateServerCheckoutResult as bh, type CreateServerPaymentSessionParams as bi, type CreateServerPortOnePaymentSessionParams as bj, type CustomPaymentSession as bk, type CustomPaymentSessionProof as bl, type CustomerGroupApiOptions as bm, type CustomerGroupManualSource as bn, type CustomerGroupMember as bo, type CustomerGroupMemberCommandResponse as bp, type CustomerGroupMemberSource as bq, type CustomerGroupMembershipSource as br, type CustomerGroupMembershipState as bs, type DisposeInstallationCredentialParams as bt, type EventAdmissionAvailabilityParams as bu, type EventAdmissionAvailabilityResponse as bv, type EventAdmissionAvailabilityType as bw, type EventAdmissionPricePresentment as bx, type EventGuestCancelParams as by, type EventGuestRegistration as bz, CustomerNamespace as c, type ProductListingPageResult as c$, type GetExternalEffectClaimParams as c0, type GrantCustomerGroupMemberParams as c1, type InstallationCredentialIdentity as c2, type InstallationCredentialSnapshot as c3, type ListCustomerGroupMembersParams as c4, type ListCustomerGroupMembersResponse as c5, type ListExternalCustomerLinksParams as c6, ModerationApi as c7, type MutateExternalCustomerLinkParams as c8, PaymentSessionApi as c9, type TenantFeatureProgressFeature as cA, type TenantFeatureProgressGroup as cB, type TenantFeatureProgressInput as cC, type TenantFeatureProgressItem as cD, type TenantFeatureProgressItemState as cE, type TenantFeatureProgressResponse as cF, type TenantFeatureProgressSeverity as cG, type TenantFeatureProgressStatus as cH, type TenantFieldConfigState as cI, TenantIntrospectionApi as cJ, type TenantIntrospectionApiOptions as cK, getExternalEffectClaimErrorReason as cL, type ApiDeleteOptions as cM, type PublicReadQueryOptions as cN, CustomerAuth as cO, type CustomerProfile as cP, type CustomerAuthResponse as cQ, type CustomerLoginData as cR, type CustomerRegisterResponse as cS, type CustomerRegisterData as cT, type CustomerRefreshResponse as cU, type UpdateProfileData as cV, type ProductListingPageParams as cW, type ProductListingPageBaseParams as cX, type ProductDetailParams as cY, type ProductDetailCatalogResult as cZ, type ProductListingPageCatalogParams as c_, type PaymentSessionApiOptions as ca, type PortOnePaymentCurrentState as cb, PortOnePaymentReconciliationApi as cc, type PortOnePaymentSelector as cd, type PortOneReconciliationDisposition as ce, type ReconcilePortOnePaymentParams as cf, type ReconcilePortOnePaymentResult as cg, type RecordExternalEffectRecoveryParams as ch, type ReplaceInstallationCredentialParams as ci, type ReportExternalEffectParams as cj, type RetrieveCustomPaymentSessionParams as ck, type RetrieveServerCheckoutParams as cl, type RetrieveServerPaymentSessionParams as cm, type RetrievedCustomPaymentSession as cn, type RevokeCustomerGroupMemberParams as co, type RootServerClient as cp, type ServerAddItemParams as cq, type ServerCartMergeParams as cr, type ServerCartMineParams as cs, type ServerCheckout as ct, type ServerUpdateItemParams as cu, TENANT_CONTEXT_PATH as cv, type TenantContextInput as cw, type TenantContextResponse as cx, type TenantCustomFieldType as cy, type TenantFeatureProgressEvidenceValue as cz, type CustomerMembershipView as d, PRODUCT_UPSERT_UNKNOWN_FIELD_REASON as d$, type ProductListingGroupsCatalogItem as d0, type ProductListingPageFullParams as d1, type ProductListingGroupsItem as d2, BaseApi as d3, type ProductDetail as d4, type ProductDetailCatalog as d5, type StockSnapshotResponse as d6, type RootClientWithEvents as d7, type BillingCustodyWireRequest as d8, type BulkImportFulfillmentsParams as d9, type CustomerAuthorizationUrlInput as dA, type CustomerAuthorizationUrlResult as dB, CustomerOAuth as dC, type CustomerOAuthCallbackResult as dD, type CustomerOAuthConfig as dE, type CustomerOAuthTokenSet as dF, type CustomerOrderListOptions as dG, type CustomerWithdrawalResult as dH, DiscountApi as dI, type DiscountApiOptions as dJ, type DiscountErrorReasonCode as dK, type FeaturedImagePointerInput as dL, type GetOrderByPaymentIdParams as dM, type LegacyProductSelectionParamEvent as dN, type ListingGroupsParams as dO, MAX_CART_LINE_ADMISSIONS as dP, type ManagedPaymentNextAction as dQ, type ManagedPublicPaymentSession as dR, type MarketDTO as dS, type MediaValue as dT, type NormalizedOptionSwatch as dU, type NormalizedProductSelection as dV, OrderApi as dW, type OrderApiOptions as dX, type OrderByPaymentResult as dY, PRODUCT_PLP_FIND_OPTIONS as dZ, PRODUCT_UPSERT_READONLY_FIELD_REASON as d_, type BulkImportFulfillmentsResponse as da, type CalculateShippingParams as db, type CalculateShippingResult as dc, type CancelOrderParams as dd, type CancelOrderResponse as de, type CancelReasonCode as df, type CartDiscountCode as dg, type CartWarning as dh, type CartWarningCode as di, type Comment as dj, type CommerceClientOptions as dk, type CommunityClientOptions as dl, type CommunityComment as dm, type CommunityCommentListSort as dn, type CommunityPost as dp, type CommunityPostCategory as dq, type CommunityPostListSort as dr, type CommunityPostTag as ds, type CommunityPublicAuthorSnapshot as dt, type CommunityPublicMediaAsset as du, type CommunityPublicReference as dv, type CompatibilityProductSelectionParamEvent as dw, type CreateFulfillmentParams as dx, type CreateReturnParams as dy, type CustomerAuthOptions as dz, type CancelMembershipParams as e, type ProductSelectionMediaSource as e$, type PrepareFulfillmentOrderParams as e0, type PrepareFulfillmentOrderResponse as e1, ProductApi as e2, type ProductApiOptions as e3, type ProductDetailBrand as e4, type ProductDetailCatalogVariant as e5, type ProductDetailCategory as e6, type ProductDetailImage as e7, type ProductDetailImageMedia as e8, type ProductDetailMedia as e9, type ProductListingGroupsResponse as eA, type ProductListingPageFilters as eB, type ProductListingPageSort as eC, type ProductListingProductShape as eD, type ProductListingSwatch as eE, type ProductLocaleOption as eF, type ProductLocaleReadParams as eG, type ProductLocalizedText as eH, type ProductLocalizedValue as eI, type ProductMediaResolutionSource as eJ, type ProductMoneyRange as eK, type ProductOptionMatrix as eL, type ProductOptionMatrixOption as eM, type ProductOptionMatrixValue as eN, type ProductOptionMatrixVariant as eO, type ProductOptionShape as eP, type ProductOptionValueShape as eQ, type ProductOptionValueSwatch as eR, type ProductOptionValueSwatchInput as eS, type ProductPriceRange as eT, type ProductSelectionAvailableSwatch as eU, type ProductSelectionAvailableValue as eV, type ProductSelectionByOptionValue as eW, ProductSelectionCodecError as eX, type ProductSelectionCodecOptions as eY, type ProductSelectionInput as eZ, type ProductSelectionMediaPointer as e_, type ProductDetailOption as ea, type ProductDetailOptionValue as eb, type ProductDetailResult as ec, type ProductDetailTag as ed, type ProductDetailUnavailableReason as ee, type ProductDetailVariant as ef, type ProductDetailVariantOptionValue as eg, type ProductDetailVideo as eh, type ProductDisplayMediaSource as ei, type ProductFallbackLocaleOption as ej, type ProductHrefGroup as ek, type ProductHrefOptions as el, type ProductHrefProduct as em, type ProductListingCard as en, type ProductListingCardOptions as eo, type ProductListingCardPriceRange as ep, type ProductListingCardRepresentativeVariant as eq, type ProductListingGroup as er, type ProductListingGroupCatalogSummary as es, type ProductListingGroupCatalogVariant as et, type ProductListingGroupProjection as eu, type ProductListingGroupSummary as ev, type ProductListingGroupVariant as ew, type ProductListingGroupsCatalogProduct as ex, type ProductListingGroupsCatalogResponse as ey, type ProductListingGroupsProduct as ez, type CancelMembershipResponse as f, selectNext as f$, type ProductSelectionOptionValue as f0, type ProductSelectionResolution as f1, type ProductSelectionResolutionContext as f2, type ProductSelectionUrlEmit as f3, type ProductSelectionVariant$1 as f4, type ProductUpsertFieldValidationErrorBody as f5, type ProductUpsertFieldValidationErrorReason as f6, type ProductVariantShape as f7, type PublicCheckoutBase as f8, type RequestOptions as f9, type ValidateDiscountResult as fA, type VideoPlaybackResponse as fB, type WithIdempotencyKey as fC, buildProductHref as fD, buildProductListingCard as fE, buildProductListingGroupProjection as fF, buildProductListingGroupsByOption as fG, buildProductOptionMatrix as fH, buildProductOptionMatrixFromDetail as fI, createProductSelectionCodec as fJ, getAvailableOptionValues as fK, getProductSelectionImages as fL, getSelectedValueByOptionId as fM, getVariantAvailableForSale as fN, getVariantAvailableStock as fO, isProductUpsertFieldValidationErrorBody as fP, normalizeProductSelection as fQ, normalizeProductSelectionFromMatrix as fR, normalizeSelectedValueIds as fS, parseProductSelection as fT, projectProductToListingShape as fU, resolveFeaturedImagePointer as fV, resolveProductDisplayMedia as fW, resolveProductSelection as fX, resolveProductSelectionFromMatrix as fY, resolveProductSelectionMedia as fZ, resolveVariantForSelection as f_, type ResolveCancelRefundFailedResponse as fa, type ResolveCancelRefundOutcome as fb, type ResolveCancelRefundParams as fc, type ResolveCancelRefundResponse as fd, type ResolveCancelRefundSucceededResponse as fe, type ResolveProductDisplayMediaInput as ff, type ResolveProductDisplayMediaResult as fg, type ResolveProductSelectionMediaInput as fh, type ResolveProductSelectionMediaResult as fi, type ResolvedCatalogPrice as fj, type ReturnCancellationReasonCode as fk, type ReturnItem as fl, type ReturnReason as fm, type ReturnWithRefundItem as fn, type ReturnWithRefundParams as fo, ShippingApi as fp, type ShippingApiOptions as fq, type StockCheckParams as fr, type StockCheckResponse as fs, type StockCheckResult as ft, type StockSnapshotItem as fu, type StockSnapshotParams as fv, type UpdateFulfillmentParams as fw, type UpdateOrderParams as fx, type UpdateReturnParams as fy, type ValidateDiscountParams as fz, type ClientState as g, selectedSwatchMediaItemId as g0, stringifyProductSelection as g1, toShopifyPriceRangeV2 as g2, type ClientConfig as h, type ApiQueryOptions as i, type CancelBrowserPaymentSessionParams as j, type CartMergeParams as k, type CartMergeResult as l, type CartMineResult as m, type CartMutationResult as n, type CheckoutAbandonedReason as o, type CheckoutAmounts as p, type CheckoutOrderReference as q, type CheckoutPaymentSessionRef as r, type CheckoutShippingAddress as s, type ClearCartParams as t, type ClientMetadata as u, type ContentClientOptions as v, type CreateCartParams as w, type CreateCartResult as x, type CreateCheckoutParams as y, type CreateCheckoutResult as z };