brainerce 1.17.0 → 1.18.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 +4487 -4447
- package/dist/index.d.mts +113 -12
- package/dist/index.d.ts +113 -12
- package/dist/index.js +119 -18
- package/dist/index.mjs +119 -18
- package/package.json +76 -76
package/dist/index.d.mts
CHANGED
|
@@ -961,10 +961,13 @@ interface OrderItem {
|
|
|
961
961
|
totalPrice?: string;
|
|
962
962
|
/** Product image URL (flat, not nested under product object) */
|
|
963
963
|
image?: string;
|
|
964
|
-
/**
|
|
964
|
+
/**
|
|
965
|
+
* Customer input field values captured at checkout (e.g., cake text, uploaded logo).
|
|
966
|
+
* `value` is `string[]` for MULTI_SELECT / GALLERY types, `string` otherwise.
|
|
967
|
+
*/
|
|
965
968
|
customizations?: Record<string, {
|
|
966
969
|
label: string;
|
|
967
|
-
value: string;
|
|
970
|
+
value: string | string[];
|
|
968
971
|
type: string;
|
|
969
972
|
}>;
|
|
970
973
|
}
|
|
@@ -2498,8 +2501,8 @@ interface CustomApiTestResult {
|
|
|
2498
2501
|
* The frontend dynamically loads the SDK script and calls init/render methods.
|
|
2499
2502
|
*/
|
|
2500
2503
|
interface PaymentClientSdk {
|
|
2501
|
-
/** How the payment UI is rendered: 'sdk-widget' (JS SDK), 'iframe', 'redirect',
|
|
2502
|
-
renderType: 'sdk-widget' | 'iframe' | 'redirect' | 'sandbox';
|
|
2504
|
+
/** How the payment UI is rendered: 'sdk-widget' (JS SDK), 'iframe', 'redirect', 'sandbox' (test orders), or 'embedded-fields' (PCI-compliant provider-hosted fields embedded in merchant DOM, e.g. Cardcom OpenFields, Stripe Elements) */
|
|
2505
|
+
renderType: 'sdk-widget' | 'iframe' | 'redirect' | 'sandbox' | 'embedded-fields';
|
|
2503
2506
|
/** URL of the main SDK script to load */
|
|
2504
2507
|
scriptUrl?: string;
|
|
2505
2508
|
/** Name of the global variable set by the SDK script (e.g., 'growPayment') */
|
|
@@ -2521,6 +2524,12 @@ interface PaymentClientSdk {
|
|
|
2521
2524
|
}>;
|
|
2522
2525
|
/** CSS to inject into <head> when SDK is active (e.g., LTR overrides for body-level popups on RTL pages) */
|
|
2523
2526
|
bodyStyles?: string;
|
|
2527
|
+
/** For renderType='embedded-fields': base URL the sensitive-field iframes load (e.g. 'https://secure.cardcom.solutions'). postMessage origin is strictly validated against this. */
|
|
2528
|
+
embeddedFieldsUrl?: string;
|
|
2529
|
+
/** For renderType='embedded-fields': opaque provider session id used in the iframe init handshake (e.g., Cardcom LowProfileId) */
|
|
2530
|
+
embeddedFieldsSessionId?: string;
|
|
2531
|
+
/** Provider discriminator that selects the correct embedded-fields component on the storefront */
|
|
2532
|
+
embeddedFieldsProvider?: 'cardcom';
|
|
2524
2533
|
}
|
|
2525
2534
|
/**
|
|
2526
2535
|
* Payment provider configuration (returned by `getPaymentProviders()`).
|
|
@@ -3156,7 +3165,7 @@ interface UpdateTaxRateDto {
|
|
|
3156
3165
|
/**
|
|
3157
3166
|
* Metafield type for defining value structure
|
|
3158
3167
|
*/
|
|
3159
|
-
type MetafieldType = 'TEXT' | 'TEXTAREA' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'URL' | 'COLOR' | 'DIMENSION' | 'WEIGHT' | 'JSON' | 'IMAGE' | 'GALLERY';
|
|
3168
|
+
type MetafieldType = 'TEXT' | 'TEXTAREA' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'URL' | 'COLOR' | 'DIMENSION' | 'WEIGHT' | 'JSON' | 'IMAGE' | 'GALLERY' | 'SELECT' | 'MULTI_SELECT';
|
|
3160
3169
|
/**
|
|
3161
3170
|
* Metafield definition - schema for product metafields
|
|
3162
3171
|
*/
|
|
@@ -3693,6 +3702,21 @@ interface CartBundleOffer {
|
|
|
3693
3702
|
interface CartBundlesResponse {
|
|
3694
3703
|
bundles: CartBundleOffer[];
|
|
3695
3704
|
}
|
|
3705
|
+
/** Valid values for the cart `include` query parameter */
|
|
3706
|
+
type CartIncludeOption = 'recommendations' | 'upgrades' | 'bundles';
|
|
3707
|
+
/** Options for getCart / smartGetCart with optional includes */
|
|
3708
|
+
interface CartIncludeOptions {
|
|
3709
|
+
include?: CartIncludeOption[];
|
|
3710
|
+
}
|
|
3711
|
+
/** Cart response enriched with optional included data */
|
|
3712
|
+
interface CartWithIncludes extends Cart {
|
|
3713
|
+
/** Cross-sell recommendations (present when include contains 'recommendations') */
|
|
3714
|
+
recommendations?: CartRecommendationsResponse;
|
|
3715
|
+
/** Upgrade suggestions (present when include contains 'upgrades') */
|
|
3716
|
+
upgrades?: CartUpgradesResponse;
|
|
3717
|
+
/** Bundle offers (present when include contains 'bundles') */
|
|
3718
|
+
bundles?: CartBundlesResponse;
|
|
3719
|
+
}
|
|
3696
3720
|
interface OrderBump {
|
|
3697
3721
|
id: string;
|
|
3698
3722
|
title: string;
|
|
@@ -4911,18 +4935,60 @@ declare class BrainerceClient {
|
|
|
4911
4935
|
getCartByCustomer(customerId: string): Promise<Cart>;
|
|
4912
4936
|
/**
|
|
4913
4937
|
* Get a cart by ID
|
|
4938
|
+
*
|
|
4939
|
+
* @param cartId - The cart ID
|
|
4940
|
+
* @param options - Optional settings. Use `include` to fetch related data in a single request.
|
|
4941
|
+
*
|
|
4942
|
+
* @example
|
|
4943
|
+
* ```typescript
|
|
4944
|
+
* // Basic cart fetch
|
|
4945
|
+
* const cart = await client.getCart('cart_123');
|
|
4946
|
+
*
|
|
4947
|
+
* // Fetch cart with recommendations, upgrades, and bundles in one call
|
|
4948
|
+
* const enriched = await client.getCart('cart_123', {
|
|
4949
|
+
* include: ['recommendations', 'upgrades', 'bundles'],
|
|
4950
|
+
* });
|
|
4951
|
+
* console.log(enriched.recommendations); // { recommendations: [...] }
|
|
4952
|
+
* console.log(enriched.upgrades); // { upgrades: { ... } }
|
|
4953
|
+
* console.log(enriched.bundles); // { bundles: [...] }
|
|
4954
|
+
* ```
|
|
4914
4955
|
*/
|
|
4915
|
-
getCart(cartId: string): Promise<
|
|
4956
|
+
getCart(cartId: string, options?: CartIncludeOptions): Promise<CartWithIncludes>;
|
|
4916
4957
|
/**
|
|
4917
|
-
* Add an item to the cart
|
|
4958
|
+
* Add an item to the cart.
|
|
4959
|
+
*
|
|
4960
|
+
* If the product has `customizationFields` (merchant-defined buyer input
|
|
4961
|
+
* like engraving text, uploaded photos, select options), pass the buyer's
|
|
4962
|
+
* values in `metadata`. Keys must match each field's `key`. For `IMAGE` /
|
|
4963
|
+
* `GALLERY` types, upload the file first via `uploadCustomizationFile()`
|
|
4964
|
+
* and pass the returned URL. The server validates every value against its
|
|
4965
|
+
* `MetafieldDefinition` and rejects the request with HTTP 400 if anything
|
|
4966
|
+
* fails (type mismatch, required missing, not in `enumValues`, etc.).
|
|
4967
|
+
*
|
|
4968
|
+
* Values are snapshotted onto the order line at checkout — later edits to
|
|
4969
|
+
* the field definition do not retroactively change existing orders.
|
|
4918
4970
|
*
|
|
4919
4971
|
* @example
|
|
4920
4972
|
* ```typescript
|
|
4973
|
+
* // Product with no customization fields
|
|
4921
4974
|
* const cart = await client.addToCart('cart_123', {
|
|
4922
4975
|
* productId: 'prod_abc',
|
|
4923
4976
|
* quantity: 2,
|
|
4924
4977
|
* notes: 'Gift wrap please',
|
|
4925
4978
|
* });
|
|
4979
|
+
*
|
|
4980
|
+
* // Product WITH customization fields (engraving + photo + select + multi)
|
|
4981
|
+
* const { url: photoUrl } = await client.uploadCustomizationFile(file);
|
|
4982
|
+
* const cart = await client.addToCart('cart_123', {
|
|
4983
|
+
* productId: 'prod_mug',
|
|
4984
|
+
* quantity: 1,
|
|
4985
|
+
* metadata: {
|
|
4986
|
+
* engraving_text: 'Happy Birthday!', // TEXT
|
|
4987
|
+
* frame_color: 'Gold', // SELECT (must be in enumValues)
|
|
4988
|
+
* upload_photo: photoUrl, // IMAGE
|
|
4989
|
+
* addons: ['Gift wrap'], // MULTI_SELECT (always array)
|
|
4990
|
+
* },
|
|
4991
|
+
* });
|
|
4926
4992
|
* ```
|
|
4927
4993
|
*/
|
|
4928
4994
|
addToCart(cartId: string, item: AddToCartDto): Promise<Cart>;
|
|
@@ -5263,6 +5329,7 @@ declare class BrainerceClient {
|
|
|
5263
5329
|
productId: string;
|
|
5264
5330
|
variantId?: string;
|
|
5265
5331
|
quantity: number;
|
|
5332
|
+
metadata?: Record<string, unknown>;
|
|
5266
5333
|
}): Promise<Cart>;
|
|
5267
5334
|
/**
|
|
5268
5335
|
* Smart get cart - returns the current cart (server-side for both guests and logged-in users)
|
|
@@ -5271,13 +5338,21 @@ declare class BrainerceClient {
|
|
|
5271
5338
|
* - **Guest with session**: Returns server-side session cart
|
|
5272
5339
|
* - **Guest without session**: Returns empty cart (no server call, cart created lazily on add)
|
|
5273
5340
|
*
|
|
5341
|
+
* @param options - Optional. Use `include` to fetch recommendations, upgrades, and bundles
|
|
5342
|
+
* in a single request instead of separate calls.
|
|
5343
|
+
*
|
|
5274
5344
|
* @example
|
|
5275
5345
|
* ```typescript
|
|
5276
5346
|
* const cart = await client.smartGetCart();
|
|
5277
5347
|
* console.log('Items:', cart.items.length);
|
|
5348
|
+
*
|
|
5349
|
+
* // With includes — single request for cart + extras
|
|
5350
|
+
* const enriched = await client.smartGetCart({
|
|
5351
|
+
* include: ['recommendations', 'upgrades', 'bundles'],
|
|
5352
|
+
* });
|
|
5278
5353
|
* ```
|
|
5279
5354
|
*/
|
|
5280
|
-
smartGetCart(): Promise<
|
|
5355
|
+
smartGetCart(options?: CartIncludeOptions): Promise<CartWithIncludes>;
|
|
5281
5356
|
/**
|
|
5282
5357
|
* Smart update cart item quantity
|
|
5283
5358
|
*
|
|
@@ -6670,9 +6745,35 @@ declare class BrainerceClient {
|
|
|
6670
6745
|
*/
|
|
6671
6746
|
setProductCustomizationFields(productId: string, definitionIds: string[]): Promise<ProductCustomizationField[]>;
|
|
6672
6747
|
/**
|
|
6673
|
-
* Upload a file
|
|
6674
|
-
*
|
|
6675
|
-
*
|
|
6748
|
+
* Upload a buyer-submitted file (engraving photo, custom image, etc.) for a
|
|
6749
|
+
* product customization field of type `IMAGE` or `GALLERY`. The returned `url`
|
|
6750
|
+
* is what you pass back in the add-to-cart `metadata` payload.
|
|
6751
|
+
*
|
|
6752
|
+
* Available in storefront and vibe-coded modes — no customer login required.
|
|
6753
|
+
*
|
|
6754
|
+
* Server rules:
|
|
6755
|
+
* - `image/*` MIME only. Other types → HTTP 400.
|
|
6756
|
+
* - Max 5 MB per file.
|
|
6757
|
+
* - Throttled to 10 uploads / minute per IP → HTTP 429.
|
|
6758
|
+
* - Retention: at least 7 days. If the cart never becomes an order, the file
|
|
6759
|
+
* is reclaimed automatically. Once the order exists, the file is kept for
|
|
6760
|
+
* order-history purposes.
|
|
6761
|
+
*
|
|
6762
|
+
* @example
|
|
6763
|
+
* ```ts
|
|
6764
|
+
* // On a product page with IMAGE/GALLERY customization fields:
|
|
6765
|
+
* const { url } = await client.uploadCustomizationFile(fileInput.files[0]);
|
|
6766
|
+
*
|
|
6767
|
+
* // Then include the URL in the add-to-cart metadata:
|
|
6768
|
+
* await client.addToCart(cart.id, {
|
|
6769
|
+
* productId: product.id,
|
|
6770
|
+
* quantity: 1,
|
|
6771
|
+
* metadata: {
|
|
6772
|
+
* engraving_text: 'Happy Birthday!',
|
|
6773
|
+
* upload_photo: url,
|
|
6774
|
+
* },
|
|
6775
|
+
* });
|
|
6776
|
+
* ```
|
|
6676
6777
|
*/
|
|
6677
6778
|
uploadCustomizationFile(file: File | Blob): Promise<{
|
|
6678
6779
|
url: string;
|
|
@@ -6999,4 +7100,4 @@ declare function enableDevGuards(options?: {
|
|
|
6999
7100
|
force?: boolean;
|
|
7000
7101
|
}): void;
|
|
7001
7102
|
|
|
7002
|
-
export { type AddToCartDto, type AppliedDiscount, type ApplyCouponDto, type Attribute, type AttributeOption, type AttributeSource, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type Category, type CategoryNode, 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 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 CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, 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 DeleteProductResponse, 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 FormatPriceOptions, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type LocalCart, type LocalCartItem, type LockedVariant, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldPlatformMapping, type MetafieldType, 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 PaginatedResponse, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentStatus, type PickupLocation, type PlatformCouponCapabilities, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductSuggestion, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, type RecommendationVariant, type ReconcileInventoryResponse, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetShippingAddressDto, type SetShippingAddressResponse, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingZone, type ShippingZoneQueryParams, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, 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 UpdateAddressDto, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, 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 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, createWebhookHandler, enableDevGuards, formatPrice, getCartItemImage, getCartItemName, getCartTotals, getDescriptionContent, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };
|
|
7103
|
+
export { type AddToCartDto, type AppliedDiscount, type ApplyCouponDto, type Attribute, type AttributeOption, type AttributeSource, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryNode, 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 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 CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, 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 DeleteProductResponse, 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 FormatPriceOptions, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type LocalCart, type LocalCartItem, type LockedVariant, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldPlatformMapping, type MetafieldType, 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 PaginatedResponse, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentStatus, type PickupLocation, type PlatformCouponCapabilities, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductSuggestion, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, type RecommendationVariant, type ReconcileInventoryResponse, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetShippingAddressDto, type SetShippingAddressResponse, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingZone, type ShippingZoneQueryParams, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, 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 UpdateAddressDto, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, 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 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, createWebhookHandler, enableDevGuards, formatPrice, getCartItemImage, getCartItemName, getCartTotals, getDescriptionContent, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };
|
package/dist/index.d.ts
CHANGED
|
@@ -961,10 +961,13 @@ interface OrderItem {
|
|
|
961
961
|
totalPrice?: string;
|
|
962
962
|
/** Product image URL (flat, not nested under product object) */
|
|
963
963
|
image?: string;
|
|
964
|
-
/**
|
|
964
|
+
/**
|
|
965
|
+
* Customer input field values captured at checkout (e.g., cake text, uploaded logo).
|
|
966
|
+
* `value` is `string[]` for MULTI_SELECT / GALLERY types, `string` otherwise.
|
|
967
|
+
*/
|
|
965
968
|
customizations?: Record<string, {
|
|
966
969
|
label: string;
|
|
967
|
-
value: string;
|
|
970
|
+
value: string | string[];
|
|
968
971
|
type: string;
|
|
969
972
|
}>;
|
|
970
973
|
}
|
|
@@ -2498,8 +2501,8 @@ interface CustomApiTestResult {
|
|
|
2498
2501
|
* The frontend dynamically loads the SDK script and calls init/render methods.
|
|
2499
2502
|
*/
|
|
2500
2503
|
interface PaymentClientSdk {
|
|
2501
|
-
/** How the payment UI is rendered: 'sdk-widget' (JS SDK), 'iframe', 'redirect',
|
|
2502
|
-
renderType: 'sdk-widget' | 'iframe' | 'redirect' | 'sandbox';
|
|
2504
|
+
/** How the payment UI is rendered: 'sdk-widget' (JS SDK), 'iframe', 'redirect', 'sandbox' (test orders), or 'embedded-fields' (PCI-compliant provider-hosted fields embedded in merchant DOM, e.g. Cardcom OpenFields, Stripe Elements) */
|
|
2505
|
+
renderType: 'sdk-widget' | 'iframe' | 'redirect' | 'sandbox' | 'embedded-fields';
|
|
2503
2506
|
/** URL of the main SDK script to load */
|
|
2504
2507
|
scriptUrl?: string;
|
|
2505
2508
|
/** Name of the global variable set by the SDK script (e.g., 'growPayment') */
|
|
@@ -2521,6 +2524,12 @@ interface PaymentClientSdk {
|
|
|
2521
2524
|
}>;
|
|
2522
2525
|
/** CSS to inject into <head> when SDK is active (e.g., LTR overrides for body-level popups on RTL pages) */
|
|
2523
2526
|
bodyStyles?: string;
|
|
2527
|
+
/** For renderType='embedded-fields': base URL the sensitive-field iframes load (e.g. 'https://secure.cardcom.solutions'). postMessage origin is strictly validated against this. */
|
|
2528
|
+
embeddedFieldsUrl?: string;
|
|
2529
|
+
/** For renderType='embedded-fields': opaque provider session id used in the iframe init handshake (e.g., Cardcom LowProfileId) */
|
|
2530
|
+
embeddedFieldsSessionId?: string;
|
|
2531
|
+
/** Provider discriminator that selects the correct embedded-fields component on the storefront */
|
|
2532
|
+
embeddedFieldsProvider?: 'cardcom';
|
|
2524
2533
|
}
|
|
2525
2534
|
/**
|
|
2526
2535
|
* Payment provider configuration (returned by `getPaymentProviders()`).
|
|
@@ -3156,7 +3165,7 @@ interface UpdateTaxRateDto {
|
|
|
3156
3165
|
/**
|
|
3157
3166
|
* Metafield type for defining value structure
|
|
3158
3167
|
*/
|
|
3159
|
-
type MetafieldType = 'TEXT' | 'TEXTAREA' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'URL' | 'COLOR' | 'DIMENSION' | 'WEIGHT' | 'JSON' | 'IMAGE' | 'GALLERY';
|
|
3168
|
+
type MetafieldType = 'TEXT' | 'TEXTAREA' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'URL' | 'COLOR' | 'DIMENSION' | 'WEIGHT' | 'JSON' | 'IMAGE' | 'GALLERY' | 'SELECT' | 'MULTI_SELECT';
|
|
3160
3169
|
/**
|
|
3161
3170
|
* Metafield definition - schema for product metafields
|
|
3162
3171
|
*/
|
|
@@ -3693,6 +3702,21 @@ interface CartBundleOffer {
|
|
|
3693
3702
|
interface CartBundlesResponse {
|
|
3694
3703
|
bundles: CartBundleOffer[];
|
|
3695
3704
|
}
|
|
3705
|
+
/** Valid values for the cart `include` query parameter */
|
|
3706
|
+
type CartIncludeOption = 'recommendations' | 'upgrades' | 'bundles';
|
|
3707
|
+
/** Options for getCart / smartGetCart with optional includes */
|
|
3708
|
+
interface CartIncludeOptions {
|
|
3709
|
+
include?: CartIncludeOption[];
|
|
3710
|
+
}
|
|
3711
|
+
/** Cart response enriched with optional included data */
|
|
3712
|
+
interface CartWithIncludes extends Cart {
|
|
3713
|
+
/** Cross-sell recommendations (present when include contains 'recommendations') */
|
|
3714
|
+
recommendations?: CartRecommendationsResponse;
|
|
3715
|
+
/** Upgrade suggestions (present when include contains 'upgrades') */
|
|
3716
|
+
upgrades?: CartUpgradesResponse;
|
|
3717
|
+
/** Bundle offers (present when include contains 'bundles') */
|
|
3718
|
+
bundles?: CartBundlesResponse;
|
|
3719
|
+
}
|
|
3696
3720
|
interface OrderBump {
|
|
3697
3721
|
id: string;
|
|
3698
3722
|
title: string;
|
|
@@ -4911,18 +4935,60 @@ declare class BrainerceClient {
|
|
|
4911
4935
|
getCartByCustomer(customerId: string): Promise<Cart>;
|
|
4912
4936
|
/**
|
|
4913
4937
|
* Get a cart by ID
|
|
4938
|
+
*
|
|
4939
|
+
* @param cartId - The cart ID
|
|
4940
|
+
* @param options - Optional settings. Use `include` to fetch related data in a single request.
|
|
4941
|
+
*
|
|
4942
|
+
* @example
|
|
4943
|
+
* ```typescript
|
|
4944
|
+
* // Basic cart fetch
|
|
4945
|
+
* const cart = await client.getCart('cart_123');
|
|
4946
|
+
*
|
|
4947
|
+
* // Fetch cart with recommendations, upgrades, and bundles in one call
|
|
4948
|
+
* const enriched = await client.getCart('cart_123', {
|
|
4949
|
+
* include: ['recommendations', 'upgrades', 'bundles'],
|
|
4950
|
+
* });
|
|
4951
|
+
* console.log(enriched.recommendations); // { recommendations: [...] }
|
|
4952
|
+
* console.log(enriched.upgrades); // { upgrades: { ... } }
|
|
4953
|
+
* console.log(enriched.bundles); // { bundles: [...] }
|
|
4954
|
+
* ```
|
|
4914
4955
|
*/
|
|
4915
|
-
getCart(cartId: string): Promise<
|
|
4956
|
+
getCart(cartId: string, options?: CartIncludeOptions): Promise<CartWithIncludes>;
|
|
4916
4957
|
/**
|
|
4917
|
-
* Add an item to the cart
|
|
4958
|
+
* Add an item to the cart.
|
|
4959
|
+
*
|
|
4960
|
+
* If the product has `customizationFields` (merchant-defined buyer input
|
|
4961
|
+
* like engraving text, uploaded photos, select options), pass the buyer's
|
|
4962
|
+
* values in `metadata`. Keys must match each field's `key`. For `IMAGE` /
|
|
4963
|
+
* `GALLERY` types, upload the file first via `uploadCustomizationFile()`
|
|
4964
|
+
* and pass the returned URL. The server validates every value against its
|
|
4965
|
+
* `MetafieldDefinition` and rejects the request with HTTP 400 if anything
|
|
4966
|
+
* fails (type mismatch, required missing, not in `enumValues`, etc.).
|
|
4967
|
+
*
|
|
4968
|
+
* Values are snapshotted onto the order line at checkout — later edits to
|
|
4969
|
+
* the field definition do not retroactively change existing orders.
|
|
4918
4970
|
*
|
|
4919
4971
|
* @example
|
|
4920
4972
|
* ```typescript
|
|
4973
|
+
* // Product with no customization fields
|
|
4921
4974
|
* const cart = await client.addToCart('cart_123', {
|
|
4922
4975
|
* productId: 'prod_abc',
|
|
4923
4976
|
* quantity: 2,
|
|
4924
4977
|
* notes: 'Gift wrap please',
|
|
4925
4978
|
* });
|
|
4979
|
+
*
|
|
4980
|
+
* // Product WITH customization fields (engraving + photo + select + multi)
|
|
4981
|
+
* const { url: photoUrl } = await client.uploadCustomizationFile(file);
|
|
4982
|
+
* const cart = await client.addToCart('cart_123', {
|
|
4983
|
+
* productId: 'prod_mug',
|
|
4984
|
+
* quantity: 1,
|
|
4985
|
+
* metadata: {
|
|
4986
|
+
* engraving_text: 'Happy Birthday!', // TEXT
|
|
4987
|
+
* frame_color: 'Gold', // SELECT (must be in enumValues)
|
|
4988
|
+
* upload_photo: photoUrl, // IMAGE
|
|
4989
|
+
* addons: ['Gift wrap'], // MULTI_SELECT (always array)
|
|
4990
|
+
* },
|
|
4991
|
+
* });
|
|
4926
4992
|
* ```
|
|
4927
4993
|
*/
|
|
4928
4994
|
addToCart(cartId: string, item: AddToCartDto): Promise<Cart>;
|
|
@@ -5263,6 +5329,7 @@ declare class BrainerceClient {
|
|
|
5263
5329
|
productId: string;
|
|
5264
5330
|
variantId?: string;
|
|
5265
5331
|
quantity: number;
|
|
5332
|
+
metadata?: Record<string, unknown>;
|
|
5266
5333
|
}): Promise<Cart>;
|
|
5267
5334
|
/**
|
|
5268
5335
|
* Smart get cart - returns the current cart (server-side for both guests and logged-in users)
|
|
@@ -5271,13 +5338,21 @@ declare class BrainerceClient {
|
|
|
5271
5338
|
* - **Guest with session**: Returns server-side session cart
|
|
5272
5339
|
* - **Guest without session**: Returns empty cart (no server call, cart created lazily on add)
|
|
5273
5340
|
*
|
|
5341
|
+
* @param options - Optional. Use `include` to fetch recommendations, upgrades, and bundles
|
|
5342
|
+
* in a single request instead of separate calls.
|
|
5343
|
+
*
|
|
5274
5344
|
* @example
|
|
5275
5345
|
* ```typescript
|
|
5276
5346
|
* const cart = await client.smartGetCart();
|
|
5277
5347
|
* console.log('Items:', cart.items.length);
|
|
5348
|
+
*
|
|
5349
|
+
* // With includes — single request for cart + extras
|
|
5350
|
+
* const enriched = await client.smartGetCart({
|
|
5351
|
+
* include: ['recommendations', 'upgrades', 'bundles'],
|
|
5352
|
+
* });
|
|
5278
5353
|
* ```
|
|
5279
5354
|
*/
|
|
5280
|
-
smartGetCart(): Promise<
|
|
5355
|
+
smartGetCart(options?: CartIncludeOptions): Promise<CartWithIncludes>;
|
|
5281
5356
|
/**
|
|
5282
5357
|
* Smart update cart item quantity
|
|
5283
5358
|
*
|
|
@@ -6670,9 +6745,35 @@ declare class BrainerceClient {
|
|
|
6670
6745
|
*/
|
|
6671
6746
|
setProductCustomizationFields(productId: string, definitionIds: string[]): Promise<ProductCustomizationField[]>;
|
|
6672
6747
|
/**
|
|
6673
|
-
* Upload a file
|
|
6674
|
-
*
|
|
6675
|
-
*
|
|
6748
|
+
* Upload a buyer-submitted file (engraving photo, custom image, etc.) for a
|
|
6749
|
+
* product customization field of type `IMAGE` or `GALLERY`. The returned `url`
|
|
6750
|
+
* is what you pass back in the add-to-cart `metadata` payload.
|
|
6751
|
+
*
|
|
6752
|
+
* Available in storefront and vibe-coded modes — no customer login required.
|
|
6753
|
+
*
|
|
6754
|
+
* Server rules:
|
|
6755
|
+
* - `image/*` MIME only. Other types → HTTP 400.
|
|
6756
|
+
* - Max 5 MB per file.
|
|
6757
|
+
* - Throttled to 10 uploads / minute per IP → HTTP 429.
|
|
6758
|
+
* - Retention: at least 7 days. If the cart never becomes an order, the file
|
|
6759
|
+
* is reclaimed automatically. Once the order exists, the file is kept for
|
|
6760
|
+
* order-history purposes.
|
|
6761
|
+
*
|
|
6762
|
+
* @example
|
|
6763
|
+
* ```ts
|
|
6764
|
+
* // On a product page with IMAGE/GALLERY customization fields:
|
|
6765
|
+
* const { url } = await client.uploadCustomizationFile(fileInput.files[0]);
|
|
6766
|
+
*
|
|
6767
|
+
* // Then include the URL in the add-to-cart metadata:
|
|
6768
|
+
* await client.addToCart(cart.id, {
|
|
6769
|
+
* productId: product.id,
|
|
6770
|
+
* quantity: 1,
|
|
6771
|
+
* metadata: {
|
|
6772
|
+
* engraving_text: 'Happy Birthday!',
|
|
6773
|
+
* upload_photo: url,
|
|
6774
|
+
* },
|
|
6775
|
+
* });
|
|
6776
|
+
* ```
|
|
6676
6777
|
*/
|
|
6677
6778
|
uploadCustomizationFile(file: File | Blob): Promise<{
|
|
6678
6779
|
url: string;
|
|
@@ -6999,4 +7100,4 @@ declare function enableDevGuards(options?: {
|
|
|
6999
7100
|
force?: boolean;
|
|
7000
7101
|
}): void;
|
|
7001
7102
|
|
|
7002
|
-
export { type AddToCartDto, type AppliedDiscount, type ApplyCouponDto, type Attribute, type AttributeOption, type AttributeSource, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type Category, type CategoryNode, 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 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 CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, 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 DeleteProductResponse, 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 FormatPriceOptions, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type LocalCart, type LocalCartItem, type LockedVariant, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldPlatformMapping, type MetafieldType, 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 PaginatedResponse, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentStatus, type PickupLocation, type PlatformCouponCapabilities, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductSuggestion, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, type RecommendationVariant, type ReconcileInventoryResponse, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetShippingAddressDto, type SetShippingAddressResponse, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingZone, type ShippingZoneQueryParams, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, 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 UpdateAddressDto, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, 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 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, createWebhookHandler, enableDevGuards, formatPrice, getCartItemImage, getCartItemName, getCartTotals, getDescriptionContent, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };
|
|
7103
|
+
export { type AddToCartDto, type AppliedDiscount, type ApplyCouponDto, type Attribute, type AttributeOption, type AttributeSource, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryNode, 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 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 CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, 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 DeleteProductResponse, 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 FormatPriceOptions, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type LocalCart, type LocalCartItem, type LockedVariant, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldPlatformMapping, type MetafieldType, 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 PaginatedResponse, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentStatus, type PickupLocation, type PlatformCouponCapabilities, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductSuggestion, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, type RecommendationVariant, type ReconcileInventoryResponse, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetShippingAddressDto, type SetShippingAddressResponse, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingZone, type ShippingZoneQueryParams, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, 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 UpdateAddressDto, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, 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 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, createWebhookHandler, enableDevGuards, formatPrice, getCartItemImage, getCartItemName, getCartTotals, getDescriptionContent, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };
|