arky-sdk 0.9.19 → 0.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/README.md +171 -105
- package/dist/admin.cjs +55 -19
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +5 -3
- package/dist/admin.d.ts +5 -3
- package/dist/admin.js +55 -19
- package/dist/admin.js.map +1 -1
- package/dist/{api-CuqZQQGv.d.cts → index-B0Pd1s-2.d.cts} +4457 -4455
- package/dist/{api-CuqZQQGv.d.ts → index-B0Pd1s-2.d.ts} +4457 -4455
- package/dist/index.cjs +2290 -524
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3828 -3
- package/dist/index.d.ts +3828 -3
- package/dist/index.js +2286 -525
- package/dist/index.js.map +1 -1
- package/dist/{inventory-DNX8Vg-N.d.ts → inventory-C2EZEnV9.d.ts} +1 -1
- package/dist/{inventory-DrVRUkE2.d.cts → inventory-t9OBR0CC.d.cts} +1 -1
- package/dist/storefront.cjs +650 -678
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +5 -512
- package/dist/storefront.d.ts +5 -512
- package/dist/storefront.js +650 -678
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
- package/dist/admin-CgER0AZn.d.cts +0 -1543
- package/dist/admin-CqasPNLl.d.ts +0 -1543
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3828 @@
|
|
|
1
|
-
export { az as ActionFeedCategory, aC as ActionFeedCursor, aD as ActionFeedData, aA as ActionFeedItem, aB as ActionFeedSummary, a3 as AdminSession, a1 as AdminSessionInternal, a4 as AdminSessionUpdater, af as AnalyticsActionReportKey, ai as AnalyticsBlockRequest, ax as AnalyticsBlockResponse, am as AnalyticsBreakdownData, al as AnalyticsBreakdownItem, ae as AnalyticsBreakdownReportKey, ag as AnalyticsCompositeReportKey, ak as AnalyticsMetricData, ad as AnalyticsMetricReportKey, aw as AnalyticsReport, ac as AnalyticsReportKey, ah as AnalyticsReportRequest, aj as AnalyticsRequest, ay as AnalyticsResponse, ab as AnalyticsTimeRange, a0 as ApiConfig, b1 as AssignSupportConversationParams, A as AuthStateListener, an as BusinessOverviewData, D as COMMON_ACTION_KEYS, J as CartApi, K as CartController, L as CartControllerAddItemParams, M as CartControllerCheckoutParams, N as CartControllerClearParams, O as CartControllerInitParams, P as CartControllerListener, Q as CartControllerQuoteParams, R as CartControllerRefreshParams, W as CartControllerRemoveItemParams, X as CartControllerState, Y as CartControllerUpdateParams, H as CommonActionKey, aq as ContactFunnelData, ap as ContactFunnelStage, a as ContactSession, a2 as ContactSessionInternal, a5 as ContactSessionUpdater, a6 as CreateAdminConfig, aE as CreateExperimentParams, C as CreateStorefrontConfig, b5 as CreateSupportChannelParams, av as DataHealthData, a$ as EdgeTrigger, au as EntityStatusOverviewData, bd as EventMetadata, be as EventScopeField, aF as Experiment, aG as ExperimentResults, aH as ExperimentStatus, E as ExperimentUseResponse, aI as ExperimentVariant, aJ as ExperimentVariantResult, aK as FindExperimentsParams, b7 as FindSupportChannelsParams, b8 as FindSupportConversationsParams, aa as GetCountriesResponse, aL as GetExperimentParams, b2 as GetSupportConversationParams, a9 as LocationCountry, a8 as LocationState, at as OutreachFunnelData, as as OutreachFunnelStage, ar as OutreachOverviewData, b9 as ReceiveSupportChannelMessageParams, b3 as ReplySupportConversationParams, b4 as ResolveSupportConversationParams, ao as RevenueByCurrencyData, _ as SDK_VERSION, $ as SUPPORTED_FRAMEWORKS, aX as SendSupportMessageParams, c as StorefrontAction, S as StorefrontClient, h as StorefrontGetSupportConversationParams, b as StorefrontIdentifyResult, f as StorefrontSendSupportMessageParams, Z as StorefrontSessionStorage, b0 as SupportAction, aO as SupportAgent, a_ as SupportAgentAiConfig, aZ as SupportAgentEdge, aY as SupportAgentNode, aP as SupportAgentStatus, aQ as SupportChannel, aR as SupportChannelConfig, aS as SupportChannelStatus, aT as SupportChannelType, aU as SupportConversation, aV as SupportConversationChannelContext, g as SupportConversationResponse, e as SupportConversationStartResponse, aW as SupportMessage, aN as TimelineParams, T as TrackActionParams, aM as UpdateExperimentParams, b6 as UpdateSupportChannelParams, U as UseExperimentParams, bc as WorkflowTool, ba as WorkflowToolOperation, bb as WorkflowToolResource, a7 as createAdmin, G as createCartController, F as createStorefront } from './admin-CqasPNLl.js';
|
|
2
|
-
export { gx as Access, aC as Account, aE as AccountApiToken, aG as AccountApiTokenCreated, aI as AccountSession, az as AccountUpdateResponse, es as Action, iy as ActionContext, ix as ActionData, d7 as ActivateDigitalAccessGrantParams, as as AddCartItemParams, e4 as AddContactListContactParams, k as Address, A as AvailabilityResponse, jx as AvailabilitySlot, B as Block, gC as BlockSchema, gD as BlockSchemaProperties, gE as BlockSchemaType, hP as BookingOrderItemStatus, b6 as BuildHook, ft as BuildHookType, ev as Campaign, eH as CampaignEnrollment, eJ as CampaignEnrollmentConversationResponse, iN as CampaignEnrollmentImportResult, j9 as CampaignEnrollmentImportSource, j8 as CampaignEnrollmentStatus, eC as CampaignLaunchReadiness, iM as CampaignLaunchState, j7 as CampaignLaunchStatus, iJ as CampaignManualTaskOutcome, eQ as CampaignMessage, ja as CampaignMessageCopySource, jb as CampaignMessageDirection, jd as CampaignMessageStatus, jc as CampaignMessageType, iR as CampaignRoute, j6 as CampaignStatus, f0 as CancelLeadResearchRunParams, c5 as CancelSocialPublicationParams, l as Cart, fp as CartOrigin, fq as CartStatus, iS as ChannelMessage, it as ChannelType, aw as CheckoutCartParams, g3 as CheckoutPaymentAction, cc as ClassifySocialPublicationCommentsParams, au as ClearCartParams, s as Collection, C as CollectionEntry, jp as CollectionStatus, iZ as Condition, jB as ConditionValue, bS as ConnectSocialConnectionParams, bq as ConnectStripePaymentProviderParams, r as Contact, is as ContactChannel, dZ as ContactList, ad as ContactListAccessParams, ae as ContactListAccessResponse, h7 as ContactListContentAccess, af as ContactListContentAccessParams, ag as ContactListContentAccessResponse, h8 as ContactListContentAccessStatus, h9 as ContactListContentAccessTarget, ha as ContactListManagementContactList, hb as ContactListManagementMembership, ah as ContactListManagementResponse, e5 as ContactListMember, iz as ContactListMembership, ep as ContactListMembershipCancellation, gg as ContactListMembershipCancellationSafeError, gh as ContactListMembershipCancellationStatus, gi as ContactListMembershipCancellationType, ei as ContactListMembershipPaymentAttempt, gj as ContactListMembershipPaymentAttemptSafeError, gk as ContactListMembershipPaymentAttemptStatus, gl as ContactListMembershipPaymentAttemptType, el as ContactListMembershipRefund, gm as ContactListMembershipRefundSafeError, gn as ContactListMembershipRefundStatus, go as ContactListMembershipRefundType, j4 as ContactListMembershipStatus, ea as ContactListPlan, h3 as ContactListPlanCatalogSafeError, h4 as ContactListPlanCatalogStatus, h5 as ContactListPlanCatalogType, jN as ContactListPlanPriceInput, h6 as ContactListPlanStatus, j3 as ContactListSource, j2 as ContactListStatus, ac as ContactListSubscribeResponse, h2 as ContactListType, an as ContactSessionIssued, iq as ContactSessionRecord, ir as ContactSessionStatus, j1 as ContactStatus, gA as Coordinates, eu as CreateCampaignParams, dv as CreateCartParams, cs as CreateCollectionParams, dY as CreateContactListParams, e9 as CreateContactListPlanParams, cw as CreateEntryParams, eX as CreateLeadResearchRunParams, bh as CreateLocationParams, bG as CreateMailboxParams, bk as CreateMarketParams, cY as CreateOrderRefundParams, cZ as CreateOrderRefundResponse, jT as CreateProductVariantInput, db as CreateShipmentParams, dc as CreateShipmentResponse, ce as CreateSocialCommentReplyParams, bY as CreateSocialPublicationParams, aT as CreateStoreSubscriptionActionParams, eS as CreateSuppressionParams, e as Currency, hx as CustomsDeclaration, hw as CustomsItem, jy as DaySlots, cu as DeleteCollectionParams, cy as DeleteEntryParams, bj as DeleteLocationParams, bs as DeletePaymentProviderParams, bX as DeleteSocialConnectionParams, _ as DigitalAccessDownloadResponse, a0 as DigitalAccessGrant, i0 as DigitalAccessGrantStatus, i5 as DigitalAsset, i3 as DigitalAssetStatus, i2 as DigitalAssetType, i4 as DigitalDeliveryPolicy, iY as Discount, hL as DiscountAllocation, Y as DownloadDigitalAccessParams, eA as DuplicateCampaignParams, bC as EmailDelivery, ib as EmailDeliveryError, ic as EmailDeliveryErrorKind, id as EmailDeliveryStatus, ie as EmailDeliveryType, i8 as EmailRecipients, i9 as EmailSend, ia as EmailSendDeliveryResult, bz as EmailSendRequest, bA as EmailSendResult, ig as EmailSendTemplateData, cM as EmailTemplate, jr as EmailTemplateStatus, i7 as EmailTemplateType, js as EmailTemplateVariable, jt as EmailTemplateVariableSource, gF as EntryBlockQuery, jq as EntryStatus, E as EshopCartItem, fr as EshopStoreState, hc as Event, hd as EventAction, h0 as ExecutionStatus, gH as FieldOperation, eG as FindCampaignEnrollmentsParams, eP as FindCampaignMessagesParams, ey as FindCampaignsParams, dw as FindCartsParams, e8 as FindContactListContactsParams, eo as FindContactListMembershipCancellationsParams, eh as FindContactListMembershipPaymentAttemptsParams, ek as FindContactListMembershipRefundsParams, ed as FindContactListPlansParams, d$ as FindContactListsParams, dU as FindContactSessionsParams, $ as FindDigitalAccessGrantsParams, dh as FindFulfillmentOrdersParams, f3 as FindLeadResearchMessagesParams, eZ as FindLeadResearchRunsParams, bN as FindMailboxesParams, d0 as FindOrderRefundsParams, d5 as FindPaymentTransactionsParams, df as FindShipmentsParams, dq as FindShippingLabelAdjustmentsParams, dn as FindShippingLabelRefundsParams, ds as FindShippingLabelSettlementsParams, cb as FindSocialPublicationCommentsParams, c1 as FindSocialPublicationsParams, aY as FindStoreSubscriptionActionEffectsParams, aV as FindStoreSubscriptionActionsParams, a9 as FindStorefrontContactListMembershipsParams, a7 as FindStorefrontContactListPlansParams, a6 as FindStorefrontContactListsParams, eW as FindSuppressionsParams, F as Form, h as FormEntry, n as FormField, ii as FormFieldType, m as FormSchema, ih as FormSchemaType, ju as FormStatus, x as FormSubmission, ak as FormValue, a as FormValues, di as FulfillmentOrder, hk as FulfillmentOrderLine, hj as FulfillmentOrderRequestStatus, hi as FulfillmentOrderStatus, i6 as GalleryItem, eF as GenerateOutreachPersonalizedDraftsParams, gu as GeoLocation, hy as GeoLocationBlock, N as GetAvailabilityParams, eI as GetCampaignEnrollmentConversationParams, eB as GetCampaignLaunchReadinessParams, ex as GetCampaignParams, aq as GetCartParams, G as GetCollectionParams, cv as GetCollectionsParams, eq as GetContactListMembershipCancellationParams, ej as GetContactListMembershipPaymentAttemptParams, em as GetContactListMembershipRefundParams, a4 as GetContactListParams, ec as GetContactListPlanParams, ap as GetCurrentCartParams, a1 as GetDigitalAccessGrantParams, bB as GetEmailDeliveryParams, t as GetEntriesParams, cz as GetEntryParams, dj as GetFulfillmentOrderParams, e_ as GetLeadResearchRunParams, bJ as GetMailboxParams, d1 as GetOrderPaymentParams, c_ as GetOrderRefundParams, d6 as GetPaymentTransactionParams, dd as GetShipmentParams, dm as GetShippingLabelRefundParams, d9 as GetShippingRatesParams, bO as GetSocialCapabilitiesParams, ci as GetSocialCommentReplyParams, bU as GetSocialOAuthAttemptParams, c9 as GetSocialPublicationCommentThreadParams, c6 as GetSocialPublicationCommentsParams, cm as GetSocialPublicationEffectParams, cn as GetSocialPublicationMetricsParams, b$ as GetSocialPublicationParams, a_ as GetStoreSubscriptionActionEffectParams, aW as GetStoreSubscriptionActionParams, eV as GetSuppressionParams, gQ as GoogleDriveWorkflowConnectionData, gR as GoogleDriveWorkflowProfile, iD as GoogleMailboxProvider, h$ as HistoryEntry, al as HttpClientConfig, eD as ImportCampaignEnrollmentsParams, e2 as ImportContactListPreviewParams, jR as ImportContactListRowResult, jP as ImportContactRowError, jO as ImportContactRowInput, jQ as ImportContactRowResult, e0 as ImportContactsIntoContactListParams, e1 as ImportContactsIntoContactListResult, dS as ImportContactsParams, jL as ImportContactsPreviewParams, e3 as ImportContactsPreviewResult, dT as ImportContactsResult, jJ as ImportFieldMapping, jK as ImportPreviewRow, fB as InstagramPlacement, I as InventoryLevel, gw as Language, ez as LaunchCampaignParams, iT as LeadEmailClassification, f6 as LeadEmailValidationResult, iQ as LeadInsight, f4 as LeadResearchMessage, iW as LeadResearchMessageRole, eY as LeadResearchRun, iO as LeadResearchRunStatus, iP as LeadScores, iU as LeadValidationCheck, iV as LeadValidationCheckStatus, hN as LineMoneySnapshot, bn as ListPaymentProvidersParams, cg as ListSocialCommentRepliesParams, bQ as ListSocialConnectionsParams, ck as ListSocialPublicationEffectsParams, aj as Location, bH as Mailbox, iA as MailboxConnectionSecurity, iB as MailboxPreset, j5 as MailboxStatus, iC as MailboxSyncStatus, iI as ManualTaskContinueBehavior, M as Market, jS as MarketZoneInput, bu as Media, gG as MediaRef, gz as MediaResolution, gy as MediaSize, jm as MutableWorkflowStatus, h1 as NodeResult, iw as OpportunitySource, iu as OpportunityStage, iv as OpportunityType, W as Order, h_ as OrderCancellationReason, a3 as OrderCheckoutItemInput, fT as OrderFinancialSummary, hY as OrderFulfillmentStatus, hl as OrderFulfillmentSummary, hF as OrderItem, hO as OrderItemFulfillmentStatus, hG as OrderItemSnapshot, hV as OrderItemStatus, O as OrderMoney, d2 as OrderPayment, fZ as OrderPaymentPromoCode, hZ as OrderPaymentStatus, hX as OrderPaymentSummaryStatus, fX as OrderPaymentTax, fY as OrderPaymentTaxLine, d as OrderQuote, jE as OrderQuoteItemInput, c$ as OrderRefund, hW as OrderStatus, iK as OutreachPersonalizationCounters, iL as OutreachPersonalizationState, je as OutreachPersonalizationStatus, iG as OutreachStep, iH as OutreachStepType, jf as OutreachThreadMode, u as PaginatedResponse, hm as Parcel, f as PaymentMethod, jw as PaymentMethodType, bo as PaymentProvider, fU as PaymentProviderConnection, fV as PaymentProviderConnectionError, fW as PaymentProviderConnectionStatus, q as PaymentStoreConfig, d4 as PaymentTransaction, f_ as PaymentTransactionProvider, f$ as PaymentTransactionRequestType, g1 as PaymentTransactionStatus, g0 as PaymentTransactionType, bM as PrepareMailboxParams, i as Price, P as Product, o as ProductCheckoutItemInput, i1 as ProductInventory, jV as ProductInventoryInput, hH as ProductLineItem, hJ as ProductLineItemSnapshot, jC as ProductQuoteItemInput, hR as ProductQuoteLine, hT as ProductQuoteLineAvailability, j0 as ProductStatus, a2 as ProductVariant, dH as PromoCode, jo as PromoCodeStatus, gv as PromoCodeValidation, b as Provider, jz as ProviderAvailability, i$ as ProviderStatus, hA as ProviderTimelinePoint, gB as ProviderWithTimeline, av as QuoteCartParams, hQ as QuoteLine, bp as RefreshPaymentProvidersParams, ef as RefundContactListMembershipParams, eg as RefundContactListMembershipResult, g2 as RefundStatus, at as RemoveCartItemParams, e7 as RemoveContactListContactParams, eN as ReplyCampaignEnrollmentParams, dk as RequestShippingLabelRefundParams, iX as ResearchContactListMember, er as RetryContactListMembershipCancellationParams, en as RetryContactListMembershipRefundParams, ee as RetryContactListPlanCatalogParams, bD as RetryEmailDeliveryParams, d3 as RetryPaymentTransactionParams, dg as RetryShipmentParams, dp as RetryShippingLabelRefundParams, du as RetryShippingLabelSettlementParams, cj as RetrySocialCommentReplyParams, aX as RetryStoreSubscriptionActionParams, dX as RevokeAllContactSessionsParams, dW as RevokeContactSessionParams, d8 as RevokeDigitalAccessGrantParams, c4 as ScheduleSocialPublicationParams, f1 as SendLeadResearchMessageParams, f2 as SendLeadResearchMessageResult, S as Service, p as ServiceCheckoutItemInput, hz as ServiceDuration, hI as ServiceLineItem, hK as ServiceLineItemSnapshot, c as ServiceProvider, jD as ServiceQuoteItemInput, hS as ServiceQuoteLine, hU as ServiceQuoteLineAvailability, i_ as ServiceStatus, de as Shipment, hu as ShipmentAllocationStatus, hv as ShipmentLine, dr as ShippingLabelAdjustment, hq as ShippingLabelAdjustmentStatus, dl as ShippingLabelRefund, hp as ShippingLabelRefundReconciliationStatus, ho as ShippingLabelRefundStatus, dt as ShippingLabelSettlement, hr as ShippingLabelSettlementDirection, hs as ShippingLabelSettlementStatus, ht as ShippingLabelSettlementType, hn as ShippingLabelStatus, hh as ShippingLine, gr as ShippingMethod, hf as ShippingProvider, da as ShippingRate, hg as ShippingRateLine, he as ShippingStatus, gs as ShippingWeightTier, jA as Slot, g as SlotRange, iF as SmtpImapMailboxProvider, iE as SmtpImapMailboxProviderInput, fC as SocialAnalyticsCapabilities, ch as SocialCommentReply, fG as SocialCommentReplyError, fH as SocialCommentReplyEvidence, fI as SocialCommentReplyStatus, bT as SocialConnectResponse, bR as SocialConnection, fx as SocialConnectionCredential, fy as SocialConnectionData, fz as SocialConnectionProviderData, fA as SocialConnectionType, fu as SocialDestinationMetadata, fD as SocialEngagementCapabilities, bV as SocialOAuthCallbackResponse, fv as SocialOAuthCallbackStatus, fw as SocialOAuthDestinationOption, bP as SocialProviderCapability, c0 as SocialPublication, c7 as SocialPublicationComment, cd as SocialPublicationCommentClassificationResult, fE as SocialPublicationCommentIntent, fF as SocialPublicationCommentPriority, cf as SocialPublicationCommentReplyResponse, fJ as SocialPublicationCommentStatus, fK as SocialPublicationContent, cl as SocialPublicationEffect, fL as SocialPublicationEffectError, fM as SocialPublicationEffectEvidence, fN as SocialPublicationEffectRequest, fO as SocialPublicationEffectStatus, cr as SocialPublicationEngagementSyncResult, co as SocialPublicationMetricSnapshot, bZ as SocialPublicationMutationResponse, fP as SocialPublicationStatus, c3 as SocialPublicationValidation, hE as SpecificDate, eO as StopCampaignEnrollmentParams, ai as Store, b2 as StoreMember, b3 as StoreMembership, aQ as StoreSubscription, aU as StoreSubscriptionAction, g4 as StoreSubscriptionActionError, g5 as StoreSubscriptionActionRequest, g6 as StoreSubscriptionActionResult, g7 as StoreSubscriptionActionStatus, aZ as StoreSubscriptionEffect, g8 as StoreSubscriptionEffectError, g9 as StoreSubscriptionEffectStatus, ga as StoreSubscriptionEffectType, gb as StoreSubscriptionPayment, gc as StoreSubscriptionStatus, a5 as StorefrontContactList, aa as StorefrontContactListMembership, gq as StorefrontContactListPaymentAttemptSummary, a8 as StorefrontContactListPlan, gp as StorefrontContactListType, br as StripePaymentProviderConnectResponse, ab as SubscribeContactListParams, aS as SubscriptionPlan, gd as SubscriptionPlanFeature, ge as SubscriptionPlanFeatureType, gf as SubscriptionPrice, eT as Suppression, jj as SuppressionReason, ji as SuppressionScopeType, jk as SuppressionSource, jg as SuppressionStatus, jh as SuppressionTargetType, cq as SyncSocialEngagementParams, ca as SyncSocialPublicationCommentThreadParams, c8 as SyncSocialPublicationCommentsParams, cp as SyncSocialPublicationMetricsParams, jI as SystemTemplateKey, hM as TaxLine, T as Taxonomy, ij as TaxonomyEntry, io as TaxonomyField, ip as TaxonomyFieldQuery, ik as TaxonomyQuery, il as TaxonomySchema, im as TaxonomySchemaType, jv as TaxonomyStatus, bK as TestMailboxParams, bL as TestMailboxResult, ba as TestWebhookParams, bb as TestWebhookResponse, fQ as TiktokPrivacy, hB as TimelinePoint, jH as TrustedOrderCheckoutItemInput, jF as TrustedProductCheckoutItemInput, jG as TrustedServiceCheckoutItemInput, eL as UpdateCampaignEnrollmentDraftParams, eK as UpdateCampaignEnrollmentParams, eM as UpdateCampaignEnrollmentStepExecutionParams, eR as UpdateCampaignMessageParams, ew as UpdateCampaignParams, ar as UpdateCartParams, ct as UpdateCollectionParams, e6 as UpdateContactListContactParams, d_ as UpdateContactListParams, eb as UpdateContactListPlanParams, cx as UpdateEntryParams, e$ as UpdateLeadResearchRunParams, bi as UpdateLocationParams, bI as UpdateMailboxParams, bl as UpdateMarketParams, jU as UpdateProductVariantInput, b_ as UpdateSocialPublicationParams, eU as UpdateSuppressionParams, f5 as ValidateLeadEmailParams, c2 as ValidateSocialPublicationParams, fR as ValidationError, bd as Webhook, jM as WebhookDeliveryStatus, fs as WebhookEventSubscription, f8 as Workflow, fl as WorkflowConnection, fn as WorkflowConnectionConnectUrl, gO as WorkflowConnectionData, gP as WorkflowConnectionType, gM as WorkflowDeployWebhookNode, gJ as WorkflowEdge, fi as WorkflowEffect, gY as WorkflowEffectError, gX as WorkflowEffectEvidence, gZ as WorkflowEffectStatus, g_ as WorkflowEffectType, fe as WorkflowExecution, g$ as WorkflowExecutionInput, gN as WorkflowGoogleDriveUploadNode, gW as WorkflowHttpMethod, gL as WorkflowHttpNode, gV as WorkflowLoopNode, gI as WorkflowNode, jn as WorkflowSendEmailNode, jl as WorkflowStatus, gS as WorkflowSwitchNode, gT as WorkflowSwitchRule, gU as WorkflowTransformNode, gK as WorkflowTriggerNode, hD as WorkingDay, hC as WorkingHour, fS as YoutubePrivacy, gt as Zone, Z as ZoneLocation } from './api-CuqZQQGv.js';
|
|
3
|
-
import './inventory-
|
|
1
|
+
import { C as Contact, M as Market, Z as Zone, P as PaymentStoreConfig, L as Location, G as GetCurrentCartParams, R as RequestOptions, a as Cart, b as GetCartParams, U as UpdateCartParams, A as AddCartItemParams, c as RemoveCartItemParams, d as ClearCartParams, Q as QuoteCartParams, e as OrderQuote, f as CheckoutCartParams, g as OrderCheckoutResult, B as Block, h as CollectionEntry, F as Form, i as FormValues, j as Product, S as Service, k as Provider, l as AvailabilityResponse, m as ServiceProvider, n as Currency, o as PaymentMethod, p as SlotRange, q as FormEntry, r as Price, E as EshopCartItem, s as Address, t as FormSchema, u as FormField, v as ZoneLocation, w as ProductCheckoutItemInput, x as ServiceCheckoutItemInput, y as GetCollectionParams, z as BlockSchema, D as CollectionStatus, H as GetEntriesParams, J as EntryStatus, K as GetFormParams, N as SubmitFormParams, T as FormSubmission, V as GetTaxonomyParams, W as Taxonomy, X as GetTaxonomyChildrenParams, Y as PaginatedResponse, _ as GetProductParams, $ as TaxonomyField, a0 as DigitalDeliveryPolicy, a1 as DigitalAssetType, a2 as DigitalAssetStatus, a3 as ProductStatus, a4 as GetProductsParams, a5 as GetServiceParams, a6 as ServiceStatus, a7 as GetServicesParams, a8 as FindServiceProvidersParams, a9 as GetAvailabilityParams, aa as GetProviderParams, ab as ProviderStatus, ac as GetProvidersParams, ad as GetOrderParams, ae as Order, af as GetOrdersParams, ag as GetDigitalAccessGrantParams, ah as DigitalAccessDownloadResponse, ai as FindDigitalAccessGrantsParams, aj as DigitalAccessGrant, ak as CartStatus, al as CartOrigin, am as ConditionValue, an as PaymentMethodType, ao as ProductVariant, ap as OrderCheckoutItemInput, aq as GetContactListParams, ar as StorefrontContactList, as as FindStorefrontContactListsParams, at as FindStorefrontContactListPlansParams, au as StorefrontContactListPlan, av as FindStorefrontContactListMembershipsParams, aw as StorefrontContactListMembership, ax as SubscribeContactListParams, ay as ContactListSubscribeResponse, az as ContactListAccessParams, aA as ContactListAccessResponse, aB as ContactListContentAccessParams, aC as ContactListContentAccessResponse, aD as HttpClient, aE as AuthStorage, aF as VerificationChallengeResponse, aG as HttpClientConfig, aH as UpdateAccountContactParams, aI as AccountUpdateResponse, aJ as DeleteAccountParams, aK as GetMeParams, aL as Account, aM as SearchAccountsParams, aN as AccountApiToken, aO as CreateAccountApiTokenParams, aP as AccountApiTokenCreated, aQ as UpdateAccountApiTokenParams, aR as AccountSession, aS as AuthCodeVerifyParams, aT as AuthToken, aU as CreateStoreParams, aV as Store, aW as UpdateStoreParams, aX as GetStoreParams, aY as GetStoresParams, aZ as GetStoreSubscriptionParams, a_ as StoreSubscription, a$ as GetSubscriptionPlansParams, b0 as SubscriptionPlan, b1 as CreateStoreSubscriptionActionParams, b2 as StoreSubscriptionAction, b3 as FindStoreSubscriptionActionsParams, b4 as GetStoreSubscriptionActionParams, b5 as RetryStoreSubscriptionActionParams, b6 as FindStoreSubscriptionActionEffectsParams, b7 as StoreSubscriptionEffect, b8 as GetStoreSubscriptionActionEffectParams, b9 as CreatePortalSessionParams, ba as AddMemberParams, bb as FindStoreMembersParams, bc as StoreMember, bd as StoreMembership, be as RemoveMemberParams, bf as ListBuildHooksParams, bg as BuildHook, bh as CreateBuildHookParams, bi as UpdateBuildHookParams, bj as DeleteBuildHookParams, bk as TestWebhookParams, bl as TestWebhookResponse, bm as ListWebhooksParams, bn as Webhook, bo as CreateWebhookParams, bp as UpdateWebhookParams, bq as DeleteWebhookParams, br as CreateLocationParams, bs as UpdateLocationParams, bt as DeleteLocationParams, bu as CreateMarketParams, bv as UpdateMarketParams, bw as DeleteMarketParams, bx as ListPaymentProvidersParams, by as PaymentProvider, bz as RefreshPaymentProvidersParams, bA as ConnectStripePaymentProviderParams, bB as StripePaymentProviderConnectResponse, bC as DeletePaymentProviderParams, bD as GetMediaParams, bE as Media, bF as UploadStoreMediaParams, bG as DeleteStoreMediaParams, bH as GetStoreMediaParams, bI as UpdateMediaParams, bJ as EmailSendRequest, bK as EmailSendResult, bL as GetEmailDeliveryParams, bM as EmailDelivery, bN as RetryEmailDeliveryParams, bO as ConnectGoogleMailboxParams, bP as GoogleMailboxConnectUrl, bQ as CreateMailboxParams, bR as Mailbox, bS as UpdateMailboxParams, bT as GetMailboxParams, bU as TestMailboxParams, bV as TestMailboxResult, bW as PrepareMailboxParams, bX as FindMailboxesParams, bY as GetSocialCapabilitiesParams, bZ as SocialProviderCapability, b_ as ListSocialConnectionsParams, b$ as SocialConnection, c0 as ConnectSocialConnectionParams, c1 as SocialConnectResponse, c2 as GetSocialOAuthAttemptParams, c3 as SocialOAuthCallbackResponse, c4 as SelectSocialDestinationParams, c5 as DeleteSocialConnectionParams, c6 as CreateSocialPublicationParams, c7 as SocialPublicationMutationResponse, c8 as UpdateSocialPublicationParams, c9 as GetSocialPublicationParams, ca as SocialPublication, cb as FindSocialPublicationsParams, cc as ValidateSocialPublicationParams, cd as SocialPublicationValidation, ce as ScheduleSocialPublicationParams, cf as CancelSocialPublicationParams, cg as GetSocialPublicationCommentsParams, ch as SocialPublicationComment, ci as SyncSocialPublicationCommentsParams, cj as GetSocialPublicationCommentThreadParams, ck as SyncSocialPublicationCommentThreadParams, cl as FindSocialPublicationCommentsParams, cm as ClassifySocialPublicationCommentsParams, cn as SocialPublicationCommentClassificationResult, co as CreateSocialCommentReplyParams, cp as SocialPublicationCommentReplyResponse, cq as ListSocialCommentRepliesParams, cr as SocialCommentReply, cs as GetSocialCommentReplyParams, ct as RetrySocialCommentReplyParams, cu as ListSocialPublicationEffectsParams, cv as SocialPublicationEffect, cw as GetSocialPublicationEffectParams, cx as GetSocialPublicationMetricsParams, cy as SocialPublicationMetricSnapshot, cz as SyncSocialPublicationMetricsParams, cA as SyncSocialEngagementParams, cB as SocialPublicationEngagementSyncResult, cC as CreateCollectionParams, cD as Collection, cE as UpdateCollectionParams, cF as DeleteCollectionParams, cG as GetCollectionsParams, cH as CreateEntryParams, cI as UpdateEntryParams, cJ as DeleteEntryParams, cK as GetEntryParams, cL as CreateFormParams, cM as UpdateFormParams, cN as DeleteFormParams, cO as GetFormsParams, cP as GetFormSubmissionsParams, cQ as GetFormSubmissionParams, cR as UpdateFormSubmissionParams, cS as CreateTaxonomyParams, cT as UpdateTaxonomyParams, cU as DeleteTaxonomyParams, cV as GetTaxonomiesParams, cW as CreateEmailTemplateParams, cX as EmailTemplate, cY as UpdateEmailTemplateParams, cZ as DeleteEmailTemplateParams, c_ as GetEmailTemplateParams, c$ as GetEmailTemplatesParams, d0 as PreviewEmailTemplateParams, d1 as PreviewEmailTemplateResponse, d2 as CreateProductParams, d3 as UpdateProductParams, d4 as DeleteProductParams, d5 as UpdateOrderParams, d6 as GetQuoteParams, d7 as CreateOrderRefundParams, d8 as CreateOrderRefundResponse, d9 as GetOrderRefundParams, da as OrderRefund, db as FindOrderRefundsParams, dc as GetOrderPaymentParams, dd as OrderPayment, de as RetryPaymentTransactionParams, df as PaymentTransaction, dg as FindPaymentTransactionsParams, dh as GetPaymentTransactionParams, di as DownloadDigitalAccessParams, dj as ActivateDigitalAccessGrantParams, dk as RevokeDigitalAccessGrantParams, dl as GetShippingRatesParams, dm as ShippingRate, dn as CreateShipmentParams, dp as CreateShipmentResponse, dq as GetShipmentParams, dr as Shipment, ds as FindShipmentsParams, dt as RetryShipmentParams, du as FindFulfillmentOrdersParams, dv as FulfillmentOrder, dw as GetFulfillmentOrderParams, dx as RequestShippingLabelRefundParams, dy as ShippingLabelRefund, dz as GetShippingLabelRefundParams, dA as FindShippingLabelRefundsParams, dB as RetryShippingLabelRefundParams, dC as FindShippingLabelAdjustmentsParams, dD as ShippingLabelAdjustment, dE as FindShippingLabelSettlementsParams, dF as ShippingLabelSettlement, dG as RetryShippingLabelSettlementParams, dH as CreateCartParams, dI as FindCartsParams, dJ as CreateServiceParams, dK as UpdateServiceParams, dL as DeleteServiceParams, dM as CreateServiceProviderParams, dN as UpdateServiceProviderParams, dO as DeleteServiceProviderParams, dP as CreateProviderParams, dQ as UpdateProviderParams, dR as DeleteProviderParams, dS as CreatePromoCodeParams, dT as PromoCode, dU as UpdatePromoCodeParams, dV as DeletePromoCodeParams, dW as GetPromoCodeParams, dX as GetPromoCodesParams, dY as CreateContactParams, dZ as Contact$1, d_ as GetContactParams, d$ as FindContactsParams, e0 as UpdateContactParams, e1 as MergeContactsParams, e2 as ImportContactsParams, e3 as ImportContactsResult, e4 as FindContactSessionsParams, e5 as ContactSessionRecord, e6 as RevokeContactSessionParams, e7 as RevokeAllContactSessionsParams, e8 as CreateContactListParams, e9 as ContactList, ea as UpdateContactListParams, eb as FindContactListsParams, ec as ImportContactsIntoContactListParams, ed as ImportContactsIntoContactListResult, ee as ImportContactListPreviewParams, ef as ImportContactsPreviewResult, eg as AddContactListContactParams, eh as ContactListMember, ei as UpdateContactListContactParams, ej as RemoveContactListContactParams, ek as FindContactListContactsParams, el as CreateContactListPlanParams, em as ContactListPlan, en as UpdateContactListPlanParams, eo as GetContactListPlanParams, ep as FindContactListPlansParams, eq as RetryContactListPlanCatalogParams, er as RefundContactListMembershipParams, es as RefundContactListMembershipResult, et as FindContactListMembershipPaymentAttemptsParams, eu as ContactListMembershipPaymentAttempt, ev as GetContactListMembershipPaymentAttemptParams, ew as FindContactListMembershipRefundsParams, ex as ContactListMembershipRefund, ey as GetContactListMembershipRefundParams, ez as RetryContactListMembershipRefundParams, eA as FindContactListMembershipCancellationsParams, eB as ContactListMembershipCancellation, eC as GetContactListMembershipCancellationParams, eD as RetryContactListMembershipCancellationParams, eE as Action, eF as FindActionsParams, eG as CreateCampaignParams, eH as Campaign, eI as UpdateCampaignParams, eJ as GetCampaignParams, eK as FindCampaignsParams, eL as LaunchCampaignParams, eM as DuplicateCampaignParams, eN as GetCampaignLaunchReadinessParams, eO as CampaignLaunchReadiness, eP as ImportCampaignEnrollmentsParams, eQ as CampaignEnrollmentImportResult, eR as GenerateOutreachPersonalizedDraftsParams, eS as FindCampaignEnrollmentsParams, eT as CampaignEnrollment, eU as GetCampaignEnrollmentConversationParams, eV as CampaignEnrollmentConversationResponse, eW as UpdateCampaignEnrollmentParams, eX as UpdateCampaignEnrollmentDraftParams, eY as UpdateCampaignEnrollmentStepExecutionParams, eZ as ReplyCampaignEnrollmentParams, e_ as StopCampaignEnrollmentParams, e$ as FindCampaignMessagesParams, f0 as CampaignMessage, f1 as UpdateCampaignMessageParams, f2 as CreateSuppressionParams, f3 as Suppression, f4 as UpdateSuppressionParams, f5 as GetSuppressionParams, f6 as FindSuppressionsParams, f7 as CreateLeadResearchRunParams, f8 as LeadResearchRun, f9 as FindLeadResearchRunsParams, fa as GetLeadResearchRunParams, fb as UpdateLeadResearchRunParams, fc as CancelLeadResearchRunParams, fd as SendLeadResearchMessageParams, fe as SendLeadResearchMessageResult, ff as FindLeadResearchMessagesParams, fg as LeadResearchMessage, fh as ValidateLeadEmailParams, fi as LeadEmailValidationResult, fj as CreateWorkflowParams, fk as Workflow, fl as UpdateWorkflowParams, fm as DeleteWorkflowParams, fn as GetWorkflowParams, fo as GetWorkflowsParams, fp as TriggerWorkflowParams, fq as WorkflowExecution, fr as GetWorkflowExecutionsParams, fs as GetWorkflowExecutionParams, ft as GetWorkflowEffectsParams, fu as WorkflowEffect, fv as GetWorkflowEffectParams, fw as GetWorkflowConnectionsParams, fx as WorkflowConnection, fy as GetWorkflowConnectionConnectUrlParams, fz as WorkflowConnectionConnectUrl, fA as DeleteWorkflowConnectionParams } from './index-B0Pd1s-2.js';
|
|
2
|
+
export { gG as Access, iF as ActionContext, iE as ActionData, jy as AvailabilitySlot, gL as BlockSchemaProperties, gM as BlockSchemaType, hY as BookingOrderItemStatus, fD as BuildHookType, iU as CampaignEnrollmentImportResult, jd as CampaignEnrollmentImportSource, jc as CampaignEnrollmentStatus, iT as CampaignLaunchState, jb as CampaignLaunchStatus, iQ as CampaignManualTaskOutcome, je as CampaignMessageCopySource, jf as CampaignMessageDirection, jh as CampaignMessageStatus, jg as CampaignMessageType, iY as CampaignRoute, ja as CampaignStatus, iZ as ChannelMessage, iA as ChannelType, gd as CheckoutPaymentAction, j4 as Condition, iz as ContactChannel, hf as ContactListContentAccess, hg as ContactListContentAccessStatus, hh as ContactListContentAccessTarget, hi as ContactListManagementContactList, hj as ContactListManagementMembership, hk as ContactListManagementResponse, iG as ContactListMembership, gq as ContactListMembershipCancellationSafeError, gr as ContactListMembershipCancellationStatus, gs as ContactListMembershipCancellationType, gt as ContactListMembershipPaymentAttemptSafeError, gu as ContactListMembershipPaymentAttemptStatus, gv as ContactListMembershipPaymentAttemptType, gw as ContactListMembershipRefundSafeError, gx as ContactListMembershipRefundStatus, gy as ContactListMembershipRefundType, j8 as ContactListMembershipStatus, hb as ContactListPlanCatalogSafeError, hc as ContactListPlanCatalogStatus, hd as ContactListPlanCatalogType, jN as ContactListPlanPriceInput, he as ContactListPlanStatus, j7 as ContactListSource, j6 as ContactListStatus, ha as ContactListType, ix as ContactSessionIssued, iw as ContactSessionRecord, iy as ContactSessionStatus, j5 as ContactStatus, gJ as Coordinates, jT as CreateProductVariantInput, hG as CustomsDeclaration, hF as CustomsItem, jz as DaySlots, i9 as DigitalAccessGrantStatus, ib as DigitalAsset, j3 as Discount, hU as DiscountAllocation, ii as EmailDeliveryError, ij as EmailDeliveryErrorKind, ik as EmailDeliveryStatus, il as EmailDeliveryType, ie as EmailRecipients, ig as EmailSend, ih as EmailSendDeliveryResult, im as EmailSendTemplateData, jt as EmailTemplateStatus, id as EmailTemplateType, ju as EmailTemplateVariable, jv as EmailTemplateVariableSource, gN as EntryBlockQuery, fB as EshopStoreState, hl as Event, hm as EventAction, h8 as ExecutionStatus, gP as FieldOperation, ip as FormFieldType, io as FormSchemaType, jw as FormStatus, iq as FormValue, ht as FulfillmentOrderLine, hs as FulfillmentOrderRequestStatus, hr as FulfillmentOrderStatus, ic as GalleryItem, gD as GeoLocation, hH as GeoLocationBlock, gY as GoogleDriveWorkflowConnectionData, gZ as GoogleDriveWorkflowProfile, iK as GoogleMailboxProvider, i8 as HistoryEntry, jR as ImportContactListRowResult, jP as ImportContactRowError, jO as ImportContactRowInput, jQ as ImportContactRowResult, jL as ImportContactsPreviewParams, jJ as ImportFieldMapping, jK as ImportPreviewRow, fL as InstagramPlacement, I as InventoryLevel, gF as Language, i_ as LeadEmailClassification, iX as LeadInsight, j1 as LeadResearchMessageRole, iV as LeadResearchRunStatus, iW as LeadScores, i$ as LeadValidationCheck, j0 as LeadValidationCheckStatus, hW as LineMoneySnapshot, iH as MailboxConnectionSecurity, iI as MailboxPreset, j9 as MailboxStatus, iJ as MailboxSyncStatus, iP as ManualTaskContinueBehavior, jS as MarketZoneInput, gO as MediaRef, gI as MediaResolution, gH as MediaSize, jq as MutableWorkflowStatus, h9 as NodeResult, iD as OpportunitySource, iB as OpportunityStage, iC as OpportunityType, i7 as OrderCancellationReason, g1 as OrderFinancialSummary, i5 as OrderFulfillmentStatus, hu as OrderFulfillmentSummary, hO as OrderItem, hX as OrderItemFulfillmentStatus, hP as OrderItemSnapshot, i2 as OrderItemStatus, O as OrderMoney, g7 as OrderPaymentPromoCode, i6 as OrderPaymentStatus, i4 as OrderPaymentSummaryStatus, g5 as OrderPaymentTax, g6 as OrderPaymentTaxLine, jE as OrderQuoteItemInput, i3 as OrderStatus, iR as OutreachPersonalizationCounters, iS as OutreachPersonalizationState, ji as OutreachPersonalizationStatus, iN as OutreachStep, iO as OutreachStepType, jj as OutreachThreadMode, hv as Parcel, g2 as PaymentProviderConnection, g3 as PaymentProviderConnectionError, g4 as PaymentProviderConnectionStatus, g8 as PaymentTransactionProvider, g9 as PaymentTransactionRequestType, gb as PaymentTransactionStatus, ga as PaymentTransactionType, ia as ProductInventory, jV as ProductInventoryInput, hQ as ProductLineItem, hS as ProductLineItemSnapshot, jC as ProductQuoteItemInput, h_ as ProductQuoteLine, i0 as ProductQuoteLineAvailability, js as PromoCodeStatus, gE as PromoCodeValidation, jA as ProviderAvailability, hJ as ProviderTimelinePoint, gK as ProviderWithTimeline, hZ as QuoteLine, gc as RefundStatus, j2 as ResearchContactListMember, hI as ServiceDuration, hR as ServiceLineItem, hT as ServiceLineItemSnapshot, jD as ServiceQuoteItemInput, h$ as ServiceQuoteLine, i1 as ServiceQuoteLineAvailability, hD as ShipmentAllocationStatus, hE as ShipmentLine, hz as ShippingLabelAdjustmentStatus, hy as ShippingLabelRefundReconciliationStatus, hx as ShippingLabelRefundStatus, hA as ShippingLabelSettlementDirection, hB as ShippingLabelSettlementStatus, hC as ShippingLabelSettlementType, hw as ShippingLabelStatus, hq as ShippingLine, gB as ShippingMethod, ho as ShippingProvider, hp as ShippingRateLine, hn as ShippingStatus, gC as ShippingWeightTier, jB as Slot, iM as SmtpImapMailboxProvider, iL as SmtpImapMailboxProviderInput, fM as SocialAnalyticsCapabilities, fQ as SocialCommentReplyError, fR as SocialCommentReplyEvidence, fS as SocialCommentReplyStatus, fH as SocialConnectionCredential, fI as SocialConnectionData, fJ as SocialConnectionProviderData, fK as SocialConnectionType, fE as SocialDestinationMetadata, fN as SocialEngagementCapabilities, fF as SocialOAuthCallbackStatus, fG as SocialOAuthDestinationOption, fO as SocialPublicationCommentIntent, fP as SocialPublicationCommentPriority, fT as SocialPublicationCommentStatus, fU as SocialPublicationContent, fV as SocialPublicationEffectError, fW as SocialPublicationEffectEvidence, fX as SocialPublicationEffectRequest, fY as SocialPublicationEffectStatus, fZ as SocialPublicationStatus, hN as SpecificDate, ge as StoreSubscriptionActionError, gf as StoreSubscriptionActionRequest, gg as StoreSubscriptionActionResult, gh as StoreSubscriptionActionStatus, gi as StoreSubscriptionEffectError, gj as StoreSubscriptionEffectStatus, gk as StoreSubscriptionEffectType, gl as StoreSubscriptionPayment, gm as StoreSubscriptionStatus, gA as StorefrontContactListPaymentAttemptSummary, gz as StorefrontContactListType, gn as SubscriptionPlanFeature, go as SubscriptionPlanFeatureType, gp as SubscriptionPrice, jn as SuppressionReason, jm as SuppressionScopeType, jo as SuppressionSource, jk as SuppressionStatus, jl as SuppressionTargetType, jI as SystemTemplateKey, hV as TaxLine, ir as TaxonomyEntry, iv as TaxonomyFieldQuery, is as TaxonomyQuery, it as TaxonomySchema, iu as TaxonomySchemaType, jx as TaxonomyStatus, f_ as TiktokPrivacy, hK as TimelinePoint, jH as TrustedOrderCheckoutItemInput, jF as TrustedProductCheckoutItemInput, jG as TrustedServiceCheckoutItemInput, jU as UpdateProductVariantInput, f$ as ValidationError, jM as WebhookDeliveryStatus, fC as WebhookEventSubscription, gW as WorkflowConnectionData, gX as WorkflowConnectionType, gU as WorkflowDeployWebhookNode, gR as WorkflowEdge, h4 as WorkflowEffectError, h3 as WorkflowEffectEvidence, h5 as WorkflowEffectStatus, h6 as WorkflowEffectType, h7 as WorkflowExecutionInput, gV as WorkflowGoogleDriveUploadNode, h2 as WorkflowHttpMethod, gT as WorkflowHttpNode, h1 as WorkflowLoopNode, gQ as WorkflowNode, jr as WorkflowSendEmailNode, jp as WorkflowStatus, g_ as WorkflowSwitchNode, g$ as WorkflowSwitchRule, h0 as WorkflowTransformNode, gS as WorkflowTriggerNode, hM as WorkingDay, hL as WorkingHour, g0 as YoutubePrivacy } from './index-B0Pd1s-2.js';
|
|
3
|
+
import { m as formatPayment, f as formatMinor, g as getCurrencySymbol, a as getCurrencyName, i as isValidKey, v as validateKey, t as toKey, n as nameToKey, e as getAvailableStock, h as getReservedStock, j as hasStock, k as getInventoryAt, l as getFirstAvailableFCId } from './inventory-C2EZEnV9.js';
|
|
4
|
+
import * as nanostores from 'nanostores';
|
|
5
|
+
import { StripeElementsOptions, Stripe } from '@stripe/stripe-js';
|
|
6
|
+
|
|
7
|
+
type ExperimentStatus = "draft" | "running" | "paused" | "completed";
|
|
8
|
+
interface ExperimentVariant {
|
|
9
|
+
key: string;
|
|
10
|
+
weight: number;
|
|
11
|
+
}
|
|
12
|
+
interface Experiment {
|
|
13
|
+
id: string;
|
|
14
|
+
store_id: string;
|
|
15
|
+
key: string;
|
|
16
|
+
status: ExperimentStatus;
|
|
17
|
+
version: number;
|
|
18
|
+
goal_action_key: string;
|
|
19
|
+
variants: ExperimentVariant[];
|
|
20
|
+
created_at: number;
|
|
21
|
+
updated_at: number;
|
|
22
|
+
}
|
|
23
|
+
interface CreateExperimentParams {
|
|
24
|
+
store_id?: string;
|
|
25
|
+
key: string;
|
|
26
|
+
goal_action_key: string;
|
|
27
|
+
variants: ExperimentVariant[];
|
|
28
|
+
status?: ExperimentStatus;
|
|
29
|
+
}
|
|
30
|
+
interface UpdateExperimentParams {
|
|
31
|
+
store_id?: string;
|
|
32
|
+
key: string;
|
|
33
|
+
goal_action_key?: string;
|
|
34
|
+
variants?: ExperimentVariant[];
|
|
35
|
+
status?: ExperimentStatus;
|
|
36
|
+
}
|
|
37
|
+
interface GetExperimentParams {
|
|
38
|
+
store_id?: string;
|
|
39
|
+
key: string;
|
|
40
|
+
}
|
|
41
|
+
interface FindExperimentsParams {
|
|
42
|
+
store_id?: string;
|
|
43
|
+
limit?: number;
|
|
44
|
+
cursor?: string;
|
|
45
|
+
}
|
|
46
|
+
interface ExperimentVariantResult {
|
|
47
|
+
variant_key: string;
|
|
48
|
+
weight: number;
|
|
49
|
+
shown: number;
|
|
50
|
+
wins: number;
|
|
51
|
+
conversion_rate: number;
|
|
52
|
+
}
|
|
53
|
+
interface ExperimentResults {
|
|
54
|
+
experiment: Experiment;
|
|
55
|
+
variants: ExperimentVariantResult[];
|
|
56
|
+
winning_variant_key?: string | null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface AnalyticsTimeRange {
|
|
60
|
+
from: number;
|
|
61
|
+
to: number;
|
|
62
|
+
}
|
|
63
|
+
type AnalyticsReportKey = "business_overview" | "contact_funnel" | "outreach_overview" | "outreach_funnel" | "action_by_country" | "top_action_pages" | "entity_status_overview" | "data_health" | "orders_created" | "contacts_created" | "form_submissions_created" | "carts_abandoned" | "campaign_messages_sent" | "campaign_messages_received" | "suppressions_created" | "media_count" | "products_by_status" | "services_by_status" | "providers_by_status" | "collections_by_status" | "entries_by_status" | "contacts_by_status" | "contact_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_enrollments_by_status" | "campaign_messages_by_status" | "support_conversations_by_status" | "lead_research_runs_by_status" | "suppressions_by_status" | "workflows_by_status" | "promo_codes_by_status" | "email_templates_by_status" | "forms_by_status" | "taxonomies_by_status" | "carts_by_status" | "orders_by_status" | "order_items_by_status" | "recent_action";
|
|
64
|
+
type ActionFeedCategory = "orders" | "carts" | "promo_codes" | "submissions" | "contacts" | "contact_lists" | "products" | "services" | "providers" | "cms" | "workflows" | "actions";
|
|
65
|
+
interface AnalyticsReportRequest {
|
|
66
|
+
key: AnalyticsReportKey;
|
|
67
|
+
limit?: number;
|
|
68
|
+
category?: ActionFeedCategory;
|
|
69
|
+
cursor_created_at?: number;
|
|
70
|
+
cursor_id?: string;
|
|
71
|
+
}
|
|
72
|
+
interface AnalyticsRequest {
|
|
73
|
+
time?: AnalyticsTimeRange;
|
|
74
|
+
reports?: AnalyticsReportRequest[];
|
|
75
|
+
blocks?: AnalyticsBlockRequest[];
|
|
76
|
+
}
|
|
77
|
+
interface AnalyticsBlockRequest {
|
|
78
|
+
id: string;
|
|
79
|
+
time: AnalyticsTimeRange;
|
|
80
|
+
reports: AnalyticsReportRequest[];
|
|
81
|
+
}
|
|
82
|
+
interface AnalyticsMetricData {
|
|
83
|
+
value: number;
|
|
84
|
+
execution_ms?: number;
|
|
85
|
+
}
|
|
86
|
+
interface AnalyticsBreakdownItem {
|
|
87
|
+
key: string;
|
|
88
|
+
label: string;
|
|
89
|
+
value: number;
|
|
90
|
+
unique_contacts?: number;
|
|
91
|
+
unique_visitors?: number;
|
|
92
|
+
}
|
|
93
|
+
interface AnalyticsBreakdownData {
|
|
94
|
+
items: AnalyticsBreakdownItem[];
|
|
95
|
+
}
|
|
96
|
+
interface BusinessOverviewData {
|
|
97
|
+
visitors: number;
|
|
98
|
+
new_visitors: number;
|
|
99
|
+
known_contacts: number;
|
|
100
|
+
new_known_contacts: number;
|
|
101
|
+
email_known_contacts: number;
|
|
102
|
+
verified_contacts: number;
|
|
103
|
+
new_verified_contacts: number;
|
|
104
|
+
buyers: number;
|
|
105
|
+
orders: number;
|
|
106
|
+
revenue: number;
|
|
107
|
+
revenue_by_currency: RevenueByCurrencyData[];
|
|
108
|
+
average_order_value: number;
|
|
109
|
+
carts: number;
|
|
110
|
+
abandoned_carts: number;
|
|
111
|
+
visitor_to_known_rate: number;
|
|
112
|
+
visitor_to_buyer_rate: number;
|
|
113
|
+
cart_abandonment_rate: number;
|
|
114
|
+
}
|
|
115
|
+
interface RevenueByCurrencyData {
|
|
116
|
+
currency: string;
|
|
117
|
+
orders: number;
|
|
118
|
+
revenue: number;
|
|
119
|
+
average_order_value: number;
|
|
120
|
+
}
|
|
121
|
+
interface ContactFunnelStage {
|
|
122
|
+
key: "visitors" | "email_known_contacts" | "verified_contacts" | "buyers" | string;
|
|
123
|
+
label: string;
|
|
124
|
+
value: number;
|
|
125
|
+
}
|
|
126
|
+
interface ContactFunnelData {
|
|
127
|
+
stages: ContactFunnelStage[];
|
|
128
|
+
visitor_to_known_rate?: number;
|
|
129
|
+
visitor_to_buyer_rate?: number;
|
|
130
|
+
}
|
|
131
|
+
interface OutreachOverviewData {
|
|
132
|
+
contact_lists: number;
|
|
133
|
+
active_contact_lists: number;
|
|
134
|
+
mailboxes: number;
|
|
135
|
+
active_mailboxes: number;
|
|
136
|
+
campaigns: number;
|
|
137
|
+
active_campaigns: number;
|
|
138
|
+
campaign_enrollments: number;
|
|
139
|
+
new_campaign_enrollments: number;
|
|
140
|
+
active_campaign_enrollments: number;
|
|
141
|
+
completed_campaign_enrollments: number;
|
|
142
|
+
replied_campaign_enrollments: number;
|
|
143
|
+
suppressed_campaign_enrollments: number;
|
|
144
|
+
failed_campaign_enrollments: number;
|
|
145
|
+
campaign_messages_sent: number;
|
|
146
|
+
outreach_bounces: number;
|
|
147
|
+
campaign_messages_received: number;
|
|
148
|
+
suppressions: number;
|
|
149
|
+
active_suppressions: number;
|
|
150
|
+
new_suppressions: number;
|
|
151
|
+
reply_rate: number;
|
|
152
|
+
bounce_rate: number;
|
|
153
|
+
suppression_rate: number;
|
|
154
|
+
}
|
|
155
|
+
interface OutreachFunnelStage {
|
|
156
|
+
key: "contact_lists" | "campaigns" | "campaign_enrollments" | "campaign_messages_sent" | "outreach_bounces" | "campaign_messages_received" | string;
|
|
157
|
+
label: string;
|
|
158
|
+
value: number;
|
|
159
|
+
}
|
|
160
|
+
interface OutreachFunnelData {
|
|
161
|
+
stages: OutreachFunnelStage[];
|
|
162
|
+
reply_rate?: number;
|
|
163
|
+
bounce_rate?: number;
|
|
164
|
+
suppression_rate?: number;
|
|
165
|
+
}
|
|
166
|
+
interface EntityStatusOverviewData {
|
|
167
|
+
entities: Record<string, AnalyticsBreakdownItem[]>;
|
|
168
|
+
}
|
|
169
|
+
interface DataHealthData {
|
|
170
|
+
anonymous_contacts: number;
|
|
171
|
+
known_contacts: number;
|
|
172
|
+
duplicate_emails: number;
|
|
173
|
+
unknown_country_events: number;
|
|
174
|
+
unknown_device_events: number;
|
|
175
|
+
}
|
|
176
|
+
interface ActionFeedItem {
|
|
177
|
+
id: string;
|
|
178
|
+
entity: string;
|
|
179
|
+
entity_id: string;
|
|
180
|
+
action: string;
|
|
181
|
+
event_type: string;
|
|
182
|
+
status: string;
|
|
183
|
+
contact_id: string;
|
|
184
|
+
category: string;
|
|
185
|
+
title: string;
|
|
186
|
+
description: string;
|
|
187
|
+
href?: string | null;
|
|
188
|
+
data: unknown;
|
|
189
|
+
payload: unknown;
|
|
190
|
+
created_at: number;
|
|
191
|
+
}
|
|
192
|
+
interface ActionFeedSummary {
|
|
193
|
+
total: number;
|
|
194
|
+
orders: number;
|
|
195
|
+
submissions: number;
|
|
196
|
+
contacts: number;
|
|
197
|
+
contact_lists: number;
|
|
198
|
+
abandoned_carts: number;
|
|
199
|
+
carts: number;
|
|
200
|
+
promo_codes: number;
|
|
201
|
+
products: number;
|
|
202
|
+
services: number;
|
|
203
|
+
providers: number;
|
|
204
|
+
cms: number;
|
|
205
|
+
workflows: number;
|
|
206
|
+
actions: number;
|
|
207
|
+
window_start: number;
|
|
208
|
+
}
|
|
209
|
+
interface ActionFeedCursor {
|
|
210
|
+
created_at: number;
|
|
211
|
+
id: string;
|
|
212
|
+
}
|
|
213
|
+
interface ActionFeedData {
|
|
214
|
+
items: ActionFeedItem[];
|
|
215
|
+
summary: ActionFeedSummary;
|
|
216
|
+
next_cursor?: ActionFeedCursor | null;
|
|
217
|
+
meta: {
|
|
218
|
+
row_count: number;
|
|
219
|
+
execution_ms: number;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
type AnalyticsMetricReportKey = "orders_created" | "contacts_created" | "form_submissions_created" | "carts_abandoned" | "campaign_messages_sent" | "campaign_messages_received" | "suppressions_created" | "media_count";
|
|
223
|
+
type AnalyticsBreakdownReportKey = "action_by_country" | "top_action_pages" | "products_by_status" | "services_by_status" | "providers_by_status" | "collections_by_status" | "entries_by_status" | "contacts_by_status" | "contact_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_enrollments_by_status" | "campaign_messages_by_status" | "support_conversations_by_status" | "lead_research_runs_by_status" | "suppressions_by_status" | "workflows_by_status" | "promo_codes_by_status" | "email_templates_by_status" | "forms_by_status" | "taxonomies_by_status" | "carts_by_status" | "orders_by_status" | "order_items_by_status";
|
|
224
|
+
type AnalyticsActionReportKey = "recent_action";
|
|
225
|
+
type AnalyticsCompositeReportKey = "business_overview" | "contact_funnel" | "outreach_overview" | "outreach_funnel" | "entity_status_overview" | "data_health";
|
|
226
|
+
type AnalyticsReport = {
|
|
227
|
+
key: AnalyticsMetricReportKey;
|
|
228
|
+
data: AnalyticsMetricData;
|
|
229
|
+
} | {
|
|
230
|
+
key: AnalyticsBreakdownReportKey;
|
|
231
|
+
data: AnalyticsBreakdownData;
|
|
232
|
+
} | {
|
|
233
|
+
key: "business_overview";
|
|
234
|
+
data: BusinessOverviewData;
|
|
235
|
+
} | {
|
|
236
|
+
key: "contact_funnel";
|
|
237
|
+
data: ContactFunnelData;
|
|
238
|
+
} | {
|
|
239
|
+
key: "outreach_overview";
|
|
240
|
+
data: OutreachOverviewData;
|
|
241
|
+
} | {
|
|
242
|
+
key: "outreach_funnel";
|
|
243
|
+
data: OutreachFunnelData;
|
|
244
|
+
} | {
|
|
245
|
+
key: "entity_status_overview";
|
|
246
|
+
data: EntityStatusOverviewData;
|
|
247
|
+
} | {
|
|
248
|
+
key: "data_health";
|
|
249
|
+
data: DataHealthData;
|
|
250
|
+
} | {
|
|
251
|
+
key: AnalyticsActionReportKey;
|
|
252
|
+
data: ActionFeedData;
|
|
253
|
+
};
|
|
254
|
+
interface AnalyticsBlockResponse {
|
|
255
|
+
id: string;
|
|
256
|
+
time: AnalyticsTimeRange;
|
|
257
|
+
reports: AnalyticsReport[];
|
|
258
|
+
}
|
|
259
|
+
interface AnalyticsResponse {
|
|
260
|
+
time?: AnalyticsTimeRange;
|
|
261
|
+
reports?: AnalyticsReport[];
|
|
262
|
+
blocks?: AnalyticsBlockResponse[];
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
type StorefrontOpaqueKey = "attributes" | "blocks" | "context" | "data" | "fields" | "metadata" | "payload" | "properties" | "schema" | "value";
|
|
266
|
+
/**
|
|
267
|
+
* The public Storefront wire shape of an Admin/domain DTO.
|
|
268
|
+
*
|
|
269
|
+
* Store ownership is resolved from the publishable key and is intentionally
|
|
270
|
+
* absent from Storefront responses. User-authored JSON containers stay opaque
|
|
271
|
+
* so a legitimate content key named `store_id` is not erased from its type.
|
|
272
|
+
*/
|
|
273
|
+
type StorefrontDto<T> = T extends readonly (infer Item)[] ? StorefrontDto<Item>[] : T extends object ? {
|
|
274
|
+
[Key in keyof T as Key extends "store_id" ? never : Key]: Key extends StorefrontOpaqueKey ? T[Key] : StorefrontDto<T[Key]>;
|
|
275
|
+
} : T;
|
|
276
|
+
type StorefrontContact = StorefrontDto<Contact>;
|
|
277
|
+
type StorefrontLocation = StorefrontDto<Location>;
|
|
278
|
+
type StorefrontZone = Omit<Zone, "store_id" | "market_id">;
|
|
279
|
+
type StorefrontMarket = Omit<Market, "store_id" | "created_at" | "updated_at" | "zones"> & {
|
|
280
|
+
zones: StorefrontZone[];
|
|
281
|
+
};
|
|
282
|
+
interface StorefrontSetup {
|
|
283
|
+
timezone: string;
|
|
284
|
+
languages: {
|
|
285
|
+
default: string;
|
|
286
|
+
available: string[];
|
|
287
|
+
};
|
|
288
|
+
markets: {
|
|
289
|
+
default: string | null;
|
|
290
|
+
available: StorefrontMarket[];
|
|
291
|
+
};
|
|
292
|
+
support: {
|
|
293
|
+
email: string | null;
|
|
294
|
+
};
|
|
295
|
+
payment: PaymentStoreConfig | null;
|
|
296
|
+
readiness: {
|
|
297
|
+
market: boolean;
|
|
298
|
+
payment: boolean;
|
|
299
|
+
commerce: boolean;
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
interface StorefrontAction {
|
|
303
|
+
contact_id: string;
|
|
304
|
+
key: string;
|
|
305
|
+
payload: Record<string, unknown>;
|
|
306
|
+
created_at: number;
|
|
307
|
+
}
|
|
308
|
+
interface TrackActionParams {
|
|
309
|
+
key: string;
|
|
310
|
+
payload?: Record<string, unknown>;
|
|
311
|
+
}
|
|
312
|
+
declare const COMMON_ACTION_KEYS: readonly ["page.view", "product.view", "service.view", "provider.view", "cart.added", "cart.removed", "checkout.started", "order.created", "signin", "signup", "verified.email", "search", "share", "wishlist.added"];
|
|
313
|
+
type CommonActionKey = (typeof COMMON_ACTION_KEYS)[number];
|
|
314
|
+
interface UseExperimentParams {
|
|
315
|
+
key: string;
|
|
316
|
+
}
|
|
317
|
+
interface ExperimentUseResponse {
|
|
318
|
+
experiment_key: string;
|
|
319
|
+
experiment_version: number;
|
|
320
|
+
variant_key: string;
|
|
321
|
+
goal_action_key: string;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
type SupportAgentStatus = "draft" | "active" | "archived";
|
|
325
|
+
type SupportChannelStatus = "draft" | "active" | "disabled" | "archived";
|
|
326
|
+
type SupportChannelType = "web" | "email";
|
|
327
|
+
interface SupportAgentNode {
|
|
328
|
+
type: "message" | "input" | "ai_handoff" | "action";
|
|
329
|
+
text?: string;
|
|
330
|
+
buttons?: string[];
|
|
331
|
+
prompt?: string;
|
|
332
|
+
field?: string;
|
|
333
|
+
input_type?: "text" | "email" | "phone";
|
|
334
|
+
validation?: string;
|
|
335
|
+
system_prompt_override?: string;
|
|
336
|
+
tools?: string[];
|
|
337
|
+
action?: SupportAction;
|
|
338
|
+
}
|
|
339
|
+
interface SupportAction {
|
|
340
|
+
type: "end_conversation" | "human_handoff";
|
|
341
|
+
message?: string;
|
|
342
|
+
}
|
|
343
|
+
interface SupportAgentEdge {
|
|
344
|
+
source: string;
|
|
345
|
+
target: string;
|
|
346
|
+
trigger: EdgeTrigger;
|
|
347
|
+
}
|
|
348
|
+
type EdgeTrigger = {
|
|
349
|
+
type: "button";
|
|
350
|
+
label: string;
|
|
351
|
+
} | {
|
|
352
|
+
type: "input";
|
|
353
|
+
field: string;
|
|
354
|
+
} | {
|
|
355
|
+
type: "default";
|
|
356
|
+
};
|
|
357
|
+
interface SupportAgentAiConfig {
|
|
358
|
+
system_prompt: string;
|
|
359
|
+
tools: string[];
|
|
360
|
+
max_context_messages: number;
|
|
361
|
+
}
|
|
362
|
+
interface SupportAgent {
|
|
363
|
+
id: string;
|
|
364
|
+
key: string;
|
|
365
|
+
store_id: string;
|
|
366
|
+
name: string;
|
|
367
|
+
status: SupportAgentStatus;
|
|
368
|
+
entry_node_id: string;
|
|
369
|
+
nodes: Record<string, SupportAgentNode>;
|
|
370
|
+
edges: SupportAgentEdge[];
|
|
371
|
+
ai_config?: SupportAgentAiConfig;
|
|
372
|
+
channel_ids: string[];
|
|
373
|
+
notes?: string | null;
|
|
374
|
+
created_at: number;
|
|
375
|
+
updated_at: number;
|
|
376
|
+
}
|
|
377
|
+
type SupportChannelConfig = {
|
|
378
|
+
type: "web";
|
|
379
|
+
widget_key: string;
|
|
380
|
+
allowed_origins?: string[];
|
|
381
|
+
} | {
|
|
382
|
+
type: "email";
|
|
383
|
+
mailbox_id: string;
|
|
384
|
+
};
|
|
385
|
+
interface SupportChannel {
|
|
386
|
+
id: string;
|
|
387
|
+
store_id: string;
|
|
388
|
+
key: string;
|
|
389
|
+
name: string;
|
|
390
|
+
status: SupportChannelStatus;
|
|
391
|
+
channel_type: SupportChannelType;
|
|
392
|
+
config: SupportChannelConfig;
|
|
393
|
+
created_at: number;
|
|
394
|
+
updated_at: number;
|
|
395
|
+
}
|
|
396
|
+
type SupportConversationChannelContext = {
|
|
397
|
+
type: "web";
|
|
398
|
+
visitor_id?: string | null;
|
|
399
|
+
session_id?: string | null;
|
|
400
|
+
} | {
|
|
401
|
+
type: "email";
|
|
402
|
+
thread_id: string;
|
|
403
|
+
reply_to: string;
|
|
404
|
+
message_id?: string | null;
|
|
405
|
+
references: string[];
|
|
406
|
+
};
|
|
407
|
+
interface SupportConversation {
|
|
408
|
+
id: string;
|
|
409
|
+
store_id: string;
|
|
410
|
+
agent_id?: string;
|
|
411
|
+
channel_id?: string | null;
|
|
412
|
+
channel_type: SupportChannelType;
|
|
413
|
+
channel_context: SupportConversationChannelContext;
|
|
414
|
+
current_node_id?: string;
|
|
415
|
+
contact_id?: string;
|
|
416
|
+
assigned_account_id?: string | null;
|
|
417
|
+
status: "active" | "ai_mode" | "escalated" | "resolved";
|
|
418
|
+
data: Record<string, unknown>;
|
|
419
|
+
metadata: Record<string, unknown>;
|
|
420
|
+
created_at: number;
|
|
421
|
+
updated_at: number;
|
|
422
|
+
}
|
|
423
|
+
interface SupportMessage {
|
|
424
|
+
id: string;
|
|
425
|
+
store_id: string;
|
|
426
|
+
conversation_id: string;
|
|
427
|
+
role: "system" | "user" | "assistant" | "staff" | "action";
|
|
428
|
+
content: string;
|
|
429
|
+
buttons?: string[];
|
|
430
|
+
metadata: Record<string, unknown>;
|
|
431
|
+
created_at: number;
|
|
432
|
+
}
|
|
433
|
+
interface SupportConversationResponse {
|
|
434
|
+
conversation: SupportConversation;
|
|
435
|
+
messages: SupportMessage[];
|
|
436
|
+
}
|
|
437
|
+
interface SupportConversationStartResponse extends SupportConversationResponse {
|
|
438
|
+
support_token: string;
|
|
439
|
+
}
|
|
440
|
+
type StorefrontSupportConversationResponse = StorefrontDto<SupportConversationResponse>;
|
|
441
|
+
type StorefrontSupportConversationStartResponse = StorefrontDto<SupportConversationStartResponse>;
|
|
442
|
+
interface StartSupportConversationParams {
|
|
443
|
+
store_id: string;
|
|
444
|
+
agent_key?: string;
|
|
445
|
+
channel_id?: string;
|
|
446
|
+
visitor_id?: string;
|
|
447
|
+
session_id?: string;
|
|
448
|
+
contact_id?: string;
|
|
449
|
+
metadata?: Record<string, unknown>;
|
|
450
|
+
}
|
|
451
|
+
interface SendSupportMessageParams {
|
|
452
|
+
message_id: string;
|
|
453
|
+
store_id: string;
|
|
454
|
+
conversation_id: string;
|
|
455
|
+
input: {
|
|
456
|
+
type: "button";
|
|
457
|
+
label: string;
|
|
458
|
+
} | {
|
|
459
|
+
type: "text";
|
|
460
|
+
content: string;
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
interface ReceiveSupportChannelMessageParams {
|
|
464
|
+
store_id: string;
|
|
465
|
+
channel_id: string;
|
|
466
|
+
channel_context: SupportConversationChannelContext;
|
|
467
|
+
external_message_id?: string;
|
|
468
|
+
content: string;
|
|
469
|
+
metadata?: Record<string, unknown>;
|
|
470
|
+
received_at?: number;
|
|
471
|
+
}
|
|
472
|
+
interface ReplySupportConversationParams {
|
|
473
|
+
message_id: string;
|
|
474
|
+
store_id: string;
|
|
475
|
+
conversation_id: string;
|
|
476
|
+
content: string;
|
|
477
|
+
resolve?: boolean;
|
|
478
|
+
}
|
|
479
|
+
interface ResolveSupportConversationParams {
|
|
480
|
+
store_id: string;
|
|
481
|
+
conversation_id: string;
|
|
482
|
+
}
|
|
483
|
+
interface AssignSupportConversationParams {
|
|
484
|
+
store_id: string;
|
|
485
|
+
conversation_id: string;
|
|
486
|
+
account_id?: string | null;
|
|
487
|
+
}
|
|
488
|
+
interface GetSupportConversationParams {
|
|
489
|
+
store_id: string;
|
|
490
|
+
conversation_id: string;
|
|
491
|
+
message_limit?: number;
|
|
492
|
+
after_created_at?: number;
|
|
493
|
+
after_id?: string;
|
|
494
|
+
}
|
|
495
|
+
type StorefrontSendSupportMessageParams = Omit<SendSupportMessageParams, "store_id"> & {
|
|
496
|
+
support_token: string;
|
|
497
|
+
};
|
|
498
|
+
type StorefrontGetSupportConversationParams = Omit<GetSupportConversationParams, "store_id"> & {
|
|
499
|
+
support_token: string;
|
|
500
|
+
};
|
|
501
|
+
interface FindSupportConversationsParams {
|
|
502
|
+
store_id: string;
|
|
503
|
+
status?: string;
|
|
504
|
+
agent_id?: string;
|
|
505
|
+
channel_id?: string;
|
|
506
|
+
channel_type?: SupportChannelType;
|
|
507
|
+
query?: string;
|
|
508
|
+
limit?: number;
|
|
509
|
+
cursor?: string;
|
|
510
|
+
}
|
|
511
|
+
interface CreateSupportAgentParams {
|
|
512
|
+
store_id: string;
|
|
513
|
+
key: string;
|
|
514
|
+
name: string;
|
|
515
|
+
status?: SupportAgentStatus;
|
|
516
|
+
entry_node_id: string;
|
|
517
|
+
nodes: Record<string, SupportAgentNode>;
|
|
518
|
+
edges: SupportAgentEdge[];
|
|
519
|
+
ai_config?: SupportAgentAiConfig;
|
|
520
|
+
channel_ids?: string[];
|
|
521
|
+
notes?: string | null;
|
|
522
|
+
}
|
|
523
|
+
interface UpdateSupportAgentParams {
|
|
524
|
+
store_id: string;
|
|
525
|
+
id: string;
|
|
526
|
+
name?: string;
|
|
527
|
+
status?: SupportAgentStatus;
|
|
528
|
+
entry_node_id?: string;
|
|
529
|
+
nodes?: Record<string, SupportAgentNode>;
|
|
530
|
+
edges?: SupportAgentEdge[];
|
|
531
|
+
ai_config?: SupportAgentAiConfig;
|
|
532
|
+
channel_ids?: string[];
|
|
533
|
+
notes?: string | null;
|
|
534
|
+
}
|
|
535
|
+
interface CreateSupportChannelParams {
|
|
536
|
+
store_id: string;
|
|
537
|
+
key: string;
|
|
538
|
+
name: string;
|
|
539
|
+
status?: SupportChannelStatus;
|
|
540
|
+
channel_type: SupportChannelType;
|
|
541
|
+
config: SupportChannelConfig;
|
|
542
|
+
}
|
|
543
|
+
interface UpdateSupportChannelParams {
|
|
544
|
+
store_id: string;
|
|
545
|
+
id: string;
|
|
546
|
+
key?: string;
|
|
547
|
+
name?: string;
|
|
548
|
+
status?: SupportChannelStatus;
|
|
549
|
+
channel_type?: SupportChannelType;
|
|
550
|
+
config?: SupportChannelConfig;
|
|
551
|
+
}
|
|
552
|
+
interface FindSupportChannelsParams {
|
|
553
|
+
store_id: string;
|
|
554
|
+
status?: SupportChannelStatus;
|
|
555
|
+
channel_type?: SupportChannelType;
|
|
556
|
+
limit?: number;
|
|
557
|
+
cursor?: string;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
interface TimelineParams {
|
|
561
|
+
contact_id: string;
|
|
562
|
+
store_id?: string;
|
|
563
|
+
limit?: number;
|
|
564
|
+
cursor?: string;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
interface WorkflowToolOperation {
|
|
568
|
+
name: string;
|
|
569
|
+
value: string;
|
|
570
|
+
description?: string;
|
|
571
|
+
method: 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
572
|
+
url: string;
|
|
573
|
+
body?: Record<string, unknown> | string;
|
|
574
|
+
headers?: Record<string, string>;
|
|
575
|
+
}
|
|
576
|
+
interface WorkflowToolResource {
|
|
577
|
+
name: string;
|
|
578
|
+
value: string;
|
|
579
|
+
description: string;
|
|
580
|
+
operations: WorkflowToolOperation[];
|
|
581
|
+
}
|
|
582
|
+
interface WorkflowTool {
|
|
583
|
+
id: string;
|
|
584
|
+
name: string;
|
|
585
|
+
description: string;
|
|
586
|
+
icon: string;
|
|
587
|
+
color: string;
|
|
588
|
+
category: 'ai' | 'communication' | 'email' | 'productivity' | 'database' | 'payments' | 'crm' | 'ecommerce' | 'developer' | 'storage' | 'analytics' | 'core';
|
|
589
|
+
configuration_required: boolean;
|
|
590
|
+
website?: string;
|
|
591
|
+
url_patterns: string[];
|
|
592
|
+
resources: WorkflowToolResource[];
|
|
593
|
+
triggers?: Array<{
|
|
594
|
+
name: string;
|
|
595
|
+
value: string;
|
|
596
|
+
description: string;
|
|
597
|
+
webhook_type: 'incoming' | 'polling';
|
|
598
|
+
}>;
|
|
599
|
+
}
|
|
600
|
+
interface EventScopeField {
|
|
601
|
+
field: string;
|
|
602
|
+
label: string;
|
|
603
|
+
placeholder: string;
|
|
604
|
+
}
|
|
605
|
+
interface EventMetadata {
|
|
606
|
+
event: string;
|
|
607
|
+
scopes: EventScopeField[];
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
interface LocationState {
|
|
611
|
+
code: string;
|
|
612
|
+
name: string;
|
|
613
|
+
}
|
|
614
|
+
interface LocationCountry {
|
|
615
|
+
code: string;
|
|
616
|
+
name: string;
|
|
617
|
+
states: LocationState[];
|
|
618
|
+
}
|
|
619
|
+
interface GetCountriesResponse {
|
|
620
|
+
items: LocationCountry[];
|
|
621
|
+
cursor: string | null;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
interface CartApi {
|
|
625
|
+
current(params?: GetCurrentCartParams, options?: RequestOptions): Promise<Cart>;
|
|
626
|
+
get(params: GetCartParams, options?: RequestOptions): Promise<Cart>;
|
|
627
|
+
update(params: UpdateCartParams, options?: RequestOptions): Promise<Cart>;
|
|
628
|
+
addItem(params: AddCartItemParams, options?: RequestOptions): Promise<Cart>;
|
|
629
|
+
removeItem(params: RemoveCartItemParams, options?: RequestOptions): Promise<Cart>;
|
|
630
|
+
clear(params: ClearCartParams, options?: RequestOptions): Promise<Cart>;
|
|
631
|
+
quote(params: QuoteCartParams, options?: RequestOptions): Promise<OrderQuote>;
|
|
632
|
+
checkout(params: CheckoutCartParams, options?: RequestOptions): Promise<OrderCheckoutResult>;
|
|
633
|
+
}
|
|
634
|
+
interface CartControllerState {
|
|
635
|
+
cart: Cart | null;
|
|
636
|
+
quote: OrderQuote | null;
|
|
637
|
+
checkoutResult: OrderCheckoutResult | null;
|
|
638
|
+
loading: boolean;
|
|
639
|
+
initialized: boolean;
|
|
640
|
+
error: unknown;
|
|
641
|
+
}
|
|
642
|
+
type CartControllerListener = (state: CartControllerState) => void;
|
|
643
|
+
type CartControllerInitParams = GetCurrentCartParams | GetCartParams;
|
|
644
|
+
type CartControllerRefreshParams = GetCurrentCartParams | GetCartParams;
|
|
645
|
+
type CartControllerUpdateParams = Omit<UpdateCartParams, "id"> & {
|
|
646
|
+
id?: string;
|
|
647
|
+
};
|
|
648
|
+
type CartControllerAddItemParams = Omit<AddCartItemParams, "id"> & {
|
|
649
|
+
id?: string;
|
|
650
|
+
};
|
|
651
|
+
type CartControllerRemoveItemParams = RemoveCartItemParams extends infer Params ? Params extends {
|
|
652
|
+
id: string;
|
|
653
|
+
} ? Omit<Params, "id"> & {
|
|
654
|
+
id?: string;
|
|
655
|
+
} : never : never;
|
|
656
|
+
type CartControllerClearParams = Omit<ClearCartParams, "id"> & {
|
|
657
|
+
id?: string;
|
|
658
|
+
};
|
|
659
|
+
type CartControllerQuoteParams = Omit<QuoteCartParams, "id"> & {
|
|
660
|
+
id?: string;
|
|
661
|
+
};
|
|
662
|
+
type CartControllerCheckoutParams = Omit<CheckoutCartParams, "id"> & {
|
|
663
|
+
id?: string;
|
|
664
|
+
};
|
|
665
|
+
interface CartController {
|
|
666
|
+
subscribe(listener: CartControllerListener): () => void;
|
|
667
|
+
getState(): CartControllerState;
|
|
668
|
+
init(params?: CartControllerInitParams, options?: RequestOptions): Promise<Cart>;
|
|
669
|
+
refresh(params?: CartControllerRefreshParams, options?: RequestOptions): Promise<Cart>;
|
|
670
|
+
addItem(params: CartControllerAddItemParams, options?: RequestOptions): Promise<Cart>;
|
|
671
|
+
update(params: CartControllerUpdateParams, options?: RequestOptions): Promise<Cart>;
|
|
672
|
+
removeItem(params: CartControllerRemoveItemParams, options?: RequestOptions): Promise<Cart>;
|
|
673
|
+
clear(params?: CartControllerClearParams, options?: RequestOptions): Promise<Cart>;
|
|
674
|
+
quote(params?: CartControllerQuoteParams, options?: RequestOptions): Promise<OrderQuote>;
|
|
675
|
+
checkout(params?: CartControllerCheckoutParams, options?: RequestOptions): Promise<OrderCheckoutResult>;
|
|
676
|
+
}
|
|
677
|
+
declare function createCartController(cartApi: CartApi): CartController;
|
|
678
|
+
|
|
679
|
+
type BlockContainer = {
|
|
680
|
+
blocks?: readonly Block[] | null;
|
|
681
|
+
};
|
|
682
|
+
type UnknownRecord = Record<string, unknown>;
|
|
683
|
+
declare function getBlockLabel(block: Pick<Block, "key"> | null | undefined): string;
|
|
684
|
+
declare function formatBlockValue(block: Block | null | undefined): string;
|
|
685
|
+
declare function prepareBlocksForSubmission(formData: Readonly<Record<string, unknown>>, blockTypes?: Readonly<Record<string, string>>): Array<{
|
|
686
|
+
key: string;
|
|
687
|
+
value: unknown;
|
|
688
|
+
}>;
|
|
689
|
+
declare function extractBlockValues(blocks: readonly Block[]): Record<string, unknown>;
|
|
690
|
+
declare function getBlockValue<T = unknown>(entry: BlockContainer | null | undefined, key: string): T | null;
|
|
691
|
+
declare function getBlockTextValue(block: Block | null | undefined, locale?: string): string;
|
|
692
|
+
declare function getBlockContentValue(entry: BlockContainer | null | undefined, key: string, locale?: string): unknown;
|
|
693
|
+
declare function getBlockValues<T = unknown>(entry: BlockContainer | null | undefined, key: string): T[];
|
|
694
|
+
declare function getBlockObjectValues(entry: BlockContainer | null | undefined, key: string, locale?: string): UnknownRecord[];
|
|
695
|
+
declare function getBlockFromArray(entry: BlockContainer | null | undefined, key: string, locale?: string): UnknownRecord;
|
|
696
|
+
|
|
697
|
+
interface ValidationResult {
|
|
698
|
+
isValid: boolean;
|
|
699
|
+
error?: string;
|
|
700
|
+
}
|
|
701
|
+
declare function validatePhoneNumber(phone: string): ValidationResult;
|
|
702
|
+
|
|
703
|
+
declare const tzGroups: {
|
|
704
|
+
label: string;
|
|
705
|
+
zones: {
|
|
706
|
+
label: string;
|
|
707
|
+
value: string;
|
|
708
|
+
}[];
|
|
709
|
+
}[];
|
|
710
|
+
declare function findTimeZone(groups: typeof tzGroups): string;
|
|
711
|
+
|
|
712
|
+
declare const locales: readonly ["en", "sr-latn"];
|
|
713
|
+
declare function slugify(text: string): string;
|
|
714
|
+
declare function humanize(text: string): string;
|
|
715
|
+
declare function categorify(text: string): string;
|
|
716
|
+
declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
|
|
717
|
+
|
|
718
|
+
declare function fetchSvgContent(mediaObject: unknown): Promise<string | null>;
|
|
719
|
+
declare function getSvgContentForAstro(mediaObject: unknown): Promise<string>;
|
|
720
|
+
declare function injectSvgIntoElement(mediaObject: unknown, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
721
|
+
|
|
722
|
+
interface StripeConfirmationTokenControllerConfig {
|
|
723
|
+
publishableKey: string;
|
|
724
|
+
connectedAccountId?: string;
|
|
725
|
+
amount: number;
|
|
726
|
+
currency: string;
|
|
727
|
+
appearance?: StripeElementsOptions["appearance"];
|
|
728
|
+
}
|
|
729
|
+
interface StripeConfirmationTokenOptions {
|
|
730
|
+
return_url?: string;
|
|
731
|
+
billing_details?: {
|
|
732
|
+
name?: string | null;
|
|
733
|
+
email?: string | null;
|
|
734
|
+
phone?: string | null;
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
interface StripeConfirmationTokenResult {
|
|
738
|
+
confirmation_token_id: string;
|
|
739
|
+
return_url?: string;
|
|
740
|
+
}
|
|
741
|
+
interface StripeConfirmationTokenController {
|
|
742
|
+
mount(target: string | HTMLElement): void;
|
|
743
|
+
update(input: {
|
|
744
|
+
amount?: number;
|
|
745
|
+
currency?: string;
|
|
746
|
+
}): void;
|
|
747
|
+
createConfirmationToken(options?: StripeConfirmationTokenOptions): Promise<StripeConfirmationTokenResult>;
|
|
748
|
+
handleNextAction(clientSecret: string): Promise<void>;
|
|
749
|
+
destroy(): void;
|
|
750
|
+
}
|
|
751
|
+
type StripeLoader = (publishableKey: string, options?: {
|
|
752
|
+
stripeAccount: string;
|
|
753
|
+
}) => PromiseLike<Stripe | null>;
|
|
754
|
+
declare function createStripeConfirmationTokenController(config: StripeConfirmationTokenControllerConfig, stripeLoader?: StripeLoader): Promise<StripeConfirmationTokenController>;
|
|
755
|
+
|
|
756
|
+
type StorefrontCart$1 = StorefrontDto<Cart>;
|
|
757
|
+
type StorefrontCollectionEntry$1 = StorefrontDto<CollectionEntry>;
|
|
758
|
+
type StorefrontForm$1 = StorefrontDto<Form>;
|
|
759
|
+
type StorefrontOrderCheckoutResult$1 = StorefrontDto<OrderCheckoutResult>;
|
|
760
|
+
type StorefrontOrderQuote$1 = StorefrontDto<OrderQuote>;
|
|
761
|
+
type StorefrontProduct$1 = StorefrontDto<Product>;
|
|
762
|
+
type StorefrontProvider$1 = StorefrontDto<Provider>;
|
|
763
|
+
type StorefrontService$1 = StorefrontDto<Service>;
|
|
764
|
+
type StorefrontServiceProvider = StorefrontDto<ServiceProvider>;
|
|
765
|
+
type ArkyPaymentController = StripeConfirmationTokenController;
|
|
766
|
+
type ArkyStripePaymentMountOptions = Partial<Pick<StripeConfirmationTokenControllerConfig, "amount" | "currency" | "appearance">>;
|
|
767
|
+
type ArkyStoreConfig = StorefrontOptions;
|
|
768
|
+
interface ArkyStoreContext {
|
|
769
|
+
locale?: string;
|
|
770
|
+
market?: string;
|
|
771
|
+
}
|
|
772
|
+
type ArkyCmsEntryParams = ArkyStoreContext & {
|
|
773
|
+
id?: string;
|
|
774
|
+
collection_id?: string;
|
|
775
|
+
key?: string;
|
|
776
|
+
};
|
|
777
|
+
interface ArkySubmitFormByKeyParams {
|
|
778
|
+
key: string;
|
|
779
|
+
values: FormValues;
|
|
780
|
+
}
|
|
781
|
+
interface ArkyServiceCartItem {
|
|
782
|
+
id: string;
|
|
783
|
+
service_id: string;
|
|
784
|
+
provider_id: string;
|
|
785
|
+
slots: SlotRange[];
|
|
786
|
+
forms: FormEntry[];
|
|
787
|
+
price?: Price;
|
|
788
|
+
service_name?: string;
|
|
789
|
+
provider_name?: string;
|
|
790
|
+
date_text?: string;
|
|
791
|
+
time_text?: string;
|
|
792
|
+
is_multi_day?: boolean;
|
|
793
|
+
}
|
|
794
|
+
interface ArkyCartSnapshot {
|
|
795
|
+
cart: StorefrontCart$1 | null;
|
|
796
|
+
product_items: EshopCartItem[];
|
|
797
|
+
service_items: ArkyServiceCartItem[];
|
|
798
|
+
item_count: number;
|
|
799
|
+
}
|
|
800
|
+
interface ArkyCartStatus {
|
|
801
|
+
loading: boolean;
|
|
802
|
+
syncing: boolean;
|
|
803
|
+
fetching_quote: boolean;
|
|
804
|
+
processing_checkout: boolean;
|
|
805
|
+
error: string | null;
|
|
806
|
+
quote_error: string | null;
|
|
807
|
+
selected_shipping_method_id: string | null;
|
|
808
|
+
user_token: string | null;
|
|
809
|
+
}
|
|
810
|
+
interface ArkyLastOrder {
|
|
811
|
+
order_id: string;
|
|
812
|
+
number: string;
|
|
813
|
+
payment_action: StorefrontOrderCheckoutResult$1["payment_action"];
|
|
814
|
+
payment: StorefrontOrderCheckoutResult$1["payment"];
|
|
815
|
+
product_items?: EshopCartItem[];
|
|
816
|
+
service_items?: ArkyServiceCartItem[];
|
|
817
|
+
shipping_address?: Address | null;
|
|
818
|
+
billing_address?: Address | null;
|
|
819
|
+
total?: number;
|
|
820
|
+
currency?: string | null;
|
|
821
|
+
payment_method_key?: string | null;
|
|
822
|
+
created_at: number;
|
|
823
|
+
}
|
|
824
|
+
interface ArkyCartInput {
|
|
825
|
+
product_items?: EshopCartItem[];
|
|
826
|
+
service_items?: ArkyServiceCartItem[];
|
|
827
|
+
shipping_address?: Address | null;
|
|
828
|
+
billing_address?: Address | null;
|
|
829
|
+
forms?: FormEntry[];
|
|
830
|
+
promo_code?: string | null;
|
|
831
|
+
payment_method_key?: string | null;
|
|
832
|
+
shipping_method_id?: string | null;
|
|
833
|
+
payment?: ArkyPaymentController | null;
|
|
834
|
+
return_url?: string;
|
|
835
|
+
billing_details?: {
|
|
836
|
+
name?: string | null;
|
|
837
|
+
email?: string | null;
|
|
838
|
+
phone?: string | null;
|
|
839
|
+
};
|
|
840
|
+
clear_after_checkout?: boolean;
|
|
841
|
+
}
|
|
842
|
+
interface ArkyCmsState {
|
|
843
|
+
entries: Record<string, StorefrontCollectionEntry$1>;
|
|
844
|
+
forms: Record<string, StorefrontForm$1>;
|
|
845
|
+
loading: boolean;
|
|
846
|
+
error: string | null;
|
|
847
|
+
}
|
|
848
|
+
interface ArkyEshopState {
|
|
849
|
+
products: StorefrontProduct$1[];
|
|
850
|
+
services: StorefrontService$1[];
|
|
851
|
+
providers: StorefrontProvider$1[];
|
|
852
|
+
product_cursor: string | null;
|
|
853
|
+
service_cursor: string | null;
|
|
854
|
+
provider_cursor: string | null;
|
|
855
|
+
availability: unknown | null;
|
|
856
|
+
loading_products: boolean;
|
|
857
|
+
loading_services: boolean;
|
|
858
|
+
loading_providers: boolean;
|
|
859
|
+
loading_availability: boolean;
|
|
860
|
+
error: string | null;
|
|
861
|
+
}
|
|
862
|
+
interface ArkyCalendarDay {
|
|
863
|
+
date: Date;
|
|
864
|
+
iso: string;
|
|
865
|
+
available: boolean;
|
|
866
|
+
isSelected: boolean;
|
|
867
|
+
isInRange: boolean;
|
|
868
|
+
isToday: boolean;
|
|
869
|
+
blank: boolean;
|
|
870
|
+
}
|
|
871
|
+
interface ArkyServiceSlot {
|
|
872
|
+
id: string;
|
|
873
|
+
serviceId: string;
|
|
874
|
+
providerId: string;
|
|
875
|
+
from: number;
|
|
876
|
+
to: number;
|
|
877
|
+
timeText: string;
|
|
878
|
+
dateText: string;
|
|
879
|
+
isMultiDay?: boolean;
|
|
880
|
+
serviceName?: string;
|
|
881
|
+
date?: string;
|
|
882
|
+
serviceBlocks?: Block[];
|
|
883
|
+
}
|
|
884
|
+
interface ArkyServiceFormGroup {
|
|
885
|
+
form: StorefrontForm$1;
|
|
886
|
+
blocks: Block[];
|
|
887
|
+
}
|
|
888
|
+
interface ArkyServiceFormState {
|
|
889
|
+
provider_id: string | null;
|
|
890
|
+
groups: ArkyServiceFormGroup[];
|
|
891
|
+
loading: boolean;
|
|
892
|
+
error: string | null;
|
|
893
|
+
}
|
|
894
|
+
interface ArkyServiceState {
|
|
895
|
+
service: StorefrontService$1 | null;
|
|
896
|
+
availability: AvailabilityResponse | null;
|
|
897
|
+
providers: StorefrontProvider$1[];
|
|
898
|
+
serviceProviders: StorefrontServiceProvider[];
|
|
899
|
+
selectedProviderId: string | null;
|
|
900
|
+
currentMonth: Date;
|
|
901
|
+
calendar: ArkyCalendarDay[];
|
|
902
|
+
selectedDate: string | null;
|
|
903
|
+
slots: ArkyServiceSlot[];
|
|
904
|
+
selectedSlot: ArkyServiceSlot | null;
|
|
905
|
+
timezone: string;
|
|
906
|
+
tzGroups: Record<string, {
|
|
907
|
+
zone: string;
|
|
908
|
+
name: string;
|
|
909
|
+
}[]>;
|
|
910
|
+
loading: boolean;
|
|
911
|
+
weekdays: string[];
|
|
912
|
+
quote: StorefrontOrderQuote$1 | null;
|
|
913
|
+
fetchingQuote: boolean;
|
|
914
|
+
quoteError: string | null;
|
|
915
|
+
currency: Currency | null;
|
|
916
|
+
dateTimeConfirmed: boolean;
|
|
917
|
+
availablePaymentMethods: PaymentMethod[];
|
|
918
|
+
cartId: string | null;
|
|
919
|
+
promoCode: string | null;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
declare function locationToAddress(location: ZoneLocation): Address;
|
|
923
|
+
declare function createFormEntry(formId: string, fields: FormField[]): FormEntry;
|
|
924
|
+
declare function toProductCheckoutItems(items: EshopCartItem[]): ProductCheckoutItemInput[];
|
|
925
|
+
declare function toServiceCheckoutItems(items: ArkyServiceCartItem[]): ServiceCheckoutItemInput[];
|
|
926
|
+
declare function buildFormFields(schema: FormSchema[], values: FormValues): FormField[];
|
|
927
|
+
declare function createFormEntryFromValues(form: Pick<Form, "id" | "schema">, values: FormValues): FormEntry;
|
|
928
|
+
|
|
929
|
+
type StorefrontParams<T> = T extends unknown ? Omit<T, "store_id" | "market"> : never;
|
|
930
|
+
type StorefrontCart = StorefrontDto<Cart>;
|
|
931
|
+
type StorefrontCollectionEntry = StorefrontDto<CollectionEntry>;
|
|
932
|
+
type StorefrontForm = StorefrontDto<Form>;
|
|
933
|
+
type StorefrontFormSubmission = StorefrontDto<FormSubmission>;
|
|
934
|
+
type StorefrontOrderCheckoutResult = StorefrontDto<OrderCheckoutResult>;
|
|
935
|
+
type StorefrontOrderQuote = StorefrontDto<OrderQuote>;
|
|
936
|
+
type StorefrontProduct = StorefrontDto<Product>;
|
|
937
|
+
type StorefrontProductVariant = StorefrontDto<ProductVariant>;
|
|
938
|
+
type StorefrontProvider = StorefrontDto<Provider>;
|
|
939
|
+
type StorefrontService = StorefrontDto<Service>;
|
|
940
|
+
type StorefrontPage<T> = StorefrontDto<PaginatedResponse<T>>;
|
|
941
|
+
declare function initializeStoreCore(publishableKey: string, config: ArkyStoreConfig, scopedClient?: ReturnType<typeof createStorefront>): {
|
|
942
|
+
client: StorefrontClient;
|
|
943
|
+
session: nanostores.PreinitializedWritableAtom<ContactSession | null> & object;
|
|
944
|
+
setup: nanostores.PreinitializedWritableAtom<StorefrontSetup | null> & object;
|
|
945
|
+
market: nanostores.ReadableAtom<StorefrontMarket | null>;
|
|
946
|
+
market_key: nanostores.PreinitializedWritableAtom<string> & object;
|
|
947
|
+
locale: nanostores.PreinitializedWritableAtom<string> & object;
|
|
948
|
+
currency: nanostores.ReadableAtom<Currency | null>;
|
|
949
|
+
allowed_payment_methods: nanostores.ReadableAtom<PaymentMethod[]>;
|
|
950
|
+
payment_config: nanostores.ReadableAtom<{
|
|
951
|
+
provider: PaymentStoreConfig | null;
|
|
952
|
+
enabled: boolean;
|
|
953
|
+
}>;
|
|
954
|
+
identify: (params?: {
|
|
955
|
+
email?: string;
|
|
956
|
+
verify?: boolean;
|
|
957
|
+
market?: string;
|
|
958
|
+
}) => Promise<StorefrontIdentifyResult>;
|
|
959
|
+
identifyContactEmailIfMissing: (email: string) => Promise<ContactSession>;
|
|
960
|
+
verify: (params: {
|
|
961
|
+
challenge_id: string;
|
|
962
|
+
code: string;
|
|
963
|
+
}) => Promise<StorefrontVerifyResult>;
|
|
964
|
+
me: () => Promise<StorefrontContact>;
|
|
965
|
+
logout: () => Promise<void>;
|
|
966
|
+
onAuthStateChanged: (listener: AuthStateListener<ContactSession>) => () => void;
|
|
967
|
+
readonly isAuthenticated: boolean;
|
|
968
|
+
setMarket: (key: string) => void;
|
|
969
|
+
setLocale: (value: string) => void;
|
|
970
|
+
setContext: (context: ArkyStoreContext) => void;
|
|
971
|
+
getMarket: () => string;
|
|
972
|
+
getLocale: () => string;
|
|
973
|
+
cms: {
|
|
974
|
+
state: nanostores.PreinitializedMapStore<ArkyCmsState> & object;
|
|
975
|
+
collection: {
|
|
976
|
+
get: (params: StorefrontParams<GetCollectionParams>, options?: RequestOptions) => Promise<{
|
|
977
|
+
id: string;
|
|
978
|
+
key: string;
|
|
979
|
+
schema: BlockSchema[];
|
|
980
|
+
blocks: Block[];
|
|
981
|
+
status: CollectionStatus;
|
|
982
|
+
created_at: number;
|
|
983
|
+
updated_at: number;
|
|
984
|
+
}>;
|
|
985
|
+
};
|
|
986
|
+
entry: {
|
|
987
|
+
get: (params: ArkyCmsEntryParams, options?: RequestOptions) => Promise<StorefrontCollectionEntry>;
|
|
988
|
+
find: (params: StorefrontParams<GetEntriesParams>, options?: RequestOptions) => Promise<{
|
|
989
|
+
items: {
|
|
990
|
+
id: string;
|
|
991
|
+
collection_id: string;
|
|
992
|
+
key: string;
|
|
993
|
+
slug: {
|
|
994
|
+
[x: string]: string;
|
|
995
|
+
};
|
|
996
|
+
blocks: Block[];
|
|
997
|
+
status: EntryStatus;
|
|
998
|
+
created_at: number;
|
|
999
|
+
updated_at: number;
|
|
1000
|
+
}[];
|
|
1001
|
+
cursor: string | null;
|
|
1002
|
+
}>;
|
|
1003
|
+
};
|
|
1004
|
+
form: {
|
|
1005
|
+
get: (params: StorefrontParams<GetFormParams>, options?: RequestOptions) => Promise<StorefrontForm>;
|
|
1006
|
+
submit: (params: StorefrontParams<SubmitFormParams>, options?: RequestOptions) => Promise<StorefrontFormSubmission>;
|
|
1007
|
+
submitByKey: (params: ArkySubmitFormByKeyParams, options?: RequestOptions) => Promise<StorefrontFormSubmission>;
|
|
1008
|
+
};
|
|
1009
|
+
taxonomy: {
|
|
1010
|
+
get(params: Omit<GetTaxonomyParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Taxonomy>>;
|
|
1011
|
+
getChildren(params: Omit<GetTaxonomyChildrenParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<Taxonomy>>>;
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
1014
|
+
eshop: {
|
|
1015
|
+
state: nanostores.PreinitializedMapStore<ArkyEshopState> & object;
|
|
1016
|
+
product: {
|
|
1017
|
+
get: (params: StorefrontParams<GetProductParams>, options?: RequestOptions) => Promise<{
|
|
1018
|
+
id: string;
|
|
1019
|
+
key: string;
|
|
1020
|
+
slug: {
|
|
1021
|
+
[x: string]: string;
|
|
1022
|
+
};
|
|
1023
|
+
blocks: Block[];
|
|
1024
|
+
taxonomies: {
|
|
1025
|
+
taxonomy_id: string;
|
|
1026
|
+
fields: TaxonomyField[];
|
|
1027
|
+
}[];
|
|
1028
|
+
variants: {
|
|
1029
|
+
id: string;
|
|
1030
|
+
sku?: string | undefined;
|
|
1031
|
+
prices: {
|
|
1032
|
+
currency: Currency;
|
|
1033
|
+
market: string;
|
|
1034
|
+
amount: number;
|
|
1035
|
+
compare_at?: number | undefined;
|
|
1036
|
+
contact_list_id?: string | undefined;
|
|
1037
|
+
}[];
|
|
1038
|
+
inventory: {
|
|
1039
|
+
id: string;
|
|
1040
|
+
product_id: string;
|
|
1041
|
+
variant_id: string;
|
|
1042
|
+
location_id: string;
|
|
1043
|
+
available: number;
|
|
1044
|
+
reserved: number;
|
|
1045
|
+
updated_at: number;
|
|
1046
|
+
}[];
|
|
1047
|
+
attributes: Block[];
|
|
1048
|
+
requires_shipping: boolean;
|
|
1049
|
+
digital_delivery_policy: DigitalDeliveryPolicy;
|
|
1050
|
+
digital_assets: {
|
|
1051
|
+
id: string;
|
|
1052
|
+
name: string;
|
|
1053
|
+
type: DigitalAssetType;
|
|
1054
|
+
storage_ref?: string | null | undefined;
|
|
1055
|
+
external_url?: string | null | undefined;
|
|
1056
|
+
status: DigitalAssetStatus;
|
|
1057
|
+
}[];
|
|
1058
|
+
download_limit?: number | null | undefined;
|
|
1059
|
+
access_expires_after_days?: number | null | undefined;
|
|
1060
|
+
tax_category_id?: string | null | undefined;
|
|
1061
|
+
weight?: number | undefined;
|
|
1062
|
+
}[];
|
|
1063
|
+
status: ProductStatus;
|
|
1064
|
+
created_at: number;
|
|
1065
|
+
updated_at: number;
|
|
1066
|
+
}>;
|
|
1067
|
+
list: (params?: StorefrontParams<GetProductsParams>, options?: RequestOptions) => Promise<StorefrontPage<Product>>;
|
|
1068
|
+
};
|
|
1069
|
+
service: {
|
|
1070
|
+
get: (params: StorefrontParams<GetServiceParams>, options?: RequestOptions) => Promise<{
|
|
1071
|
+
id: string;
|
|
1072
|
+
key: string;
|
|
1073
|
+
slug: {
|
|
1074
|
+
[x: string]: string;
|
|
1075
|
+
};
|
|
1076
|
+
blocks: Block[];
|
|
1077
|
+
taxonomies: {
|
|
1078
|
+
taxonomy_id: string;
|
|
1079
|
+
fields: TaxonomyField[];
|
|
1080
|
+
}[];
|
|
1081
|
+
created_at: number;
|
|
1082
|
+
updated_at: number;
|
|
1083
|
+
status: ServiceStatus;
|
|
1084
|
+
}>;
|
|
1085
|
+
list: (params?: StorefrontParams<GetServicesParams>, options?: RequestOptions) => Promise<StorefrontPage<Service>>;
|
|
1086
|
+
listProviders: (params: StorefrontParams<FindServiceProvidersParams>, options?: RequestOptions) => Promise<{
|
|
1087
|
+
id: string;
|
|
1088
|
+
service_id: string;
|
|
1089
|
+
provider_id: string;
|
|
1090
|
+
working_days: {
|
|
1091
|
+
day: string;
|
|
1092
|
+
working_hours: {
|
|
1093
|
+
from: number;
|
|
1094
|
+
to: number;
|
|
1095
|
+
}[];
|
|
1096
|
+
}[];
|
|
1097
|
+
specific_dates: {
|
|
1098
|
+
date: number;
|
|
1099
|
+
working_hours: {
|
|
1100
|
+
from: number;
|
|
1101
|
+
to: number;
|
|
1102
|
+
}[];
|
|
1103
|
+
}[];
|
|
1104
|
+
prices: {
|
|
1105
|
+
currency: Currency;
|
|
1106
|
+
market: string;
|
|
1107
|
+
amount: number;
|
|
1108
|
+
compare_at?: number | undefined;
|
|
1109
|
+
contact_list_id?: string | undefined;
|
|
1110
|
+
}[];
|
|
1111
|
+
durations: {
|
|
1112
|
+
duration: number;
|
|
1113
|
+
is_pause: boolean;
|
|
1114
|
+
}[];
|
|
1115
|
+
slot_interval: number;
|
|
1116
|
+
forms: {
|
|
1117
|
+
form_id: string;
|
|
1118
|
+
fields: FormField[];
|
|
1119
|
+
}[];
|
|
1120
|
+
reminders: number[];
|
|
1121
|
+
min_advance: number;
|
|
1122
|
+
max_advance: number;
|
|
1123
|
+
created_at: number;
|
|
1124
|
+
updated_at: number;
|
|
1125
|
+
}[]>;
|
|
1126
|
+
getAvailability: (params: StorefrontParams<GetAvailabilityParams>, options?: RequestOptions) => Promise<AvailabilityResponse>;
|
|
1127
|
+
state: nanostores.PreinitializedMapStore<ArkyServiceState> & object;
|
|
1128
|
+
form_state: nanostores.PreinitializedMapStore<ArkyServiceFormState> & object;
|
|
1129
|
+
form_groups: nanostores.ReadableAtom<ArkyServiceFormGroup[]>;
|
|
1130
|
+
form_blocks: nanostores.ReadableAtom<Block[]>;
|
|
1131
|
+
current_step_name: nanostores.ReadableAtom<string>;
|
|
1132
|
+
can_proceed: nanostores.ReadableAtom<boolean>;
|
|
1133
|
+
month_year: nanostores.ReadableAtom<string>;
|
|
1134
|
+
chain_start: nanostores.ReadableAtom<number | null>;
|
|
1135
|
+
total_steps: nanostores.ReadableAtom<0 | 2>;
|
|
1136
|
+
steps: nanostores.ReadableAtom<{
|
|
1137
|
+
1: {
|
|
1138
|
+
name: string;
|
|
1139
|
+
};
|
|
1140
|
+
2: {
|
|
1141
|
+
name: string;
|
|
1142
|
+
};
|
|
1143
|
+
}>;
|
|
1144
|
+
current_step: nanostores.ReadableAtom<number>;
|
|
1145
|
+
initialize: () => Promise<void>;
|
|
1146
|
+
select: (service: StorefrontService) => Promise<void>;
|
|
1147
|
+
setTimezone: (tz: string) => void;
|
|
1148
|
+
loadMonth: () => Promise<void>;
|
|
1149
|
+
prevMonth: () => void;
|
|
1150
|
+
nextMonth: () => void;
|
|
1151
|
+
selectProvider: (providerId: string | null) => void;
|
|
1152
|
+
selectDate: (cell: ArkyCalendarDay) => void;
|
|
1153
|
+
selectTimeSlot: (slot: ArkyServiceSlot | null) => void;
|
|
1154
|
+
resetDateSelection: () => void;
|
|
1155
|
+
updateCalendar: () => void;
|
|
1156
|
+
findFirstAvailable: () => void;
|
|
1157
|
+
addToCart: (explicitSlots?: ArkyServiceSlot[]) => Promise<void>;
|
|
1158
|
+
removeFromCart: (bookingId: string) => Promise<void>;
|
|
1159
|
+
clearCart: () => Promise<void>;
|
|
1160
|
+
getProvidersList: () => StorefrontProvider[];
|
|
1161
|
+
prevStep: () => void;
|
|
1162
|
+
nextStep: () => void;
|
|
1163
|
+
getServicePrice: () => string;
|
|
1164
|
+
formatDateDisplay: (value: string | null) => string;
|
|
1165
|
+
serviceItemsFromSlots: (slots: ArkyServiceSlot[], forms?: FormEntry[]) => ArkyServiceCartItem[];
|
|
1166
|
+
};
|
|
1167
|
+
provider: {
|
|
1168
|
+
get: (params: StorefrontParams<GetProviderParams>, options?: RequestOptions) => Promise<{
|
|
1169
|
+
id: string;
|
|
1170
|
+
key: string;
|
|
1171
|
+
slug: {
|
|
1172
|
+
[x: string]: string;
|
|
1173
|
+
};
|
|
1174
|
+
status: ProviderStatus;
|
|
1175
|
+
blocks: Block[];
|
|
1176
|
+
taxonomies: {
|
|
1177
|
+
taxonomy_id: string;
|
|
1178
|
+
fields: TaxonomyField[];
|
|
1179
|
+
}[];
|
|
1180
|
+
timeline: {
|
|
1181
|
+
timestamp: number;
|
|
1182
|
+
booked: number;
|
|
1183
|
+
}[];
|
|
1184
|
+
created_at: number;
|
|
1185
|
+
updated_at: number;
|
|
1186
|
+
}>;
|
|
1187
|
+
list: (params?: StorefrontParams<GetProvidersParams>, options?: RequestOptions) => Promise<StorefrontPage<Provider>>;
|
|
1188
|
+
};
|
|
1189
|
+
order: {
|
|
1190
|
+
get(params: Omit<GetOrderParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Order>>;
|
|
1191
|
+
find(params: Omit<GetOrdersParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<Order>>>;
|
|
1192
|
+
downloadDigitalAccess(params: Omit<GetDigitalAccessGrantParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<DigitalAccessDownloadResponse>>;
|
|
1193
|
+
findDigitalAccess(params: Omit<FindDigitalAccessGrantsParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<DigitalAccessGrant>>>;
|
|
1194
|
+
getDigitalAccess(params: Omit<GetDigitalAccessGrantParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<DigitalAccessGrant>>;
|
|
1195
|
+
};
|
|
1196
|
+
cart: {
|
|
1197
|
+
cart: nanostores.PreinitializedWritableAtom<{
|
|
1198
|
+
id: string;
|
|
1199
|
+
contact_id: string;
|
|
1200
|
+
token: string;
|
|
1201
|
+
status: CartStatus;
|
|
1202
|
+
origin: CartOrigin;
|
|
1203
|
+
created_by_account_id?: string | null | undefined;
|
|
1204
|
+
market: string;
|
|
1205
|
+
items: ({
|
|
1206
|
+
type: "product";
|
|
1207
|
+
id?: string | undefined;
|
|
1208
|
+
product_id: string;
|
|
1209
|
+
variant_id: string;
|
|
1210
|
+
quantity: number;
|
|
1211
|
+
} | {
|
|
1212
|
+
type: "service";
|
|
1213
|
+
id?: string | undefined;
|
|
1214
|
+
service_id: string;
|
|
1215
|
+
provider_id: string;
|
|
1216
|
+
slots: {
|
|
1217
|
+
from: number;
|
|
1218
|
+
to: number;
|
|
1219
|
+
}[];
|
|
1220
|
+
forms?: {
|
|
1221
|
+
form_id: string;
|
|
1222
|
+
fields: FormField[];
|
|
1223
|
+
}[] | undefined;
|
|
1224
|
+
})[];
|
|
1225
|
+
shipping_address?: {
|
|
1226
|
+
name?: string | null | undefined;
|
|
1227
|
+
company?: string | null | undefined;
|
|
1228
|
+
street1?: string | null | undefined;
|
|
1229
|
+
street2?: string | null | undefined;
|
|
1230
|
+
city?: string | null | undefined;
|
|
1231
|
+
state?: string | null | undefined;
|
|
1232
|
+
postal_code?: string | null | undefined;
|
|
1233
|
+
country?: string | null | undefined;
|
|
1234
|
+
phone?: string | null | undefined;
|
|
1235
|
+
email?: string | null | undefined;
|
|
1236
|
+
} | null | undefined;
|
|
1237
|
+
billing_address?: {
|
|
1238
|
+
name?: string | null | undefined;
|
|
1239
|
+
company?: string | null | undefined;
|
|
1240
|
+
street1?: string | null | undefined;
|
|
1241
|
+
street2?: string | null | undefined;
|
|
1242
|
+
city?: string | null | undefined;
|
|
1243
|
+
state?: string | null | undefined;
|
|
1244
|
+
postal_code?: string | null | undefined;
|
|
1245
|
+
country?: string | null | undefined;
|
|
1246
|
+
phone?: string | null | undefined;
|
|
1247
|
+
email?: string | null | undefined;
|
|
1248
|
+
} | null | undefined;
|
|
1249
|
+
forms: {
|
|
1250
|
+
form_id: string;
|
|
1251
|
+
fields: FormField[];
|
|
1252
|
+
}[];
|
|
1253
|
+
promo_code?: string | null | undefined;
|
|
1254
|
+
payment_method_key?: string | null | undefined;
|
|
1255
|
+
shipping_method_id?: string | null | undefined;
|
|
1256
|
+
quote_snapshot?: {
|
|
1257
|
+
id?: string | undefined;
|
|
1258
|
+
expires_at?: number | undefined;
|
|
1259
|
+
market: string;
|
|
1260
|
+
zone: {
|
|
1261
|
+
id: string;
|
|
1262
|
+
market_id: string;
|
|
1263
|
+
countries: string[];
|
|
1264
|
+
states: string[];
|
|
1265
|
+
postal_codes: string[];
|
|
1266
|
+
tax_bps: number;
|
|
1267
|
+
shipping_methods: {
|
|
1268
|
+
id: string;
|
|
1269
|
+
taxable: boolean;
|
|
1270
|
+
eta_text: string;
|
|
1271
|
+
location_id?: string | undefined;
|
|
1272
|
+
amount: number;
|
|
1273
|
+
free_above?: number | undefined;
|
|
1274
|
+
weight_tiers?: {
|
|
1275
|
+
up_to_grams: number;
|
|
1276
|
+
amount: number;
|
|
1277
|
+
}[] | undefined;
|
|
1278
|
+
}[];
|
|
1279
|
+
} | null;
|
|
1280
|
+
items: ({
|
|
1281
|
+
type: "product";
|
|
1282
|
+
line_id: string;
|
|
1283
|
+
product_id: string;
|
|
1284
|
+
variant_id: string;
|
|
1285
|
+
quantity: number;
|
|
1286
|
+
unit_price: number;
|
|
1287
|
+
subtotal: number;
|
|
1288
|
+
discount: number;
|
|
1289
|
+
tax: number;
|
|
1290
|
+
total: number;
|
|
1291
|
+
money: {
|
|
1292
|
+
unit_price: number;
|
|
1293
|
+
subtotal: number;
|
|
1294
|
+
discount_allocations: {
|
|
1295
|
+
discount_application_id?: string | null | undefined;
|
|
1296
|
+
amount: number;
|
|
1297
|
+
}[];
|
|
1298
|
+
discount_total: number;
|
|
1299
|
+
taxable_base: number;
|
|
1300
|
+
tax_lines: {
|
|
1301
|
+
id: string;
|
|
1302
|
+
title: string;
|
|
1303
|
+
rate_bps: number;
|
|
1304
|
+
amount: number;
|
|
1305
|
+
taxable_base: number;
|
|
1306
|
+
included_in_price: boolean;
|
|
1307
|
+
jurisdiction_country?: string | null | undefined;
|
|
1308
|
+
jurisdiction_region?: string | null | undefined;
|
|
1309
|
+
jurisdiction_city?: string | null | undefined;
|
|
1310
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
1311
|
+
tax_category_id?: string | null | undefined;
|
|
1312
|
+
tax_rate_id?: string | null | undefined;
|
|
1313
|
+
source: string;
|
|
1314
|
+
provider_tax_id?: string | null | undefined;
|
|
1315
|
+
provider_tax_line_id?: string | null | undefined;
|
|
1316
|
+
}[];
|
|
1317
|
+
tax_total: number;
|
|
1318
|
+
total: number;
|
|
1319
|
+
};
|
|
1320
|
+
snapshot: {
|
|
1321
|
+
product_key: string;
|
|
1322
|
+
variant_sku?: string | undefined;
|
|
1323
|
+
variant_attributes: {
|
|
1324
|
+
id: string;
|
|
1325
|
+
key: string;
|
|
1326
|
+
type: string;
|
|
1327
|
+
properties?: any;
|
|
1328
|
+
value?: any;
|
|
1329
|
+
}[];
|
|
1330
|
+
requires_shipping: boolean;
|
|
1331
|
+
tax_category_id?: string | null | undefined;
|
|
1332
|
+
price: {
|
|
1333
|
+
currency: Currency;
|
|
1334
|
+
market: string;
|
|
1335
|
+
amount: number;
|
|
1336
|
+
compare_at?: number | undefined;
|
|
1337
|
+
contact_list_id?: string | undefined;
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
availability: {
|
|
1341
|
+
ok: true;
|
|
1342
|
+
available?: number | undefined;
|
|
1343
|
+
} | {
|
|
1344
|
+
ok: false;
|
|
1345
|
+
reason: string;
|
|
1346
|
+
};
|
|
1347
|
+
} | {
|
|
1348
|
+
type: "service";
|
|
1349
|
+
line_id: string;
|
|
1350
|
+
service_id: string;
|
|
1351
|
+
provider_id: string;
|
|
1352
|
+
from: number;
|
|
1353
|
+
to: number;
|
|
1354
|
+
quantity: 1;
|
|
1355
|
+
unit_price: number;
|
|
1356
|
+
subtotal: number;
|
|
1357
|
+
discount: number;
|
|
1358
|
+
tax: number;
|
|
1359
|
+
total: number;
|
|
1360
|
+
money: {
|
|
1361
|
+
unit_price: number;
|
|
1362
|
+
subtotal: number;
|
|
1363
|
+
discount_allocations: {
|
|
1364
|
+
discount_application_id?: string | null | undefined;
|
|
1365
|
+
amount: number;
|
|
1366
|
+
}[];
|
|
1367
|
+
discount_total: number;
|
|
1368
|
+
taxable_base: number;
|
|
1369
|
+
tax_lines: {
|
|
1370
|
+
id: string;
|
|
1371
|
+
title: string;
|
|
1372
|
+
rate_bps: number;
|
|
1373
|
+
amount: number;
|
|
1374
|
+
taxable_base: number;
|
|
1375
|
+
included_in_price: boolean;
|
|
1376
|
+
jurisdiction_country?: string | null | undefined;
|
|
1377
|
+
jurisdiction_region?: string | null | undefined;
|
|
1378
|
+
jurisdiction_city?: string | null | undefined;
|
|
1379
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
1380
|
+
tax_category_id?: string | null | undefined;
|
|
1381
|
+
tax_rate_id?: string | null | undefined;
|
|
1382
|
+
source: string;
|
|
1383
|
+
provider_tax_id?: string | null | undefined;
|
|
1384
|
+
provider_tax_line_id?: string | null | undefined;
|
|
1385
|
+
}[];
|
|
1386
|
+
tax_total: number;
|
|
1387
|
+
total: number;
|
|
1388
|
+
};
|
|
1389
|
+
snapshot: {
|
|
1390
|
+
service_key: string;
|
|
1391
|
+
provider_key: string;
|
|
1392
|
+
tax_category_id?: string | null | undefined;
|
|
1393
|
+
price: {
|
|
1394
|
+
currency: Currency;
|
|
1395
|
+
market: string;
|
|
1396
|
+
amount: number;
|
|
1397
|
+
compare_at?: number | undefined;
|
|
1398
|
+
contact_list_id?: string | undefined;
|
|
1399
|
+
};
|
|
1400
|
+
};
|
|
1401
|
+
availability: {
|
|
1402
|
+
ok: true;
|
|
1403
|
+
spots: number;
|
|
1404
|
+
} | {
|
|
1405
|
+
ok: false;
|
|
1406
|
+
reason: string;
|
|
1407
|
+
};
|
|
1408
|
+
})[];
|
|
1409
|
+
shipping_lines: {
|
|
1410
|
+
id: string;
|
|
1411
|
+
shipping_method_id?: string | null | undefined;
|
|
1412
|
+
title: string;
|
|
1413
|
+
code?: string | null | undefined;
|
|
1414
|
+
source: string;
|
|
1415
|
+
carrier_identifier?: string | null | undefined;
|
|
1416
|
+
money: {
|
|
1417
|
+
unit_price: number;
|
|
1418
|
+
subtotal: number;
|
|
1419
|
+
discount_allocations: {
|
|
1420
|
+
discount_application_id?: string | null | undefined;
|
|
1421
|
+
amount: number;
|
|
1422
|
+
}[];
|
|
1423
|
+
discount_total: number;
|
|
1424
|
+
taxable_base: number;
|
|
1425
|
+
tax_lines: {
|
|
1426
|
+
id: string;
|
|
1427
|
+
title: string;
|
|
1428
|
+
rate_bps: number;
|
|
1429
|
+
amount: number;
|
|
1430
|
+
taxable_base: number;
|
|
1431
|
+
included_in_price: boolean;
|
|
1432
|
+
jurisdiction_country?: string | null | undefined;
|
|
1433
|
+
jurisdiction_region?: string | null | undefined;
|
|
1434
|
+
jurisdiction_city?: string | null | undefined;
|
|
1435
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
1436
|
+
tax_category_id?: string | null | undefined;
|
|
1437
|
+
tax_rate_id?: string | null | undefined;
|
|
1438
|
+
source: string;
|
|
1439
|
+
provider_tax_id?: string | null | undefined;
|
|
1440
|
+
provider_tax_line_id?: string | null | undefined;
|
|
1441
|
+
}[];
|
|
1442
|
+
tax_total: number;
|
|
1443
|
+
total: number;
|
|
1444
|
+
};
|
|
1445
|
+
created_at: number;
|
|
1446
|
+
updated_at: number;
|
|
1447
|
+
}[];
|
|
1448
|
+
subtotal: number;
|
|
1449
|
+
shipping: number;
|
|
1450
|
+
discount: number;
|
|
1451
|
+
tax: number;
|
|
1452
|
+
total: number;
|
|
1453
|
+
shipping_method: {
|
|
1454
|
+
id: string;
|
|
1455
|
+
taxable: boolean;
|
|
1456
|
+
eta_text: string;
|
|
1457
|
+
location_id?: string | undefined;
|
|
1458
|
+
amount: number;
|
|
1459
|
+
free_above?: number | undefined;
|
|
1460
|
+
weight_tiers?: {
|
|
1461
|
+
up_to_grams: number;
|
|
1462
|
+
amount: number;
|
|
1463
|
+
}[] | undefined;
|
|
1464
|
+
} | null;
|
|
1465
|
+
payment_method: {
|
|
1466
|
+
type: "cash";
|
|
1467
|
+
id: string;
|
|
1468
|
+
key: string;
|
|
1469
|
+
} | {
|
|
1470
|
+
type: "credit_card";
|
|
1471
|
+
id: string;
|
|
1472
|
+
key: string;
|
|
1473
|
+
payment_provider_id: string;
|
|
1474
|
+
} | null;
|
|
1475
|
+
payment_methods: ({
|
|
1476
|
+
type: "cash";
|
|
1477
|
+
id: string;
|
|
1478
|
+
key: string;
|
|
1479
|
+
} | {
|
|
1480
|
+
type: "credit_card";
|
|
1481
|
+
id: string;
|
|
1482
|
+
key: string;
|
|
1483
|
+
payment_provider_id: string;
|
|
1484
|
+
})[];
|
|
1485
|
+
promo_code: {
|
|
1486
|
+
promo_code_id: string;
|
|
1487
|
+
code: string;
|
|
1488
|
+
discounts: ({
|
|
1489
|
+
type: "items_percentage";
|
|
1490
|
+
market_id: string;
|
|
1491
|
+
bps: number;
|
|
1492
|
+
} | {
|
|
1493
|
+
type: "items_fixed";
|
|
1494
|
+
market_id: string;
|
|
1495
|
+
amount: number;
|
|
1496
|
+
} | {
|
|
1497
|
+
type: "shipping_percentage";
|
|
1498
|
+
market_id: string;
|
|
1499
|
+
bps: number;
|
|
1500
|
+
})[];
|
|
1501
|
+
conditions: {
|
|
1502
|
+
type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
|
|
1503
|
+
value: ConditionValue;
|
|
1504
|
+
}[];
|
|
1505
|
+
} | null;
|
|
1506
|
+
money: {
|
|
1507
|
+
currency: Currency;
|
|
1508
|
+
market: string;
|
|
1509
|
+
subtotal: number;
|
|
1510
|
+
shipping: number;
|
|
1511
|
+
discount: number;
|
|
1512
|
+
total: number;
|
|
1513
|
+
tax?: {
|
|
1514
|
+
amount: number;
|
|
1515
|
+
mode_snapshot?: string | undefined;
|
|
1516
|
+
rate_bps: number;
|
|
1517
|
+
lines: {
|
|
1518
|
+
rate_bps: number;
|
|
1519
|
+
amount: number;
|
|
1520
|
+
label?: string | undefined;
|
|
1521
|
+
scope?: string | undefined;
|
|
1522
|
+
}[];
|
|
1523
|
+
} | null | undefined;
|
|
1524
|
+
promo_code?: {
|
|
1525
|
+
id: string;
|
|
1526
|
+
code: string;
|
|
1527
|
+
type: string;
|
|
1528
|
+
value: number;
|
|
1529
|
+
} | null | undefined;
|
|
1530
|
+
zone_id?: string | null | undefined;
|
|
1531
|
+
payment_method_key?: string | null | undefined;
|
|
1532
|
+
shipping_method_id?: string | null | undefined;
|
|
1533
|
+
method_type: PaymentMethodType;
|
|
1534
|
+
};
|
|
1535
|
+
charge_amount: number;
|
|
1536
|
+
} | null | undefined;
|
|
1537
|
+
converted_order_id?: string | null | undefined;
|
|
1538
|
+
item_count: number;
|
|
1539
|
+
last_action_at: number;
|
|
1540
|
+
abandoned_at?: number | null | undefined;
|
|
1541
|
+
recovery_sent_at?: number | null | undefined;
|
|
1542
|
+
created_at: number;
|
|
1543
|
+
updated_at: number;
|
|
1544
|
+
} | null> & object;
|
|
1545
|
+
product_items: nanostores.PreinitializedWritableAtom<EshopCartItem[]> & object;
|
|
1546
|
+
service_items: nanostores.PreinitializedWritableAtom<ArkyServiceCartItem[]> & object;
|
|
1547
|
+
quote_result: nanostores.PreinitializedWritableAtom<{
|
|
1548
|
+
id?: string | undefined;
|
|
1549
|
+
expires_at?: number | undefined;
|
|
1550
|
+
market: string;
|
|
1551
|
+
zone: {
|
|
1552
|
+
id: string;
|
|
1553
|
+
market_id: string;
|
|
1554
|
+
countries: string[];
|
|
1555
|
+
states: string[];
|
|
1556
|
+
postal_codes: string[];
|
|
1557
|
+
tax_bps: number;
|
|
1558
|
+
shipping_methods: {
|
|
1559
|
+
id: string;
|
|
1560
|
+
taxable: boolean;
|
|
1561
|
+
eta_text: string;
|
|
1562
|
+
location_id?: string | undefined;
|
|
1563
|
+
amount: number;
|
|
1564
|
+
free_above?: number | undefined;
|
|
1565
|
+
weight_tiers?: {
|
|
1566
|
+
up_to_grams: number;
|
|
1567
|
+
amount: number;
|
|
1568
|
+
}[] | undefined;
|
|
1569
|
+
}[];
|
|
1570
|
+
} | null;
|
|
1571
|
+
items: ({
|
|
1572
|
+
type: "product";
|
|
1573
|
+
line_id: string;
|
|
1574
|
+
product_id: string;
|
|
1575
|
+
variant_id: string;
|
|
1576
|
+
quantity: number;
|
|
1577
|
+
unit_price: number;
|
|
1578
|
+
subtotal: number;
|
|
1579
|
+
discount: number;
|
|
1580
|
+
tax: number;
|
|
1581
|
+
total: number;
|
|
1582
|
+
money: {
|
|
1583
|
+
unit_price: number;
|
|
1584
|
+
subtotal: number;
|
|
1585
|
+
discount_allocations: {
|
|
1586
|
+
discount_application_id?: string | null | undefined;
|
|
1587
|
+
amount: number;
|
|
1588
|
+
}[];
|
|
1589
|
+
discount_total: number;
|
|
1590
|
+
taxable_base: number;
|
|
1591
|
+
tax_lines: {
|
|
1592
|
+
id: string;
|
|
1593
|
+
title: string;
|
|
1594
|
+
rate_bps: number;
|
|
1595
|
+
amount: number;
|
|
1596
|
+
taxable_base: number;
|
|
1597
|
+
included_in_price: boolean;
|
|
1598
|
+
jurisdiction_country?: string | null | undefined;
|
|
1599
|
+
jurisdiction_region?: string | null | undefined;
|
|
1600
|
+
jurisdiction_city?: string | null | undefined;
|
|
1601
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
1602
|
+
tax_category_id?: string | null | undefined;
|
|
1603
|
+
tax_rate_id?: string | null | undefined;
|
|
1604
|
+
source: string;
|
|
1605
|
+
provider_tax_id?: string | null | undefined;
|
|
1606
|
+
provider_tax_line_id?: string | null | undefined;
|
|
1607
|
+
}[];
|
|
1608
|
+
tax_total: number;
|
|
1609
|
+
total: number;
|
|
1610
|
+
};
|
|
1611
|
+
snapshot: {
|
|
1612
|
+
product_key: string;
|
|
1613
|
+
variant_sku?: string | undefined;
|
|
1614
|
+
variant_attributes: {
|
|
1615
|
+
id: string;
|
|
1616
|
+
key: string;
|
|
1617
|
+
type: string;
|
|
1618
|
+
properties?: any;
|
|
1619
|
+
value?: any;
|
|
1620
|
+
}[];
|
|
1621
|
+
requires_shipping: boolean;
|
|
1622
|
+
tax_category_id?: string | null | undefined;
|
|
1623
|
+
price: {
|
|
1624
|
+
currency: Currency;
|
|
1625
|
+
market: string;
|
|
1626
|
+
amount: number;
|
|
1627
|
+
compare_at?: number | undefined;
|
|
1628
|
+
contact_list_id?: string | undefined;
|
|
1629
|
+
};
|
|
1630
|
+
};
|
|
1631
|
+
availability: {
|
|
1632
|
+
ok: true;
|
|
1633
|
+
available?: number | undefined;
|
|
1634
|
+
} | {
|
|
1635
|
+
ok: false;
|
|
1636
|
+
reason: string;
|
|
1637
|
+
};
|
|
1638
|
+
} | {
|
|
1639
|
+
type: "service";
|
|
1640
|
+
line_id: string;
|
|
1641
|
+
service_id: string;
|
|
1642
|
+
provider_id: string;
|
|
1643
|
+
from: number;
|
|
1644
|
+
to: number;
|
|
1645
|
+
quantity: 1;
|
|
1646
|
+
unit_price: number;
|
|
1647
|
+
subtotal: number;
|
|
1648
|
+
discount: number;
|
|
1649
|
+
tax: number;
|
|
1650
|
+
total: number;
|
|
1651
|
+
money: {
|
|
1652
|
+
unit_price: number;
|
|
1653
|
+
subtotal: number;
|
|
1654
|
+
discount_allocations: {
|
|
1655
|
+
discount_application_id?: string | null | undefined;
|
|
1656
|
+
amount: number;
|
|
1657
|
+
}[];
|
|
1658
|
+
discount_total: number;
|
|
1659
|
+
taxable_base: number;
|
|
1660
|
+
tax_lines: {
|
|
1661
|
+
id: string;
|
|
1662
|
+
title: string;
|
|
1663
|
+
rate_bps: number;
|
|
1664
|
+
amount: number;
|
|
1665
|
+
taxable_base: number;
|
|
1666
|
+
included_in_price: boolean;
|
|
1667
|
+
jurisdiction_country?: string | null | undefined;
|
|
1668
|
+
jurisdiction_region?: string | null | undefined;
|
|
1669
|
+
jurisdiction_city?: string | null | undefined;
|
|
1670
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
1671
|
+
tax_category_id?: string | null | undefined;
|
|
1672
|
+
tax_rate_id?: string | null | undefined;
|
|
1673
|
+
source: string;
|
|
1674
|
+
provider_tax_id?: string | null | undefined;
|
|
1675
|
+
provider_tax_line_id?: string | null | undefined;
|
|
1676
|
+
}[];
|
|
1677
|
+
tax_total: number;
|
|
1678
|
+
total: number;
|
|
1679
|
+
};
|
|
1680
|
+
snapshot: {
|
|
1681
|
+
service_key: string;
|
|
1682
|
+
provider_key: string;
|
|
1683
|
+
tax_category_id?: string | null | undefined;
|
|
1684
|
+
price: {
|
|
1685
|
+
currency: Currency;
|
|
1686
|
+
market: string;
|
|
1687
|
+
amount: number;
|
|
1688
|
+
compare_at?: number | undefined;
|
|
1689
|
+
contact_list_id?: string | undefined;
|
|
1690
|
+
};
|
|
1691
|
+
};
|
|
1692
|
+
availability: {
|
|
1693
|
+
ok: true;
|
|
1694
|
+
spots: number;
|
|
1695
|
+
} | {
|
|
1696
|
+
ok: false;
|
|
1697
|
+
reason: string;
|
|
1698
|
+
};
|
|
1699
|
+
})[];
|
|
1700
|
+
shipping_lines: {
|
|
1701
|
+
id: string;
|
|
1702
|
+
shipping_method_id?: string | null | undefined;
|
|
1703
|
+
title: string;
|
|
1704
|
+
code?: string | null | undefined;
|
|
1705
|
+
source: string;
|
|
1706
|
+
carrier_identifier?: string | null | undefined;
|
|
1707
|
+
money: {
|
|
1708
|
+
unit_price: number;
|
|
1709
|
+
subtotal: number;
|
|
1710
|
+
discount_allocations: {
|
|
1711
|
+
discount_application_id?: string | null | undefined;
|
|
1712
|
+
amount: number;
|
|
1713
|
+
}[];
|
|
1714
|
+
discount_total: number;
|
|
1715
|
+
taxable_base: number;
|
|
1716
|
+
tax_lines: {
|
|
1717
|
+
id: string;
|
|
1718
|
+
title: string;
|
|
1719
|
+
rate_bps: number;
|
|
1720
|
+
amount: number;
|
|
1721
|
+
taxable_base: number;
|
|
1722
|
+
included_in_price: boolean;
|
|
1723
|
+
jurisdiction_country?: string | null | undefined;
|
|
1724
|
+
jurisdiction_region?: string | null | undefined;
|
|
1725
|
+
jurisdiction_city?: string | null | undefined;
|
|
1726
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
1727
|
+
tax_category_id?: string | null | undefined;
|
|
1728
|
+
tax_rate_id?: string | null | undefined;
|
|
1729
|
+
source: string;
|
|
1730
|
+
provider_tax_id?: string | null | undefined;
|
|
1731
|
+
provider_tax_line_id?: string | null | undefined;
|
|
1732
|
+
}[];
|
|
1733
|
+
tax_total: number;
|
|
1734
|
+
total: number;
|
|
1735
|
+
};
|
|
1736
|
+
created_at: number;
|
|
1737
|
+
updated_at: number;
|
|
1738
|
+
}[];
|
|
1739
|
+
subtotal: number;
|
|
1740
|
+
shipping: number;
|
|
1741
|
+
discount: number;
|
|
1742
|
+
tax: number;
|
|
1743
|
+
total: number;
|
|
1744
|
+
shipping_method: {
|
|
1745
|
+
id: string;
|
|
1746
|
+
taxable: boolean;
|
|
1747
|
+
eta_text: string;
|
|
1748
|
+
location_id?: string | undefined;
|
|
1749
|
+
amount: number;
|
|
1750
|
+
free_above?: number | undefined;
|
|
1751
|
+
weight_tiers?: {
|
|
1752
|
+
up_to_grams: number;
|
|
1753
|
+
amount: number;
|
|
1754
|
+
}[] | undefined;
|
|
1755
|
+
} | null;
|
|
1756
|
+
payment_method: {
|
|
1757
|
+
type: "cash";
|
|
1758
|
+
id: string;
|
|
1759
|
+
key: string;
|
|
1760
|
+
} | {
|
|
1761
|
+
type: "credit_card";
|
|
1762
|
+
id: string;
|
|
1763
|
+
key: string;
|
|
1764
|
+
payment_provider_id: string;
|
|
1765
|
+
} | null;
|
|
1766
|
+
payment_methods: ({
|
|
1767
|
+
type: "cash";
|
|
1768
|
+
id: string;
|
|
1769
|
+
key: string;
|
|
1770
|
+
} | {
|
|
1771
|
+
type: "credit_card";
|
|
1772
|
+
id: string;
|
|
1773
|
+
key: string;
|
|
1774
|
+
payment_provider_id: string;
|
|
1775
|
+
})[];
|
|
1776
|
+
promo_code: {
|
|
1777
|
+
promo_code_id: string;
|
|
1778
|
+
code: string;
|
|
1779
|
+
discounts: ({
|
|
1780
|
+
type: "items_percentage";
|
|
1781
|
+
market_id: string;
|
|
1782
|
+
bps: number;
|
|
1783
|
+
} | {
|
|
1784
|
+
type: "items_fixed";
|
|
1785
|
+
market_id: string;
|
|
1786
|
+
amount: number;
|
|
1787
|
+
} | {
|
|
1788
|
+
type: "shipping_percentage";
|
|
1789
|
+
market_id: string;
|
|
1790
|
+
bps: number;
|
|
1791
|
+
})[];
|
|
1792
|
+
conditions: {
|
|
1793
|
+
type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
|
|
1794
|
+
value: ConditionValue;
|
|
1795
|
+
}[];
|
|
1796
|
+
} | null;
|
|
1797
|
+
money: {
|
|
1798
|
+
currency: Currency;
|
|
1799
|
+
market: string;
|
|
1800
|
+
subtotal: number;
|
|
1801
|
+
shipping: number;
|
|
1802
|
+
discount: number;
|
|
1803
|
+
total: number;
|
|
1804
|
+
tax?: {
|
|
1805
|
+
amount: number;
|
|
1806
|
+
mode_snapshot?: string | undefined;
|
|
1807
|
+
rate_bps: number;
|
|
1808
|
+
lines: {
|
|
1809
|
+
rate_bps: number;
|
|
1810
|
+
amount: number;
|
|
1811
|
+
label?: string | undefined;
|
|
1812
|
+
scope?: string | undefined;
|
|
1813
|
+
}[];
|
|
1814
|
+
} | null | undefined;
|
|
1815
|
+
promo_code?: {
|
|
1816
|
+
id: string;
|
|
1817
|
+
code: string;
|
|
1818
|
+
type: string;
|
|
1819
|
+
value: number;
|
|
1820
|
+
} | null | undefined;
|
|
1821
|
+
zone_id?: string | null | undefined;
|
|
1822
|
+
payment_method_key?: string | null | undefined;
|
|
1823
|
+
shipping_method_id?: string | null | undefined;
|
|
1824
|
+
method_type: PaymentMethodType;
|
|
1825
|
+
};
|
|
1826
|
+
charge_amount: number;
|
|
1827
|
+
} | null> & object;
|
|
1828
|
+
promo_code: nanostores.PreinitializedWritableAtom<string | null> & object;
|
|
1829
|
+
last_order: nanostores.PreinitializedWritableAtom<ArkyLastOrder | null> & object;
|
|
1830
|
+
status: nanostores.PreinitializedMapStore<ArkyCartStatus> & object;
|
|
1831
|
+
product_item_count: nanostores.ReadableAtom<number>;
|
|
1832
|
+
service_item_count: nanostores.ReadableAtom<number>;
|
|
1833
|
+
item_count: nanostores.ReadableAtom<number>;
|
|
1834
|
+
snapshot: nanostores.ReadableAtom<{
|
|
1835
|
+
cart: {
|
|
1836
|
+
id: string;
|
|
1837
|
+
contact_id: string;
|
|
1838
|
+
token: string;
|
|
1839
|
+
status: CartStatus;
|
|
1840
|
+
origin: CartOrigin;
|
|
1841
|
+
created_by_account_id?: string | null | undefined;
|
|
1842
|
+
market: string;
|
|
1843
|
+
items: ({
|
|
1844
|
+
type: "product";
|
|
1845
|
+
id?: string | undefined;
|
|
1846
|
+
product_id: string;
|
|
1847
|
+
variant_id: string;
|
|
1848
|
+
quantity: number;
|
|
1849
|
+
} | {
|
|
1850
|
+
type: "service";
|
|
1851
|
+
id?: string | undefined;
|
|
1852
|
+
service_id: string;
|
|
1853
|
+
provider_id: string;
|
|
1854
|
+
slots: {
|
|
1855
|
+
from: number;
|
|
1856
|
+
to: number;
|
|
1857
|
+
}[];
|
|
1858
|
+
forms?: {
|
|
1859
|
+
form_id: string;
|
|
1860
|
+
fields: FormField[];
|
|
1861
|
+
}[] | undefined;
|
|
1862
|
+
})[];
|
|
1863
|
+
shipping_address?: {
|
|
1864
|
+
name?: string | null | undefined;
|
|
1865
|
+
company?: string | null | undefined;
|
|
1866
|
+
street1?: string | null | undefined;
|
|
1867
|
+
street2?: string | null | undefined;
|
|
1868
|
+
city?: string | null | undefined;
|
|
1869
|
+
state?: string | null | undefined;
|
|
1870
|
+
postal_code?: string | null | undefined;
|
|
1871
|
+
country?: string | null | undefined;
|
|
1872
|
+
phone?: string | null | undefined;
|
|
1873
|
+
email?: string | null | undefined;
|
|
1874
|
+
} | null | undefined;
|
|
1875
|
+
billing_address?: {
|
|
1876
|
+
name?: string | null | undefined;
|
|
1877
|
+
company?: string | null | undefined;
|
|
1878
|
+
street1?: string | null | undefined;
|
|
1879
|
+
street2?: string | null | undefined;
|
|
1880
|
+
city?: string | null | undefined;
|
|
1881
|
+
state?: string | null | undefined;
|
|
1882
|
+
postal_code?: string | null | undefined;
|
|
1883
|
+
country?: string | null | undefined;
|
|
1884
|
+
phone?: string | null | undefined;
|
|
1885
|
+
email?: string | null | undefined;
|
|
1886
|
+
} | null | undefined;
|
|
1887
|
+
forms: {
|
|
1888
|
+
form_id: string;
|
|
1889
|
+
fields: FormField[];
|
|
1890
|
+
}[];
|
|
1891
|
+
promo_code?: string | null | undefined;
|
|
1892
|
+
payment_method_key?: string | null | undefined;
|
|
1893
|
+
shipping_method_id?: string | null | undefined;
|
|
1894
|
+
quote_snapshot?: {
|
|
1895
|
+
id?: string | undefined;
|
|
1896
|
+
expires_at?: number | undefined;
|
|
1897
|
+
market: string;
|
|
1898
|
+
zone: {
|
|
1899
|
+
id: string;
|
|
1900
|
+
market_id: string;
|
|
1901
|
+
countries: string[];
|
|
1902
|
+
states: string[];
|
|
1903
|
+
postal_codes: string[];
|
|
1904
|
+
tax_bps: number;
|
|
1905
|
+
shipping_methods: {
|
|
1906
|
+
id: string;
|
|
1907
|
+
taxable: boolean;
|
|
1908
|
+
eta_text: string;
|
|
1909
|
+
location_id?: string | undefined;
|
|
1910
|
+
amount: number;
|
|
1911
|
+
free_above?: number | undefined;
|
|
1912
|
+
weight_tiers?: {
|
|
1913
|
+
up_to_grams: number;
|
|
1914
|
+
amount: number;
|
|
1915
|
+
}[] | undefined;
|
|
1916
|
+
}[];
|
|
1917
|
+
} | null;
|
|
1918
|
+
items: ({
|
|
1919
|
+
type: "product";
|
|
1920
|
+
line_id: string;
|
|
1921
|
+
product_id: string;
|
|
1922
|
+
variant_id: string;
|
|
1923
|
+
quantity: number;
|
|
1924
|
+
unit_price: number;
|
|
1925
|
+
subtotal: number;
|
|
1926
|
+
discount: number;
|
|
1927
|
+
tax: number;
|
|
1928
|
+
total: number;
|
|
1929
|
+
money: {
|
|
1930
|
+
unit_price: number;
|
|
1931
|
+
subtotal: number;
|
|
1932
|
+
discount_allocations: {
|
|
1933
|
+
discount_application_id?: string | null | undefined;
|
|
1934
|
+
amount: number;
|
|
1935
|
+
}[];
|
|
1936
|
+
discount_total: number;
|
|
1937
|
+
taxable_base: number;
|
|
1938
|
+
tax_lines: {
|
|
1939
|
+
id: string;
|
|
1940
|
+
title: string;
|
|
1941
|
+
rate_bps: number;
|
|
1942
|
+
amount: number;
|
|
1943
|
+
taxable_base: number;
|
|
1944
|
+
included_in_price: boolean;
|
|
1945
|
+
jurisdiction_country?: string | null | undefined;
|
|
1946
|
+
jurisdiction_region?: string | null | undefined;
|
|
1947
|
+
jurisdiction_city?: string | null | undefined;
|
|
1948
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
1949
|
+
tax_category_id?: string | null | undefined;
|
|
1950
|
+
tax_rate_id?: string | null | undefined;
|
|
1951
|
+
source: string;
|
|
1952
|
+
provider_tax_id?: string | null | undefined;
|
|
1953
|
+
provider_tax_line_id?: string | null | undefined;
|
|
1954
|
+
}[];
|
|
1955
|
+
tax_total: number;
|
|
1956
|
+
total: number;
|
|
1957
|
+
};
|
|
1958
|
+
snapshot: {
|
|
1959
|
+
product_key: string;
|
|
1960
|
+
variant_sku?: string | undefined;
|
|
1961
|
+
variant_attributes: {
|
|
1962
|
+
id: string;
|
|
1963
|
+
key: string;
|
|
1964
|
+
type: string;
|
|
1965
|
+
properties?: any;
|
|
1966
|
+
value?: any;
|
|
1967
|
+
}[];
|
|
1968
|
+
requires_shipping: boolean;
|
|
1969
|
+
tax_category_id?: string | null | undefined;
|
|
1970
|
+
price: {
|
|
1971
|
+
currency: Currency;
|
|
1972
|
+
market: string;
|
|
1973
|
+
amount: number;
|
|
1974
|
+
compare_at?: number | undefined;
|
|
1975
|
+
contact_list_id?: string | undefined;
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
availability: {
|
|
1979
|
+
ok: true;
|
|
1980
|
+
available?: number | undefined;
|
|
1981
|
+
} | {
|
|
1982
|
+
ok: false;
|
|
1983
|
+
reason: string;
|
|
1984
|
+
};
|
|
1985
|
+
} | {
|
|
1986
|
+
type: "service";
|
|
1987
|
+
line_id: string;
|
|
1988
|
+
service_id: string;
|
|
1989
|
+
provider_id: string;
|
|
1990
|
+
from: number;
|
|
1991
|
+
to: number;
|
|
1992
|
+
quantity: 1;
|
|
1993
|
+
unit_price: number;
|
|
1994
|
+
subtotal: number;
|
|
1995
|
+
discount: number;
|
|
1996
|
+
tax: number;
|
|
1997
|
+
total: number;
|
|
1998
|
+
money: {
|
|
1999
|
+
unit_price: number;
|
|
2000
|
+
subtotal: number;
|
|
2001
|
+
discount_allocations: {
|
|
2002
|
+
discount_application_id?: string | null | undefined;
|
|
2003
|
+
amount: number;
|
|
2004
|
+
}[];
|
|
2005
|
+
discount_total: number;
|
|
2006
|
+
taxable_base: number;
|
|
2007
|
+
tax_lines: {
|
|
2008
|
+
id: string;
|
|
2009
|
+
title: string;
|
|
2010
|
+
rate_bps: number;
|
|
2011
|
+
amount: number;
|
|
2012
|
+
taxable_base: number;
|
|
2013
|
+
included_in_price: boolean;
|
|
2014
|
+
jurisdiction_country?: string | null | undefined;
|
|
2015
|
+
jurisdiction_region?: string | null | undefined;
|
|
2016
|
+
jurisdiction_city?: string | null | undefined;
|
|
2017
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2018
|
+
tax_category_id?: string | null | undefined;
|
|
2019
|
+
tax_rate_id?: string | null | undefined;
|
|
2020
|
+
source: string;
|
|
2021
|
+
provider_tax_id?: string | null | undefined;
|
|
2022
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2023
|
+
}[];
|
|
2024
|
+
tax_total: number;
|
|
2025
|
+
total: number;
|
|
2026
|
+
};
|
|
2027
|
+
snapshot: {
|
|
2028
|
+
service_key: string;
|
|
2029
|
+
provider_key: string;
|
|
2030
|
+
tax_category_id?: string | null | undefined;
|
|
2031
|
+
price: {
|
|
2032
|
+
currency: Currency;
|
|
2033
|
+
market: string;
|
|
2034
|
+
amount: number;
|
|
2035
|
+
compare_at?: number | undefined;
|
|
2036
|
+
contact_list_id?: string | undefined;
|
|
2037
|
+
};
|
|
2038
|
+
};
|
|
2039
|
+
availability: {
|
|
2040
|
+
ok: true;
|
|
2041
|
+
spots: number;
|
|
2042
|
+
} | {
|
|
2043
|
+
ok: false;
|
|
2044
|
+
reason: string;
|
|
2045
|
+
};
|
|
2046
|
+
})[];
|
|
2047
|
+
shipping_lines: {
|
|
2048
|
+
id: string;
|
|
2049
|
+
shipping_method_id?: string | null | undefined;
|
|
2050
|
+
title: string;
|
|
2051
|
+
code?: string | null | undefined;
|
|
2052
|
+
source: string;
|
|
2053
|
+
carrier_identifier?: string | null | undefined;
|
|
2054
|
+
money: {
|
|
2055
|
+
unit_price: number;
|
|
2056
|
+
subtotal: number;
|
|
2057
|
+
discount_allocations: {
|
|
2058
|
+
discount_application_id?: string | null | undefined;
|
|
2059
|
+
amount: number;
|
|
2060
|
+
}[];
|
|
2061
|
+
discount_total: number;
|
|
2062
|
+
taxable_base: number;
|
|
2063
|
+
tax_lines: {
|
|
2064
|
+
id: string;
|
|
2065
|
+
title: string;
|
|
2066
|
+
rate_bps: number;
|
|
2067
|
+
amount: number;
|
|
2068
|
+
taxable_base: number;
|
|
2069
|
+
included_in_price: boolean;
|
|
2070
|
+
jurisdiction_country?: string | null | undefined;
|
|
2071
|
+
jurisdiction_region?: string | null | undefined;
|
|
2072
|
+
jurisdiction_city?: string | null | undefined;
|
|
2073
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2074
|
+
tax_category_id?: string | null | undefined;
|
|
2075
|
+
tax_rate_id?: string | null | undefined;
|
|
2076
|
+
source: string;
|
|
2077
|
+
provider_tax_id?: string | null | undefined;
|
|
2078
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2079
|
+
}[];
|
|
2080
|
+
tax_total: number;
|
|
2081
|
+
total: number;
|
|
2082
|
+
};
|
|
2083
|
+
created_at: number;
|
|
2084
|
+
updated_at: number;
|
|
2085
|
+
}[];
|
|
2086
|
+
subtotal: number;
|
|
2087
|
+
shipping: number;
|
|
2088
|
+
discount: number;
|
|
2089
|
+
tax: number;
|
|
2090
|
+
total: number;
|
|
2091
|
+
shipping_method: {
|
|
2092
|
+
id: string;
|
|
2093
|
+
taxable: boolean;
|
|
2094
|
+
eta_text: string;
|
|
2095
|
+
location_id?: string | undefined;
|
|
2096
|
+
amount: number;
|
|
2097
|
+
free_above?: number | undefined;
|
|
2098
|
+
weight_tiers?: {
|
|
2099
|
+
up_to_grams: number;
|
|
2100
|
+
amount: number;
|
|
2101
|
+
}[] | undefined;
|
|
2102
|
+
} | null;
|
|
2103
|
+
payment_method: {
|
|
2104
|
+
type: "cash";
|
|
2105
|
+
id: string;
|
|
2106
|
+
key: string;
|
|
2107
|
+
} | {
|
|
2108
|
+
type: "credit_card";
|
|
2109
|
+
id: string;
|
|
2110
|
+
key: string;
|
|
2111
|
+
payment_provider_id: string;
|
|
2112
|
+
} | null;
|
|
2113
|
+
payment_methods: ({
|
|
2114
|
+
type: "cash";
|
|
2115
|
+
id: string;
|
|
2116
|
+
key: string;
|
|
2117
|
+
} | {
|
|
2118
|
+
type: "credit_card";
|
|
2119
|
+
id: string;
|
|
2120
|
+
key: string;
|
|
2121
|
+
payment_provider_id: string;
|
|
2122
|
+
})[];
|
|
2123
|
+
promo_code: {
|
|
2124
|
+
promo_code_id: string;
|
|
2125
|
+
code: string;
|
|
2126
|
+
discounts: ({
|
|
2127
|
+
type: "items_percentage";
|
|
2128
|
+
market_id: string;
|
|
2129
|
+
bps: number;
|
|
2130
|
+
} | {
|
|
2131
|
+
type: "items_fixed";
|
|
2132
|
+
market_id: string;
|
|
2133
|
+
amount: number;
|
|
2134
|
+
} | {
|
|
2135
|
+
type: "shipping_percentage";
|
|
2136
|
+
market_id: string;
|
|
2137
|
+
bps: number;
|
|
2138
|
+
})[];
|
|
2139
|
+
conditions: {
|
|
2140
|
+
type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
|
|
2141
|
+
value: ConditionValue;
|
|
2142
|
+
}[];
|
|
2143
|
+
} | null;
|
|
2144
|
+
money: {
|
|
2145
|
+
currency: Currency;
|
|
2146
|
+
market: string;
|
|
2147
|
+
subtotal: number;
|
|
2148
|
+
shipping: number;
|
|
2149
|
+
discount: number;
|
|
2150
|
+
total: number;
|
|
2151
|
+
tax?: {
|
|
2152
|
+
amount: number;
|
|
2153
|
+
mode_snapshot?: string | undefined;
|
|
2154
|
+
rate_bps: number;
|
|
2155
|
+
lines: {
|
|
2156
|
+
rate_bps: number;
|
|
2157
|
+
amount: number;
|
|
2158
|
+
label?: string | undefined;
|
|
2159
|
+
scope?: string | undefined;
|
|
2160
|
+
}[];
|
|
2161
|
+
} | null | undefined;
|
|
2162
|
+
promo_code?: {
|
|
2163
|
+
id: string;
|
|
2164
|
+
code: string;
|
|
2165
|
+
type: string;
|
|
2166
|
+
value: number;
|
|
2167
|
+
} | null | undefined;
|
|
2168
|
+
zone_id?: string | null | undefined;
|
|
2169
|
+
payment_method_key?: string | null | undefined;
|
|
2170
|
+
shipping_method_id?: string | null | undefined;
|
|
2171
|
+
method_type: PaymentMethodType;
|
|
2172
|
+
};
|
|
2173
|
+
charge_amount: number;
|
|
2174
|
+
} | null | undefined;
|
|
2175
|
+
converted_order_id?: string | null | undefined;
|
|
2176
|
+
item_count: number;
|
|
2177
|
+
last_action_at: number;
|
|
2178
|
+
abandoned_at?: number | null | undefined;
|
|
2179
|
+
recovery_sent_at?: number | null | undefined;
|
|
2180
|
+
created_at: number;
|
|
2181
|
+
updated_at: number;
|
|
2182
|
+
} | null;
|
|
2183
|
+
product_items: EshopCartItem[];
|
|
2184
|
+
service_items: ArkyServiceCartItem[];
|
|
2185
|
+
item_count: number;
|
|
2186
|
+
}>;
|
|
2187
|
+
load: () => Promise<StorefrontCart>;
|
|
2188
|
+
refresh: (input?: ArkyCartInput, writeRevision?: number) => Promise<StorefrontCart>;
|
|
2189
|
+
addProduct: (product: StorefrontProduct, variant: StorefrontProductVariant, quantity?: number) => Promise<StorefrontCart>;
|
|
2190
|
+
setProductQuantity: (itemId: string, quantity: number) => Promise<StorefrontCart>;
|
|
2191
|
+
removeProduct: (itemId: string) => Promise<StorefrontCart | null>;
|
|
2192
|
+
addServiceItem: (item: ArkyServiceCartItem) => Promise<StorefrontCart>;
|
|
2193
|
+
removeServiceItem: (itemId: string) => Promise<StorefrontCart>;
|
|
2194
|
+
clear: () => Promise<StorefrontCart | null>;
|
|
2195
|
+
clearLocal: () => void;
|
|
2196
|
+
quote: (input?: ArkyCartInput) => Promise<StorefrontOrderQuote | null>;
|
|
2197
|
+
checkout: (input?: ArkyCartInput) => Promise<StorefrontOrderCheckoutResult>;
|
|
2198
|
+
payment: {
|
|
2199
|
+
controller: nanostores.PreinitializedWritableAtom<StripeConfirmationTokenController | null> & object;
|
|
2200
|
+
ready: nanostores.ReadableAtom<boolean>;
|
|
2201
|
+
setController: (controller: StripeConfirmationTokenController | null) => StripeConfirmationTokenController | null;
|
|
2202
|
+
getController: () => StripeConfirmationTokenController | null;
|
|
2203
|
+
mountStripe: (target: string | HTMLElement, options?: ArkyStripePaymentMountOptions) => Promise<StripeConfirmationTokenController>;
|
|
2204
|
+
update: (input: {
|
|
2205
|
+
amount?: number;
|
|
2206
|
+
currency?: string;
|
|
2207
|
+
}) => void;
|
|
2208
|
+
destroy: () => void;
|
|
2209
|
+
};
|
|
2210
|
+
applyPromoCode(code: string, input?: Omit<ArkyCartInput, "promo_code">): Promise<{
|
|
2211
|
+
id?: string | undefined;
|
|
2212
|
+
expires_at?: number | undefined;
|
|
2213
|
+
market: string;
|
|
2214
|
+
zone: {
|
|
2215
|
+
id: string;
|
|
2216
|
+
market_id: string;
|
|
2217
|
+
countries: string[];
|
|
2218
|
+
states: string[];
|
|
2219
|
+
postal_codes: string[];
|
|
2220
|
+
tax_bps: number;
|
|
2221
|
+
shipping_methods: {
|
|
2222
|
+
id: string;
|
|
2223
|
+
taxable: boolean;
|
|
2224
|
+
eta_text: string;
|
|
2225
|
+
location_id?: string | undefined;
|
|
2226
|
+
amount: number;
|
|
2227
|
+
free_above?: number | undefined;
|
|
2228
|
+
weight_tiers?: {
|
|
2229
|
+
up_to_grams: number;
|
|
2230
|
+
amount: number;
|
|
2231
|
+
}[] | undefined;
|
|
2232
|
+
}[];
|
|
2233
|
+
} | null;
|
|
2234
|
+
items: ({
|
|
2235
|
+
type: "product";
|
|
2236
|
+
line_id: string;
|
|
2237
|
+
product_id: string;
|
|
2238
|
+
variant_id: string;
|
|
2239
|
+
quantity: number;
|
|
2240
|
+
unit_price: number;
|
|
2241
|
+
subtotal: number;
|
|
2242
|
+
discount: number;
|
|
2243
|
+
tax: number;
|
|
2244
|
+
total: number;
|
|
2245
|
+
money: {
|
|
2246
|
+
unit_price: number;
|
|
2247
|
+
subtotal: number;
|
|
2248
|
+
discount_allocations: {
|
|
2249
|
+
discount_application_id?: string | null | undefined;
|
|
2250
|
+
amount: number;
|
|
2251
|
+
}[];
|
|
2252
|
+
discount_total: number;
|
|
2253
|
+
taxable_base: number;
|
|
2254
|
+
tax_lines: {
|
|
2255
|
+
id: string;
|
|
2256
|
+
title: string;
|
|
2257
|
+
rate_bps: number;
|
|
2258
|
+
amount: number;
|
|
2259
|
+
taxable_base: number;
|
|
2260
|
+
included_in_price: boolean;
|
|
2261
|
+
jurisdiction_country?: string | null | undefined;
|
|
2262
|
+
jurisdiction_region?: string | null | undefined;
|
|
2263
|
+
jurisdiction_city?: string | null | undefined;
|
|
2264
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2265
|
+
tax_category_id?: string | null | undefined;
|
|
2266
|
+
tax_rate_id?: string | null | undefined;
|
|
2267
|
+
source: string;
|
|
2268
|
+
provider_tax_id?: string | null | undefined;
|
|
2269
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2270
|
+
}[];
|
|
2271
|
+
tax_total: number;
|
|
2272
|
+
total: number;
|
|
2273
|
+
};
|
|
2274
|
+
snapshot: {
|
|
2275
|
+
product_key: string;
|
|
2276
|
+
variant_sku?: string | undefined;
|
|
2277
|
+
variant_attributes: {
|
|
2278
|
+
id: string;
|
|
2279
|
+
key: string;
|
|
2280
|
+
type: string;
|
|
2281
|
+
properties?: any;
|
|
2282
|
+
value?: any;
|
|
2283
|
+
}[];
|
|
2284
|
+
requires_shipping: boolean;
|
|
2285
|
+
tax_category_id?: string | null | undefined;
|
|
2286
|
+
price: {
|
|
2287
|
+
currency: Currency;
|
|
2288
|
+
market: string;
|
|
2289
|
+
amount: number;
|
|
2290
|
+
compare_at?: number | undefined;
|
|
2291
|
+
contact_list_id?: string | undefined;
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
availability: {
|
|
2295
|
+
ok: true;
|
|
2296
|
+
available?: number | undefined;
|
|
2297
|
+
} | {
|
|
2298
|
+
ok: false;
|
|
2299
|
+
reason: string;
|
|
2300
|
+
};
|
|
2301
|
+
} | {
|
|
2302
|
+
type: "service";
|
|
2303
|
+
line_id: string;
|
|
2304
|
+
service_id: string;
|
|
2305
|
+
provider_id: string;
|
|
2306
|
+
from: number;
|
|
2307
|
+
to: number;
|
|
2308
|
+
quantity: 1;
|
|
2309
|
+
unit_price: number;
|
|
2310
|
+
subtotal: number;
|
|
2311
|
+
discount: number;
|
|
2312
|
+
tax: number;
|
|
2313
|
+
total: number;
|
|
2314
|
+
money: {
|
|
2315
|
+
unit_price: number;
|
|
2316
|
+
subtotal: number;
|
|
2317
|
+
discount_allocations: {
|
|
2318
|
+
discount_application_id?: string | null | undefined;
|
|
2319
|
+
amount: number;
|
|
2320
|
+
}[];
|
|
2321
|
+
discount_total: number;
|
|
2322
|
+
taxable_base: number;
|
|
2323
|
+
tax_lines: {
|
|
2324
|
+
id: string;
|
|
2325
|
+
title: string;
|
|
2326
|
+
rate_bps: number;
|
|
2327
|
+
amount: number;
|
|
2328
|
+
taxable_base: number;
|
|
2329
|
+
included_in_price: boolean;
|
|
2330
|
+
jurisdiction_country?: string | null | undefined;
|
|
2331
|
+
jurisdiction_region?: string | null | undefined;
|
|
2332
|
+
jurisdiction_city?: string | null | undefined;
|
|
2333
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2334
|
+
tax_category_id?: string | null | undefined;
|
|
2335
|
+
tax_rate_id?: string | null | undefined;
|
|
2336
|
+
source: string;
|
|
2337
|
+
provider_tax_id?: string | null | undefined;
|
|
2338
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2339
|
+
}[];
|
|
2340
|
+
tax_total: number;
|
|
2341
|
+
total: number;
|
|
2342
|
+
};
|
|
2343
|
+
snapshot: {
|
|
2344
|
+
service_key: string;
|
|
2345
|
+
provider_key: string;
|
|
2346
|
+
tax_category_id?: string | null | undefined;
|
|
2347
|
+
price: {
|
|
2348
|
+
currency: Currency;
|
|
2349
|
+
market: string;
|
|
2350
|
+
amount: number;
|
|
2351
|
+
compare_at?: number | undefined;
|
|
2352
|
+
contact_list_id?: string | undefined;
|
|
2353
|
+
};
|
|
2354
|
+
};
|
|
2355
|
+
availability: {
|
|
2356
|
+
ok: true;
|
|
2357
|
+
spots: number;
|
|
2358
|
+
} | {
|
|
2359
|
+
ok: false;
|
|
2360
|
+
reason: string;
|
|
2361
|
+
};
|
|
2362
|
+
})[];
|
|
2363
|
+
shipping_lines: {
|
|
2364
|
+
id: string;
|
|
2365
|
+
shipping_method_id?: string | null | undefined;
|
|
2366
|
+
title: string;
|
|
2367
|
+
code?: string | null | undefined;
|
|
2368
|
+
source: string;
|
|
2369
|
+
carrier_identifier?: string | null | undefined;
|
|
2370
|
+
money: {
|
|
2371
|
+
unit_price: number;
|
|
2372
|
+
subtotal: number;
|
|
2373
|
+
discount_allocations: {
|
|
2374
|
+
discount_application_id?: string | null | undefined;
|
|
2375
|
+
amount: number;
|
|
2376
|
+
}[];
|
|
2377
|
+
discount_total: number;
|
|
2378
|
+
taxable_base: number;
|
|
2379
|
+
tax_lines: {
|
|
2380
|
+
id: string;
|
|
2381
|
+
title: string;
|
|
2382
|
+
rate_bps: number;
|
|
2383
|
+
amount: number;
|
|
2384
|
+
taxable_base: number;
|
|
2385
|
+
included_in_price: boolean;
|
|
2386
|
+
jurisdiction_country?: string | null | undefined;
|
|
2387
|
+
jurisdiction_region?: string | null | undefined;
|
|
2388
|
+
jurisdiction_city?: string | null | undefined;
|
|
2389
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2390
|
+
tax_category_id?: string | null | undefined;
|
|
2391
|
+
tax_rate_id?: string | null | undefined;
|
|
2392
|
+
source: string;
|
|
2393
|
+
provider_tax_id?: string | null | undefined;
|
|
2394
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2395
|
+
}[];
|
|
2396
|
+
tax_total: number;
|
|
2397
|
+
total: number;
|
|
2398
|
+
};
|
|
2399
|
+
created_at: number;
|
|
2400
|
+
updated_at: number;
|
|
2401
|
+
}[];
|
|
2402
|
+
subtotal: number;
|
|
2403
|
+
shipping: number;
|
|
2404
|
+
discount: number;
|
|
2405
|
+
tax: number;
|
|
2406
|
+
total: number;
|
|
2407
|
+
shipping_method: {
|
|
2408
|
+
id: string;
|
|
2409
|
+
taxable: boolean;
|
|
2410
|
+
eta_text: string;
|
|
2411
|
+
location_id?: string | undefined;
|
|
2412
|
+
amount: number;
|
|
2413
|
+
free_above?: number | undefined;
|
|
2414
|
+
weight_tiers?: {
|
|
2415
|
+
up_to_grams: number;
|
|
2416
|
+
amount: number;
|
|
2417
|
+
}[] | undefined;
|
|
2418
|
+
} | null;
|
|
2419
|
+
payment_method: {
|
|
2420
|
+
type: "cash";
|
|
2421
|
+
id: string;
|
|
2422
|
+
key: string;
|
|
2423
|
+
} | {
|
|
2424
|
+
type: "credit_card";
|
|
2425
|
+
id: string;
|
|
2426
|
+
key: string;
|
|
2427
|
+
payment_provider_id: string;
|
|
2428
|
+
} | null;
|
|
2429
|
+
payment_methods: ({
|
|
2430
|
+
type: "cash";
|
|
2431
|
+
id: string;
|
|
2432
|
+
key: string;
|
|
2433
|
+
} | {
|
|
2434
|
+
type: "credit_card";
|
|
2435
|
+
id: string;
|
|
2436
|
+
key: string;
|
|
2437
|
+
payment_provider_id: string;
|
|
2438
|
+
})[];
|
|
2439
|
+
promo_code: {
|
|
2440
|
+
promo_code_id: string;
|
|
2441
|
+
code: string;
|
|
2442
|
+
discounts: ({
|
|
2443
|
+
type: "items_percentage";
|
|
2444
|
+
market_id: string;
|
|
2445
|
+
bps: number;
|
|
2446
|
+
} | {
|
|
2447
|
+
type: "items_fixed";
|
|
2448
|
+
market_id: string;
|
|
2449
|
+
amount: number;
|
|
2450
|
+
} | {
|
|
2451
|
+
type: "shipping_percentage";
|
|
2452
|
+
market_id: string;
|
|
2453
|
+
bps: number;
|
|
2454
|
+
})[];
|
|
2455
|
+
conditions: {
|
|
2456
|
+
type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
|
|
2457
|
+
value: ConditionValue;
|
|
2458
|
+
}[];
|
|
2459
|
+
} | null;
|
|
2460
|
+
money: {
|
|
2461
|
+
currency: Currency;
|
|
2462
|
+
market: string;
|
|
2463
|
+
subtotal: number;
|
|
2464
|
+
shipping: number;
|
|
2465
|
+
discount: number;
|
|
2466
|
+
total: number;
|
|
2467
|
+
tax?: {
|
|
2468
|
+
amount: number;
|
|
2469
|
+
mode_snapshot?: string | undefined;
|
|
2470
|
+
rate_bps: number;
|
|
2471
|
+
lines: {
|
|
2472
|
+
rate_bps: number;
|
|
2473
|
+
amount: number;
|
|
2474
|
+
label?: string | undefined;
|
|
2475
|
+
scope?: string | undefined;
|
|
2476
|
+
}[];
|
|
2477
|
+
} | null | undefined;
|
|
2478
|
+
promo_code?: {
|
|
2479
|
+
id: string;
|
|
2480
|
+
code: string;
|
|
2481
|
+
type: string;
|
|
2482
|
+
value: number;
|
|
2483
|
+
} | null | undefined;
|
|
2484
|
+
zone_id?: string | null | undefined;
|
|
2485
|
+
payment_method_key?: string | null | undefined;
|
|
2486
|
+
shipping_method_id?: string | null | undefined;
|
|
2487
|
+
method_type: PaymentMethodType;
|
|
2488
|
+
};
|
|
2489
|
+
charge_amount: number;
|
|
2490
|
+
} | null>;
|
|
2491
|
+
removePromoCode(input?: Omit<ArkyCartInput, "promo_code">): Promise<{
|
|
2492
|
+
id?: string | undefined;
|
|
2493
|
+
expires_at?: number | undefined;
|
|
2494
|
+
market: string;
|
|
2495
|
+
zone: {
|
|
2496
|
+
id: string;
|
|
2497
|
+
market_id: string;
|
|
2498
|
+
countries: string[];
|
|
2499
|
+
states: string[];
|
|
2500
|
+
postal_codes: string[];
|
|
2501
|
+
tax_bps: number;
|
|
2502
|
+
shipping_methods: {
|
|
2503
|
+
id: string;
|
|
2504
|
+
taxable: boolean;
|
|
2505
|
+
eta_text: string;
|
|
2506
|
+
location_id?: string | undefined;
|
|
2507
|
+
amount: number;
|
|
2508
|
+
free_above?: number | undefined;
|
|
2509
|
+
weight_tiers?: {
|
|
2510
|
+
up_to_grams: number;
|
|
2511
|
+
amount: number;
|
|
2512
|
+
}[] | undefined;
|
|
2513
|
+
}[];
|
|
2514
|
+
} | null;
|
|
2515
|
+
items: ({
|
|
2516
|
+
type: "product";
|
|
2517
|
+
line_id: string;
|
|
2518
|
+
product_id: string;
|
|
2519
|
+
variant_id: string;
|
|
2520
|
+
quantity: number;
|
|
2521
|
+
unit_price: number;
|
|
2522
|
+
subtotal: number;
|
|
2523
|
+
discount: number;
|
|
2524
|
+
tax: number;
|
|
2525
|
+
total: number;
|
|
2526
|
+
money: {
|
|
2527
|
+
unit_price: number;
|
|
2528
|
+
subtotal: number;
|
|
2529
|
+
discount_allocations: {
|
|
2530
|
+
discount_application_id?: string | null | undefined;
|
|
2531
|
+
amount: number;
|
|
2532
|
+
}[];
|
|
2533
|
+
discount_total: number;
|
|
2534
|
+
taxable_base: number;
|
|
2535
|
+
tax_lines: {
|
|
2536
|
+
id: string;
|
|
2537
|
+
title: string;
|
|
2538
|
+
rate_bps: number;
|
|
2539
|
+
amount: number;
|
|
2540
|
+
taxable_base: number;
|
|
2541
|
+
included_in_price: boolean;
|
|
2542
|
+
jurisdiction_country?: string | null | undefined;
|
|
2543
|
+
jurisdiction_region?: string | null | undefined;
|
|
2544
|
+
jurisdiction_city?: string | null | undefined;
|
|
2545
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2546
|
+
tax_category_id?: string | null | undefined;
|
|
2547
|
+
tax_rate_id?: string | null | undefined;
|
|
2548
|
+
source: string;
|
|
2549
|
+
provider_tax_id?: string | null | undefined;
|
|
2550
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2551
|
+
}[];
|
|
2552
|
+
tax_total: number;
|
|
2553
|
+
total: number;
|
|
2554
|
+
};
|
|
2555
|
+
snapshot: {
|
|
2556
|
+
product_key: string;
|
|
2557
|
+
variant_sku?: string | undefined;
|
|
2558
|
+
variant_attributes: {
|
|
2559
|
+
id: string;
|
|
2560
|
+
key: string;
|
|
2561
|
+
type: string;
|
|
2562
|
+
properties?: any;
|
|
2563
|
+
value?: any;
|
|
2564
|
+
}[];
|
|
2565
|
+
requires_shipping: boolean;
|
|
2566
|
+
tax_category_id?: string | null | undefined;
|
|
2567
|
+
price: {
|
|
2568
|
+
currency: Currency;
|
|
2569
|
+
market: string;
|
|
2570
|
+
amount: number;
|
|
2571
|
+
compare_at?: number | undefined;
|
|
2572
|
+
contact_list_id?: string | undefined;
|
|
2573
|
+
};
|
|
2574
|
+
};
|
|
2575
|
+
availability: {
|
|
2576
|
+
ok: true;
|
|
2577
|
+
available?: number | undefined;
|
|
2578
|
+
} | {
|
|
2579
|
+
ok: false;
|
|
2580
|
+
reason: string;
|
|
2581
|
+
};
|
|
2582
|
+
} | {
|
|
2583
|
+
type: "service";
|
|
2584
|
+
line_id: string;
|
|
2585
|
+
service_id: string;
|
|
2586
|
+
provider_id: string;
|
|
2587
|
+
from: number;
|
|
2588
|
+
to: number;
|
|
2589
|
+
quantity: 1;
|
|
2590
|
+
unit_price: number;
|
|
2591
|
+
subtotal: number;
|
|
2592
|
+
discount: number;
|
|
2593
|
+
tax: number;
|
|
2594
|
+
total: number;
|
|
2595
|
+
money: {
|
|
2596
|
+
unit_price: number;
|
|
2597
|
+
subtotal: number;
|
|
2598
|
+
discount_allocations: {
|
|
2599
|
+
discount_application_id?: string | null | undefined;
|
|
2600
|
+
amount: number;
|
|
2601
|
+
}[];
|
|
2602
|
+
discount_total: number;
|
|
2603
|
+
taxable_base: number;
|
|
2604
|
+
tax_lines: {
|
|
2605
|
+
id: string;
|
|
2606
|
+
title: string;
|
|
2607
|
+
rate_bps: number;
|
|
2608
|
+
amount: number;
|
|
2609
|
+
taxable_base: number;
|
|
2610
|
+
included_in_price: boolean;
|
|
2611
|
+
jurisdiction_country?: string | null | undefined;
|
|
2612
|
+
jurisdiction_region?: string | null | undefined;
|
|
2613
|
+
jurisdiction_city?: string | null | undefined;
|
|
2614
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2615
|
+
tax_category_id?: string | null | undefined;
|
|
2616
|
+
tax_rate_id?: string | null | undefined;
|
|
2617
|
+
source: string;
|
|
2618
|
+
provider_tax_id?: string | null | undefined;
|
|
2619
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2620
|
+
}[];
|
|
2621
|
+
tax_total: number;
|
|
2622
|
+
total: number;
|
|
2623
|
+
};
|
|
2624
|
+
snapshot: {
|
|
2625
|
+
service_key: string;
|
|
2626
|
+
provider_key: string;
|
|
2627
|
+
tax_category_id?: string | null | undefined;
|
|
2628
|
+
price: {
|
|
2629
|
+
currency: Currency;
|
|
2630
|
+
market: string;
|
|
2631
|
+
amount: number;
|
|
2632
|
+
compare_at?: number | undefined;
|
|
2633
|
+
contact_list_id?: string | undefined;
|
|
2634
|
+
};
|
|
2635
|
+
};
|
|
2636
|
+
availability: {
|
|
2637
|
+
ok: true;
|
|
2638
|
+
spots: number;
|
|
2639
|
+
} | {
|
|
2640
|
+
ok: false;
|
|
2641
|
+
reason: string;
|
|
2642
|
+
};
|
|
2643
|
+
})[];
|
|
2644
|
+
shipping_lines: {
|
|
2645
|
+
id: string;
|
|
2646
|
+
shipping_method_id?: string | null | undefined;
|
|
2647
|
+
title: string;
|
|
2648
|
+
code?: string | null | undefined;
|
|
2649
|
+
source: string;
|
|
2650
|
+
carrier_identifier?: string | null | undefined;
|
|
2651
|
+
money: {
|
|
2652
|
+
unit_price: number;
|
|
2653
|
+
subtotal: number;
|
|
2654
|
+
discount_allocations: {
|
|
2655
|
+
discount_application_id?: string | null | undefined;
|
|
2656
|
+
amount: number;
|
|
2657
|
+
}[];
|
|
2658
|
+
discount_total: number;
|
|
2659
|
+
taxable_base: number;
|
|
2660
|
+
tax_lines: {
|
|
2661
|
+
id: string;
|
|
2662
|
+
title: string;
|
|
2663
|
+
rate_bps: number;
|
|
2664
|
+
amount: number;
|
|
2665
|
+
taxable_base: number;
|
|
2666
|
+
included_in_price: boolean;
|
|
2667
|
+
jurisdiction_country?: string | null | undefined;
|
|
2668
|
+
jurisdiction_region?: string | null | undefined;
|
|
2669
|
+
jurisdiction_city?: string | null | undefined;
|
|
2670
|
+
jurisdiction_postal_code?: string | null | undefined;
|
|
2671
|
+
tax_category_id?: string | null | undefined;
|
|
2672
|
+
tax_rate_id?: string | null | undefined;
|
|
2673
|
+
source: string;
|
|
2674
|
+
provider_tax_id?: string | null | undefined;
|
|
2675
|
+
provider_tax_line_id?: string | null | undefined;
|
|
2676
|
+
}[];
|
|
2677
|
+
tax_total: number;
|
|
2678
|
+
total: number;
|
|
2679
|
+
};
|
|
2680
|
+
created_at: number;
|
|
2681
|
+
updated_at: number;
|
|
2682
|
+
}[];
|
|
2683
|
+
subtotal: number;
|
|
2684
|
+
shipping: number;
|
|
2685
|
+
discount: number;
|
|
2686
|
+
tax: number;
|
|
2687
|
+
total: number;
|
|
2688
|
+
shipping_method: {
|
|
2689
|
+
id: string;
|
|
2690
|
+
taxable: boolean;
|
|
2691
|
+
eta_text: string;
|
|
2692
|
+
location_id?: string | undefined;
|
|
2693
|
+
amount: number;
|
|
2694
|
+
free_above?: number | undefined;
|
|
2695
|
+
weight_tiers?: {
|
|
2696
|
+
up_to_grams: number;
|
|
2697
|
+
amount: number;
|
|
2698
|
+
}[] | undefined;
|
|
2699
|
+
} | null;
|
|
2700
|
+
payment_method: {
|
|
2701
|
+
type: "cash";
|
|
2702
|
+
id: string;
|
|
2703
|
+
key: string;
|
|
2704
|
+
} | {
|
|
2705
|
+
type: "credit_card";
|
|
2706
|
+
id: string;
|
|
2707
|
+
key: string;
|
|
2708
|
+
payment_provider_id: string;
|
|
2709
|
+
} | null;
|
|
2710
|
+
payment_methods: ({
|
|
2711
|
+
type: "cash";
|
|
2712
|
+
id: string;
|
|
2713
|
+
key: string;
|
|
2714
|
+
} | {
|
|
2715
|
+
type: "credit_card";
|
|
2716
|
+
id: string;
|
|
2717
|
+
key: string;
|
|
2718
|
+
payment_provider_id: string;
|
|
2719
|
+
})[];
|
|
2720
|
+
promo_code: {
|
|
2721
|
+
promo_code_id: string;
|
|
2722
|
+
code: string;
|
|
2723
|
+
discounts: ({
|
|
2724
|
+
type: "items_percentage";
|
|
2725
|
+
market_id: string;
|
|
2726
|
+
bps: number;
|
|
2727
|
+
} | {
|
|
2728
|
+
type: "items_fixed";
|
|
2729
|
+
market_id: string;
|
|
2730
|
+
amount: number;
|
|
2731
|
+
} | {
|
|
2732
|
+
type: "shipping_percentage";
|
|
2733
|
+
market_id: string;
|
|
2734
|
+
bps: number;
|
|
2735
|
+
})[];
|
|
2736
|
+
conditions: {
|
|
2737
|
+
type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
|
|
2738
|
+
value: ConditionValue;
|
|
2739
|
+
}[];
|
|
2740
|
+
} | null;
|
|
2741
|
+
money: {
|
|
2742
|
+
currency: Currency;
|
|
2743
|
+
market: string;
|
|
2744
|
+
subtotal: number;
|
|
2745
|
+
shipping: number;
|
|
2746
|
+
discount: number;
|
|
2747
|
+
total: number;
|
|
2748
|
+
tax?: {
|
|
2749
|
+
amount: number;
|
|
2750
|
+
mode_snapshot?: string | undefined;
|
|
2751
|
+
rate_bps: number;
|
|
2752
|
+
lines: {
|
|
2753
|
+
rate_bps: number;
|
|
2754
|
+
amount: number;
|
|
2755
|
+
label?: string | undefined;
|
|
2756
|
+
scope?: string | undefined;
|
|
2757
|
+
}[];
|
|
2758
|
+
} | null | undefined;
|
|
2759
|
+
promo_code?: {
|
|
2760
|
+
id: string;
|
|
2761
|
+
code: string;
|
|
2762
|
+
type: string;
|
|
2763
|
+
value: number;
|
|
2764
|
+
} | null | undefined;
|
|
2765
|
+
zone_id?: string | null | undefined;
|
|
2766
|
+
payment_method_key?: string | null | undefined;
|
|
2767
|
+
shipping_method_id?: string | null | undefined;
|
|
2768
|
+
method_type: PaymentMethodType;
|
|
2769
|
+
};
|
|
2770
|
+
charge_amount: number;
|
|
2771
|
+
} | null>;
|
|
2772
|
+
selectShippingMethod(id: string | null): void;
|
|
2773
|
+
locationToAddress: typeof locationToAddress;
|
|
2774
|
+
createFormEntry: typeof createFormEntry;
|
|
2775
|
+
buildItems: (input?: ArkyCartInput) => OrderCheckoutItemInput[];
|
|
2776
|
+
buildProductItems: typeof toProductCheckoutItems;
|
|
2777
|
+
buildServiceItems: typeof toServiceCheckoutItems;
|
|
2778
|
+
};
|
|
2779
|
+
};
|
|
2780
|
+
crm: {
|
|
2781
|
+
contact: {
|
|
2782
|
+
identify: (params?: {
|
|
2783
|
+
email?: string;
|
|
2784
|
+
}) => Promise<StorefrontIdentifyResult>;
|
|
2785
|
+
requestCode: (params?: {
|
|
2786
|
+
email?: string;
|
|
2787
|
+
}) => Promise<StorefrontIdentifyResult>;
|
|
2788
|
+
verify: (params: {
|
|
2789
|
+
challenge_id: string;
|
|
2790
|
+
code: string;
|
|
2791
|
+
}) => Promise<StorefrontVerifyResult>;
|
|
2792
|
+
logout: () => Promise<void>;
|
|
2793
|
+
getMe: () => Promise<StorefrontContact>;
|
|
2794
|
+
};
|
|
2795
|
+
contactList: {
|
|
2796
|
+
get(params: Omit<GetContactListParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontContactList>;
|
|
2797
|
+
find(params?: Omit<FindStorefrontContactListsParams, "market" | "store_id">, options?: RequestOptions): Promise<PaginatedResponse<StorefrontContactList>>;
|
|
2798
|
+
plans: {
|
|
2799
|
+
find(params: Omit<FindStorefrontContactListPlansParams, "market" | "store_id">, options?: RequestOptions): Promise<PaginatedResponse<StorefrontContactListPlan>>;
|
|
2800
|
+
};
|
|
2801
|
+
memberships: {
|
|
2802
|
+
find(params?: Omit<FindStorefrontContactListMembershipsParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<StorefrontContactListMembership>>>;
|
|
2803
|
+
};
|
|
2804
|
+
subscribe(params: Omit<SubscribeContactListParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<ContactListSubscribeResponse>>;
|
|
2805
|
+
checkAccess(params: Omit<ContactListAccessParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<ContactListAccessResponse>>;
|
|
2806
|
+
checkContentAccess(params: Omit<ContactListContentAccessParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<ContactListContentAccessResponse>>;
|
|
2807
|
+
};
|
|
2808
|
+
};
|
|
2809
|
+
action: {
|
|
2810
|
+
track(params: TrackActionParams): Promise<void>;
|
|
2811
|
+
pageView(payload?: Record<string, unknown>): Promise<void>;
|
|
2812
|
+
state: nanostores.PreinitializedWritableAtom<StorefrontAction | null> & object;
|
|
2813
|
+
};
|
|
2814
|
+
experiments: {
|
|
2815
|
+
use: (params: string | UseExperimentParams) => Promise<ExperimentUseResponse>;
|
|
2816
|
+
};
|
|
2817
|
+
support: {
|
|
2818
|
+
startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<StorefrontSupportConversationStartResponse>;
|
|
2819
|
+
sendMessage(params: StorefrontSendSupportMessageParams, opts?: RequestOptions): Promise<StorefrontSupportConversationResponse>;
|
|
2820
|
+
getConversation(params: StorefrontGetSupportConversationParams, opts?: RequestOptions): Promise<StorefrontSupportConversationResponse>;
|
|
2821
|
+
};
|
|
2822
|
+
store: {
|
|
2823
|
+
setup: nanostores.PreinitializedWritableAtom<StorefrontSetup | null> & object;
|
|
2824
|
+
load: () => Promise<StorefrontSetup>;
|
|
2825
|
+
getSetup: (options?: RequestOptions) => Promise<StorefrontSetup>;
|
|
2826
|
+
location: {
|
|
2827
|
+
getCountries(options?: RequestOptions): Promise<{
|
|
2828
|
+
items: {
|
|
2829
|
+
code: string;
|
|
2830
|
+
name: string;
|
|
2831
|
+
states: {
|
|
2832
|
+
code: string;
|
|
2833
|
+
name: string;
|
|
2834
|
+
}[];
|
|
2835
|
+
}[];
|
|
2836
|
+
cursor: string | null;
|
|
2837
|
+
}>;
|
|
2838
|
+
getCountry(countryCode: string, options?: RequestOptions): Promise<{
|
|
2839
|
+
code: string;
|
|
2840
|
+
name: string;
|
|
2841
|
+
states: {
|
|
2842
|
+
code: string;
|
|
2843
|
+
name: string;
|
|
2844
|
+
}[];
|
|
2845
|
+
}>;
|
|
2846
|
+
list(options?: RequestOptions): Promise<StorefrontLocation[]>;
|
|
2847
|
+
get(id: string, options?: RequestOptions): Promise<StorefrontLocation>;
|
|
2848
|
+
};
|
|
2849
|
+
market: {
|
|
2850
|
+
list(options?: RequestOptions): Promise<StorefrontMarket[]>;
|
|
2851
|
+
get(id: string, options?: RequestOptions): Promise<StorefrontMarket>;
|
|
2852
|
+
};
|
|
2853
|
+
};
|
|
2854
|
+
utils: {
|
|
2855
|
+
getImageUrl: (imageBlock: unknown, isBlock?: boolean) => string | null;
|
|
2856
|
+
getBlockValue: typeof getBlockValue;
|
|
2857
|
+
getBlockTextValue: typeof getBlockTextValue;
|
|
2858
|
+
getBlockContentValue: typeof getBlockContentValue;
|
|
2859
|
+
getBlockValues: typeof getBlockValues;
|
|
2860
|
+
getBlockLabel: typeof getBlockLabel;
|
|
2861
|
+
getBlockObjectValues: typeof getBlockObjectValues;
|
|
2862
|
+
getBlockFromArray: typeof getBlockFromArray;
|
|
2863
|
+
formatBlockValue: typeof formatBlockValue;
|
|
2864
|
+
prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
|
|
2865
|
+
extractBlockValues: typeof extractBlockValues;
|
|
2866
|
+
formatPrice: (prices: Price[]) => string;
|
|
2867
|
+
getPriceAmount: (prices: Price[]) => number | null;
|
|
2868
|
+
formatPayment: typeof formatPayment;
|
|
2869
|
+
formatMinor: typeof formatMinor;
|
|
2870
|
+
getCurrencySymbol: typeof getCurrencySymbol;
|
|
2871
|
+
getCurrencyName: typeof getCurrencyName;
|
|
2872
|
+
validatePhoneNumber: typeof validatePhoneNumber;
|
|
2873
|
+
tzGroups: {
|
|
2874
|
+
label: string;
|
|
2875
|
+
zones: {
|
|
2876
|
+
label: string;
|
|
2877
|
+
value: string;
|
|
2878
|
+
}[];
|
|
2879
|
+
}[];
|
|
2880
|
+
findTimeZone: typeof findTimeZone;
|
|
2881
|
+
slugify: typeof slugify;
|
|
2882
|
+
humanize: typeof humanize;
|
|
2883
|
+
categorify: typeof categorify;
|
|
2884
|
+
formatDate: typeof formatDate;
|
|
2885
|
+
getSvgContentForAstro: typeof getSvgContentForAstro;
|
|
2886
|
+
fetchSvgContent: typeof fetchSvgContent;
|
|
2887
|
+
injectSvgIntoElement: typeof injectSvgIntoElement;
|
|
2888
|
+
isValidKey: typeof isValidKey;
|
|
2889
|
+
validateKey: typeof validateKey;
|
|
2890
|
+
toKey: typeof toKey;
|
|
2891
|
+
nameToKey: typeof nameToKey;
|
|
2892
|
+
getAvailableStock: typeof getAvailableStock;
|
|
2893
|
+
getReservedStock: typeof getReservedStock;
|
|
2894
|
+
hasStock: typeof hasStock;
|
|
2895
|
+
getInventoryAt: typeof getInventoryAt;
|
|
2896
|
+
getFirstAvailableFCId: typeof getFirstAvailableFCId;
|
|
2897
|
+
};
|
|
2898
|
+
};
|
|
2899
|
+
type InitializedStoreCore = ReturnType<typeof initializeStoreCore>;
|
|
2900
|
+
type InitializedStore = InitializedStoreCore & {
|
|
2901
|
+
withContext(context: ArkyStoreContext): InitializedStore;
|
|
2902
|
+
};
|
|
2903
|
+
declare function initialize(publishableKey: string, options?: ArkyStoreConfig): InitializedStore;
|
|
2904
|
+
|
|
2905
|
+
type ArkyStore = ReturnType<typeof initialize>;
|
|
2906
|
+
type ArkyCartStore = ArkyStore["eshop"]["cart"];
|
|
2907
|
+
type ArkyServiceStore = ArkyStore["eshop"]["service"];
|
|
2908
|
+
|
|
2909
|
+
declare const SDK_VERSION = "0.10.0";
|
|
2910
|
+
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
2911
|
+
|
|
2912
|
+
interface ApiConfig {
|
|
2913
|
+
httpClient: HttpClient;
|
|
2914
|
+
storeId: string;
|
|
2915
|
+
baseUrl: string;
|
|
2916
|
+
market: string;
|
|
2917
|
+
locale: string;
|
|
2918
|
+
authStorage: AuthStorage;
|
|
2919
|
+
}
|
|
2920
|
+
interface StorefrontApiConfig {
|
|
2921
|
+
httpClient: HttpClient;
|
|
2922
|
+
apiUrl: string;
|
|
2923
|
+
publishableKey: string;
|
|
2924
|
+
market: string;
|
|
2925
|
+
locale: string;
|
|
2926
|
+
authStorage: AuthStorage;
|
|
2927
|
+
}
|
|
2928
|
+
interface AdminSessionInternal {
|
|
2929
|
+
access_token: string;
|
|
2930
|
+
refresh_token: string;
|
|
2931
|
+
access_expires_at?: number;
|
|
2932
|
+
email?: string;
|
|
2933
|
+
}
|
|
2934
|
+
interface ContactSessionInternal {
|
|
2935
|
+
sessionToken: string;
|
|
2936
|
+
contact: StorefrontContact;
|
|
2937
|
+
}
|
|
2938
|
+
interface AdminSession {
|
|
2939
|
+
email?: string;
|
|
2940
|
+
}
|
|
2941
|
+
interface ContactSession {
|
|
2942
|
+
contact: StorefrontContact;
|
|
2943
|
+
}
|
|
2944
|
+
interface StorefrontIdentifyResult {
|
|
2945
|
+
contact: StorefrontContact;
|
|
2946
|
+
verification_challenge: VerificationChallengeResponse | null;
|
|
2947
|
+
}
|
|
2948
|
+
interface StorefrontVerifyResult {
|
|
2949
|
+
contact: StorefrontContact;
|
|
2950
|
+
}
|
|
2951
|
+
type AdminSessionUpdater = (updater: (prev: AdminSessionInternal | null) => AdminSessionInternal | null) => void;
|
|
2952
|
+
type ContactSessionUpdater = (updater: (prev: ContactSessionInternal | null) => ContactSessionInternal | null) => void;
|
|
2953
|
+
type AuthStateListener<T> = (session: T | null) => void;
|
|
2954
|
+
|
|
2955
|
+
type CreateAdminConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
|
|
2956
|
+
storeId: string;
|
|
2957
|
+
market: string;
|
|
2958
|
+
locale?: string;
|
|
2959
|
+
apiToken?: string;
|
|
2960
|
+
};
|
|
2961
|
+
declare function createAdmin(config: CreateAdminConfig): {
|
|
2962
|
+
account: {
|
|
2963
|
+
update: (_params: UpdateAccountContactParams, options?: RequestOptions) => Promise<AccountUpdateResponse>;
|
|
2964
|
+
delete: (_params: DeleteAccountParams, options?: RequestOptions) => Promise<{
|
|
2965
|
+
success: boolean;
|
|
2966
|
+
message: string;
|
|
2967
|
+
}>;
|
|
2968
|
+
getMe: (_params: GetMeParams, options?: RequestOptions) => Promise<Account>;
|
|
2969
|
+
search: (params: SearchAccountsParams, options?: RequestOptions) => Promise<PaginatedResponse<Account>>;
|
|
2970
|
+
apiToken: {
|
|
2971
|
+
list: (options?: RequestOptions) => Promise<PaginatedResponse<AccountApiToken>>;
|
|
2972
|
+
create: (params: CreateAccountApiTokenParams, options?: RequestOptions) => Promise<AccountApiTokenCreated>;
|
|
2973
|
+
update: (params: UpdateAccountApiTokenParams, options?: RequestOptions) => Promise<AccountApiToken>;
|
|
2974
|
+
revoke: (id: string, options?: RequestOptions) => Promise<boolean>;
|
|
2975
|
+
};
|
|
2976
|
+
session: {
|
|
2977
|
+
list: (options?: RequestOptions) => Promise<PaginatedResponse<AccountSession>>;
|
|
2978
|
+
revoke: (id: string, options?: RequestOptions) => Promise<boolean>;
|
|
2979
|
+
};
|
|
2980
|
+
auth: {
|
|
2981
|
+
code(params: {
|
|
2982
|
+
email: string;
|
|
2983
|
+
}, options?: RequestOptions): Promise<VerificationChallengeResponse>;
|
|
2984
|
+
verify(params: AuthCodeVerifyParams, options?: RequestOptions): Promise<AuthToken>;
|
|
2985
|
+
refresh(params: {
|
|
2986
|
+
refresh_token: string;
|
|
2987
|
+
}, options?: RequestOptions): Promise<AuthToken>;
|
|
2988
|
+
storeCode(storeId: string, params: {
|
|
2989
|
+
email: string;
|
|
2990
|
+
}, options?: RequestOptions): Promise<VerificationChallengeResponse>;
|
|
2991
|
+
storeVerify(storeId: string, params: AuthCodeVerifyParams, options?: RequestOptions): Promise<AuthToken>;
|
|
2992
|
+
};
|
|
2993
|
+
};
|
|
2994
|
+
store: {
|
|
2995
|
+
create: (params: CreateStoreParams, options?: RequestOptions) => Promise<Store>;
|
|
2996
|
+
update: (params: UpdateStoreParams, options?: RequestOptions) => Promise<Store>;
|
|
2997
|
+
get: (_params: GetStoreParams, options?: RequestOptions) => Promise<Store>;
|
|
2998
|
+
find: (params?: GetStoresParams, options?: RequestOptions) => Promise<PaginatedResponse<Store>>;
|
|
2999
|
+
regeneratePublishableKey: (params?: {
|
|
3000
|
+
store_id?: string;
|
|
3001
|
+
}, options?: RequestOptions) => Promise<Store>;
|
|
3002
|
+
subscription: {
|
|
3003
|
+
get: (params?: GetStoreSubscriptionParams, options?: RequestOptions) => Promise<StoreSubscription>;
|
|
3004
|
+
getPlans: (_params: GetSubscriptionPlansParams, options?: RequestOptions) => Promise<PaginatedResponse<SubscriptionPlan>>;
|
|
3005
|
+
action: {
|
|
3006
|
+
create: (params: CreateStoreSubscriptionActionParams, options?: RequestOptions) => Promise<StoreSubscriptionAction>;
|
|
3007
|
+
find: (params?: FindStoreSubscriptionActionsParams, options?: RequestOptions) => Promise<PaginatedResponse<StoreSubscriptionAction>>;
|
|
3008
|
+
get: (params: GetStoreSubscriptionActionParams, options?: RequestOptions) => Promise<StoreSubscriptionAction>;
|
|
3009
|
+
retry: (params: RetryStoreSubscriptionActionParams, options?: RequestOptions) => Promise<StoreSubscriptionAction>;
|
|
3010
|
+
effect: {
|
|
3011
|
+
find: (params: FindStoreSubscriptionActionEffectsParams, options?: RequestOptions) => Promise<PaginatedResponse<StoreSubscriptionEffect>>;
|
|
3012
|
+
get: (params: GetStoreSubscriptionActionEffectParams, options?: RequestOptions) => Promise<StoreSubscriptionEffect>;
|
|
3013
|
+
};
|
|
3014
|
+
};
|
|
3015
|
+
createPortalSession: (params: CreatePortalSessionParams, options?: RequestOptions) => Promise<{
|
|
3016
|
+
portal_url: string;
|
|
3017
|
+
}>;
|
|
3018
|
+
};
|
|
3019
|
+
member: {
|
|
3020
|
+
add: (params: AddMemberParams, options?: RequestOptions) => Promise<boolean>;
|
|
3021
|
+
invite: (params: AddMemberParams, options?: RequestOptions) => Promise<boolean>;
|
|
3022
|
+
find: (params?: FindStoreMembersParams, options?: RequestOptions) => Promise<PaginatedResponse<StoreMember>>;
|
|
3023
|
+
findOwn: (options?: RequestOptions) => Promise<PaginatedResponse<StoreMembership>>;
|
|
3024
|
+
remove: (params: RemoveMemberParams, options?: RequestOptions) => Promise<boolean>;
|
|
3025
|
+
};
|
|
3026
|
+
buildHook: {
|
|
3027
|
+
list: (params: ListBuildHooksParams, options?: RequestOptions) => Promise<BuildHook[]>;
|
|
3028
|
+
create: (params: CreateBuildHookParams, options?: RequestOptions) => Promise<BuildHook>;
|
|
3029
|
+
update: (params: UpdateBuildHookParams, options?: RequestOptions) => Promise<BuildHook>;
|
|
3030
|
+
delete: (params: DeleteBuildHookParams, options?: RequestOptions) => Promise<{
|
|
3031
|
+
deleted: boolean;
|
|
3032
|
+
}>;
|
|
3033
|
+
};
|
|
3034
|
+
webhook: {
|
|
3035
|
+
test: (params: TestWebhookParams, options?: RequestOptions) => Promise<TestWebhookResponse>;
|
|
3036
|
+
list: (params: ListWebhooksParams, options?: RequestOptions) => Promise<Webhook[]>;
|
|
3037
|
+
create: (params: CreateWebhookParams, options?: RequestOptions) => Promise<Webhook>;
|
|
3038
|
+
update: (params: UpdateWebhookParams, options?: RequestOptions) => Promise<Webhook>;
|
|
3039
|
+
delete: (params: DeleteWebhookParams, options?: RequestOptions) => Promise<{
|
|
3040
|
+
deleted: boolean;
|
|
3041
|
+
}>;
|
|
3042
|
+
};
|
|
3043
|
+
config: {
|
|
3044
|
+
getPayment: (params: {
|
|
3045
|
+
store_id: string;
|
|
3046
|
+
}, options?: RequestOptions) => Promise<PaymentStoreConfig | null>;
|
|
3047
|
+
};
|
|
3048
|
+
location: {
|
|
3049
|
+
getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
|
|
3050
|
+
getCountry(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
|
|
3051
|
+
list(options?: RequestOptions): Promise<Location[]>;
|
|
3052
|
+
get(id: string, options?: RequestOptions): Promise<Location>;
|
|
3053
|
+
create(params: CreateLocationParams, options?: RequestOptions): Promise<Location>;
|
|
3054
|
+
update(params: UpdateLocationParams, options?: RequestOptions): Promise<Location>;
|
|
3055
|
+
delete(params: DeleteLocationParams, options?: RequestOptions): Promise<{
|
|
3056
|
+
deleted: boolean;
|
|
3057
|
+
}>;
|
|
3058
|
+
};
|
|
3059
|
+
market: {
|
|
3060
|
+
list(options?: RequestOptions): Promise<Market[]>;
|
|
3061
|
+
get(id: string, options?: RequestOptions): Promise<Market>;
|
|
3062
|
+
create(params: CreateMarketParams, options?: RequestOptions): Promise<Market>;
|
|
3063
|
+
update(params: UpdateMarketParams, options?: RequestOptions): Promise<Market>;
|
|
3064
|
+
delete(params: DeleteMarketParams, options?: RequestOptions): Promise<{
|
|
3065
|
+
deleted: boolean;
|
|
3066
|
+
}>;
|
|
3067
|
+
};
|
|
3068
|
+
paymentProvider: {
|
|
3069
|
+
list: (params?: ListPaymentProvidersParams, options?: RequestOptions) => Promise<PaymentProvider[]>;
|
|
3070
|
+
refresh: (params?: RefreshPaymentProvidersParams, options?: RequestOptions) => Promise<PaymentProvider[]>;
|
|
3071
|
+
connectStripe: (params: ConnectStripePaymentProviderParams, options?: RequestOptions) => Promise<StripePaymentProviderConnectResponse>;
|
|
3072
|
+
delete: (params: DeletePaymentProviderParams, options?: RequestOptions) => Promise<{
|
|
3073
|
+
deleted: boolean;
|
|
3074
|
+
}>;
|
|
3075
|
+
};
|
|
3076
|
+
};
|
|
3077
|
+
media: {
|
|
3078
|
+
getMedia(params: GetMediaParams, options?: RequestOptions): Promise<Media>;
|
|
3079
|
+
uploadStoreMedia(params: UploadStoreMediaParams, options?: RequestOptions): Promise<Media[]>;
|
|
3080
|
+
deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions): Promise<boolean>;
|
|
3081
|
+
getStoreMedia(params: GetStoreMediaParams, options?: RequestOptions): Promise<PaginatedResponse<Media>>;
|
|
3082
|
+
updateMedia(params: UpdateMediaParams, options?: RequestOptions): Promise<Media>;
|
|
3083
|
+
};
|
|
3084
|
+
notification: {
|
|
3085
|
+
email: {
|
|
3086
|
+
send: (request: EmailSendRequest, options?: RequestOptions) => Promise<EmailSendResult>;
|
|
3087
|
+
getDelivery: (params: GetEmailDeliveryParams, options?: RequestOptions) => Promise<EmailDelivery>;
|
|
3088
|
+
retryDelivery: (params: RetryEmailDeliveryParams, options?: RequestOptions) => Promise<EmailDelivery>;
|
|
3089
|
+
};
|
|
3090
|
+
mailbox: {
|
|
3091
|
+
connectGoogle(params: ConnectGoogleMailboxParams, options?: RequestOptions): Promise<GoogleMailboxConnectUrl>;
|
|
3092
|
+
create(params: CreateMailboxParams, options?: RequestOptions): Promise<Mailbox>;
|
|
3093
|
+
update(params: UpdateMailboxParams, options?: RequestOptions): Promise<Mailbox>;
|
|
3094
|
+
get(params: GetMailboxParams, options?: RequestOptions): Promise<Mailbox>;
|
|
3095
|
+
test(params: TestMailboxParams, options?: RequestOptions): Promise<TestMailboxResult>;
|
|
3096
|
+
prepare(params: PrepareMailboxParams, options?: RequestOptions): Promise<Mailbox>;
|
|
3097
|
+
find(params?: FindMailboxesParams, options?: RequestOptions): Promise<PaginatedResponse<Mailbox>>;
|
|
3098
|
+
};
|
|
3099
|
+
};
|
|
3100
|
+
platform: {
|
|
3101
|
+
getCurrencies(options?: RequestOptions): Promise<string[]>;
|
|
3102
|
+
getWorkflowTools(options?: RequestOptions): Promise<WorkflowTool[]>;
|
|
3103
|
+
getWebhookEvents(options?: RequestOptions): Promise<EventMetadata[]>;
|
|
3104
|
+
data: {
|
|
3105
|
+
scan(params: {
|
|
3106
|
+
key: string;
|
|
3107
|
+
limit?: number;
|
|
3108
|
+
}, options?: RequestOptions): Promise<{
|
|
3109
|
+
value: Array<{
|
|
3110
|
+
key: string;
|
|
3111
|
+
value: unknown;
|
|
3112
|
+
}>;
|
|
3113
|
+
}>;
|
|
3114
|
+
put(params: {
|
|
3115
|
+
key: string;
|
|
3116
|
+
value: unknown;
|
|
3117
|
+
previous_key?: string;
|
|
3118
|
+
}, options?: RequestOptions): Promise<{
|
|
3119
|
+
ok: boolean;
|
|
3120
|
+
}>;
|
|
3121
|
+
delete(params: {
|
|
3122
|
+
key: string;
|
|
3123
|
+
}, options?: RequestOptions): Promise<{
|
|
3124
|
+
ok: boolean;
|
|
3125
|
+
}>;
|
|
3126
|
+
};
|
|
3127
|
+
runScript(params: {
|
|
3128
|
+
name: string;
|
|
3129
|
+
value?: string;
|
|
3130
|
+
username?: string;
|
|
3131
|
+
password?: string;
|
|
3132
|
+
}, options?: RequestOptions): Promise<{
|
|
3133
|
+
success: boolean;
|
|
3134
|
+
message: string;
|
|
3135
|
+
}>;
|
|
3136
|
+
};
|
|
3137
|
+
social: {
|
|
3138
|
+
connection: {
|
|
3139
|
+
getCapabilities: (params?: GetSocialCapabilitiesParams, options?: RequestOptions) => Promise<SocialProviderCapability[]>;
|
|
3140
|
+
list: (params?: ListSocialConnectionsParams, options?: RequestOptions) => Promise<SocialConnection[]>;
|
|
3141
|
+
connect: (params: ConnectSocialConnectionParams, options?: RequestOptions) => Promise<SocialConnectResponse>;
|
|
3142
|
+
getOAuthAttempt: (params: GetSocialOAuthAttemptParams, options?: RequestOptions) => Promise<SocialOAuthCallbackResponse>;
|
|
3143
|
+
selectDestination: (params: SelectSocialDestinationParams, options?: RequestOptions) => Promise<SocialOAuthCallbackResponse>;
|
|
3144
|
+
delete: (params: DeleteSocialConnectionParams, options?: RequestOptions) => Promise<{
|
|
3145
|
+
deleted: boolean;
|
|
3146
|
+
}>;
|
|
3147
|
+
};
|
|
3148
|
+
publication: {
|
|
3149
|
+
create: (params: CreateSocialPublicationParams, options?: RequestOptions) => Promise<SocialPublicationMutationResponse>;
|
|
3150
|
+
update: (params: UpdateSocialPublicationParams, options?: RequestOptions) => Promise<SocialPublicationMutationResponse>;
|
|
3151
|
+
get: (params: GetSocialPublicationParams, options?: RequestOptions) => Promise<SocialPublication>;
|
|
3152
|
+
find: (params?: FindSocialPublicationsParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialPublication>>;
|
|
3153
|
+
validate: (params: ValidateSocialPublicationParams, options?: RequestOptions) => Promise<SocialPublicationValidation>;
|
|
3154
|
+
schedule: (params: ScheduleSocialPublicationParams, options?: RequestOptions) => Promise<SocialPublicationMutationResponse>;
|
|
3155
|
+
cancel: (params: CancelSocialPublicationParams, options?: RequestOptions) => Promise<SocialPublication>;
|
|
3156
|
+
getComments: (params: GetSocialPublicationCommentsParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
3157
|
+
syncComments: (params: SyncSocialPublicationCommentsParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
3158
|
+
getCommentThread: (params: GetSocialPublicationCommentThreadParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
3159
|
+
syncCommentThread: (params: SyncSocialPublicationCommentThreadParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
3160
|
+
findComments: (params?: FindSocialPublicationCommentsParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
3161
|
+
classifyComments: (params?: ClassifySocialPublicationCommentsParams, options?: RequestOptions) => Promise<SocialPublicationCommentClassificationResult>;
|
|
3162
|
+
commentReply: {
|
|
3163
|
+
create: (params: CreateSocialCommentReplyParams, options?: RequestOptions) => Promise<SocialPublicationCommentReplyResponse>;
|
|
3164
|
+
list: (params: ListSocialCommentRepliesParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialCommentReply>>;
|
|
3165
|
+
get: (params: GetSocialCommentReplyParams, options?: RequestOptions) => Promise<SocialCommentReply>;
|
|
3166
|
+
retry: (params: RetrySocialCommentReplyParams, options?: RequestOptions) => Promise<SocialCommentReply>;
|
|
3167
|
+
};
|
|
3168
|
+
effect: {
|
|
3169
|
+
list: (params: ListSocialPublicationEffectsParams, options?: RequestOptions) => Promise<PaginatedResponse<SocialPublicationEffect>>;
|
|
3170
|
+
get: (params: GetSocialPublicationEffectParams, options?: RequestOptions) => Promise<SocialPublicationEffect>;
|
|
3171
|
+
};
|
|
3172
|
+
getMetrics: (params: GetSocialPublicationMetricsParams, options?: RequestOptions) => Promise<SocialPublicationMetricSnapshot>;
|
|
3173
|
+
syncMetrics: (params: SyncSocialPublicationMetricsParams, options?: RequestOptions) => Promise<SocialPublicationMetricSnapshot>;
|
|
3174
|
+
syncEngagement: (params?: SyncSocialEngagementParams, options?: RequestOptions) => Promise<SocialPublicationEngagementSyncResult>;
|
|
3175
|
+
};
|
|
3176
|
+
};
|
|
3177
|
+
cms: {
|
|
3178
|
+
collection: {
|
|
3179
|
+
create: (params: CreateCollectionParams, options?: RequestOptions) => Promise<Collection>;
|
|
3180
|
+
update: (params: UpdateCollectionParams, options?: RequestOptions) => Promise<Collection>;
|
|
3181
|
+
delete: (params: DeleteCollectionParams, options?: RequestOptions) => Promise<boolean>;
|
|
3182
|
+
get: (params: GetCollectionParams, options?: RequestOptions) => Promise<Collection>;
|
|
3183
|
+
find: (params?: GetCollectionsParams, options?: RequestOptions) => Promise<PaginatedResponse<Collection>>;
|
|
3184
|
+
};
|
|
3185
|
+
entry: {
|
|
3186
|
+
create: (params: CreateEntryParams, options?: RequestOptions) => Promise<CollectionEntry>;
|
|
3187
|
+
update: (params: UpdateEntryParams, options?: RequestOptions) => Promise<CollectionEntry>;
|
|
3188
|
+
delete: (params: DeleteEntryParams, options?: RequestOptions) => Promise<boolean>;
|
|
3189
|
+
get: (params: GetEntryParams, options?: RequestOptions) => Promise<CollectionEntry>;
|
|
3190
|
+
find: (params: GetEntriesParams, options?: RequestOptions) => Promise<PaginatedResponse<CollectionEntry>>;
|
|
3191
|
+
};
|
|
3192
|
+
form: {
|
|
3193
|
+
create: (params: CreateFormParams, options?: RequestOptions) => Promise<Form>;
|
|
3194
|
+
update: (params: UpdateFormParams, options?: RequestOptions) => Promise<Form>;
|
|
3195
|
+
delete: (params: DeleteFormParams, options?: RequestOptions) => Promise<{
|
|
3196
|
+
deleted: boolean;
|
|
3197
|
+
}>;
|
|
3198
|
+
get: (params: GetFormParams, options?: RequestOptions) => Promise<Form>;
|
|
3199
|
+
find: (params: GetFormsParams, options?: RequestOptions) => Promise<PaginatedResponse<Form>>;
|
|
3200
|
+
submit: (params: SubmitFormParams, options?: RequestOptions) => Promise<FormSubmission>;
|
|
3201
|
+
getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions) => Promise<PaginatedResponse<FormSubmission>>;
|
|
3202
|
+
getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions) => Promise<FormSubmission>;
|
|
3203
|
+
updateSubmission: (params: UpdateFormSubmissionParams, options?: RequestOptions) => Promise<FormSubmission>;
|
|
3204
|
+
};
|
|
3205
|
+
taxonomy: {
|
|
3206
|
+
create: (params: CreateTaxonomyParams, options?: RequestOptions) => Promise<Taxonomy>;
|
|
3207
|
+
update: (params: UpdateTaxonomyParams, options?: RequestOptions) => Promise<Taxonomy>;
|
|
3208
|
+
delete: (params: DeleteTaxonomyParams, options?: RequestOptions) => Promise<{
|
|
3209
|
+
deleted: boolean;
|
|
3210
|
+
}>;
|
|
3211
|
+
get: (params: GetTaxonomyParams, options?: RequestOptions) => Promise<Taxonomy>;
|
|
3212
|
+
find: (params: GetTaxonomiesParams, options?: RequestOptions) => Promise<PaginatedResponse<Taxonomy>>;
|
|
3213
|
+
getChildren: (params: GetTaxonomyChildrenParams, options?: RequestOptions) => Promise<PaginatedResponse<Taxonomy>>;
|
|
3214
|
+
};
|
|
3215
|
+
emailTemplate: {
|
|
3216
|
+
create: (params: CreateEmailTemplateParams, options?: RequestOptions) => Promise<EmailTemplate>;
|
|
3217
|
+
update: (params: UpdateEmailTemplateParams, options?: RequestOptions) => Promise<EmailTemplate>;
|
|
3218
|
+
delete: (params: DeleteEmailTemplateParams, options?: RequestOptions) => Promise<{
|
|
3219
|
+
deleted: boolean;
|
|
3220
|
+
}>;
|
|
3221
|
+
get: (params: GetEmailTemplateParams, options?: RequestOptions) => Promise<EmailTemplate>;
|
|
3222
|
+
find: (params: GetEmailTemplatesParams, options?: RequestOptions) => Promise<PaginatedResponse<EmailTemplate>>;
|
|
3223
|
+
preview: (params: PreviewEmailTemplateParams, options?: RequestOptions) => Promise<PreviewEmailTemplateResponse>;
|
|
3224
|
+
};
|
|
3225
|
+
};
|
|
3226
|
+
eshop: {
|
|
3227
|
+
product: {
|
|
3228
|
+
create: (params: CreateProductParams, options?: RequestOptions) => Promise<Product>;
|
|
3229
|
+
update: (params: UpdateProductParams, options?: RequestOptions) => Promise<Product>;
|
|
3230
|
+
delete: (params: DeleteProductParams, options?: RequestOptions) => Promise<{
|
|
3231
|
+
deleted: boolean;
|
|
3232
|
+
}>;
|
|
3233
|
+
get: (params: GetProductParams, options?: RequestOptions) => Promise<Product>;
|
|
3234
|
+
find: (params: GetProductsParams, options?: RequestOptions) => Promise<PaginatedResponse<Product>>;
|
|
3235
|
+
};
|
|
3236
|
+
order: {
|
|
3237
|
+
update: (params: UpdateOrderParams, options?: RequestOptions) => Promise<Order>;
|
|
3238
|
+
get: (params: GetOrderParams, options?: RequestOptions) => Promise<Order>;
|
|
3239
|
+
find: (params: GetOrdersParams, options?: RequestOptions) => Promise<PaginatedResponse<Order>>;
|
|
3240
|
+
getQuote: (params: GetQuoteParams, options?: RequestOptions) => Promise<OrderQuote>;
|
|
3241
|
+
createRefund: (params: CreateOrderRefundParams, options?: RequestOptions) => Promise<CreateOrderRefundResponse>;
|
|
3242
|
+
getRefund: (params: GetOrderRefundParams, options?: RequestOptions) => Promise<OrderRefund>;
|
|
3243
|
+
getRefunds: (params: FindOrderRefundsParams, options?: RequestOptions) => Promise<PaginatedResponse<OrderRefund>>;
|
|
3244
|
+
getPayment: (params: GetOrderPaymentParams, options?: RequestOptions) => Promise<OrderPayment>;
|
|
3245
|
+
retryPaymentTransaction: (params: RetryPaymentTransactionParams, options?: RequestOptions) => Promise<PaymentTransaction>;
|
|
3246
|
+
getPaymentTransactions: (params: FindPaymentTransactionsParams, options?: RequestOptions) => Promise<PaginatedResponse<PaymentTransaction>>;
|
|
3247
|
+
getPaymentTransaction: (params: GetPaymentTransactionParams, options?: RequestOptions) => Promise<PaymentTransaction>;
|
|
3248
|
+
findDigitalAccess: (params: FindDigitalAccessGrantsParams, options?: RequestOptions) => Promise<PaginatedResponse<DigitalAccessGrant>>;
|
|
3249
|
+
getDigitalAccess: (params: GetDigitalAccessGrantParams, options?: RequestOptions) => Promise<DigitalAccessGrant>;
|
|
3250
|
+
downloadDigitalAccess: (params: DownloadDigitalAccessParams, options?: RequestOptions) => Promise<DigitalAccessDownloadResponse>;
|
|
3251
|
+
activateDigitalAccess: (params: ActivateDigitalAccessGrantParams, options?: RequestOptions) => Promise<DigitalAccessGrant>;
|
|
3252
|
+
revokeDigitalAccess: (params: RevokeDigitalAccessGrantParams, options?: RequestOptions) => Promise<DigitalAccessGrant>;
|
|
3253
|
+
};
|
|
3254
|
+
shipment: {
|
|
3255
|
+
getRates: (params: GetShippingRatesParams, options?: RequestOptions) => Promise<ShippingRate[]>;
|
|
3256
|
+
create: (params: CreateShipmentParams, options?: RequestOptions) => Promise<CreateShipmentResponse>;
|
|
3257
|
+
get: (params: GetShipmentParams, options?: RequestOptions) => Promise<Shipment>;
|
|
3258
|
+
find: (params: FindShipmentsParams, options?: RequestOptions) => Promise<PaginatedResponse<Shipment>>;
|
|
3259
|
+
retry: (params: RetryShipmentParams, options?: RequestOptions) => Promise<Shipment>;
|
|
3260
|
+
fulfillment: {
|
|
3261
|
+
find: (params: FindFulfillmentOrdersParams, options?: RequestOptions) => Promise<PaginatedResponse<FulfillmentOrder>>;
|
|
3262
|
+
get: (params: GetFulfillmentOrderParams, options?: RequestOptions) => Promise<FulfillmentOrder>;
|
|
3263
|
+
};
|
|
3264
|
+
refund: {
|
|
3265
|
+
request: (params: RequestShippingLabelRefundParams, options?: RequestOptions) => Promise<ShippingLabelRefund>;
|
|
3266
|
+
get: (params: GetShippingLabelRefundParams, options?: RequestOptions) => Promise<ShippingLabelRefund>;
|
|
3267
|
+
find: (params: FindShippingLabelRefundsParams, options?: RequestOptions) => Promise<PaginatedResponse<ShippingLabelRefund>>;
|
|
3268
|
+
retry: (params: RetryShippingLabelRefundParams, options?: RequestOptions) => Promise<ShippingLabelRefund>;
|
|
3269
|
+
};
|
|
3270
|
+
adjustment: {
|
|
3271
|
+
find: (params: FindShippingLabelAdjustmentsParams, options?: RequestOptions) => Promise<PaginatedResponse<ShippingLabelAdjustment>>;
|
|
3272
|
+
};
|
|
3273
|
+
settlement: {
|
|
3274
|
+
find: (params: FindShippingLabelSettlementsParams, options?: RequestOptions) => Promise<PaginatedResponse<ShippingLabelSettlement>>;
|
|
3275
|
+
retry: (params: RetryShippingLabelSettlementParams, options?: RequestOptions) => Promise<ShippingLabelSettlement>;
|
|
3276
|
+
};
|
|
3277
|
+
};
|
|
3278
|
+
cart: {
|
|
3279
|
+
create: (params: CreateCartParams, options?: RequestOptions) => Promise<Cart>;
|
|
3280
|
+
update: (params: UpdateCartParams, options?: RequestOptions) => Promise<Cart>;
|
|
3281
|
+
get: (params: GetCartParams, options?: RequestOptions) => Promise<Cart>;
|
|
3282
|
+
find: (params?: FindCartsParams, options?: RequestOptions) => Promise<PaginatedResponse<Cart>>;
|
|
3283
|
+
addItem: (params: AddCartItemParams, options?: RequestOptions) => Promise<Cart>;
|
|
3284
|
+
removeItem: (params: RemoveCartItemParams, options?: RequestOptions) => Promise<Cart>;
|
|
3285
|
+
clear: (params: ClearCartParams, options?: RequestOptions) => Promise<Cart>;
|
|
3286
|
+
quote: (params: QuoteCartParams, options?: RequestOptions) => Promise<OrderQuote>;
|
|
3287
|
+
checkout: (params: CheckoutCartParams, options?: RequestOptions) => Promise<OrderCheckoutResult>;
|
|
3288
|
+
};
|
|
3289
|
+
service: {
|
|
3290
|
+
create: (params: CreateServiceParams, options?: RequestOptions) => Promise<Service>;
|
|
3291
|
+
update: (params: UpdateServiceParams, options?: RequestOptions) => Promise<Service>;
|
|
3292
|
+
delete: (params: DeleteServiceParams, options?: RequestOptions) => Promise<void>;
|
|
3293
|
+
get: (params: GetServiceParams, options?: RequestOptions) => Promise<Service>;
|
|
3294
|
+
find: (params: GetServicesParams, options?: RequestOptions) => Promise<PaginatedResponse<Service>>;
|
|
3295
|
+
getAvailability: (params: GetAvailabilityParams, options?: RequestOptions) => Promise<AvailabilityResponse>;
|
|
3296
|
+
findProviders: (params: FindServiceProvidersParams, options?: RequestOptions) => Promise<ServiceProvider[]>;
|
|
3297
|
+
createProvider: (params: CreateServiceProviderParams, options?: RequestOptions) => Promise<ServiceProvider>;
|
|
3298
|
+
updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions) => Promise<ServiceProvider>;
|
|
3299
|
+
deleteProvider: (params: DeleteServiceProviderParams, options?: RequestOptions) => Promise<void>;
|
|
3300
|
+
};
|
|
3301
|
+
provider: {
|
|
3302
|
+
create: (params: CreateProviderParams, options?: RequestOptions) => Promise<Provider>;
|
|
3303
|
+
update: (params: UpdateProviderParams, options?: RequestOptions) => Promise<Provider>;
|
|
3304
|
+
delete: (params: DeleteProviderParams, options?: RequestOptions) => Promise<void>;
|
|
3305
|
+
get: (params: GetProviderParams, options?: RequestOptions) => Promise<Provider>;
|
|
3306
|
+
find: (params: GetProvidersParams, options?: RequestOptions) => Promise<PaginatedResponse<Provider>>;
|
|
3307
|
+
};
|
|
3308
|
+
promoCode: {
|
|
3309
|
+
createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions): Promise<PromoCode>;
|
|
3310
|
+
updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions): Promise<PromoCode>;
|
|
3311
|
+
deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions): Promise<{
|
|
3312
|
+
deleted: boolean;
|
|
3313
|
+
}>;
|
|
3314
|
+
getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<PromoCode>;
|
|
3315
|
+
getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions): Promise<PaginatedResponse<PromoCode>>;
|
|
3316
|
+
};
|
|
3317
|
+
};
|
|
3318
|
+
crm: {
|
|
3319
|
+
contact: {
|
|
3320
|
+
create: (params: CreateContactParams, options?: RequestOptions) => Promise<Contact$1>;
|
|
3321
|
+
get: (params: GetContactParams, options?: RequestOptions) => Promise<Contact$1>;
|
|
3322
|
+
find: (params?: FindContactsParams, options?: RequestOptions) => Promise<{
|
|
3323
|
+
items: Contact$1[];
|
|
3324
|
+
cursor?: string;
|
|
3325
|
+
}>;
|
|
3326
|
+
update: (params: UpdateContactParams, options?: RequestOptions) => Promise<Contact$1>;
|
|
3327
|
+
merge: (params: MergeContactsParams, options?: RequestOptions) => Promise<Contact$1>;
|
|
3328
|
+
import: (params: ImportContactsParams, options?: RequestOptions) => Promise<ImportContactsResult>;
|
|
3329
|
+
findSessions: (params: FindContactSessionsParams, options?: RequestOptions) => Promise<PaginatedResponse<ContactSessionRecord>>;
|
|
3330
|
+
revokeSession: (params: RevokeContactSessionParams, options?: RequestOptions) => Promise<{
|
|
3331
|
+
success: boolean;
|
|
3332
|
+
}>;
|
|
3333
|
+
revokeAllSessions: (params: RevokeAllContactSessionsParams, options?: RequestOptions) => Promise<{
|
|
3334
|
+
success: boolean;
|
|
3335
|
+
}>;
|
|
3336
|
+
};
|
|
3337
|
+
contactList: {
|
|
3338
|
+
create: (params: CreateContactListParams, options?: RequestOptions) => Promise<ContactList>;
|
|
3339
|
+
update: (params: UpdateContactListParams, options?: RequestOptions) => Promise<ContactList>;
|
|
3340
|
+
get: (params: GetContactListParams, options?: RequestOptions) => Promise<ContactList>;
|
|
3341
|
+
find: (params?: FindContactListsParams, options?: RequestOptions) => Promise<PaginatedResponse<ContactList>>;
|
|
3342
|
+
importContacts: (params: ImportContactsIntoContactListParams, options?: RequestOptions) => Promise<ImportContactsIntoContactListResult>;
|
|
3343
|
+
previewImportContacts: (params: ImportContactListPreviewParams, options?: RequestOptions) => Promise<ImportContactsPreviewResult>;
|
|
3344
|
+
addMember: (params: AddContactListContactParams, options?: RequestOptions) => Promise<ContactListMember>;
|
|
3345
|
+
updateMember: (params: UpdateContactListContactParams, options?: RequestOptions) => Promise<ContactListMember>;
|
|
3346
|
+
removeMember: (params: RemoveContactListContactParams, options?: RequestOptions) => Promise<{
|
|
3347
|
+
deleted: boolean;
|
|
3348
|
+
}>;
|
|
3349
|
+
findMembers: (params: FindContactListContactsParams, options?: RequestOptions) => Promise<PaginatedResponse<ContactListMember>>;
|
|
3350
|
+
plans: {
|
|
3351
|
+
create(params: CreateContactListPlanParams, options?: RequestOptions): Promise<ContactListPlan>;
|
|
3352
|
+
update(params: UpdateContactListPlanParams, options?: RequestOptions): Promise<ContactListPlan>;
|
|
3353
|
+
get(params: GetContactListPlanParams, options?: RequestOptions): Promise<ContactListPlan>;
|
|
3354
|
+
find(params: FindContactListPlansParams, options?: RequestOptions): Promise<PaginatedResponse<ContactListPlan>>;
|
|
3355
|
+
retryCatalog(params: RetryContactListPlanCatalogParams, options?: RequestOptions): Promise<ContactListPlan>;
|
|
3356
|
+
};
|
|
3357
|
+
memberships: {
|
|
3358
|
+
refund: (params: RefundContactListMembershipParams, options?: RequestOptions) => Promise<RefundContactListMembershipResult>;
|
|
3359
|
+
paymentAttempts: {
|
|
3360
|
+
find(params: FindContactListMembershipPaymentAttemptsParams, options?: RequestOptions): Promise<PaginatedResponse<ContactListMembershipPaymentAttempt>>;
|
|
3361
|
+
get(params: GetContactListMembershipPaymentAttemptParams, options?: RequestOptions): Promise<ContactListMembershipPaymentAttempt>;
|
|
3362
|
+
};
|
|
3363
|
+
refunds: {
|
|
3364
|
+
find(params: FindContactListMembershipRefundsParams, options?: RequestOptions): Promise<PaginatedResponse<ContactListMembershipRefund>>;
|
|
3365
|
+
get(params: GetContactListMembershipRefundParams, options?: RequestOptions): Promise<ContactListMembershipRefund>;
|
|
3366
|
+
retry(params: RetryContactListMembershipRefundParams, options?: RequestOptions): Promise<ContactListMembershipRefund>;
|
|
3367
|
+
};
|
|
3368
|
+
cancellations: {
|
|
3369
|
+
find(params: FindContactListMembershipCancellationsParams, options?: RequestOptions): Promise<PaginatedResponse<ContactListMembershipCancellation>>;
|
|
3370
|
+
get(params: GetContactListMembershipCancellationParams, options?: RequestOptions): Promise<ContactListMembershipCancellation>;
|
|
3371
|
+
retry(params: RetryContactListMembershipCancellationParams, options?: RequestOptions): Promise<ContactListMembershipCancellation>;
|
|
3372
|
+
};
|
|
3373
|
+
};
|
|
3374
|
+
};
|
|
3375
|
+
action: {
|
|
3376
|
+
timeline(params: TimelineParams, options?: RequestOptions): Promise<{
|
|
3377
|
+
items: Action[];
|
|
3378
|
+
cursor: string | null;
|
|
3379
|
+
}>;
|
|
3380
|
+
find(params: FindActionsParams, options?: RequestOptions): Promise<{
|
|
3381
|
+
items: Action[];
|
|
3382
|
+
cursor: string | null;
|
|
3383
|
+
}>;
|
|
3384
|
+
};
|
|
3385
|
+
};
|
|
3386
|
+
outreach: {
|
|
3387
|
+
campaign: {
|
|
3388
|
+
create(params: CreateCampaignParams, options?: RequestOptions): Promise<Campaign>;
|
|
3389
|
+
update(params: UpdateCampaignParams, options?: RequestOptions): Promise<Campaign>;
|
|
3390
|
+
get(params: GetCampaignParams, options?: RequestOptions): Promise<Campaign>;
|
|
3391
|
+
find(params?: FindCampaignsParams, options?: RequestOptions): Promise<PaginatedResponse<Campaign>>;
|
|
3392
|
+
launch(params: LaunchCampaignParams, options?: RequestOptions): Promise<Campaign>;
|
|
3393
|
+
duplicate(params: DuplicateCampaignParams, options?: RequestOptions): Promise<Campaign>;
|
|
3394
|
+
launchReadiness(params: GetCampaignLaunchReadinessParams, options?: RequestOptions): Promise<CampaignLaunchReadiness>;
|
|
3395
|
+
importEnrollments(params: ImportCampaignEnrollmentsParams, options?: RequestOptions): Promise<CampaignEnrollmentImportResult>;
|
|
3396
|
+
generatePersonalizedDrafts(params: GenerateOutreachPersonalizedDraftsParams, options?: RequestOptions): Promise<Campaign>;
|
|
3397
|
+
};
|
|
3398
|
+
campaignEnrollment: {
|
|
3399
|
+
find(params?: FindCampaignEnrollmentsParams, options?: RequestOptions): Promise<PaginatedResponse<CampaignEnrollment>>;
|
|
3400
|
+
get(params: GetCampaignEnrollmentConversationParams, options?: RequestOptions): Promise<CampaignEnrollmentConversationResponse>;
|
|
3401
|
+
update(params: UpdateCampaignEnrollmentParams, options?: RequestOptions): Promise<CampaignEnrollment>;
|
|
3402
|
+
updateDraft(params: UpdateCampaignEnrollmentDraftParams, options?: RequestOptions): Promise<CampaignEnrollment>;
|
|
3403
|
+
updateStepExecution(params: UpdateCampaignEnrollmentStepExecutionParams, options?: RequestOptions): Promise<CampaignEnrollmentConversationResponse>;
|
|
3404
|
+
reply(params: ReplyCampaignEnrollmentParams, options?: RequestOptions): Promise<CampaignEnrollmentConversationResponse>;
|
|
3405
|
+
stop(params: StopCampaignEnrollmentParams, options?: RequestOptions): Promise<CampaignEnrollmentConversationResponse>;
|
|
3406
|
+
};
|
|
3407
|
+
campaignMessage: {
|
|
3408
|
+
find(params?: FindCampaignMessagesParams, options?: RequestOptions): Promise<PaginatedResponse<CampaignMessage>>;
|
|
3409
|
+
update(params: UpdateCampaignMessageParams, options?: RequestOptions): Promise<CampaignMessage>;
|
|
3410
|
+
};
|
|
3411
|
+
suppression: {
|
|
3412
|
+
create(params: CreateSuppressionParams, options?: RequestOptions): Promise<Suppression>;
|
|
3413
|
+
update(params: UpdateSuppressionParams, options?: RequestOptions): Promise<Suppression>;
|
|
3414
|
+
get(params: GetSuppressionParams, options?: RequestOptions): Promise<Suppression>;
|
|
3415
|
+
find(params?: FindSuppressionsParams, options?: RequestOptions): Promise<PaginatedResponse<Suppression>>;
|
|
3416
|
+
};
|
|
3417
|
+
leadResearch: {
|
|
3418
|
+
createRun(params: CreateLeadResearchRunParams, options?: RequestOptions): Promise<LeadResearchRun>;
|
|
3419
|
+
findRuns(params?: FindLeadResearchRunsParams, options?: RequestOptions): Promise<PaginatedResponse<LeadResearchRun>>;
|
|
3420
|
+
getRun(params: GetLeadResearchRunParams, options?: RequestOptions): Promise<LeadResearchRun>;
|
|
3421
|
+
updateRun(params: UpdateLeadResearchRunParams, options?: RequestOptions): Promise<LeadResearchRun>;
|
|
3422
|
+
cancelRun(params: CancelLeadResearchRunParams, options?: RequestOptions): Promise<LeadResearchRun>;
|
|
3423
|
+
sendMessage(params: SendLeadResearchMessageParams, options?: RequestOptions): Promise<SendLeadResearchMessageResult>;
|
|
3424
|
+
findMessages(params: FindLeadResearchMessagesParams, options?: RequestOptions): Promise<LeadResearchMessage[]>;
|
|
3425
|
+
validateEmail(params: ValidateLeadEmailParams, options?: RequestOptions): Promise<LeadEmailValidationResult>;
|
|
3426
|
+
};
|
|
3427
|
+
};
|
|
3428
|
+
automation: {
|
|
3429
|
+
workflow: {
|
|
3430
|
+
create: (params: CreateWorkflowParams, options?: RequestOptions) => Promise<Workflow>;
|
|
3431
|
+
update: (params: UpdateWorkflowParams, options?: RequestOptions) => Promise<Workflow>;
|
|
3432
|
+
delete: (params: DeleteWorkflowParams, options?: RequestOptions) => Promise<boolean>;
|
|
3433
|
+
get: (params: GetWorkflowParams, options?: RequestOptions) => Promise<Workflow>;
|
|
3434
|
+
find: (params?: GetWorkflowsParams, options?: RequestOptions) => Promise<PaginatedResponse<Workflow>>;
|
|
3435
|
+
trigger: (params: TriggerWorkflowParams, options?: RequestOptions) => Promise<WorkflowExecution>;
|
|
3436
|
+
getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions) => Promise<PaginatedResponse<WorkflowExecution>>;
|
|
3437
|
+
getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions) => Promise<WorkflowExecution>;
|
|
3438
|
+
listEffects: (params: GetWorkflowEffectsParams, options?: RequestOptions) => Promise<PaginatedResponse<WorkflowEffect>>;
|
|
3439
|
+
getEffect: (params: GetWorkflowEffectParams, options?: RequestOptions) => Promise<WorkflowEffect>;
|
|
3440
|
+
listConnections: (params?: GetWorkflowConnectionsParams, options?: RequestOptions) => Promise<WorkflowConnection[]>;
|
|
3441
|
+
getConnectionConnectUrl: (params: GetWorkflowConnectionConnectUrlParams, options?: RequestOptions) => Promise<WorkflowConnectionConnectUrl>;
|
|
3442
|
+
deleteConnection: (params: DeleteWorkflowConnectionParams, options?: RequestOptions) => Promise<boolean>;
|
|
3443
|
+
};
|
|
3444
|
+
support: {
|
|
3445
|
+
createChannel: (params: CreateSupportChannelParams, opts?: RequestOptions) => Promise<SupportChannel>;
|
|
3446
|
+
getChannel: (params: {
|
|
3447
|
+
store_id: string;
|
|
3448
|
+
id: string;
|
|
3449
|
+
}, opts?: RequestOptions) => Promise<SupportChannel>;
|
|
3450
|
+
findChannels: (params: FindSupportChannelsParams, opts?: RequestOptions) => Promise<{
|
|
3451
|
+
items: SupportChannel[];
|
|
3452
|
+
cursor?: string;
|
|
3453
|
+
}>;
|
|
3454
|
+
updateChannel: (params: UpdateSupportChannelParams, opts?: RequestOptions) => Promise<SupportChannel>;
|
|
3455
|
+
deleteChannel: (params: {
|
|
3456
|
+
store_id: string;
|
|
3457
|
+
id: string;
|
|
3458
|
+
}, opts?: RequestOptions) => Promise<void>;
|
|
3459
|
+
receiveChannelMessage: (params: ReceiveSupportChannelMessageParams, opts?: RequestOptions) => Promise<SupportConversationResponse>;
|
|
3460
|
+
createAgent: (params: CreateSupportAgentParams, opts?: RequestOptions) => Promise<SupportAgent>;
|
|
3461
|
+
getAgent: (params: {
|
|
3462
|
+
store_id: string;
|
|
3463
|
+
id: string;
|
|
3464
|
+
}, opts?: RequestOptions) => Promise<SupportAgent>;
|
|
3465
|
+
findAgents: (params: {
|
|
3466
|
+
store_id: string;
|
|
3467
|
+
status?: string;
|
|
3468
|
+
limit?: number;
|
|
3469
|
+
cursor?: string;
|
|
3470
|
+
}, opts?: RequestOptions) => Promise<{
|
|
3471
|
+
items: SupportAgent[];
|
|
3472
|
+
cursor?: string;
|
|
3473
|
+
}>;
|
|
3474
|
+
updateAgent: (params: UpdateSupportAgentParams, opts?: RequestOptions) => Promise<SupportAgent>;
|
|
3475
|
+
deleteAgent: (params: {
|
|
3476
|
+
store_id: string;
|
|
3477
|
+
id: string;
|
|
3478
|
+
}, opts?: RequestOptions) => Promise<void>;
|
|
3479
|
+
findConversations: (params: FindSupportConversationsParams, opts?: RequestOptions) => Promise<{
|
|
3480
|
+
items: SupportConversation[];
|
|
3481
|
+
cursor?: string;
|
|
3482
|
+
}>;
|
|
3483
|
+
getConversation: (params: GetSupportConversationParams, opts?: RequestOptions) => Promise<SupportConversationResponse>;
|
|
3484
|
+
sendConversationMessage: (params: SendSupportMessageParams, opts?: RequestOptions) => Promise<SupportConversationResponse>;
|
|
3485
|
+
replyToConversation: (params: ReplySupportConversationParams, opts?: RequestOptions) => Promise<SupportConversationResponse>;
|
|
3486
|
+
resolveConversation: (params: ResolveSupportConversationParams, opts?: RequestOptions) => Promise<SupportConversation>;
|
|
3487
|
+
assignConversation: (params: AssignSupportConversationParams, opts?: RequestOptions) => Promise<SupportConversation>;
|
|
3488
|
+
};
|
|
3489
|
+
};
|
|
3490
|
+
analytics: {
|
|
3491
|
+
get(request: AnalyticsRequest, options?: RequestOptions & {
|
|
3492
|
+
store_id?: string;
|
|
3493
|
+
}): Promise<AnalyticsResponse>;
|
|
3494
|
+
};
|
|
3495
|
+
experiments: {
|
|
3496
|
+
create(params: CreateExperimentParams, options?: RequestOptions): Promise<Experiment>;
|
|
3497
|
+
update(params: UpdateExperimentParams, options?: RequestOptions): Promise<Experiment>;
|
|
3498
|
+
get(params: GetExperimentParams, options?: RequestOptions): Promise<Experiment>;
|
|
3499
|
+
find(params?: FindExperimentsParams, options?: RequestOptions): Promise<PaginatedResponse<Experiment>>;
|
|
3500
|
+
results(params: GetExperimentParams, options?: RequestOptions): Promise<ExperimentResults>;
|
|
3501
|
+
};
|
|
3502
|
+
setStoreId: (storeId: string) => void;
|
|
3503
|
+
getStoreId: () => string;
|
|
3504
|
+
setMarket: (market: string) => void;
|
|
3505
|
+
getMarket: () => string;
|
|
3506
|
+
setLocale: (locale: string) => void;
|
|
3507
|
+
getLocale: () => string;
|
|
3508
|
+
readonly session: AdminSession | null;
|
|
3509
|
+
readonly isAuthenticated: boolean;
|
|
3510
|
+
onAuthStateChanged(listener: AuthStateListener<AdminSession>): () => void;
|
|
3511
|
+
logout(): Promise<void>;
|
|
3512
|
+
utils: {
|
|
3513
|
+
getImageUrl: (imageBlock: unknown, isBlock?: boolean) => string | null;
|
|
3514
|
+
getBlockValue: typeof getBlockValue;
|
|
3515
|
+
getBlockTextValue: typeof getBlockTextValue;
|
|
3516
|
+
getBlockContentValue: typeof getBlockContentValue;
|
|
3517
|
+
getBlockValues: typeof getBlockValues;
|
|
3518
|
+
getBlockLabel: typeof getBlockLabel;
|
|
3519
|
+
getBlockObjectValues: typeof getBlockObjectValues;
|
|
3520
|
+
getBlockFromArray: typeof getBlockFromArray;
|
|
3521
|
+
formatBlockValue: typeof formatBlockValue;
|
|
3522
|
+
prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
|
|
3523
|
+
extractBlockValues: typeof extractBlockValues;
|
|
3524
|
+
formatPrice: (prices: Price[]) => string;
|
|
3525
|
+
getPriceAmount: (prices: Price[]) => number | null;
|
|
3526
|
+
formatPayment: typeof formatPayment;
|
|
3527
|
+
formatMinor: typeof formatMinor;
|
|
3528
|
+
getCurrencySymbol: typeof getCurrencySymbol;
|
|
3529
|
+
getCurrencyName: typeof getCurrencyName;
|
|
3530
|
+
validatePhoneNumber: typeof validatePhoneNumber;
|
|
3531
|
+
tzGroups: {
|
|
3532
|
+
label: string;
|
|
3533
|
+
zones: {
|
|
3534
|
+
label: string;
|
|
3535
|
+
value: string;
|
|
3536
|
+
}[];
|
|
3537
|
+
}[];
|
|
3538
|
+
findTimeZone: typeof findTimeZone;
|
|
3539
|
+
slugify: typeof slugify;
|
|
3540
|
+
humanize: typeof humanize;
|
|
3541
|
+
categorify: typeof categorify;
|
|
3542
|
+
formatDate: typeof formatDate;
|
|
3543
|
+
getSvgContentForAstro: typeof getSvgContentForAstro;
|
|
3544
|
+
fetchSvgContent: typeof fetchSvgContent;
|
|
3545
|
+
injectSvgIntoElement: typeof injectSvgIntoElement;
|
|
3546
|
+
isValidKey: typeof isValidKey;
|
|
3547
|
+
validateKey: typeof validateKey;
|
|
3548
|
+
toKey: typeof toKey;
|
|
3549
|
+
nameToKey: typeof nameToKey;
|
|
3550
|
+
getAvailableStock: typeof getAvailableStock;
|
|
3551
|
+
getReservedStock: typeof getReservedStock;
|
|
3552
|
+
hasStock: typeof hasStock;
|
|
3553
|
+
getInventoryAt: typeof getInventoryAt;
|
|
3554
|
+
getFirstAvailableFCId: typeof getFirstAvailableFCId;
|
|
3555
|
+
};
|
|
3556
|
+
};
|
|
3557
|
+
interface StorefrontSessionStorage {
|
|
3558
|
+
getItem(key: string): string | null;
|
|
3559
|
+
setItem(key: string, value: string): void;
|
|
3560
|
+
removeItem(key: string): void;
|
|
3561
|
+
}
|
|
3562
|
+
interface StorefrontContext {
|
|
3563
|
+
locale?: string;
|
|
3564
|
+
market?: string;
|
|
3565
|
+
}
|
|
3566
|
+
interface StorefrontOptions extends StorefrontContext {
|
|
3567
|
+
apiUrl?: string;
|
|
3568
|
+
sessionStorage?: StorefrontSessionStorage;
|
|
3569
|
+
}
|
|
3570
|
+
declare const DEFAULT_STOREFRONT_API_URL = "https://api.arky.io";
|
|
3571
|
+
declare function createStorefrontClientCore(publishableKeyInput: string, options?: StorefrontOptions, isolatedSession?: boolean): {
|
|
3572
|
+
identify: (params?: {
|
|
3573
|
+
email?: string;
|
|
3574
|
+
verify?: boolean;
|
|
3575
|
+
market?: string;
|
|
3576
|
+
}) => Promise<StorefrontIdentifyResult>;
|
|
3577
|
+
verify: (params: {
|
|
3578
|
+
challenge_id: string;
|
|
3579
|
+
code: string;
|
|
3580
|
+
}) => Promise<StorefrontVerifyResult>;
|
|
3581
|
+
logout: () => Promise<void>;
|
|
3582
|
+
me: () => Promise<StorefrontContact>;
|
|
3583
|
+
readonly session: ContactSession | null;
|
|
3584
|
+
readonly isAuthenticated: boolean;
|
|
3585
|
+
onAuthStateChanged(listener: AuthStateListener<ContactSession>): () => void;
|
|
3586
|
+
store: {
|
|
3587
|
+
getSetup: (options?: RequestOptions) => Promise<StorefrontSetup>;
|
|
3588
|
+
location: {
|
|
3589
|
+
getCountries(options?: RequestOptions): Promise<{
|
|
3590
|
+
items: {
|
|
3591
|
+
code: string;
|
|
3592
|
+
name: string;
|
|
3593
|
+
states: {
|
|
3594
|
+
code: string;
|
|
3595
|
+
name: string;
|
|
3596
|
+
}[];
|
|
3597
|
+
}[];
|
|
3598
|
+
cursor: string | null;
|
|
3599
|
+
}>;
|
|
3600
|
+
getCountry(countryCode: string, options?: RequestOptions): Promise<{
|
|
3601
|
+
code: string;
|
|
3602
|
+
name: string;
|
|
3603
|
+
states: {
|
|
3604
|
+
code: string;
|
|
3605
|
+
name: string;
|
|
3606
|
+
}[];
|
|
3607
|
+
}>;
|
|
3608
|
+
list(options?: RequestOptions): Promise<StorefrontLocation[]>;
|
|
3609
|
+
get(id: string, options?: RequestOptions): Promise<StorefrontLocation>;
|
|
3610
|
+
};
|
|
3611
|
+
market: {
|
|
3612
|
+
list(options?: RequestOptions): Promise<StorefrontMarket[]>;
|
|
3613
|
+
get(id: string, options?: RequestOptions): Promise<StorefrontMarket>;
|
|
3614
|
+
};
|
|
3615
|
+
};
|
|
3616
|
+
cms: {
|
|
3617
|
+
collection: {
|
|
3618
|
+
get(params: Omit<{
|
|
3619
|
+
store_id?: string;
|
|
3620
|
+
} & {
|
|
3621
|
+
id: string;
|
|
3622
|
+
key?: never;
|
|
3623
|
+
}, "market" | "store_id"> | Omit<{
|
|
3624
|
+
store_id?: string;
|
|
3625
|
+
} & {
|
|
3626
|
+
id?: never;
|
|
3627
|
+
key: string;
|
|
3628
|
+
}, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Collection>>;
|
|
3629
|
+
};
|
|
3630
|
+
entry: {
|
|
3631
|
+
get(params: Omit<GetEntryParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<CollectionEntry>>;
|
|
3632
|
+
find(params: Omit<GetEntriesParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<CollectionEntry>>>;
|
|
3633
|
+
};
|
|
3634
|
+
form: {
|
|
3635
|
+
get(params: Omit<GetFormParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Form>>;
|
|
3636
|
+
submit(params: Omit<SubmitFormParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<FormSubmission>>;
|
|
3637
|
+
};
|
|
3638
|
+
taxonomy: {
|
|
3639
|
+
get(params: Omit<GetTaxonomyParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Taxonomy>>;
|
|
3640
|
+
getChildren(params: Omit<GetTaxonomyChildrenParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<Taxonomy>>>;
|
|
3641
|
+
};
|
|
3642
|
+
};
|
|
3643
|
+
eshop: {
|
|
3644
|
+
product: {
|
|
3645
|
+
get(params: Omit<{
|
|
3646
|
+
store_id?: string;
|
|
3647
|
+
} & {
|
|
3648
|
+
id: string;
|
|
3649
|
+
slug?: never;
|
|
3650
|
+
}, "market" | "store_id"> | Omit<{
|
|
3651
|
+
store_id?: string;
|
|
3652
|
+
} & {
|
|
3653
|
+
id?: never;
|
|
3654
|
+
slug: string;
|
|
3655
|
+
}, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Product>>;
|
|
3656
|
+
find(params: Omit<GetProductsParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<Product>>>;
|
|
3657
|
+
};
|
|
3658
|
+
cart: {
|
|
3659
|
+
current(options?: RequestOptions): Promise<StorefrontDto<Cart>>;
|
|
3660
|
+
get(params: Omit<GetCartParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Cart>>;
|
|
3661
|
+
update(params: Omit<UpdateCartParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Cart>>;
|
|
3662
|
+
addItem(params: Omit<AddCartItemParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Cart>>;
|
|
3663
|
+
removeItem(params: Omit<{
|
|
3664
|
+
id: string;
|
|
3665
|
+
store_id?: string;
|
|
3666
|
+
} & {
|
|
3667
|
+
item_id: string;
|
|
3668
|
+
product_id?: never;
|
|
3669
|
+
variant_id?: never;
|
|
3670
|
+
}, "market" | "store_id"> | Omit<{
|
|
3671
|
+
id: string;
|
|
3672
|
+
store_id?: string;
|
|
3673
|
+
} & {
|
|
3674
|
+
item_id?: never;
|
|
3675
|
+
product_id: string;
|
|
3676
|
+
variant_id: string;
|
|
3677
|
+
}, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Cart>>;
|
|
3678
|
+
clear(params: Omit<ClearCartParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Cart>>;
|
|
3679
|
+
quote(params: Omit<QuoteCartParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<OrderQuote>>;
|
|
3680
|
+
checkout(params: Omit<CheckoutCartParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<OrderCheckoutResult>>;
|
|
3681
|
+
};
|
|
3682
|
+
order: {
|
|
3683
|
+
get(params: Omit<GetOrderParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Order>>;
|
|
3684
|
+
find(params: Omit<GetOrdersParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<Order>>>;
|
|
3685
|
+
downloadDigitalAccess(params: Omit<GetDigitalAccessGrantParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<DigitalAccessDownloadResponse>>;
|
|
3686
|
+
findDigitalAccess(params: Omit<FindDigitalAccessGrantsParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<DigitalAccessGrant>>>;
|
|
3687
|
+
getDigitalAccess(params: Omit<GetDigitalAccessGrantParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<DigitalAccessGrant>>;
|
|
3688
|
+
};
|
|
3689
|
+
service: {
|
|
3690
|
+
get(params: Omit<{
|
|
3691
|
+
store_id?: string;
|
|
3692
|
+
} & {
|
|
3693
|
+
id: string;
|
|
3694
|
+
slug?: never;
|
|
3695
|
+
}, "market" | "store_id"> | Omit<{
|
|
3696
|
+
store_id?: string;
|
|
3697
|
+
} & {
|
|
3698
|
+
id?: never;
|
|
3699
|
+
slug: string;
|
|
3700
|
+
}, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Service>>;
|
|
3701
|
+
find(params: Omit<GetServicesParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<Service>>>;
|
|
3702
|
+
findProviders(params: Omit<{
|
|
3703
|
+
store_id?: string;
|
|
3704
|
+
} & {
|
|
3705
|
+
service_id: string;
|
|
3706
|
+
provider_id?: string;
|
|
3707
|
+
}, "market" | "store_id"> | Omit<{
|
|
3708
|
+
store_id?: string;
|
|
3709
|
+
} & {
|
|
3710
|
+
service_id?: string;
|
|
3711
|
+
provider_id: string;
|
|
3712
|
+
}, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<ServiceProvider[]>>;
|
|
3713
|
+
getAvailability(params: Omit<GetAvailabilityParams, "market" | "store_id">, options?: RequestOptions): Promise<AvailabilityResponse>;
|
|
3714
|
+
};
|
|
3715
|
+
provider: {
|
|
3716
|
+
get(params: Omit<{
|
|
3717
|
+
store_id?: string;
|
|
3718
|
+
} & {
|
|
3719
|
+
id: string;
|
|
3720
|
+
slug?: never;
|
|
3721
|
+
}, "market" | "store_id"> | Omit<{
|
|
3722
|
+
store_id?: string;
|
|
3723
|
+
} & {
|
|
3724
|
+
id?: never;
|
|
3725
|
+
slug: string;
|
|
3726
|
+
}, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<Provider>>;
|
|
3727
|
+
find(params: Omit<GetProvidersParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<Provider>>>;
|
|
3728
|
+
};
|
|
3729
|
+
};
|
|
3730
|
+
crm: {
|
|
3731
|
+
contact: {
|
|
3732
|
+
identify: (params?: {
|
|
3733
|
+
email?: string;
|
|
3734
|
+
}) => Promise<StorefrontIdentifyResult>;
|
|
3735
|
+
requestCode: (params?: {
|
|
3736
|
+
email?: string;
|
|
3737
|
+
}) => Promise<StorefrontIdentifyResult>;
|
|
3738
|
+
verify: (params: {
|
|
3739
|
+
challenge_id: string;
|
|
3740
|
+
code: string;
|
|
3741
|
+
}) => Promise<StorefrontVerifyResult>;
|
|
3742
|
+
logout: () => Promise<void>;
|
|
3743
|
+
getMe: () => Promise<StorefrontContact>;
|
|
3744
|
+
};
|
|
3745
|
+
contactList: {
|
|
3746
|
+
get(params: Omit<GetContactListParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontContactList>;
|
|
3747
|
+
find(params?: Omit<FindStorefrontContactListsParams, "market" | "store_id">, options?: RequestOptions): Promise<PaginatedResponse<StorefrontContactList>>;
|
|
3748
|
+
plans: {
|
|
3749
|
+
find(params: Omit<FindStorefrontContactListPlansParams, "market" | "store_id">, options?: RequestOptions): Promise<PaginatedResponse<StorefrontContactListPlan>>;
|
|
3750
|
+
};
|
|
3751
|
+
memberships: {
|
|
3752
|
+
find(params?: Omit<FindStorefrontContactListMembershipsParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<PaginatedResponse<StorefrontContactListMembership>>>;
|
|
3753
|
+
};
|
|
3754
|
+
subscribe(params: Omit<SubscribeContactListParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<ContactListSubscribeResponse>>;
|
|
3755
|
+
checkAccess(params: Omit<ContactListAccessParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<ContactListAccessResponse>>;
|
|
3756
|
+
checkContentAccess(params: Omit<ContactListContentAccessParams, "market" | "store_id">, options?: RequestOptions): Promise<StorefrontDto<ContactListContentAccessResponse>>;
|
|
3757
|
+
};
|
|
3758
|
+
};
|
|
3759
|
+
action: {
|
|
3760
|
+
COMMON_ACTION_KEYS: readonly ["page.view", "product.view", "service.view", "provider.view", "cart.added", "cart.removed", "checkout.started", "order.created", "signin", "signup", "verified.email", "search", "share", "wishlist.added"];
|
|
3761
|
+
track(params: TrackActionParams): Promise<void>;
|
|
3762
|
+
};
|
|
3763
|
+
experiments: {
|
|
3764
|
+
use(params: UseExperimentParams, options?: RequestOptions): Promise<ExperimentUseResponse>;
|
|
3765
|
+
};
|
|
3766
|
+
support: {
|
|
3767
|
+
startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<StorefrontSupportConversationStartResponse>;
|
|
3768
|
+
sendMessage(params: StorefrontSendSupportMessageParams, opts?: RequestOptions): Promise<StorefrontSupportConversationResponse>;
|
|
3769
|
+
getConversation(params: StorefrontGetSupportConversationParams, opts?: RequestOptions): Promise<StorefrontSupportConversationResponse>;
|
|
3770
|
+
};
|
|
3771
|
+
getSetup: (requestOptions?: RequestOptions) => Promise<StorefrontSetup>;
|
|
3772
|
+
setContext: (context: StorefrontContext) => void;
|
|
3773
|
+
setMarket: (value: string) => void;
|
|
3774
|
+
getMarket: () => string;
|
|
3775
|
+
setLocale: (value: string) => void;
|
|
3776
|
+
getLocale: () => string;
|
|
3777
|
+
utils: {
|
|
3778
|
+
getImageUrl: (imageBlock: unknown, isBlock?: boolean) => string | null;
|
|
3779
|
+
getBlockValue: typeof getBlockValue;
|
|
3780
|
+
getBlockTextValue: typeof getBlockTextValue;
|
|
3781
|
+
getBlockContentValue: typeof getBlockContentValue;
|
|
3782
|
+
getBlockValues: typeof getBlockValues;
|
|
3783
|
+
getBlockLabel: typeof getBlockLabel;
|
|
3784
|
+
getBlockObjectValues: typeof getBlockObjectValues;
|
|
3785
|
+
getBlockFromArray: typeof getBlockFromArray;
|
|
3786
|
+
formatBlockValue: typeof formatBlockValue;
|
|
3787
|
+
prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
|
|
3788
|
+
extractBlockValues: typeof extractBlockValues;
|
|
3789
|
+
formatPrice: (prices: Price[]) => string;
|
|
3790
|
+
getPriceAmount: (prices: Price[]) => number | null;
|
|
3791
|
+
formatPayment: typeof formatPayment;
|
|
3792
|
+
formatMinor: typeof formatMinor;
|
|
3793
|
+
getCurrencySymbol: typeof getCurrencySymbol;
|
|
3794
|
+
getCurrencyName: typeof getCurrencyName;
|
|
3795
|
+
validatePhoneNumber: typeof validatePhoneNumber;
|
|
3796
|
+
tzGroups: {
|
|
3797
|
+
label: string;
|
|
3798
|
+
zones: {
|
|
3799
|
+
label: string;
|
|
3800
|
+
value: string;
|
|
3801
|
+
}[];
|
|
3802
|
+
}[];
|
|
3803
|
+
findTimeZone: typeof findTimeZone;
|
|
3804
|
+
slugify: typeof slugify;
|
|
3805
|
+
humanize: typeof humanize;
|
|
3806
|
+
categorify: typeof categorify;
|
|
3807
|
+
formatDate: typeof formatDate;
|
|
3808
|
+
getSvgContentForAstro: typeof getSvgContentForAstro;
|
|
3809
|
+
fetchSvgContent: typeof fetchSvgContent;
|
|
3810
|
+
injectSvgIntoElement: typeof injectSvgIntoElement;
|
|
3811
|
+
isValidKey: typeof isValidKey;
|
|
3812
|
+
validateKey: typeof validateKey;
|
|
3813
|
+
toKey: typeof toKey;
|
|
3814
|
+
nameToKey: typeof nameToKey;
|
|
3815
|
+
getAvailableStock: typeof getAvailableStock;
|
|
3816
|
+
getReservedStock: typeof getReservedStock;
|
|
3817
|
+
hasStock: typeof hasStock;
|
|
3818
|
+
getInventoryAt: typeof getInventoryAt;
|
|
3819
|
+
getFirstAvailableFCId: typeof getFirstAvailableFCId;
|
|
3820
|
+
};
|
|
3821
|
+
};
|
|
3822
|
+
type StorefrontClientCore = ReturnType<typeof createStorefrontClientCore>;
|
|
3823
|
+
type StorefrontClient = StorefrontClientCore & {
|
|
3824
|
+
withContext(context: StorefrontContext): StorefrontClient;
|
|
3825
|
+
};
|
|
3826
|
+
declare function createStorefront(publishableKey: string, options?: StorefrontOptions): StorefrontClient;
|
|
3827
|
+
|
|
3828
|
+
export { type ArkyCartInput as A, Account, AccountApiToken, AccountApiTokenCreated, AccountSession, AccountUpdateResponse, Action, type ActionFeedCategory, type ActionFeedCursor, type ActionFeedData, type ActionFeedItem, type ActionFeedSummary, ActivateDigitalAccessGrantParams, AddCartItemParams, AddContactListContactParams, Address, type AdminSession, type AdminSessionInternal, type AdminSessionUpdater, type AnalyticsActionReportKey, type AnalyticsBlockRequest, type AnalyticsBlockResponse, type AnalyticsBreakdownData, type AnalyticsBreakdownItem, type AnalyticsBreakdownReportKey, type AnalyticsCompositeReportKey, type AnalyticsMetricData, type AnalyticsMetricReportKey, type AnalyticsReport, type AnalyticsReportKey, type AnalyticsReportRequest, type AnalyticsRequest, type AnalyticsResponse, type AnalyticsTimeRange, type ApiConfig, type ArkyCartStore, type ArkyServiceStore, type ArkyStore, type ArkyStoreConfig, type ArkyStoreContext, type ArkyStripePaymentMountOptions, type AssignSupportConversationParams, type AuthStateListener, AvailabilityResponse, Block, BlockSchema, BuildHook, type BusinessOverviewData, COMMON_ACTION_KEYS, Campaign, CampaignEnrollment, CampaignEnrollmentConversationResponse, CampaignLaunchReadiness, CampaignMessage, CancelLeadResearchRunParams, CancelSocialPublicationParams, Cart, type CartApi, type CartController, type CartControllerAddItemParams, type CartControllerCheckoutParams, type CartControllerClearParams, type CartControllerInitParams, type CartControllerListener, type CartControllerQuoteParams, type CartControllerRefreshParams, type CartControllerRemoveItemParams, type CartControllerState, type CartControllerUpdateParams, CartOrigin, CartStatus, CheckoutCartParams, ClassifySocialPublicationCommentsParams, ClearCartParams, Collection, CollectionEntry, CollectionStatus, type CommonActionKey, ConditionValue, ConnectSocialConnectionParams, ConnectStripePaymentProviderParams, Contact, type ContactFunnelData, type ContactFunnelStage, ContactList, ContactListAccessParams, ContactListAccessResponse, ContactListContentAccessParams, ContactListContentAccessResponse, ContactListMember, ContactListMembershipCancellation, ContactListMembershipPaymentAttempt, ContactListMembershipRefund, ContactListPlan, ContactListSubscribeResponse, type ContactSession, type ContactSessionInternal, type ContactSessionUpdater, type CreateAdminConfig, CreateCampaignParams, CreateCartParams, CreateCollectionParams, CreateContactListParams, CreateContactListPlanParams, CreateEntryParams, type CreateExperimentParams, CreateLeadResearchRunParams, CreateLocationParams, CreateMailboxParams, CreateMarketParams, CreateOrderRefundParams, CreateOrderRefundResponse, CreateShipmentParams, CreateShipmentResponse, CreateSocialCommentReplyParams, CreateSocialPublicationParams, CreateStoreSubscriptionActionParams, type CreateSupportChannelParams, CreateSuppressionParams, Currency, DEFAULT_STOREFRONT_API_URL, type DataHealthData, DeleteCollectionParams, DeleteEntryParams, DeleteLocationParams, DeletePaymentProviderParams, DeleteSocialConnectionParams, DigitalAccessDownloadResponse, DigitalAccessGrant, DigitalAssetStatus, DigitalAssetType, DigitalDeliveryPolicy, DownloadDigitalAccessParams, DuplicateCampaignParams, type EdgeTrigger, EmailDelivery, EmailSendRequest, EmailSendResult, EmailTemplate, type EntityStatusOverviewData, EntryStatus, EshopCartItem, type EventMetadata, type EventScopeField, type Experiment, type ExperimentResults, type ExperimentStatus, type ExperimentUseResponse, type ExperimentVariant, type ExperimentVariantResult, FindCampaignEnrollmentsParams, FindCampaignMessagesParams, FindCampaignsParams, FindCartsParams, FindContactListContactsParams, FindContactListMembershipCancellationsParams, FindContactListMembershipPaymentAttemptsParams, FindContactListMembershipRefundsParams, FindContactListPlansParams, FindContactListsParams, FindContactSessionsParams, FindDigitalAccessGrantsParams, type FindExperimentsParams, FindFulfillmentOrdersParams, FindLeadResearchMessagesParams, FindLeadResearchRunsParams, FindMailboxesParams, FindOrderRefundsParams, FindPaymentTransactionsParams, FindShipmentsParams, FindShippingLabelAdjustmentsParams, FindShippingLabelRefundsParams, FindShippingLabelSettlementsParams, FindSocialPublicationCommentsParams, FindSocialPublicationsParams, FindStoreSubscriptionActionEffectsParams, FindStoreSubscriptionActionsParams, FindStorefrontContactListMembershipsParams, FindStorefrontContactListPlansParams, FindStorefrontContactListsParams, type FindSupportChannelsParams, type FindSupportConversationsParams, FindSuppressionsParams, Form, FormEntry, FormField, FormSchema, FormSubmission, FormValues, FulfillmentOrder, GenerateOutreachPersonalizedDraftsParams, GetAvailabilityParams, GetCampaignEnrollmentConversationParams, GetCampaignLaunchReadinessParams, GetCampaignParams, GetCartParams, GetCollectionParams, GetCollectionsParams, GetContactListMembershipCancellationParams, GetContactListMembershipPaymentAttemptParams, GetContactListMembershipRefundParams, GetContactListParams, GetContactListPlanParams, type GetCountriesResponse, GetCurrentCartParams, GetDigitalAccessGrantParams, GetEmailDeliveryParams, GetEntriesParams, GetEntryParams, type GetExperimentParams, GetFulfillmentOrderParams, GetLeadResearchRunParams, GetMailboxParams, GetOrderPaymentParams, GetOrderRefundParams, GetPaymentTransactionParams, GetShipmentParams, GetShippingLabelRefundParams, GetShippingRatesParams, GetSocialCapabilitiesParams, GetSocialCommentReplyParams, GetSocialOAuthAttemptParams, GetSocialPublicationCommentThreadParams, GetSocialPublicationCommentsParams, GetSocialPublicationEffectParams, GetSocialPublicationMetricsParams, GetSocialPublicationParams, GetStoreSubscriptionActionEffectParams, GetStoreSubscriptionActionParams, type GetSupportConversationParams, GetSuppressionParams, HttpClientConfig, ImportCampaignEnrollmentsParams, ImportContactListPreviewParams, ImportContactsIntoContactListParams, ImportContactsIntoContactListResult, ImportContactsParams, ImportContactsPreviewResult, ImportContactsResult, LaunchCampaignParams, LeadEmailValidationResult, LeadResearchMessage, LeadResearchRun, ListPaymentProvidersParams, ListSocialCommentRepliesParams, ListSocialConnectionsParams, ListSocialPublicationEffectsParams, Location, type LocationCountry, type LocationState, Mailbox, Market, Media, Order, OrderCheckoutItemInput, OrderPayment, OrderQuote, OrderRefund, type OutreachFunnelData, type OutreachFunnelStage, type OutreachOverviewData, PaginatedResponse, PaymentMethod, PaymentMethodType, PaymentProvider, PaymentStoreConfig, PaymentTransaction, PrepareMailboxParams, Price, Product, ProductCheckoutItemInput, ProductStatus, ProductVariant, PromoCode, Provider, ProviderStatus, QuoteCartParams, type ReceiveSupportChannelMessageParams, RefreshPaymentProvidersParams, RefundContactListMembershipParams, RefundContactListMembershipResult, RemoveCartItemParams, RemoveContactListContactParams, ReplyCampaignEnrollmentParams, type ReplySupportConversationParams, RequestShippingLabelRefundParams, type ResolveSupportConversationParams, RetryContactListMembershipCancellationParams, RetryContactListMembershipRefundParams, RetryContactListPlanCatalogParams, RetryEmailDeliveryParams, RetryPaymentTransactionParams, RetryShipmentParams, RetryShippingLabelRefundParams, RetryShippingLabelSettlementParams, RetrySocialCommentReplyParams, RetryStoreSubscriptionActionParams, type RevenueByCurrencyData, RevokeAllContactSessionsParams, RevokeContactSessionParams, RevokeDigitalAccessGrantParams, type StripeConfirmationTokenController as S, SDK_VERSION, SUPPORTED_FRAMEWORKS, ScheduleSocialPublicationParams, SendLeadResearchMessageParams, SendLeadResearchMessageResult, type SendSupportMessageParams, Service, ServiceCheckoutItemInput, ServiceProvider, ServiceStatus, Shipment, ShippingLabelAdjustment, ShippingLabelRefund, ShippingLabelSettlement, ShippingRate, SlotRange, SocialCommentReply, SocialConnectResponse, SocialConnection, SocialOAuthCallbackResponse, SocialProviderCapability, SocialPublication, SocialPublicationComment, SocialPublicationCommentClassificationResult, SocialPublicationCommentReplyResponse, SocialPublicationEffect, SocialPublicationEngagementSyncResult, SocialPublicationMetricSnapshot, SocialPublicationMutationResponse, SocialPublicationValidation, StopCampaignEnrollmentParams, Store, StoreMember, StoreMembership, StoreSubscription, StoreSubscriptionAction, StoreSubscriptionEffect, type StorefrontAction, type StorefrontApiConfig, type StorefrontClient, type StorefrontContact, StorefrontContactList, StorefrontContactListMembership, StorefrontContactListPlan, type StorefrontContext, type StorefrontDto, type StorefrontGetSupportConversationParams, type StorefrontIdentifyResult, type StorefrontLocation, type StorefrontMarket, type StorefrontOptions, type StorefrontSendSupportMessageParams, type StorefrontSessionStorage, type StorefrontSetup, type StorefrontSupportConversationResponse, type StorefrontSupportConversationStartResponse, type StorefrontVerifyResult, type StorefrontZone, StripePaymentProviderConnectResponse, SubscribeContactListParams, SubscriptionPlan, type SupportAction, type SupportAgent, type SupportAgentAiConfig, type SupportAgentEdge, type SupportAgentNode, type SupportAgentStatus, type SupportChannel, type SupportChannelConfig, type SupportChannelStatus, type SupportChannelType, type SupportConversation, type SupportConversationChannelContext, type SupportConversationResponse, type SupportConversationStartResponse, type SupportMessage, Suppression, SyncSocialEngagementParams, SyncSocialPublicationCommentThreadParams, SyncSocialPublicationCommentsParams, SyncSocialPublicationMetricsParams, Taxonomy, TaxonomyField, TestMailboxParams, TestMailboxResult, TestWebhookParams, TestWebhookResponse, type TimelineParams, type TrackActionParams, UpdateCampaignEnrollmentDraftParams, UpdateCampaignEnrollmentParams, UpdateCampaignEnrollmentStepExecutionParams, UpdateCampaignMessageParams, UpdateCampaignParams, UpdateCartParams, UpdateCollectionParams, UpdateContactListContactParams, UpdateContactListParams, UpdateContactListPlanParams, UpdateEntryParams, type UpdateExperimentParams, UpdateLeadResearchRunParams, UpdateLocationParams, UpdateMailboxParams, UpdateMarketParams, UpdateSocialPublicationParams, type UpdateSupportChannelParams, UpdateSuppressionParams, type UseExperimentParams, ValidateLeadEmailParams, ValidateSocialPublicationParams, Webhook, Workflow, WorkflowConnection, WorkflowConnectionConnectUrl, WorkflowEffect, WorkflowExecution, type WorkflowTool, type WorkflowToolOperation, type WorkflowToolResource, Zone, ZoneLocation, type StripeConfirmationTokenControllerConfig as a, type StripeConfirmationTokenOptions as b, buildFormFields, createStripeConfirmationTokenController as c, createAdmin, createCartController, createFormEntry, createFormEntryFromValues, createStorefront, type StripeConfirmationTokenResult as d, type ArkyCartSnapshot as e, type ArkyCartStatus as f, getBlockContentValue as g, type ArkyCmsEntryParams as h, type ArkyCmsState as i, initialize, type ArkyEshopState as j, type ArkyLastOrder as k, type ArkyPaymentController as l, type ArkyServiceCartItem as m, type ArkyServiceFormGroup as n, type ArkyServiceFormState as o, type ArkyServiceSlot as p, type ArkyServiceState as q, type ArkySubmitFormByKeyParams as r };
|