@voucherify/sdk 2.9.1 → 2.9.3
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/voucherifysdk.cjs +2 -0
- package/dist/voucherifysdk.cjs.map +1 -0
- package/dist/voucherifysdk.d.mts +5252 -0
- package/dist/voucherifysdk.d.ts +5252 -0
- package/dist/voucherifysdk.esm.js +2 -2261
- package/dist/voucherifysdk.esm.js.map +1 -1
- package/package.json +12 -8
- package/CHANGELOG.md +0 -657
- package/dist/ApiLimitsHandler.d.ts +0 -10
- package/dist/AsyncActions.d.ts +0 -15
- package/dist/Balance.d.ts +0 -12
- package/dist/Campaigns.d.ts +0 -58
- package/dist/Categories.d.ts +0 -26
- package/dist/ClientSide.d.ts +0 -53
- package/dist/Consents.d.ts +0 -10
- package/dist/Customers.d.ts +0 -72
- package/dist/Distributions.d.ts +0 -22
- package/dist/Events.d.ts +0 -10
- package/dist/Exports.d.ts +0 -22
- package/dist/Loyalties.d.ts +0 -159
- package/dist/MetadataSchemas.d.ts +0 -14
- package/dist/Orders.d.ts +0 -27
- package/dist/ProductCollections.d.ts +0 -26
- package/dist/Products.d.ts +0 -63
- package/dist/PromotionTiers.d.ts +0 -34
- package/dist/Promotions.d.ts +0 -18
- package/dist/PromotionsStacks.d.ts +0 -30
- package/dist/Qualifications.d.ts +0 -10
- package/dist/Redemptions.d.ts +0 -35
- package/dist/RequestController.d.ts +0 -29
- package/dist/Rewards.d.ts +0 -43
- package/dist/Segments.d.ts +0 -22
- package/dist/ValidationRules.d.ts +0 -43
- package/dist/Validations.d.ts +0 -17
- package/dist/VoucherifyClientSide.d.ts +0 -86
- package/dist/VoucherifyError.d.ts +0 -20
- package/dist/VoucherifyServerSide.d.ts +0 -131
- package/dist/Vouchers.d.ts +0 -78
- package/dist/helpers.d.ts +0 -18
- package/dist/index.d.ts +0 -25
- package/dist/types/ApplicableTo.d.ts +0 -30
- package/dist/types/AsyncActions.d.ts +0 -21
- package/dist/types/Balance.d.ts +0 -14
- package/dist/types/Campaigns.d.ts +0 -120
- package/dist/types/Categories.d.ts +0 -38
- package/dist/types/ClientSide.d.ts +0 -134
- package/dist/types/Consents.d.ts +0 -33
- package/dist/types/Customers.d.ts +0 -361
- package/dist/types/DiscountVoucher.d.ts +0 -93
- package/dist/types/Distributions.d.ts +0 -144
- package/dist/types/Events.d.ts +0 -17
- package/dist/types/Exports.d.ts +0 -149
- package/dist/types/Gift.d.ts +0 -3
- package/dist/types/Loyalties.d.ts +0 -1057
- package/dist/types/MetadataSchemas.d.ts +0 -33
- package/dist/types/Orders.d.ts +0 -195
- package/dist/types/ProductCollections.d.ts +0 -96
- package/dist/types/Products.d.ts +0 -106
- package/dist/types/PromotionTiers.d.ts +0 -127
- package/dist/types/Promotions.d.ts +0 -108
- package/dist/types/PromotionsStacks.d.ts +0 -71
- package/dist/types/Qualifications.d.ts +0 -86
- package/dist/types/Redemptions.d.ts +0 -205
- package/dist/types/Rewards.d.ts +0 -219
- package/dist/types/Segments.d.ts +0 -32
- package/dist/types/Stackable.d.ts +0 -101
- package/dist/types/UtilityTypes.d.ts +0 -3
- package/dist/types/ValidateSession.d.ts +0 -17
- package/dist/types/ValidationError.d.ts +0 -7
- package/dist/types/ValidationRules.d.ts +0 -93
- package/dist/types/Validations.d.ts +0 -98
- package/dist/types/Vouchers.d.ts +0 -364
- package/dist/types/index.d.ts +0 -25
- package/dist/voucherifysdk.umd.development.js +0 -2270
- package/dist/voucherifysdk.umd.development.js.map +0 -1
- package/dist/voucherifysdk.umd.production.min.js +0 -2
- package/dist/voucherifysdk.umd.production.min.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RequestController } from './RequestController';
|
|
2
|
-
export declare class ApiLimitsHandler {
|
|
3
|
-
private readonly requestController;
|
|
4
|
-
constructor(requestController: RequestController);
|
|
5
|
-
private getLastResponseHeadersFromController;
|
|
6
|
-
areLimitsAvailable(): boolean;
|
|
7
|
-
getRateLimit(): number;
|
|
8
|
-
getRateLimitRemaining(): number;
|
|
9
|
-
getRetryAfter(): number;
|
|
10
|
-
}
|
package/dist/AsyncActions.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as T from './types/AsyncActions';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
declare class AsyncActions {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/get-async-actions-1
|
|
8
|
-
*/
|
|
9
|
-
get(asyncActionId: string): Promise<T.AsyncActionsResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* @see https://docs.voucherify.io/reference/list-async-actions
|
|
12
|
-
*/
|
|
13
|
-
list(params: T.AsyncActionsListParams): Promise<T.AsyncActionsListResponse>;
|
|
14
|
-
}
|
|
15
|
-
export { AsyncActions };
|
package/dist/Balance.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Balance';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class Balance {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* Add Gift Voucher Balance
|
|
8
|
-
* This method gives a possibility to add balance to an existing gift voucher.
|
|
9
|
-
* @see https://docs.voucherify.io/reference/add-gift-voucher-balance
|
|
10
|
-
*/
|
|
11
|
-
create(code: string, params: T.BalanceCreateParams): Promise<T.BalanceCreateResponse>;
|
|
12
|
-
}
|
package/dist/Campaigns.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Campaigns';
|
|
2
|
-
import * as AAT from './types/AsyncActions';
|
|
3
|
-
import type { RequestController } from './RequestController';
|
|
4
|
-
declare class CampaignsQualifications {
|
|
5
|
-
private client;
|
|
6
|
-
constructor(client: RequestController);
|
|
7
|
-
examine(body?: T.CampaignsQualificationsBody, params?: T.CampaignsQualificationsParams): Promise<T.CampaignsQualificationsResponse>;
|
|
8
|
-
}
|
|
9
|
-
export declare class Campaigns {
|
|
10
|
-
private client;
|
|
11
|
-
qualifications: CampaignsQualifications;
|
|
12
|
-
constructor(client: RequestController);
|
|
13
|
-
/**
|
|
14
|
-
* @see https://docs.voucherify.io/reference/create-campaign
|
|
15
|
-
*/
|
|
16
|
-
create(campaign: T.CampaignsCreateCampaign): Promise<T.CampaignResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* @see https://docs.voucherify.io/reference/update-campaign
|
|
19
|
-
*/
|
|
20
|
-
update(nameOrId: string, campaign: T.CampaignsUpdateCampaign): Promise<T.CampaignResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* @see https://docs.voucherify.io/reference/get-campaign
|
|
23
|
-
*/
|
|
24
|
-
get(name: string): Promise<T.CampaignResponse>;
|
|
25
|
-
/**
|
|
26
|
-
* @see https://docs.voucherify.io/reference/delete-campaign
|
|
27
|
-
*/
|
|
28
|
-
delete(name: string, params?: T.CampaignsDeleteParams): Promise<unknown>;
|
|
29
|
-
/**
|
|
30
|
-
* @see https://docs.voucherify.io/reference/add-voucher-to-campaign
|
|
31
|
-
*/
|
|
32
|
-
addVoucher(name: string, body?: T.CampaignsAddVoucherBody, params?: T.CampaignsAddVoucherParams): Promise<{} | Pick<import("./types").VouchersResponse, "object" | "created_at" | "active" | "type" | "category" | "start_date" | "expiration_date" | "metadata" | "redemption" | "additional_info" | "code" | "discount" | "campaign" | "gift" | "publish" | "assets">>;
|
|
33
|
-
/**
|
|
34
|
-
* @see https://docs.voucherify.io/reference/add-voucher-with-certain-code-to-campaign
|
|
35
|
-
*/
|
|
36
|
-
addCertainVoucher(name: string, code: string, body?: T.CampaignsAddCertainVoucherParams): Promise<Pick<import("./types").VouchersResponse, "object" | "created_at" | "active" | "type" | "category" | "start_date" | "expiration_date" | "metadata" | "redemption" | "additional_info" | "code" | "discount" | "campaign" | "gift" | "publish" | "assets">>;
|
|
37
|
-
/**
|
|
38
|
-
* @see https://docs.voucherify.io/reference/import-vouchers
|
|
39
|
-
*/
|
|
40
|
-
importVouchers(campaignName: string, vouchers: T.CampaignsImportVouchers[]): Promise<T.CampaignsVouchersImportResponse>;
|
|
41
|
-
/**
|
|
42
|
-
* @see https://docs.voucherify.io/reference/list-campaigns
|
|
43
|
-
*/
|
|
44
|
-
list(params?: T.CampaignsListParams): Promise<T.CampaignsListResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* @see https://api.voucherify.io/v1/campaigns/{campaignId}/importCSV
|
|
47
|
-
*/
|
|
48
|
-
importVouchersCSV(campaignId: string, filePath: string): Promise<AAT.AsyncActionCreateResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* @see https://docs.voucherify.io/reference/enable-campaign
|
|
51
|
-
*/
|
|
52
|
-
enable(campaignId: string): Promise<{}>;
|
|
53
|
-
/**
|
|
54
|
-
* @see https://docs.voucherify.io/reference/disable-campaign
|
|
55
|
-
*/
|
|
56
|
-
disable(campaignId: string): Promise<{}>;
|
|
57
|
-
}
|
|
58
|
-
export {};
|
package/dist/Categories.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Categories';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class Categories {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/list-categories
|
|
8
|
-
*/
|
|
9
|
-
list(params?: T.CategoriesListRequestQuery): Promise<T.ListCategories>;
|
|
10
|
-
/**
|
|
11
|
-
* @see https://docs.voucherify.io/reference/create-category
|
|
12
|
-
*/
|
|
13
|
-
create(createCategory: T.CreateCategory): Promise<T.ResponseCreateCategory>;
|
|
14
|
-
/**
|
|
15
|
-
* @see https://docs.voucherify.io/reference/get-category
|
|
16
|
-
*/
|
|
17
|
-
get(categoryId: string): Promise<T.CategoryObject>;
|
|
18
|
-
/**
|
|
19
|
-
* @see https://docs.voucherify.io/reference/delete-category
|
|
20
|
-
*/
|
|
21
|
-
delete(categoryId: string): Promise<{}>;
|
|
22
|
-
/**
|
|
23
|
-
* @see https://docs.voucherify.io/reference/update-category
|
|
24
|
-
*/
|
|
25
|
-
update(categoryId: string, updateCategory: T.UpdateCategoryRequest): Promise<T.ResponseUpdateCategory>;
|
|
26
|
-
}
|
package/dist/ClientSide.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as T from './types/ClientSide';
|
|
2
|
-
import * as TQ from './types/Qualifications';
|
|
3
|
-
import type { RequestController } from './RequestController';
|
|
4
|
-
export declare class ClientSide {
|
|
5
|
-
private client;
|
|
6
|
-
private trackingId?;
|
|
7
|
-
constructor(client: RequestController, trackingId?: string | undefined);
|
|
8
|
-
setIdentity(identity?: string): void;
|
|
9
|
-
/**
|
|
10
|
-
* @see https://docs.voucherify.io/reference/vouchers-validate
|
|
11
|
-
*/
|
|
12
|
-
validate(params: T.ClientSideValidateParams | string): Promise<T.ClientSideValidateResponse>;
|
|
13
|
-
/**
|
|
14
|
-
* @see https://docs.voucherify.io/reference/redeem-voucher-client-side
|
|
15
|
-
*/
|
|
16
|
-
redeem(code: string, payload?: T.ClientSideRedeemPayload): Promise<T.ClientSideRedeemResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* @see https://docs.voucherify.io/reference/create-publication
|
|
19
|
-
*/
|
|
20
|
-
publish(campaign: string, payload?: T.ClientSidePublishPayload, queryParams?: T.ClientSidePublishQueryParams): Promise<T.ClientSidePublishResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* @see https://docs.voucherify.io/reference/track-custom-event-client-side
|
|
23
|
-
*/
|
|
24
|
-
track(event_name: string, customer: T.ClientSideTrackCustomer, metadata?: Record<string, any>, referral?: T.ClientSideTrackReferral, loyalty?: T.ClientSideTrackLoyalty): Promise<T.ClientSideTrackResponse>;
|
|
25
|
-
/**
|
|
26
|
-
* @see https://docs.voucherify.io/reference/list-vouchers
|
|
27
|
-
*/
|
|
28
|
-
listVouchers(params?: T.ClientSideListVouchersParams): Promise<T.ClientSideListVouchersResponse>;
|
|
29
|
-
/**
|
|
30
|
-
* @see https://docs.voucherify.io/reference/create-customer
|
|
31
|
-
*/
|
|
32
|
-
createCustomer(customer: T.ClientSideCustomersCreateParams, enableDoubleOptIn?: boolean): Promise<import("./types").CustomersCreateResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* @see https://docs.voucherify.io/reference/get-consent-client-side
|
|
35
|
-
*/
|
|
36
|
-
listConsents(): Promise<import("./types").ConsentsListResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* @see https://docs.voucherify.io/reference/update-customers-consents-client
|
|
39
|
-
*/
|
|
40
|
-
updateConsents(idOrSourceId: string, consents: T.ClientSideCustomersUpdateConsentsBody): Promise<undefined>;
|
|
41
|
-
/**
|
|
42
|
-
* @see https://docs.voucherify.io/reference/validate-stackable-discounts-client-side
|
|
43
|
-
*/
|
|
44
|
-
validateStackable(params: T.ClientSideValidationsValidateStackableParams): Promise<import("./types").ValidationValidateStackableResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* @see https://docs.voucherify.io/reference/redeem-stackable-discounts-client-side
|
|
47
|
-
*/
|
|
48
|
-
redeemStackable(params: T.ClientSideRedemptionsRedeemStackableParams): Promise<import("./types").RedemptionsRedeemStackableResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* @see https://docs.voucherify.io/reference/check-eligibility
|
|
51
|
-
*/
|
|
52
|
-
qualifications(body: TQ.QualificationsCheckEligibilityRequestBody): Promise<TQ.QualificationsCheckEligibilityResponseBody>;
|
|
53
|
-
}
|
package/dist/Consents.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Consents';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class Consents {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated This method is deprecated. We’re removing this method in next major version.
|
|
8
|
-
*/
|
|
9
|
-
list(): Promise<T.ConsentsListResponse>;
|
|
10
|
-
}
|
package/dist/Customers.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Customers';
|
|
2
|
-
import * as AAT from './types/AsyncActions';
|
|
3
|
-
import type { RequestController } from './RequestController';
|
|
4
|
-
declare class Customers {
|
|
5
|
-
private client;
|
|
6
|
-
constructor(client: RequestController);
|
|
7
|
-
/**
|
|
8
|
-
* @see https://docs.voucherify.io/reference/create-customer
|
|
9
|
-
*/
|
|
10
|
-
create(customer: T.CustomersCreateBody): Promise<T.CustomersCreateResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* @see https://docs.voucherify.io/reference/read-customer
|
|
13
|
-
*/
|
|
14
|
-
get(customerId: string): Promise<T.CustomersCreateResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* @see https://docs.voucherify.io/reference/list-customers
|
|
17
|
-
*/
|
|
18
|
-
list(params: T.CustomersListParams): Promise<T.CustomersCommonListResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Standard list customers API has limitation of available pages to be shown equal to 100. To cover cases when you would like to fetch more, you must use scroll capabilities.
|
|
21
|
-
*
|
|
22
|
-
* ```javascript
|
|
23
|
-
* async function () {
|
|
24
|
-
* for await (const customer of voucherify.customers.scroll(params)) {
|
|
25
|
-
* console.log('Customer', customer)
|
|
26
|
-
* }
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
scroll(params: T.CustomersScrollParams): AsyncGenerator<T.CustomersScrollYield, void, T.CustomersScrollYield>;
|
|
31
|
-
/**
|
|
32
|
-
* @see https://docs.voucherify.io/reference/update-customer
|
|
33
|
-
*/
|
|
34
|
-
update(customer: T.CustomersUpdateParams): Promise<T.CustomersCreateResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* @see https://docs.voucherify.io/reference/update-customers-in-bulk
|
|
37
|
-
*/
|
|
38
|
-
updateInBulk(customers: T.CustomersUpdateInBulkRequestBody): Promise<AAT.AsyncActionCreateResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* @see https://docs.voucherify.io/reference/update-customers-metadata-in-bulk
|
|
41
|
-
*/
|
|
42
|
-
updateMetadataInBulk(sourceIdsAndMetadata: T.CustomersUpdateMetadataInBulkRequestBody): Promise<AAT.AsyncActionCreateResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* @see https://docs.voucherify.io/reference/delete-customer
|
|
45
|
-
*/
|
|
46
|
-
delete(customerId: string): Promise<undefined>;
|
|
47
|
-
/**
|
|
48
|
-
* @see https://docs.voucherify.io/reference/delete-customer-permanently
|
|
49
|
-
*/
|
|
50
|
-
deletePermanently(customerId: string): Promise<T.CustomersDeletePermanentlyResponseBody>;
|
|
51
|
-
/**
|
|
52
|
-
* @see https://docs.voucherify.io/reference/list-customer-activity
|
|
53
|
-
*/
|
|
54
|
-
listActivity(customerIdOrSourceId: string, params?: T.CustomerActivityListQueryParams): Promise<T.CustomerActivityListResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* @deprecated This method is deprecated. We’re removing this method in next major version.
|
|
57
|
-
*/
|
|
58
|
-
updateConsents(idOrSourceId: string, consents: T.CustomersUpdateConsentsBody): Promise<undefined>;
|
|
59
|
-
/**
|
|
60
|
-
* @deprecated This method is deprecated in favor of the `listActivity` method. We’re removing this method in next major version.
|
|
61
|
-
*/
|
|
62
|
-
listActivities(customerId: string, params?: T.CustomerActivitiesListQueryParams): Promise<T.CustomerActivitiesListResponse>;
|
|
63
|
-
/**
|
|
64
|
-
* @see https://docs.voucherify.io/reference/import-customers-using-csv
|
|
65
|
-
*/
|
|
66
|
-
importCSV(filePath: string): Promise<AAT.AsyncActionCreateResponse>;
|
|
67
|
-
/**
|
|
68
|
-
* @see https://docs.voucherify.io/reference/list-customer-redeemables
|
|
69
|
-
*/
|
|
70
|
-
listRedeemables(id: string, params?: T.CustomerRedeemablesListQueryParams): Promise<T.CustomerRedeemablesListResponse>;
|
|
71
|
-
}
|
|
72
|
-
export { Customers };
|
package/dist/Distributions.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Distributions';
|
|
2
|
-
import type { Exports } from './Exports';
|
|
3
|
-
import type { RequestController } from './RequestController';
|
|
4
|
-
declare class DistributionsPublications {
|
|
5
|
-
private client;
|
|
6
|
-
constructor(client: RequestController);
|
|
7
|
-
/**
|
|
8
|
-
* @see https://docs.voucherify.io/reference/list-publications
|
|
9
|
-
*/
|
|
10
|
-
list(params?: T.DistributionsPublicationsListParams): Promise<T.DistributionsPublicationsListResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* @see https://docs.voucherify.io/reference/create-publication
|
|
13
|
-
*/
|
|
14
|
-
create(params: T.DistributionsPublicationsCreateParams): Promise<T.DistributionsPublicationsCreateResponse>;
|
|
15
|
-
}
|
|
16
|
-
export declare class Distributions {
|
|
17
|
-
private client;
|
|
18
|
-
exports: Exports;
|
|
19
|
-
publications: DistributionsPublications;
|
|
20
|
-
constructor(client: RequestController, exports: Exports);
|
|
21
|
-
}
|
|
22
|
-
export {};
|
package/dist/Events.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Events';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class Events {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/track-custom-event-client-side
|
|
8
|
-
*/
|
|
9
|
-
create(eventName: string, params: T.EventsParams): Promise<T.EventsResponse>;
|
|
10
|
-
}
|
package/dist/Exports.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Exports';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class Exports {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/create-export
|
|
8
|
-
*/
|
|
9
|
-
create(exportResource: T.ExportResource): Promise<T.ExportsCreateResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* @see https://docs.voucherify.io/reference/list-exports
|
|
12
|
-
*/
|
|
13
|
-
list(query?: T.ExportsListRequestQuery): Promise<T.ExportsListResponseBody>;
|
|
14
|
-
/**
|
|
15
|
-
* @see https://docs.voucherify.io/reference/get-export
|
|
16
|
-
*/
|
|
17
|
-
get(exportResourceId: string): Promise<T.ExportsCreateResponse>;
|
|
18
|
-
/**
|
|
19
|
-
* @see https://docs.voucherify.io/reference/delete-export
|
|
20
|
-
*/
|
|
21
|
-
delete(exportResourceId: string): Promise<unknown>;
|
|
22
|
-
}
|
package/dist/Loyalties.d.ts
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Loyalties';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class Loyalties {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/list-loyalty-programs
|
|
8
|
-
*/
|
|
9
|
-
list(params?: T.LoyaltiesListParams): Promise<T.LoyaltiesListResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* @see https://docs.voucherify.io/reference/create-loyalty-program
|
|
12
|
-
*/
|
|
13
|
-
create(campaign: T.LoyaltiesCreateCampaign): Promise<T.LoyaltiesCreateCampaignResponse>;
|
|
14
|
-
/**
|
|
15
|
-
* @see https://docs.voucherify.io/reference/get-loyalty-program
|
|
16
|
-
*/
|
|
17
|
-
get(campaignId: string): Promise<T.LoyaltiesCreateCampaignResponse>;
|
|
18
|
-
/**
|
|
19
|
-
* @see https://docs.voucherify.io/reference/update-loyalty-program
|
|
20
|
-
*/
|
|
21
|
-
update(campaign: T.LoyaltiesUpdateCampaign): Promise<T.LoyaltiesCreateCampaignResponse>;
|
|
22
|
-
/**
|
|
23
|
-
* @see https://docs.voucherify.io/reference/delete-loyalty-program
|
|
24
|
-
*/
|
|
25
|
-
delete(campaignId: string, params?: T.LoyaltiesDeleteCampaignParams): Promise<unknown>;
|
|
26
|
-
/**
|
|
27
|
-
* @see https://docs.voucherify.io/reference/list-reward-assignments-1
|
|
28
|
-
*/
|
|
29
|
-
listRewardAssignments(campaignId: string, params?: T.LoyaltiesListRewardAssignmentsParams): Promise<T.LoyaltiesListRewardAssignmentsResponse>;
|
|
30
|
-
/**
|
|
31
|
-
* @see https://docs.voucherify.io/reference/create-reward-assignment-1
|
|
32
|
-
*/
|
|
33
|
-
createRewardAssignments(campaignId: string, assignment: T.LoyaltiesCreateRewardAssignments[]): Promise<T.LoyaltiesCreateRewardAssignmentResponse[]>;
|
|
34
|
-
/**
|
|
35
|
-
* @see https://docs.voucherify.io/reference/update-reward-assignment-1
|
|
36
|
-
*/
|
|
37
|
-
updateRewardAssignment(campaignId: string, assignment: T.LoyaltiesUpdateRewardAssignment): Promise<T.LoyaltiesCreateRewardAssignmentResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* @see https://docs.voucherify.io/reference/delete-reward-assignment-1
|
|
40
|
-
*/
|
|
41
|
-
deleteRewardAssignment(campaignId: string, assignmentId: string): Promise<unknown>;
|
|
42
|
-
/**
|
|
43
|
-
* @see https://docs.voucherify.io/reference/get-reward-assignment-2
|
|
44
|
-
*/
|
|
45
|
-
getRewardAssignment(campaignId: string, assignmentId: string): Promise<import("./types").RewardAssignment>;
|
|
46
|
-
/**
|
|
47
|
-
* @see https://docs.voucherify.io/reference/list-earning-rules
|
|
48
|
-
*/
|
|
49
|
-
listEarningRules(campaignId: string, params?: T.LoyaltiesListEarningRulesParams): Promise<T.LoyaltiesListEarningRulesResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* @see https://docs.voucherify.io/reference/create-earning-rule
|
|
52
|
-
*/
|
|
53
|
-
createEarningRule(campaignId: string, earningRules: T.LoyaltiesCreateEarningRule[]): Promise<T.LoyaltiesEarningRulesResponse[]>;
|
|
54
|
-
/**
|
|
55
|
-
* @see https://docs.voucherify.io/reference/update-earning-rule
|
|
56
|
-
*/
|
|
57
|
-
updateEarningRule(campaignId: string, earningRule: T.LoyaltiesUpdateEarningRule): Promise<T.LoyaltiesEarningRulesResponse>;
|
|
58
|
-
/**
|
|
59
|
-
* @see https://docs.voucherify.io/reference/delete-earning-rule
|
|
60
|
-
*/
|
|
61
|
-
deleteEarningRule(campaignId: string, earningRuleId: string): Promise<unknown>;
|
|
62
|
-
/**
|
|
63
|
-
* @see https://docs.voucherify.io/reference/get-earning-rule
|
|
64
|
-
*/
|
|
65
|
-
getEarningRule(campaignId: string, earningRuleId: string): Promise<T.EarningRule>;
|
|
66
|
-
/**
|
|
67
|
-
* @see https://docs.voucherify.io/reference/enable-earning-rule
|
|
68
|
-
*/
|
|
69
|
-
enableEarningRule(campaignId: string, earningRuleId: string): Promise<T.LoyaltiesEnableEarningRulesResponseBody>;
|
|
70
|
-
/**
|
|
71
|
-
* @see https://docs.voucherify.io/reference/disable-earning-rule
|
|
72
|
-
*/
|
|
73
|
-
disableEarningRule(campaignId: string, earningRuleId: string): Promise<T.LoyaltiesDisableEarningRulesResponseBody>;
|
|
74
|
-
/**
|
|
75
|
-
* @see https://docs.voucherify.io/reference/list-members
|
|
76
|
-
*/
|
|
77
|
-
listMembers(campaignId: string, params?: T.LoyaltiesListMembersParams): Promise<T.LoyaltiesListMembersResponse>;
|
|
78
|
-
/**
|
|
79
|
-
* @see https://docs.voucherify.io/reference/create-member
|
|
80
|
-
*/
|
|
81
|
-
createMember(campaignId: string, member: T.LoyaltiesCreateMember): Promise<T.LoyaltiesVoucherResponse>;
|
|
82
|
-
/**
|
|
83
|
-
* @see https://docs.voucherify.io/reference/get-member
|
|
84
|
-
* @see https://docs.voucherify.io/reference/get-member-1
|
|
85
|
-
*/
|
|
86
|
-
getMember(campaignId: string | null, memberId: string): Promise<T.LoyaltiesVoucherResponse>;
|
|
87
|
-
/**
|
|
88
|
-
* @see https://docs.voucherify.io/reference/list-member-activity
|
|
89
|
-
* @see https://docs.voucherify.io/reference/list-member-activity-1
|
|
90
|
-
*/
|
|
91
|
-
listMemberActivity(campaignId: string | null, memberId: string, params?: T.LoyaltiesListMemberActivityParams): Promise<T.LoyaltiesListMemberActivityResponse>;
|
|
92
|
-
/**
|
|
93
|
-
* @deprecated This method is deprecated in favor of the `listMemberActivity` method. We’re removing this method in next major version.
|
|
94
|
-
*/
|
|
95
|
-
getMemberActivities(campaignId: string | null, memberId: string): Promise<T.LoyaltiesGetMemberActivitiesResponse>;
|
|
96
|
-
/**
|
|
97
|
-
* @see https://docs.voucherify.io/reference/list-member-rewards
|
|
98
|
-
*/
|
|
99
|
-
listMemberRewards(memberId: string, params?: T.LoyaltiesListMemberRewardsRequestQuery): Promise<T.LoyaltiesListMemberRewardsResponseBody>;
|
|
100
|
-
/**
|
|
101
|
-
* @see https://docs.voucherify.io/reference/add-remove-loyalty-card-balance
|
|
102
|
-
* @see https://docs.voucherify.io/reference/add-remove-loyalty-card-balance-1
|
|
103
|
-
*/
|
|
104
|
-
addOrRemoveCardBalance(memberId: string, balance: T.LoyaltiesAddOrRemoveCardBalanceRequestBody, campaignId?: string): Promise<T.LoyaltiesAddOrRemoveCardBalanceResponseBody>;
|
|
105
|
-
/**
|
|
106
|
-
* @see https://docs.voucherify.io/reference/add-remove-loyalty-card-balance-1
|
|
107
|
-
*/
|
|
108
|
-
addPoints(campaignId: string, memberId: string, balance: T.LoyaltiesAddPoints): Promise<T.LoyaltiesAddPointsResponse>;
|
|
109
|
-
/**
|
|
110
|
-
* @see https://docs.voucherify.io/reference/transfer-points
|
|
111
|
-
*/
|
|
112
|
-
transferPoints(campaignId: string, memberId: string, loyaltiesTransferPoints: T.LoyaltiesTransferPointsRequestBody): Promise<T.LoyaltiesTransferPointsResponseBody>;
|
|
113
|
-
/**
|
|
114
|
-
* @see https://docs.voucherify.io/reference/get-points-expiration
|
|
115
|
-
*/
|
|
116
|
-
getPointsExpiration(campaignId: string, memberId: string, params?: T.LoyaltiesGetPointsExpirationRequestQuery): Promise<T.LoyaltiesGetPointsExpirationResponseBody>;
|
|
117
|
-
/**
|
|
118
|
-
* @see https://docs.voucherify.io/reference/redeem-loyalty-card
|
|
119
|
-
*/
|
|
120
|
-
redeemReward(campaignId: string, memberId: string, params: T.LoyaltiesRedeemRewardParams): Promise<T.LoyaltiesRedeemRewardResponse>;
|
|
121
|
-
/**
|
|
122
|
-
* @see https://docs.voucherify.io/reference/list-loyalty-tier-rewards
|
|
123
|
-
*/
|
|
124
|
-
listLoyaltyTierRewards(campaignId: string, tierId: string): Promise<T.LoyaltiesListLoyaltyTierRewardsResponseBody>;
|
|
125
|
-
/**
|
|
126
|
-
* @see https://docs.voucherify.io/reference/list-loyalty-card-transactions
|
|
127
|
-
* @see https://docs.voucherify.io/reference/list-loyalty-card-transactions-1
|
|
128
|
-
*/
|
|
129
|
-
listCardTransactions(memberId: string, campaignId: string | null, params?: T.LoyaltiesListCardTransactionsRequestQuery): Promise<T.LoyaltiesListCardTransactionsResponseBody>;
|
|
130
|
-
/**
|
|
131
|
-
* @see https://docs.voucherify.io/reference/export-loyalty-card-transactions
|
|
132
|
-
* @see https://docs.voucherify.io/reference/export-loyalty-card-transactions-1
|
|
133
|
-
*/
|
|
134
|
-
exportCardTransactions(memberId: string, campaignId: string | null, params?: T.LoyaltiesExportCardTransactionsRequestBody): Promise<import("./types").VouchersExportTransactionsResponseBody>;
|
|
135
|
-
/**
|
|
136
|
-
* @see https://docs.voucherify.io/reference/get-reward-details
|
|
137
|
-
*/
|
|
138
|
-
getRewardDetails(campaignId: string, assignmentId: string): Promise<import("./types").Reward>;
|
|
139
|
-
/**
|
|
140
|
-
* @see https://docs.voucherify.io/reference/list-loyalty-tiers
|
|
141
|
-
*/
|
|
142
|
-
listTiers(campaignId: string, params?: T.LoyaltiesListTiersRequestQuery): Promise<T.LoyaltiesListTiersResponseBody>;
|
|
143
|
-
/**
|
|
144
|
-
* @see https://docs.voucherify.io/reference/get-loyalty-tier
|
|
145
|
-
*/
|
|
146
|
-
getTier(campaignId: string, tierId: string): Promise<T.LoyaltyTier>;
|
|
147
|
-
/**
|
|
148
|
-
* @see https://docs.voucherify.io/reference/create-loyalty-tiers
|
|
149
|
-
*/
|
|
150
|
-
createTiers(campaignId: string, tiers: T.LoyaltiesCreateTiersRequestBody): Promise<T.LoyaltiesCreateTiersResponseBody>;
|
|
151
|
-
/**
|
|
152
|
-
* @see https://docs.voucherify.io/reference/list-loyalty-tier-earning-rules
|
|
153
|
-
*/
|
|
154
|
-
listLoyaltyTierEarningRules(campaignId: string, tierId: string, params?: T.LoyaltiesListLoyaltyTierEarningRulesRequestQuery): Promise<T.LoyaltiesListLoyaltyTierEarningRulesResponseBody>;
|
|
155
|
-
/**
|
|
156
|
-
* @see https://docs.voucherify.io/reference/get-member-loyalty-tier
|
|
157
|
-
*/
|
|
158
|
-
listMemberLoyaltyTiers(memberId: string): Promise<T.LoyaltiesListMemberLoyaltyTiersResponseBody>;
|
|
159
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as T from './types/MetadataSchemas';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class MetadataSchemas {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/list-metadata-schemas
|
|
8
|
-
*/
|
|
9
|
-
list(): Promise<T.MetadataSchemasListResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* @see https://docs.voucherify.io/reference/get-metadata-schema
|
|
12
|
-
*/
|
|
13
|
-
get(schemaName: string): Promise<T.MetadataSchema>;
|
|
14
|
-
}
|
package/dist/Orders.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Orders';
|
|
2
|
-
import * as AAT from './types/AsyncActions';
|
|
3
|
-
import type { RequestController } from './RequestController';
|
|
4
|
-
export declare class Orders {
|
|
5
|
-
private client;
|
|
6
|
-
constructor(client: RequestController);
|
|
7
|
-
/**
|
|
8
|
-
* @see https://docs.voucherify.io/reference/create-order
|
|
9
|
-
*/
|
|
10
|
-
create(order: T.OrdersCreate): Promise<T.OrdersCreateResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* @see https://docs.voucherify.io/reference/get-order
|
|
13
|
-
*/
|
|
14
|
-
get(orderId: string): Promise<T.OrdersCreateResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* @see https://docs.voucherify.io/reference/update-order
|
|
17
|
-
*/
|
|
18
|
-
update(order: T.OrdersUpdate): Promise<T.OrdersCreateResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* @see https://docs.voucherify.io/reference/list-orders
|
|
21
|
-
*/
|
|
22
|
-
list(params?: T.OrdersListParams): Promise<T.OrdersListResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* @see https://docs.voucherify.io/reference/import-orders
|
|
25
|
-
*/
|
|
26
|
-
import(orders: T.OrdersCreate[]): Promise<AAT.AsyncActionCreateResponse>;
|
|
27
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as T from './types/ProductCollections';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class ProductCollections {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/create-product-collection
|
|
8
|
-
*/
|
|
9
|
-
create(productCollection: T.ProductCollectionsCreateRequestBody): Promise<T.ProductCollectionsCreateResponseBody>;
|
|
10
|
-
/**
|
|
11
|
-
* @see https://docs.voucherify.io/reference/list-product-collections
|
|
12
|
-
*/
|
|
13
|
-
list(params?: T.ProductCollectionsListRequestQuery): Promise<T.ProductCollectionsListResponseBody>;
|
|
14
|
-
/**
|
|
15
|
-
* @see https://docs.voucherify.io/reference/delete-product-collection
|
|
16
|
-
*/
|
|
17
|
-
delete(productCollectionId: string): Promise<{}>;
|
|
18
|
-
/**
|
|
19
|
-
* @see https://docs.voucherify.io/reference/get-product-collection
|
|
20
|
-
*/
|
|
21
|
-
get(productCollectionId: string): Promise<Required<T.StaticProductCollectionBase & T.ProductCollectionIdentity & T.ProductCollectionSaved> | Required<T.DynamicProductCollectionBase & T.ProductCollectionIdentity & T.ProductCollectionSaved>>;
|
|
22
|
-
/**
|
|
23
|
-
* @see https://docs.voucherify.io/reference/list-products-in-collection
|
|
24
|
-
*/
|
|
25
|
-
listProducts(productCollectionId: string, params?: T.ProductCollectionsListProductsRequestQuery): Promise<T.ProductCollectionsListProductsResponseBody>;
|
|
26
|
-
}
|
package/dist/Products.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as T from './types/Products';
|
|
2
|
-
import * as AAT from './types/AsyncActions';
|
|
3
|
-
import type { RequestController } from './RequestController';
|
|
4
|
-
export declare class Products {
|
|
5
|
-
private client;
|
|
6
|
-
constructor(client: RequestController);
|
|
7
|
-
/**
|
|
8
|
-
* @see https://docs.voucherify.io/reference/create-product
|
|
9
|
-
*/
|
|
10
|
-
create(product: T.ProductsCreate): Promise<T.ProductsCreateResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* @see https://docs.voucherify.io/reference/get-product
|
|
13
|
-
*/
|
|
14
|
-
get(productId: string): Promise<T.ProductsGetResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* @see https://docs.voucherify.io/reference/update-product
|
|
17
|
-
*/
|
|
18
|
-
update(product: T.ProductsUpdate): Promise<T.ProductsCreateResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* @see https://docs.voucherify.io/reference/async-update-products-metadata-in-bulk
|
|
21
|
-
*/
|
|
22
|
-
bulkUpdateMetadata(products: T.ProductsBulkUpdateMetadata): Promise<T.ProductsBulkUpdateMetadataResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* @see https://docs.voucherify.io/reference/post-products-in-bulk
|
|
25
|
-
*/
|
|
26
|
-
bulkUpdate(products: T.ProductsBulkUpdate): Promise<T.ProductsBulkUpdateResponse>;
|
|
27
|
-
/**
|
|
28
|
-
* @see https://docs.voucherify.io/reference/delete-product
|
|
29
|
-
*/
|
|
30
|
-
delete(productId: string, params?: T.ProductsDeleteParams): Promise<unknown>;
|
|
31
|
-
/**
|
|
32
|
-
* @see https://docs.voucherify.io/reference/list-products
|
|
33
|
-
*/
|
|
34
|
-
list(params?: T.ProductsListParams): Promise<T.ProductsListResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* @see https://docs.voucherify.io/reference/create-sku
|
|
37
|
-
*/
|
|
38
|
-
createSku(productId: string, sku: T.ProductsCreateSku): Promise<T.ProductsCreateSkuResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* @see https://docs.voucherify.io/reference/get-sku-v20210726
|
|
41
|
-
*/
|
|
42
|
-
getSku(skuId: string): Promise<T.ProductsCreateSkuResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* @see https://docs.voucherify.io/reference/update-sku
|
|
45
|
-
*/
|
|
46
|
-
updateSku(productId: string, sku: T.ProductsUpdateSku): Promise<T.ProductsCreateSkuResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* @see https://docs.voucherify.io/reference/delete-sku
|
|
49
|
-
*/
|
|
50
|
-
deleteSku(productId: string, skuId: string, params?: T.ProductsDeleteSkuParams): Promise<unknown>;
|
|
51
|
-
/**
|
|
52
|
-
* @see https://docs.voucherify.io/reference/list-skus
|
|
53
|
-
*/
|
|
54
|
-
listSkus(productId: string): Promise<T.ProductsListSkus>;
|
|
55
|
-
/**
|
|
56
|
-
* @see https://docs.voucherify.io/reference/import-skus-using-csv
|
|
57
|
-
*/
|
|
58
|
-
importSkusCSV(filePath: string): Promise<AAT.AsyncActionCreateResponse>;
|
|
59
|
-
/**
|
|
60
|
-
* @see https://docs.voucherify.io/reference/import-products-using-csv
|
|
61
|
-
*/
|
|
62
|
-
importCSV(filePath: string): Promise<AAT.AsyncActionCreateResponse>;
|
|
63
|
-
}
|
package/dist/PromotionTiers.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as T from './types/PromotionTiers';
|
|
2
|
-
import type { RequestController } from './RequestController';
|
|
3
|
-
export declare class PromotionTiers {
|
|
4
|
-
private client;
|
|
5
|
-
constructor(client: RequestController);
|
|
6
|
-
/**
|
|
7
|
-
* @see https://docs.voucherify.io/reference/list-promotion-tiers
|
|
8
|
-
*/
|
|
9
|
-
listAll(params?: T.PromotionTiersListAllParams): Promise<T.PromotionTiersListAllResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* @see https://docs.voucherify.io/reference/get-promotions
|
|
12
|
-
*/
|
|
13
|
-
list(promotionId: string): Promise<T.PromotionTiersListAllResponse>;
|
|
14
|
-
/**
|
|
15
|
-
* @see https://docs.voucherify.io/reference/get-promotion-tier
|
|
16
|
-
*/
|
|
17
|
-
get(tierId: string): Promise<T.PromotionTier>;
|
|
18
|
-
/**
|
|
19
|
-
* @see https://docs.voucherify.io/reference/add-promotion-tier-to-campaign
|
|
20
|
-
*/
|
|
21
|
-
create(promotionId: string, params: T.PromotionTiersCreateParams): Promise<T.PromotionTier>;
|
|
22
|
-
/**
|
|
23
|
-
* @see https://docs.voucherify.io/reference/redeem-promotion
|
|
24
|
-
*/
|
|
25
|
-
redeem(promotionsTierId: string, params: T.PromotionTiersRedeemParams): Promise<T.PromotionTiersRedeemResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* @see https://docs.voucherify.io/reference/update-promotion
|
|
28
|
-
*/
|
|
29
|
-
update(params: T.PromotionTiersUpdateParams): Promise<T.PromotionTier>;
|
|
30
|
-
/**
|
|
31
|
-
* @see https://docs.voucherify.io/reference/delete-promotion
|
|
32
|
-
*/
|
|
33
|
-
delete(promotionsTierId: string): Promise<unknown>;
|
|
34
|
-
}
|