arky-sdk 0.4.2 → 0.4.4
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/README.md +0 -14
- package/dist/index.cjs +6 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +9 -4
- package/dist/types.d.ts +9 -4
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Price, Payment, 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, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams,
|
|
1
|
+
import { Price, Payment, 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, 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 } from './types.cjs';
|
|
2
2
|
export { ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, DayAvailability, EshopCartItem, EshopStoreState, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, Node, PaginatedResponse, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, PromoCodeValidation, ProviderWithTimeline, Quote, ReservationCartItem, ReservationStoreState, Seo, ShippingMethod, ShippingWeightTier, SystemTemplateKey, Workflow, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowIfNode, WorkflowLoopNode, WorkflowNode, WorkflowTriggerNode, WorkflowWaitNode, Zone } from './types.cjs';
|
|
3
3
|
import { isValidKey, validateKey, toKey, nameToKey } from './utils.cjs';
|
|
4
4
|
|
|
@@ -247,9 +247,6 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
247
247
|
getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
248
248
|
getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions): Promise<any>;
|
|
249
249
|
};
|
|
250
|
-
analytics: {
|
|
251
|
-
getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
|
|
252
|
-
};
|
|
253
250
|
cms: {
|
|
254
251
|
createNode(params: CreateNodeParams, options?: RequestOptions): Promise<any>;
|
|
255
252
|
updateNode(params: UpdateNodeParams, options?: RequestOptions): Promise<any>;
|
|
@@ -333,6 +330,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
333
330
|
id: string;
|
|
334
331
|
}, options?: RequestOptions): Promise<any>;
|
|
335
332
|
getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
|
|
333
|
+
revokeSubscription(params: RevokeAudienceSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
336
334
|
};
|
|
337
335
|
setBusinessId: (businessId: string) => void;
|
|
338
336
|
getBusinessId: () => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Price, Payment, 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, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams,
|
|
1
|
+
import { Price, Payment, 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, 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 } from './types.js';
|
|
2
2
|
export { ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, Block, Business, BusinessConfig, DayAvailability, EshopCartItem, EshopStoreState, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, Node, PaginatedResponse, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, PromoCodeValidation, ProviderWithTimeline, Quote, ReservationCartItem, ReservationStoreState, Seo, ShippingMethod, ShippingWeightTier, SystemTemplateKey, Workflow, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowIfNode, WorkflowLoopNode, WorkflowNode, WorkflowTriggerNode, WorkflowWaitNode, Zone } from './types.js';
|
|
3
3
|
import { isValidKey, validateKey, toKey, nameToKey } from './utils.js';
|
|
4
4
|
|
|
@@ -247,9 +247,6 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
247
247
|
getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
248
248
|
getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions): Promise<any>;
|
|
249
249
|
};
|
|
250
|
-
analytics: {
|
|
251
|
-
getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
|
|
252
|
-
};
|
|
253
250
|
cms: {
|
|
254
251
|
createNode(params: CreateNodeParams, options?: RequestOptions): Promise<any>;
|
|
255
252
|
updateNode(params: UpdateNodeParams, options?: RequestOptions): Promise<any>;
|
|
@@ -333,6 +330,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
333
330
|
id: string;
|
|
334
331
|
}, options?: RequestOptions): Promise<any>;
|
|
335
332
|
getSubscribers(params: GetAudienceSubscribersParams, options?: RequestOptions): Promise<any>;
|
|
333
|
+
revokeSubscription(params: RevokeAudienceSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
336
334
|
};
|
|
337
335
|
setBusinessId: (businessId: string) => void;
|
|
338
336
|
getBusinessId: () => string;
|
package/dist/index.js
CHANGED
|
@@ -571,18 +571,6 @@ var createPromoCodeApi = (apiConfig) => {
|
|
|
571
571
|
};
|
|
572
572
|
};
|
|
573
573
|
|
|
574
|
-
// src/api/analytics.ts
|
|
575
|
-
var createAnalyticsApi = (apiConfig) => {
|
|
576
|
-
return {
|
|
577
|
-
async getAnalytics(params, options) {
|
|
578
|
-
return apiConfig.httpClient.get(`/v1/analytics/${apiConfig.businessId}`, {
|
|
579
|
-
...options,
|
|
580
|
-
params
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
};
|
|
585
|
-
|
|
586
574
|
// src/utils/blocks.ts
|
|
587
575
|
function getBlockLabel(block, locale = "en") {
|
|
588
576
|
if (!block) return "";
|
|
@@ -1437,6 +1425,12 @@ var createAudienceApi = (apiConfig) => {
|
|
|
1437
1425
|
}
|
|
1438
1426
|
}
|
|
1439
1427
|
);
|
|
1428
|
+
},
|
|
1429
|
+
async revokeSubscription(params, options) {
|
|
1430
|
+
return apiConfig.httpClient.delete(
|
|
1431
|
+
`/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers/${params.accountId}`,
|
|
1432
|
+
options
|
|
1433
|
+
);
|
|
1440
1434
|
}
|
|
1441
1435
|
};
|
|
1442
1436
|
};
|
|
@@ -1856,7 +1850,6 @@ async function createArkySDK(config) {
|
|
|
1856
1850
|
media: createMediaApi(apiConfig),
|
|
1857
1851
|
notification: createNotificationApi(apiConfig),
|
|
1858
1852
|
promoCode: createPromoCodeApi(apiConfig),
|
|
1859
|
-
analytics: createAnalyticsApi(apiConfig),
|
|
1860
1853
|
cms: createCmsApi(apiConfig),
|
|
1861
1854
|
eshop: createEshopApi(apiConfig),
|
|
1862
1855
|
reservation: createReservationApi(apiConfig),
|