arky-sdk 0.4.50 → 0.4.52

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,5 +1,5 @@
1
1
  import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, AddPhoneNumberParams, PhoneNumberConfirmParams, GetMeParams, SearchAccountsParams, AccountSubscribeParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionPlansParams, GetSubscriptionParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, ConnectStripeParams, DisconnectStripeParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, GenerateBlocksParams, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, SubscribeAudienceParams, GetAudienceSubscribersParams, RevokeAudienceSubscriptionParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, GetEventsParams, UpdateEventParams } from './types.cjs';
2
- export { Access, Address, AnalyticsConfig, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, BusinessShippingProvider, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, Event, EventAction, GeoLocation, GeoLocationBlock, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, Node, OrderShipping, PaginatedResponse, Parcel, Payment, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, Price, PromoCodeValidation, ProviderWithTimeline, PurchaseLabelResult, Quote, ReservationCartItem, ReservationStoreState, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingProviderShippo, ShippingProviderStatus, ShippingStatus, ShippingWeightTier, SystemTemplateKey, Workflow, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowIfNode, WorkflowLoopNode, WorkflowNode, WorkflowTriggerNode, WorkflowWaitNode, Zone, ZoneLocation } from './types.cjs';
2
+ export { Access, Address, AnalyticsConfig, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, BusinessShippingProvider, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, GeoLocation, GeoLocationBlock, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, Node, NodeExecutionResult, OrderShipping, PaginatedResponse, Parcel, Payment, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, Price, PromoCodeValidation, ProviderWithTimeline, PurchaseLabelResult, Quote, ReservationCartItem, ReservationStoreState, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingProviderShippo, ShippingProviderStatus, ShippingStatus, ShippingWeightTier, SystemTemplateKey, Workflow, WorkflowEdge, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, WorkflowLoopNode, WorkflowMergeNode, WorkflowNode, 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-C28uWlRE.cjs';
4
4
 
5
5
  interface AuthTokens {
@@ -116,7 +116,7 @@ declare global {
116
116
  }
117
117
  declare function track(eventName: string, params?: Record<string, any>): void;
118
118
 
119
- declare const SDK_VERSION = "0.4.34";
119
+ declare const SDK_VERSION = "0.4.51";
120
120
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
121
121
  interface ApiConfig {
122
122
  httpClient: any;
@@ -284,6 +284,10 @@ declare function createArkySDK(config: HttpClientConfig & {
284
284
  }, options?: RequestOptions): Promise<any>;
285
285
  getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
286
286
  revokeSubscription(params: RevokeAudienceSubscriptionParams, options?: RequestOptions): Promise<any>;
287
+ grantSubscription(params: {
288
+ id: string;
289
+ email: string;
290
+ }, options?: RequestOptions): Promise<any>;
287
291
  };
288
292
  shipping: {
289
293
  getRates(params: GetShippingRatesParams, options?: RequestOptions): Promise<{
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, AddPhoneNumberParams, PhoneNumberConfirmParams, GetMeParams, SearchAccountsParams, AccountSubscribeParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionPlansParams, GetSubscriptionParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, ConnectStripeParams, DisconnectStripeParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, GenerateBlocksParams, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, SubscribeAudienceParams, GetAudienceSubscribersParams, RevokeAudienceSubscriptionParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, GetEventsParams, UpdateEventParams } from './types.js';
2
- export { Access, Address, AnalyticsConfig, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, BusinessShippingProvider, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, Event, EventAction, GeoLocation, GeoLocationBlock, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, Node, OrderShipping, PaginatedResponse, Parcel, Payment, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, Price, PromoCodeValidation, ProviderWithTimeline, PurchaseLabelResult, Quote, ReservationCartItem, ReservationStoreState, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingProviderShippo, ShippingProviderStatus, ShippingStatus, ShippingWeightTier, SystemTemplateKey, Workflow, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowIfNode, WorkflowLoopNode, WorkflowNode, WorkflowTriggerNode, WorkflowWaitNode, Zone, ZoneLocation } from './types.js';
2
+ export { Access, Address, AnalyticsConfig, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, BusinessShippingProvider, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, GeoLocation, GeoLocationBlock, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, Node, NodeExecutionResult, OrderShipping, PaginatedResponse, Parcel, Payment, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, Price, PromoCodeValidation, ProviderWithTimeline, PurchaseLabelResult, Quote, ReservationCartItem, ReservationStoreState, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingProviderShippo, ShippingProviderStatus, ShippingStatus, ShippingWeightTier, SystemTemplateKey, Workflow, WorkflowEdge, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, WorkflowLoopNode, WorkflowMergeNode, WorkflowNode, 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-GZfY5CmP.js';
4
4
 
5
5
  interface AuthTokens {
@@ -116,7 +116,7 @@ declare global {
116
116
  }
117
117
  declare function track(eventName: string, params?: Record<string, any>): void;
118
118
 
119
- declare const SDK_VERSION = "0.4.34";
119
+ declare const SDK_VERSION = "0.4.51";
120
120
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
121
121
  interface ApiConfig {
122
122
  httpClient: any;
@@ -284,6 +284,10 @@ declare function createArkySDK(config: HttpClientConfig & {
284
284
  }, options?: RequestOptions): Promise<any>;
285
285
  getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
286
286
  revokeSubscription(params: RevokeAudienceSubscriptionParams, options?: RequestOptions): Promise<any>;
287
+ grantSubscription(params: {
288
+ id: string;
289
+ email: string;
290
+ }, options?: RequestOptions): Promise<any>;
287
291
  };
288
292
  shipping: {
289
293
  getRates(params: GetShippingRatesParams, options?: RequestOptions): Promise<{
package/dist/index.js CHANGED
@@ -1318,6 +1318,13 @@ var createAudienceApi = (apiConfig) => {
1318
1318
  `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers/${params.accountId}`,
1319
1319
  options
1320
1320
  );
1321
+ },
1322
+ async grantSubscription(params, options) {
1323
+ return apiConfig.httpClient.post(
1324
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
1325
+ { email: params.email },
1326
+ options
1327
+ );
1321
1328
  }
1322
1329
  };
1323
1330
  };
@@ -1668,7 +1675,7 @@ function getFirstAvailableFCId(variant, quantity = 1) {
1668
1675
  }
1669
1676
 
1670
1677
  // src/index.ts
1671
- var SDK_VERSION = "0.4.34";
1678
+ var SDK_VERSION = "0.4.51";
1672
1679
  var SUPPORTED_FRAMEWORKS = [
1673
1680
  "astro",
1674
1681
  "react",