@emilgroup/discount-sdk-node 1.12.1-beta.19 → 1.12.1-beta.20
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/.openapi-generator/FILES +1 -0
- package/README.md +2 -2
- package/api/campaigns-api.ts +88 -33
- package/api/health-api.ts +1 -1
- package/api/policy-vouchers-api.ts +257 -24
- package/api/vouchers-api.ts +40 -15
- package/base.ts +74 -6
- package/common.ts +3 -2
- package/dist/api/campaigns-api.d.ts +11 -11
- package/dist/api/campaigns-api.js +153 -85
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.js +1 -1
- package/dist/api/policy-vouchers-api.d.ts +118 -8
- package/dist/api/policy-vouchers-api.js +245 -62
- package/dist/api/vouchers-api.d.ts +5 -5
- package/dist/api/vouchers-api.js +67 -38
- package/dist/base.d.ts +8 -0
- package/dist/base.js +62 -4
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/list-policy-voucher-transactions-response-class.d.ts +43 -0
- package/dist/models/list-policy-voucher-transactions-response-class.js +15 -0
- package/models/index.ts +1 -0
- package/models/list-policy-voucher-transactions-response-class.ts +49 -0
- package/package.json +2 -2
|
@@ -19,6 +19,7 @@ import { CheckAccountEligibilityResponseClass } from '../models';
|
|
|
19
19
|
import { CreatePolicyVoucherRequestDto } from '../models';
|
|
20
20
|
import { CreatePolicyVoucherResponseClass } from '../models';
|
|
21
21
|
import { GetPolicyVoucherResponseClass } from '../models';
|
|
22
|
+
import { ListPolicyVoucherTransactionsResponseClass } from '../models';
|
|
22
23
|
import { ListPolicyVouchersResponseClass } from '../models';
|
|
23
24
|
import { RedeemPolicyVoucherRequestDto } from '../models';
|
|
24
25
|
import { RedeemPolicyVoucherResponseClass } from '../models';
|
|
@@ -75,6 +76,21 @@ export declare const PolicyVouchersApiAxiosParamCreator: (configuration?: Config
|
|
|
75
76
|
* @throws {RequiredError}
|
|
76
77
|
*/
|
|
77
78
|
getPolicyVoucher: (code: string, authorization?: string, expand?: 'transactions' | 'campaign' | 'voucher', options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
79
|
+
/**
|
|
80
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
81
|
+
* @summary List policy voucher transactions
|
|
82
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
83
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
84
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
85
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
86
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: invoiceNumber, policyNumber</i>
|
|
87
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, invoiceNumber, policyNumber</i>
|
|
88
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
89
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
*/
|
|
93
|
+
listPolicyVoucherTransactions: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
78
94
|
/**
|
|
79
95
|
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
80
96
|
* @summary List policy vouchers
|
|
@@ -160,6 +176,21 @@ export declare const PolicyVouchersApiFp: (configuration?: Configuration) => {
|
|
|
160
176
|
* @throws {RequiredError}
|
|
161
177
|
*/
|
|
162
178
|
getPolicyVoucher(code: string, authorization?: string, expand?: 'transactions' | 'campaign' | 'voucher', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyVoucherResponseClass>>;
|
|
179
|
+
/**
|
|
180
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
181
|
+
* @summary List policy voucher transactions
|
|
182
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
183
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
184
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
185
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
186
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: invoiceNumber, policyNumber</i>
|
|
187
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, invoiceNumber, policyNumber</i>
|
|
188
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
189
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
190
|
+
* @param {*} [options] Override http request option.
|
|
191
|
+
* @throws {RequiredError}
|
|
192
|
+
*/
|
|
193
|
+
listPolicyVoucherTransactions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPolicyVoucherTransactionsResponseClass>>;
|
|
163
194
|
/**
|
|
164
195
|
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
165
196
|
* @summary List policy vouchers
|
|
@@ -245,6 +276,21 @@ export declare const PolicyVouchersApiFactory: (configuration?: Configuration, b
|
|
|
245
276
|
* @throws {RequiredError}
|
|
246
277
|
*/
|
|
247
278
|
getPolicyVoucher(code: string, authorization?: string, expand?: 'transactions' | 'campaign' | 'voucher', options?: any): AxiosPromise<GetPolicyVoucherResponseClass>;
|
|
279
|
+
/**
|
|
280
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
281
|
+
* @summary List policy voucher transactions
|
|
282
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
283
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
284
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
285
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
286
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: invoiceNumber, policyNumber</i>
|
|
287
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, invoiceNumber, policyNumber</i>
|
|
288
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
289
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
290
|
+
* @param {*} [options] Override http request option.
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
*/
|
|
293
|
+
listPolicyVoucherTransactions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPolicyVoucherTransactionsResponseClass>;
|
|
248
294
|
/**
|
|
249
295
|
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
250
296
|
* @summary List policy vouchers
|
|
@@ -380,6 +426,61 @@ export interface PolicyVouchersApiGetPolicyVoucherRequest {
|
|
|
380
426
|
*/
|
|
381
427
|
readonly expand?: 'transactions' | 'campaign' | 'voucher';
|
|
382
428
|
}
|
|
429
|
+
/**
|
|
430
|
+
* Request parameters for listPolicyVoucherTransactions operation in PolicyVouchersApi.
|
|
431
|
+
* @export
|
|
432
|
+
* @interface PolicyVouchersApiListPolicyVoucherTransactionsRequest
|
|
433
|
+
*/
|
|
434
|
+
export interface PolicyVouchersApiListPolicyVoucherTransactionsRequest {
|
|
435
|
+
/**
|
|
436
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
437
|
+
* @type {string}
|
|
438
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
439
|
+
*/
|
|
440
|
+
readonly authorization?: string;
|
|
441
|
+
/**
|
|
442
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
443
|
+
* @type {number}
|
|
444
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
445
|
+
*/
|
|
446
|
+
readonly pageSize?: number;
|
|
447
|
+
/**
|
|
448
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
449
|
+
* @type {string}
|
|
450
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
451
|
+
*/
|
|
452
|
+
readonly pageToken?: string;
|
|
453
|
+
/**
|
|
454
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
455
|
+
* @type {string}
|
|
456
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
457
|
+
*/
|
|
458
|
+
readonly filter?: string;
|
|
459
|
+
/**
|
|
460
|
+
* Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: invoiceNumber, policyNumber</i>
|
|
461
|
+
* @type {string}
|
|
462
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
463
|
+
*/
|
|
464
|
+
readonly search?: string;
|
|
465
|
+
/**
|
|
466
|
+
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, invoiceNumber, policyNumber</i>
|
|
467
|
+
* @type {string}
|
|
468
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
469
|
+
*/
|
|
470
|
+
readonly order?: string;
|
|
471
|
+
/**
|
|
472
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
473
|
+
* @type {string}
|
|
474
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
475
|
+
*/
|
|
476
|
+
readonly expand?: string;
|
|
477
|
+
/**
|
|
478
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyVoucherId, invoiceNumber, policyNumber, createdAt</i>
|
|
479
|
+
* @type {string}
|
|
480
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
481
|
+
*/
|
|
482
|
+
readonly filters?: string;
|
|
483
|
+
}
|
|
383
484
|
/**
|
|
384
485
|
* Request parameters for listPolicyVouchers operation in PolicyVouchersApi.
|
|
385
486
|
* @export
|
|
@@ -488,7 +589,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
488
589
|
* @throws {RequiredError}
|
|
489
590
|
* @memberof PolicyVouchersApi
|
|
490
591
|
*/
|
|
491
|
-
chargePolicyVoucher(requestParameters: PolicyVouchersApiChargePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ChargePolicyVoucherResponseClass, any, {}>>;
|
|
592
|
+
chargePolicyVoucher(requestParameters: PolicyVouchersApiChargePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ChargePolicyVoucherResponseClass, any, {}, any>>;
|
|
492
593
|
/**
|
|
493
594
|
* This will check if the account is eligible for a specific voucher.
|
|
494
595
|
* @summary Checks the account eligibility.
|
|
@@ -497,7 +598,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
497
598
|
* @throws {RequiredError}
|
|
498
599
|
* @memberof PolicyVouchersApi
|
|
499
600
|
*/
|
|
500
|
-
checkAccountEligibility(requestParameters: PolicyVouchersApiCheckAccountEligibilityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CheckAccountEligibilityResponseClass, any, {}>>;
|
|
601
|
+
checkAccountEligibility(requestParameters: PolicyVouchersApiCheckAccountEligibilityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CheckAccountEligibilityResponseClass, any, {}, any>>;
|
|
501
602
|
/**
|
|
502
603
|
* This will create an policy voucher.
|
|
503
604
|
* @summary Create the policy voucher
|
|
@@ -506,7 +607,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
506
607
|
* @throws {RequiredError}
|
|
507
608
|
* @memberof PolicyVouchersApi
|
|
508
609
|
*/
|
|
509
|
-
createPolicyVoucher(requestParameters: PolicyVouchersApiCreatePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyVoucherResponseClass, any, {}>>;
|
|
610
|
+
createPolicyVoucher(requestParameters: PolicyVouchersApiCreatePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyVoucherResponseClass, any, {}, any>>;
|
|
510
611
|
/**
|
|
511
612
|
* This will delete an policy voucher.
|
|
512
613
|
* @summary Delete the policy voucher
|
|
@@ -515,7 +616,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
515
616
|
* @throws {RequiredError}
|
|
516
617
|
* @memberof PolicyVouchersApi
|
|
517
618
|
*/
|
|
518
|
-
deletePolicyVoucher(requestParameters: PolicyVouchersApiDeletePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
619
|
+
deletePolicyVoucher(requestParameters: PolicyVouchersApiDeletePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
|
|
519
620
|
/**
|
|
520
621
|
* This will get an policy voucher.
|
|
521
622
|
* @summary Retrieve the policy voucher
|
|
@@ -524,7 +625,16 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
524
625
|
* @throws {RequiredError}
|
|
525
626
|
* @memberof PolicyVouchersApi
|
|
526
627
|
*/
|
|
527
|
-
getPolicyVoucher(requestParameters: PolicyVouchersApiGetPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPolicyVoucherResponseClass, any, {}>>;
|
|
628
|
+
getPolicyVoucher(requestParameters: PolicyVouchersApiGetPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPolicyVoucherResponseClass, any, {}, any>>;
|
|
629
|
+
/**
|
|
630
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
631
|
+
* @summary List policy voucher transactions
|
|
632
|
+
* @param {PolicyVouchersApiListPolicyVoucherTransactionsRequest} requestParameters Request parameters.
|
|
633
|
+
* @param {*} [options] Override http request option.
|
|
634
|
+
* @throws {RequiredError}
|
|
635
|
+
* @memberof PolicyVouchersApi
|
|
636
|
+
*/
|
|
637
|
+
listPolicyVoucherTransactions(requestParameters?: PolicyVouchersApiListPolicyVoucherTransactionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPolicyVoucherTransactionsResponseClass, any, {}, any>>;
|
|
528
638
|
/**
|
|
529
639
|
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
530
640
|
* @summary List policy vouchers
|
|
@@ -533,7 +643,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
533
643
|
* @throws {RequiredError}
|
|
534
644
|
* @memberof PolicyVouchersApi
|
|
535
645
|
*/
|
|
536
|
-
listPolicyVouchers(requestParameters?: PolicyVouchersApiListPolicyVouchersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPolicyVouchersResponseClass, any, {}>>;
|
|
646
|
+
listPolicyVouchers(requestParameters?: PolicyVouchersApiListPolicyVouchersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPolicyVouchersResponseClass, any, {}, any>>;
|
|
537
647
|
/**
|
|
538
648
|
* This will redeem the policy voucher.
|
|
539
649
|
* @summary Redeems the policy voucher.
|
|
@@ -542,7 +652,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
542
652
|
* @throws {RequiredError}
|
|
543
653
|
* @memberof PolicyVouchersApi
|
|
544
654
|
*/
|
|
545
|
-
redeemPolicyVoucher(requestParameters: PolicyVouchersApiRedeemPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RedeemPolicyVoucherResponseClass, any, {}>>;
|
|
655
|
+
redeemPolicyVoucher(requestParameters: PolicyVouchersApiRedeemPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RedeemPolicyVoucherResponseClass, any, {}, any>>;
|
|
546
656
|
/**
|
|
547
657
|
* This will withdraw the policy voucher.
|
|
548
658
|
* @summary Withdraws the policy voucher.
|
|
@@ -551,5 +661,5 @@ export declare class PolicyVouchersApi extends BaseAPI {
|
|
|
551
661
|
* @throws {RequiredError}
|
|
552
662
|
* @memberof PolicyVouchersApi
|
|
553
663
|
*/
|
|
554
|
-
withdrawPolicyVoucher(requestParameters: PolicyVouchersApiWithdrawPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WithdrawPolicyVoucherResponseClass, any, {}>>;
|
|
664
|
+
withdrawPolicyVoucher(requestParameters: PolicyVouchersApiWithdrawPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WithdrawPolicyVoucherResponseClass, any, {}, any>>;
|
|
555
665
|
}
|