brainerce 1.7.0 → 1.10.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/AI_BUILDER_PROMPT.md +843 -842
- package/README.md +4237 -4236
- package/dist/index.d.mts +54 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.js +54 -0
- package/dist/index.mjs +54 -0
- package/package.json +77 -77
package/dist/index.d.mts
CHANGED
|
@@ -2379,6 +2379,36 @@ interface CustomApiTestResult {
|
|
|
2379
2379
|
latency?: number;
|
|
2380
2380
|
error?: string;
|
|
2381
2381
|
}
|
|
2382
|
+
/**
|
|
2383
|
+
* Client-side SDK configuration for payment providers that render a widget.
|
|
2384
|
+
* Returned by the backend in provider config and payment intents.
|
|
2385
|
+
* The frontend dynamically loads the SDK script and calls init/render methods.
|
|
2386
|
+
*/
|
|
2387
|
+
interface PaymentClientSdk {
|
|
2388
|
+
/** How the payment UI is rendered: 'sdk-widget' (JS SDK), 'iframe', or 'redirect' */
|
|
2389
|
+
renderType: 'sdk-widget' | 'iframe' | 'redirect';
|
|
2390
|
+
/** URL of the main SDK script to load */
|
|
2391
|
+
scriptUrl?: string;
|
|
2392
|
+
/** Name of the global variable set by the SDK script (e.g., 'growPayment') */
|
|
2393
|
+
globalName?: string;
|
|
2394
|
+
/** Method name to call for initialization (default: 'init') */
|
|
2395
|
+
initMethod?: string;
|
|
2396
|
+
/** Method name to call for rendering the payment widget (default: 'renderPaymentOptions') */
|
|
2397
|
+
renderMethod?: string;
|
|
2398
|
+
/** DOM element ID for the payment widget container */
|
|
2399
|
+
containerId?: string;
|
|
2400
|
+
/** Configuration object passed to the init method (e.g., { version: 1, environment: 'DEV' }) */
|
|
2401
|
+
initConfig?: Record<string, unknown>;
|
|
2402
|
+
/** Argument passed to the render method (overrides clientSecret) */
|
|
2403
|
+
renderArg?: string;
|
|
2404
|
+
/** Additional scripts to load (e.g., Apple Pay SDK) */
|
|
2405
|
+
additionalScripts?: Array<{
|
|
2406
|
+
url: string;
|
|
2407
|
+
optional?: boolean;
|
|
2408
|
+
}>;
|
|
2409
|
+
/** CSS to inject into <head> when SDK is active (e.g., LTR overrides for body-level popups on RTL pages) */
|
|
2410
|
+
bodyStyles?: string;
|
|
2411
|
+
}
|
|
2382
2412
|
/**
|
|
2383
2413
|
* Payment provider configuration (returned by `getPaymentProviders()`).
|
|
2384
2414
|
* Contains only public information safe to expose in frontend.
|
|
@@ -2405,6 +2435,8 @@ interface PaymentProviderConfig {
|
|
|
2405
2435
|
testMode: boolean;
|
|
2406
2436
|
/** Whether this is the default provider */
|
|
2407
2437
|
isDefault: boolean;
|
|
2438
|
+
/** Client-side SDK configuration for providers that render a widget */
|
|
2439
|
+
clientSdk?: PaymentClientSdk;
|
|
2408
2440
|
}
|
|
2409
2441
|
/**
|
|
2410
2442
|
* Alias for `PaymentProviderConfig`.
|
|
@@ -2486,6 +2518,8 @@ interface PaymentIntent {
|
|
|
2486
2518
|
status: string;
|
|
2487
2519
|
/** Payment provider type: 'stripe', 'grow', 'paypal', etc. */
|
|
2488
2520
|
provider?: string;
|
|
2521
|
+
/** Runtime client SDK overrides (merged with provider manifest config) */
|
|
2522
|
+
clientSdk?: PaymentClientSdk;
|
|
2489
2523
|
}
|
|
2490
2524
|
/**
|
|
2491
2525
|
* Payment status for a checkout.
|
|
@@ -5094,6 +5128,15 @@ declare class BrainerceClient {
|
|
|
5094
5128
|
* ```
|
|
5095
5129
|
*/
|
|
5096
5130
|
completeCheckout(checkoutId: string): Promise<CompleteCheckoutResponse>;
|
|
5131
|
+
/**
|
|
5132
|
+
* Delete a checkout session. Releases inventory reservations and removes
|
|
5133
|
+
* payment records not yet linked to an order.
|
|
5134
|
+
*
|
|
5135
|
+
* Cannot delete checkouts with status COMPLETED or PAYMENT_PROCESSING.
|
|
5136
|
+
*/
|
|
5137
|
+
deleteCheckout(checkoutId: string): Promise<{
|
|
5138
|
+
success: boolean;
|
|
5139
|
+
}>;
|
|
5097
5140
|
/**
|
|
5098
5141
|
* Get payment configuration for the connected store.
|
|
5099
5142
|
* Returns public information needed to initialize payment UI.
|
|
@@ -5654,6 +5697,16 @@ declare class BrainerceClient {
|
|
|
5654
5697
|
* ```
|
|
5655
5698
|
*/
|
|
5656
5699
|
getOrderDownloads(orderId: string): Promise<OrderDownloadLink[]>;
|
|
5700
|
+
/**
|
|
5701
|
+
* Get download links for a guest order (no login required)
|
|
5702
|
+
* Validates identity via email + order number
|
|
5703
|
+
*
|
|
5704
|
+
* @example
|
|
5705
|
+
* ```typescript
|
|
5706
|
+
* const links = await client.getGuestOrderDownloads('guest@email.com', 'ORD-20260310-0001');
|
|
5707
|
+
* ```
|
|
5708
|
+
*/
|
|
5709
|
+
getGuestOrderDownloads(email: string, orderNumber: string): Promise<OrderDownloadLink[]>;
|
|
5657
5710
|
/**
|
|
5658
5711
|
* Get the current customer's addresses (requires customerToken)
|
|
5659
5712
|
* Works in vibe-coded and storefront modes
|
|
@@ -6485,4 +6538,4 @@ declare function enableDevGuards(options?: {
|
|
|
6485
6538
|
force?: boolean;
|
|
6486
6539
|
}): void;
|
|
6487
6540
|
|
|
6488
|
-
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 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 };
|
|
6541
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -2379,6 +2379,36 @@ interface CustomApiTestResult {
|
|
|
2379
2379
|
latency?: number;
|
|
2380
2380
|
error?: string;
|
|
2381
2381
|
}
|
|
2382
|
+
/**
|
|
2383
|
+
* Client-side SDK configuration for payment providers that render a widget.
|
|
2384
|
+
* Returned by the backend in provider config and payment intents.
|
|
2385
|
+
* The frontend dynamically loads the SDK script and calls init/render methods.
|
|
2386
|
+
*/
|
|
2387
|
+
interface PaymentClientSdk {
|
|
2388
|
+
/** How the payment UI is rendered: 'sdk-widget' (JS SDK), 'iframe', or 'redirect' */
|
|
2389
|
+
renderType: 'sdk-widget' | 'iframe' | 'redirect';
|
|
2390
|
+
/** URL of the main SDK script to load */
|
|
2391
|
+
scriptUrl?: string;
|
|
2392
|
+
/** Name of the global variable set by the SDK script (e.g., 'growPayment') */
|
|
2393
|
+
globalName?: string;
|
|
2394
|
+
/** Method name to call for initialization (default: 'init') */
|
|
2395
|
+
initMethod?: string;
|
|
2396
|
+
/** Method name to call for rendering the payment widget (default: 'renderPaymentOptions') */
|
|
2397
|
+
renderMethod?: string;
|
|
2398
|
+
/** DOM element ID for the payment widget container */
|
|
2399
|
+
containerId?: string;
|
|
2400
|
+
/** Configuration object passed to the init method (e.g., { version: 1, environment: 'DEV' }) */
|
|
2401
|
+
initConfig?: Record<string, unknown>;
|
|
2402
|
+
/** Argument passed to the render method (overrides clientSecret) */
|
|
2403
|
+
renderArg?: string;
|
|
2404
|
+
/** Additional scripts to load (e.g., Apple Pay SDK) */
|
|
2405
|
+
additionalScripts?: Array<{
|
|
2406
|
+
url: string;
|
|
2407
|
+
optional?: boolean;
|
|
2408
|
+
}>;
|
|
2409
|
+
/** CSS to inject into <head> when SDK is active (e.g., LTR overrides for body-level popups on RTL pages) */
|
|
2410
|
+
bodyStyles?: string;
|
|
2411
|
+
}
|
|
2382
2412
|
/**
|
|
2383
2413
|
* Payment provider configuration (returned by `getPaymentProviders()`).
|
|
2384
2414
|
* Contains only public information safe to expose in frontend.
|
|
@@ -2405,6 +2435,8 @@ interface PaymentProviderConfig {
|
|
|
2405
2435
|
testMode: boolean;
|
|
2406
2436
|
/** Whether this is the default provider */
|
|
2407
2437
|
isDefault: boolean;
|
|
2438
|
+
/** Client-side SDK configuration for providers that render a widget */
|
|
2439
|
+
clientSdk?: PaymentClientSdk;
|
|
2408
2440
|
}
|
|
2409
2441
|
/**
|
|
2410
2442
|
* Alias for `PaymentProviderConfig`.
|
|
@@ -2486,6 +2518,8 @@ interface PaymentIntent {
|
|
|
2486
2518
|
status: string;
|
|
2487
2519
|
/** Payment provider type: 'stripe', 'grow', 'paypal', etc. */
|
|
2488
2520
|
provider?: string;
|
|
2521
|
+
/** Runtime client SDK overrides (merged with provider manifest config) */
|
|
2522
|
+
clientSdk?: PaymentClientSdk;
|
|
2489
2523
|
}
|
|
2490
2524
|
/**
|
|
2491
2525
|
* Payment status for a checkout.
|
|
@@ -5094,6 +5128,15 @@ declare class BrainerceClient {
|
|
|
5094
5128
|
* ```
|
|
5095
5129
|
*/
|
|
5096
5130
|
completeCheckout(checkoutId: string): Promise<CompleteCheckoutResponse>;
|
|
5131
|
+
/**
|
|
5132
|
+
* Delete a checkout session. Releases inventory reservations and removes
|
|
5133
|
+
* payment records not yet linked to an order.
|
|
5134
|
+
*
|
|
5135
|
+
* Cannot delete checkouts with status COMPLETED or PAYMENT_PROCESSING.
|
|
5136
|
+
*/
|
|
5137
|
+
deleteCheckout(checkoutId: string): Promise<{
|
|
5138
|
+
success: boolean;
|
|
5139
|
+
}>;
|
|
5097
5140
|
/**
|
|
5098
5141
|
* Get payment configuration for the connected store.
|
|
5099
5142
|
* Returns public information needed to initialize payment UI.
|
|
@@ -5654,6 +5697,16 @@ declare class BrainerceClient {
|
|
|
5654
5697
|
* ```
|
|
5655
5698
|
*/
|
|
5656
5699
|
getOrderDownloads(orderId: string): Promise<OrderDownloadLink[]>;
|
|
5700
|
+
/**
|
|
5701
|
+
* Get download links for a guest order (no login required)
|
|
5702
|
+
* Validates identity via email + order number
|
|
5703
|
+
*
|
|
5704
|
+
* @example
|
|
5705
|
+
* ```typescript
|
|
5706
|
+
* const links = await client.getGuestOrderDownloads('guest@email.com', 'ORD-20260310-0001');
|
|
5707
|
+
* ```
|
|
5708
|
+
*/
|
|
5709
|
+
getGuestOrderDownloads(email: string, orderNumber: string): Promise<OrderDownloadLink[]>;
|
|
5657
5710
|
/**
|
|
5658
5711
|
* Get the current customer's addresses (requires customerToken)
|
|
5659
5712
|
* Works in vibe-coded and storefront modes
|
|
@@ -6485,4 +6538,4 @@ declare function enableDevGuards(options?: {
|
|
|
6485
6538
|
force?: boolean;
|
|
6486
6539
|
}): void;
|
|
6487
6540
|
|
|
6488
|
-
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 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 };
|
|
6541
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -3296,6 +3296,33 @@ var BrainerceClient = class {
|
|
|
3296
3296
|
this.clearActiveCheckoutStorage();
|
|
3297
3297
|
return result;
|
|
3298
3298
|
}
|
|
3299
|
+
/**
|
|
3300
|
+
* Delete a checkout session. Releases inventory reservations and removes
|
|
3301
|
+
* payment records not yet linked to an order.
|
|
3302
|
+
*
|
|
3303
|
+
* Cannot delete checkouts with status COMPLETED or PAYMENT_PROCESSING.
|
|
3304
|
+
*/
|
|
3305
|
+
async deleteCheckout(checkoutId) {
|
|
3306
|
+
let result;
|
|
3307
|
+
if (this.isVibeCodedMode()) {
|
|
3308
|
+
result = await this.vibeCodedRequest(
|
|
3309
|
+
"DELETE",
|
|
3310
|
+
`/checkout/${checkoutId}`
|
|
3311
|
+
);
|
|
3312
|
+
} else if (this.storeId && !this.apiKey) {
|
|
3313
|
+
result = await this.storefrontRequest(
|
|
3314
|
+
"DELETE",
|
|
3315
|
+
`/checkout/${checkoutId}`
|
|
3316
|
+
);
|
|
3317
|
+
} else {
|
|
3318
|
+
result = await this.adminRequest(
|
|
3319
|
+
"DELETE",
|
|
3320
|
+
`/api/v1/checkout/${checkoutId}`
|
|
3321
|
+
);
|
|
3322
|
+
}
|
|
3323
|
+
this.clearActiveCheckoutStorage();
|
|
3324
|
+
return result;
|
|
3325
|
+
}
|
|
3299
3326
|
// -------------------- Payment (Vibe-Coded Only) --------------------
|
|
3300
3327
|
/**
|
|
3301
3328
|
* Get payment configuration for the connected store.
|
|
@@ -4444,6 +4471,33 @@ var BrainerceClient = class {
|
|
|
4444
4471
|
400
|
|
4445
4472
|
);
|
|
4446
4473
|
}
|
|
4474
|
+
/**
|
|
4475
|
+
* Get download links for a guest order (no login required)
|
|
4476
|
+
* Validates identity via email + order number
|
|
4477
|
+
*
|
|
4478
|
+
* @example
|
|
4479
|
+
* ```typescript
|
|
4480
|
+
* const links = await client.getGuestOrderDownloads('guest@email.com', 'ORD-20260310-0001');
|
|
4481
|
+
* ```
|
|
4482
|
+
*/
|
|
4483
|
+
async getGuestOrderDownloads(email, orderNumber) {
|
|
4484
|
+
if (this.isVibeCodedMode()) {
|
|
4485
|
+
return this.vibeCodedRequest("POST", "/orders/guest/downloads", {
|
|
4486
|
+
email,
|
|
4487
|
+
orderNumber
|
|
4488
|
+
});
|
|
4489
|
+
}
|
|
4490
|
+
if (this.storeId && !this.apiKey) {
|
|
4491
|
+
return this.storefrontRequest("POST", "/orders/guest/downloads", {
|
|
4492
|
+
email,
|
|
4493
|
+
orderNumber
|
|
4494
|
+
});
|
|
4495
|
+
}
|
|
4496
|
+
throw new BrainerceError(
|
|
4497
|
+
"getGuestOrderDownloads is only available in vibe-coded or storefront mode",
|
|
4498
|
+
400
|
|
4499
|
+
);
|
|
4500
|
+
}
|
|
4447
4501
|
/**
|
|
4448
4502
|
* Get the current customer's addresses (requires customerToken)
|
|
4449
4503
|
* Works in vibe-coded and storefront modes
|
package/dist/index.mjs
CHANGED
|
@@ -3238,6 +3238,33 @@ var BrainerceClient = class {
|
|
|
3238
3238
|
this.clearActiveCheckoutStorage();
|
|
3239
3239
|
return result;
|
|
3240
3240
|
}
|
|
3241
|
+
/**
|
|
3242
|
+
* Delete a checkout session. Releases inventory reservations and removes
|
|
3243
|
+
* payment records not yet linked to an order.
|
|
3244
|
+
*
|
|
3245
|
+
* Cannot delete checkouts with status COMPLETED or PAYMENT_PROCESSING.
|
|
3246
|
+
*/
|
|
3247
|
+
async deleteCheckout(checkoutId) {
|
|
3248
|
+
let result;
|
|
3249
|
+
if (this.isVibeCodedMode()) {
|
|
3250
|
+
result = await this.vibeCodedRequest(
|
|
3251
|
+
"DELETE",
|
|
3252
|
+
`/checkout/${checkoutId}`
|
|
3253
|
+
);
|
|
3254
|
+
} else if (this.storeId && !this.apiKey) {
|
|
3255
|
+
result = await this.storefrontRequest(
|
|
3256
|
+
"DELETE",
|
|
3257
|
+
`/checkout/${checkoutId}`
|
|
3258
|
+
);
|
|
3259
|
+
} else {
|
|
3260
|
+
result = await this.adminRequest(
|
|
3261
|
+
"DELETE",
|
|
3262
|
+
`/api/v1/checkout/${checkoutId}`
|
|
3263
|
+
);
|
|
3264
|
+
}
|
|
3265
|
+
this.clearActiveCheckoutStorage();
|
|
3266
|
+
return result;
|
|
3267
|
+
}
|
|
3241
3268
|
// -------------------- Payment (Vibe-Coded Only) --------------------
|
|
3242
3269
|
/**
|
|
3243
3270
|
* Get payment configuration for the connected store.
|
|
@@ -4386,6 +4413,33 @@ var BrainerceClient = class {
|
|
|
4386
4413
|
400
|
|
4387
4414
|
);
|
|
4388
4415
|
}
|
|
4416
|
+
/**
|
|
4417
|
+
* Get download links for a guest order (no login required)
|
|
4418
|
+
* Validates identity via email + order number
|
|
4419
|
+
*
|
|
4420
|
+
* @example
|
|
4421
|
+
* ```typescript
|
|
4422
|
+
* const links = await client.getGuestOrderDownloads('guest@email.com', 'ORD-20260310-0001');
|
|
4423
|
+
* ```
|
|
4424
|
+
*/
|
|
4425
|
+
async getGuestOrderDownloads(email, orderNumber) {
|
|
4426
|
+
if (this.isVibeCodedMode()) {
|
|
4427
|
+
return this.vibeCodedRequest("POST", "/orders/guest/downloads", {
|
|
4428
|
+
email,
|
|
4429
|
+
orderNumber
|
|
4430
|
+
});
|
|
4431
|
+
}
|
|
4432
|
+
if (this.storeId && !this.apiKey) {
|
|
4433
|
+
return this.storefrontRequest("POST", "/orders/guest/downloads", {
|
|
4434
|
+
email,
|
|
4435
|
+
orderNumber
|
|
4436
|
+
});
|
|
4437
|
+
}
|
|
4438
|
+
throw new BrainerceError(
|
|
4439
|
+
"getGuestOrderDownloads is only available in vibe-coded or storefront mode",
|
|
4440
|
+
400
|
|
4441
|
+
);
|
|
4442
|
+
}
|
|
4389
4443
|
/**
|
|
4390
4444
|
* Get the current customer's addresses (requires customerToken)
|
|
4391
4445
|
* Works in vibe-coded and storefront modes
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "brainerce",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Official SDK for building e-commerce storefronts with Brainerce Platform. Perfect for vibe-coded sites, AI-built stores (Cursor, Lovable, v0), and custom storefronts.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"require": "./dist/index.js",
|
|
12
|
-
"import": "./dist/index.mjs"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist",
|
|
17
|
-
"README.md",
|
|
18
|
-
"AI_BUILDER_PROMPT.md"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
22
|
-
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
23
|
-
"lint": "eslint \"src/**/*.ts\"",
|
|
24
|
-
"test": "vitest run",
|
|
25
|
-
"test:watch": "vitest",
|
|
26
|
-
"prepublishOnly": "pnpm build"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [
|
|
29
|
-
"brainerce",
|
|
30
|
-
"e-commerce",
|
|
31
|
-
"ecommerce",
|
|
32
|
-
"sdk",
|
|
33
|
-
"vibe-coding",
|
|
34
|
-
"vibe-coded",
|
|
35
|
-
"ai-commerce",
|
|
36
|
-
"storefront",
|
|
37
|
-
"headless-commerce",
|
|
38
|
-
"multi-platform",
|
|
39
|
-
"shopify",
|
|
40
|
-
"tiktok",
|
|
41
|
-
"cursor",
|
|
42
|
-
"lovable",
|
|
43
|
-
"v0",
|
|
44
|
-
"cart",
|
|
45
|
-
"checkout",
|
|
46
|
-
"products",
|
|
47
|
-
"sync"
|
|
48
|
-
],
|
|
49
|
-
"author": "Brainerce",
|
|
50
|
-
"license": "MIT",
|
|
51
|
-
"repository": {
|
|
52
|
-
"type": "git",
|
|
53
|
-
"url": "https://github.com/brainerce/brainerce.git",
|
|
54
|
-
"directory": "packages/sdk"
|
|
55
|
-
},
|
|
56
|
-
"homepage": "https://brainerce.com",
|
|
57
|
-
"bugs": {
|
|
58
|
-
"url": "https://github.com/brainerce/brainerce/issues"
|
|
59
|
-
},
|
|
60
|
-
"devDependencies": {
|
|
61
|
-
"@types/node": "^25.0.3",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
63
|
-
"@typescript-eslint/parser": "^8.50.1",
|
|
64
|
-
"eslint": "^9.39.2",
|
|
65
|
-
"tsup": "^8.0.0",
|
|
66
|
-
"typescript": "^5.3.0",
|
|
67
|
-
"vitest": "^1.0.0"
|
|
68
|
-
},
|
|
69
|
-
"peerDependencies": {
|
|
70
|
-
"typescript": ">=4.7.0"
|
|
71
|
-
},
|
|
72
|
-
"peerDependenciesMeta": {
|
|
73
|
-
"typescript": {
|
|
74
|
-
"optional": true
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "brainerce",
|
|
3
|
+
"version": "1.10.0",
|
|
4
|
+
"description": "Official SDK for building e-commerce storefronts with Brainerce Platform. Perfect for vibe-coded sites, AI-built stores (Cursor, Lovable, v0), and custom storefronts.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"import": "./dist/index.mjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"AI_BUILDER_PROMPT.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
22
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
23
|
+
"lint": "eslint \"src/**/*.ts\"",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:watch": "vitest",
|
|
26
|
+
"prepublishOnly": "pnpm build"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"brainerce",
|
|
30
|
+
"e-commerce",
|
|
31
|
+
"ecommerce",
|
|
32
|
+
"sdk",
|
|
33
|
+
"vibe-coding",
|
|
34
|
+
"vibe-coded",
|
|
35
|
+
"ai-commerce",
|
|
36
|
+
"storefront",
|
|
37
|
+
"headless-commerce",
|
|
38
|
+
"multi-platform",
|
|
39
|
+
"shopify",
|
|
40
|
+
"tiktok",
|
|
41
|
+
"cursor",
|
|
42
|
+
"lovable",
|
|
43
|
+
"v0",
|
|
44
|
+
"cart",
|
|
45
|
+
"checkout",
|
|
46
|
+
"products",
|
|
47
|
+
"sync"
|
|
48
|
+
],
|
|
49
|
+
"author": "Brainerce",
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "https://github.com/brainerce/brainerce.git",
|
|
54
|
+
"directory": "packages/sdk"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://brainerce.com",
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/brainerce/brainerce/issues"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^25.0.3",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
63
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
64
|
+
"eslint": "^9.39.2",
|
|
65
|
+
"tsup": "^8.0.0",
|
|
66
|
+
"typescript": "^5.3.0",
|
|
67
|
+
"vitest": "^1.0.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"typescript": ">=4.7.0"
|
|
71
|
+
},
|
|
72
|
+
"peerDependenciesMeta": {
|
|
73
|
+
"typescript": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|