arky-sdk 0.5.89 → 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
@@ -1196,6 +1196,90 @@ var createCustomerApi = (apiConfig) => {
1196
1196
  { sourceId: params.sourceId, businessId },
1197
1197
  options
1198
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
+ }
1199
1283
  }
1200
1284
  };
1201
1285
  };
@@ -1295,96 +1379,6 @@ var createWorkflowApi = (apiConfig) => {
1295
1379
  };
1296
1380
  };
1297
1381
 
1298
- // src/api/audience.ts
1299
- var createAudienceApi = (apiConfig) => {
1300
- return {
1301
- async createAudience(params, options) {
1302
- return apiConfig.httpClient.post(
1303
- `/v1/businesses/${apiConfig.businessId}/audiences`,
1304
- params,
1305
- options
1306
- );
1307
- },
1308
- async updateAudience(params, options) {
1309
- return apiConfig.httpClient.put(
1310
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}`,
1311
- params,
1312
- options
1313
- );
1314
- },
1315
- async deleteAudience(params, options) {
1316
- return apiConfig.httpClient.delete(
1317
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}`,
1318
- options
1319
- );
1320
- },
1321
- async getAudience(params, options) {
1322
- let identifier;
1323
- if (params.id) {
1324
- identifier = params.id;
1325
- } else if (params.key) {
1326
- identifier = `${apiConfig.businessId}:${params.key}`;
1327
- } else {
1328
- throw new Error("GetAudienceParams requires id or key");
1329
- }
1330
- return apiConfig.httpClient.get(
1331
- `/v1/businesses/${apiConfig.businessId}/audiences/${identifier}`,
1332
- options
1333
- );
1334
- },
1335
- async getAudiences(params, options) {
1336
- return apiConfig.httpClient.get(
1337
- `/v1/businesses/${apiConfig.businessId}/audiences`,
1338
- { ...options, params }
1339
- );
1340
- },
1341
- async subscribe(params, options) {
1342
- return apiConfig.httpClient.post(
1343
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribe`,
1344
- {
1345
- customerId: params.customerId,
1346
- ...params.priceId && { priceId: params.priceId },
1347
- ...params.successUrl && { successUrl: params.successUrl },
1348
- ...params.cancelUrl && { cancelUrl: params.cancelUrl },
1349
- ...params.confirmUrl && { confirmUrl: params.confirmUrl }
1350
- },
1351
- options
1352
- );
1353
- },
1354
- async checkAccess(params, options) {
1355
- return apiConfig.httpClient.get(
1356
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/access`,
1357
- options
1358
- );
1359
- },
1360
- async getSubscribers(params, options) {
1361
- return apiConfig.httpClient.get(
1362
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
1363
- {
1364
- ...options,
1365
- params: {
1366
- limit: params.limit,
1367
- cursor: params.cursor
1368
- }
1369
- }
1370
- );
1371
- },
1372
- async addSubscriber(params, options) {
1373
- return apiConfig.httpClient.post(
1374
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
1375
- { customerId: params.customerId },
1376
- options
1377
- );
1378
- },
1379
- async removeSubscriber(params, options) {
1380
- return apiConfig.httpClient.delete(
1381
- `/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers/${params.customerId}`,
1382
- options
1383
- );
1384
- }
1385
- };
1386
- };
1387
-
1388
1382
  // src/api/platform.ts
1389
1383
  var createPlatformApi = (apiConfig) => {
1390
1384
  return {
@@ -2057,7 +2051,6 @@ async function createArkySDK(config) {
2057
2051
  crm: createCustomerApi(apiConfig),
2058
2052
  network: createNetworkApi(apiConfig),
2059
2053
  workflow: createWorkflowApi(apiConfig),
2060
- audience: createAudienceApi(apiConfig),
2061
2054
  shipping: createShippingApi(apiConfig),
2062
2055
  agent: createAgentApi(apiConfig),
2063
2056
  emailTemplate: createEmailTemplateApi(apiConfig),