brainerce 1.10.3 → 1.11.3

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 CHANGED
@@ -4,7 +4,7 @@ Official SDK for building e-commerce storefronts with **Brainerce Platform**.
4
4
 
5
5
  This SDK provides a complete solution for vibe-coded sites, AI-built stores (Cursor, Lovable, v0), and custom storefronts to connect to Brainerce's unified commerce API.
6
6
 
7
- > **🤖 AI Agents / Vibe Coders:** See [AI_BUILDER_PROMPT.md](./AI_BUILDER_PROMPT.md) for a concise, copy-paste-ready prompt optimized for AI code generation. It contains the essential rules and complete code examples to build a working store.
7
+ > **AI Agents / Vibe Coders:** Use the MCP server for AI-powered store building: `npx @brainerce/mcp-server`. It provides docs, code templates, and live store capabilities to any AI tool (Cursor, Lovable, Claude Code).
8
8
 
9
9
  ## Installation
10
10
 
@@ -1058,7 +1058,7 @@ interface Product {
1058
1058
  sku: string;
1059
1059
  basePrice: number;
1060
1060
  salePrice?: number | null;
1061
- status: 'active' | 'draft' | 'archived';
1061
+ status: 'active' | 'draft';
1062
1062
  type: 'SIMPLE' | 'VARIABLE';
1063
1063
  images?: ProductImage[];
1064
1064
  inventory?: InventoryInfo | null;
@@ -2827,11 +2827,70 @@ const brand = await client.createBrand({ name: 'Nike', slug: 'nike' });
2827
2827
  const tags = await client.listTags();
2828
2828
  const tag = await client.createTag({ name: 'Sale', slug: 'sale' });
2829
2829
 
2830
- // Attributes (for variant options)
2830
+ // Attributes (for variant options like Size, Color, Material)
2831
2831
  const attributes = await client.listAttributes();
2832
- const attribute = await client.createAttribute({ name: 'Color', slug: 'color' });
2833
- const options = await client.getAttributeOptions('attr_id');
2834
- await client.createAttributeOption('attr_id', { value: 'Red', slug: 'red' });
2832
+
2833
+ // Create a color swatch attribute
2834
+ const colorAttr = await client.createAttribute({
2835
+ name: 'Color',
2836
+ displayType: 'COLOR_SWATCH', // Options: 'DEFAULT' | 'COLOR_SWATCH' | 'IMAGE_SWATCH'
2837
+ source: 'GLOBAL',
2838
+ });
2839
+
2840
+ // Add color swatch options
2841
+ await client.createAttributeOption(colorAttr.id, {
2842
+ name: 'Red',
2843
+ value: 'red',
2844
+ swatchColor: '#FF0000',
2845
+ source: 'GLOBAL',
2846
+ });
2847
+
2848
+ // Gradient swatch (two colors)
2849
+ await client.createAttributeOption(colorAttr.id, {
2850
+ name: 'Sunset',
2851
+ value: 'sunset',
2852
+ swatchColor: '#FF6B35',
2853
+ swatchColor2: '#FFD700',
2854
+ source: 'GLOBAL',
2855
+ });
2856
+
2857
+ // Image swatch attribute
2858
+ const materialAttr = await client.createAttribute({
2859
+ name: 'Material',
2860
+ displayType: 'IMAGE_SWATCH',
2861
+ source: 'GLOBAL',
2862
+ });
2863
+ await client.createAttributeOption(materialAttr.id, {
2864
+ name: 'Leather',
2865
+ value: 'leather',
2866
+ swatchImageUrl: 'https://example.com/leather-texture.jpg',
2867
+ source: 'GLOBAL',
2868
+ });
2869
+
2870
+ // Default attribute (text buttons/dropdown)
2871
+ const sizeAttr = await client.createAttribute({
2872
+ name: 'Size',
2873
+ source: 'GLOBAL',
2874
+ });
2875
+ await client.createAttributeOption(sizeAttr.id, {
2876
+ name: 'Large',
2877
+ value: 'L',
2878
+ source: 'GLOBAL',
2879
+ });
2880
+
2881
+ // Get options, update, delete
2882
+ const options = await client.getAttributeOptions(colorAttr.id);
2883
+ await client.updateAttribute(colorAttr.id, { displayType: 'IMAGE_SWATCH' });
2884
+ await client.updateAttributeOption(colorAttr.id, options[0].id, { swatchColor: '#CC0000' });
2885
+ await client.deleteAttributeOption(colorAttr.id, options[0].id);
2886
+ await client.deleteAttribute(colorAttr.id);
2887
+
2888
+ // Storefront: render swatches from product data
2889
+ import { getProductSwatches } from 'brainerce';
2890
+
2891
+ const product = await client.getProductBySlug('my-product');
2892
+ const swatches = getProductSwatches(product);
2893
+ // Returns: [{ attributeName: 'Color', displayType: 'COLOR_SWATCH', options: [{ name: 'Red', swatchColor: '#FF0000', ... }] }]
2835
2894
  ```
2836
2895
 
2837
2896
  ### Shipping Configuration
package/dist/index.d.mts CHANGED
@@ -73,6 +73,22 @@ interface BrainerceClientOptions {
73
73
  statusCode: number;
74
74
  path?: string;
75
75
  }) => void;
76
+ /**
77
+ * Origin header to send with requests.
78
+ * Browsers add this automatically, but Node.js environments (SSR, scripts, npx)
79
+ * do not. When running server-side, the SDK will auto-derive it from `baseUrl`
80
+ * if not explicitly provided.
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * // Explicit origin for server-side usage
85
+ * const client = new BrainerceClient({
86
+ * connectionId: 'vc_abc123...',
87
+ * origin: 'https://mysite.com',
88
+ * });
89
+ * ```
90
+ */
91
+ origin?: string;
76
92
  /**
77
93
  * Enable proxy mode for BFF (Backend-for-Frontend) pattern.
78
94
  * When true, the SDK skips client-side customer token checks and does not
@@ -167,7 +183,7 @@ interface Product {
167
183
  salePrice?: string | null;
168
184
  /** Cost price as string. Use parseFloat() for calculations. */
169
185
  costPrice?: string | null;
170
- /** Product status (active, draft, archived). Always returned by backend. */
186
+ /** Product status (active, draft). Always returned by backend. */
171
187
  status: string;
172
188
  type: 'SIMPLE' | 'VARIABLE';
173
189
  /** Whether product is downloadable/digital. */
@@ -202,6 +218,8 @@ interface Product {
202
218
  lastSyncedAt?: string | null;
203
219
  /** Menu/display order */
204
220
  menuOrder?: number | null;
221
+ /** Tax behavior: 'taxable' follows store setting, 'exempt' always skips tax */
222
+ taxBehavior?: 'taxable' | 'exempt';
205
223
  /** Full attribute options for variant selection (admin mode only) */
206
224
  productAttributeOptions?: Array<{
207
225
  id: string;
@@ -211,11 +229,15 @@ interface Product {
211
229
  attribute: {
212
230
  id: string;
213
231
  name: string;
232
+ displayType?: string;
214
233
  } | null;
215
234
  attributeOption: {
216
235
  id: string;
217
236
  name: string;
218
237
  value?: string | null;
238
+ swatchColor?: string | null;
239
+ swatchColor2?: string | null;
240
+ swatchImageUrl?: string | null;
219
241
  } | null;
220
242
  }>;
221
243
  /** Vibe-coded sites this product is published to (admin mode only) */
@@ -228,6 +250,8 @@ interface Product {
228
250
  }>;
229
251
  /** Discount info from matching discount rules (storefront/VC mode only) */
230
252
  discount?: ProductDiscount | null;
253
+ /** Recommendations (upsells, cross-sells, related) — included in storefront/VC getProductBySlug response */
254
+ recommendations?: ProductRecommendationsResponse;
231
255
  createdAt: string;
232
256
  updatedAt: string;
233
257
  }
@@ -620,6 +644,22 @@ declare function getVariantOptions(variant: Pick<ProductVariant, 'attributes'> |
620
644
  name: string;
621
645
  value: string;
622
646
  }>;
647
+ /**
648
+ * Get structured swatch data from product attribute options.
649
+ * Groups by attribute name and includes display type + swatch details.
650
+ * Useful for rendering swatch selectors in storefronts.
651
+ */
652
+ declare function getProductSwatches(product: Pick<Product, 'productAttributeOptions'> | null | undefined): Array<{
653
+ attributeName: string;
654
+ displayType: string;
655
+ options: Array<{
656
+ name: string;
657
+ value?: string | null;
658
+ swatchColor?: string | null;
659
+ swatchColor2?: string | null;
660
+ swatchImageUrl?: string | null;
661
+ }>;
662
+ }>;
623
663
  /**
624
664
  * Get a single metafield by definition key.
625
665
  */
@@ -642,7 +682,7 @@ interface ProductQueryParams {
642
682
  page?: number;
643
683
  limit?: number;
644
684
  search?: string;
645
- status?: 'active' | 'draft' | 'archived';
685
+ status?: 'active' | 'draft';
646
686
  /** Filter by category IDs (comma-separated or array) */
647
687
  categories?: string | string[];
648
688
  /** Filter by brand IDs (comma-separated or array) */
@@ -750,7 +790,7 @@ interface UpdateProductDto {
750
790
  basePrice?: number;
751
791
  salePrice?: number | null;
752
792
  costPrice?: number | null;
753
- status?: 'active' | 'draft' | 'archived';
793
+ status?: 'active' | 'draft';
754
794
  isDownloadable?: boolean;
755
795
  categories?: string[];
756
796
  tags?: string[];
@@ -1267,6 +1307,7 @@ interface RegisterCustomerDto {
1267
1307
  firstName?: string;
1268
1308
  lastName?: string;
1269
1309
  phone?: string;
1310
+ acceptsMarketing?: boolean;
1270
1311
  }
1271
1312
  type CartStatus = 'ACTIVE' | 'MERGED' | 'CONVERTED' | 'ABANDONED';
1272
1313
  /**
@@ -2691,6 +2732,8 @@ interface Category {
2691
2732
  platformMetadata?: Record<string, Record<string, unknown>> | null;
2692
2733
  parentId?: string | null;
2693
2734
  isActive: boolean;
2735
+ /** Tax behavior: 'taxable' follows store setting, 'exempt' always skips tax */
2736
+ taxBehavior?: 'taxable' | 'exempt';
2694
2737
  deletedAt?: string | null;
2695
2738
  productCount?: number;
2696
2739
  products?: Array<{
@@ -2707,11 +2750,13 @@ interface CreateCategoryDto {
2707
2750
  storeId?: string;
2708
2751
  source?: string;
2709
2752
  isActive?: boolean;
2753
+ taxBehavior?: 'taxable' | 'exempt';
2710
2754
  }
2711
2755
  interface UpdateCategoryDto {
2712
2756
  name?: string;
2713
2757
  parentId?: string | null;
2714
2758
  isActive?: boolean;
2759
+ taxBehavior?: 'taxable' | 'exempt';
2715
2760
  }
2716
2761
  /**
2717
2762
  * Brand entity for product organization
@@ -2801,6 +2846,7 @@ interface Attribute {
2801
2846
  accountId: string;
2802
2847
  storeId?: string | null;
2803
2848
  name: string;
2849
+ displayType?: string;
2804
2850
  source: AttributeSource;
2805
2851
  platform?: ConnectorPlatform | null;
2806
2852
  externalId?: string | null;
@@ -2817,6 +2863,9 @@ interface AttributeOption {
2817
2863
  attributeId: string;
2818
2864
  name: string;
2819
2865
  value?: string | null;
2866
+ swatchColor?: string | null;
2867
+ swatchColor2?: string | null;
2868
+ swatchImageUrl?: string | null;
2820
2869
  source: AttributeSource;
2821
2870
  platform?: ConnectorPlatform | null;
2822
2871
  externalId?: string | null;
@@ -2829,6 +2878,7 @@ interface AttributeOption {
2829
2878
  }
2830
2879
  interface CreateAttributeDto {
2831
2880
  name: string;
2881
+ displayType?: string;
2832
2882
  source: AttributeSource;
2833
2883
  platform?: ConnectorPlatform;
2834
2884
  storeId?: string;
@@ -2838,12 +2888,16 @@ interface CreateAttributeDto {
2838
2888
  }
2839
2889
  interface UpdateAttributeDto {
2840
2890
  name?: string;
2891
+ displayType?: string;
2841
2892
  platformMetadata?: Record<string, unknown>;
2842
2893
  isActive?: boolean;
2843
2894
  }
2844
2895
  interface CreateAttributeOptionDto {
2845
2896
  name: string;
2846
2897
  value?: string;
2898
+ swatchColor?: string;
2899
+ swatchColor2?: string;
2900
+ swatchImageUrl?: string;
2847
2901
  source: AttributeSource;
2848
2902
  platform?: ConnectorPlatform;
2849
2903
  externalId?: string;
@@ -2854,6 +2908,9 @@ interface CreateAttributeOptionDto {
2854
2908
  interface UpdateAttributeOptionDto {
2855
2909
  name?: string;
2856
2910
  value?: string;
2911
+ swatchColor?: string | null;
2912
+ swatchColor2?: string | null;
2913
+ swatchImageUrl?: string | null;
2857
2914
  platformMetadata?: Record<string, unknown>;
2858
2915
  position?: number;
2859
2916
  isActive?: boolean;
@@ -3541,6 +3598,7 @@ declare class BrainerceClient {
3541
3598
  * This is needed because Stripe redirects lose in-memory state.
3542
3599
  */
3543
3600
  private readonly ACTIVE_CHECKOUT_KEY;
3601
+ private readonly origin?;
3544
3602
  private readonly proxyMode;
3545
3603
  private readonly onAuthError?;
3546
3604
  constructor(options: BrainerceClientOptions);
@@ -6469,6 +6527,8 @@ declare class BrainerceError extends Error {
6469
6527
  constructor(message: string, statusCode: number, details?: unknown);
6470
6528
  }
6471
6529
 
6530
+ declare const SDK_VERSION = "1.11.2";
6531
+
6472
6532
  /**
6473
6533
  * Verify a webhook signature from Brainerce
6474
6534
  *
@@ -6541,4 +6601,4 @@ declare function enableDevGuards(options?: {
6541
6601
  force?: boolean;
6542
6602
  }): void;
6543
6603
 
6544
- 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 CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type Category, type CategoryNode, type CategorySuggestion, type Checkout, type CheckoutAddress, 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 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 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 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 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 ReconcileInventoryResponse, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, 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, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };
6604
+ 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 CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type Category, type CategoryNode, type CategorySuggestion, type Checkout, type CheckoutAddress, 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 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 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 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 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 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 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, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };
package/dist/index.d.ts CHANGED
@@ -73,6 +73,22 @@ interface BrainerceClientOptions {
73
73
  statusCode: number;
74
74
  path?: string;
75
75
  }) => void;
76
+ /**
77
+ * Origin header to send with requests.
78
+ * Browsers add this automatically, but Node.js environments (SSR, scripts, npx)
79
+ * do not. When running server-side, the SDK will auto-derive it from `baseUrl`
80
+ * if not explicitly provided.
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * // Explicit origin for server-side usage
85
+ * const client = new BrainerceClient({
86
+ * connectionId: 'vc_abc123...',
87
+ * origin: 'https://mysite.com',
88
+ * });
89
+ * ```
90
+ */
91
+ origin?: string;
76
92
  /**
77
93
  * Enable proxy mode for BFF (Backend-for-Frontend) pattern.
78
94
  * When true, the SDK skips client-side customer token checks and does not
@@ -167,7 +183,7 @@ interface Product {
167
183
  salePrice?: string | null;
168
184
  /** Cost price as string. Use parseFloat() for calculations. */
169
185
  costPrice?: string | null;
170
- /** Product status (active, draft, archived). Always returned by backend. */
186
+ /** Product status (active, draft). Always returned by backend. */
171
187
  status: string;
172
188
  type: 'SIMPLE' | 'VARIABLE';
173
189
  /** Whether product is downloadable/digital. */
@@ -202,6 +218,8 @@ interface Product {
202
218
  lastSyncedAt?: string | null;
203
219
  /** Menu/display order */
204
220
  menuOrder?: number | null;
221
+ /** Tax behavior: 'taxable' follows store setting, 'exempt' always skips tax */
222
+ taxBehavior?: 'taxable' | 'exempt';
205
223
  /** Full attribute options for variant selection (admin mode only) */
206
224
  productAttributeOptions?: Array<{
207
225
  id: string;
@@ -211,11 +229,15 @@ interface Product {
211
229
  attribute: {
212
230
  id: string;
213
231
  name: string;
232
+ displayType?: string;
214
233
  } | null;
215
234
  attributeOption: {
216
235
  id: string;
217
236
  name: string;
218
237
  value?: string | null;
238
+ swatchColor?: string | null;
239
+ swatchColor2?: string | null;
240
+ swatchImageUrl?: string | null;
219
241
  } | null;
220
242
  }>;
221
243
  /** Vibe-coded sites this product is published to (admin mode only) */
@@ -228,6 +250,8 @@ interface Product {
228
250
  }>;
229
251
  /** Discount info from matching discount rules (storefront/VC mode only) */
230
252
  discount?: ProductDiscount | null;
253
+ /** Recommendations (upsells, cross-sells, related) — included in storefront/VC getProductBySlug response */
254
+ recommendations?: ProductRecommendationsResponse;
231
255
  createdAt: string;
232
256
  updatedAt: string;
233
257
  }
@@ -620,6 +644,22 @@ declare function getVariantOptions(variant: Pick<ProductVariant, 'attributes'> |
620
644
  name: string;
621
645
  value: string;
622
646
  }>;
647
+ /**
648
+ * Get structured swatch data from product attribute options.
649
+ * Groups by attribute name and includes display type + swatch details.
650
+ * Useful for rendering swatch selectors in storefronts.
651
+ */
652
+ declare function getProductSwatches(product: Pick<Product, 'productAttributeOptions'> | null | undefined): Array<{
653
+ attributeName: string;
654
+ displayType: string;
655
+ options: Array<{
656
+ name: string;
657
+ value?: string | null;
658
+ swatchColor?: string | null;
659
+ swatchColor2?: string | null;
660
+ swatchImageUrl?: string | null;
661
+ }>;
662
+ }>;
623
663
  /**
624
664
  * Get a single metafield by definition key.
625
665
  */
@@ -642,7 +682,7 @@ interface ProductQueryParams {
642
682
  page?: number;
643
683
  limit?: number;
644
684
  search?: string;
645
- status?: 'active' | 'draft' | 'archived';
685
+ status?: 'active' | 'draft';
646
686
  /** Filter by category IDs (comma-separated or array) */
647
687
  categories?: string | string[];
648
688
  /** Filter by brand IDs (comma-separated or array) */
@@ -750,7 +790,7 @@ interface UpdateProductDto {
750
790
  basePrice?: number;
751
791
  salePrice?: number | null;
752
792
  costPrice?: number | null;
753
- status?: 'active' | 'draft' | 'archived';
793
+ status?: 'active' | 'draft';
754
794
  isDownloadable?: boolean;
755
795
  categories?: string[];
756
796
  tags?: string[];
@@ -1267,6 +1307,7 @@ interface RegisterCustomerDto {
1267
1307
  firstName?: string;
1268
1308
  lastName?: string;
1269
1309
  phone?: string;
1310
+ acceptsMarketing?: boolean;
1270
1311
  }
1271
1312
  type CartStatus = 'ACTIVE' | 'MERGED' | 'CONVERTED' | 'ABANDONED';
1272
1313
  /**
@@ -2691,6 +2732,8 @@ interface Category {
2691
2732
  platformMetadata?: Record<string, Record<string, unknown>> | null;
2692
2733
  parentId?: string | null;
2693
2734
  isActive: boolean;
2735
+ /** Tax behavior: 'taxable' follows store setting, 'exempt' always skips tax */
2736
+ taxBehavior?: 'taxable' | 'exempt';
2694
2737
  deletedAt?: string | null;
2695
2738
  productCount?: number;
2696
2739
  products?: Array<{
@@ -2707,11 +2750,13 @@ interface CreateCategoryDto {
2707
2750
  storeId?: string;
2708
2751
  source?: string;
2709
2752
  isActive?: boolean;
2753
+ taxBehavior?: 'taxable' | 'exempt';
2710
2754
  }
2711
2755
  interface UpdateCategoryDto {
2712
2756
  name?: string;
2713
2757
  parentId?: string | null;
2714
2758
  isActive?: boolean;
2759
+ taxBehavior?: 'taxable' | 'exempt';
2715
2760
  }
2716
2761
  /**
2717
2762
  * Brand entity for product organization
@@ -2801,6 +2846,7 @@ interface Attribute {
2801
2846
  accountId: string;
2802
2847
  storeId?: string | null;
2803
2848
  name: string;
2849
+ displayType?: string;
2804
2850
  source: AttributeSource;
2805
2851
  platform?: ConnectorPlatform | null;
2806
2852
  externalId?: string | null;
@@ -2817,6 +2863,9 @@ interface AttributeOption {
2817
2863
  attributeId: string;
2818
2864
  name: string;
2819
2865
  value?: string | null;
2866
+ swatchColor?: string | null;
2867
+ swatchColor2?: string | null;
2868
+ swatchImageUrl?: string | null;
2820
2869
  source: AttributeSource;
2821
2870
  platform?: ConnectorPlatform | null;
2822
2871
  externalId?: string | null;
@@ -2829,6 +2878,7 @@ interface AttributeOption {
2829
2878
  }
2830
2879
  interface CreateAttributeDto {
2831
2880
  name: string;
2881
+ displayType?: string;
2832
2882
  source: AttributeSource;
2833
2883
  platform?: ConnectorPlatform;
2834
2884
  storeId?: string;
@@ -2838,12 +2888,16 @@ interface CreateAttributeDto {
2838
2888
  }
2839
2889
  interface UpdateAttributeDto {
2840
2890
  name?: string;
2891
+ displayType?: string;
2841
2892
  platformMetadata?: Record<string, unknown>;
2842
2893
  isActive?: boolean;
2843
2894
  }
2844
2895
  interface CreateAttributeOptionDto {
2845
2896
  name: string;
2846
2897
  value?: string;
2898
+ swatchColor?: string;
2899
+ swatchColor2?: string;
2900
+ swatchImageUrl?: string;
2847
2901
  source: AttributeSource;
2848
2902
  platform?: ConnectorPlatform;
2849
2903
  externalId?: string;
@@ -2854,6 +2908,9 @@ interface CreateAttributeOptionDto {
2854
2908
  interface UpdateAttributeOptionDto {
2855
2909
  name?: string;
2856
2910
  value?: string;
2911
+ swatchColor?: string | null;
2912
+ swatchColor2?: string | null;
2913
+ swatchImageUrl?: string | null;
2857
2914
  platformMetadata?: Record<string, unknown>;
2858
2915
  position?: number;
2859
2916
  isActive?: boolean;
@@ -3541,6 +3598,7 @@ declare class BrainerceClient {
3541
3598
  * This is needed because Stripe redirects lose in-memory state.
3542
3599
  */
3543
3600
  private readonly ACTIVE_CHECKOUT_KEY;
3601
+ private readonly origin?;
3544
3602
  private readonly proxyMode;
3545
3603
  private readonly onAuthError?;
3546
3604
  constructor(options: BrainerceClientOptions);
@@ -6469,6 +6527,8 @@ declare class BrainerceError extends Error {
6469
6527
  constructor(message: string, statusCode: number, details?: unknown);
6470
6528
  }
6471
6529
 
6530
+ declare const SDK_VERSION = "1.11.2";
6531
+
6472
6532
  /**
6473
6533
  * Verify a webhook signature from Brainerce
6474
6534
  *
@@ -6541,4 +6601,4 @@ declare function enableDevGuards(options?: {
6541
6601
  force?: boolean;
6542
6602
  }): void;
6543
6603
 
6544
- 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 CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type Category, type CategoryNode, type CategorySuggestion, type Checkout, type CheckoutAddress, 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 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 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 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 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 ReconcileInventoryResponse, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, 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, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };
6604
+ 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 CartItem, type CartNudge, type CartRecommendationsResponse, type CartStatus, type Category, type CategoryNode, type CategorySuggestion, type Checkout, type CheckoutAddress, 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 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 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 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 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 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 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, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isCouponApplicableToProduct, isHtmlDescription, isWebhookEventType, parseWebhookEvent, verifyWebhook };