brainerce 2.0.0 → 2.1.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 +757 -295
- package/dist/index.d.mts +956 -186
- package/dist/index.d.ts +956 -186
- package/dist/index.js +454 -130
- package/dist/index.mjs +454 -130
- package/package.json +84 -84
package/dist/index.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ interface BrainerceClientOptions {
|
|
|
14
14
|
salesChannelId?: string;
|
|
15
15
|
/**
|
|
16
16
|
* @deprecated Use `salesChannelId` instead. `connectionId` is kept as a
|
|
17
|
-
* backwards-compatible alias and
|
|
17
|
+
* backwards-compatible alias. It is permanent and is not scheduled for removal.
|
|
18
18
|
*/
|
|
19
19
|
connectionId?: string;
|
|
20
20
|
/**
|
|
@@ -202,13 +202,13 @@ interface StoreInfo {
|
|
|
202
202
|
socialLinks?: Record<string, string> | null;
|
|
203
203
|
/** Sales Channel ID (sales-channel mode only) */
|
|
204
204
|
salesChannelId?: string;
|
|
205
|
-
/** @deprecated alias of `salesChannelId` —
|
|
205
|
+
/** @deprecated permanent back-compat alias of `salesChannelId` — not scheduled for removal */
|
|
206
206
|
connectionId?: string;
|
|
207
207
|
/** Store name (sales-channel mode only - same as name) */
|
|
208
208
|
storeName?: string;
|
|
209
209
|
/** Sales channel status (sales-channel mode only) */
|
|
210
210
|
salesChannelStatus?: string;
|
|
211
|
-
/** @deprecated alias of `salesChannelStatus` —
|
|
211
|
+
/** @deprecated permanent back-compat alias of `salesChannelStatus` — not scheduled for removal */
|
|
212
212
|
status?: string;
|
|
213
213
|
/** Allowed API scopes (sales-channel mode only) */
|
|
214
214
|
allowedScopes?: string[];
|
|
@@ -224,6 +224,21 @@ interface StoreInfo {
|
|
|
224
224
|
* like it worked and quietly does nothing.
|
|
225
225
|
*/
|
|
226
226
|
stockAlertsEnabled?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Whether this store takes donations.
|
|
229
|
+
*
|
|
230
|
+
* Gate the whole donation page on it. Unlike almost every other conditional
|
|
231
|
+
* surface in this SDK, a donation page does NOT auto-hide: `createDonation`
|
|
232
|
+
* is rejected outright while donations are closed, so a page built for a
|
|
233
|
+
* store that has not opened them collects a donor's name, email and card
|
|
234
|
+
* details and then fails on submit.
|
|
235
|
+
*
|
|
236
|
+
* Present on both `/info` endpoints, so this works in storefront mode as well
|
|
237
|
+
* as vibe-coded mode. `getStoreCapabilities().features.hasDonations` carries
|
|
238
|
+
* the same fact but is vibe-coded only. Absent on an older backend, and
|
|
239
|
+
* absent means closed.
|
|
240
|
+
*/
|
|
241
|
+
donationsEnabled?: boolean;
|
|
227
242
|
/**
|
|
228
243
|
* Whether new customer registrations require email verification.
|
|
229
244
|
* If true, your site MUST implement an email verification flow:
|
|
@@ -398,6 +413,116 @@ interface SupportedLocaleObject {
|
|
|
398
413
|
/** Whether this is the store's default locale */
|
|
399
414
|
isDefault: boolean;
|
|
400
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* What the merchant has actually configured on this sales channel — the
|
|
418
|
+
* response of {@link BrainerceClient.getStoreCapabilities}.
|
|
419
|
+
*
|
|
420
|
+
* Build against this instead of hardcoding. A storefront that hardcodes a
|
|
421
|
+
* low-stock threshold shows the wrong badge on every store whose merchant
|
|
422
|
+
* chose a different one, and a storefront that renders a feature the merchant
|
|
423
|
+
* never switched on ships a control that does nothing.
|
|
424
|
+
*/
|
|
425
|
+
interface StoreCapabilities {
|
|
426
|
+
store: {
|
|
427
|
+
/** Parent store name (account level). */
|
|
428
|
+
name: string;
|
|
429
|
+
/** Per-channel display name — what the merchant sees in the dashboard. */
|
|
430
|
+
channelName: string;
|
|
431
|
+
/** ISO 4217 code the store prices in. */
|
|
432
|
+
currency: string;
|
|
433
|
+
/** The store's content language (BCP-47). */
|
|
434
|
+
language: string;
|
|
435
|
+
/**
|
|
436
|
+
* Present ONLY when the merchant enabled multi-language on this store.
|
|
437
|
+
* Absent means single-language: render `language` and do not build a
|
|
438
|
+
* locale switcher. When present, `enabled` is always `true`.
|
|
439
|
+
*/
|
|
440
|
+
i18n?: I18nSettings;
|
|
441
|
+
};
|
|
442
|
+
connection: {
|
|
443
|
+
/** API scopes granted to this channel. A call outside them is rejected. */
|
|
444
|
+
allowedScopes: string[];
|
|
445
|
+
/** Whether this channel may create orders (`orders:write`). */
|
|
446
|
+
ordersWriteEnabled: boolean;
|
|
447
|
+
/** Whether guest checkout sessions are recorded for abandoned-cart recovery. */
|
|
448
|
+
guestCheckoutTracking: boolean;
|
|
449
|
+
/** Whether a newly registered customer must verify their email address. */
|
|
450
|
+
requireEmailVerification: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* The merchant made the birthday mandatory at registration on this channel.
|
|
453
|
+
* Render the signup form's month and day as required when true: the register
|
|
454
|
+
* route rejects a registration without one, and a form that does not read
|
|
455
|
+
* this cannot be submitted and tells the shopper nothing about why.
|
|
456
|
+
*/
|
|
457
|
+
requireBirthday: boolean;
|
|
458
|
+
/** Whether test orders may complete without a real payment. */
|
|
459
|
+
sandboxPaymentsEnabled: boolean;
|
|
460
|
+
/** When stock is held: at cart, at checkout creation, or at payment. */
|
|
461
|
+
reservationStrategy: 'ON_CART' | 'ON_CHECKOUT' | 'ON_PAYMENT';
|
|
462
|
+
/** Minutes a reservation is held before it expires. */
|
|
463
|
+
reservationTimeout: number;
|
|
464
|
+
/**
|
|
465
|
+
* Whether the storefront should call out low stock at all. When `false`,
|
|
466
|
+
* show no low-stock treatment regardless of `lowStockThreshold` — the
|
|
467
|
+
* merchant turned the urgency messaging off on purpose.
|
|
468
|
+
*/
|
|
469
|
+
lowStockWarning: boolean;
|
|
470
|
+
/** Units at or below which stock counts as low. Merchant-configured; defaults to 5. */
|
|
471
|
+
lowStockThreshold: number;
|
|
472
|
+
/**
|
|
473
|
+
* Whether the storefront should offer "email me when this is back" on a
|
|
474
|
+
* sold-out product. When `false`, do not render the affordance at all:
|
|
475
|
+
* `stockAlerts.subscribe()` still answers `{ ok: true }` and records
|
|
476
|
+
* nothing, so a button left up looks like it worked and quietly does not.
|
|
477
|
+
*/
|
|
478
|
+
stockAlertsEnabled: boolean;
|
|
479
|
+
};
|
|
480
|
+
features: {
|
|
481
|
+
/** Payment gateways the merchant installed. Empty means checkout cannot take money yet. */
|
|
482
|
+
paymentProviders: Array<{
|
|
483
|
+
name: string;
|
|
484
|
+
provider: string;
|
|
485
|
+
}>;
|
|
486
|
+
/** Social login providers configured on the store, with their on/off state. */
|
|
487
|
+
oauthProviders: Array<{
|
|
488
|
+
provider: string;
|
|
489
|
+
isEnabled: boolean;
|
|
490
|
+
}>;
|
|
491
|
+
/** At least one active shipping zone exists. */
|
|
492
|
+
hasShippingZones: boolean;
|
|
493
|
+
/** At least one enabled automatic discount rule exists. */
|
|
494
|
+
hasDiscountRules: boolean;
|
|
495
|
+
/** At least one product is a digital download. */
|
|
496
|
+
hasDownloadableProducts: boolean;
|
|
497
|
+
/** At least one coupon exists. */
|
|
498
|
+
hasCoupons: boolean;
|
|
499
|
+
/** At least one active checkout custom field is defined. */
|
|
500
|
+
hasCheckoutCustomFields: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Gift cards are switched on for this store.
|
|
503
|
+
*
|
|
504
|
+
* A per-store switch, not a count — a store that has issued no cards yet
|
|
505
|
+
* still reports true once the merchant enables the feature. Build the
|
|
506
|
+
* redemption field regardless: it auto-hides, and the day a card is issued
|
|
507
|
+
* the storefront already honours it.
|
|
508
|
+
*/
|
|
509
|
+
hasGiftCards: boolean;
|
|
510
|
+
/** At least one PUBLISHED content entry (page, blog post, FAQ) exists. */
|
|
511
|
+
hasContent: boolean;
|
|
512
|
+
/** The store has an ACTIVE loyalty program. */
|
|
513
|
+
hasLoyaltyProgram: boolean;
|
|
514
|
+
/** The loyalty program has referrals enabled. */
|
|
515
|
+
hasReferralProgram: boolean;
|
|
516
|
+
/** The loyalty program has birthday gifts enabled. */
|
|
517
|
+
hasBirthdayRewards: boolean;
|
|
518
|
+
/** The loyalty program has at least one milestone badge configured. */
|
|
519
|
+
hasBadges: boolean;
|
|
520
|
+
/** The loyalty program has at least one active paid membership plan. */
|
|
521
|
+
hasPaidMembership: boolean;
|
|
522
|
+
/** AI reward recommendation is available — true whenever loyalty is active. */
|
|
523
|
+
hasAiRewardRecommendation: boolean;
|
|
524
|
+
};
|
|
525
|
+
}
|
|
401
526
|
/** Upsell feature configuration exposed to the storefront */
|
|
402
527
|
interface UpsellSettings {
|
|
403
528
|
/** Minimum cart amount for free shipping (null = disabled) */
|
|
@@ -765,7 +890,7 @@ interface Product {
|
|
|
765
890
|
attribute: {
|
|
766
891
|
id: string;
|
|
767
892
|
name: string;
|
|
768
|
-
displayType?:
|
|
893
|
+
displayType?: AttributeDisplayType;
|
|
769
894
|
translations?: Record<string, Record<string, string>> | null;
|
|
770
895
|
} | null;
|
|
771
896
|
attributeOption: {
|
|
@@ -785,14 +910,14 @@ interface Product {
|
|
|
785
910
|
name: string;
|
|
786
911
|
connectionId: string;
|
|
787
912
|
};
|
|
788
|
-
/** @deprecated alias of `salesChannel` —
|
|
913
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
789
914
|
connection?: {
|
|
790
915
|
id: string;
|
|
791
916
|
name: string;
|
|
792
917
|
connectionId: string;
|
|
793
918
|
};
|
|
794
919
|
}>;
|
|
795
|
-
/** @deprecated alias of `channelPublishes` —
|
|
920
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
796
921
|
vibeCodedPublishes?: Array<{
|
|
797
922
|
salesChannel: {
|
|
798
923
|
id: string;
|
|
@@ -2144,14 +2269,14 @@ interface Coupon {
|
|
|
2144
2269
|
name: string;
|
|
2145
2270
|
connectionId: string;
|
|
2146
2271
|
};
|
|
2147
|
-
/** @deprecated alias of `salesChannel` —
|
|
2272
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
2148
2273
|
connection?: {
|
|
2149
2274
|
id: string;
|
|
2150
2275
|
name: string;
|
|
2151
2276
|
connectionId: string;
|
|
2152
2277
|
};
|
|
2153
2278
|
}>;
|
|
2154
|
-
/** @deprecated alias of `channelPublishes` —
|
|
2279
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
2155
2280
|
vibeCodedPublishes?: Array<{
|
|
2156
2281
|
salesChannel: {
|
|
2157
2282
|
id: string;
|
|
@@ -2582,6 +2707,47 @@ interface OAuthCallbackResponse extends CustomerAuthResponse {
|
|
|
2582
2707
|
provider: CustomerOAuthProvider;
|
|
2583
2708
|
redirectUrl?: string;
|
|
2584
2709
|
}
|
|
2710
|
+
/**
|
|
2711
|
+
* Values the `?oauth_error=` query param can take when a social sign-in fails.
|
|
2712
|
+
*
|
|
2713
|
+
* The post-OAuth redirect follows the RFC 6749 §4.1.2.1 shape: a stable
|
|
2714
|
+
* machine-readable code in `oauth_error`, plus an English `error_description`
|
|
2715
|
+
* meant for developers. Switch on the code to render localized copy — the
|
|
2716
|
+
* description is not shopper-facing copy and its wording may change.
|
|
2717
|
+
*
|
|
2718
|
+
* The list is open: the provider's own codes (`access_denied`,
|
|
2719
|
+
* `temporarily_unavailable`, `admin_policy_enforced`, ...) are passed through,
|
|
2720
|
+
* so always handle the unknown case.
|
|
2721
|
+
*/
|
|
2722
|
+
type OAuthErrorCode =
|
|
2723
|
+
/** Callback arrived without a usable `code`/`state` pair. */
|
|
2724
|
+
'invalid_request'
|
|
2725
|
+
/** `state` matches no outstanding authorization request. */
|
|
2726
|
+
| 'invalid_state'
|
|
2727
|
+
/** `state` was already consumed — a replay or a double-submitted callback. */
|
|
2728
|
+
| 'state_already_used'
|
|
2729
|
+
/** `state` sat unused past its 10-minute TTL. Ask the shopper to retry. */
|
|
2730
|
+
| 'state_expired'
|
|
2731
|
+
/** Provider is recognised but not implemented yet. */
|
|
2732
|
+
| 'provider_unsupported'
|
|
2733
|
+
/** Provider reported a failure we could not map onto a safe code. */
|
|
2734
|
+
| 'provider_error'
|
|
2735
|
+
/** Shopper declined consent at the provider. */
|
|
2736
|
+
| 'access_denied'
|
|
2737
|
+
/** The store has this provider turned off. Hide the button. */
|
|
2738
|
+
| 'provider_disabled'
|
|
2739
|
+
/** This customer already has a different account linked for this provider. */
|
|
2740
|
+
| 'provider_already_linked'
|
|
2741
|
+
/** This provider account is already linked to a different customer. */
|
|
2742
|
+
| 'oauth_account_linked_to_another_customer'
|
|
2743
|
+
/**
|
|
2744
|
+
* An account with this email has an unverified password credential, and the
|
|
2745
|
+
* provider would not attest ownership of the address either. Send the shopper
|
|
2746
|
+
* to email verification, not to a retry.
|
|
2747
|
+
*/
|
|
2748
|
+
| 'link_blocked_unverified_password_account'
|
|
2749
|
+
/** Unexpected server-side failure. Details are in the platform logs, not here. */
|
|
2750
|
+
| 'server_error' | (string & {});
|
|
2585
2751
|
interface OAuthConnection {
|
|
2586
2752
|
id: string;
|
|
2587
2753
|
provider: CustomerOAuthProvider;
|
|
@@ -2900,7 +3066,7 @@ interface AddToCartDto {
|
|
|
2900
3066
|
* a picked modifier carries `referencedProductId` and that referenced product
|
|
2901
3067
|
* itself has modifier groups. Server enforces depth ≤ 3.
|
|
2902
3068
|
*/
|
|
2903
|
-
nestedByModifierId?: Record<string,
|
|
3069
|
+
nestedByModifierId?: Record<string, NestedModifierSelection>;
|
|
2904
3070
|
/**
|
|
2905
3071
|
* Optional product info for local cart (guest mode).
|
|
2906
3072
|
* If provided, SDK uses this directly without fetching from API.
|
|
@@ -2922,7 +3088,7 @@ interface UpdateCartItemDto {
|
|
|
2922
3088
|
*/
|
|
2923
3089
|
selections?: ModifierSelection[];
|
|
2924
3090
|
/** Nested-combo selections (see `AddToCartDto.nestedByModifierId`). */
|
|
2925
|
-
nestedByModifierId?: Record<string,
|
|
3091
|
+
nestedByModifierId?: Record<string, NestedModifierSelection>;
|
|
2926
3092
|
}
|
|
2927
3093
|
interface ApplyCouponDto {
|
|
2928
3094
|
code: string;
|
|
@@ -3126,7 +3292,15 @@ type DeliveryType = 'shipping' | 'pickup';
|
|
|
3126
3292
|
* ```
|
|
3127
3293
|
*/
|
|
3128
3294
|
interface TaxBreakdownItem {
|
|
3129
|
-
/**
|
|
3295
|
+
/**
|
|
3296
|
+
* Tax name (e.g. "Israel VAT 18%", "California Sales Tax", "GST", "QST").
|
|
3297
|
+
*
|
|
3298
|
+
* `breakdown` carries ONE ROW PER RATE and has always been able to hold
|
|
3299
|
+
* several. In Canada it routinely does: a Quebec order has a "GST" row and a
|
|
3300
|
+
* "QST" row, a British Columbia order has "GST" and "PST". Render every row —
|
|
3301
|
+
* a GST/QST-registered merchant is required to itemise them, and collapsing
|
|
3302
|
+
* them into one "Tax" line loses information the buyer's own accountant needs.
|
|
3303
|
+
*/
|
|
3130
3304
|
name: string;
|
|
3131
3305
|
/** Tax rate as decimal (0.17 = 17%) */
|
|
3132
3306
|
rate: number;
|
|
@@ -3141,15 +3315,19 @@ interface TaxBreakdownItem {
|
|
|
3141
3315
|
* Tax calculation result with itemized breakdown.
|
|
3142
3316
|
* Included in checkout response after shipping address is set.
|
|
3143
3317
|
*
|
|
3318
|
+
* `breakdown` can hold SEVERAL rows and often does — a Quebec address is taxed
|
|
3319
|
+
* GST 5% + QST 9.975%, a British Columbia one GST 5% + PST 7%. Loop it rather
|
|
3320
|
+
* than reading `breakdown[0]`.
|
|
3321
|
+
*
|
|
3144
3322
|
* @example
|
|
3145
3323
|
* ```typescript
|
|
3146
3324
|
* // Check if tax applies
|
|
3147
3325
|
* if (checkout.taxBreakdown && checkout.taxBreakdown.totalTax > 0) {
|
|
3148
3326
|
* console.log(`Tax: $${checkout.taxBreakdown.totalTax.toFixed(2)}`);
|
|
3149
3327
|
*
|
|
3150
|
-
* // Show
|
|
3328
|
+
* // Show EVERY row — Quebec prints two: GST then QST.
|
|
3151
3329
|
* checkout.taxBreakdown.breakdown.forEach(tax => {
|
|
3152
|
-
* const percent = (tax.rate * 100).toFixed(
|
|
3330
|
+
* const percent = (tax.rate * 100).toFixed(3);
|
|
3153
3331
|
* console.log(` ${tax.name} (${percent}%): $${tax.amount.toFixed(2)}`);
|
|
3154
3332
|
* });
|
|
3155
3333
|
* }
|
|
@@ -3479,6 +3657,137 @@ interface SelectPickupLocationDto {
|
|
|
3479
3657
|
* @see CheckoutLineItem for item structure
|
|
3480
3658
|
* @see ShippingRate for shipping rate structure
|
|
3481
3659
|
*/
|
|
3660
|
+
/**
|
|
3661
|
+
* A gift card applied to a checkout.
|
|
3662
|
+
*
|
|
3663
|
+
* Returned by `applyGiftCard`. Note what is NOT here: the code, the card id, or
|
|
3664
|
+
* anything about who owns it. A storefront needs the tender id (to remove it),
|
|
3665
|
+
* how much went on, and what the provider will now be charged.
|
|
3666
|
+
*/
|
|
3667
|
+
interface CheckoutTender {
|
|
3668
|
+
/** Pass this to `removeGiftCard` — a checkout can carry more than one card. */
|
|
3669
|
+
tenderId: string;
|
|
3670
|
+
/**
|
|
3671
|
+
* How much of the card was applied. Capped at what the order still owes, so a
|
|
3672
|
+
* ₪200 card on a ₪50 order applies ₪50 and leaves ₪150 for next time.
|
|
3673
|
+
*/
|
|
3674
|
+
amountApplied: string;
|
|
3675
|
+
/**
|
|
3676
|
+
* What the payment provider will be charged.
|
|
3677
|
+
*
|
|
3678
|
+
* The order `total` is deliberately UNCHANGED. A gift card is a tender, not a
|
|
3679
|
+
* discount: the order is still worth what it is worth and tax is still
|
|
3680
|
+
* calculated on that, which is why this is a separate field and not a
|
|
3681
|
+
* reduction of `discountAmount`.
|
|
3682
|
+
*/
|
|
3683
|
+
providerAmountDue: string;
|
|
3684
|
+
}
|
|
3685
|
+
/**
|
|
3686
|
+
* The answer from `checkGiftCardBalance`.
|
|
3687
|
+
*
|
|
3688
|
+
* Identical for an unknown code, a disabled card and an expired one. That is on
|
|
3689
|
+
* purpose — see the method's own documentation.
|
|
3690
|
+
*/
|
|
3691
|
+
interface GiftCardBalance {
|
|
3692
|
+
/** Spendable balance, or '0.00' when the card cannot be used. */
|
|
3693
|
+
balance: string;
|
|
3694
|
+
currency: string;
|
|
3695
|
+
/** Whether this code can be applied to a checkout right now. */
|
|
3696
|
+
usable: boolean;
|
|
3697
|
+
}
|
|
3698
|
+
/**
|
|
3699
|
+
* A tribute gift.
|
|
3700
|
+
*
|
|
3701
|
+
* `IN_HONOR` for someone living, `IN_MEMORY` for someone who has died. Setting
|
|
3702
|
+
* either requires `tributeName`; the API rejects a tribute with nobody named.
|
|
3703
|
+
*/
|
|
3704
|
+
type DonationTributeType = 'IN_HONOR' | 'IN_MEMORY';
|
|
3705
|
+
/**
|
|
3706
|
+
* `PENDING` means an intent exists and no money has moved. A donation is only a
|
|
3707
|
+
* gift once it is `PAID`, which happens when the provider's webhook confirms
|
|
3708
|
+
* it — never when `createDonation` returns.
|
|
3709
|
+
*
|
|
3710
|
+
* There is no `REFUNDED` member on purpose: a refund is recorded against the
|
|
3711
|
+
* payment, not the donation, so one fact lives in one place.
|
|
3712
|
+
*/
|
|
3713
|
+
type DonationStatus = 'PENDING' | 'PAID' | 'FAILED' | 'CANCELLED';
|
|
3714
|
+
/** What `createDonation` accepts. */
|
|
3715
|
+
interface CreateDonationInput {
|
|
3716
|
+
/**
|
|
3717
|
+
* The gift itself, in the store's base currency. EXCLUDES `feeCoverAmount` —
|
|
3718
|
+
* this is the figure the donor is credited with.
|
|
3719
|
+
*/
|
|
3720
|
+
amount: number;
|
|
3721
|
+
/**
|
|
3722
|
+
* Processing fee the donor volunteered to absorb. Charged on TOP of `amount`,
|
|
3723
|
+
* never subtracted from it. Roughly 55-60% of donors accept this when a form
|
|
3724
|
+
* offers it, so it is worth offering.
|
|
3725
|
+
*/
|
|
3726
|
+
feeCoverAmount?: number;
|
|
3727
|
+
/** Required. Also how the donor's giving history is found later. */
|
|
3728
|
+
donorEmail: string;
|
|
3729
|
+
donorName?: string;
|
|
3730
|
+
/**
|
|
3731
|
+
* Hides the donor's name on public surfaces (a donor wall, a thank-you page).
|
|
3732
|
+
* It does NOT hide them from the organisation, which still needs the donor
|
|
3733
|
+
* for its own records.
|
|
3734
|
+
*/
|
|
3735
|
+
isAnonymous?: boolean;
|
|
3736
|
+
/** Requires `tributeName` when set. */
|
|
3737
|
+
tributeType?: DonationTributeType;
|
|
3738
|
+
tributeName?: string;
|
|
3739
|
+
/** The donor's own words. Plain text — never render it as HTML. */
|
|
3740
|
+
message?: string;
|
|
3741
|
+
/**
|
|
3742
|
+
* Where to land the donor after paying, as a PATH on your own storefront
|
|
3743
|
+
* (e.g. `/thank-you`). A full URL is rejected: the payment provider redirects
|
|
3744
|
+
* a real browser here, so accepting one would be an open redirect.
|
|
3745
|
+
*/
|
|
3746
|
+
returnPath?: string;
|
|
3747
|
+
}
|
|
3748
|
+
/**
|
|
3749
|
+
* What `createDonation` returns.
|
|
3750
|
+
*
|
|
3751
|
+
* ⛔ This is NOT a paid donation. `status` is `PENDING` and the money has not
|
|
3752
|
+
* moved: you have a provider intent to complete, exactly as you would after
|
|
3753
|
+
* `createPaymentIntent` on a checkout. Credit the gift only after the donation
|
|
3754
|
+
* reads back as `PAID`.
|
|
3755
|
+
*/
|
|
3756
|
+
interface DonationIntent {
|
|
3757
|
+
donationId: string;
|
|
3758
|
+
status: DonationStatus;
|
|
3759
|
+
/** The gift, excluding any covered fee. */
|
|
3760
|
+
amount: string;
|
|
3761
|
+
feeCoverAmount: string;
|
|
3762
|
+
/** What the provider is actually charging: `amount` + `feeCoverAmount`. */
|
|
3763
|
+
chargeAmount: string;
|
|
3764
|
+
currency: string;
|
|
3765
|
+
payment: {
|
|
3766
|
+
intentId: string;
|
|
3767
|
+
clientSecret?: string | null;
|
|
3768
|
+
clientSdk?: unknown;
|
|
3769
|
+
redirectUrl?: string | null;
|
|
3770
|
+
providerType: string | null;
|
|
3771
|
+
};
|
|
3772
|
+
}
|
|
3773
|
+
/**
|
|
3774
|
+
* A donation read back for a thank-you page.
|
|
3775
|
+
*
|
|
3776
|
+
* Deliberately narrow. There is no failure reason (a decline message tells a
|
|
3777
|
+
* card tester which card is live) and `donorName` is `null` whenever the gift
|
|
3778
|
+
* was marked anonymous.
|
|
3779
|
+
*/
|
|
3780
|
+
interface PublicDonation {
|
|
3781
|
+
id: string;
|
|
3782
|
+
status: DonationStatus;
|
|
3783
|
+
amount: string;
|
|
3784
|
+
feeCoverAmount: string;
|
|
3785
|
+
currency: string;
|
|
3786
|
+
donorName: string | null;
|
|
3787
|
+
tributeType: DonationTributeType | null;
|
|
3788
|
+
tributeName: string | null;
|
|
3789
|
+
paidAt: string | null;
|
|
3790
|
+
}
|
|
3482
3791
|
interface Checkout {
|
|
3483
3792
|
/** Unique checkout identifier */
|
|
3484
3793
|
id: string;
|
|
@@ -3542,6 +3851,30 @@ interface Checkout {
|
|
|
3542
3851
|
customFieldValues?: Record<string, unknown> | null;
|
|
3543
3852
|
/** Applied coupon code */
|
|
3544
3853
|
couponCode?: string | null;
|
|
3854
|
+
/**
|
|
3855
|
+
* Gift cards held against this checkout, oldest first.
|
|
3856
|
+
*
|
|
3857
|
+
* Read these to render applied cards after a page reload — a checkout keeps
|
|
3858
|
+
* its holds server-side, so a storefront that only tracks the response from
|
|
3859
|
+
* `applyGiftCard` loses them on refresh and shows a shopper a card they no
|
|
3860
|
+
* longer appear to have.
|
|
3861
|
+
*
|
|
3862
|
+
* Remove one with its `tenderId`, never the code.
|
|
3863
|
+
*/
|
|
3864
|
+
tenders?: Array<{
|
|
3865
|
+
tenderId: string;
|
|
3866
|
+
amountApplied: string;
|
|
3867
|
+
}>;
|
|
3868
|
+
/**
|
|
3869
|
+
* What the payment provider will be charged: `total` minus every gift card
|
|
3870
|
+
* applied.
|
|
3871
|
+
*
|
|
3872
|
+
* `total` is deliberately UNCHANGED by a gift card. A gift card is a means of
|
|
3873
|
+
* payment, not a discount — the order is still worth what it is worth and tax
|
|
3874
|
+
* is still calculated on that. Show this as its own line beside the total
|
|
3875
|
+
* ("Gift card −₪54.50"), never folded into `discountAmount`.
|
|
3876
|
+
*/
|
|
3877
|
+
providerAmountDue?: string;
|
|
3545
3878
|
/**
|
|
3546
3879
|
* Order-level note from the shopper (set via setCheckoutCustomer).
|
|
3547
3880
|
* Copied onto the order at completion and shown to the merchant.
|
|
@@ -3886,7 +4219,7 @@ interface WebhookEvent {
|
|
|
3886
4219
|
data: unknown;
|
|
3887
4220
|
timestamp: string;
|
|
3888
4221
|
}
|
|
3889
|
-
type WebhookEventType = '
|
|
4222
|
+
type WebhookEventType = 'order.created' | 'order.updated' | 'order.paid' | 'order.fulfilled' | 'order.cancelled' | 'order.refunded' | 'customer.created' | 'customer.updated' | 'customer.deleted' | 'product.created' | 'product.updated' | 'product.deleted' | 'inventory.updated' | 'inventory.low' | 'checkout.completed' | 'checkout.abandoned' | 'payment.succeeded' | 'payment.failed' | 'payment.refunded' | 'blog.post.published' | 'blog.post.updated' | 'donation.paid' | 'donation.refunded';
|
|
3890
4223
|
type VariantStatus = 'active' | 'draft';
|
|
3891
4224
|
interface CreateVariantDto {
|
|
3892
4225
|
sku?: string;
|
|
@@ -4259,63 +4592,6 @@ interface PublishProductResponse {
|
|
|
4259
4592
|
error?: string;
|
|
4260
4593
|
}>;
|
|
4261
4594
|
}
|
|
4262
|
-
type CustomApiAuthType = 'api_key' | 'bearer' | 'basic' | 'oauth2';
|
|
4263
|
-
type CustomApiSyncDirection = 'inbound' | 'outbound' | 'bidirectional';
|
|
4264
|
-
type CustomApiConnectionStatus = 'CONNECTED' | 'DISCONNECTED' | 'PAUSED' | 'ERROR';
|
|
4265
|
-
interface CustomApiCredentials {
|
|
4266
|
-
apiKey?: string;
|
|
4267
|
-
bearerToken?: string;
|
|
4268
|
-
username?: string;
|
|
4269
|
-
password?: string;
|
|
4270
|
-
headerName?: string;
|
|
4271
|
-
}
|
|
4272
|
-
interface CustomApiSyncConfig {
|
|
4273
|
-
products?: boolean;
|
|
4274
|
-
orders?: boolean;
|
|
4275
|
-
inventory?: boolean;
|
|
4276
|
-
}
|
|
4277
|
-
interface CustomApiIntegration {
|
|
4278
|
-
id: string;
|
|
4279
|
-
storeId: string;
|
|
4280
|
-
name: string;
|
|
4281
|
-
description?: string | null;
|
|
4282
|
-
baseUrl: string;
|
|
4283
|
-
authType: CustomApiAuthType;
|
|
4284
|
-
credentials?: CustomApiCredentials;
|
|
4285
|
-
status: CustomApiConnectionStatus;
|
|
4286
|
-
enabled: boolean;
|
|
4287
|
-
syncDirection: CustomApiSyncDirection;
|
|
4288
|
-
syncConfig?: CustomApiSyncConfig | null;
|
|
4289
|
-
lastSyncAt?: string | null;
|
|
4290
|
-
lastError?: string | null;
|
|
4291
|
-
lastErrorAt?: string | null;
|
|
4292
|
-
createdAt: string;
|
|
4293
|
-
updatedAt: string;
|
|
4294
|
-
}
|
|
4295
|
-
interface CreateCustomApiDto {
|
|
4296
|
-
name: string;
|
|
4297
|
-
description?: string;
|
|
4298
|
-
baseUrl: string;
|
|
4299
|
-
authType: CustomApiAuthType;
|
|
4300
|
-
credentials?: CustomApiCredentials;
|
|
4301
|
-
syncDirection?: CustomApiSyncDirection;
|
|
4302
|
-
syncConfig?: CustomApiSyncConfig;
|
|
4303
|
-
}
|
|
4304
|
-
interface UpdateCustomApiDto {
|
|
4305
|
-
name?: string;
|
|
4306
|
-
description?: string;
|
|
4307
|
-
baseUrl?: string;
|
|
4308
|
-
authType?: CustomApiAuthType;
|
|
4309
|
-
credentials?: CustomApiCredentials;
|
|
4310
|
-
enabled?: boolean;
|
|
4311
|
-
syncDirection?: CustomApiSyncDirection;
|
|
4312
|
-
syncConfig?: CustomApiSyncConfig;
|
|
4313
|
-
}
|
|
4314
|
-
interface CustomApiTestResult {
|
|
4315
|
-
success: boolean;
|
|
4316
|
-
latency?: number;
|
|
4317
|
-
error?: string;
|
|
4318
|
-
}
|
|
4319
4595
|
/**
|
|
4320
4596
|
* Client-side SDK configuration for payment providers that render a widget.
|
|
4321
4597
|
* Returned by the backend in provider config and payment intents.
|
|
@@ -4697,14 +4973,14 @@ interface Category {
|
|
|
4697
4973
|
name: string;
|
|
4698
4974
|
connectionId: string;
|
|
4699
4975
|
};
|
|
4700
|
-
/** @deprecated alias of `salesChannel` —
|
|
4976
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
4701
4977
|
connection?: {
|
|
4702
4978
|
id: string;
|
|
4703
4979
|
name: string;
|
|
4704
4980
|
connectionId: string;
|
|
4705
4981
|
};
|
|
4706
4982
|
}>;
|
|
4707
|
-
/** @deprecated alias of `channelPublishes` —
|
|
4983
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
4708
4984
|
vibeCodedPublishes?: Array<{
|
|
4709
4985
|
salesChannel: {
|
|
4710
4986
|
id: string;
|
|
@@ -4785,14 +5061,14 @@ interface Brand {
|
|
|
4785
5061
|
name: string;
|
|
4786
5062
|
connectionId: string;
|
|
4787
5063
|
};
|
|
4788
|
-
/** @deprecated alias of `salesChannel` —
|
|
5064
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
4789
5065
|
connection?: {
|
|
4790
5066
|
id: string;
|
|
4791
5067
|
name: string;
|
|
4792
5068
|
connectionId: string;
|
|
4793
5069
|
};
|
|
4794
5070
|
}>;
|
|
4795
|
-
/** @deprecated alias of `channelPublishes` —
|
|
5071
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
4796
5072
|
vibeCodedPublishes?: Array<{
|
|
4797
5073
|
salesChannel: {
|
|
4798
5074
|
id: string;
|
|
@@ -4854,14 +5130,14 @@ interface Tag {
|
|
|
4854
5130
|
name: string;
|
|
4855
5131
|
connectionId: string;
|
|
4856
5132
|
};
|
|
4857
|
-
/** @deprecated alias of `salesChannel` —
|
|
5133
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
4858
5134
|
connection?: {
|
|
4859
5135
|
id: string;
|
|
4860
5136
|
name: string;
|
|
4861
5137
|
connectionId: string;
|
|
4862
5138
|
};
|
|
4863
5139
|
}>;
|
|
4864
|
-
/** @deprecated alias of `channelPublishes` —
|
|
5140
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
4865
5141
|
vibeCodedPublishes?: Array<{
|
|
4866
5142
|
salesChannel: {
|
|
4867
5143
|
id: string;
|
|
@@ -4890,6 +5166,11 @@ interface UpdateTagDto {
|
|
|
4890
5166
|
* Attribute source type
|
|
4891
5167
|
*/
|
|
4892
5168
|
type AttributeSource = 'GLOBAL' | 'PLATFORM';
|
|
5169
|
+
/**
|
|
5170
|
+
* How an attribute's options render as swatches on the storefront.
|
|
5171
|
+
* `'DEFAULT'` is a plain text/dropdown option list.
|
|
5172
|
+
*/
|
|
5173
|
+
type AttributeDisplayType = 'DEFAULT' | 'COLOR_SWATCH' | 'IMAGE_SWATCH' | 'MIXED_SWATCH';
|
|
4893
5174
|
/**
|
|
4894
5175
|
* Attribute for product variations
|
|
4895
5176
|
*/
|
|
@@ -4898,7 +5179,7 @@ interface Attribute {
|
|
|
4898
5179
|
accountId: string;
|
|
4899
5180
|
storeId?: string | null;
|
|
4900
5181
|
name: string;
|
|
4901
|
-
displayType?:
|
|
5182
|
+
displayType?: AttributeDisplayType;
|
|
4902
5183
|
source: AttributeSource;
|
|
4903
5184
|
platform?: ConnectorPlatform | null;
|
|
4904
5185
|
externalId?: string | null;
|
|
@@ -4930,7 +5211,7 @@ interface AttributeOption {
|
|
|
4930
5211
|
}
|
|
4931
5212
|
interface CreateAttributeDto {
|
|
4932
5213
|
name: string;
|
|
4933
|
-
displayType?:
|
|
5214
|
+
displayType?: AttributeDisplayType;
|
|
4934
5215
|
source: AttributeSource;
|
|
4935
5216
|
platform?: ConnectorPlatform;
|
|
4936
5217
|
storeId?: string;
|
|
@@ -4940,7 +5221,7 @@ interface CreateAttributeDto {
|
|
|
4940
5221
|
}
|
|
4941
5222
|
interface UpdateAttributeDto {
|
|
4942
5223
|
name?: string;
|
|
4943
|
-
displayType?:
|
|
5224
|
+
displayType?: AttributeDisplayType;
|
|
4944
5225
|
platformMetadata?: Record<string, unknown>;
|
|
4945
5226
|
isActive?: boolean;
|
|
4946
5227
|
}
|
|
@@ -5054,7 +5335,33 @@ interface ShippingRateConfig {
|
|
|
5054
5335
|
createdAt: string;
|
|
5055
5336
|
updatedAt: string;
|
|
5056
5337
|
}
|
|
5057
|
-
|
|
5338
|
+
/**
|
|
5339
|
+
* How a shipping rate computes its price.
|
|
5340
|
+
*
|
|
5341
|
+
* Mirrors the `ShippingRateType` enum the API validates against with
|
|
5342
|
+
* `@IsEnum`; a value outside this set is rejected with 400.
|
|
5343
|
+
*
|
|
5344
|
+
* ⛔ This list was wrong until SDK 2.0.3 and the two corrections bite in
|
|
5345
|
+
* opposite directions, so read both before pinning an older version:
|
|
5346
|
+
*
|
|
5347
|
+
* - It declared `'FLAT'`, which the API has never accepted — the member is
|
|
5348
|
+
* `'FLAT_RATE'`. Flat rate is the commonest rate there is, and no server-side
|
|
5349
|
+
* normaliser exists, so every `createShippingRate` written against the old
|
|
5350
|
+
* type failed with 400 no matter how correct it looked.
|
|
5351
|
+
* - It omitted `'LOCAL_PICKUP'` entirely, which is the only way to express
|
|
5352
|
+
* click-and-collect, and invented `'QUANTITY_BASED'`, which does not exist.
|
|
5353
|
+
*/
|
|
5354
|
+
type ShippingRateType =
|
|
5355
|
+
/** One price for the whole order, in `rateConfig.amount`. */
|
|
5356
|
+
'FLAT_RATE'
|
|
5357
|
+
/** No charge. Pair with `minOrderAmount` for "free over X". */
|
|
5358
|
+
| 'FREE'
|
|
5359
|
+
/** Priced from total cart weight. */
|
|
5360
|
+
| 'WEIGHT_BASED'
|
|
5361
|
+
/** Priced from order value. */
|
|
5362
|
+
| 'PRICE_BASED'
|
|
5363
|
+
/** Collection in person — nothing ships, so no address is required. */
|
|
5364
|
+
| 'LOCAL_PICKUP';
|
|
5058
5365
|
interface CreateShippingZoneDto {
|
|
5059
5366
|
name: string;
|
|
5060
5367
|
countries: string[];
|
|
@@ -5125,6 +5432,72 @@ interface ShippingZoneQueryParams {
|
|
|
5125
5432
|
sortBy?: string;
|
|
5126
5433
|
sortOrder?: 'asc' | 'desc';
|
|
5127
5434
|
}
|
|
5435
|
+
/**
|
|
5436
|
+
* Parcel override for a return label. Omit to use the installed shipping
|
|
5437
|
+
* app's configured defaults — what the customer packs a return into is
|
|
5438
|
+
* rarely what left the warehouse.
|
|
5439
|
+
*/
|
|
5440
|
+
interface ReturnLabelParcel {
|
|
5441
|
+
length?: string;
|
|
5442
|
+
width?: string;
|
|
5443
|
+
height?: string;
|
|
5444
|
+
weight?: string;
|
|
5445
|
+
distanceUnit?: 'in' | 'cm';
|
|
5446
|
+
massUnit?: 'lb' | 'oz' | 'g' | 'kg';
|
|
5447
|
+
}
|
|
5448
|
+
/**
|
|
5449
|
+
* Buy a return label for an order: the customer ships, the merchant receives.
|
|
5450
|
+
* See {@link BrainerceClient.createReturnLabel}.
|
|
5451
|
+
*
|
|
5452
|
+
* There is no `rateId` here, unlike a normal shipment. A return is a distinct
|
|
5453
|
+
* kind of shipment at the carrier, fixed when it is created and not amendable
|
|
5454
|
+
* afterwards, so it cannot be rate-shopped first — this quotes and buys in
|
|
5455
|
+
* one call. `preferredCarrier` / `preferredService` are the only steering;
|
|
5456
|
+
* omit both and the cheapest rate wins, with the response reporting what was
|
|
5457
|
+
* actually billed.
|
|
5458
|
+
*
|
|
5459
|
+
* The merchant's carrier account pays. There is no mechanism for charging the
|
|
5460
|
+
* customer for return postage — the cost lands on
|
|
5461
|
+
* {@link CreateReturnLabelResponse.rate} so it can be deducted from a refund
|
|
5462
|
+
* deliberately rather than absorbed silently.
|
|
5463
|
+
*/
|
|
5464
|
+
interface CreateReturnLabelDto {
|
|
5465
|
+
/** Parcel dimensions for the return. Defaults to the shipping app config. */
|
|
5466
|
+
parcel?: ReturnLabelParcel;
|
|
5467
|
+
/**
|
|
5468
|
+
* Label file format. `'PDF'` prints from a browser, which is what a
|
|
5469
|
+
* customer needs; `'ZPL'`/`'EPL'` drive warehouse thermal printers.
|
|
5470
|
+
* Defaults to `'PDF'`. If the carrier cannot produce the requested format
|
|
5471
|
+
* it returns its closest match rather than failing the purchase.
|
|
5472
|
+
*/
|
|
5473
|
+
labelFormat?: 'PDF' | 'PNG' | 'ZPL' | 'EPL';
|
|
5474
|
+
/** Preferred carrier slug (e.g. `'USPS'`). Falls back to the cheapest rate. */
|
|
5475
|
+
preferredCarrier?: string;
|
|
5476
|
+
/** Preferred service slug (e.g. `'GroundAdvantage'`). Falls back to the cheapest rate. */
|
|
5477
|
+
preferredService?: string;
|
|
5478
|
+
/**
|
|
5479
|
+
* The outbound `Shipment.id` this return reverses. Recorded on the return
|
|
5480
|
+
* for the merchant's own records; not required, since a return can predate
|
|
5481
|
+
* any shipment record.
|
|
5482
|
+
*/
|
|
5483
|
+
returnForShipmentId?: string;
|
|
5484
|
+
/** Why the customer is returning it. Stored on the shipment, shown to the merchant. */
|
|
5485
|
+
reason?: string;
|
|
5486
|
+
}
|
|
5487
|
+
/** Response from {@link BrainerceClient.createReturnLabel}. */
|
|
5488
|
+
interface CreateReturnLabelResponse {
|
|
5489
|
+
shipmentId: string;
|
|
5490
|
+
labelUrl: string;
|
|
5491
|
+
trackingNumber: string;
|
|
5492
|
+
carrier: string;
|
|
5493
|
+
/**
|
|
5494
|
+
* What the merchant's carrier account was billed for this return. `null`
|
|
5495
|
+
* only when the app reported no usable figure — the label is real either
|
|
5496
|
+
* way, and showing nothing beats showing a guess.
|
|
5497
|
+
*/
|
|
5498
|
+
rate: string | null;
|
|
5499
|
+
rateCurrency: string | null;
|
|
5500
|
+
}
|
|
5128
5501
|
/**
|
|
5129
5502
|
* Tax rate configuration
|
|
5130
5503
|
*/
|
|
@@ -5159,6 +5532,21 @@ interface TaxRate {
|
|
|
5159
5532
|
isCompound: boolean;
|
|
5160
5533
|
/** Whether tax is included in prices */
|
|
5161
5534
|
isInclusive: boolean;
|
|
5535
|
+
/**
|
|
5536
|
+
* Charge this rate TOGETHER WITH the other stackable rates matching the same
|
|
5537
|
+
* address, instead of only the most specific one.
|
|
5538
|
+
*
|
|
5539
|
+
* `false` (the default, and every rate created before this field existed) is
|
|
5540
|
+
* the historic rule: the most specific match wins alone and the rest are
|
|
5541
|
+
* discarded. `true` opts into summation — Canada's GST 5% (country row) plus
|
|
5542
|
+
* a province's PST/QST, both charged on the same pre-tax base, producing two
|
|
5543
|
+
* `TaxBreakdownItem` rows.
|
|
5544
|
+
*
|
|
5545
|
+
* Additive, never compound — see the deprecated {@link TaxRate.isCompound}.
|
|
5546
|
+
* Stacking also never crosses a tax class: a class-specific rate REPLACES the
|
|
5547
|
+
* Standard rates rather than adding to them.
|
|
5548
|
+
*/
|
|
5549
|
+
stackable: boolean;
|
|
5162
5550
|
priority: number;
|
|
5163
5551
|
isActive: boolean;
|
|
5164
5552
|
/** Countries where this tax rate applies as exception */
|
|
@@ -5183,6 +5571,12 @@ interface CreateTaxRateDto {
|
|
|
5183
5571
|
*/
|
|
5184
5572
|
isCompound?: boolean;
|
|
5185
5573
|
isInclusive?: boolean;
|
|
5574
|
+
/**
|
|
5575
|
+
* Charge this rate together with the other stackable rates matching the same
|
|
5576
|
+
* address (Canada GST + PST/QST) rather than only the most specific one.
|
|
5577
|
+
* Defaults to `false`, which keeps the most-specific-wins rule.
|
|
5578
|
+
*/
|
|
5579
|
+
stackable?: boolean;
|
|
5186
5580
|
/** Tax class this rate applies to. Omit/null = Standard. */
|
|
5187
5581
|
taxClassId?: string;
|
|
5188
5582
|
priority?: number;
|
|
@@ -5204,6 +5598,12 @@ interface UpdateTaxRateDto {
|
|
|
5204
5598
|
*/
|
|
5205
5599
|
isCompound?: boolean;
|
|
5206
5600
|
isInclusive?: boolean;
|
|
5601
|
+
/**
|
|
5602
|
+
* Charge this rate together with the other stackable rates matching the same
|
|
5603
|
+
* address. Flipping an existing rate to `true` changes what future checkouts
|
|
5604
|
+
* collect: rates that used to be mutually exclusive start being summed.
|
|
5605
|
+
*/
|
|
5606
|
+
stackable?: boolean;
|
|
5207
5607
|
priority?: number;
|
|
5208
5608
|
isActive?: boolean;
|
|
5209
5609
|
exceptionCountries?: string[];
|
|
@@ -5350,9 +5750,27 @@ interface UpsertRegionPricesResult {
|
|
|
5350
5750
|
}
|
|
5351
5751
|
interface TaxEstimateResponse {
|
|
5352
5752
|
appliesTax: boolean;
|
|
5353
|
-
/**
|
|
5753
|
+
/**
|
|
5754
|
+
* Percent — e.g. 18 for 18%. In a stacked jurisdiction this is the SUMMED
|
|
5755
|
+
* effective rate of every rate in `rates`. `null` when no matching rule.
|
|
5756
|
+
*/
|
|
5354
5757
|
rate: number | null;
|
|
5758
|
+
/** One rate's name, or several joined with `" + "` ("GST + QST"). */
|
|
5355
5759
|
rateName: string | null;
|
|
5760
|
+
/**
|
|
5761
|
+
* One entry per rate behind the estimate. Amounts are 2dp and sum exactly to
|
|
5762
|
+
* `estimatedTax`.
|
|
5763
|
+
*
|
|
5764
|
+
* A preview has no province, so a Canadian estimate shows the federal GST
|
|
5765
|
+
* alone; the provincial PST/QST joins it at checkout once the buyer gives a
|
|
5766
|
+
* shipping address. That is precisely what `note` is for — render it.
|
|
5767
|
+
*/
|
|
5768
|
+
rates: Array<{
|
|
5769
|
+
rateId: string;
|
|
5770
|
+
name: string;
|
|
5771
|
+
rate: number;
|
|
5772
|
+
amount: number;
|
|
5773
|
+
}>;
|
|
5356
5774
|
/** Tax portion of `subtotal` at the store's `pricesIncludeTax` mode. */
|
|
5357
5775
|
estimatedTax: number;
|
|
5358
5776
|
pricesIncludeTax: boolean;
|
|
@@ -5507,14 +5925,14 @@ interface MetafieldDefinition {
|
|
|
5507
5925
|
name: string;
|
|
5508
5926
|
connectionId: string;
|
|
5509
5927
|
};
|
|
5510
|
-
/** @deprecated alias of `salesChannel` —
|
|
5928
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
5511
5929
|
connection?: {
|
|
5512
5930
|
id: string;
|
|
5513
5931
|
name: string;
|
|
5514
5932
|
connectionId: string;
|
|
5515
5933
|
};
|
|
5516
5934
|
}>;
|
|
5517
|
-
/** @deprecated alias of `channelPublishes` —
|
|
5935
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
5518
5936
|
vibeCodedPublishes?: Array<{
|
|
5519
5937
|
salesChannel: {
|
|
5520
5938
|
id: string;
|
|
@@ -5799,8 +6217,15 @@ interface UpdateMemberRoleDto {
|
|
|
5799
6217
|
}
|
|
5800
6218
|
/** Store-level team member role */
|
|
5801
6219
|
type StoreRole = 'OWNER' | 'MANAGER' | 'STAFF' | 'VIEWER';
|
|
5802
|
-
/**
|
|
5803
|
-
|
|
6220
|
+
/**
|
|
6221
|
+
* Granular store permission.
|
|
6222
|
+
*
|
|
6223
|
+
* Mirrors the `StorePermission` enum in the platform database exactly — the
|
|
6224
|
+
* team endpoints return and accept every member below. Keep in sync with
|
|
6225
|
+
* `packages/database/prisma/schema.prisma`; a value missing here is a value
|
|
6226
|
+
* `getMyStorePermissions()` can return that will not type-check for callers.
|
|
6227
|
+
*/
|
|
6228
|
+
type StorePermission = 'VIEW_PRODUCTS' | 'CREATE_PRODUCTS' | 'EDIT_PRODUCTS' | 'DELETE_PRODUCTS' | 'MANAGE_PRODUCT_CATEGORIES' | 'VIEW_ORDERS' | 'UPDATE_ORDER_STATUS' | 'FULFILL_ORDERS' | 'CANCEL_ORDERS' | 'REFUND_ORDERS' | 'VIEW_INVENTORY' | 'UPDATE_INVENTORY' | 'VIEW_CUSTOMERS' | 'EDIT_CUSTOMERS' | 'VIEW_CONTACT_INQUIRIES' | 'MANAGE_CONTACT_INQUIRIES' | 'DELETE_CONTACT_INQUIRIES' | 'VIEW_CONTENT' | 'MANAGE_CONTENT' | 'VIEW_BLOG' | 'MANAGE_BLOG' | 'VIEW_ANALYTICS' | 'VIEW_COUPONS' | 'CREATE_COUPONS' | 'EDIT_COUPONS' | 'DELETE_COUPONS' | 'VIEW_DISCOUNT_RULES' | 'CREATE_DISCOUNT_RULES' | 'EDIT_DISCOUNT_RULES' | 'DELETE_DISCOUNT_RULES' | 'VIEW_PRICING_FORMULAS' | 'CREATE_PRICING_FORMULAS' | 'EDIT_PRICING_FORMULAS' | 'DELETE_PRICING_FORMULAS' | 'VIEW_TAXONOMY' | 'MANAGE_TAXONOMY' | 'VIEW_CONNECTORS' | 'VIEW_API_KEYS' | 'MANAGE_API_KEYS' | 'VIEW_WEBHOOKS' | 'MANAGE_WEBHOOKS' | 'VIEW_APPS' | 'INSTALL_APPS' | 'CONFIGURE_APPS' | 'MANAGE_APPS' | 'VIEW_STORE_SETTINGS' | 'MANAGE_STORE_SETTINGS' | 'MANAGE_INTEGRATIONS' | 'MANAGE_TEAM' | 'VIEW_STOREFRONT_BOT_SETTINGS' | 'MANAGE_STOREFRONT_BOT_SETTINGS' | 'VIEW_STOREFRONT_BOT_CONVERSATIONS' | 'MANAGE_STOREFRONT_BOT_CONVERSATIONS' | 'MANAGE_BILLING' | 'MANAGE_DEVELOPER' | 'USE_AI_ASSISTANT' | 'VIEW_LOYALTY' | 'MANAGE_LOYALTY' | 'VIEW_SEO' | 'MANAGE_SEO' | 'VIEW_DONATIONS' | 'MANAGE_DONATIONS' | 'VIEW_GIFT_CARDS' | 'ISSUE_GIFT_CARDS' | 'ADJUST_GIFT_CARDS' | 'MANAGE_GIFT_CARDS';
|
|
5804
6229
|
/** Store team member info */
|
|
5805
6230
|
interface StoreMember {
|
|
5806
6231
|
id: string;
|
|
@@ -5910,7 +6335,22 @@ interface UserStorePermissions {
|
|
|
5910
6335
|
permissions: StorePermission[];
|
|
5911
6336
|
}
|
|
5912
6337
|
/** Email event types */
|
|
5913
|
-
|
|
6338
|
+
/**
|
|
6339
|
+
* The transactional emails a merchant can template and configure.
|
|
6340
|
+
*
|
|
6341
|
+
* Mirrors the `EmailEventType` enum in `create-email-template.dto.ts`, which is
|
|
6342
|
+
* what `@IsEnum` actually validates `eventType` against — a value missing here
|
|
6343
|
+
* is a template the API accepts and this SDK refuses to type.
|
|
6344
|
+
*
|
|
6345
|
+
* That DTO enum is deliberately a SUBSET of the platform's `EmailEventType`:
|
|
6346
|
+
* the wider database enum also carries billing, plan-limit, ops and
|
|
6347
|
+
* platform-notice mails (`PLAN_*`, `PAYMENT_*`, `OPS_ALERT`, `SDK_UPDATE`,
|
|
6348
|
+
* `TEST_SEND`, `SUPPORT_MESSAGE`, the ownership-transfer pair, ...). Those are
|
|
6349
|
+
* sent by the platform on its own behalf and are not a merchant's to rewrite,
|
|
6350
|
+
* so they are correctly absent. Do not "complete" this list against
|
|
6351
|
+
* `schema.prisma`.
|
|
6352
|
+
*/
|
|
6353
|
+
type EmailEventType = 'ORDER_CONFIRMATION' | 'ORDER_SHIPPED' | 'ORDER_CANCELLED' | 'ORDER_COMPLETED' | 'ORDER_REFUNDED' | 'ORDER_NOTE' | 'ORDERS_LINKED' | 'NEW_ORDER_ADMIN' | 'NEW_CUSTOMER' | 'EMAIL_VERIFICATION' | 'PASSWORD_RESET' | 'INQUIRY_NEW_ADMIN' | 'INQUIRY_REPLY_CUSTOMER' | 'INQUIRY_CONFIRMATION_CUSTOMER' | 'CART_ABANDONED' | 'MARKETING_CAMPAIGN' | 'LOW_STOCK_ALERT' | 'TEAM_INVITATION' | 'STORE_INVITATION' | 'STORE_ROLE_CHANGED' | 'STORE_DELETED' | 'EXPORT_COMPLETE' | 'SCHEDULED_BACKUP_SUCCESS' | 'SCHEDULED_BACKUP_FAILED';
|
|
5914
6354
|
/** Email event settings */
|
|
5915
6355
|
interface EmailEventSettings {
|
|
5916
6356
|
enabled: boolean;
|
|
@@ -6488,6 +6928,13 @@ interface CreateInquiryInput {
|
|
|
6488
6928
|
locale?: string;
|
|
6489
6929
|
/** Provenance metadata (referrer, UTM, origin page, etc.). */
|
|
6490
6930
|
sourceMetadata?: Record<string, unknown>;
|
|
6931
|
+
/**
|
|
6932
|
+
* Anti-bot honeypot. Render a hidden input and pass whatever it holds; a
|
|
6933
|
+
* non-empty value rejects the request. Bots fill every text input.
|
|
6934
|
+
* The API validates this field, but the type omitted it, so a typed caller
|
|
6935
|
+
* could not reach the check at all.
|
|
6936
|
+
*/
|
|
6937
|
+
honeypot?: string;
|
|
6491
6938
|
customerId?: string;
|
|
6492
6939
|
metadata?: Record<string, unknown>;
|
|
6493
6940
|
}
|
|
@@ -6875,6 +7322,29 @@ interface ModifierSelection {
|
|
|
6875
7322
|
modifierGroupId: string;
|
|
6876
7323
|
modifierIds: string[];
|
|
6877
7324
|
}
|
|
7325
|
+
/**
|
|
7326
|
+
* One nested-combo node: the product a picked modifier references, plus that
|
|
7327
|
+
* product's own modifier selections, recursing while depth stays ≤ 3.
|
|
7328
|
+
*
|
|
7329
|
+
* Mirrors the backend `NestedSelectionDto`
|
|
7330
|
+
* (`apps/backend/src/modules/cart/dto/add-to-cart.dto.ts`), where `productId`
|
|
7331
|
+
* is REQUIRED. The field used to be typed `Record<string, ModifierSelection[]>`,
|
|
7332
|
+
* which no valid payload could satisfy — a `ModifierSelection` carries no
|
|
7333
|
+
* `productId`, so a caller following the type sent a body the server rejects.
|
|
7334
|
+
* The backend guards the field with `@IsObject()` rather than `@ValidateNested`,
|
|
7335
|
+
* so the shape is enforced downstream in `ModifierGroupsService`, not by the
|
|
7336
|
+
* validator, and the mismatch surfaced as a pricing failure rather than a 400.
|
|
7337
|
+
*/
|
|
7338
|
+
interface NestedModifierSelection {
|
|
7339
|
+
/** The nested product referenced by the parent modifier's `referencedProductId`. */
|
|
7340
|
+
productId: string;
|
|
7341
|
+
/** Variant of the nested product, when it has variants. */
|
|
7342
|
+
variantId?: string;
|
|
7343
|
+
/** The nested product's own modifier-group selections. */
|
|
7344
|
+
selections: ModifierSelection[];
|
|
7345
|
+
/** Deeper nesting, keyed by the parent modifier's id. Server enforces depth ≤ 3. */
|
|
7346
|
+
nestedByModifierId?: Record<string, NestedModifierSelection>;
|
|
7347
|
+
}
|
|
6878
7348
|
/**
|
|
6879
7349
|
* Per-line modifier breakdown surfaced on `CartItem` and `OrderItem`
|
|
6880
7350
|
* once the cart line includes selections.
|
|
@@ -7046,6 +7516,75 @@ interface BlogPostListResponse {
|
|
|
7046
7516
|
totalPages: number;
|
|
7047
7517
|
};
|
|
7048
7518
|
}
|
|
7519
|
+
/**
|
|
7520
|
+
* Entity types that carry a `translations` JSON blob and are reachable via
|
|
7521
|
+
* the Translations admin API (`client.getTranslations`, `setTranslation`,
|
|
7522
|
+
* `deleteTranslation`, `aiTranslateSingle`, `aiTranslateBulk`,
|
|
7523
|
+
* `getTranslationStatus`).
|
|
7524
|
+
*/
|
|
7525
|
+
type TranslatableEntityType = 'store' | 'product' | 'category' | 'brand' | 'tag' | 'variant' | 'attribute' | 'attributeOption' | 'metafield' | 'metafieldDefinition' | 'contactForm' | 'contactFormField' | 'modifierGroup' | 'modifier' | 'bundleOffer' | 'orderBump' | 'discountRule' | 'blogPost';
|
|
7526
|
+
/** One locale's translated field values for an entity. `undefined`/missing keys fall back to the base (default-locale) field. */
|
|
7527
|
+
type LocaleTranslation = Record<string, string | undefined>;
|
|
7528
|
+
/** All persisted translations for one entity, keyed by BCP-47 locale (e.g. `"he"`, `"fr-CA"`). */
|
|
7529
|
+
type TranslationsMap = Record<string, LocaleTranslation>;
|
|
7530
|
+
/**
|
|
7531
|
+
* Body for `setTranslation`. Only the fields valid for the target
|
|
7532
|
+
* `entityType` are persisted server-side (e.g. `blogPost` accepts
|
|
7533
|
+
* `title`/`excerpt`/`content`/`seoTitle`/`seoDescription`/`slug`; `category`
|
|
7534
|
+
* accepts `name`/`description`/`slug`) — passing others is a silent no-op,
|
|
7535
|
+
* not an error. Omitted fields leave the existing translation untouched.
|
|
7536
|
+
*/
|
|
7537
|
+
interface SetTranslationFields {
|
|
7538
|
+
name?: string;
|
|
7539
|
+
description?: string;
|
|
7540
|
+
title?: string;
|
|
7541
|
+
excerpt?: string;
|
|
7542
|
+
content?: string;
|
|
7543
|
+
seoTitle?: string;
|
|
7544
|
+
seoDescription?: string;
|
|
7545
|
+
slug?: string;
|
|
7546
|
+
}
|
|
7547
|
+
/** Input for `aiTranslateSingle`. */
|
|
7548
|
+
interface AiTranslateSingleInput {
|
|
7549
|
+
entityType: TranslatableEntityType;
|
|
7550
|
+
entityId: string;
|
|
7551
|
+
/** BCP-47 locale code, e.g. `"he"`, `"fr-CA"`. */
|
|
7552
|
+
targetLocale: string;
|
|
7553
|
+
/**
|
|
7554
|
+
* Optional in-flight source text (e.g. unsaved editor state) to translate
|
|
7555
|
+
* from instead of the entity's persisted base fields. Keys must match the
|
|
7556
|
+
* entity's translatable fields (e.g. `seoDescription`, not `metaDescription`);
|
|
7557
|
+
* unrecognized keys are ignored.
|
|
7558
|
+
*/
|
|
7559
|
+
sourceFields?: Record<string, string>;
|
|
7560
|
+
}
|
|
7561
|
+
/** Input for `aiTranslateBulk`. */
|
|
7562
|
+
interface AiTranslateBulkInput {
|
|
7563
|
+
/** Bulk-supported types: `product`, `category`, `brand`, `tag`, `attribute`, `modifierGroup`, `metafieldDefinition`, `blogPost`. */
|
|
7564
|
+
entityType: TranslatableEntityType;
|
|
7565
|
+
/** Explicit ids to translate. Omitted = every entity of `entityType` in the store missing a complete translation for `targetLocale`. */
|
|
7566
|
+
entityIds?: string[];
|
|
7567
|
+
/** BCP-47 locale code, e.g. `"he"`, `"fr-CA"`. Must differ from the store's default language. */
|
|
7568
|
+
targetLocale: string;
|
|
7569
|
+
}
|
|
7570
|
+
/** Result of `aiTranslateBulk` — job count, not finished translations (the work runs async). */
|
|
7571
|
+
interface AiTranslateBulkResult {
|
|
7572
|
+
queued: number;
|
|
7573
|
+
}
|
|
7574
|
+
/** One row of `getTranslationStatus`'s per-entity-type, per-locale breakdown. */
|
|
7575
|
+
interface TranslationStatusEntry {
|
|
7576
|
+
entityType: TranslatableEntityType;
|
|
7577
|
+
/** BCP-47 locale code this row's counts apply to. */
|
|
7578
|
+
locale: string;
|
|
7579
|
+
/** Total entities of this type in the store (exact count, not sampled). */
|
|
7580
|
+
total: number;
|
|
7581
|
+
/** Entities with every translatable field filled for `locale`. */
|
|
7582
|
+
translated: number;
|
|
7583
|
+
/** Entities with some but not all translatable fields filled for `locale`. */
|
|
7584
|
+
partial: number;
|
|
7585
|
+
/** Entities with no translation for `locale` at all. */
|
|
7586
|
+
missing: number;
|
|
7587
|
+
}
|
|
7049
7588
|
/**
|
|
7050
7589
|
* Payload for `client.trackEvent()` — the programmatic counterpart to the
|
|
7051
7590
|
* `t.js` script-tag pixel. Every field is optional; the server degrades
|
|
@@ -7118,8 +7657,9 @@ declare function getDirectionForLocale(locale: string | undefined | null): 'ltr'
|
|
|
7118
7657
|
* const client = new BrainerceClient({ salesChannelId: 'vc_abc123...' });
|
|
7119
7658
|
* const products = await client.getProducts();
|
|
7120
7659
|
* ```
|
|
7121
|
-
* (`connectionId` is a deprecated alias of `salesChannelId`. It still works
|
|
7122
|
-
* logs a deprecation warning on every construction
|
|
7660
|
+
* (`connectionId` is a deprecated alias of `salesChannelId`. It still works and
|
|
7661
|
+
* logs a deprecation warning on every construction — it is a permanent
|
|
7662
|
+
* backward-compat alias and is not scheduled for removal.)
|
|
7123
7663
|
*
|
|
7124
7664
|
* **Storefront Mode (Frontend)** - Use storeId for public access:
|
|
7125
7665
|
* ```typescript
|
|
@@ -7299,6 +7839,40 @@ declare class BrainerceClient {
|
|
|
7299
7839
|
* `'ltr'` for everything else (including unknown locales).
|
|
7300
7840
|
*/
|
|
7301
7841
|
getStoreDirection(locale?: string | null): 'ltr' | 'rtl';
|
|
7842
|
+
/**
|
|
7843
|
+
* Get what the merchant actually configured on this sales channel: store
|
|
7844
|
+
* identity and multi-language setup, the channel's own settings (low-stock
|
|
7845
|
+
* warning and threshold, reservation strategy and timeout, birthday and
|
|
7846
|
+
* email-verification requirements, granted scopes) and which optional
|
|
7847
|
+
* features are switched on (payment providers, social login, coupons,
|
|
7848
|
+
* discount rules, shipping zones, downloadables, content, loyalty).
|
|
7849
|
+
*
|
|
7850
|
+
* Read this instead of hardcoding. A storefront with a hardcoded low-stock
|
|
7851
|
+
* threshold shows the wrong badge on every store whose merchant chose a
|
|
7852
|
+
* different one, and a storefront that renders a feature nobody enabled
|
|
7853
|
+
* ships a control that silently does nothing.
|
|
7854
|
+
*
|
|
7855
|
+
* Only available in vibe-coded mode (`salesChannelId`). The payload belongs
|
|
7856
|
+
* to one sales channel: `storeId` mode has no channel to read it from, and
|
|
7857
|
+
* an `apiKey` addresses the store rather than any single channel.
|
|
7858
|
+
*
|
|
7859
|
+
* Call it once for the whole app and share the result. It is per channel,
|
|
7860
|
+
* not per product, so fetching it on every page is wasted work.
|
|
7861
|
+
*
|
|
7862
|
+
* @example
|
|
7863
|
+
* ```typescript
|
|
7864
|
+
* const caps = await client.getStoreCapabilities();
|
|
7865
|
+
*
|
|
7866
|
+
* // Low stock: honour the switch before the number.
|
|
7867
|
+
* const threshold = caps.connection.lowStockWarning
|
|
7868
|
+
* ? caps.connection.lowStockThreshold
|
|
7869
|
+
* : 0;
|
|
7870
|
+
*
|
|
7871
|
+
* if (caps.features.hasCoupons) renderCouponInput();
|
|
7872
|
+
* if (caps.store.i18n?.enabled) renderLocaleSwitcher(caps.store.i18n.supportedLocales);
|
|
7873
|
+
* ```
|
|
7874
|
+
*/
|
|
7875
|
+
getStoreCapabilities(): Promise<StoreCapabilities>;
|
|
7302
7876
|
/**
|
|
7303
7877
|
* Send a storefront analytics beacon (pageview or engagement).
|
|
7304
7878
|
*
|
|
@@ -8128,6 +8702,29 @@ declare class BrainerceClient {
|
|
|
8128
8702
|
occurredAt: string;
|
|
8129
8703
|
}>;
|
|
8130
8704
|
}>>;
|
|
8705
|
+
/**
|
|
8706
|
+
* Buy a return label the merchant sends to their customer to print.
|
|
8707
|
+
*
|
|
8708
|
+
* Requires admin mode (`apiKey`) with `FULFILL_ORDERS` permission — it
|
|
8709
|
+
* spends the store's carrier balance, same as {@link createShippingLabel}.
|
|
8710
|
+
*
|
|
8711
|
+
* Unlike {@link createShippingLabel}, this is **not** on the API-key `/v1`
|
|
8712
|
+
* surface — it calls the internal `/api/orders/:id/shipments/return-label`
|
|
8713
|
+
* route, which takes `storeId` explicitly rather than resolving it from the
|
|
8714
|
+
* key. There is no `rateId` in the body: a return is quoted and bought in
|
|
8715
|
+
* one call at the shipping app, because the carrier fixes a shipment as a
|
|
8716
|
+
* return when it is created and will not amend it afterwards.
|
|
8717
|
+
*
|
|
8718
|
+
* @example
|
|
8719
|
+
* ```typescript
|
|
8720
|
+
* const label = await client.createReturnLabel('store_abc', 'order_abc', {
|
|
8721
|
+
* reason: 'Wrong size',
|
|
8722
|
+
* returnForShipmentId: 'shp_original123',
|
|
8723
|
+
* });
|
|
8724
|
+
* console.log('Return label URL:', label.labelUrl);
|
|
8725
|
+
* ```
|
|
8726
|
+
*/
|
|
8727
|
+
createReturnLabel(storeId: string, orderId: string, data: CreateReturnLabelDto): Promise<CreateReturnLabelResponse>;
|
|
8131
8728
|
/**
|
|
8132
8729
|
* Cancel an order.
|
|
8133
8730
|
*
|
|
@@ -8380,14 +8977,20 @@ declare class BrainerceClient {
|
|
|
8380
8977
|
*/
|
|
8381
8978
|
publishCoupon(couponId: string, platforms: ConnectorPlatform[]): Promise<SyncJob>;
|
|
8382
8979
|
/**
|
|
8383
|
-
* Get platform capabilities for coupon features.
|
|
8384
|
-
*
|
|
8980
|
+
* Get platform capabilities for coupon features, keyed by platform.
|
|
8981
|
+
*
|
|
8982
|
+
* ⛔ **Returns an empty object today.** Platform coupon capabilities moved
|
|
8983
|
+
* into the standalone connector apps and are not re-exposed here yet, so the
|
|
8984
|
+
* endpoint answers `{}` for every store. Treat a missing key as "unknown",
|
|
8985
|
+
* never as "the platform lacks the feature", and do not index into a platform
|
|
8986
|
+
* key without checking it exists first — there are none to find.
|
|
8385
8987
|
*
|
|
8386
8988
|
* @example
|
|
8387
8989
|
* ```typescript
|
|
8388
8990
|
* const capabilities = await client.getCouponPlatformCapabilities();
|
|
8389
|
-
*
|
|
8390
|
-
*
|
|
8991
|
+
* const meta = capabilities['GOOGLE'];
|
|
8992
|
+
* if (meta && !meta.supportsProducts) {
|
|
8993
|
+
* console.log('This platform cannot target individual products');
|
|
8391
8994
|
* }
|
|
8392
8995
|
* ```
|
|
8393
8996
|
*/
|
|
@@ -9761,7 +10364,7 @@ declare class BrainerceClient {
|
|
|
9761
10364
|
/** Modifier-group selections (PRD §7.3 / §8.4). */
|
|
9762
10365
|
selections?: ModifierSelection[];
|
|
9763
10366
|
/** Nested-combo selections keyed by parent modifierId. */
|
|
9764
|
-
nestedByModifierId?: Record<string,
|
|
10367
|
+
nestedByModifierId?: Record<string, NestedModifierSelection>;
|
|
9765
10368
|
}): Promise<Cart>;
|
|
9766
10369
|
/**
|
|
9767
10370
|
* Smart get cart - returns the current cart (server-side for both guests and logged-in users)
|
|
@@ -9918,6 +10521,106 @@ declare class BrainerceClient {
|
|
|
9918
10521
|
* ```
|
|
9919
10522
|
*/
|
|
9920
10523
|
removeCheckoutCoupon(checkoutId: string): Promise<Checkout>;
|
|
10524
|
+
/**
|
|
10525
|
+
* Apply a gift card to a checkout.
|
|
10526
|
+
*
|
|
10527
|
+
* Merchants issue cards from the dashboard, so live codes exist and this field
|
|
10528
|
+
* is worth building. There is still no way for a shopper to BUY a gift card —
|
|
10529
|
+
* no product type, no purchase flow — so every card in circulation was issued
|
|
10530
|
+
* by hand.
|
|
10531
|
+
*
|
|
10532
|
+
* Redemption is deliberately NOT gated on the store's gift-card switch: a
|
|
10533
|
+
* store that turned the feature off still owes every card already in a
|
|
10534
|
+
* customer's hand, so the field keeps working. Build it unconditionally.
|
|
10535
|
+
*
|
|
10536
|
+
* A gift card is a **means of payment, not a discount**. The order total does
|
|
10537
|
+
* not change and tax stays calculated on the full value; what changes is
|
|
10538
|
+
* `providerAmountDue`, the amount the payment provider will be charged.
|
|
10539
|
+
*
|
|
10540
|
+
* Render it as its own line — "Gift card −₪54.50" beside the total — and NOT
|
|
10541
|
+
* by adding it to `discountAmount`. A shopper who sees stored value folded
|
|
10542
|
+
* into a discount is being shown the wrong thing, and so is their receipt.
|
|
10543
|
+
*
|
|
10544
|
+
* Only as much of the card as the order still owes is applied, so a card
|
|
10545
|
+
* larger than the basket leaves a balance on it for next time, and a smaller
|
|
10546
|
+
* one leaves an amount for the provider to charge.
|
|
10547
|
+
*
|
|
10548
|
+
* @example
|
|
10549
|
+
* const { amountApplied, providerAmountDue, tenderId } =
|
|
10550
|
+
* await client.applyGiftCard('checkout_123', 'A1B2-C3D4-E5F6-G7H8-J9K0');
|
|
10551
|
+
* // total is unchanged; charge the provider providerAmountDue
|
|
10552
|
+
*/
|
|
10553
|
+
applyGiftCard(checkoutId: string, code: string): Promise<CheckoutTender>;
|
|
10554
|
+
/**
|
|
10555
|
+
* Remove a previously applied gift card from a checkout.
|
|
10556
|
+
*
|
|
10557
|
+
* Takes the `tenderId` returned by {@link applyGiftCard}, not the code — a
|
|
10558
|
+
* checkout can carry more than one card, and the code is never echoed back.
|
|
10559
|
+
*
|
|
10560
|
+
* The held value goes straight back to the card. Nothing was ever debited
|
|
10561
|
+
* while it was applied, so removing costs the shopper nothing.
|
|
10562
|
+
*/
|
|
10563
|
+
removeGiftCard(checkoutId: string, tenderId: string): Promise<{
|
|
10564
|
+
removed: boolean;
|
|
10565
|
+
providerAmountDue: string;
|
|
10566
|
+
}>;
|
|
10567
|
+
/**
|
|
10568
|
+
* Check what is left on a gift card.
|
|
10569
|
+
*
|
|
10570
|
+
* Rate limited, and deliberately uninformative: a code that does not exist,
|
|
10571
|
+
* one that has been disabled and one that has expired all return the SAME
|
|
10572
|
+
* response — `{ balance: '0.00', usable: false }` — and take the same time to
|
|
10573
|
+
* do it. Do not build UI that tries to tell those apart, because the API will
|
|
10574
|
+
* not tell you, by design: a gift-card code is bearer value, and an endpoint
|
|
10575
|
+
* that confirmed which codes were real would be a free way to find them.
|
|
10576
|
+
*
|
|
10577
|
+
* Show "we cannot use this code" and let the shopper re-enter it.
|
|
10578
|
+
*/
|
|
10579
|
+
checkGiftCardBalance(code: string): Promise<GiftCardBalance>;
|
|
10580
|
+
/**
|
|
10581
|
+
* Start a donation.
|
|
10582
|
+
*
|
|
10583
|
+
* A donation does not go through the cart. There is no line item, no
|
|
10584
|
+
* quantity, no shipping and no order — a donor names an amount and pays it,
|
|
10585
|
+
* which is a different shape of transaction from a purchase. Do not model a
|
|
10586
|
+
* donation as a product; if you already have, the amount is the giveaway:
|
|
10587
|
+
* you cannot let a donor type one.
|
|
10588
|
+
*
|
|
10589
|
+
* ⛔ A successful return is NOT a completed gift. You get back a PENDING
|
|
10590
|
+
* donation and a provider intent to complete, exactly as with a checkout.
|
|
10591
|
+
* The gift is only real once the provider's webhook confirms it, which is
|
|
10592
|
+
* when the donation reads back as `PAID`. Show a thank-you that reflects
|
|
10593
|
+
* that, and never send a receipt off the back of this call.
|
|
10594
|
+
*
|
|
10595
|
+
* Requires donations to be switched on for the store; a store that has not
|
|
10596
|
+
* turned them on is rejected rather than silently accepting money.
|
|
10597
|
+
*
|
|
10598
|
+
* ```ts
|
|
10599
|
+
* const donation = await brainerce.createDonation({
|
|
10600
|
+
* amount: 180,
|
|
10601
|
+
* feeCoverAmount: 6.3, // offered as a checkbox; most donors accept
|
|
10602
|
+
* donorEmail: 'sarah@example.com',
|
|
10603
|
+
* donorName: 'Sarah Cohen',
|
|
10604
|
+
* tributeType: 'IN_MEMORY',
|
|
10605
|
+
* tributeName: 'Avraham Cohen',
|
|
10606
|
+
* returnPath: '/thank-you',
|
|
10607
|
+
* });
|
|
10608
|
+
* // → complete donation.payment with your provider, then poll getDonation()
|
|
10609
|
+
* ```
|
|
10610
|
+
*/
|
|
10611
|
+
createDonation(input: CreateDonationInput): Promise<DonationIntent>;
|
|
10612
|
+
/**
|
|
10613
|
+
* Read a donation back — for a thank-you page, and to see whether it is paid.
|
|
10614
|
+
*
|
|
10615
|
+
* Rate limited to 5 requests a minute, because an id that either resolves or
|
|
10616
|
+
* 404s is a way to enumerate them. Poll it a handful of times after the donor
|
|
10617
|
+
* returns from the provider; do not put it behind a 1-second interval.
|
|
10618
|
+
*
|
|
10619
|
+
* The payload is narrow on purpose: no failure reason, and `donorName` comes
|
|
10620
|
+
* back `null` whenever the gift was marked anonymous — so you can render this
|
|
10621
|
+
* straight onto a public page without leaking anything.
|
|
10622
|
+
*/
|
|
10623
|
+
getDonation(donationId: string): Promise<PublicDonation>;
|
|
9921
10624
|
/**
|
|
9922
10625
|
* Set customer information on checkout
|
|
9923
10626
|
*
|
|
@@ -11014,92 +11717,6 @@ declare class BrainerceClient {
|
|
|
11014
11717
|
* Only available in storefront mode
|
|
11015
11718
|
*/
|
|
11016
11719
|
getMyCart(): Promise<Cart>;
|
|
11017
|
-
/**
|
|
11018
|
-
* Get all Custom API integrations for a store
|
|
11019
|
-
* Requires Admin mode (apiKey)
|
|
11020
|
-
*
|
|
11021
|
-
* @example
|
|
11022
|
-
* ```typescript
|
|
11023
|
-
* const integrations = await client.getCustomApiIntegrations();
|
|
11024
|
-
* integrations.forEach(api => {
|
|
11025
|
-
* console.log(`${api.name}: ${api.status}`);
|
|
11026
|
-
* });
|
|
11027
|
-
* ```
|
|
11028
|
-
*/
|
|
11029
|
-
getCustomApiIntegrations(): Promise<CustomApiIntegration[]>;
|
|
11030
|
-
/**
|
|
11031
|
-
* Get a single Custom API integration by ID
|
|
11032
|
-
* Requires Admin mode (apiKey)
|
|
11033
|
-
*
|
|
11034
|
-
* @example
|
|
11035
|
-
* ```typescript
|
|
11036
|
-
* const api = await client.getCustomApiIntegration('api_123');
|
|
11037
|
-
* console.log(`API: ${api.name}, URL: ${api.baseUrl}`);
|
|
11038
|
-
* ```
|
|
11039
|
-
*/
|
|
11040
|
-
getCustomApiIntegration(integrationId: string): Promise<CustomApiIntegration>;
|
|
11041
|
-
/**
|
|
11042
|
-
* Create a new Custom API integration
|
|
11043
|
-
* Requires Admin mode (apiKey)
|
|
11044
|
-
*
|
|
11045
|
-
* @example
|
|
11046
|
-
* ```typescript
|
|
11047
|
-
* const api = await client.createCustomApiIntegration({
|
|
11048
|
-
* name: 'My External API',
|
|
11049
|
-
* baseUrl: 'https://api.example.com',
|
|
11050
|
-
* authType: 'api_key',
|
|
11051
|
-
* credentials: {
|
|
11052
|
-
* apiKey: 'sk_123...',
|
|
11053
|
-
* headerName: 'X-API-Key',
|
|
11054
|
-
* },
|
|
11055
|
-
* syncDirection: 'bidirectional',
|
|
11056
|
-
* syncConfig: {
|
|
11057
|
-
* products: true,
|
|
11058
|
-
* orders: true,
|
|
11059
|
-
* inventory: true,
|
|
11060
|
-
* },
|
|
11061
|
-
* });
|
|
11062
|
-
* ```
|
|
11063
|
-
*/
|
|
11064
|
-
createCustomApiIntegration(data: CreateCustomApiDto): Promise<CustomApiIntegration>;
|
|
11065
|
-
/**
|
|
11066
|
-
* Update a Custom API integration
|
|
11067
|
-
* Requires Admin mode (apiKey)
|
|
11068
|
-
*
|
|
11069
|
-
* @example
|
|
11070
|
-
* ```typescript
|
|
11071
|
-
* const api = await client.updateCustomApiIntegration('api_123', {
|
|
11072
|
-
* enabled: false,
|
|
11073
|
-
* syncConfig: { products: true, orders: false, inventory: true },
|
|
11074
|
-
* });
|
|
11075
|
-
* ```
|
|
11076
|
-
*/
|
|
11077
|
-
updateCustomApiIntegration(integrationId: string, data: UpdateCustomApiDto): Promise<CustomApiIntegration>;
|
|
11078
|
-
/**
|
|
11079
|
-
* Delete a Custom API integration
|
|
11080
|
-
* Requires Admin mode (apiKey)
|
|
11081
|
-
*
|
|
11082
|
-
* @example
|
|
11083
|
-
* ```typescript
|
|
11084
|
-
* await client.deleteCustomApiIntegration('api_123');
|
|
11085
|
-
* ```
|
|
11086
|
-
*/
|
|
11087
|
-
deleteCustomApiIntegration(integrationId: string): Promise<void>;
|
|
11088
|
-
/**
|
|
11089
|
-
* Test connection to a Custom API
|
|
11090
|
-
* Requires Admin mode (apiKey)
|
|
11091
|
-
*
|
|
11092
|
-
* @example
|
|
11093
|
-
* ```typescript
|
|
11094
|
-
* const result = await client.testCustomApiConnection('api_123');
|
|
11095
|
-
* if (result.success) {
|
|
11096
|
-
* console.log(`Connection OK, latency: ${result.latency}ms`);
|
|
11097
|
-
* } else {
|
|
11098
|
-
* console.error(`Connection failed: ${result.error}`);
|
|
11099
|
-
* }
|
|
11100
|
-
* ```
|
|
11101
|
-
*/
|
|
11102
|
-
testCustomApiConnection(integrationId: string): Promise<CustomApiTestResult>;
|
|
11103
11720
|
/**
|
|
11104
11721
|
* Get product availability including reserved quantities.
|
|
11105
11722
|
* Use this to show accurate stock to customers when reservations are enabled.
|
|
@@ -11510,12 +12127,18 @@ declare class BrainerceClient {
|
|
|
11510
12127
|
* ```typescript
|
|
11511
12128
|
* const rate = await client.createZoneShippingRate('zone_123', {
|
|
11512
12129
|
* name: 'Standard Shipping',
|
|
11513
|
-
* type: '
|
|
11514
|
-
*
|
|
11515
|
-
*
|
|
11516
|
-
*
|
|
12130
|
+
* type: 'FLAT_RATE',
|
|
12131
|
+
* rateConfig: { amount: 5.99 },
|
|
12132
|
+
* minDeliveryDays: 3,
|
|
12133
|
+
* maxDeliveryDays: 5,
|
|
11517
12134
|
* });
|
|
11518
12135
|
* ```
|
|
12136
|
+
*
|
|
12137
|
+
* The price lives in `rateConfig`, whose shape follows `type` — `FLAT_RATE`
|
|
12138
|
+
* takes `{ amount }`, `WEIGHT_BASED` and `PRICE_BASED` take tier arrays, and
|
|
12139
|
+
* `FREE` and `LOCAL_PICKUP` take none. Unknown top-level properties are
|
|
12140
|
+
* rejected outright rather than ignored, so a stray `price` or
|
|
12141
|
+
* `estimatedDays` fails the whole call with 400.
|
|
11519
12142
|
*/
|
|
11520
12143
|
createZoneShippingRate(zoneId: string, data: CreateShippingRateDto): Promise<ShippingRateConfig>;
|
|
11521
12144
|
/**
|
|
@@ -11604,6 +12227,10 @@ declare class BrainerceClient {
|
|
|
11604
12227
|
*
|
|
11605
12228
|
* Returns `appliesTax=false` when tax is disabled, the country is missing,
|
|
11606
12229
|
* or no active rate covers it.
|
|
12230
|
+
*
|
|
12231
|
+
* The preview has no province, so it only sees country-level rates: a
|
|
12232
|
+
* Canadian estimate shows the federal GST alone and the provincial PST/QST
|
|
12233
|
+
* joins it at checkout. Render `note` so the buyer is not surprised.
|
|
11607
12234
|
*/
|
|
11608
12235
|
estimateTax(params: {
|
|
11609
12236
|
country?: string;
|
|
@@ -11644,8 +12271,47 @@ declare class BrainerceClient {
|
|
|
11644
12271
|
/**
|
|
11645
12272
|
* Get all tax rates for the store
|
|
11646
12273
|
* Requires Admin mode (apiKey)
|
|
12274
|
+
*
|
|
12275
|
+
* A jurisdiction can need more than one rate. Canada is the common case: a
|
|
12276
|
+
* country-level `GST` row plus a province-level `PST`/`QST` row, both with
|
|
12277
|
+
* `stackable: true`, which the checkout charges together. Provinces on HST
|
|
12278
|
+
* carry a single combined row with `stackable: false`.
|
|
11647
12279
|
*/
|
|
11648
12280
|
getTaxRates(): Promise<TaxRate[]>;
|
|
12281
|
+
/**
|
|
12282
|
+
* List the country tax presets available to apply.
|
|
12283
|
+
* Requires Admin mode (apiKey)
|
|
12284
|
+
*/
|
|
12285
|
+
getTaxPresets(): Promise<Array<{
|
|
12286
|
+
key: string;
|
|
12287
|
+
country: string;
|
|
12288
|
+
label: string;
|
|
12289
|
+
description: string;
|
|
12290
|
+
rateCount: number;
|
|
12291
|
+
}>>;
|
|
12292
|
+
/**
|
|
12293
|
+
* Apply a country's whole tax table in one call, instead of creating a rate
|
|
12294
|
+
* per province by hand. Requires Admin mode (apiKey).
|
|
12295
|
+
*
|
|
12296
|
+
* `CA` writes ten rates: federal GST 5% country-wide, one combined HST row
|
|
12297
|
+
* each for ON/NB/NL/NS/PE, and PST/RST/QST for BC/SK/MB/QC charged on top of
|
|
12298
|
+
* the GST. Alberta and the territories need no row — the GST covers them.
|
|
12299
|
+
*
|
|
12300
|
+
* Throws 409 when the store already has rates for that country; delete those
|
|
12301
|
+
* first if you meant to replace them. Rates land in the Standard tax class.
|
|
12302
|
+
*
|
|
12303
|
+
* Brainerce does not register the store for GST/HST and does not file returns.
|
|
12304
|
+
*
|
|
12305
|
+
* @example
|
|
12306
|
+
* ```typescript
|
|
12307
|
+
* const { created } = await client.applyTaxPreset('CA'); // created === 10
|
|
12308
|
+
* ```
|
|
12309
|
+
*/
|
|
12310
|
+
applyTaxPreset(presetKey: string): Promise<{
|
|
12311
|
+
preset: string;
|
|
12312
|
+
created: number;
|
|
12313
|
+
rates: TaxRate[];
|
|
12314
|
+
}>;
|
|
11649
12315
|
/**
|
|
11650
12316
|
* Get a single tax rate by ID
|
|
11651
12317
|
* Requires Admin mode (apiKey)
|
|
@@ -12283,6 +12949,110 @@ declare class BrainerceClient {
|
|
|
12283
12949
|
* Requires Admin mode (apiKey)
|
|
12284
12950
|
*/
|
|
12285
12951
|
deleteOAuthProvider(provider: OAuthProviderType): Promise<void>;
|
|
12952
|
+
/**
|
|
12953
|
+
* Get translation completeness across every translatable entity type, for
|
|
12954
|
+
* one or more locales. Useful as a pre-flight before a bulk import to see
|
|
12955
|
+
* which entity types/locales still need coverage.
|
|
12956
|
+
* Requires Admin mode (apiKey).
|
|
12957
|
+
*
|
|
12958
|
+
* @param storeId - Store to inspect.
|
|
12959
|
+
* @param locales - BCP-47 locale codes to check (e.g. `['he', 'fr']`). Omit
|
|
12960
|
+
* or pass an empty array to get rows with `total` populated but no
|
|
12961
|
+
* locale breakdown.
|
|
12962
|
+
*
|
|
12963
|
+
* @example
|
|
12964
|
+
* ```typescript
|
|
12965
|
+
* const status = await client.getTranslationStatus('store_123', ['he', 'fr']);
|
|
12966
|
+
* const blogHe = status.find((s) => s.entityType === 'blogPost' && s.locale === 'he');
|
|
12967
|
+
* console.log(`${blogHe?.missing} blog posts still need Hebrew`);
|
|
12968
|
+
* ```
|
|
12969
|
+
*/
|
|
12970
|
+
getTranslationStatus(storeId: string, locales?: string[]): Promise<TranslationStatusEntry[]>;
|
|
12971
|
+
/**
|
|
12972
|
+
* Get every persisted translation for a single entity, keyed by locale.
|
|
12973
|
+
* Requires Admin mode (apiKey).
|
|
12974
|
+
*
|
|
12975
|
+
* @example
|
|
12976
|
+
* ```typescript
|
|
12977
|
+
* const translations = await client.getTranslations('store_123', 'product', 'prod_abc');
|
|
12978
|
+
* console.log(translations.he?.name); // Hebrew product name, if set
|
|
12979
|
+
* ```
|
|
12980
|
+
*/
|
|
12981
|
+
getTranslations(storeId: string, entityType: TranslatableEntityType, entityId: string): Promise<TranslationsMap>;
|
|
12982
|
+
/**
|
|
12983
|
+
* Set/update one locale's translation for an entity. Only the fields valid
|
|
12984
|
+
* for `entityType` are persisted (e.g. `title`/`excerpt`/`content` for
|
|
12985
|
+
* `blogPost`, `name`/`description` for `category`) — fields outside that
|
|
12986
|
+
* entity's allowlist are silently ignored server-side, and omitted fields
|
|
12987
|
+
* leave any existing translation for them untouched (this is a merge, not
|
|
12988
|
+
* a replace, of the locale's fields).
|
|
12989
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
12990
|
+
* scope for the target entity type).
|
|
12991
|
+
*
|
|
12992
|
+
* @example
|
|
12993
|
+
* ```typescript
|
|
12994
|
+
* // Bulk-import a pre-translated blog post
|
|
12995
|
+
* await client.setTranslation('store_123', 'blogPost', 'post_abc', 'fr', {
|
|
12996
|
+
* title: 'Le titre en français',
|
|
12997
|
+
* excerpt: "L'extrait en français",
|
|
12998
|
+
* content: '<p>Le contenu en français</p>',
|
|
12999
|
+
* });
|
|
13000
|
+
* ```
|
|
13001
|
+
*/
|
|
13002
|
+
setTranslation(storeId: string, entityType: TranslatableEntityType, entityId: string, locale: string, fields: SetTranslationFields): Promise<TranslationsMap>;
|
|
13003
|
+
/**
|
|
13004
|
+
* Delete one locale's translation for an entity. The entity's base
|
|
13005
|
+
* (default-locale) fields are unaffected.
|
|
13006
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
13007
|
+
* scope for the target entity type).
|
|
13008
|
+
*/
|
|
13009
|
+
deleteTranslation(storeId: string, entityType: TranslatableEntityType, entityId: string, locale: string): Promise<void>;
|
|
13010
|
+
/**
|
|
13011
|
+
* AI-translate a single entity into one target locale and persist the
|
|
13012
|
+
* result inline (synchronous — the response already reflects the write).
|
|
13013
|
+
* Only fields that are still empty for `targetLocale` are filled; existing
|
|
13014
|
+
* translated values are never overwritten.
|
|
13015
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
13016
|
+
* scope for the target entity type).
|
|
13017
|
+
*
|
|
13018
|
+
* @param sourceFields - Optional override of the source-language text to
|
|
13019
|
+
* translate from (e.g. unsaved edits from an open editor), instead of the
|
|
13020
|
+
* entity's persisted base fields. Keys outside the entity's translatable
|
|
13021
|
+
* field set are ignored.
|
|
13022
|
+
*
|
|
13023
|
+
* @example
|
|
13024
|
+
* ```typescript
|
|
13025
|
+
* const translations = await client.aiTranslateSingle('store_123', {
|
|
13026
|
+
* entityType: 'product',
|
|
13027
|
+
* entityId: 'prod_abc',
|
|
13028
|
+
* targetLocale: 'he',
|
|
13029
|
+
* });
|
|
13030
|
+
* ```
|
|
13031
|
+
*/
|
|
13032
|
+
aiTranslateSingle(storeId: string, input: AiTranslateSingleInput): Promise<TranslationsMap>;
|
|
13033
|
+
/**
|
|
13034
|
+
* Bulk AI-translate — enqueues a background job per entity (and, for
|
|
13035
|
+
* `entityType: 'attribute'`, one per attribute option too) rather than
|
|
13036
|
+
* translating inline. Returns the number of jobs queued, not the finished
|
|
13037
|
+
* translations; poll `getTranslationStatus` or `getTranslations` to see
|
|
13038
|
+
* results land.
|
|
13039
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
13040
|
+
* scope for the target entity type).
|
|
13041
|
+
*
|
|
13042
|
+
* @param entityIds - Optional explicit ids to translate. Omit to target
|
|
13043
|
+
* every entity of `entityType` in the store that isn't already fully
|
|
13044
|
+
* translated for `targetLocale`.
|
|
13045
|
+
*
|
|
13046
|
+
* @example
|
|
13047
|
+
* ```typescript
|
|
13048
|
+
* // Translate every blog post missing French coverage
|
|
13049
|
+
* const { queued } = await client.aiTranslateBulk('store_123', {
|
|
13050
|
+
* entityType: 'blogPost',
|
|
13051
|
+
* targetLocale: 'fr',
|
|
13052
|
+
* });
|
|
13053
|
+
* ```
|
|
13054
|
+
*/
|
|
13055
|
+
aiTranslateBulk(storeId: string, input: AiTranslateBulkInput): Promise<AiTranslateBulkResult>;
|
|
12286
13056
|
}
|
|
12287
13057
|
/**
|
|
12288
13058
|
* Custom error class for Brainerce API errors
|
|
@@ -12293,7 +13063,7 @@ declare class BrainerceError extends Error {
|
|
|
12293
13063
|
constructor(message: string, statusCode: number, details?: unknown);
|
|
12294
13064
|
}
|
|
12295
13065
|
|
|
12296
|
-
declare const SDK_VERSION = "2.0.
|
|
13066
|
+
declare const SDK_VERSION = "2.0.3";
|
|
12297
13067
|
|
|
12298
13068
|
/**
|
|
12299
13069
|
* Verify a webhook signature from Brainerce
|
|
@@ -12794,4 +13564,4 @@ interface CategorySitemapOptions {
|
|
|
12794
13564
|
*/
|
|
12795
13565
|
declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
|
|
12796
13566
|
|
|
12797
|
-
export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AttachModifierGroupInput, type Attribute, type AttributeOption, type AttributeSource, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateTagDto as CreateTagInput, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type CustomApiAuthType, type CustomApiConnectionStatus, type CustomApiCredentials, type CustomApiIntegration, type CustomApiSyncConfig, type CustomApiSyncDirection, type CustomApiTestResult, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LockedVariant, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReviewStatus, type RichTextContent, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type SubmitProductReviewInput, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomApiDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
|
|
13567
|
+
export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AiTranslateBulkInput, type AiTranslateBulkResult, type AiTranslateSingleInput, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AssignTaxClassDto, type AttachModifierGroupInput, type Attribute, type AttributeDisplayType, type AttributeOption, type AttributeSource, type AutoRegionResponse, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundleOfferOfferedProduct, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartItemUnavailableReason, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CheckoutTender, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateRegionDto, type CreateReturnLabelDto as CreateReturnLabelInput, type CreateReturnLabelResponse, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateStockAlertInput, type CreateTagDto as CreateTagInput, type CreateTaxClassDto, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type CustomizationFieldOption, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GiftCardBalance, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type I18nSettings, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LocaleTranslation, type LockedVariant, type LoyaltyBadge, type LoyaltyMembershipPlan, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyRewardRecommendation, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type NestedModifierSelection, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthErrorCode, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type PaidMembershipInfo, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductReviewImage, type ProductReviewImageAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublicRegion, type PublicRegionDetail, type PublicRegionPaymentProvider, type PublicTaxClass, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type Region, type RegionPaymentProvider, type RegisterCustomerDto, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReturnLabelParcel, type ReviewPhotoUpload, type ReviewStatus, type RichTextContent, SDK_VERSION, type SavedPaymentMethodSummary, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type SetTranslationFields, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAlertResponse, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreCapabilities, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type StorefrontSavedPaymentMethod, type SubmitProductReviewInput, type SubscribeMarketingInput, type SubscribeMarketingResponse, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxClass, type TaxEstimateResponse, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type TranslatableEntityType, type TranslationStatusEntry, type TranslationsMap, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateRegionDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxClassDto, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsellSettings, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
|