arky-sdk 0.9.0 → 0.9.11
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 +113 -194
- package/dist/admin-BKXmDIVk.d.ts +1396 -0
- package/dist/admin-CAwQrMOX.d.cts +1396 -0
- package/dist/admin.cjs +1239 -455
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +3 -3
- package/dist/admin.d.ts +3 -3
- package/dist/admin.js +1239 -455
- package/dist/admin.js.map +1 -1
- package/dist/api-DJI3S6XA.d.cts +4204 -0
- package/dist/api-DJI3S6XA.d.ts +4204 -0
- package/dist/{index-C5gikdBg.d.cts → index-BaSBPLdF.d.ts} +1 -1
- package/dist/{index-MFMjlIfS.d.ts → index-u-gjHnKs.d.cts} +1 -1
- package/dist/index.cjs +1360 -610
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1360 -610
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +590 -382
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +182 -156
- package/dist/storefront.d.ts +182 -156
- package/dist/storefront.js +588 -381
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -2666
- package/dist/types.d.ts +1 -2666
- package/dist/types.js.map +1 -1
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/package.json +9 -11
- package/scripts/contract-admin.mjs +137 -0
- package/scripts/contract-storefront.mjs +296 -0
- package/dist/admin-CfHen7c5.d.cts +0 -1036
- package/dist/admin-ru7pX5bd.d.ts +0 -1036
- package/dist/storefront-store.cjs +0 -2794
- package/dist/storefront-store.cjs.map +0 -1
- package/dist/storefront-store.d.cts +0 -5
- package/dist/storefront-store.d.ts +0 -5
- package/dist/storefront-store.js +0 -2792
- package/dist/storefront-store.js.map +0 -1
- package/scripts/smoke-store.mjs +0 -41
|
@@ -0,0 +1,1396 @@
|
|
|
1
|
+
import { w as GetCurrentCartParams, R as RequestOptions$1, C as Cart, x as GetCartParams, U as UpdateCartParams, y as AddCartItemParams, z as RemoveCartItemParams, D as ClearCartParams, Q as QuoteCartParams, f as OrderQuote, H as CheckoutCartParams, O as OrderCheckoutResult, ab as Contact, k as Store, M as Market, ac as UpdateAccountContactParams, ad as AccountUpdateResponse, ae as DeleteAccountParams, af as GetMeParams, ag as Account, ah as SearchAccountsParams, ai as MagicLinkVerifyParams, aj as AuthToken, ak as CreateStoreParams, al as UpdateStoreParams, am as DeleteStoreParams, an as GetStoreParams, ao as GetStoresParams, o as PaginatedResponse, ap as GetSubscriptionPlansParams, aq as SubscriptionPlan, ar as SubscribeParams, as as CreatePortalSessionParams, at as AddMemberParams, au as RemoveMemberParams, av as ListBuildHooksParams, aw as BuildHook, ax as CreateBuildHookParams, ay as UpdateBuildHookParams, az as DeleteBuildHookParams, aA as TestWebhookParams, aB as ListWebhooksParams, aC as Webhook, aD as CreateWebhookParams, aE as UpdateWebhookParams, aF as DeleteWebhookParams, aG as StoreRuntimeConfig, aH as FindStoreMediaParams, aI as Media, L as Location, aJ as CreateLocationParams, aK as UpdateLocationParams, aL as DeleteLocationParams, aM as CreateMarketParams, aN as UpdateMarketParams, aO as DeleteMarketParams, aP as ListPaymentProvidersParams, aQ as PaymentProvider, aR as RefreshPaymentProvidersParams, aS as ConnectStripePaymentProviderParams, aT as StripePaymentProviderConnectResponse, aU as DeletePaymentProviderParams, aV as GetMediaParams, aW as UploadStoreMediaParams, aX as DeleteStoreMediaParams, aY as GetStoreMediaParams, aZ as UpdateMediaParams, a_ as TrackEmailOpenParams, a$ as TriggerNotificationParams, b0 as CreateMailboxParams, b1 as Mailbox, b2 as UpdateMailboxParams, b3 as GetMailboxParams, b4 as TestMailboxParams, b5 as TestMailboxResult, b6 as PrepareMailboxParams, b7 as FindMailboxesParams, b8 as GetSocialCapabilitiesParams, b9 as SocialProviderCapability, ba as ListSocialAccountsParams, bb as SocialAccount, bc as ConnectSocialAccountParams, bd as SocialConnectResponse, be as GetSocialOAuthAttemptParams, bf as SocialOAuthCallbackResponse, bg as SelectSocialDestinationParams, bh as DeleteSocialAccountParams, bi as CreateSocialPublicationParams, bj as SocialPublicationMutationResponse, bk as UpdateSocialPublicationParams, bl as GetSocialPublicationParams, bm as SocialPublication, bn as FindSocialPublicationsParams, bo as ValidateSocialPublicationParams, bp as SocialPublicationValidation, bq as ScheduleSocialPublicationParams, br as CancelSocialPublicationParams, bs as GetSocialPublicationCommentsParams, bt as SocialPublicationComment, bu as SyncSocialPublicationCommentsParams, bv as GetSocialPublicationCommentThreadParams, bw as SyncSocialPublicationCommentThreadParams, bx as FindSocialPublicationCommentsParams, by as ClassifySocialPublicationCommentsParams, bz as SocialPublicationCommentClassificationResult, bA as ReplySocialPublicationCommentParams, bB as SocialPublicationCommentReplyResponse, bC as GetSocialPublicationMetricsParams, bD as SocialPublicationMetricSnapshot, bE as SyncSocialPublicationMetricsParams, bF as SyncSocialEngagementParams, bG as SocialPublicationEngagementSyncResult, bH as CreateCollectionParams, l as Collection, bI as UpdateCollectionParams, bJ as DeleteCollectionParams, G as GetCollectionParams, bK as GetCollectionsParams, bL as CreateEntryParams, a as CollectionEntry, bM as UpdateEntryParams, bN as DeleteEntryParams, m as GetEntryParams, n as GetEntriesParams, bO as CreateFormParams, b as Form, bP as UpdateFormParams, bQ as DeleteFormParams, p as GetFormParams, bR as GetFormsParams, q as SubmitFormParams, r as FormSubmission, bS as GetFormSubmissionsParams, bT as GetFormSubmissionParams, bU as UpdateFormSubmissionParams, bV as CreateTaxonomyParams, T as Taxonomy, bW as UpdateTaxonomyParams, bX as DeleteTaxonomyParams, s as GetTaxonomyParams, bY as GetTaxonomiesParams, t as GetTaxonomyChildrenParams, bZ as CreateEmailTemplateParams, b_ as EmailTemplate, b$ as UpdateEmailTemplateParams, c0 as DeleteEmailTemplateParams, c1 as GetEmailTemplateParams, c2 as GetEmailTemplatesParams, c3 as PreviewEmailTemplateParams, c4 as PreviewEmailTemplateResponse, c5 as CreateProductParams, c as Product, c6 as UpdateProductParams, c7 as DeleteProductParams, u as GetProductParams, v as GetProductsParams, c8 as UpdateOrderParams, J as Order, I as GetOrderParams, K as GetOrdersParams, c9 as GetQuoteParams, ca as ProcessOrderRefundParams, cb as ProcessOrderRefundResponse, N as DownloadDigitalAccessParams, V as DigitalAccessDownloadResponse, cc as GetShippingRatesParams, cd as ShippingRate, ce as ShipParams, cf as ShipResult, cg as CreateCartParams, ch as FindCartsParams, ci as CreateServiceParams, S as Service, cj as UpdateServiceParams, ck as DeleteServiceParams, W as GetServiceParams, X as GetServicesParams, _ as GetAvailabilityParams, e as AvailabilityResponse, Y as FindServiceProvidersParams, cl as ServiceProvider, cm as CreateServiceProviderParams, cn as UpdateServiceProviderParams, co as DeleteServiceProviderParams, cp as CreateProviderParams, d as Provider, cq as UpdateProviderParams, cr as DeleteProviderParams, $ as GetProviderParams, a0 as GetProvidersParams, cs as CreatePromoCodeParams, ct as PromoCode, cu as UpdatePromoCodeParams, cv as DeletePromoCodeParams, cw as GetPromoCodeParams, cx as GetPromoCodesParams, cy as CreateContactParams, cz as Contact$1, cA as GetContactParams, j as ContactDetail, cB as FindContactsParams, cC as UpdateContactParams, cD as MergeContactsParams, cE as ImportContactsParams, cF as ImportContactsResult, cG as CreateContactListParams, a2 as ContactList, cH as UpdateContactListParams, a1 as GetContactListParams, a3 as FindContactListsParams, cI as ImportContactsIntoContactListParams, cJ as ImportContactsIntoContactListResult, cK as ImportContactListPreviewParams, cL as ImportContactsPreviewResult, cM as AddContactListContactParams, cN as ContactListMember, cO as UpdateContactListContactParams, cP as RemoveContactListContactParams, cQ as FindContactListContactsParams, cR as Action, cS as FindActionsParams, cT as CreateCampaignParams, cU as Campaign, cV as UpdateCampaignParams, cW as GetCampaignParams, cX as FindCampaignsParams, cY as LaunchCampaignParams, cZ as DuplicateCampaignParams, c_ as GetCampaignLaunchReadinessParams, c$ as CampaignLaunchReadiness, d0 as ImportCampaignEnrollmentsParams, d1 as CampaignEnrollmentImportResult, d2 as GenerateOutreachPersonalizedDraftsParams, d3 as FindCampaignEnrollmentsParams, d4 as CampaignEnrollment, d5 as GetCampaignEnrollmentConversationParams, d6 as CampaignEnrollmentConversationResponse, d7 as UpdateCampaignEnrollmentParams, d8 as UpdateCampaignEnrollmentDraftParams, d9 as UpdateCampaignEnrollmentStepExecutionParams, da as ReplyCampaignEnrollmentParams, db as StopCampaignEnrollmentParams, dc as FindCampaignMessagesParams, dd as CampaignMessage, de as UpdateCampaignMessageParams, df as CreateSuppressionParams, dg as Suppression, dh as UpdateSuppressionParams, di as GetSuppressionParams, dj as FindSuppressionsParams, dk as CreateLeadResearchRunParams, dl as LeadResearchRun, dm as FindLeadResearchRunsParams, dn as GetLeadResearchRunParams, dp as UpdateLeadResearchRunParams, dq as CancelLeadResearchRunParams, dr as SendLeadResearchMessageParams, ds as SendLeadResearchMessageResult, dt as FindLeadResearchMessagesParams, du as LeadResearchMessage, dv as ValidateLeadEmailParams, dw as LeadEmailValidationResult, dx as CreateWorkflowParams, dy as Workflow, dz as UpdateWorkflowParams, dA as DeleteWorkflowParams, dB as GetWorkflowParams, dC as GetWorkflowsParams, dD as TriggerWorkflowParams, dE as WorkflowExecution, dF as GetWorkflowExecutionsParams, dG as GetWorkflowExecutionParams, dH as GetWorkflowAccountsParams, dI as WorkflowAccount, dJ as GetWorkflowAccountConnectUrlParams, dK as WorkflowAccountConnectUrl, dL as ConnectWorkflowAccountParams, dM as DeleteWorkflowAccountParams, a4 as SubscribeContactListParams, a5 as ContactListSubscribeResponse, a6 as ContactListAccessParams, a7 as ContactListAccessResponse } from './api-DJI3S6XA.cjs';
|
|
2
|
+
import { f as formatPayment, a as formatMinor, g as getCurrencySymbol, b as getCurrencyName, i as isValidKey, v as validateKey, t as toKey, n as nameToKey, c as getAvailableStock, d as getReservedStock, h as hasStock, e as getInventoryAt, j as getFirstAvailableFCId } from './index-u-gjHnKs.cjs';
|
|
3
|
+
|
|
4
|
+
interface CartApi {
|
|
5
|
+
current(params?: GetCurrentCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
6
|
+
get(params: GetCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
7
|
+
update(params: UpdateCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
8
|
+
addItem(params: AddCartItemParams, options?: RequestOptions$1): Promise<Cart>;
|
|
9
|
+
removeItem(params: RemoveCartItemParams, options?: RequestOptions$1): Promise<Cart>;
|
|
10
|
+
clear(params: ClearCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
11
|
+
quote(params: QuoteCartParams, options?: RequestOptions$1): Promise<OrderQuote>;
|
|
12
|
+
checkout(params: CheckoutCartParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
|
|
13
|
+
}
|
|
14
|
+
interface CartControllerState {
|
|
15
|
+
cart: Cart | null;
|
|
16
|
+
quote: OrderQuote | null;
|
|
17
|
+
checkoutResult: OrderCheckoutResult | null;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
initialized: boolean;
|
|
20
|
+
error: unknown;
|
|
21
|
+
}
|
|
22
|
+
type CartControllerListener = (state: CartControllerState) => void;
|
|
23
|
+
type CartControllerInitParams = GetCurrentCartParams | GetCartParams;
|
|
24
|
+
type CartControllerRefreshParams = GetCurrentCartParams | GetCartParams;
|
|
25
|
+
type CartControllerUpdateParams = Omit<UpdateCartParams, "id"> & {
|
|
26
|
+
id?: string;
|
|
27
|
+
};
|
|
28
|
+
type CartControllerAddItemParams = Omit<AddCartItemParams, "id"> & {
|
|
29
|
+
id?: string;
|
|
30
|
+
};
|
|
31
|
+
type CartControllerRemoveItemParams = Omit<RemoveCartItemParams, "id"> & {
|
|
32
|
+
id?: string;
|
|
33
|
+
};
|
|
34
|
+
type CartControllerClearParams = Omit<ClearCartParams, "id"> & {
|
|
35
|
+
id?: string;
|
|
36
|
+
};
|
|
37
|
+
type CartControllerQuoteParams = Omit<QuoteCartParams, "id"> & {
|
|
38
|
+
id?: string;
|
|
39
|
+
};
|
|
40
|
+
type CartControllerCheckoutParams = Omit<CheckoutCartParams, "id"> & {
|
|
41
|
+
id?: string;
|
|
42
|
+
};
|
|
43
|
+
interface CartController {
|
|
44
|
+
subscribe(listener: CartControllerListener): () => void;
|
|
45
|
+
getState(): CartControllerState;
|
|
46
|
+
init(params?: CartControllerInitParams, options?: RequestOptions$1): Promise<Cart>;
|
|
47
|
+
refresh(params?: CartControllerRefreshParams, options?: RequestOptions$1): Promise<Cart>;
|
|
48
|
+
addItem(params: CartControllerAddItemParams, options?: RequestOptions$1): Promise<Cart>;
|
|
49
|
+
update(params: CartControllerUpdateParams, options?: RequestOptions$1): Promise<Cart>;
|
|
50
|
+
removeItem(params: CartControllerRemoveItemParams, options?: RequestOptions$1): Promise<Cart>;
|
|
51
|
+
clear(params?: CartControllerClearParams, options?: RequestOptions$1): Promise<Cart>;
|
|
52
|
+
quote(params?: CartControllerQuoteParams, options?: RequestOptions$1): Promise<OrderQuote>;
|
|
53
|
+
checkout(params?: CartControllerCheckoutParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
|
|
54
|
+
}
|
|
55
|
+
declare function createCartController(cartApi: CartApi): CartController;
|
|
56
|
+
|
|
57
|
+
type ContactToken = {
|
|
58
|
+
id: string;
|
|
59
|
+
token: string;
|
|
60
|
+
created_at: number;
|
|
61
|
+
};
|
|
62
|
+
type IdentifyResponse = {
|
|
63
|
+
contact: Contact;
|
|
64
|
+
token: ContactToken;
|
|
65
|
+
store: Store;
|
|
66
|
+
market: Market | null;
|
|
67
|
+
code_sent: boolean;
|
|
68
|
+
};
|
|
69
|
+
type VerifyResponse = ContactToken;
|
|
70
|
+
interface StorefrontAction {
|
|
71
|
+
store_id: string;
|
|
72
|
+
contact_id: string;
|
|
73
|
+
key: string;
|
|
74
|
+
type?: string;
|
|
75
|
+
payload: Record<string, unknown>;
|
|
76
|
+
created_at: number;
|
|
77
|
+
}
|
|
78
|
+
type TrackActionParams = {
|
|
79
|
+
key: string;
|
|
80
|
+
type?: string;
|
|
81
|
+
payload?: Record<string, unknown>;
|
|
82
|
+
} | {
|
|
83
|
+
type: string;
|
|
84
|
+
key?: string;
|
|
85
|
+
payload?: Record<string, unknown>;
|
|
86
|
+
};
|
|
87
|
+
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"];
|
|
88
|
+
type CommonActionKey = (typeof COMMON_ACTION_KEYS)[number];
|
|
89
|
+
interface UseExperimentParams {
|
|
90
|
+
key: string;
|
|
91
|
+
store_id?: string;
|
|
92
|
+
}
|
|
93
|
+
interface ExperimentUseResponse {
|
|
94
|
+
experiment_key: string;
|
|
95
|
+
experiment_version: number;
|
|
96
|
+
variant_key: string;
|
|
97
|
+
goal_action_key: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
type ExperimentStatus = "draft" | "running" | "paused" | "completed";
|
|
101
|
+
interface ExperimentVariant {
|
|
102
|
+
key: string;
|
|
103
|
+
weight: number;
|
|
104
|
+
}
|
|
105
|
+
interface Experiment {
|
|
106
|
+
id: string;
|
|
107
|
+
store_id: string;
|
|
108
|
+
key: string;
|
|
109
|
+
status: ExperimentStatus;
|
|
110
|
+
version: number;
|
|
111
|
+
goal_action_key: string;
|
|
112
|
+
variants: ExperimentVariant[];
|
|
113
|
+
created_at: number;
|
|
114
|
+
updated_at: number;
|
|
115
|
+
}
|
|
116
|
+
interface CreateExperimentParams {
|
|
117
|
+
store_id?: string;
|
|
118
|
+
key: string;
|
|
119
|
+
goal_action_key: string;
|
|
120
|
+
variants: ExperimentVariant[];
|
|
121
|
+
status?: ExperimentStatus;
|
|
122
|
+
}
|
|
123
|
+
interface UpdateExperimentParams {
|
|
124
|
+
store_id?: string;
|
|
125
|
+
key: string;
|
|
126
|
+
goal_action_key?: string;
|
|
127
|
+
variants?: ExperimentVariant[];
|
|
128
|
+
status?: ExperimentStatus;
|
|
129
|
+
}
|
|
130
|
+
interface GetExperimentParams {
|
|
131
|
+
store_id?: string;
|
|
132
|
+
key: string;
|
|
133
|
+
}
|
|
134
|
+
interface FindExperimentsParams {
|
|
135
|
+
store_id?: string;
|
|
136
|
+
limit?: number;
|
|
137
|
+
cursor?: string;
|
|
138
|
+
}
|
|
139
|
+
interface ExperimentVariantResult {
|
|
140
|
+
variant_key: string;
|
|
141
|
+
weight: number;
|
|
142
|
+
shown: number;
|
|
143
|
+
wins: number;
|
|
144
|
+
conversion_rate: number;
|
|
145
|
+
}
|
|
146
|
+
interface ExperimentResults {
|
|
147
|
+
experiment: Experiment;
|
|
148
|
+
variants: ExperimentVariantResult[];
|
|
149
|
+
winning_variant_key?: string | null;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface AnalyticsTimeRange {
|
|
153
|
+
from: number;
|
|
154
|
+
to: number;
|
|
155
|
+
}
|
|
156
|
+
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";
|
|
157
|
+
type ActionFeedCategory = "orders" | "carts" | "promo_codes" | "submissions" | "contacts" | "contact_lists" | "products" | "services" | "providers" | "cms" | "workflows" | "actions";
|
|
158
|
+
interface AnalyticsReportRequest {
|
|
159
|
+
key: AnalyticsReportKey;
|
|
160
|
+
limit?: number;
|
|
161
|
+
category?: ActionFeedCategory;
|
|
162
|
+
cursor_created_at?: number;
|
|
163
|
+
cursor_id?: string;
|
|
164
|
+
}
|
|
165
|
+
interface AnalyticsRequest {
|
|
166
|
+
time?: AnalyticsTimeRange;
|
|
167
|
+
reports?: AnalyticsReportRequest[];
|
|
168
|
+
blocks?: AnalyticsBlockRequest[];
|
|
169
|
+
}
|
|
170
|
+
interface AnalyticsBlockRequest {
|
|
171
|
+
id: string;
|
|
172
|
+
time: AnalyticsTimeRange;
|
|
173
|
+
reports: AnalyticsReportRequest[];
|
|
174
|
+
}
|
|
175
|
+
interface AnalyticsMetricData {
|
|
176
|
+
value: number;
|
|
177
|
+
execution_ms?: number;
|
|
178
|
+
}
|
|
179
|
+
interface AnalyticsBreakdownItem {
|
|
180
|
+
key: string;
|
|
181
|
+
label: string;
|
|
182
|
+
value: number;
|
|
183
|
+
unique_contacts?: number;
|
|
184
|
+
unique_visitors?: number;
|
|
185
|
+
}
|
|
186
|
+
interface AnalyticsBreakdownData {
|
|
187
|
+
items: AnalyticsBreakdownItem[];
|
|
188
|
+
}
|
|
189
|
+
interface BusinessOverviewData {
|
|
190
|
+
visitors: number;
|
|
191
|
+
new_visitors: number;
|
|
192
|
+
known_contacts: number;
|
|
193
|
+
new_known_contacts: number;
|
|
194
|
+
email_known_contacts: number;
|
|
195
|
+
verified_contacts: number;
|
|
196
|
+
new_verified_contacts: number;
|
|
197
|
+
buyers: number;
|
|
198
|
+
orders: number;
|
|
199
|
+
revenue: number;
|
|
200
|
+
revenue_by_currency: RevenueByCurrencyData[];
|
|
201
|
+
average_order_value: number;
|
|
202
|
+
carts: number;
|
|
203
|
+
abandoned_carts: number;
|
|
204
|
+
visitor_to_known_rate: number;
|
|
205
|
+
visitor_to_buyer_rate: number;
|
|
206
|
+
cart_abandonment_rate: number;
|
|
207
|
+
}
|
|
208
|
+
interface RevenueByCurrencyData {
|
|
209
|
+
currency: string;
|
|
210
|
+
orders: number;
|
|
211
|
+
revenue: number;
|
|
212
|
+
average_order_value: number;
|
|
213
|
+
}
|
|
214
|
+
interface ContactFunnelStage {
|
|
215
|
+
key: "visitors" | "email_known_contacts" | "verified_contacts" | "buyers" | string;
|
|
216
|
+
label: string;
|
|
217
|
+
value: number;
|
|
218
|
+
}
|
|
219
|
+
interface ContactFunnelData {
|
|
220
|
+
stages: ContactFunnelStage[];
|
|
221
|
+
visitor_to_known_rate?: number;
|
|
222
|
+
visitor_to_buyer_rate?: number;
|
|
223
|
+
}
|
|
224
|
+
interface OutreachOverviewData {
|
|
225
|
+
contact_lists: number;
|
|
226
|
+
active_contact_lists: number;
|
|
227
|
+
mailboxes: number;
|
|
228
|
+
active_mailboxes: number;
|
|
229
|
+
campaigns: number;
|
|
230
|
+
active_campaigns: number;
|
|
231
|
+
campaign_enrollments: number;
|
|
232
|
+
new_campaign_enrollments: number;
|
|
233
|
+
active_campaign_enrollments: number;
|
|
234
|
+
completed_campaign_enrollments: number;
|
|
235
|
+
replied_campaign_enrollments: number;
|
|
236
|
+
suppressed_campaign_enrollments: number;
|
|
237
|
+
failed_campaign_enrollments: number;
|
|
238
|
+
campaign_messages_sent: number;
|
|
239
|
+
outreach_bounces: number;
|
|
240
|
+
campaign_messages_received: number;
|
|
241
|
+
suppressions: number;
|
|
242
|
+
active_suppressions: number;
|
|
243
|
+
new_suppressions: number;
|
|
244
|
+
reply_rate: number;
|
|
245
|
+
bounce_rate: number;
|
|
246
|
+
suppression_rate: number;
|
|
247
|
+
}
|
|
248
|
+
interface OutreachFunnelStage {
|
|
249
|
+
key: "contact_lists" | "campaigns" | "campaign_enrollments" | "campaign_messages_sent" | "outreach_bounces" | "campaign_messages_received" | string;
|
|
250
|
+
label: string;
|
|
251
|
+
value: number;
|
|
252
|
+
}
|
|
253
|
+
interface OutreachFunnelData {
|
|
254
|
+
stages: OutreachFunnelStage[];
|
|
255
|
+
reply_rate?: number;
|
|
256
|
+
bounce_rate?: number;
|
|
257
|
+
suppression_rate?: number;
|
|
258
|
+
}
|
|
259
|
+
interface EntityStatusOverviewData {
|
|
260
|
+
entities: Record<string, AnalyticsBreakdownItem[]>;
|
|
261
|
+
}
|
|
262
|
+
interface DataHealthData {
|
|
263
|
+
anonymous_contacts: number;
|
|
264
|
+
known_contacts: number;
|
|
265
|
+
duplicate_emails: number;
|
|
266
|
+
unknown_country_events: number;
|
|
267
|
+
unknown_device_events: number;
|
|
268
|
+
}
|
|
269
|
+
interface ActionFeedItem {
|
|
270
|
+
id: string;
|
|
271
|
+
entity: string;
|
|
272
|
+
entity_id: string;
|
|
273
|
+
action: string;
|
|
274
|
+
event_type: string;
|
|
275
|
+
status: string;
|
|
276
|
+
contact_id: string;
|
|
277
|
+
category: string;
|
|
278
|
+
title: string;
|
|
279
|
+
description: string;
|
|
280
|
+
href?: string | null;
|
|
281
|
+
data: unknown;
|
|
282
|
+
payload: unknown;
|
|
283
|
+
created_at: number;
|
|
284
|
+
}
|
|
285
|
+
interface ActionFeedSummary {
|
|
286
|
+
total: number;
|
|
287
|
+
orders: number;
|
|
288
|
+
submissions: number;
|
|
289
|
+
contacts: number;
|
|
290
|
+
contact_lists: number;
|
|
291
|
+
abandoned_carts: number;
|
|
292
|
+
carts: number;
|
|
293
|
+
promo_codes: number;
|
|
294
|
+
products: number;
|
|
295
|
+
services: number;
|
|
296
|
+
providers: number;
|
|
297
|
+
cms: number;
|
|
298
|
+
workflows: number;
|
|
299
|
+
actions: number;
|
|
300
|
+
window_start: number;
|
|
301
|
+
}
|
|
302
|
+
interface ActionFeedCursor {
|
|
303
|
+
created_at: number;
|
|
304
|
+
id: string;
|
|
305
|
+
}
|
|
306
|
+
interface ActionFeedData {
|
|
307
|
+
items: ActionFeedItem[];
|
|
308
|
+
summary: ActionFeedSummary;
|
|
309
|
+
next_cursor?: ActionFeedCursor | null;
|
|
310
|
+
meta: {
|
|
311
|
+
row_count: number;
|
|
312
|
+
execution_ms: number;
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
type AnalyticsMetricReportKey = "orders_created" | "contacts_created" | "form_submissions_created" | "carts_abandoned" | "campaign_messages_sent" | "campaign_messages_received" | "suppressions_created" | "media_count";
|
|
316
|
+
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";
|
|
317
|
+
type AnalyticsActionReportKey = "recent_action";
|
|
318
|
+
type AnalyticsCompositeReportKey = "business_overview" | "contact_funnel" | "outreach_overview" | "outreach_funnel" | "entity_status_overview" | "data_health";
|
|
319
|
+
type AnalyticsReport = {
|
|
320
|
+
key: AnalyticsMetricReportKey;
|
|
321
|
+
data: AnalyticsMetricData;
|
|
322
|
+
} | {
|
|
323
|
+
key: AnalyticsBreakdownReportKey;
|
|
324
|
+
data: AnalyticsBreakdownData;
|
|
325
|
+
} | {
|
|
326
|
+
key: "business_overview";
|
|
327
|
+
data: BusinessOverviewData;
|
|
328
|
+
} | {
|
|
329
|
+
key: "contact_funnel";
|
|
330
|
+
data: ContactFunnelData;
|
|
331
|
+
} | {
|
|
332
|
+
key: "outreach_overview";
|
|
333
|
+
data: OutreachOverviewData;
|
|
334
|
+
} | {
|
|
335
|
+
key: "outreach_funnel";
|
|
336
|
+
data: OutreachFunnelData;
|
|
337
|
+
} | {
|
|
338
|
+
key: "entity_status_overview";
|
|
339
|
+
data: EntityStatusOverviewData;
|
|
340
|
+
} | {
|
|
341
|
+
key: "data_health";
|
|
342
|
+
data: DataHealthData;
|
|
343
|
+
} | {
|
|
344
|
+
key: AnalyticsActionReportKey;
|
|
345
|
+
data: ActionFeedData;
|
|
346
|
+
};
|
|
347
|
+
interface AnalyticsBlockResponse {
|
|
348
|
+
id: string;
|
|
349
|
+
time: AnalyticsTimeRange;
|
|
350
|
+
reports: AnalyticsReport[];
|
|
351
|
+
}
|
|
352
|
+
interface AnalyticsResponse {
|
|
353
|
+
time?: AnalyticsTimeRange;
|
|
354
|
+
reports?: AnalyticsReport[];
|
|
355
|
+
blocks?: AnalyticsBlockResponse[];
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
interface SupportAgentNode {
|
|
359
|
+
type: "message" | "input" | "ai_handoff" | "action";
|
|
360
|
+
text?: string;
|
|
361
|
+
buttons?: string[];
|
|
362
|
+
prompt?: string;
|
|
363
|
+
field?: string;
|
|
364
|
+
input_type?: "text" | "email" | "phone";
|
|
365
|
+
validation?: string;
|
|
366
|
+
system_prompt_override?: string;
|
|
367
|
+
tools?: string[];
|
|
368
|
+
action?: SupportAction;
|
|
369
|
+
}
|
|
370
|
+
interface SupportAction {
|
|
371
|
+
type: "end_conversation" | "human_handoff";
|
|
372
|
+
message?: string;
|
|
373
|
+
}
|
|
374
|
+
interface SupportAgentEdge {
|
|
375
|
+
source: string;
|
|
376
|
+
target: string;
|
|
377
|
+
trigger: EdgeTrigger;
|
|
378
|
+
}
|
|
379
|
+
type EdgeTrigger = {
|
|
380
|
+
type: "button";
|
|
381
|
+
label: string;
|
|
382
|
+
} | {
|
|
383
|
+
type: "input";
|
|
384
|
+
field: string;
|
|
385
|
+
} | {
|
|
386
|
+
type: "default";
|
|
387
|
+
};
|
|
388
|
+
interface SupportAgentAiConfig {
|
|
389
|
+
system_prompt: string;
|
|
390
|
+
tools: string[];
|
|
391
|
+
max_context_messages: number;
|
|
392
|
+
}
|
|
393
|
+
interface SupportAgent {
|
|
394
|
+
id: string;
|
|
395
|
+
key: string;
|
|
396
|
+
store_id: string;
|
|
397
|
+
name: string;
|
|
398
|
+
status: "draft" | "active" | "archived";
|
|
399
|
+
entry_node_id: string;
|
|
400
|
+
nodes: Record<string, SupportAgentNode>;
|
|
401
|
+
edges: SupportAgentEdge[];
|
|
402
|
+
ai_config?: SupportAgentAiConfig;
|
|
403
|
+
created_at: number;
|
|
404
|
+
updated_at: number;
|
|
405
|
+
}
|
|
406
|
+
interface SupportConversation {
|
|
407
|
+
id: string;
|
|
408
|
+
store_id: string;
|
|
409
|
+
agent_id?: string;
|
|
410
|
+
current_node_id?: string;
|
|
411
|
+
contact_id?: string;
|
|
412
|
+
assigned_account_id?: string | null;
|
|
413
|
+
status: "active" | "ai_mode" | "escalated" | "resolved";
|
|
414
|
+
data: Record<string, unknown>;
|
|
415
|
+
metadata: Record<string, unknown>;
|
|
416
|
+
created_at: number;
|
|
417
|
+
updated_at: number;
|
|
418
|
+
}
|
|
419
|
+
interface SupportMessage {
|
|
420
|
+
id: string;
|
|
421
|
+
store_id: string;
|
|
422
|
+
conversation_id: string;
|
|
423
|
+
role: "system" | "user" | "assistant" | "staff" | "action";
|
|
424
|
+
content: string;
|
|
425
|
+
buttons?: string[];
|
|
426
|
+
metadata: Record<string, unknown>;
|
|
427
|
+
created_at: number;
|
|
428
|
+
}
|
|
429
|
+
interface SupportConversationResponse {
|
|
430
|
+
conversation: SupportConversation;
|
|
431
|
+
messages: SupportMessage[];
|
|
432
|
+
}
|
|
433
|
+
interface StartSupportConversationParams {
|
|
434
|
+
store_id: string;
|
|
435
|
+
agent_key?: string;
|
|
436
|
+
metadata?: Record<string, unknown>;
|
|
437
|
+
}
|
|
438
|
+
interface SendSupportMessageParams {
|
|
439
|
+
store_id: string;
|
|
440
|
+
conversation_id: string;
|
|
441
|
+
input: {
|
|
442
|
+
type: "button";
|
|
443
|
+
label: string;
|
|
444
|
+
} | {
|
|
445
|
+
type: "text";
|
|
446
|
+
content: string;
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
interface ReplySupportConversationParams {
|
|
450
|
+
store_id: string;
|
|
451
|
+
conversation_id: string;
|
|
452
|
+
content: string;
|
|
453
|
+
resolve?: boolean;
|
|
454
|
+
}
|
|
455
|
+
interface ResolveSupportConversationParams {
|
|
456
|
+
store_id: string;
|
|
457
|
+
conversation_id: string;
|
|
458
|
+
}
|
|
459
|
+
interface AssignSupportConversationParams {
|
|
460
|
+
store_id: string;
|
|
461
|
+
conversation_id: string;
|
|
462
|
+
account_id?: string | null;
|
|
463
|
+
}
|
|
464
|
+
interface GetSupportConversationParams {
|
|
465
|
+
store_id: string;
|
|
466
|
+
conversation_id: string;
|
|
467
|
+
message_limit?: number;
|
|
468
|
+
after_created_at?: number;
|
|
469
|
+
after_id?: string;
|
|
470
|
+
}
|
|
471
|
+
interface CreateSupportAgentParams {
|
|
472
|
+
store_id: string;
|
|
473
|
+
key: string;
|
|
474
|
+
name: string;
|
|
475
|
+
status?: "draft" | "active" | "archived";
|
|
476
|
+
entry_node_id: string;
|
|
477
|
+
nodes: Record<string, SupportAgentNode>;
|
|
478
|
+
edges: SupportAgentEdge[];
|
|
479
|
+
ai_config?: SupportAgentAiConfig;
|
|
480
|
+
}
|
|
481
|
+
interface UpdateSupportAgentParams {
|
|
482
|
+
store_id: string;
|
|
483
|
+
id: string;
|
|
484
|
+
name?: string;
|
|
485
|
+
status?: "draft" | "active" | "archived";
|
|
486
|
+
entry_node_id?: string;
|
|
487
|
+
nodes?: Record<string, SupportAgentNode>;
|
|
488
|
+
edges?: SupportAgentEdge[];
|
|
489
|
+
ai_config?: SupportAgentAiConfig;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
interface TimelineParams {
|
|
493
|
+
contact_id: string;
|
|
494
|
+
store_id?: string;
|
|
495
|
+
limit?: number;
|
|
496
|
+
cursor?: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
interface WorkflowToolOperation {
|
|
500
|
+
name: string;
|
|
501
|
+
value: string;
|
|
502
|
+
description?: string;
|
|
503
|
+
method: 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
504
|
+
url: string;
|
|
505
|
+
body?: Record<string, unknown> | string;
|
|
506
|
+
headers?: Record<string, string>;
|
|
507
|
+
}
|
|
508
|
+
interface WorkflowToolResource {
|
|
509
|
+
name: string;
|
|
510
|
+
value: string;
|
|
511
|
+
operations: WorkflowToolOperation[];
|
|
512
|
+
}
|
|
513
|
+
interface WorkflowTool {
|
|
514
|
+
id: string;
|
|
515
|
+
name: string;
|
|
516
|
+
description: string;
|
|
517
|
+
icon: string;
|
|
518
|
+
color: string;
|
|
519
|
+
category: 'ai' | 'communication' | 'email' | 'productivity' | 'payments' | 'crm' | 'ecommerce' | 'developer' | 'storage' | 'analytics' | 'deploy' | 'core';
|
|
520
|
+
configurationRequired: boolean;
|
|
521
|
+
website?: string;
|
|
522
|
+
docsUrl?: string;
|
|
523
|
+
urlPatterns: string[];
|
|
524
|
+
resources: WorkflowToolResource[];
|
|
525
|
+
triggers?: Array<{
|
|
526
|
+
name: string;
|
|
527
|
+
value: string;
|
|
528
|
+
description: string;
|
|
529
|
+
webhookType: 'incoming' | 'polling';
|
|
530
|
+
}>;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
interface LocationState {
|
|
534
|
+
code: string;
|
|
535
|
+
name: string;
|
|
536
|
+
}
|
|
537
|
+
interface LocationCountry {
|
|
538
|
+
code: string;
|
|
539
|
+
name: string;
|
|
540
|
+
states: LocationState[];
|
|
541
|
+
}
|
|
542
|
+
interface GetCountriesResponse {
|
|
543
|
+
items: LocationCountry[];
|
|
544
|
+
cursor: string | null;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
interface QueryParams {
|
|
548
|
+
[key: string]: string | number | boolean | string[] | number[] | null | undefined;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
interface TokenSet {
|
|
552
|
+
access_token: string;
|
|
553
|
+
refresh_token?: string;
|
|
554
|
+
access_expires_at?: number;
|
|
555
|
+
}
|
|
556
|
+
interface AuthStorage {
|
|
557
|
+
getTokens(): TokenSet | null;
|
|
558
|
+
onTokensRefreshed(tokens: TokenSet): void;
|
|
559
|
+
onForcedLogout(): void;
|
|
560
|
+
}
|
|
561
|
+
interface RequestSuccessContext<T = unknown> {
|
|
562
|
+
data: T;
|
|
563
|
+
method: string;
|
|
564
|
+
url: string;
|
|
565
|
+
status: number;
|
|
566
|
+
request?: unknown;
|
|
567
|
+
duration_ms?: number;
|
|
568
|
+
request_id?: string | null;
|
|
569
|
+
}
|
|
570
|
+
interface RequestErrorContext {
|
|
571
|
+
error: unknown;
|
|
572
|
+
method: string;
|
|
573
|
+
url: string;
|
|
574
|
+
status?: number;
|
|
575
|
+
request?: unknown;
|
|
576
|
+
response?: unknown;
|
|
577
|
+
duration_ms?: number;
|
|
578
|
+
request_id?: string | null;
|
|
579
|
+
aborted?: boolean;
|
|
580
|
+
}
|
|
581
|
+
interface RequestOptions<T = unknown> {
|
|
582
|
+
headers?: Record<string, string>;
|
|
583
|
+
params?: QueryParams | Record<string, any>;
|
|
584
|
+
signal?: AbortSignal;
|
|
585
|
+
transformRequest?: (data: unknown) => unknown;
|
|
586
|
+
onSuccess?: (ctx: RequestSuccessContext<T>) => void | Promise<void>;
|
|
587
|
+
onError?: (ctx: RequestErrorContext) => void | Promise<void>;
|
|
588
|
+
}
|
|
589
|
+
interface HttpClient {
|
|
590
|
+
get<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
|
|
591
|
+
post<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
|
|
592
|
+
put<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
|
|
593
|
+
patch<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
|
|
594
|
+
delete<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
|
|
595
|
+
}
|
|
596
|
+
interface HttpClientConfig {
|
|
597
|
+
baseUrl: string;
|
|
598
|
+
storeId: string;
|
|
599
|
+
authStorage: AuthStorage;
|
|
600
|
+
refreshPath?: string | (() => string);
|
|
601
|
+
navigate?: (path: string) => void;
|
|
602
|
+
loginFallbackPath?: string;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
declare function getBlockLabel(block: any): string;
|
|
606
|
+
declare function formatBlockValue(block: any): string;
|
|
607
|
+
declare function prepareBlocksForSubmission(formData: any, blockTypes?: Record<string, string>): any[];
|
|
608
|
+
declare function extractBlockValues(blocks: any[]): Record<string, any>;
|
|
609
|
+
|
|
610
|
+
interface ValidationResult {
|
|
611
|
+
isValid: boolean;
|
|
612
|
+
error?: string;
|
|
613
|
+
}
|
|
614
|
+
declare function validatePhoneNumber(phone: string): ValidationResult;
|
|
615
|
+
|
|
616
|
+
declare const tzGroups: {
|
|
617
|
+
label: string;
|
|
618
|
+
zones: {
|
|
619
|
+
label: string;
|
|
620
|
+
value: string;
|
|
621
|
+
}[];
|
|
622
|
+
}[];
|
|
623
|
+
declare function findTimeZone(groups: typeof tzGroups): string;
|
|
624
|
+
|
|
625
|
+
declare const locales: readonly ["en", "sr-latn"];
|
|
626
|
+
declare function slugify(text: string): string;
|
|
627
|
+
declare function humanize(text: string): string;
|
|
628
|
+
declare function categorify(text: string): string;
|
|
629
|
+
declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
|
|
630
|
+
|
|
631
|
+
declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
|
|
632
|
+
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
633
|
+
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
634
|
+
|
|
635
|
+
declare const SDK_VERSION = "0.9.11";
|
|
636
|
+
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
637
|
+
|
|
638
|
+
interface ApiConfig {
|
|
639
|
+
httpClient: HttpClient;
|
|
640
|
+
storeId: string;
|
|
641
|
+
baseUrl: string;
|
|
642
|
+
market: string;
|
|
643
|
+
locale: string;
|
|
644
|
+
authStorage: AuthStorage;
|
|
645
|
+
}
|
|
646
|
+
interface AdminSessionInternal {
|
|
647
|
+
access_token: string;
|
|
648
|
+
refresh_token: string;
|
|
649
|
+
access_expires_at?: number;
|
|
650
|
+
email?: string;
|
|
651
|
+
}
|
|
652
|
+
interface ContactSessionInternal {
|
|
653
|
+
access_token: string;
|
|
654
|
+
contact: Contact;
|
|
655
|
+
store: Store;
|
|
656
|
+
market: Market | null;
|
|
657
|
+
}
|
|
658
|
+
interface AdminSession {
|
|
659
|
+
email?: string;
|
|
660
|
+
}
|
|
661
|
+
interface ContactSession {
|
|
662
|
+
contact: Contact;
|
|
663
|
+
store: Store;
|
|
664
|
+
market: Market | null;
|
|
665
|
+
}
|
|
666
|
+
type AdminSessionUpdater = (updater: (prev: AdminSessionInternal | null) => AdminSessionInternal | null) => void;
|
|
667
|
+
type ContactSessionUpdater = (updater: (prev: ContactSessionInternal | null) => ContactSessionInternal | null) => void;
|
|
668
|
+
type AuthStateListener<T> = (session: T | null) => void;
|
|
669
|
+
|
|
670
|
+
type CreateAdminConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
|
|
671
|
+
storeId: string;
|
|
672
|
+
market: string;
|
|
673
|
+
locale?: string;
|
|
674
|
+
apiToken?: string;
|
|
675
|
+
};
|
|
676
|
+
declare function createAdmin(config: CreateAdminConfig): {
|
|
677
|
+
account: {
|
|
678
|
+
update: (params: UpdateAccountContactParams, options?: RequestOptions$1) => Promise<AccountUpdateResponse>;
|
|
679
|
+
delete: (_params: DeleteAccountParams, options?: RequestOptions$1) => Promise<{
|
|
680
|
+
deleted: boolean;
|
|
681
|
+
}>;
|
|
682
|
+
getMe: (_params: GetMeParams, options?: RequestOptions$1) => Promise<Account>;
|
|
683
|
+
search: (params: SearchAccountsParams, options?: RequestOptions$1) => Promise<{
|
|
684
|
+
items: Account[];
|
|
685
|
+
cursor?: string | null;
|
|
686
|
+
}>;
|
|
687
|
+
auth: {
|
|
688
|
+
code(params: {
|
|
689
|
+
email: string;
|
|
690
|
+
}, options?: RequestOptions$1): Promise<{
|
|
691
|
+
sent: boolean;
|
|
692
|
+
}>;
|
|
693
|
+
verify(params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
|
|
694
|
+
refresh(params: {
|
|
695
|
+
refresh_token: string;
|
|
696
|
+
}, options?: RequestOptions$1): Promise<AuthToken>;
|
|
697
|
+
storeCode(storeId: string, params: {
|
|
698
|
+
email: string;
|
|
699
|
+
}, options?: RequestOptions$1): Promise<{
|
|
700
|
+
sent: boolean;
|
|
701
|
+
}>;
|
|
702
|
+
storeVerify(storeId: string, params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
store: {
|
|
706
|
+
create: (params: CreateStoreParams, options?: RequestOptions$1) => Promise<Store>;
|
|
707
|
+
update: (params: UpdateStoreParams, options?: RequestOptions$1) => Promise<Store>;
|
|
708
|
+
delete: (params: DeleteStoreParams, options?: RequestOptions$1) => Promise<{
|
|
709
|
+
deleted: boolean;
|
|
710
|
+
}>;
|
|
711
|
+
get: (_params: GetStoreParams, options?: RequestOptions$1) => Promise<Store>;
|
|
712
|
+
find: (params?: GetStoresParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Store>>;
|
|
713
|
+
subscription: {
|
|
714
|
+
getPlans: (_params: GetSubscriptionPlansParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SubscriptionPlan>>;
|
|
715
|
+
subscribe: (params: SubscribeParams, options?: RequestOptions$1) => Promise<{
|
|
716
|
+
checkout_url?: string;
|
|
717
|
+
}>;
|
|
718
|
+
createPortalSession: (params: CreatePortalSessionParams, options?: RequestOptions$1) => Promise<{
|
|
719
|
+
portal_url: string;
|
|
720
|
+
}>;
|
|
721
|
+
};
|
|
722
|
+
member: {
|
|
723
|
+
add: (params: AddMemberParams, options?: RequestOptions$1) => Promise<boolean>;
|
|
724
|
+
invite: (params: AddMemberParams, options?: RequestOptions$1) => Promise<boolean>;
|
|
725
|
+
remove: (params: RemoveMemberParams, options?: RequestOptions$1) => Promise<{
|
|
726
|
+
removed: boolean;
|
|
727
|
+
}>;
|
|
728
|
+
};
|
|
729
|
+
buildHook: {
|
|
730
|
+
list: (params: ListBuildHooksParams, options?: RequestOptions$1) => Promise<BuildHook[]>;
|
|
731
|
+
create: (params: CreateBuildHookParams, options?: RequestOptions$1) => Promise<BuildHook>;
|
|
732
|
+
update: (params: UpdateBuildHookParams, options?: RequestOptions$1) => Promise<BuildHook>;
|
|
733
|
+
delete: (params: DeleteBuildHookParams, options?: RequestOptions$1) => Promise<{
|
|
734
|
+
deleted: boolean;
|
|
735
|
+
}>;
|
|
736
|
+
};
|
|
737
|
+
webhook: {
|
|
738
|
+
test: (params: TestWebhookParams, options?: RequestOptions$1) => Promise<{
|
|
739
|
+
tested: boolean;
|
|
740
|
+
}>;
|
|
741
|
+
list: (params: ListWebhooksParams, options?: RequestOptions$1) => Promise<Webhook[]>;
|
|
742
|
+
create: (params: CreateWebhookParams, options?: RequestOptions$1) => Promise<Webhook>;
|
|
743
|
+
update: (params: UpdateWebhookParams, options?: RequestOptions$1) => Promise<Webhook>;
|
|
744
|
+
delete: (params: DeleteWebhookParams, options?: RequestOptions$1) => Promise<{
|
|
745
|
+
deleted: boolean;
|
|
746
|
+
}>;
|
|
747
|
+
};
|
|
748
|
+
config: {
|
|
749
|
+
get: (params: {
|
|
750
|
+
store_id: string;
|
|
751
|
+
type: "payment" | "shipping";
|
|
752
|
+
}, options?: RequestOptions$1) => Promise<StoreRuntimeConfig>;
|
|
753
|
+
};
|
|
754
|
+
media: {
|
|
755
|
+
find: (params: FindStoreMediaParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Media>>;
|
|
756
|
+
};
|
|
757
|
+
location: {
|
|
758
|
+
getCountries(options?: RequestOptions$1): Promise<GetCountriesResponse>;
|
|
759
|
+
getCountry(countryCode: string, options?: RequestOptions$1): Promise<LocationCountry>;
|
|
760
|
+
list(options?: RequestOptions$1): Promise<Location[]>;
|
|
761
|
+
get(id: string, options?: RequestOptions$1): Promise<Location>;
|
|
762
|
+
create(params: CreateLocationParams, options?: RequestOptions$1): Promise<Location>;
|
|
763
|
+
update(params: UpdateLocationParams, options?: RequestOptions$1): Promise<Location>;
|
|
764
|
+
delete(params: DeleteLocationParams, options?: RequestOptions$1): Promise<{
|
|
765
|
+
deleted: boolean;
|
|
766
|
+
}>;
|
|
767
|
+
};
|
|
768
|
+
market: {
|
|
769
|
+
list(options?: RequestOptions$1): Promise<Market[]>;
|
|
770
|
+
get(id: string, options?: RequestOptions$1): Promise<Market>;
|
|
771
|
+
create(params: CreateMarketParams, options?: RequestOptions$1): Promise<Market>;
|
|
772
|
+
update(params: UpdateMarketParams, options?: RequestOptions$1): Promise<Market>;
|
|
773
|
+
delete(params: DeleteMarketParams, options?: RequestOptions$1): Promise<{
|
|
774
|
+
deleted: boolean;
|
|
775
|
+
}>;
|
|
776
|
+
};
|
|
777
|
+
paymentProvider: {
|
|
778
|
+
list: (params?: ListPaymentProvidersParams, options?: RequestOptions$1) => Promise<PaymentProvider[]>;
|
|
779
|
+
refresh: (params?: RefreshPaymentProvidersParams, options?: RequestOptions$1) => Promise<PaymentProvider[]>;
|
|
780
|
+
connectStripe: (params: ConnectStripePaymentProviderParams, options?: RequestOptions$1) => Promise<StripePaymentProviderConnectResponse>;
|
|
781
|
+
delete: (params: DeletePaymentProviderParams, options?: RequestOptions$1) => Promise<{
|
|
782
|
+
deleted: boolean;
|
|
783
|
+
}>;
|
|
784
|
+
};
|
|
785
|
+
};
|
|
786
|
+
media: {
|
|
787
|
+
getMedia(params: GetMediaParams, options?: RequestOptions$1): Promise<Media>;
|
|
788
|
+
uploadStoreMedia(params: UploadStoreMediaParams, options?: RequestOptions$1): Promise<Media[]>;
|
|
789
|
+
deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions$1): Promise<{
|
|
790
|
+
deleted: boolean;
|
|
791
|
+
}>;
|
|
792
|
+
getStoreMedia(params: GetStoreMediaParams, options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
|
|
793
|
+
updateMedia(params: UpdateMediaParams, options?: RequestOptions$1): Promise<Media>;
|
|
794
|
+
};
|
|
795
|
+
notification: {
|
|
796
|
+
email: {
|
|
797
|
+
trackOpen: (params: TrackEmailOpenParams, options?: RequestOptions$1) => Promise<void>;
|
|
798
|
+
};
|
|
799
|
+
trigger: {
|
|
800
|
+
send: (params: TriggerNotificationParams, options?: RequestOptions$1) => Promise<{
|
|
801
|
+
success: boolean;
|
|
802
|
+
message: string;
|
|
803
|
+
}>;
|
|
804
|
+
};
|
|
805
|
+
mailbox: {
|
|
806
|
+
create(params: CreateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
807
|
+
update(params: UpdateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
808
|
+
get(params: GetMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
809
|
+
test(params: TestMailboxParams, options?: RequestOptions$1): Promise<TestMailboxResult>;
|
|
810
|
+
prepare(params: PrepareMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
811
|
+
find(params?: FindMailboxesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Mailbox>>;
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
platform: {
|
|
815
|
+
getCurrencies(options?: RequestOptions$1): Promise<string[]>;
|
|
816
|
+
getWorkflowTools(options?: RequestOptions$1): Promise<WorkflowTool[]>;
|
|
817
|
+
getWebhookEvents(options?: RequestOptions$1): Promise<{
|
|
818
|
+
data: string[];
|
|
819
|
+
}>;
|
|
820
|
+
data: {
|
|
821
|
+
scan(params: {
|
|
822
|
+
key: string;
|
|
823
|
+
limit?: number;
|
|
824
|
+
}, options?: RequestOptions$1): Promise<{
|
|
825
|
+
value: Array<{
|
|
826
|
+
key: string;
|
|
827
|
+
value: unknown;
|
|
828
|
+
}>;
|
|
829
|
+
}>;
|
|
830
|
+
put(params: {
|
|
831
|
+
key: string;
|
|
832
|
+
value: unknown;
|
|
833
|
+
previous_key?: string;
|
|
834
|
+
}, options?: RequestOptions$1): Promise<{
|
|
835
|
+
ok: boolean;
|
|
836
|
+
}>;
|
|
837
|
+
delete(params: {
|
|
838
|
+
key: string;
|
|
839
|
+
}, options?: RequestOptions$1): Promise<{
|
|
840
|
+
ok: boolean;
|
|
841
|
+
}>;
|
|
842
|
+
};
|
|
843
|
+
runScript(params: {
|
|
844
|
+
name: string;
|
|
845
|
+
value?: string;
|
|
846
|
+
username?: string;
|
|
847
|
+
password?: string;
|
|
848
|
+
}, options?: RequestOptions$1): Promise<{
|
|
849
|
+
success: boolean;
|
|
850
|
+
message: string;
|
|
851
|
+
}>;
|
|
852
|
+
};
|
|
853
|
+
social: {
|
|
854
|
+
account: {
|
|
855
|
+
getCapabilities: (params?: GetSocialCapabilitiesParams, options?: RequestOptions$1) => Promise<SocialProviderCapability[]>;
|
|
856
|
+
list: (params?: ListSocialAccountsParams, options?: RequestOptions$1) => Promise<SocialAccount[]>;
|
|
857
|
+
connect: (params: ConnectSocialAccountParams, options?: RequestOptions$1) => Promise<SocialConnectResponse>;
|
|
858
|
+
getOAuthAttempt: (params: GetSocialOAuthAttemptParams, options?: RequestOptions$1) => Promise<SocialOAuthCallbackResponse>;
|
|
859
|
+
selectDestination: (params: SelectSocialDestinationParams, options?: RequestOptions$1) => Promise<SocialOAuthCallbackResponse>;
|
|
860
|
+
delete: (params: DeleteSocialAccountParams, options?: RequestOptions$1) => Promise<{
|
|
861
|
+
deleted: boolean;
|
|
862
|
+
}>;
|
|
863
|
+
};
|
|
864
|
+
publication: {
|
|
865
|
+
create: (params: CreateSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationMutationResponse>;
|
|
866
|
+
update: (params: UpdateSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationMutationResponse>;
|
|
867
|
+
get: (params: GetSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublication>;
|
|
868
|
+
find: (params?: FindSocialPublicationsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublication>>;
|
|
869
|
+
validate: (params: ValidateSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationValidation>;
|
|
870
|
+
schedule: (params: ScheduleSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationMutationResponse>;
|
|
871
|
+
cancel: (params: CancelSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublication>;
|
|
872
|
+
getComments: (params: GetSocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
873
|
+
syncComments: (params: SyncSocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
874
|
+
getCommentThread: (params: GetSocialPublicationCommentThreadParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
875
|
+
syncCommentThread: (params: SyncSocialPublicationCommentThreadParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
876
|
+
findComments: (params?: FindSocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
|
|
877
|
+
classifyComments: (params?: ClassifySocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<SocialPublicationCommentClassificationResult>;
|
|
878
|
+
replyToComment: (params: ReplySocialPublicationCommentParams, options?: RequestOptions$1) => Promise<SocialPublicationCommentReplyResponse>;
|
|
879
|
+
getMetrics: (params: GetSocialPublicationMetricsParams, options?: RequestOptions$1) => Promise<SocialPublicationMetricSnapshot>;
|
|
880
|
+
syncMetrics: (params: SyncSocialPublicationMetricsParams, options?: RequestOptions$1) => Promise<SocialPublicationMetricSnapshot>;
|
|
881
|
+
syncEngagement: (params?: SyncSocialEngagementParams, options?: RequestOptions$1) => Promise<SocialPublicationEngagementSyncResult>;
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
cms: {
|
|
885
|
+
collection: {
|
|
886
|
+
create: (params: CreateCollectionParams, options?: RequestOptions$1) => Promise<Collection>;
|
|
887
|
+
update: (params: UpdateCollectionParams, options?: RequestOptions$1) => Promise<Collection>;
|
|
888
|
+
delete: (params: DeleteCollectionParams, options?: RequestOptions$1) => Promise<boolean>;
|
|
889
|
+
get: (params: GetCollectionParams, options?: RequestOptions$1) => Promise<Collection>;
|
|
890
|
+
find: (params?: GetCollectionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Collection>>;
|
|
891
|
+
};
|
|
892
|
+
entry: {
|
|
893
|
+
create: (params: CreateEntryParams, options?: RequestOptions$1) => Promise<CollectionEntry>;
|
|
894
|
+
update: (params: UpdateEntryParams, options?: RequestOptions$1) => Promise<CollectionEntry>;
|
|
895
|
+
delete: (params: DeleteEntryParams, options?: RequestOptions$1) => Promise<boolean>;
|
|
896
|
+
get: (params: GetEntryParams, options?: RequestOptions$1) => Promise<CollectionEntry>;
|
|
897
|
+
find: (params: GetEntriesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<CollectionEntry>>;
|
|
898
|
+
};
|
|
899
|
+
form: {
|
|
900
|
+
create: (params: CreateFormParams, options?: RequestOptions$1) => Promise<Form>;
|
|
901
|
+
update: (params: UpdateFormParams, options?: RequestOptions$1) => Promise<Form>;
|
|
902
|
+
delete: (params: DeleteFormParams, options?: RequestOptions$1) => Promise<{
|
|
903
|
+
deleted: boolean;
|
|
904
|
+
}>;
|
|
905
|
+
get: (params: GetFormParams, options?: RequestOptions$1) => Promise<Form>;
|
|
906
|
+
find: (params: GetFormsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Form>>;
|
|
907
|
+
submit: (params: SubmitFormParams, options?: RequestOptions$1) => Promise<FormSubmission>;
|
|
908
|
+
getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<FormSubmission>>;
|
|
909
|
+
getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
|
|
910
|
+
updateSubmission: (params: UpdateFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
|
|
911
|
+
};
|
|
912
|
+
taxonomy: {
|
|
913
|
+
create: (params: CreateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
|
|
914
|
+
update: (params: UpdateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
|
|
915
|
+
delete: (params: DeleteTaxonomyParams, options?: RequestOptions$1) => Promise<{
|
|
916
|
+
deleted: boolean;
|
|
917
|
+
}>;
|
|
918
|
+
get: (params: GetTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
|
|
919
|
+
find: (params: GetTaxonomiesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
|
|
920
|
+
getChildren: (params: GetTaxonomyChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
|
|
921
|
+
};
|
|
922
|
+
emailTemplate: {
|
|
923
|
+
create: (params: CreateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
|
|
924
|
+
update: (params: UpdateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
|
|
925
|
+
delete: (params: DeleteEmailTemplateParams, options?: RequestOptions$1) => Promise<{
|
|
926
|
+
deleted: boolean;
|
|
927
|
+
}>;
|
|
928
|
+
get: (params: GetEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
|
|
929
|
+
find: (params: GetEmailTemplatesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<EmailTemplate>>;
|
|
930
|
+
preview: (params: PreviewEmailTemplateParams, options?: RequestOptions$1) => Promise<PreviewEmailTemplateResponse>;
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
eshop: {
|
|
934
|
+
product: {
|
|
935
|
+
create: (params: CreateProductParams, options?: RequestOptions$1) => Promise<Product>;
|
|
936
|
+
update: (params: UpdateProductParams, options?: RequestOptions$1) => Promise<Product>;
|
|
937
|
+
delete: (params: DeleteProductParams, options?: RequestOptions$1) => Promise<{
|
|
938
|
+
deleted: boolean;
|
|
939
|
+
}>;
|
|
940
|
+
get: (params: GetProductParams, options?: RequestOptions$1) => Promise<Product>;
|
|
941
|
+
find: (params: GetProductsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Product>>;
|
|
942
|
+
};
|
|
943
|
+
order: {
|
|
944
|
+
update: (params: UpdateOrderParams, options?: RequestOptions$1) => Promise<Order>;
|
|
945
|
+
get: (params: GetOrderParams, options?: RequestOptions$1) => Promise<Order>;
|
|
946
|
+
find: (params: GetOrdersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Order>>;
|
|
947
|
+
getQuote: (params: GetQuoteParams, options?: RequestOptions$1) => Promise<OrderQuote>;
|
|
948
|
+
processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions$1) => Promise<ProcessOrderRefundResponse>;
|
|
949
|
+
downloadDigitalAccess: (params: DownloadDigitalAccessParams, options?: RequestOptions$1) => Promise<DigitalAccessDownloadResponse>;
|
|
950
|
+
getShippingRates: (params: GetShippingRatesParams, options?: RequestOptions$1) => Promise<{
|
|
951
|
+
rates: ShippingRate[];
|
|
952
|
+
}>;
|
|
953
|
+
ship: (params: ShipParams, options?: RequestOptions$1) => Promise<ShipResult>;
|
|
954
|
+
};
|
|
955
|
+
cart: {
|
|
956
|
+
create: (params: CreateCartParams, options?: RequestOptions$1) => Promise<Cart>;
|
|
957
|
+
update: (params: UpdateCartParams, options?: RequestOptions$1) => Promise<Cart>;
|
|
958
|
+
get: (params: GetCartParams, options?: RequestOptions$1) => Promise<Cart>;
|
|
959
|
+
find: (params?: FindCartsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Cart>>;
|
|
960
|
+
addItem: (params: AddCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
|
|
961
|
+
removeItem: (params: RemoveCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
|
|
962
|
+
clear: (params: ClearCartParams, options?: RequestOptions$1) => Promise<Cart>;
|
|
963
|
+
quote: (params: QuoteCartParams, options?: RequestOptions$1) => Promise<OrderQuote>;
|
|
964
|
+
checkout: (params: CheckoutCartParams, options?: RequestOptions$1) => Promise<OrderCheckoutResult>;
|
|
965
|
+
};
|
|
966
|
+
service: {
|
|
967
|
+
create: (params: CreateServiceParams, options?: RequestOptions$1) => Promise<Service>;
|
|
968
|
+
update: (params: UpdateServiceParams, options?: RequestOptions$1) => Promise<Service>;
|
|
969
|
+
delete: (params: DeleteServiceParams, options?: RequestOptions$1) => Promise<void>;
|
|
970
|
+
get: (params: GetServiceParams, options?: RequestOptions$1) => Promise<Service>;
|
|
971
|
+
find: (params: GetServicesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Service>>;
|
|
972
|
+
getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
|
|
973
|
+
findProviders: (params: FindServiceProvidersParams, options?: RequestOptions$1) => Promise<ServiceProvider[]>;
|
|
974
|
+
createProvider: (params: CreateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
|
|
975
|
+
updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
|
|
976
|
+
deleteProvider: (params: DeleteServiceProviderParams, options?: RequestOptions$1) => Promise<void>;
|
|
977
|
+
};
|
|
978
|
+
provider: {
|
|
979
|
+
create: (params: CreateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
|
|
980
|
+
update: (params: UpdateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
|
|
981
|
+
delete: (params: DeleteProviderParams, options?: RequestOptions$1) => Promise<void>;
|
|
982
|
+
get: (params: GetProviderParams, options?: RequestOptions$1) => Promise<Provider>;
|
|
983
|
+
find: (params: GetProvidersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Provider>>;
|
|
984
|
+
};
|
|
985
|
+
promoCode: {
|
|
986
|
+
createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
|
|
987
|
+
updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
|
|
988
|
+
deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$1): Promise<{
|
|
989
|
+
deleted: boolean;
|
|
990
|
+
}>;
|
|
991
|
+
getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
|
|
992
|
+
getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<PromoCode>>;
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
crm: {
|
|
996
|
+
contact: {
|
|
997
|
+
create: (params: CreateContactParams, options?: RequestOptions$1) => Promise<Contact$1>;
|
|
998
|
+
get: (params: GetContactParams, options?: RequestOptions$1) => Promise<ContactDetail>;
|
|
999
|
+
find: (params?: FindContactsParams, options?: RequestOptions$1) => Promise<{
|
|
1000
|
+
items: Contact$1[];
|
|
1001
|
+
cursor?: string;
|
|
1002
|
+
}>;
|
|
1003
|
+
update: (params: UpdateContactParams, options?: RequestOptions$1) => Promise<Contact$1>;
|
|
1004
|
+
merge: (params: MergeContactsParams, options?: RequestOptions$1) => Promise<Contact$1>;
|
|
1005
|
+
import: (params: ImportContactsParams, options?: RequestOptions$1) => Promise<ImportContactsResult>;
|
|
1006
|
+
revokeToken: (params: {
|
|
1007
|
+
id: string;
|
|
1008
|
+
token_id: string;
|
|
1009
|
+
store_id?: string;
|
|
1010
|
+
}, options?: RequestOptions$1) => Promise<{
|
|
1011
|
+
deleted: boolean;
|
|
1012
|
+
}>;
|
|
1013
|
+
revokeAllTokens: (params: {
|
|
1014
|
+
id: string;
|
|
1015
|
+
store_id?: string;
|
|
1016
|
+
}, options?: RequestOptions$1) => Promise<{
|
|
1017
|
+
deleted: boolean;
|
|
1018
|
+
}>;
|
|
1019
|
+
};
|
|
1020
|
+
contactList: {
|
|
1021
|
+
create: (params: CreateContactListParams, options?: RequestOptions$1) => Promise<ContactList>;
|
|
1022
|
+
update: (params: UpdateContactListParams, options?: RequestOptions$1) => Promise<ContactList>;
|
|
1023
|
+
get: (params: GetContactListParams, options?: RequestOptions$1) => Promise<ContactList>;
|
|
1024
|
+
find: (params?: FindContactListsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<ContactList>>;
|
|
1025
|
+
importContacts: (params: ImportContactsIntoContactListParams, options?: RequestOptions$1) => Promise<ImportContactsIntoContactListResult>;
|
|
1026
|
+
previewImportContacts: (params: ImportContactListPreviewParams, options?: RequestOptions$1) => Promise<ImportContactsPreviewResult>;
|
|
1027
|
+
addMember: (params: AddContactListContactParams, options?: RequestOptions$1) => Promise<ContactListMember>;
|
|
1028
|
+
updateMember: (params: UpdateContactListContactParams, options?: RequestOptions$1) => Promise<ContactListMember>;
|
|
1029
|
+
removeMember: (params: RemoveContactListContactParams, options?: RequestOptions$1) => Promise<{
|
|
1030
|
+
deleted: boolean;
|
|
1031
|
+
}>;
|
|
1032
|
+
findMembers: (params: FindContactListContactsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<ContactListMember>>;
|
|
1033
|
+
};
|
|
1034
|
+
action: {
|
|
1035
|
+
timeline(params: TimelineParams, options?: RequestOptions$1): Promise<{
|
|
1036
|
+
items: Action[];
|
|
1037
|
+
cursor: string | null;
|
|
1038
|
+
}>;
|
|
1039
|
+
find(params: FindActionsParams, options?: RequestOptions$1): Promise<{
|
|
1040
|
+
items: Action[];
|
|
1041
|
+
cursor: string | null;
|
|
1042
|
+
}>;
|
|
1043
|
+
};
|
|
1044
|
+
};
|
|
1045
|
+
outreach: {
|
|
1046
|
+
campaign: {
|
|
1047
|
+
create(params: CreateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
1048
|
+
update(params: UpdateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
1049
|
+
get(params: GetCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
1050
|
+
find(params?: FindCampaignsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Campaign>>;
|
|
1051
|
+
launch(params: LaunchCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
1052
|
+
duplicate(params: DuplicateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
1053
|
+
launchReadiness(params: GetCampaignLaunchReadinessParams, options?: RequestOptions$1): Promise<CampaignLaunchReadiness>;
|
|
1054
|
+
importEnrollments(params: ImportCampaignEnrollmentsParams, options?: RequestOptions$1): Promise<CampaignEnrollmentImportResult>;
|
|
1055
|
+
generatePersonalizedDrafts(params: GenerateOutreachPersonalizedDraftsParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
1056
|
+
};
|
|
1057
|
+
campaignEnrollment: {
|
|
1058
|
+
find(params?: FindCampaignEnrollmentsParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignEnrollment>>;
|
|
1059
|
+
get(params: GetCampaignEnrollmentConversationParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
|
|
1060
|
+
update(params: UpdateCampaignEnrollmentParams, options?: RequestOptions$1): Promise<CampaignEnrollment>;
|
|
1061
|
+
updateDraft(params: UpdateCampaignEnrollmentDraftParams, options?: RequestOptions$1): Promise<CampaignEnrollment>;
|
|
1062
|
+
updateStepExecution(params: UpdateCampaignEnrollmentStepExecutionParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
|
|
1063
|
+
reply(params: ReplyCampaignEnrollmentParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
|
|
1064
|
+
stop(params: StopCampaignEnrollmentParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
|
|
1065
|
+
};
|
|
1066
|
+
campaignMessage: {
|
|
1067
|
+
find(params?: FindCampaignMessagesParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignMessage>>;
|
|
1068
|
+
update(params: UpdateCampaignMessageParams, options?: RequestOptions$1): Promise<CampaignMessage>;
|
|
1069
|
+
};
|
|
1070
|
+
suppression: {
|
|
1071
|
+
create(params: CreateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
|
|
1072
|
+
update(params: UpdateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
|
|
1073
|
+
get(params: GetSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
|
|
1074
|
+
find(params?: FindSuppressionsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Suppression>>;
|
|
1075
|
+
};
|
|
1076
|
+
leadResearch: {
|
|
1077
|
+
createRun(params: CreateLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
|
|
1078
|
+
findRuns(params?: FindLeadResearchRunsParams, options?: RequestOptions$1): Promise<PaginatedResponse<LeadResearchRun>>;
|
|
1079
|
+
getRun(params: GetLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
|
|
1080
|
+
updateRun(params: UpdateLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
|
|
1081
|
+
cancelRun(params: CancelLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
|
|
1082
|
+
sendMessage(params: SendLeadResearchMessageParams, options?: RequestOptions$1): Promise<SendLeadResearchMessageResult>;
|
|
1083
|
+
findMessages(params: FindLeadResearchMessagesParams, options?: RequestOptions$1): Promise<LeadResearchMessage[]>;
|
|
1084
|
+
validateEmail(params: ValidateLeadEmailParams, options?: RequestOptions$1): Promise<LeadEmailValidationResult>;
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
automation: {
|
|
1088
|
+
workflow: {
|
|
1089
|
+
create: (params: CreateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
|
|
1090
|
+
update: (params: UpdateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
|
|
1091
|
+
delete: (params: DeleteWorkflowParams, options?: RequestOptions$1) => Promise<{
|
|
1092
|
+
deleted: boolean;
|
|
1093
|
+
}>;
|
|
1094
|
+
get: (params: GetWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
|
|
1095
|
+
find: (params?: GetWorkflowsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Workflow>>;
|
|
1096
|
+
trigger: (params: TriggerWorkflowParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
|
|
1097
|
+
getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<WorkflowExecution>>;
|
|
1098
|
+
getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
|
|
1099
|
+
listAccounts: (params?: GetWorkflowAccountsParams, options?: RequestOptions$1) => Promise<WorkflowAccount[]>;
|
|
1100
|
+
getAccountConnectUrl: (params: GetWorkflowAccountConnectUrlParams, options?: RequestOptions$1) => Promise<WorkflowAccountConnectUrl>;
|
|
1101
|
+
connectAccount: (params: ConnectWorkflowAccountParams, options?: RequestOptions$1) => Promise<WorkflowAccount>;
|
|
1102
|
+
deleteAccount: (params: DeleteWorkflowAccountParams, options?: RequestOptions$1) => Promise<boolean>;
|
|
1103
|
+
};
|
|
1104
|
+
support: {
|
|
1105
|
+
createAgent: (params: CreateSupportAgentParams, opts?: RequestOptions$1) => Promise<SupportAgent>;
|
|
1106
|
+
getAgent: (params: {
|
|
1107
|
+
store_id: string;
|
|
1108
|
+
id: string;
|
|
1109
|
+
}, opts?: RequestOptions$1) => Promise<SupportAgent>;
|
|
1110
|
+
findAgents: (params: {
|
|
1111
|
+
store_id: string;
|
|
1112
|
+
status?: string;
|
|
1113
|
+
limit?: number;
|
|
1114
|
+
cursor?: string;
|
|
1115
|
+
}, opts?: RequestOptions$1) => Promise<{
|
|
1116
|
+
items: SupportAgent[];
|
|
1117
|
+
cursor?: string;
|
|
1118
|
+
}>;
|
|
1119
|
+
updateAgent: (params: UpdateSupportAgentParams, opts?: RequestOptions$1) => Promise<SupportAgent>;
|
|
1120
|
+
deleteAgent: (params: {
|
|
1121
|
+
store_id: string;
|
|
1122
|
+
id: string;
|
|
1123
|
+
}, opts?: RequestOptions$1) => Promise<void>;
|
|
1124
|
+
findConversations: (params: {
|
|
1125
|
+
store_id: string;
|
|
1126
|
+
status?: string;
|
|
1127
|
+
agent_id?: string;
|
|
1128
|
+
query?: string;
|
|
1129
|
+
limit?: number;
|
|
1130
|
+
cursor?: string;
|
|
1131
|
+
}, opts?: RequestOptions$1) => Promise<{
|
|
1132
|
+
items: SupportConversation[];
|
|
1133
|
+
cursor?: string;
|
|
1134
|
+
}>;
|
|
1135
|
+
getConversation: (params: GetSupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversationResponse>;
|
|
1136
|
+
sendConversationMessage: (params: SendSupportMessageParams, opts?: RequestOptions$1) => Promise<SupportConversationResponse>;
|
|
1137
|
+
replyToConversation: (params: ReplySupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversationResponse>;
|
|
1138
|
+
resolveConversation: (params: ResolveSupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversation>;
|
|
1139
|
+
assignConversation: (params: AssignSupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversation>;
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
analytics: {
|
|
1143
|
+
get(request: AnalyticsRequest, options?: RequestOptions$1 & {
|
|
1144
|
+
store_id?: string;
|
|
1145
|
+
}): Promise<AnalyticsResponse>;
|
|
1146
|
+
};
|
|
1147
|
+
experiments: {
|
|
1148
|
+
create(params: CreateExperimentParams, options?: RequestOptions$1): Promise<Experiment>;
|
|
1149
|
+
update(params: UpdateExperimentParams, options?: RequestOptions$1): Promise<Experiment>;
|
|
1150
|
+
get(params: GetExperimentParams, options?: RequestOptions$1): Promise<Experiment>;
|
|
1151
|
+
find(params?: FindExperimentsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Experiment>>;
|
|
1152
|
+
results(params: GetExperimentParams, options?: RequestOptions$1): Promise<ExperimentResults>;
|
|
1153
|
+
};
|
|
1154
|
+
setStoreId: (storeId: string) => void;
|
|
1155
|
+
getStoreId: () => string;
|
|
1156
|
+
setMarket: (market: string) => void;
|
|
1157
|
+
getMarket: () => string;
|
|
1158
|
+
setLocale: (locale: string) => void;
|
|
1159
|
+
getLocale: () => string;
|
|
1160
|
+
readonly session: AdminSession | null;
|
|
1161
|
+
readonly isAuthenticated: boolean;
|
|
1162
|
+
onAuthStateChanged(listener: AuthStateListener<AdminSession>): () => void;
|
|
1163
|
+
logout(): Promise<void>;
|
|
1164
|
+
utils: {
|
|
1165
|
+
getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
|
|
1166
|
+
getBlockValue: (entry: any, blockKey: string) => any;
|
|
1167
|
+
getBlockTextValue: (block: any, locale?: string) => string;
|
|
1168
|
+
getBlockValues: (entry: any, blockKey: string) => any;
|
|
1169
|
+
getBlockLabel: typeof getBlockLabel;
|
|
1170
|
+
getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
|
|
1171
|
+
getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
|
|
1172
|
+
formatBlockValue: typeof formatBlockValue;
|
|
1173
|
+
prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
|
|
1174
|
+
extractBlockValues: typeof extractBlockValues;
|
|
1175
|
+
formatPrice: (prices: any[]) => string;
|
|
1176
|
+
getPriceAmount: (prices: any[]) => number;
|
|
1177
|
+
formatPayment: typeof formatPayment;
|
|
1178
|
+
formatMinor: typeof formatMinor;
|
|
1179
|
+
getCurrencySymbol: typeof getCurrencySymbol;
|
|
1180
|
+
getCurrencyName: typeof getCurrencyName;
|
|
1181
|
+
validatePhoneNumber: typeof validatePhoneNumber;
|
|
1182
|
+
tzGroups: {
|
|
1183
|
+
label: string;
|
|
1184
|
+
zones: {
|
|
1185
|
+
label: string;
|
|
1186
|
+
value: string;
|
|
1187
|
+
}[];
|
|
1188
|
+
}[];
|
|
1189
|
+
findTimeZone: typeof findTimeZone;
|
|
1190
|
+
slugify: typeof slugify;
|
|
1191
|
+
humanize: typeof humanize;
|
|
1192
|
+
categorify: typeof categorify;
|
|
1193
|
+
formatDate: typeof formatDate;
|
|
1194
|
+
getSvgContentForAstro: typeof getSvgContentForAstro;
|
|
1195
|
+
fetchSvgContent: typeof fetchSvgContent;
|
|
1196
|
+
injectSvgIntoElement: typeof injectSvgIntoElement;
|
|
1197
|
+
isValidKey: typeof isValidKey;
|
|
1198
|
+
validateKey: typeof validateKey;
|
|
1199
|
+
toKey: typeof toKey;
|
|
1200
|
+
nameToKey: typeof nameToKey;
|
|
1201
|
+
getAvailableStock: typeof getAvailableStock;
|
|
1202
|
+
getReservedStock: typeof getReservedStock;
|
|
1203
|
+
hasStock: typeof hasStock;
|
|
1204
|
+
getInventoryAt: typeof getInventoryAt;
|
|
1205
|
+
getFirstAvailableFCId: typeof getFirstAvailableFCId;
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
type CreateStorefrontConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
|
|
1209
|
+
storeId: string;
|
|
1210
|
+
market?: string;
|
|
1211
|
+
locale?: string;
|
|
1212
|
+
apiToken?: string;
|
|
1213
|
+
};
|
|
1214
|
+
declare function createStorefront(config: CreateStorefrontConfig): {
|
|
1215
|
+
identify: (params?: {
|
|
1216
|
+
email?: string;
|
|
1217
|
+
verify?: boolean;
|
|
1218
|
+
market?: string;
|
|
1219
|
+
}) => Promise<ContactSession>;
|
|
1220
|
+
verify: (params: {
|
|
1221
|
+
code: string;
|
|
1222
|
+
}) => Promise<ContactToken>;
|
|
1223
|
+
logout: () => Promise<void>;
|
|
1224
|
+
me: () => Promise<ContactDetail>;
|
|
1225
|
+
readonly session: ContactSession | null;
|
|
1226
|
+
readonly isAuthenticated: boolean;
|
|
1227
|
+
onAuthStateChanged(listener: AuthStateListener<ContactSession>): () => void;
|
|
1228
|
+
store: {
|
|
1229
|
+
getStore(options?: RequestOptions$1): Promise<Store>;
|
|
1230
|
+
location: {
|
|
1231
|
+
getCountries(options?: RequestOptions$1): Promise<{
|
|
1232
|
+
items: {
|
|
1233
|
+
code: string;
|
|
1234
|
+
name: string;
|
|
1235
|
+
states: {
|
|
1236
|
+
code: string;
|
|
1237
|
+
name: string;
|
|
1238
|
+
}[];
|
|
1239
|
+
}[];
|
|
1240
|
+
cursor: string | null;
|
|
1241
|
+
}>;
|
|
1242
|
+
getCountry(countryCode: string, options?: RequestOptions$1): Promise<{
|
|
1243
|
+
code: string;
|
|
1244
|
+
name: string;
|
|
1245
|
+
states: {
|
|
1246
|
+
code: string;
|
|
1247
|
+
name: string;
|
|
1248
|
+
}[];
|
|
1249
|
+
}>;
|
|
1250
|
+
list(options?: RequestOptions$1): Promise<Location[]>;
|
|
1251
|
+
get(id: string, options?: RequestOptions$1): Promise<Location>;
|
|
1252
|
+
};
|
|
1253
|
+
market: {
|
|
1254
|
+
list(options?: RequestOptions$1): Promise<Market[]>;
|
|
1255
|
+
get(id: string, options?: RequestOptions$1): Promise<Market>;
|
|
1256
|
+
};
|
|
1257
|
+
};
|
|
1258
|
+
cart: CartController;
|
|
1259
|
+
cms: {
|
|
1260
|
+
collection: {
|
|
1261
|
+
get(params: GetCollectionParams, options?: RequestOptions$1): Promise<Collection>;
|
|
1262
|
+
};
|
|
1263
|
+
entry: {
|
|
1264
|
+
get(params: GetEntryParams, options?: RequestOptions$1): Promise<CollectionEntry>;
|
|
1265
|
+
find(params: GetEntriesParams, options?: RequestOptions$1): Promise<PaginatedResponse<CollectionEntry>>;
|
|
1266
|
+
};
|
|
1267
|
+
form: {
|
|
1268
|
+
get(params: GetFormParams, options?: RequestOptions$1): Promise<Form>;
|
|
1269
|
+
submit(params: SubmitFormParams, options?: RequestOptions$1): Promise<FormSubmission>;
|
|
1270
|
+
};
|
|
1271
|
+
taxonomy: {
|
|
1272
|
+
get(params: GetTaxonomyParams, options?: RequestOptions$1): Promise<Taxonomy>;
|
|
1273
|
+
getChildren(params: GetTaxonomyChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Taxonomy>>;
|
|
1274
|
+
};
|
|
1275
|
+
};
|
|
1276
|
+
eshop: {
|
|
1277
|
+
product: {
|
|
1278
|
+
get(params: GetProductParams, options?: RequestOptions$1): Promise<Product>;
|
|
1279
|
+
find(params: GetProductsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Product>>;
|
|
1280
|
+
};
|
|
1281
|
+
cart: {
|
|
1282
|
+
current(params?: GetCurrentCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
1283
|
+
get(params: GetCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
1284
|
+
update(params: UpdateCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
1285
|
+
addItem(params: AddCartItemParams, options?: RequestOptions$1): Promise<Cart>;
|
|
1286
|
+
removeItem(params: RemoveCartItemParams, options?: RequestOptions$1): Promise<Cart>;
|
|
1287
|
+
clear(params: ClearCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
1288
|
+
quote(params: QuoteCartParams, options?: RequestOptions$1): Promise<OrderQuote>;
|
|
1289
|
+
checkout(params: CheckoutCartParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
|
|
1290
|
+
};
|
|
1291
|
+
order: {
|
|
1292
|
+
get(params: GetOrderParams, options?: RequestOptions$1): Promise<Order>;
|
|
1293
|
+
find(params: GetOrdersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Order>>;
|
|
1294
|
+
downloadDigitalAccess(params: DownloadDigitalAccessParams, options?: RequestOptions$1): Promise<DigitalAccessDownloadResponse>;
|
|
1295
|
+
};
|
|
1296
|
+
service: {
|
|
1297
|
+
get(params: GetServiceParams, options?: RequestOptions$1): Promise<Service>;
|
|
1298
|
+
find(params: GetServicesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Service>>;
|
|
1299
|
+
findProviders(params: FindServiceProvidersParams, options?: RequestOptions$1): Promise<Provider[]>;
|
|
1300
|
+
getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
|
|
1301
|
+
};
|
|
1302
|
+
provider: {
|
|
1303
|
+
get(params: GetProviderParams, options?: RequestOptions$1): Promise<Provider>;
|
|
1304
|
+
find(params: GetProvidersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Provider>>;
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
crm: {
|
|
1308
|
+
contact: {
|
|
1309
|
+
identify(params?: {
|
|
1310
|
+
email?: string;
|
|
1311
|
+
verify?: boolean;
|
|
1312
|
+
market?: string;
|
|
1313
|
+
}, options?: RequestOptions$1): Promise<IdentifyResponse>;
|
|
1314
|
+
verify(params: {
|
|
1315
|
+
code: string;
|
|
1316
|
+
}, options?: RequestOptions$1): Promise<VerifyResponse>;
|
|
1317
|
+
logout(options?: RequestOptions$1): Promise<void>;
|
|
1318
|
+
getMe(options?: RequestOptions$1): Promise<ContactDetail>;
|
|
1319
|
+
};
|
|
1320
|
+
contactList: {
|
|
1321
|
+
get(params: GetContactListParams, options?: RequestOptions$1): Promise<ContactList>;
|
|
1322
|
+
find(params?: FindContactListsParams, options?: RequestOptions$1): Promise<PaginatedResponse<ContactList>>;
|
|
1323
|
+
subscribe(params: SubscribeContactListParams, options?: RequestOptions$1): Promise<ContactListSubscribeResponse>;
|
|
1324
|
+
checkAccess(params: ContactListAccessParams, options?: RequestOptions$1): Promise<ContactListAccessResponse>;
|
|
1325
|
+
unsubscribe(token: string, options?: RequestOptions$1): Promise<{
|
|
1326
|
+
success: boolean;
|
|
1327
|
+
}>;
|
|
1328
|
+
confirm(token: string, options?: RequestOptions$1): Promise<{
|
|
1329
|
+
success: boolean;
|
|
1330
|
+
}>;
|
|
1331
|
+
};
|
|
1332
|
+
};
|
|
1333
|
+
action: {
|
|
1334
|
+
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"];
|
|
1335
|
+
track(params: TrackActionParams): Promise<void>;
|
|
1336
|
+
};
|
|
1337
|
+
experiments: {
|
|
1338
|
+
use(params: UseExperimentParams, options?: RequestOptions$1): Promise<ExperimentUseResponse>;
|
|
1339
|
+
};
|
|
1340
|
+
support: {
|
|
1341
|
+
startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1342
|
+
sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1343
|
+
getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1344
|
+
};
|
|
1345
|
+
setStoreId: (storeId: string) => void;
|
|
1346
|
+
getStoreId: () => string;
|
|
1347
|
+
setMarket: (key: string) => void;
|
|
1348
|
+
getMarket: () => string;
|
|
1349
|
+
setLocale: (l: string) => void;
|
|
1350
|
+
getLocale: () => string;
|
|
1351
|
+
utils: {
|
|
1352
|
+
getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
|
|
1353
|
+
getBlockValue: (entry: any, blockKey: string) => any;
|
|
1354
|
+
getBlockTextValue: (block: any, locale?: string) => string;
|
|
1355
|
+
getBlockValues: (entry: any, blockKey: string) => any;
|
|
1356
|
+
getBlockLabel: typeof getBlockLabel;
|
|
1357
|
+
getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
|
|
1358
|
+
getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
|
|
1359
|
+
formatBlockValue: typeof formatBlockValue;
|
|
1360
|
+
prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
|
|
1361
|
+
extractBlockValues: typeof extractBlockValues;
|
|
1362
|
+
formatPrice: (prices: any[]) => string;
|
|
1363
|
+
getPriceAmount: (prices: any[]) => number;
|
|
1364
|
+
formatPayment: typeof formatPayment;
|
|
1365
|
+
formatMinor: typeof formatMinor;
|
|
1366
|
+
getCurrencySymbol: typeof getCurrencySymbol;
|
|
1367
|
+
getCurrencyName: typeof getCurrencyName;
|
|
1368
|
+
validatePhoneNumber: typeof validatePhoneNumber;
|
|
1369
|
+
tzGroups: {
|
|
1370
|
+
label: string;
|
|
1371
|
+
zones: {
|
|
1372
|
+
label: string;
|
|
1373
|
+
value: string;
|
|
1374
|
+
}[];
|
|
1375
|
+
}[];
|
|
1376
|
+
findTimeZone: typeof findTimeZone;
|
|
1377
|
+
slugify: typeof slugify;
|
|
1378
|
+
humanize: typeof humanize;
|
|
1379
|
+
categorify: typeof categorify;
|
|
1380
|
+
formatDate: typeof formatDate;
|
|
1381
|
+
getSvgContentForAstro: typeof getSvgContentForAstro;
|
|
1382
|
+
fetchSvgContent: typeof fetchSvgContent;
|
|
1383
|
+
injectSvgIntoElement: typeof injectSvgIntoElement;
|
|
1384
|
+
isValidKey: typeof isValidKey;
|
|
1385
|
+
validateKey: typeof validateKey;
|
|
1386
|
+
toKey: typeof toKey;
|
|
1387
|
+
nameToKey: typeof nameToKey;
|
|
1388
|
+
getAvailableStock: typeof getAvailableStock;
|
|
1389
|
+
getReservedStock: typeof getReservedStock;
|
|
1390
|
+
hasStock: typeof hasStock;
|
|
1391
|
+
getInventoryAt: typeof getInventoryAt;
|
|
1392
|
+
getFirstAvailableFCId: typeof getFirstAvailableFCId;
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
|
|
1396
|
+
export { type AnalyticsActionReportKey as $, type AuthStateListener as A, type CartControllerListener as B, type CreateStorefrontConfig as C, type CartControllerQuoteParams as D, type ExperimentUseResponse as E, type CartControllerRefreshParams as F, type GetSupportConversationParams as G, type CartControllerRemoveItemParams as H, type IdentifyResponse as I, type CartControllerState as J, type CartControllerUpdateParams as K, type CommonActionKey as L, type HttpClientConfig as M, createCartController as N, createStorefront as O, type ActionFeedCategory as P, type ActionFeedCursor as Q, type ActionFeedData as R, type StartSupportConversationParams as S, type TrackActionParams as T, type UseExperimentParams as U, type VerifyResponse as V, type ActionFeedItem as W, type ActionFeedSummary as X, type AdminSession as Y, type AdminSessionInternal as Z, type AdminSessionUpdater as _, type ContactSession as a, type AnalyticsBlockRequest as a0, type AnalyticsBlockResponse as a1, type AnalyticsBreakdownData as a2, type AnalyticsBreakdownItem as a3, type AnalyticsBreakdownReportKey as a4, type AnalyticsCompositeReportKey as a5, type AnalyticsMetricData as a6, type AnalyticsMetricReportKey as a7, type AnalyticsReport as a8, type AnalyticsReportKey as a9, type OutreachFunnelData as aA, type OutreachFunnelStage as aB, type OutreachOverviewData as aC, type ReplySupportConversationParams as aD, type ResolveSupportConversationParams as aE, type RevenueByCurrencyData as aF, SDK_VERSION as aG, SUPPORTED_FRAMEWORKS as aH, type SupportAction as aI, type SupportAgent as aJ, type SupportAgentAiConfig as aK, type SupportAgentEdge as aL, type SupportAgentNode as aM, type SupportConversation as aN, type SupportMessage as aO, type TimelineParams as aP, type UpdateExperimentParams as aQ, type WorkflowTool as aR, type WorkflowToolOperation as aS, type WorkflowToolResource as aT, createAdmin as aU, type AnalyticsReportRequest as aa, type AnalyticsRequest as ab, type AnalyticsResponse as ac, type AnalyticsTimeRange as ad, type ApiConfig as ae, type AssignSupportConversationParams as af, type BusinessOverviewData as ag, type ContactFunnelData as ah, type ContactFunnelStage as ai, type ContactSessionInternal as aj, type ContactSessionUpdater as ak, type CreateAdminConfig as al, type CreateExperimentParams as am, type DataHealthData as an, type EdgeTrigger as ao, type EntityStatusOverviewData as ap, type Experiment as aq, type ExperimentResults as ar, type ExperimentStatus as as, type ExperimentVariant as at, type ExperimentVariantResult as au, type FindExperimentsParams as av, type GetCountriesResponse as aw, type GetExperimentParams as ax, type LocationCountry as ay, type LocationState as az, type ContactToken as b, type CartController as c, type SupportConversationResponse as d, type SendSupportMessageParams as e, formatBlockValue as f, getBlockLabel as g, extractBlockValues as h, findTimeZone as i, humanize as j, categorify as k, formatDate as l, getSvgContentForAstro as m, fetchSvgContent as n, injectSvgIntoElement as o, prepareBlocksForSubmission as p, type StorefrontAction as q, type AuthStorage as r, slugify as s, COMMON_ACTION_KEYS as t, type CartApi as u, validatePhoneNumber as v, type CartControllerAddItemParams as w, type CartControllerCheckoutParams as x, type CartControllerClearParams as y, type CartControllerInitParams as z };
|