arky-sdk 0.9.0 → 0.9.6
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 +2 -2
- package/dist/{admin-CfHen7c5.d.cts → admin-DjYydKeB.d.ts} +477 -124
- package/dist/{admin-ru7pX5bd.d.ts → admin-DlL8mCxL.d.cts} +477 -124
- package/dist/admin.cjs +592 -202
- 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 +592 -202
- package/dist/admin.js.map +1 -1
- package/dist/api-BbBHcd4p.d.cts +3289 -0
- package/dist/api-BbBHcd4p.d.ts +3289 -0
- package/dist/{index-C5gikdBg.d.cts → index-CZxubTDA.d.ts} +1 -1
- package/dist/{index-MFMjlIfS.d.ts → index-nCF3Z6Af.d.cts} +1 -1
- package/dist/index.cjs +666 -319
- 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 +666 -319
- package/dist/index.js.map +1 -1
- package/dist/storefront-store.cjs +149 -134
- package/dist/storefront-store.cjs.map +1 -1
- package/dist/storefront-store.d.cts +3 -3
- package/dist/storefront-store.d.ts +3 -3
- package/dist/storefront-store.js +149 -134
- package/dist/storefront-store.js.map +1 -1
- package/dist/storefront.cjs +149 -134
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +45 -102
- package/dist/storefront.d.ts +45 -102
- package/dist/storefront.js +149 -134
- 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 +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cart, OrderQuote, OrderCheckoutResult, GetCurrentCartParams, GetCartParams,
|
|
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-
|
|
1
|
+
import { C as Cart, O as OrderQuote, a as OrderCheckoutResult, G as GetCurrentCartParams, b as GetCartParams, R as RequestOptions$1, A as AddCartItemParams, U as UpdateCartParams, c as RemoveCartItemParams, d as ClearCartParams, Q as QuoteCartParams, e as CheckoutCartParams, P as Profile, S as Store, M as Market, f as MagicLinkVerifyParams, g as AuthToken, h as MagicLinkRequestParams, i as UpdateAccountProfileParams, j as AccountUpdateResponse, D as DeleteAccountParams, k as GetMeParams, l as Account, m as SearchAccountsParams, L as Location, n as CreateLocationParams, o as UpdateLocationParams, p as DeleteLocationParams, q as CreateMarketParams, r as UpdateMarketParams, s as DeleteMarketParams, t as CreateStoreParams, u as UpdateStoreParams, v as DeleteStoreParams, w as GetStoreParams, x as GetStoresParams, y as PaginatedResponse, z as GetSubscriptionPlansParams, B as SubscriptionPlan, E as SubscribeParams, F as CreatePortalSessionParams, H as AddMemberParams, I as InviteUserParams, J as RemoveMemberParams, T as TestWebhookParams, K as GetStoreMediaParams2, N as Media, V as OAuthConnectParams, W as Integration, X as OAuthDisconnectParams, Y as ListIntegrationsParams, Z as CreateIntegrationParams, _ as UpdateIntegrationParams, $ as DeleteIntegrationParams, a0 as ListWebhooksParams, a1 as Webhook, a2 as CreateWebhookParams, a3 as UpdateWebhookParams, a4 as DeleteWebhookParams, a5 as GetMediaParams, a6 as UploadStoreMediaParams, a7 as DeleteStoreMediaParams, a8 as GetStoreMediaParams, a9 as UpdateMediaParams, aa as TrackEmailOpenParams, ab as TriggerNotificationParams, ac as CreatePromoCodeParams, ad as PromoCode, ae as UpdatePromoCodeParams, af as DeletePromoCodeParams, ag as GetPromoCodeParams, ah as GetPromoCodesParams, ai as GetShippingRatesParams, aj as ShippingRate, ak as ShipParams, al as ShipResult, am as CreateNodeParams, an as Node, ao as UpdateNodeParams, ap as DeleteNodeParams, aq as GetNodeParams, ar as Block, as as TaxonomyEntry, at as NodeStatus, au as GetNodesParams, av as GetNodeChildrenParams, aw as CreateFormParams, ax as Form, ay as UpdateFormParams, az as DeleteFormParams, aA as GetFormParams, aB as GetFormsParams, aC as SubmitFormParams, aD as FormSubmission, aE as GetFormSubmissionsParams, aF as GetFormSubmissionParams, aG as UpdateFormSubmissionParams, aH as CreateTaxonomyParams, aI as Taxonomy, aJ as UpdateTaxonomyParams, aK as DeleteTaxonomyParams, aL as GetTaxonomyParams, aM as GetTaxonomiesParams, aN as GetTaxonomyChildrenParams, aO as CreateEmailTemplateParams, aP as EmailTemplate, aQ as UpdateEmailTemplateParams, aR as DeleteEmailTemplateParams, aS as GetEmailTemplateParams, aT as GetEmailTemplatesParams, aU as PreviewEmailTemplateParams, aV as PreviewEmailTemplateResponse, aW as CreateProductParams, aX as Product, aY as UpdateProductParams, aZ as DeleteProductParams, a_ as GetProductParams, a$ as GetProductsParams, b0 as UpdateOrderParams, b1 as Order, b2 as GetOrderParams, b3 as GetOrdersParams, b4 as GetQuoteParams, b5 as ProcessOrderRefundParams, b6 as CreateCartParams, b7 as FindCartsParams, b8 as CreateServiceParams, b9 as Service, ba as UpdateServiceParams, bb as DeleteServiceParams, bc as GetServiceParams, bd as GetServicesParams, be as GetAvailabilityParams, bf as AvailabilityResponse, bg as FindServiceProvidersParams, bh as ServiceProvider, bi as CreateServiceProviderParams, bj as UpdateServiceProviderParams, bk as DeleteServiceProviderParams, bl as CreateProviderParams, bm as Provider, bn as UpdateProviderParams, bo as DeleteProviderParams, bp as GetProviderParams, bq as GetProvidersParams, br as CreateProfileParams, bs as Profile$1, bt as GetProfileParams, bu as ProfileDetail, bv as FindProfilesParams, bw as UpdateProfileParams, bx as MergeProfilesParams, by as ImportProfilesParams, bz as ImportProfilesResult, bA as CreateProfileListParams, bB as ProfileList, bC as UpdateProfileListParams, bD as GetProfileListParams, bE as FindProfileListsParams, bF as ImportProfilesIntoProfileListParams, bG as ImportProfilesIntoProfileListResult, bH as ImportProfileListPreviewParams, bI as ImportProfilesPreviewResult, bJ as AddProfileListProfileParams, bK as ProfileListMember, bL as UpdateProfileListProfileParams, bM as RemoveProfileListProfileParams, bN as FindProfileListProfilesParams, bO as CreateMailboxParams, bP as Mailbox, bQ as UpdateMailboxParams, bR as GetMailboxParams, bS as TestMailboxParams, bT as TestMailboxResult, bU as PrepareMailboxParams, bV as FindMailboxesParams, bW as CreateCampaignParams, bX as Campaign, bY as UpdateCampaignParams, bZ as GetCampaignParams, b_ as FindCampaignsParams, b$ as LaunchCampaignParams, c0 as DuplicateCampaignParams, c1 as GetCampaignLaunchReadinessParams, c2 as CampaignLaunchReadiness, c3 as ImportCampaignRecipientsParams, c4 as CampaignRecipientImportResult, c5 as GenerateOutreachPersonalizedDraftsParams, c6 as FindCampaignRecipientsParams, c7 as CampaignRecipient, c8 as GetCampaignRecipientConversationParams, c9 as CampaignRecipientConversationResponse, ca as UpdateCampaignRecipientParams, cb as UpdateCampaignRecipientDraftParams, cc as ReplyCampaignRecipientParams, cd as StopCampaignRecipientParams, ce as FindCampaignMessagesParams, cf as CampaignMessage, cg as UpdateCampaignMessageParams, ch as CreateSuppressionParams, ci as Suppression, cj as UpdateSuppressionParams, ck as GetSuppressionParams, cl as FindSuppressionsParams, cm as CreateLeadResearchRunParams, cn as LeadResearchRun, co as FindLeadResearchRunsParams, cp as GetLeadResearchRunParams, cq as UpdateLeadResearchRunParams, cr as CancelLeadResearchRunParams, cs as SendLeadResearchMessageParams, ct as SendLeadResearchMessageResult, cu as FindLeadResearchMessagesParams, cv as LeadResearchMessage, cw as ValidateLeadEmailParams, cx as LeadEmailValidationResult, cy as FindActivitiesParams, cz as CreateWorkflowParams, cA as Workflow, cB as UpdateWorkflowParams, cC as DeleteWorkflowParams, cD as GetWorkflowParams, cE as GetWorkflowsParams, cF as TriggerWorkflowParams, cG as WorkflowExecution, cH as GetWorkflowExecutionsParams, cI as GetWorkflowExecutionParams, cJ as SubscribeProfileListParams, cK as ProfileListSubscribeResponse, cL as ProfileListAccessParams, cM as ProfileListAccessResponse } from './api-BbBHcd4p.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-nCF3Z6Af.cjs';
|
|
3
3
|
|
|
4
4
|
interface CartApi {
|
|
5
5
|
current(params?: GetCurrentCartParams, options?: RequestOptions$1): Promise<Cart>;
|
|
@@ -54,22 +54,22 @@ interface CartController {
|
|
|
54
54
|
}
|
|
55
55
|
declare function createCartController(cartApi: CartApi): CartController;
|
|
56
56
|
|
|
57
|
-
type
|
|
57
|
+
type ProfileToken = {
|
|
58
58
|
id: string;
|
|
59
59
|
token: string;
|
|
60
60
|
created_at: number;
|
|
61
61
|
};
|
|
62
62
|
type IdentifyResponse = {
|
|
63
|
-
|
|
64
|
-
token:
|
|
63
|
+
profile: Profile;
|
|
64
|
+
token: ProfileToken;
|
|
65
65
|
store: Store;
|
|
66
66
|
market: Market | null;
|
|
67
67
|
code_sent: boolean;
|
|
68
68
|
};
|
|
69
|
-
type VerifyResponse =
|
|
69
|
+
type VerifyResponse = ProfileToken;
|
|
70
70
|
interface Activity$1 {
|
|
71
71
|
store_id: string;
|
|
72
|
-
|
|
72
|
+
profile_id: string;
|
|
73
73
|
type: string;
|
|
74
74
|
payload: Record<string, unknown>;
|
|
75
75
|
created_at: number;
|
|
@@ -85,8 +85,8 @@ interface AnalyticsTimeRange {
|
|
|
85
85
|
from: number;
|
|
86
86
|
to: number;
|
|
87
87
|
}
|
|
88
|
-
type AnalyticsReportKey = "orders_created" | "
|
|
89
|
-
type ActivityFeedCategory = "orders" | "carts" | "promo_codes" | "submissions" | "
|
|
88
|
+
type AnalyticsReportKey = "business_overview" | "profile_funnel" | "outreach_overview" | "outreach_funnel" | "outreach_variant_performance" | "activity_by_country" | "top_activity_pages" | "entity_status_overview" | "data_health" | "orders_created" | "profiles_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" | "nodes_by_status" | "profiles_by_status" | "profile_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_recipients_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_activity";
|
|
89
|
+
type ActivityFeedCategory = "orders" | "carts" | "promo_codes" | "submissions" | "profiles" | "profile_lists" | "products" | "services" | "providers" | "cms" | "workflows" | "activities";
|
|
90
90
|
interface AnalyticsReportRequest {
|
|
91
91
|
key: AnalyticsReportKey;
|
|
92
92
|
limit?: number;
|
|
@@ -95,6 +95,12 @@ interface AnalyticsReportRequest {
|
|
|
95
95
|
cursor_id?: string;
|
|
96
96
|
}
|
|
97
97
|
interface AnalyticsRequest {
|
|
98
|
+
time?: AnalyticsTimeRange;
|
|
99
|
+
reports?: AnalyticsReportRequest[];
|
|
100
|
+
blocks?: AnalyticsBlockRequest[];
|
|
101
|
+
}
|
|
102
|
+
interface AnalyticsBlockRequest {
|
|
103
|
+
id: string;
|
|
98
104
|
time: AnalyticsTimeRange;
|
|
99
105
|
reports: AnalyticsReportRequest[];
|
|
100
106
|
}
|
|
@@ -106,11 +112,108 @@ interface AnalyticsBreakdownItem {
|
|
|
106
112
|
key: string;
|
|
107
113
|
label: string;
|
|
108
114
|
value: number;
|
|
109
|
-
|
|
115
|
+
unique_profiles?: number;
|
|
116
|
+
unique_visitors?: number;
|
|
110
117
|
}
|
|
111
118
|
interface AnalyticsBreakdownData {
|
|
112
119
|
items: AnalyticsBreakdownItem[];
|
|
113
120
|
}
|
|
121
|
+
interface BusinessOverviewData {
|
|
122
|
+
visitors: number;
|
|
123
|
+
new_visitors: number;
|
|
124
|
+
known_profiles: number;
|
|
125
|
+
new_known_profiles: number;
|
|
126
|
+
email_known_profiles: number;
|
|
127
|
+
verified_profiles: number;
|
|
128
|
+
new_verified_profiles: number;
|
|
129
|
+
buyers: number;
|
|
130
|
+
orders: number;
|
|
131
|
+
revenue: number;
|
|
132
|
+
revenue_by_currency: RevenueByCurrencyData[];
|
|
133
|
+
average_order_value: number;
|
|
134
|
+
carts: number;
|
|
135
|
+
abandoned_carts: number;
|
|
136
|
+
visitor_to_known_rate: number;
|
|
137
|
+
visitor_to_buyer_rate: number;
|
|
138
|
+
cart_abandonment_rate: number;
|
|
139
|
+
}
|
|
140
|
+
interface RevenueByCurrencyData {
|
|
141
|
+
currency: string;
|
|
142
|
+
orders: number;
|
|
143
|
+
revenue: number;
|
|
144
|
+
average_order_value: number;
|
|
145
|
+
}
|
|
146
|
+
interface ProfileFunnelStage {
|
|
147
|
+
key: "visitors" | "email_known_profiles" | "verified_profiles" | "buyers" | string;
|
|
148
|
+
label: string;
|
|
149
|
+
value: number;
|
|
150
|
+
}
|
|
151
|
+
interface ProfileFunnelData {
|
|
152
|
+
stages: ProfileFunnelStage[];
|
|
153
|
+
visitor_to_known_rate?: number;
|
|
154
|
+
visitor_to_buyer_rate?: number;
|
|
155
|
+
}
|
|
156
|
+
interface OutreachOverviewData {
|
|
157
|
+
profile_lists: number;
|
|
158
|
+
active_profile_lists: number;
|
|
159
|
+
mailboxes: number;
|
|
160
|
+
active_mailboxes: number;
|
|
161
|
+
campaigns: number;
|
|
162
|
+
active_campaigns: number;
|
|
163
|
+
campaign_recipients: number;
|
|
164
|
+
new_campaign_recipients: number;
|
|
165
|
+
active_campaign_recipients: number;
|
|
166
|
+
completed_campaign_recipients: number;
|
|
167
|
+
replied_campaign_recipients: number;
|
|
168
|
+
suppressed_campaign_recipients: number;
|
|
169
|
+
failed_campaign_recipients: number;
|
|
170
|
+
campaign_messages_sent: number;
|
|
171
|
+
outreach_bounces: number;
|
|
172
|
+
campaign_messages_received: number;
|
|
173
|
+
suppressions: number;
|
|
174
|
+
active_suppressions: number;
|
|
175
|
+
new_suppressions: number;
|
|
176
|
+
reply_rate: number;
|
|
177
|
+
bounce_rate: number;
|
|
178
|
+
suppression_rate: number;
|
|
179
|
+
}
|
|
180
|
+
interface OutreachFunnelStage {
|
|
181
|
+
key: "profile_lists" | "campaigns" | "campaign_recipients" | "campaign_messages_sent" | "outreach_bounces" | "campaign_messages_received" | string;
|
|
182
|
+
label: string;
|
|
183
|
+
value: number;
|
|
184
|
+
}
|
|
185
|
+
interface OutreachFunnelData {
|
|
186
|
+
stages: OutreachFunnelStage[];
|
|
187
|
+
reply_rate?: number;
|
|
188
|
+
bounce_rate?: number;
|
|
189
|
+
suppression_rate?: number;
|
|
190
|
+
}
|
|
191
|
+
interface OutreachVariantPerformanceItem {
|
|
192
|
+
campaign_id: string;
|
|
193
|
+
step_id: string;
|
|
194
|
+
step_position: number;
|
|
195
|
+
step_variant_id: string;
|
|
196
|
+
step_variant_name: string;
|
|
197
|
+
sent: number;
|
|
198
|
+
bounced: number;
|
|
199
|
+
failed: number;
|
|
200
|
+
replies: number;
|
|
201
|
+
reply_rate: number;
|
|
202
|
+
bounce_rate: number;
|
|
203
|
+
}
|
|
204
|
+
interface OutreachVariantPerformanceData {
|
|
205
|
+
variants: OutreachVariantPerformanceItem[];
|
|
206
|
+
}
|
|
207
|
+
interface EntityStatusOverviewData {
|
|
208
|
+
entities: Record<string, AnalyticsBreakdownItem[]>;
|
|
209
|
+
}
|
|
210
|
+
interface DataHealthData {
|
|
211
|
+
anonymous_profiles: number;
|
|
212
|
+
known_profiles: number;
|
|
213
|
+
duplicate_emails: number;
|
|
214
|
+
unknown_country_events: number;
|
|
215
|
+
unknown_device_events: number;
|
|
216
|
+
}
|
|
114
217
|
interface ActivityFeedItem {
|
|
115
218
|
id: string;
|
|
116
219
|
entity: string;
|
|
@@ -118,7 +221,7 @@ interface ActivityFeedItem {
|
|
|
118
221
|
action: string;
|
|
119
222
|
event_type: string;
|
|
120
223
|
status: string;
|
|
121
|
-
|
|
224
|
+
profile_id: string;
|
|
122
225
|
category: string;
|
|
123
226
|
title: string;
|
|
124
227
|
description: string;
|
|
@@ -131,8 +234,8 @@ interface ActivityFeedSummary {
|
|
|
131
234
|
total: number;
|
|
132
235
|
orders: number;
|
|
133
236
|
submissions: number;
|
|
134
|
-
|
|
135
|
-
|
|
237
|
+
profiles: number;
|
|
238
|
+
profile_lists: number;
|
|
136
239
|
abandoned_carts: number;
|
|
137
240
|
carts: number;
|
|
138
241
|
promo_codes: number;
|
|
@@ -141,7 +244,6 @@ interface ActivityFeedSummary {
|
|
|
141
244
|
providers: number;
|
|
142
245
|
cms: number;
|
|
143
246
|
workflows: number;
|
|
144
|
-
agents: number;
|
|
145
247
|
activities: number;
|
|
146
248
|
window_start: number;
|
|
147
249
|
}
|
|
@@ -158,28 +260,191 @@ interface ActivityFeedData {
|
|
|
158
260
|
execution_ms: number;
|
|
159
261
|
};
|
|
160
262
|
}
|
|
263
|
+
type AnalyticsMetricReportKey = "orders_created" | "profiles_created" | "form_submissions_created" | "carts_abandoned" | "campaign_messages_sent" | "campaign_messages_received" | "suppressions_created" | "media_count";
|
|
264
|
+
type AnalyticsBreakdownReportKey = "activity_by_country" | "top_activity_pages" | "products_by_status" | "services_by_status" | "providers_by_status" | "nodes_by_status" | "profiles_by_status" | "profile_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_recipients_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";
|
|
265
|
+
type AnalyticsActivityReportKey = "recent_activity";
|
|
266
|
+
type AnalyticsCompositeReportKey = "business_overview" | "profile_funnel" | "outreach_overview" | "outreach_funnel" | "outreach_variant_performance" | "entity_status_overview" | "data_health";
|
|
161
267
|
type AnalyticsReport = {
|
|
162
|
-
key:
|
|
163
|
-
type: "metric";
|
|
268
|
+
key: AnalyticsMetricReportKey;
|
|
164
269
|
data: AnalyticsMetricData;
|
|
165
270
|
} | {
|
|
166
|
-
key:
|
|
167
|
-
type: "breakdown";
|
|
271
|
+
key: AnalyticsBreakdownReportKey;
|
|
168
272
|
data: AnalyticsBreakdownData;
|
|
169
273
|
} | {
|
|
170
|
-
key:
|
|
171
|
-
|
|
274
|
+
key: "business_overview";
|
|
275
|
+
data: BusinessOverviewData;
|
|
276
|
+
} | {
|
|
277
|
+
key: "profile_funnel";
|
|
278
|
+
data: ProfileFunnelData;
|
|
279
|
+
} | {
|
|
280
|
+
key: "outreach_overview";
|
|
281
|
+
data: OutreachOverviewData;
|
|
282
|
+
} | {
|
|
283
|
+
key: "outreach_funnel";
|
|
284
|
+
data: OutreachFunnelData;
|
|
285
|
+
} | {
|
|
286
|
+
key: "outreach_variant_performance";
|
|
287
|
+
data: OutreachVariantPerformanceData;
|
|
288
|
+
} | {
|
|
289
|
+
key: "entity_status_overview";
|
|
290
|
+
data: EntityStatusOverviewData;
|
|
291
|
+
} | {
|
|
292
|
+
key: "data_health";
|
|
293
|
+
data: DataHealthData;
|
|
294
|
+
} | {
|
|
295
|
+
key: AnalyticsActivityReportKey;
|
|
172
296
|
data: ActivityFeedData;
|
|
173
297
|
};
|
|
174
|
-
interface
|
|
298
|
+
interface AnalyticsBlockResponse {
|
|
299
|
+
id: string;
|
|
175
300
|
time: AnalyticsTimeRange;
|
|
176
301
|
reports: AnalyticsReport[];
|
|
177
302
|
}
|
|
303
|
+
interface AnalyticsResponse {
|
|
304
|
+
time?: AnalyticsTimeRange;
|
|
305
|
+
reports?: AnalyticsReport[];
|
|
306
|
+
blocks?: AnalyticsBlockResponse[];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface SupportAgentNode {
|
|
310
|
+
type: "message" | "input" | "ai_handoff" | "action";
|
|
311
|
+
text?: string;
|
|
312
|
+
buttons?: string[];
|
|
313
|
+
prompt?: string;
|
|
314
|
+
field?: string;
|
|
315
|
+
input_type?: "text" | "email" | "phone";
|
|
316
|
+
validation?: string;
|
|
317
|
+
system_prompt_override?: string;
|
|
318
|
+
tools?: string[];
|
|
319
|
+
action?: SupportAction;
|
|
320
|
+
}
|
|
321
|
+
interface SupportAction {
|
|
322
|
+
type: "end_conversation" | "human_handoff";
|
|
323
|
+
message?: string;
|
|
324
|
+
}
|
|
325
|
+
interface SupportAgentEdge {
|
|
326
|
+
source: string;
|
|
327
|
+
target: string;
|
|
328
|
+
trigger: EdgeTrigger;
|
|
329
|
+
}
|
|
330
|
+
type EdgeTrigger = {
|
|
331
|
+
type: "button";
|
|
332
|
+
label: string;
|
|
333
|
+
} | {
|
|
334
|
+
type: "input";
|
|
335
|
+
field: string;
|
|
336
|
+
} | {
|
|
337
|
+
type: "default";
|
|
338
|
+
};
|
|
339
|
+
interface SupportAgentAiConfig {
|
|
340
|
+
integration_id: string;
|
|
341
|
+
system_prompt: string;
|
|
342
|
+
tools: string[];
|
|
343
|
+
max_context_messages: number;
|
|
344
|
+
}
|
|
345
|
+
interface SupportAgent {
|
|
346
|
+
id: string;
|
|
347
|
+
key: string;
|
|
348
|
+
store_id: string;
|
|
349
|
+
name: string;
|
|
350
|
+
status: "draft" | "active" | "archived";
|
|
351
|
+
entry_node_id: string;
|
|
352
|
+
nodes: Record<string, SupportAgentNode>;
|
|
353
|
+
edges: SupportAgentEdge[];
|
|
354
|
+
ai_config?: SupportAgentAiConfig;
|
|
355
|
+
created_at: number;
|
|
356
|
+
updated_at: number;
|
|
357
|
+
}
|
|
358
|
+
interface SupportConversation {
|
|
359
|
+
id: string;
|
|
360
|
+
store_id: string;
|
|
361
|
+
agent_id?: string;
|
|
362
|
+
current_node_id?: string;
|
|
363
|
+
profile_id?: string;
|
|
364
|
+
assigned_account_id?: string | null;
|
|
365
|
+
status: "active" | "ai_mode" | "escalated" | "resolved";
|
|
366
|
+
data: Record<string, unknown>;
|
|
367
|
+
metadata: Record<string, unknown>;
|
|
368
|
+
created_at: number;
|
|
369
|
+
updated_at: number;
|
|
370
|
+
}
|
|
371
|
+
interface SupportMessage {
|
|
372
|
+
id: string;
|
|
373
|
+
store_id: string;
|
|
374
|
+
conversation_id: string;
|
|
375
|
+
role: "system" | "user" | "assistant" | "staff" | "activity";
|
|
376
|
+
content: string;
|
|
377
|
+
buttons?: string[];
|
|
378
|
+
metadata: Record<string, unknown>;
|
|
379
|
+
created_at: number;
|
|
380
|
+
}
|
|
381
|
+
interface SupportConversationResponse {
|
|
382
|
+
conversation: SupportConversation;
|
|
383
|
+
messages: SupportMessage[];
|
|
384
|
+
}
|
|
385
|
+
interface StartSupportConversationParams {
|
|
386
|
+
store_id: string;
|
|
387
|
+
agent_key?: string;
|
|
388
|
+
metadata?: Record<string, unknown>;
|
|
389
|
+
}
|
|
390
|
+
interface SendSupportMessageParams {
|
|
391
|
+
store_id: string;
|
|
392
|
+
conversation_id: string;
|
|
393
|
+
input: {
|
|
394
|
+
type: "button";
|
|
395
|
+
label: string;
|
|
396
|
+
} | {
|
|
397
|
+
type: "text";
|
|
398
|
+
content: string;
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
interface ReplySupportConversationParams {
|
|
402
|
+
store_id: string;
|
|
403
|
+
conversation_id: string;
|
|
404
|
+
content: string;
|
|
405
|
+
resolve?: boolean;
|
|
406
|
+
}
|
|
407
|
+
interface ResolveSupportConversationParams {
|
|
408
|
+
store_id: string;
|
|
409
|
+
conversation_id: string;
|
|
410
|
+
}
|
|
411
|
+
interface AssignSupportConversationParams {
|
|
412
|
+
store_id: string;
|
|
413
|
+
conversation_id: string;
|
|
414
|
+
account_id?: string | null;
|
|
415
|
+
}
|
|
416
|
+
interface GetSupportConversationParams {
|
|
417
|
+
store_id: string;
|
|
418
|
+
conversation_id: string;
|
|
419
|
+
message_limit?: number;
|
|
420
|
+
after_created_at?: number;
|
|
421
|
+
after_id?: string;
|
|
422
|
+
}
|
|
423
|
+
interface CreateSupportAgentParams {
|
|
424
|
+
store_id: string;
|
|
425
|
+
key: string;
|
|
426
|
+
name: string;
|
|
427
|
+
status?: "draft" | "active" | "archived";
|
|
428
|
+
entry_node_id: string;
|
|
429
|
+
nodes: Record<string, SupportAgentNode>;
|
|
430
|
+
edges: SupportAgentEdge[];
|
|
431
|
+
ai_config?: SupportAgentAiConfig;
|
|
432
|
+
}
|
|
433
|
+
interface UpdateSupportAgentParams {
|
|
434
|
+
store_id: string;
|
|
435
|
+
id: string;
|
|
436
|
+
name?: string;
|
|
437
|
+
status?: "draft" | "active" | "archived";
|
|
438
|
+
entry_node_id?: string;
|
|
439
|
+
nodes?: Record<string, SupportAgentNode>;
|
|
440
|
+
edges?: SupportAgentEdge[];
|
|
441
|
+
ai_config?: SupportAgentAiConfig;
|
|
442
|
+
}
|
|
178
443
|
|
|
179
444
|
interface Activity {
|
|
180
445
|
id: string;
|
|
181
446
|
store_id: string;
|
|
182
|
-
|
|
447
|
+
profile_id: string;
|
|
183
448
|
type: string;
|
|
184
449
|
payload: Record<string, unknown>;
|
|
185
450
|
created_at: number;
|
|
@@ -194,7 +459,7 @@ interface Activity {
|
|
|
194
459
|
session_idx?: number | null;
|
|
195
460
|
}
|
|
196
461
|
interface TimelineParams {
|
|
197
|
-
|
|
462
|
+
profile_id: string;
|
|
198
463
|
store_id?: string;
|
|
199
464
|
limit?: number;
|
|
200
465
|
cursor?: string;
|
|
@@ -234,11 +499,6 @@ interface IntegrationService {
|
|
|
234
499
|
}>;
|
|
235
500
|
}
|
|
236
501
|
|
|
237
|
-
interface InvitationTokenData {
|
|
238
|
-
auth: AuthToken;
|
|
239
|
-
store_id?: string | null;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
502
|
interface LocationState {
|
|
243
503
|
code: string;
|
|
244
504
|
name: string;
|
|
@@ -340,7 +600,7 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
|
|
|
340
600
|
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
341
601
|
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
342
602
|
|
|
343
|
-
declare const SDK_VERSION = "0.
|
|
603
|
+
declare const SDK_VERSION = "0.9.2";
|
|
344
604
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
345
605
|
|
|
346
606
|
interface ApiConfig {
|
|
@@ -357,22 +617,22 @@ interface AdminSessionInternal {
|
|
|
357
617
|
access_expires_at?: number;
|
|
358
618
|
email?: string;
|
|
359
619
|
}
|
|
360
|
-
interface
|
|
620
|
+
interface ProfileSessionInternal {
|
|
361
621
|
access_token: string;
|
|
362
|
-
|
|
622
|
+
profile: Profile;
|
|
363
623
|
store: Store;
|
|
364
624
|
market: Market | null;
|
|
365
625
|
}
|
|
366
626
|
interface AdminSession {
|
|
367
627
|
email?: string;
|
|
368
628
|
}
|
|
369
|
-
interface
|
|
370
|
-
|
|
629
|
+
interface ProfileSession {
|
|
630
|
+
profile: Profile;
|
|
371
631
|
store: Store;
|
|
372
632
|
market: Market | null;
|
|
373
633
|
}
|
|
374
634
|
type AdminSessionUpdater = (updater: (prev: AdminSessionInternal | null) => AdminSessionInternal | null) => void;
|
|
375
|
-
type
|
|
635
|
+
type ProfileSessionUpdater = (updater: (prev: ProfileSessionInternal | null) => ProfileSessionInternal | null) => void;
|
|
376
636
|
type AuthStateListener<T> = (session: T | null) => void;
|
|
377
637
|
|
|
378
638
|
type CreateAdminConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
|
|
@@ -448,13 +708,11 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
448
708
|
createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions$1): Promise<{
|
|
449
709
|
portal_url: string;
|
|
450
710
|
}>;
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}>;
|
|
711
|
+
addMember(params: AddMemberParams, options?: RequestOptions$1): Promise<boolean>;
|
|
712
|
+
inviteUser(params: InviteUserParams, options?: RequestOptions$1): Promise<boolean>;
|
|
454
713
|
removeMember(params: RemoveMemberParams, options?: RequestOptions$1): Promise<{
|
|
455
714
|
removed: boolean;
|
|
456
715
|
}>;
|
|
457
|
-
handleInvitation(params: HandleInvitationParams, options?: RequestOptions$1): Promise<InvitationTokenData>;
|
|
458
716
|
testWebhook(params: TestWebhookParams, options?: RequestOptions$1): Promise<{
|
|
459
717
|
tested: boolean;
|
|
460
718
|
}>;
|
|
@@ -492,7 +750,8 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
492
750
|
notification: {
|
|
493
751
|
trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions$1): Promise<void>;
|
|
494
752
|
trigger(params: TriggerNotificationParams, options?: RequestOptions$1): Promise<{
|
|
495
|
-
|
|
753
|
+
success: boolean;
|
|
754
|
+
message: string;
|
|
496
755
|
}>;
|
|
497
756
|
};
|
|
498
757
|
promoCode: {
|
|
@@ -539,6 +798,7 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
539
798
|
username?: string;
|
|
540
799
|
password?: string;
|
|
541
800
|
}, options?: RequestOptions$1): Promise<{
|
|
801
|
+
success: boolean;
|
|
542
802
|
message: string;
|
|
543
803
|
}>;
|
|
544
804
|
};
|
|
@@ -605,6 +865,7 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
605
865
|
}>;
|
|
606
866
|
get: (params: GetEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
|
|
607
867
|
find: (params: GetEmailTemplatesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<EmailTemplate>>;
|
|
868
|
+
preview: (params: PreviewEmailTemplateParams, options?: RequestOptions$1) => Promise<PreviewEmailTemplateResponse>;
|
|
608
869
|
};
|
|
609
870
|
};
|
|
610
871
|
eshop: {
|
|
@@ -665,15 +926,16 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
665
926
|
};
|
|
666
927
|
};
|
|
667
928
|
crm: {
|
|
668
|
-
|
|
669
|
-
create: (params:
|
|
670
|
-
get: (params:
|
|
671
|
-
find: (params?:
|
|
672
|
-
items:
|
|
929
|
+
profile: {
|
|
930
|
+
create: (params: CreateProfileParams, options?: RequestOptions$1) => Promise<Profile$1>;
|
|
931
|
+
get: (params: GetProfileParams, options?: RequestOptions$1) => Promise<ProfileDetail>;
|
|
932
|
+
find: (params?: FindProfilesParams, options?: RequestOptions$1) => Promise<{
|
|
933
|
+
items: Profile$1[];
|
|
673
934
|
cursor?: string;
|
|
674
935
|
}>;
|
|
675
|
-
update: (params:
|
|
676
|
-
merge: (params:
|
|
936
|
+
update: (params: UpdateProfileParams, options?: RequestOptions$1) => Promise<Profile$1>;
|
|
937
|
+
merge: (params: MergeProfilesParams, options?: RequestOptions$1) => Promise<Profile$1>;
|
|
938
|
+
import: (params: ImportProfilesParams, options?: RequestOptions$1) => Promise<ImportProfilesResult>;
|
|
677
939
|
revokeToken: (params: {
|
|
678
940
|
id: string;
|
|
679
941
|
token_id: string;
|
|
@@ -688,19 +950,92 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
688
950
|
deleted: boolean;
|
|
689
951
|
}>;
|
|
690
952
|
};
|
|
691
|
-
|
|
692
|
-
create
|
|
693
|
-
update
|
|
694
|
-
get
|
|
695
|
-
find
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
953
|
+
profileList: {
|
|
954
|
+
create(params: CreateProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
|
|
955
|
+
update(params: UpdateProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
|
|
956
|
+
get(params: GetProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
|
|
957
|
+
find(params?: FindProfileListsParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileList>>;
|
|
958
|
+
importProfiles(params: ImportProfilesIntoProfileListParams, options?: RequestOptions$1): Promise<ImportProfilesIntoProfileListResult>;
|
|
959
|
+
previewImportProfiles(params: ImportProfileListPreviewParams, options?: RequestOptions$1): Promise<ImportProfilesPreviewResult>;
|
|
960
|
+
members: {
|
|
961
|
+
add(params: AddProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
|
|
962
|
+
update(params: UpdateProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
|
|
963
|
+
remove(params: RemoveProfileListProfileParams, options?: RequestOptions$1): Promise<{
|
|
964
|
+
deleted: boolean;
|
|
965
|
+
}>;
|
|
966
|
+
find(params: FindProfileListProfilesParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileListMember>>;
|
|
967
|
+
};
|
|
968
|
+
profiles: {
|
|
969
|
+
add(params: AddProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
|
|
970
|
+
update(params: UpdateProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
|
|
971
|
+
remove(params: RemoveProfileListProfileParams, options?: RequestOptions$1): Promise<{
|
|
972
|
+
deleted: boolean;
|
|
973
|
+
}>;
|
|
974
|
+
find(params: FindProfileListProfilesParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileListMember>>;
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
mailbox: {
|
|
978
|
+
create(params: CreateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
979
|
+
update(params: UpdateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
980
|
+
get(params: GetMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
981
|
+
test(params: TestMailboxParams, options?: RequestOptions$1): Promise<TestMailboxResult>;
|
|
982
|
+
prepare(params: PrepareMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
|
|
983
|
+
find(params?: FindMailboxesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Mailbox>>;
|
|
984
|
+
};
|
|
985
|
+
campaign: {
|
|
986
|
+
create(params: CreateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
987
|
+
update(params: UpdateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
988
|
+
get(params: GetCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
989
|
+
find(params?: FindCampaignsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Campaign>>;
|
|
990
|
+
launch(params: LaunchCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
991
|
+
duplicate(params: DuplicateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
992
|
+
launchReadiness(params: GetCampaignLaunchReadinessParams, options?: RequestOptions$1): Promise<CampaignLaunchReadiness>;
|
|
993
|
+
importRecipients(params: ImportCampaignRecipientsParams, options?: RequestOptions$1): Promise<CampaignRecipientImportResult>;
|
|
994
|
+
generatePersonalizedDrafts(params: GenerateOutreachPersonalizedDraftsParams, options?: RequestOptions$1): Promise<Campaign>;
|
|
995
|
+
};
|
|
996
|
+
campaignRecipient: {
|
|
997
|
+
find(params?: FindCampaignRecipientsParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignRecipient>>;
|
|
998
|
+
get(params: GetCampaignRecipientConversationParams, options?: RequestOptions$1): Promise<CampaignRecipientConversationResponse>;
|
|
999
|
+
update(params: UpdateCampaignRecipientParams, options?: RequestOptions$1): Promise<CampaignRecipient>;
|
|
1000
|
+
updateDraft(params: UpdateCampaignRecipientDraftParams, options?: RequestOptions$1): Promise<CampaignRecipient>;
|
|
1001
|
+
reply(params: ReplyCampaignRecipientParams, options?: RequestOptions$1): Promise<CampaignRecipientConversationResponse>;
|
|
1002
|
+
stop(params: StopCampaignRecipientParams, options?: RequestOptions$1): Promise<CampaignRecipientConversationResponse>;
|
|
1003
|
+
};
|
|
1004
|
+
campaignMessage: {
|
|
1005
|
+
find(params?: FindCampaignMessagesParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignMessage>>;
|
|
1006
|
+
update(params: UpdateCampaignMessageParams, options?: RequestOptions$1): Promise<CampaignMessage>;
|
|
1007
|
+
};
|
|
1008
|
+
suppression: {
|
|
1009
|
+
create(params: CreateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
|
|
1010
|
+
update(params: UpdateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
|
|
1011
|
+
get(params: GetSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
|
|
1012
|
+
find(params?: FindSuppressionsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Suppression>>;
|
|
1013
|
+
};
|
|
1014
|
+
leadResearch: {
|
|
1015
|
+
run: {
|
|
1016
|
+
create: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1017
|
+
find: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
|
|
1018
|
+
get: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1019
|
+
update: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1020
|
+
cancel: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1021
|
+
sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
|
|
1022
|
+
findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
|
|
1023
|
+
};
|
|
1024
|
+
message: {
|
|
1025
|
+
send: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
|
|
1026
|
+
find: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
|
|
1027
|
+
};
|
|
1028
|
+
email: {
|
|
1029
|
+
validate: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
|
|
1030
|
+
};
|
|
1031
|
+
createRun: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1032
|
+
findRuns: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
|
|
1033
|
+
getRun: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1034
|
+
updateRun: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1035
|
+
cancelRun: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1036
|
+
sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
|
|
1037
|
+
findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
|
|
1038
|
+
validateEmail: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
|
|
704
1039
|
};
|
|
705
1040
|
activity: {
|
|
706
1041
|
timeline(params: TimelineParams, options?: RequestOptions$1): Promise<{
|
|
@@ -713,25 +1048,33 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
713
1048
|
}>;
|
|
714
1049
|
};
|
|
715
1050
|
};
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
create: (params:
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
rateChat: (params: RateAgentChatParams, options?: RequestOptions$1) => Promise<AgentChat>;
|
|
730
|
-
getStoreChats: (params: GetStoreChatsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChat>>;
|
|
731
|
-
getChatMessages: (params: GetAgentChatParams & {
|
|
732
|
-
limit?: number;
|
|
733
|
-
}, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChatMessage>>;
|
|
1051
|
+
leadResearch: {
|
|
1052
|
+
run: {
|
|
1053
|
+
create: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1054
|
+
find: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
|
|
1055
|
+
get: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1056
|
+
update: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1057
|
+
cancel: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1058
|
+
sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
|
|
1059
|
+
findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
|
|
1060
|
+
};
|
|
1061
|
+
message: {
|
|
1062
|
+
send: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
|
|
1063
|
+
find: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
|
|
734
1064
|
};
|
|
1065
|
+
email: {
|
|
1066
|
+
validate: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
|
|
1067
|
+
};
|
|
1068
|
+
createRun: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1069
|
+
findRuns: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
|
|
1070
|
+
getRun: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1071
|
+
updateRun: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1072
|
+
cancelRun: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
|
|
1073
|
+
sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
|
|
1074
|
+
findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
|
|
1075
|
+
validateEmail: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
|
|
1076
|
+
};
|
|
1077
|
+
automation: {
|
|
735
1078
|
workflow: {
|
|
736
1079
|
create: (params: CreateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
|
|
737
1080
|
update: (params: UpdateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
|
|
@@ -744,6 +1087,46 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
744
1087
|
getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<WorkflowExecution>>;
|
|
745
1088
|
getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
|
|
746
1089
|
};
|
|
1090
|
+
support: {
|
|
1091
|
+
agent: {
|
|
1092
|
+
create(params: CreateSupportAgentParams, opts?: RequestOptions$1): Promise<SupportAgent>;
|
|
1093
|
+
get(params: {
|
|
1094
|
+
store_id: string;
|
|
1095
|
+
id: string;
|
|
1096
|
+
}, opts?: RequestOptions$1): Promise<SupportAgent>;
|
|
1097
|
+
find(params: {
|
|
1098
|
+
store_id: string;
|
|
1099
|
+
status?: string;
|
|
1100
|
+
limit?: number;
|
|
1101
|
+
cursor?: string;
|
|
1102
|
+
}, opts?: RequestOptions$1): Promise<{
|
|
1103
|
+
items: SupportAgent[];
|
|
1104
|
+
cursor?: string;
|
|
1105
|
+
}>;
|
|
1106
|
+
update(params: UpdateSupportAgentParams, opts?: RequestOptions$1): Promise<SupportAgent>;
|
|
1107
|
+
delete(params: {
|
|
1108
|
+
store_id: string;
|
|
1109
|
+
id: string;
|
|
1110
|
+
}, opts?: RequestOptions$1): Promise<void>;
|
|
1111
|
+
};
|
|
1112
|
+
conversation: {
|
|
1113
|
+
find(params: {
|
|
1114
|
+
store_id: string;
|
|
1115
|
+
status?: string;
|
|
1116
|
+
agent_id?: string;
|
|
1117
|
+
limit?: number;
|
|
1118
|
+
cursor?: string;
|
|
1119
|
+
}, opts?: RequestOptions$1): Promise<{
|
|
1120
|
+
items: SupportConversation[];
|
|
1121
|
+
cursor?: string;
|
|
1122
|
+
}>;
|
|
1123
|
+
get(params: GetSupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1124
|
+
sendMessage(params: SendSupportMessageParams, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1125
|
+
reply(params: ReplySupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1126
|
+
resolve(params: ResolveSupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversation>;
|
|
1127
|
+
assign(params: AssignSupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversation>;
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
747
1130
|
};
|
|
748
1131
|
analytics: {
|
|
749
1132
|
get(request: AnalyticsRequest, options?: RequestOptions$1 & {
|
|
@@ -816,15 +1199,15 @@ declare function createStorefront(config: CreateStorefrontConfig): {
|
|
|
816
1199
|
email?: string;
|
|
817
1200
|
verify?: boolean;
|
|
818
1201
|
market?: string;
|
|
819
|
-
}) => Promise<
|
|
1202
|
+
}) => Promise<ProfileSession>;
|
|
820
1203
|
verify: (params: {
|
|
821
1204
|
code: string;
|
|
822
|
-
}) => Promise<
|
|
1205
|
+
}) => Promise<ProfileToken>;
|
|
823
1206
|
logout: () => Promise<void>;
|
|
824
|
-
me: () => Promise<
|
|
825
|
-
readonly session:
|
|
1207
|
+
me: () => Promise<ProfileDetail>;
|
|
1208
|
+
readonly session: ProfileSession | null;
|
|
826
1209
|
readonly isAuthenticated: boolean;
|
|
827
|
-
onAuthStateChanged(listener: AuthStateListener<
|
|
1210
|
+
onAuthStateChanged(listener: AuthStateListener<ProfileSession>): () => void;
|
|
828
1211
|
store: {
|
|
829
1212
|
getStore(options?: RequestOptions$1): Promise<Store>;
|
|
830
1213
|
location: {
|
|
@@ -917,7 +1300,7 @@ declare function createStorefront(config: CreateStorefrontConfig): {
|
|
|
917
1300
|
};
|
|
918
1301
|
};
|
|
919
1302
|
crm: {
|
|
920
|
-
|
|
1303
|
+
profile: {
|
|
921
1304
|
identify(params?: {
|
|
922
1305
|
email?: string;
|
|
923
1306
|
verify?: boolean;
|
|
@@ -927,15 +1310,13 @@ declare function createStorefront(config: CreateStorefrontConfig): {
|
|
|
927
1310
|
code: string;
|
|
928
1311
|
}, options?: RequestOptions$1): Promise<VerifyResponse>;
|
|
929
1312
|
logout(options?: RequestOptions$1): Promise<void>;
|
|
930
|
-
getMe(options?: RequestOptions$1): Promise<
|
|
1313
|
+
getMe(options?: RequestOptions$1): Promise<ProfileDetail>;
|
|
931
1314
|
};
|
|
932
|
-
|
|
933
|
-
get(params:
|
|
934
|
-
find(params
|
|
935
|
-
subscribe(params:
|
|
936
|
-
checkAccess(params:
|
|
937
|
-
id: string;
|
|
938
|
-
}, options?: RequestOptions$1): Promise<AudienceAccessResponse>;
|
|
1315
|
+
profileList: {
|
|
1316
|
+
get(params: GetProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
|
|
1317
|
+
find(params?: FindProfileListsParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileList>>;
|
|
1318
|
+
subscribe(params: SubscribeProfileListParams, options?: RequestOptions$1): Promise<ProfileListSubscribeResponse>;
|
|
1319
|
+
checkAccess(params: ProfileListAccessParams, options?: RequestOptions$1): Promise<ProfileListAccessResponse>;
|
|
939
1320
|
unsubscribe(token: string, options?: RequestOptions$1): Promise<{
|
|
940
1321
|
unsubscribed: boolean;
|
|
941
1322
|
}>;
|
|
@@ -948,38 +1329,10 @@ declare function createStorefront(config: CreateStorefrontConfig): {
|
|
|
948
1329
|
COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "order_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
|
|
949
1330
|
track(params: TrackParams): Promise<void>;
|
|
950
1331
|
};
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
id: string;
|
|
956
|
-
store_id?: string;
|
|
957
|
-
}, options?: RequestOptions$1): Promise<Agent>;
|
|
958
|
-
sendMessage(params: {
|
|
959
|
-
id: string;
|
|
960
|
-
message: string;
|
|
961
|
-
chat_id?: string;
|
|
962
|
-
store_id?: string;
|
|
963
|
-
}, options?: RequestOptions$1): Promise<AgentChatMessage>;
|
|
964
|
-
getChat(params: {
|
|
965
|
-
id: string;
|
|
966
|
-
chat_id: string;
|
|
967
|
-
store_id?: string;
|
|
968
|
-
}, options?: RequestOptions$1): Promise<AgentChat>;
|
|
969
|
-
getChatMessages(params: {
|
|
970
|
-
id: string;
|
|
971
|
-
chat_id: string;
|
|
972
|
-
limit?: number;
|
|
973
|
-
store_id?: string;
|
|
974
|
-
}, options?: RequestOptions$1): Promise<PaginatedResponse<AgentChatMessage>>;
|
|
975
|
-
rateChat(params: {
|
|
976
|
-
id: string;
|
|
977
|
-
chat_id: string;
|
|
978
|
-
rating: number;
|
|
979
|
-
comment?: string;
|
|
980
|
-
store_id?: string;
|
|
981
|
-
}, options?: RequestOptions$1): Promise<AgentChat>;
|
|
982
|
-
};
|
|
1332
|
+
support: {
|
|
1333
|
+
startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1334
|
+
sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
1335
|
+
getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
|
|
983
1336
|
};
|
|
984
1337
|
setStoreId: (storeId: string) => void;
|
|
985
1338
|
getStoreId: () => string;
|
|
@@ -1033,4 +1386,4 @@ declare function createStorefront(config: CreateStorefrontConfig): {
|
|
|
1033
1386
|
};
|
|
1034
1387
|
};
|
|
1035
1388
|
|
|
1036
|
-
export { type
|
|
1389
|
+
export { type LocationState as $, type AuthStateListener as A, type CartControllerInitParams as B, type CreateStorefrontConfig as C, type CartControllerListener as D, type CartControllerQuoteParams 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 HttpClientConfig as L, type AuthStorage as M, SDK_VERSION as N, SUPPORTED_FRAMEWORKS as O, type ProfileSession as P, type ApiConfig as Q, type AdminSessionInternal as R, type StartSupportConversationParams as S, type TrackParams as T, type ProfileSessionInternal as U, type VerifyResponse as V, type AdminSession as W, type AdminSessionUpdater as X, type ProfileSessionUpdater as Y, type CreateAdminConfig as Z, createAdmin as _, type ProfileToken as a, type LocationCountry as a0, type GetCountriesResponse as a1, type AnalyticsTimeRange as a2, type AnalyticsReportKey as a3, type AnalyticsMetricReportKey as a4, type AnalyticsBreakdownReportKey as a5, type AnalyticsActivityReportKey as a6, type AnalyticsCompositeReportKey as a7, type AnalyticsReportRequest as a8, type AnalyticsBlockRequest as a9, type SupportMessage as aA, type SupportAgentNode as aB, type SupportAgentEdge as aC, type SupportAgentAiConfig as aD, type EdgeTrigger as aE, type SupportAction as aF, type AssignSupportConversationParams as aG, type ReplySupportConversationParams as aH, type ResolveSupportConversationParams as aI, type IntegrationOperation as aJ, type IntegrationResource as aK, type IntegrationService as aL, type AnalyticsRequest as aa, type AnalyticsMetricData as ab, type AnalyticsBreakdownItem as ac, type AnalyticsBreakdownData as ad, type BusinessOverviewData as ae, type RevenueByCurrencyData as af, type ProfileFunnelStage as ag, type ProfileFunnelData as ah, type OutreachOverviewData as ai, type OutreachFunnelStage as aj, type OutreachFunnelData as ak, type OutreachVariantPerformanceItem as al, type OutreachVariantPerformanceData as am, type EntityStatusOverviewData as an, type DataHealthData as ao, type AnalyticsReport as ap, type AnalyticsBlockResponse as aq, type AnalyticsResponse as ar, type ActivityFeedCategory as as, type ActivityFeedItem as at, type ActivityFeedSummary as au, type ActivityFeedCursor as av, type ActivityFeedData as aw, type TimelineParams as ax, type SupportAgent as ay, type SupportConversation as az, type CartController as b, type SupportConversationResponse as c, type SendSupportMessageParams as d, extractBlockValues as e, formatBlockValue as f, getBlockLabel as g, findTimeZone as h, humanize as i, categorify as j, formatDate as k, getSvgContentForAstro as l, fetchSvgContent as m, injectSvgIntoElement as n, type Activity$1 as o, prepareBlocksForSubmission as p, COMMON_ACTIVITY_TYPES as q, createStorefront as r, slugify as s, createCartController as t, type CommonActivityType as u, validatePhoneNumber as v, type CartApi as w, type CartControllerAddItemParams as x, type CartControllerCheckoutParams as y, type CartControllerClearParams as z };
|