arky-sdk 0.5.88 → 0.6.0

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,4 +1,4 @@
1
- import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateBookingParams, UpdateBookingParams, BookingCheckoutParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateCustomerParams, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, DeleteCustomerParams, MergeCustomersParams, CreateNetworkParams, GetNetworkParams, FindNetworksParams, UpdateNetworkParams, DeleteNetworkParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, SubscribeAudienceParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams } from './types.cjs';
1
+ import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateBookingParams, UpdateBookingParams, BookingCheckoutParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateCustomerParams, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, DeleteCustomerParams, MergeCustomersParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, SubscribeAudienceParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, CreateNetworkParams, GetNetworkParams, FindNetworksParams, UpdateNetworkParams, DeleteNetworkParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams } from './types.cjs';
2
2
  export { Access, Address, AgentStatus, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, BookingCartItem, BookingStoreState, Business, BusinessConfig, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, GeoLocation, GeoLocationBlock, GetAvailabilityParams, GetSlotsForDateParams, Integration, IntegrationProvider, Language, Location, Market, Media, MediaResolution, Network, NetworkNode, Node, NodeResult, OrderShipping, PaginatedResponse, Parcel, Payment, PaymentMethod, PaymentMethodType, PaymentRefund, Price, PromoCodeValidation, ProviderWithTimeline, PurchaseLabelResult, Quote, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SystemTemplateKey, Webhook, WebhookEventSubscription, Workflow, WorkflowConnection, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, 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-Cjdv3omy.cjs';
4
4
 
@@ -237,6 +237,22 @@ declare function createArkySDK(config: HttpClientConfig & {
237
237
  update(params: UpdateCustomerParams, options?: RequestOptions): Promise<any>;
238
238
  delete(params: DeleteCustomerParams, options?: RequestOptions): Promise<any>;
239
239
  merge(params: MergeCustomersParams, options?: RequestOptions): Promise<any>;
240
+ audiences: {
241
+ create(params: CreateAudienceParams, options?: RequestOptions): Promise<any>;
242
+ update(params: UpdateAudienceParams, options?: RequestOptions): Promise<any>;
243
+ delete(params: {
244
+ id: string;
245
+ }, options?: RequestOptions): Promise<any>;
246
+ get(params: GetAudienceParams, options?: RequestOptions): Promise<any>;
247
+ find(params: GetAudiencesParams, options?: RequestOptions): Promise<any>;
248
+ subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<any>;
249
+ checkAccess(params: {
250
+ id: string;
251
+ }, options?: RequestOptions): Promise<any>;
252
+ getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
253
+ addSubscriber(params: AddAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
254
+ removeSubscriber(params: RemoveAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
255
+ };
240
256
  };
241
257
  network: {
242
258
  create(params: CreateNetworkParams, options?: RequestOptions): Promise<any>;
@@ -255,22 +271,6 @@ declare function createArkySDK(config: HttpClientConfig & {
255
271
  getWorkflowExecutions(params: GetWorkflowExecutionsParams, options?: RequestOptions): Promise<any>;
256
272
  getWorkflowExecution(params: GetWorkflowExecutionParams, options?: RequestOptions): Promise<any>;
257
273
  };
258
- audience: {
259
- createAudience(params: CreateAudienceParams, options?: RequestOptions): Promise<any>;
260
- updateAudience(params: UpdateAudienceParams, options?: RequestOptions): Promise<any>;
261
- deleteAudience(params: {
262
- id: string;
263
- }, options?: RequestOptions): Promise<any>;
264
- getAudience(params: GetAudienceParams, options?: RequestOptions): Promise<any>;
265
- getAudiences(params: GetAudiencesParams, options?: RequestOptions): Promise<any>;
266
- subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<any>;
267
- checkAccess(params: {
268
- id: string;
269
- }, options?: RequestOptions): Promise<any>;
270
- getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
271
- addSubscriber(params: AddAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
272
- removeSubscriber(params: RemoveAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
273
- };
274
274
  shipping: {
275
275
  getRates(params: GetShippingRatesParams, options?: RequestOptions): Promise<{
276
276
  rates: ShippingRate[];
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateBookingParams, UpdateBookingParams, BookingCheckoutParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateCustomerParams, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, DeleteCustomerParams, MergeCustomersParams, CreateNetworkParams, GetNetworkParams, FindNetworksParams, UpdateNetworkParams, DeleteNetworkParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, SubscribeAudienceParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams } from './types.js';
1
+ import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateBookingParams, UpdateBookingParams, BookingCheckoutParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateCustomerParams, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, DeleteCustomerParams, MergeCustomersParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, SubscribeAudienceParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, CreateNetworkParams, GetNetworkParams, FindNetworksParams, UpdateNetworkParams, DeleteNetworkParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams } from './types.js';
2
2
  export { Access, Address, AgentStatus, ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, BookingCartItem, BookingStoreState, Business, BusinessConfig, CustomsDeclaration, CustomsItem, DayAvailability, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, GeoLocation, GeoLocationBlock, GetAvailabilityParams, GetSlotsForDateParams, Integration, IntegrationProvider, Language, Location, Market, Media, MediaResolution, Network, NetworkNode, Node, NodeResult, OrderShipping, PaginatedResponse, Parcel, Payment, PaymentMethod, PaymentMethodType, PaymentRefund, Price, PromoCodeValidation, ProviderWithTimeline, PurchaseLabelResult, Quote, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SystemTemplateKey, Webhook, WebhookEventSubscription, Workflow, WorkflowConnection, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, 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-UQfW3UpN.js';
4
4
 
@@ -237,6 +237,22 @@ declare function createArkySDK(config: HttpClientConfig & {
237
237
  update(params: UpdateCustomerParams, options?: RequestOptions): Promise<any>;
238
238
  delete(params: DeleteCustomerParams, options?: RequestOptions): Promise<any>;
239
239
  merge(params: MergeCustomersParams, options?: RequestOptions): Promise<any>;
240
+ audiences: {
241
+ create(params: CreateAudienceParams, options?: RequestOptions): Promise<any>;
242
+ update(params: UpdateAudienceParams, options?: RequestOptions): Promise<any>;
243
+ delete(params: {
244
+ id: string;
245
+ }, options?: RequestOptions): Promise<any>;
246
+ get(params: GetAudienceParams, options?: RequestOptions): Promise<any>;
247
+ find(params: GetAudiencesParams, options?: RequestOptions): Promise<any>;
248
+ subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<any>;
249
+ checkAccess(params: {
250
+ id: string;
251
+ }, options?: RequestOptions): Promise<any>;
252
+ getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
253
+ addSubscriber(params: AddAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
254
+ removeSubscriber(params: RemoveAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
255
+ };
240
256
  };
241
257
  network: {
242
258
  create(params: CreateNetworkParams, options?: RequestOptions): Promise<any>;
@@ -255,22 +271,6 @@ declare function createArkySDK(config: HttpClientConfig & {
255
271
  getWorkflowExecutions(params: GetWorkflowExecutionsParams, options?: RequestOptions): Promise<any>;
256
272
  getWorkflowExecution(params: GetWorkflowExecutionParams, options?: RequestOptions): Promise<any>;
257
273
  };
258
- audience: {
259
- createAudience(params: CreateAudienceParams, options?: RequestOptions): Promise<any>;
260
- updateAudience(params: UpdateAudienceParams, options?: RequestOptions): Promise<any>;
261
- deleteAudience(params: {
262
- id: string;
263
- }, options?: RequestOptions): Promise<any>;
264
- getAudience(params: GetAudienceParams, options?: RequestOptions): Promise<any>;
265
- getAudiences(params: GetAudiencesParams, options?: RequestOptions): Promise<any>;
266
- subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<any>;
267
- checkAccess(params: {
268
- id: string;
269
- }, options?: RequestOptions): Promise<any>;
270
- getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
271
- addSubscriber(params: AddAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
272
- removeSubscriber(params: RemoveAudienceSubscriberParams, options?: RequestOptions): Promise<any>;
273
- };
274
274
  shipping: {
275
275
  getRates(params: GetShippingRatesParams, options?: RequestOptions): Promise<{
276
276
  rates: ShippingRate[];
package/dist/index.js CHANGED
@@ -1165,7 +1165,6 @@ var createCustomerApi = (apiConfig) => {
1165
1165
  if (params?.limit !== void 0) queryParams.limit = params.limit;
1166
1166
  if (params?.cursor) queryParams.cursor = params.cursor;
1167
1167
  if (params?.query) queryParams.query = params.query;
1168
- if (params?.tags) queryParams.tags = params.tags.join(",");
1169
1168
  if (params?.sortField) queryParams.sortField = params.sortField;
1170
1169
  if (params?.sortDirection) queryParams.sortDirection = params.sortDirection;
1171
1170
  return apiConfig.httpClient.get(
@@ -1197,6 +1196,90 @@ var createCustomerApi = (apiConfig) => {
1197
1196
  { sourceId: params.sourceId, businessId },
1198
1197
  options
1199
1198
  );
1199
+ },
1200
+ // Audiences
1201
+ audiences: {
1202
+ async create(params, options) {
1203
+ return apiConfig.httpClient.post(
1204
+ `/v1/businesses/${apiConfig.businessId}/audiences`,
1205
+ params,
1206
+ options
1207
+ );
1208
+ },
1209
+ async update(params, options) {
1210
+ return apiConfig.httpClient.put(
1211
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}`,
1212
+ params,
1213
+ options
1214
+ );
1215
+ },
1216
+ async delete(params, options) {
1217
+ return apiConfig.httpClient.delete(
1218
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}`,
1219
+ options
1220
+ );
1221
+ },
1222
+ async get(params, options) {
1223
+ let identifier;
1224
+ if (params.id) {
1225
+ identifier = params.id;
1226
+ } else if (params.key) {
1227
+ identifier = `${apiConfig.businessId}:${params.key}`;
1228
+ } else {
1229
+ throw new Error("GetAudienceParams requires id or key");
1230
+ }
1231
+ return apiConfig.httpClient.get(
1232
+ `/v1/businesses/${apiConfig.businessId}/audiences/${identifier}`,
1233
+ options
1234
+ );
1235
+ },
1236
+ async find(params, options) {
1237
+ return apiConfig.httpClient.get(
1238
+ `/v1/businesses/${apiConfig.businessId}/audiences`,
1239
+ { ...options, params }
1240
+ );
1241
+ },
1242
+ async subscribe(params, options) {
1243
+ return apiConfig.httpClient.post(
1244
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribe`,
1245
+ {
1246
+ customerId: params.customerId,
1247
+ ...params.priceId && { priceId: params.priceId },
1248
+ ...params.successUrl && { successUrl: params.successUrl },
1249
+ ...params.cancelUrl && { cancelUrl: params.cancelUrl },
1250
+ ...params.confirmUrl && { confirmUrl: params.confirmUrl }
1251
+ },
1252
+ options
1253
+ );
1254
+ },
1255
+ async checkAccess(params, options) {
1256
+ return apiConfig.httpClient.get(
1257
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/access`,
1258
+ options
1259
+ );
1260
+ },
1261
+ async getSubscribers(params, options) {
1262
+ return apiConfig.httpClient.get(
1263
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
1264
+ {
1265
+ ...options,
1266
+ params: { limit: params.limit, cursor: params.cursor }
1267
+ }
1268
+ );
1269
+ },
1270
+ async addSubscriber(params, options) {
1271
+ return apiConfig.httpClient.post(
1272
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
1273
+ { customerId: params.customerId },
1274
+ options
1275
+ );
1276
+ },
1277
+ async removeSubscriber(params, options) {
1278
+ return apiConfig.httpClient.delete(
1279
+ `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers/${params.customerId}`,
1280
+ options
1281
+ );
1282
+ }
1200
1283
  }
1201
1284
  };
1202
1285
  };
@@ -1296,96 +1379,6 @@ var createWorkflowApi = (apiConfig) => {
1296
1379
  };
1297
1380
  };
1298
1381
 
1299
- // src/api/audience.ts
1300
- var createAudienceApi = (apiConfig) => {
1301
- return {
1302
- async createAudience(params, options) {
1303
- return apiConfig.httpClient.post(
1304
- `/v1/businesses/${apiConfig.businessId}/audiences`,
1305
- params,
1306
- options
1307
- );
1308
- },
1309
- async updateAudience(params, options) {
1310
- return apiConfig.httpClient.put(
1311
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}`,
1312
- params,
1313
- options
1314
- );
1315
- },
1316
- async deleteAudience(params, options) {
1317
- return apiConfig.httpClient.delete(
1318
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}`,
1319
- options
1320
- );
1321
- },
1322
- async getAudience(params, options) {
1323
- let identifier;
1324
- if (params.id) {
1325
- identifier = params.id;
1326
- } else if (params.key) {
1327
- identifier = `${apiConfig.businessId}:${params.key}`;
1328
- } else {
1329
- throw new Error("GetAudienceParams requires id or key");
1330
- }
1331
- return apiConfig.httpClient.get(
1332
- `/v1/businesses/${apiConfig.businessId}/audiences/${identifier}`,
1333
- options
1334
- );
1335
- },
1336
- async getAudiences(params, options) {
1337
- return apiConfig.httpClient.get(
1338
- `/v1/businesses/${apiConfig.businessId}/audiences`,
1339
- { ...options, params }
1340
- );
1341
- },
1342
- async subscribe(params, options) {
1343
- return apiConfig.httpClient.post(
1344
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribe`,
1345
- {
1346
- customerId: params.customerId,
1347
- ...params.priceId && { priceId: params.priceId },
1348
- ...params.successUrl && { successUrl: params.successUrl },
1349
- ...params.cancelUrl && { cancelUrl: params.cancelUrl },
1350
- ...params.confirmUrl && { confirmUrl: params.confirmUrl }
1351
- },
1352
- options
1353
- );
1354
- },
1355
- async checkAccess(params, options) {
1356
- return apiConfig.httpClient.get(
1357
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/access`,
1358
- options
1359
- );
1360
- },
1361
- async getSubscribers(params, options) {
1362
- return apiConfig.httpClient.get(
1363
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
1364
- {
1365
- ...options,
1366
- params: {
1367
- limit: params.limit,
1368
- cursor: params.cursor
1369
- }
1370
- }
1371
- );
1372
- },
1373
- async addSubscriber(params, options) {
1374
- return apiConfig.httpClient.post(
1375
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
1376
- { customerId: params.customerId },
1377
- options
1378
- );
1379
- },
1380
- async removeSubscriber(params, options) {
1381
- return apiConfig.httpClient.delete(
1382
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers/${params.customerId}`,
1383
- options
1384
- );
1385
- }
1386
- };
1387
- };
1388
-
1389
1382
  // src/api/platform.ts
1390
1383
  var createPlatformApi = (apiConfig) => {
1391
1384
  return {
@@ -2058,7 +2051,6 @@ async function createArkySDK(config) {
2058
2051
  crm: createCustomerApi(apiConfig),
2059
2052
  network: createNetworkApi(apiConfig),
2060
2053
  workflow: createWorkflowApi(apiConfig),
2061
- audience: createAudienceApi(apiConfig),
2062
2054
  shipping: createShippingApi(apiConfig),
2063
2055
  agent: createAgentApi(apiConfig),
2064
2056
  emailTemplate: createEmailTemplateApi(apiConfig),