arky-sdk 0.7.71 → 0.7.74

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/dist/index.d.cts CHANGED
@@ -1,7 +1,21 @@
1
- import { Block, RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, Market, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, ProcessOrderRefundParams, Slot, CreateBookingParams, UpdateBookingParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, ProcessBookingRefundParams, GetAvailabilityParams, AvailabilityResponse, CancelBookingItemParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams } from './types.cjs';
2
- export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, Audience, AudienceAccessResponse, AudienceStatus, AudienceSubscribeResponse, AudienceSubscriber, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AvailabilitySlot, BookingCartItem, BookingPayment, BookingPaymentPromoCode, BookingPaymentProvider, BookingPaymentRefund, BookingPaymentTax, BookingPaymentTaxLine, BookingProviderStatus, BookingQuote, BookingServiceStatus, BookingStoreState, Business, BusinessSubscription, BusinessSubscriptionPayment, BusinessSubscriptionProvider, BusinessSubscriptionSource, BusinessSubscriptionStatus, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, EmailTemplateStatus, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormStatus, GeoLocation, GeoLocationBlock, Integration, IntegrationProvider, Language, Media, MediaResolution, Node, NodeResult, NodeStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentTax, OrderPaymentTaxLine, OrderQuote, OrderShipping, PaginatedResponse, Parcel, PaymentMethod, PaymentMethodType, Price, ProductStatus, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderWithTimeline, PurchaseLabelResult, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SystemTemplateKey, TaxonomyStatus, Webhook, WebhookEventSubscription, Workflow, WorkflowEdge, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowTransformNode, WorkflowTriggerNode, Zone, ZoneLocation } from './types.cjs';
1
+ import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, Market, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, ProcessOrderRefundParams, Slot, CreateBookingParams, UpdateBookingParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, ProcessBookingRefundParams, GetAvailabilityParams, AvailabilityResponse, CancelBookingItemParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, Customer, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams } from './types.cjs';
2
+ export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, Audience, AudienceAccessResponse, AudienceStatus, AudienceSubscribeResponse, AudienceSubscriber, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AvailabilitySlot, Block, BookingCartItem, BookingPayment, BookingPaymentPromoCode, BookingPaymentProvider, BookingPaymentRefund, BookingPaymentTax, BookingPaymentTaxLine, BookingProviderStatus, BookingQuote, BookingServiceStatus, BookingStoreState, Business, BusinessSubscription, BusinessSubscriptionPayment, BusinessSubscriptionProvider, BusinessSubscriptionSource, BusinessSubscriptionStatus, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, EmailTemplateStatus, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormStatus, GeoLocation, GeoLocationBlock, Integration, IntegrationProvider, Language, Media, MediaResolution, Node, NodeResult, NodeStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentTax, OrderPaymentTaxLine, OrderQuote, OrderShipping, PaginatedResponse, Parcel, PaymentMethod, PaymentMethodType, Price, ProductStatus, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderWithTimeline, PurchaseLabelResult, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SystemTemplateKey, TaxonomyStatus, Webhook, WebhookEventSubscription, Workflow, WorkflowEdge, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowTransformNode, WorkflowTriggerNode, Zone, ZoneLocation } from './types.cjs';
3
3
  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-BCAQZOwm.cjs';
4
4
 
5
+ interface Activity$1 {
6
+ businessId: string;
7
+ customerId: string;
8
+ type: string;
9
+ payload: Record<string, any>;
10
+ createdAt: number;
11
+ }
12
+ interface TrackParams {
13
+ type: string;
14
+ payload?: Record<string, any>;
15
+ }
16
+ declare const COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
17
+ type CommonActivityType = (typeof COMMON_ACTIVITY_TYPES)[number];
18
+
5
19
  interface AuthTokens {
6
20
  accessToken: string;
7
21
  refreshToken?: string;
@@ -29,89 +43,38 @@ interface AnalyticsSummary {
29
43
  newCustomersChange: number;
30
44
  formSubmissions: number;
31
45
  formSubmissionsChange: number;
32
- reactions: number;
33
- reactionsChange: number;
34
46
  }
35
47
  interface StatusBreakdown {
36
48
  status: string;
37
49
  count: number;
38
50
  }
39
51
 
40
- type ReactionTargetType = "product" | "service" | "provider" | "booking" | "node";
41
- type ReactionStatus = "pending" | "published" | "hidden" | "removed";
42
- interface ReactionTarget {
43
- type: ReactionTargetType;
44
- id: string;
45
- }
46
- interface Reaction {
47
- id: string;
52
+ interface Activity {
48
53
  businessId: string;
49
54
  customerId: string;
50
- verified: boolean;
51
- target: ReactionTarget;
52
- parentId?: string | null;
53
- kind: string;
54
- blocks: Block[];
55
- taxonomies: any[];
56
- status: ReactionStatus;
55
+ type: string;
56
+ payload: Record<string, any>;
57
57
  createdAt: number;
58
- updatedAt: number;
59
- }
60
- interface CreateReactionParams {
61
- businessId?: string;
62
- target: ReactionTarget;
63
- kind: string;
64
- blocks?: Block[];
65
- parentId?: string;
66
- taxonomies?: any[];
67
- customerId?: string;
68
- }
69
- interface UpdateReactionParams {
70
- id: string;
71
- businessId?: string;
72
- blocks?: Block[];
73
- taxonomies?: any[];
74
- }
75
- interface GetReactionParams {
76
- id: string;
77
- businessId?: string;
78
58
  }
79
- interface FindReactionsParams {
59
+ interface TimelineParams {
60
+ customerId: string;
80
61
  businessId?: string;
81
- targetType?: ReactionTargetType;
82
- targetId?: string;
83
- parentId?: string;
84
- customerId?: string;
85
- kind?: string;
86
- status?: ReactionStatus;
87
- contentOnly?: boolean;
88
- verified?: boolean;
89
- query?: string;
90
62
  limit?: number;
91
63
  cursor?: string;
92
64
  }
93
- interface ModerateReactionParams {
94
- id: string;
95
- businessId?: string;
96
- status: ReactionStatus;
97
- }
98
- interface EngagementSummaryParams {
65
+ interface CountParams {
99
66
  businessId?: string;
100
- targetType: ReactionTargetType;
101
- targetId: string;
102
- parentId?: string;
67
+ type?: string;
68
+ payloadKey?: string;
69
+ payloadValue?: string;
70
+ windowSeconds?: number;
103
71
  }
104
- interface EngagementSummary {
105
- counts: Record<string, number>;
106
- mine: Reaction[];
72
+ interface ActivityTypeInfo {
73
+ type: string;
74
+ eventCount: number;
75
+ firstSeenAt: number;
76
+ lastSeenAt: number;
107
77
  }
108
- declare const DEFAULT_REACTION_KINDS: readonly ["like", "love", "laugh", "wow", "sad", "insightful", "review", "comment", "star_1", "star_2", "star_3", "star_4", "star_5"];
109
- declare const REACTION_KIND_REGEX: RegExp;
110
- declare function isValidReactionKind(kind: string): boolean;
111
- declare function computeAverageStars(counts: Record<string, number>): {
112
- average: number;
113
- count: number;
114
- };
115
78
 
116
79
  interface LocationState {
117
80
  code: string;
@@ -165,7 +128,7 @@ declare global {
165
128
  }
166
129
  declare function track(eventName: string, params?: Record<string, any>): void;
167
130
 
168
- declare const SDK_VERSION = "0.7.71";
131
+ declare const SDK_VERSION = "0.7.74";
169
132
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
170
133
  interface ApiConfig {
171
134
  httpClient: any;
@@ -368,11 +331,14 @@ declare function createAdmin(config: HttpClientConfig & {
368
331
  };
369
332
  crm: {
370
333
  customer: {
371
- create: (params: CreateCustomerParams, options?: RequestOptions) => Promise<any>;
372
- get: (params: GetCustomerParams, options?: RequestOptions) => Promise<any>;
373
- find: (params?: FindCustomersParams, options?: RequestOptions) => Promise<any>;
374
- update: (params: UpdateCustomerParams, options?: RequestOptions) => Promise<any>;
375
- merge: (params: MergeCustomersParams, options?: RequestOptions) => Promise<any>;
334
+ create: (params: CreateCustomerParams, options?: RequestOptions) => Promise<Customer>;
335
+ get: (params: GetCustomerParams, options?: RequestOptions) => Promise<Customer>;
336
+ find: (params?: FindCustomersParams, options?: RequestOptions) => Promise<{
337
+ items: Customer[];
338
+ cursor?: string;
339
+ }>;
340
+ update: (params: UpdateCustomerParams, options?: RequestOptions) => Promise<Customer>;
341
+ merge: (params: MergeCustomersParams, options?: RequestOptions) => Promise<Customer>;
376
342
  revokeToken: (params: {
377
343
  id: string;
378
344
  tokenId: string;
@@ -392,25 +358,21 @@ declare function createAdmin(config: HttpClientConfig & {
392
358
  addSubscriber: (params: AddAudienceSubscriberParams, options?: RequestOptions) => Promise<any>;
393
359
  removeSubscriber: (params: RemoveAudienceSubscriberParams, options?: RequestOptions) => Promise<any>;
394
360
  };
395
- reaction: {
396
- DEFAULT_REACTION_KINDS: readonly ["like", "love", "laugh", "wow", "sad", "insightful", "review", "comment", "star_1", "star_2", "star_3", "star_4", "star_5"];
397
- isValidReactionKind: typeof isValidReactionKind;
398
- computeAverageStars: typeof computeAverageStars;
399
- create(params: CreateReactionParams, options?: RequestOptions): Promise<any>;
400
- get(params: GetReactionParams, options?: RequestOptions): Promise<any>;
401
- find(params?: FindReactionsParams, options?: RequestOptions): Promise<any>;
402
- update(params: UpdateReactionParams, options?: RequestOptions): Promise<any>;
403
- remove(params: {
404
- id: string;
405
- businessId?: string;
406
- }, options?: RequestOptions): Promise<any>;
407
- moderate(params: ModerateReactionParams, options?: RequestOptions): Promise<any>;
408
- listAdmin(params: {
361
+ activity: {
362
+ timeline(params: TimelineParams, options?: RequestOptions): Promise<{
363
+ items: Activity[];
364
+ cursor: string | null;
365
+ }>;
366
+ count(params: CountParams, options?: RequestOptions): Promise<{
367
+ total: number;
368
+ distinctCustomers: number;
369
+ }>;
370
+ types(params?: {
409
371
  businessId?: string;
410
- limit?: number;
411
- cursor?: string;
412
- }, options?: RequestOptions): Promise<any>;
413
- summary(params: EngagementSummaryParams, options?: RequestOptions): Promise<any>;
372
+ }, options?: RequestOptions): Promise<{
373
+ items: ActivityTypeInfo[];
374
+ uniqueCount: number;
375
+ }>;
414
376
  };
415
377
  };
416
378
  automation: {
@@ -608,20 +570,10 @@ declare function createStorefront(config: HttpClientConfig & {
608
570
  unsubscribe(token: string, options?: RequestOptions): any;
609
571
  confirm(token: string, options?: RequestOptions): any;
610
572
  };
611
- reaction: {
612
- DEFAULT_REACTION_KINDS: readonly ["like", "love", "laugh", "wow", "sad", "insightful", "review", "comment", "star_1", "star_2", "star_3", "star_4", "star_5"];
613
- isValidReactionKind: typeof isValidReactionKind;
614
- computeAverageStars: typeof computeAverageStars;
615
- create(params: any, options?: RequestOptions): any;
616
- get(params: any, options?: RequestOptions): any;
617
- find(params?: any, options?: RequestOptions): any;
618
- update(params: any, options?: RequestOptions): any;
619
- remove(params: {
620
- id: string;
621
- businessId?: string;
622
- }, options?: RequestOptions): any;
623
- summary(params: any, options?: RequestOptions): any;
624
- };
573
+ };
574
+ activity: {
575
+ COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
576
+ track(params: TrackParams): Promise<void>;
625
577
  };
626
578
  automation: {
627
579
  agent: {
@@ -715,4 +667,4 @@ declare function createStorefront(config: HttpClientConfig & {
715
667
  };
716
668
  }>;
717
669
 
718
- export { type AnalyticsSummary, type ApiConfig, AvailabilityResponse, Block, CreateAgentParams, CreateLocationParams, type CreateReactionParams, DEFAULT_REACTION_KINDS, DeleteLocationParams, type EngagementSummary, type EngagementSummaryParams, type FindReactionsParams, GetAgentParams, GetAgentsParams, GetAvailabilityParams, type GetCountriesResponse, type GetReactionParams, GetShippingRatesParams, type HttpClientConfig, Location, type LocationCountry, type LocationState, Market, type ModerateReactionParams, REACTION_KIND_REGEX, type Reaction, type ReactionStatus, type ReactionTarget, type ReactionTargetType, SDK_VERSION, SUPPORTED_FRAMEWORKS, ShipParams, ShipResult, ShippingRate, Slot, type StatusBreakdown, UpdateAgentParams, UpdateLocationParams, type UpdateReactionParams, computeAverageStars, createAdmin, createStorefront, isValidReactionKind };
670
+ export { type Activity$1 as Activity, type ActivityTypeInfo, type AnalyticsSummary, type ApiConfig, AvailabilityResponse, COMMON_ACTIVITY_TYPES, type CommonActivityType, type CountParams, CreateAgentParams, CreateLocationParams, DeleteLocationParams, GetAgentParams, GetAgentsParams, GetAvailabilityParams, type GetCountriesResponse, GetShippingRatesParams, type HttpClientConfig, Location, type LocationCountry, type LocationState, Market, SDK_VERSION, SUPPORTED_FRAMEWORKS, ShipParams, ShipResult, ShippingRate, Slot, type StatusBreakdown, type TimelineParams, type TrackParams, UpdateAgentParams, UpdateLocationParams, createAdmin, createStorefront };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,21 @@
1
- import { Block, RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, Market, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, ProcessOrderRefundParams, Slot, CreateBookingParams, UpdateBookingParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, ProcessBookingRefundParams, GetAvailabilityParams, AvailabilityResponse, CancelBookingItemParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams } from './types.js';
2
- export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, Audience, AudienceAccessResponse, AudienceStatus, AudienceSubscribeResponse, AudienceSubscriber, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AvailabilitySlot, BookingCartItem, BookingPayment, BookingPaymentPromoCode, BookingPaymentProvider, BookingPaymentRefund, BookingPaymentTax, BookingPaymentTaxLine, BookingProviderStatus, BookingQuote, BookingServiceStatus, BookingStoreState, Business, BusinessSubscription, BusinessSubscriptionPayment, BusinessSubscriptionProvider, BusinessSubscriptionSource, BusinessSubscriptionStatus, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, EmailTemplateStatus, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormStatus, GeoLocation, GeoLocationBlock, Integration, IntegrationProvider, Language, Media, MediaResolution, Node, NodeResult, NodeStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentTax, OrderPaymentTaxLine, OrderQuote, OrderShipping, PaginatedResponse, Parcel, PaymentMethod, PaymentMethodType, Price, ProductStatus, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderWithTimeline, PurchaseLabelResult, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SystemTemplateKey, TaxonomyStatus, Webhook, WebhookEventSubscription, Workflow, WorkflowEdge, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowTransformNode, WorkflowTriggerNode, Zone, ZoneLocation } from './types.js';
1
+ import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, Market, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, ProcessOrderRefundParams, Slot, CreateBookingParams, UpdateBookingParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, ProcessBookingRefundParams, GetAvailabilityParams, AvailabilityResponse, CancelBookingItemParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, Customer, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams } from './types.js';
2
+ export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, Audience, AudienceAccessResponse, AudienceStatus, AudienceSubscribeResponse, AudienceSubscriber, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AvailabilitySlot, Block, BookingCartItem, BookingPayment, BookingPaymentPromoCode, BookingPaymentProvider, BookingPaymentRefund, BookingPaymentTax, BookingPaymentTaxLine, BookingProviderStatus, BookingQuote, BookingServiceStatus, BookingStoreState, Business, BusinessSubscription, BusinessSubscriptionPayment, BusinessSubscriptionProvider, BusinessSubscriptionSource, BusinessSubscriptionStatus, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, EmailTemplateStatus, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormStatus, GeoLocation, GeoLocationBlock, Integration, IntegrationProvider, Language, Media, MediaResolution, Node, NodeResult, NodeStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentTax, OrderPaymentTaxLine, OrderQuote, OrderShipping, PaginatedResponse, Parcel, PaymentMethod, PaymentMethodType, Price, ProductStatus, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderWithTimeline, PurchaseLabelResult, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SystemTemplateKey, TaxonomyStatus, Webhook, WebhookEventSubscription, Workflow, WorkflowEdge, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowTransformNode, WorkflowTriggerNode, Zone, ZoneLocation } from './types.js';
3
3
  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-DTg5d847.js';
4
4
 
5
+ interface Activity$1 {
6
+ businessId: string;
7
+ customerId: string;
8
+ type: string;
9
+ payload: Record<string, any>;
10
+ createdAt: number;
11
+ }
12
+ interface TrackParams {
13
+ type: string;
14
+ payload?: Record<string, any>;
15
+ }
16
+ declare const COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
17
+ type CommonActivityType = (typeof COMMON_ACTIVITY_TYPES)[number];
18
+
5
19
  interface AuthTokens {
6
20
  accessToken: string;
7
21
  refreshToken?: string;
@@ -29,89 +43,38 @@ interface AnalyticsSummary {
29
43
  newCustomersChange: number;
30
44
  formSubmissions: number;
31
45
  formSubmissionsChange: number;
32
- reactions: number;
33
- reactionsChange: number;
34
46
  }
35
47
  interface StatusBreakdown {
36
48
  status: string;
37
49
  count: number;
38
50
  }
39
51
 
40
- type ReactionTargetType = "product" | "service" | "provider" | "booking" | "node";
41
- type ReactionStatus = "pending" | "published" | "hidden" | "removed";
42
- interface ReactionTarget {
43
- type: ReactionTargetType;
44
- id: string;
45
- }
46
- interface Reaction {
47
- id: string;
52
+ interface Activity {
48
53
  businessId: string;
49
54
  customerId: string;
50
- verified: boolean;
51
- target: ReactionTarget;
52
- parentId?: string | null;
53
- kind: string;
54
- blocks: Block[];
55
- taxonomies: any[];
56
- status: ReactionStatus;
55
+ type: string;
56
+ payload: Record<string, any>;
57
57
  createdAt: number;
58
- updatedAt: number;
59
- }
60
- interface CreateReactionParams {
61
- businessId?: string;
62
- target: ReactionTarget;
63
- kind: string;
64
- blocks?: Block[];
65
- parentId?: string;
66
- taxonomies?: any[];
67
- customerId?: string;
68
- }
69
- interface UpdateReactionParams {
70
- id: string;
71
- businessId?: string;
72
- blocks?: Block[];
73
- taxonomies?: any[];
74
- }
75
- interface GetReactionParams {
76
- id: string;
77
- businessId?: string;
78
58
  }
79
- interface FindReactionsParams {
59
+ interface TimelineParams {
60
+ customerId: string;
80
61
  businessId?: string;
81
- targetType?: ReactionTargetType;
82
- targetId?: string;
83
- parentId?: string;
84
- customerId?: string;
85
- kind?: string;
86
- status?: ReactionStatus;
87
- contentOnly?: boolean;
88
- verified?: boolean;
89
- query?: string;
90
62
  limit?: number;
91
63
  cursor?: string;
92
64
  }
93
- interface ModerateReactionParams {
94
- id: string;
95
- businessId?: string;
96
- status: ReactionStatus;
97
- }
98
- interface EngagementSummaryParams {
65
+ interface CountParams {
99
66
  businessId?: string;
100
- targetType: ReactionTargetType;
101
- targetId: string;
102
- parentId?: string;
67
+ type?: string;
68
+ payloadKey?: string;
69
+ payloadValue?: string;
70
+ windowSeconds?: number;
103
71
  }
104
- interface EngagementSummary {
105
- counts: Record<string, number>;
106
- mine: Reaction[];
72
+ interface ActivityTypeInfo {
73
+ type: string;
74
+ eventCount: number;
75
+ firstSeenAt: number;
76
+ lastSeenAt: number;
107
77
  }
108
- declare const DEFAULT_REACTION_KINDS: readonly ["like", "love", "laugh", "wow", "sad", "insightful", "review", "comment", "star_1", "star_2", "star_3", "star_4", "star_5"];
109
- declare const REACTION_KIND_REGEX: RegExp;
110
- declare function isValidReactionKind(kind: string): boolean;
111
- declare function computeAverageStars(counts: Record<string, number>): {
112
- average: number;
113
- count: number;
114
- };
115
78
 
116
79
  interface LocationState {
117
80
  code: string;
@@ -165,7 +128,7 @@ declare global {
165
128
  }
166
129
  declare function track(eventName: string, params?: Record<string, any>): void;
167
130
 
168
- declare const SDK_VERSION = "0.7.71";
131
+ declare const SDK_VERSION = "0.7.74";
169
132
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
170
133
  interface ApiConfig {
171
134
  httpClient: any;
@@ -368,11 +331,14 @@ declare function createAdmin(config: HttpClientConfig & {
368
331
  };
369
332
  crm: {
370
333
  customer: {
371
- create: (params: CreateCustomerParams, options?: RequestOptions) => Promise<any>;
372
- get: (params: GetCustomerParams, options?: RequestOptions) => Promise<any>;
373
- find: (params?: FindCustomersParams, options?: RequestOptions) => Promise<any>;
374
- update: (params: UpdateCustomerParams, options?: RequestOptions) => Promise<any>;
375
- merge: (params: MergeCustomersParams, options?: RequestOptions) => Promise<any>;
334
+ create: (params: CreateCustomerParams, options?: RequestOptions) => Promise<Customer>;
335
+ get: (params: GetCustomerParams, options?: RequestOptions) => Promise<Customer>;
336
+ find: (params?: FindCustomersParams, options?: RequestOptions) => Promise<{
337
+ items: Customer[];
338
+ cursor?: string;
339
+ }>;
340
+ update: (params: UpdateCustomerParams, options?: RequestOptions) => Promise<Customer>;
341
+ merge: (params: MergeCustomersParams, options?: RequestOptions) => Promise<Customer>;
376
342
  revokeToken: (params: {
377
343
  id: string;
378
344
  tokenId: string;
@@ -392,25 +358,21 @@ declare function createAdmin(config: HttpClientConfig & {
392
358
  addSubscriber: (params: AddAudienceSubscriberParams, options?: RequestOptions) => Promise<any>;
393
359
  removeSubscriber: (params: RemoveAudienceSubscriberParams, options?: RequestOptions) => Promise<any>;
394
360
  };
395
- reaction: {
396
- DEFAULT_REACTION_KINDS: readonly ["like", "love", "laugh", "wow", "sad", "insightful", "review", "comment", "star_1", "star_2", "star_3", "star_4", "star_5"];
397
- isValidReactionKind: typeof isValidReactionKind;
398
- computeAverageStars: typeof computeAverageStars;
399
- create(params: CreateReactionParams, options?: RequestOptions): Promise<any>;
400
- get(params: GetReactionParams, options?: RequestOptions): Promise<any>;
401
- find(params?: FindReactionsParams, options?: RequestOptions): Promise<any>;
402
- update(params: UpdateReactionParams, options?: RequestOptions): Promise<any>;
403
- remove(params: {
404
- id: string;
405
- businessId?: string;
406
- }, options?: RequestOptions): Promise<any>;
407
- moderate(params: ModerateReactionParams, options?: RequestOptions): Promise<any>;
408
- listAdmin(params: {
361
+ activity: {
362
+ timeline(params: TimelineParams, options?: RequestOptions): Promise<{
363
+ items: Activity[];
364
+ cursor: string | null;
365
+ }>;
366
+ count(params: CountParams, options?: RequestOptions): Promise<{
367
+ total: number;
368
+ distinctCustomers: number;
369
+ }>;
370
+ types(params?: {
409
371
  businessId?: string;
410
- limit?: number;
411
- cursor?: string;
412
- }, options?: RequestOptions): Promise<any>;
413
- summary(params: EngagementSummaryParams, options?: RequestOptions): Promise<any>;
372
+ }, options?: RequestOptions): Promise<{
373
+ items: ActivityTypeInfo[];
374
+ uniqueCount: number;
375
+ }>;
414
376
  };
415
377
  };
416
378
  automation: {
@@ -608,20 +570,10 @@ declare function createStorefront(config: HttpClientConfig & {
608
570
  unsubscribe(token: string, options?: RequestOptions): any;
609
571
  confirm(token: string, options?: RequestOptions): any;
610
572
  };
611
- reaction: {
612
- DEFAULT_REACTION_KINDS: readonly ["like", "love", "laugh", "wow", "sad", "insightful", "review", "comment", "star_1", "star_2", "star_3", "star_4", "star_5"];
613
- isValidReactionKind: typeof isValidReactionKind;
614
- computeAverageStars: typeof computeAverageStars;
615
- create(params: any, options?: RequestOptions): any;
616
- get(params: any, options?: RequestOptions): any;
617
- find(params?: any, options?: RequestOptions): any;
618
- update(params: any, options?: RequestOptions): any;
619
- remove(params: {
620
- id: string;
621
- businessId?: string;
622
- }, options?: RequestOptions): any;
623
- summary(params: any, options?: RequestOptions): any;
624
- };
573
+ };
574
+ activity: {
575
+ COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
576
+ track(params: TrackParams): Promise<void>;
625
577
  };
626
578
  automation: {
627
579
  agent: {
@@ -715,4 +667,4 @@ declare function createStorefront(config: HttpClientConfig & {
715
667
  };
716
668
  }>;
717
669
 
718
- export { type AnalyticsSummary, type ApiConfig, AvailabilityResponse, Block, CreateAgentParams, CreateLocationParams, type CreateReactionParams, DEFAULT_REACTION_KINDS, DeleteLocationParams, type EngagementSummary, type EngagementSummaryParams, type FindReactionsParams, GetAgentParams, GetAgentsParams, GetAvailabilityParams, type GetCountriesResponse, type GetReactionParams, GetShippingRatesParams, type HttpClientConfig, Location, type LocationCountry, type LocationState, Market, type ModerateReactionParams, REACTION_KIND_REGEX, type Reaction, type ReactionStatus, type ReactionTarget, type ReactionTargetType, SDK_VERSION, SUPPORTED_FRAMEWORKS, ShipParams, ShipResult, ShippingRate, Slot, type StatusBreakdown, UpdateAgentParams, UpdateLocationParams, type UpdateReactionParams, computeAverageStars, createAdmin, createStorefront, isValidReactionKind };
670
+ export { type Activity$1 as Activity, type ActivityTypeInfo, type AnalyticsSummary, type ApiConfig, AvailabilityResponse, COMMON_ACTIVITY_TYPES, type CommonActivityType, type CountParams, CreateAgentParams, CreateLocationParams, DeleteLocationParams, GetAgentParams, GetAgentsParams, GetAvailabilityParams, type GetCountriesResponse, GetShippingRatesParams, type HttpClientConfig, Location, type LocationCountry, type LocationState, Market, SDK_VERSION, SUPPORTED_FRAMEWORKS, ShipParams, ShipResult, ShippingRate, Slot, type StatusBreakdown, type TimelineParams, type TrackParams, UpdateAgentParams, UpdateLocationParams, createAdmin, createStorefront };