arky-sdk 0.4.47 → 0.4.48

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
- 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, GetBusinessEventsParams, UpdateBusinessEventParams, 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 } from './types.cjs';
2
- export { Access, Address, AnalyticsConfig, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, BusinessEvent, BusinessEventAction, BusinessShippingProvider, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, 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';
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';
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 {
@@ -175,8 +175,6 @@ declare function createArkySDK(config: HttpClientConfig & {
175
175
  testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
176
176
  getBusinessMedia(params: GetBusinessMediaParams2, options?: RequestOptions): Promise<any>;
177
177
  processRefund(params: ProcessRefundParams, options?: RequestOptions): Promise<any>;
178
- getBusinessEvents(params: GetBusinessEventsParams, options?: RequestOptions): Promise<any>;
179
- updateBusinessEventPayload(params: UpdateBusinessEventParams, options?: RequestOptions): Promise<any>;
180
178
  connectStripe(params: ConnectStripeParams, options?: RequestOptions): Promise<any>;
181
179
  disconnectStripe(params: DisconnectStripeParams, options?: RequestOptions): Promise<any>;
182
180
  };
@@ -293,6 +291,10 @@ declare function createArkySDK(config: HttpClientConfig & {
293
291
  }>;
294
292
  ship(params: ShipParams, options?: RequestOptions): Promise<ShipResult>;
295
293
  };
294
+ events: {
295
+ getEvents(params: GetEventsParams, options?: RequestOptions): Promise<any>;
296
+ updateEvent(params: UpdateEventParams, options?: RequestOptions): Promise<any>;
297
+ };
296
298
  analytics: {
297
299
  track: typeof track;
298
300
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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, GetBusinessEventsParams, UpdateBusinessEventParams, 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 } from './types.js';
2
- export { Access, Address, AnalyticsConfig, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, BusinessEvent, BusinessEventAction, BusinessShippingProvider, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, 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';
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';
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 {
@@ -175,8 +175,6 @@ declare function createArkySDK(config: HttpClientConfig & {
175
175
  testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
176
176
  getBusinessMedia(params: GetBusinessMediaParams2, options?: RequestOptions): Promise<any>;
177
177
  processRefund(params: ProcessRefundParams, options?: RequestOptions): Promise<any>;
178
- getBusinessEvents(params: GetBusinessEventsParams, options?: RequestOptions): Promise<any>;
179
- updateBusinessEventPayload(params: UpdateBusinessEventParams, options?: RequestOptions): Promise<any>;
180
178
  connectStripe(params: ConnectStripeParams, options?: RequestOptions): Promise<any>;
181
179
  disconnectStripe(params: DisconnectStripeParams, options?: RequestOptions): Promise<any>;
182
180
  };
@@ -293,6 +291,10 @@ declare function createArkySDK(config: HttpClientConfig & {
293
291
  }>;
294
292
  ship(params: ShipParams, options?: RequestOptions): Promise<ShipResult>;
295
293
  };
294
+ events: {
295
+ getEvents(params: GetEventsParams, options?: RequestOptions): Promise<any>;
296
+ updateEvent(params: UpdateEventParams, options?: RequestOptions): Promise<any>;
297
+ };
296
298
  analytics: {
297
299
  track: typeof track;
298
300
  };
package/dist/index.js CHANGED
@@ -405,26 +405,6 @@ var createBusinessApi = (apiConfig) => {
405
405
  options
406
406
  );
407
407
  },
408
- async getBusinessEvents(params, options) {
409
- return apiConfig.httpClient.get(
410
- `/v1/businesses/${apiConfig.businessId}/events`,
411
- {
412
- ...options,
413
- params: {
414
- entity: params.entity,
415
- limit: params.limit,
416
- cursor: params.cursor
417
- }
418
- }
419
- );
420
- },
421
- async updateBusinessEventPayload(params, options) {
422
- return apiConfig.httpClient.put(
423
- `/v1/businesses/${apiConfig.businessId}/events/${params.eventId}`,
424
- { payload: params.payload },
425
- options
426
- );
427
- },
428
408
  async connectStripe(params, options) {
429
409
  return apiConfig.httpClient.post(
430
410
  `/v1/businesses/${params.businessId}/stripe/connect`,
@@ -1370,7 +1350,7 @@ var createShippingApi = (apiConfig) => {
1370
1350
  async getRates(params, options) {
1371
1351
  const { orderId, ...payload } = params;
1372
1352
  return apiConfig.httpClient.post(
1373
- `/v1/businesses/${apiConfig.businessId}/orders/${orderId}/shipping/rates`,
1353
+ `/v1/businesses/${apiConfig.businessId}/orders/${orderId}/rates`,
1374
1354
  payload,
1375
1355
  options
1376
1356
  );
@@ -1389,6 +1369,33 @@ var createShippingApi = (apiConfig) => {
1389
1369
  };
1390
1370
  };
1391
1371
 
1372
+ // src/api/events.ts
1373
+ function createEventsApi(apiConfig) {
1374
+ return {
1375
+ async getEvents(params, options) {
1376
+ return apiConfig.httpClient.get(`/v1/events`, {
1377
+ ...options,
1378
+ params: {
1379
+ businessId: apiConfig.businessId,
1380
+ entity: params.entity,
1381
+ limit: params.limit,
1382
+ cursor: params.cursor
1383
+ }
1384
+ });
1385
+ },
1386
+ async updateEvent(params, options) {
1387
+ return apiConfig.httpClient.put(
1388
+ `/v1/events/${params.eventId}`,
1389
+ {
1390
+ businessId: apiConfig.businessId,
1391
+ event: params.event
1392
+ },
1393
+ options
1394
+ );
1395
+ }
1396
+ };
1397
+ }
1398
+
1392
1399
  // src/utils/price.ts
1393
1400
  function formatCurrency(amount, currencyCode, locale = "en") {
1394
1401
  return new Intl.NumberFormat(locale, {
@@ -1710,6 +1717,7 @@ async function createArkySDK(config) {
1710
1717
  workflow: createWorkflowApi(apiConfig),
1711
1718
  audience: createAudienceApi(apiConfig),
1712
1719
  shipping: createShippingApi(apiConfig),
1720
+ events: createEventsApi(apiConfig),
1713
1721
  analytics: {
1714
1722
  track
1715
1723
  },