@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
|
@@ -35,6 +35,8 @@ import { CreatePolicyVoucherResponseClass } from '../models';
|
|
|
35
35
|
// @ts-ignore
|
|
36
36
|
import { GetPolicyVoucherResponseClass } from '../models';
|
|
37
37
|
// @ts-ignore
|
|
38
|
+
import { ListPolicyVoucherTransactionsResponseClass } from '../models';
|
|
39
|
+
// @ts-ignore
|
|
38
40
|
import { ListPolicyVouchersResponseClass } from '../models';
|
|
39
41
|
// @ts-ignore
|
|
40
42
|
import { RedeemPolicyVoucherRequestDto } from '../models';
|
|
@@ -83,8 +85,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
83
85
|
// http bearer authentication required
|
|
84
86
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
85
87
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
89
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
90
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
91
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
92
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
93
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
94
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
|
|
@@ -130,8 +137,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
130
137
|
// http bearer authentication required
|
|
131
138
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
132
139
|
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
141
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
142
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
143
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
144
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
145
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
146
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
135
147
|
}
|
|
136
148
|
|
|
137
149
|
|
|
@@ -177,8 +189,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
177
189
|
// http bearer authentication required
|
|
178
190
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
179
191
|
|
|
180
|
-
|
|
181
|
-
|
|
192
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
193
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
194
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
195
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
196
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
197
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
198
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
182
199
|
}
|
|
183
200
|
|
|
184
201
|
|
|
@@ -225,8 +242,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
225
242
|
// http bearer authentication required
|
|
226
243
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
227
244
|
|
|
228
|
-
|
|
229
|
-
|
|
245
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
246
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
247
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
248
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
249
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
250
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
251
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
230
252
|
}
|
|
231
253
|
|
|
232
254
|
|
|
@@ -275,8 +297,94 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
275
297
|
localVarQueryParameter['expand'] = expand;
|
|
276
298
|
}
|
|
277
299
|
|
|
278
|
-
|
|
279
|
-
|
|
300
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
301
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
302
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
303
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
304
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
305
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
306
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
312
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
313
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
314
|
+
|
|
315
|
+
return {
|
|
316
|
+
url: toPathString(localVarUrlObj),
|
|
317
|
+
options: localVarRequestOptions,
|
|
318
|
+
};
|
|
319
|
+
},
|
|
320
|
+
/**
|
|
321
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
322
|
+
* @summary List policy voucher transactions
|
|
323
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
324
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
325
|
+
* @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.
|
|
326
|
+
* @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>
|
|
327
|
+
* @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>
|
|
328
|
+
* @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>
|
|
329
|
+
* @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/>
|
|
330
|
+
* @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>
|
|
331
|
+
* @param {*} [options] Override http request option.
|
|
332
|
+
* @throws {RequiredError}
|
|
333
|
+
*/
|
|
334
|
+
listPolicyVoucherTransactions: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
335
|
+
const localVarPath = `/discountservice/v1/policy-voucher-transactions`;
|
|
336
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
337
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
338
|
+
let baseOptions;
|
|
339
|
+
let baseAccessToken;
|
|
340
|
+
if (configuration) {
|
|
341
|
+
baseOptions = configuration.baseOptions;
|
|
342
|
+
baseAccessToken = configuration.accessToken;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
346
|
+
const localVarHeaderParameter = {} as any;
|
|
347
|
+
const localVarQueryParameter = {} as any;
|
|
348
|
+
|
|
349
|
+
// authentication bearer required
|
|
350
|
+
// http bearer authentication required
|
|
351
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
352
|
+
|
|
353
|
+
if (pageSize !== undefined) {
|
|
354
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (pageToken !== undefined) {
|
|
358
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (filter !== undefined) {
|
|
362
|
+
localVarQueryParameter['filter'] = filter;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
if (search !== undefined) {
|
|
366
|
+
localVarQueryParameter['search'] = search;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (order !== undefined) {
|
|
370
|
+
localVarQueryParameter['order'] = order;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (expand !== undefined) {
|
|
374
|
+
localVarQueryParameter['expand'] = expand;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (filters !== undefined) {
|
|
378
|
+
localVarQueryParameter['filters'] = filters;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
382
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
383
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
384
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
385
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
386
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
387
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
280
388
|
}
|
|
281
389
|
|
|
282
390
|
|
|
@@ -351,8 +459,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
351
459
|
localVarQueryParameter['filters'] = filters;
|
|
352
460
|
}
|
|
353
461
|
|
|
354
|
-
|
|
355
|
-
|
|
462
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
463
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
464
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
465
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
466
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
467
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
468
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
356
469
|
}
|
|
357
470
|
|
|
358
471
|
|
|
@@ -395,8 +508,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
395
508
|
// http bearer authentication required
|
|
396
509
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
397
510
|
|
|
398
|
-
|
|
399
|
-
|
|
511
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
512
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
513
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
514
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
515
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
516
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
517
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
400
518
|
}
|
|
401
519
|
|
|
402
520
|
|
|
@@ -442,8 +560,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
442
560
|
// http bearer authentication required
|
|
443
561
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
444
562
|
|
|
445
|
-
|
|
446
|
-
|
|
563
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
564
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
565
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
566
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
567
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
568
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
569
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
447
570
|
}
|
|
448
571
|
|
|
449
572
|
|
|
@@ -531,6 +654,24 @@ export const PolicyVouchersApiFp = function(configuration?: Configuration) {
|
|
|
531
654
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicyVoucher(code, authorization, expand, options);
|
|
532
655
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
533
656
|
},
|
|
657
|
+
/**
|
|
658
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
659
|
+
* @summary List policy voucher transactions
|
|
660
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
661
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
662
|
+
* @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.
|
|
663
|
+
* @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>
|
|
664
|
+
* @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>
|
|
665
|
+
* @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>
|
|
666
|
+
* @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/>
|
|
667
|
+
* @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>
|
|
668
|
+
* @param {*} [options] Override http request option.
|
|
669
|
+
* @throws {RequiredError}
|
|
670
|
+
*/
|
|
671
|
+
async 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>> {
|
|
672
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicyVoucherTransactions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
673
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
674
|
+
},
|
|
534
675
|
/**
|
|
535
676
|
* 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.
|
|
536
677
|
* @summary List policy vouchers
|
|
@@ -639,6 +780,23 @@ export const PolicyVouchersApiFactory = function (configuration?: Configuration,
|
|
|
639
780
|
getPolicyVoucher(code: string, authorization?: string, expand?: 'transactions' | 'campaign' | 'voucher', options?: any): AxiosPromise<GetPolicyVoucherResponseClass> {
|
|
640
781
|
return localVarFp.getPolicyVoucher(code, authorization, expand, options).then((request) => request(axios, basePath));
|
|
641
782
|
},
|
|
783
|
+
/**
|
|
784
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
785
|
+
* @summary List policy voucher transactions
|
|
786
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
787
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
788
|
+
* @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.
|
|
789
|
+
* @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>
|
|
790
|
+
* @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>
|
|
791
|
+
* @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>
|
|
792
|
+
* @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/>
|
|
793
|
+
* @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>
|
|
794
|
+
* @param {*} [options] Override http request option.
|
|
795
|
+
* @throws {RequiredError}
|
|
796
|
+
*/
|
|
797
|
+
listPolicyVoucherTransactions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPolicyVoucherTransactionsResponseClass> {
|
|
798
|
+
return localVarFp.listPolicyVoucherTransactions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
799
|
+
},
|
|
642
800
|
/**
|
|
643
801
|
* 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.
|
|
644
802
|
* @summary List policy vouchers
|
|
@@ -793,6 +951,69 @@ export interface PolicyVouchersApiGetPolicyVoucherRequest {
|
|
|
793
951
|
readonly expand?: 'transactions' | 'campaign' | 'voucher'
|
|
794
952
|
}
|
|
795
953
|
|
|
954
|
+
/**
|
|
955
|
+
* Request parameters for listPolicyVoucherTransactions operation in PolicyVouchersApi.
|
|
956
|
+
* @export
|
|
957
|
+
* @interface PolicyVouchersApiListPolicyVoucherTransactionsRequest
|
|
958
|
+
*/
|
|
959
|
+
export interface PolicyVouchersApiListPolicyVoucherTransactionsRequest {
|
|
960
|
+
/**
|
|
961
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
962
|
+
* @type {string}
|
|
963
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
964
|
+
*/
|
|
965
|
+
readonly authorization?: string
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
969
|
+
* @type {number}
|
|
970
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
971
|
+
*/
|
|
972
|
+
readonly pageSize?: number
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* 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.
|
|
976
|
+
* @type {string}
|
|
977
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
978
|
+
*/
|
|
979
|
+
readonly pageToken?: string
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* 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>
|
|
983
|
+
* @type {string}
|
|
984
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
985
|
+
*/
|
|
986
|
+
readonly filter?: string
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* 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>
|
|
990
|
+
* @type {string}
|
|
991
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
992
|
+
*/
|
|
993
|
+
readonly search?: string
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* 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>
|
|
997
|
+
* @type {string}
|
|
998
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
999
|
+
*/
|
|
1000
|
+
readonly order?: string
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* 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/>
|
|
1004
|
+
* @type {string}
|
|
1005
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
1006
|
+
*/
|
|
1007
|
+
readonly expand?: string
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* 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>
|
|
1011
|
+
* @type {string}
|
|
1012
|
+
* @memberof PolicyVouchersApiListPolicyVoucherTransactions
|
|
1013
|
+
*/
|
|
1014
|
+
readonly filters?: string
|
|
1015
|
+
}
|
|
1016
|
+
|
|
796
1017
|
/**
|
|
797
1018
|
* Request parameters for listPolicyVouchers operation in PolicyVouchersApi.
|
|
798
1019
|
* @export
|
|
@@ -914,7 +1135,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
914
1135
|
* @memberof PolicyVouchersApi
|
|
915
1136
|
*/
|
|
916
1137
|
public chargePolicyVoucher(requestParameters: PolicyVouchersApiChargePolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
917
|
-
return PolicyVouchersApiFp(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1138
|
+
return PolicyVouchersApiFp(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
918
1139
|
}
|
|
919
1140
|
|
|
920
1141
|
/**
|
|
@@ -926,7 +1147,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
926
1147
|
* @memberof PolicyVouchersApi
|
|
927
1148
|
*/
|
|
928
1149
|
public checkAccountEligibility(requestParameters: PolicyVouchersApiCheckAccountEligibilityRequest, options?: AxiosRequestConfig) {
|
|
929
|
-
return PolicyVouchersApiFp(this.configuration).checkAccountEligibility(requestParameters.checkAccountEligibilityRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1150
|
+
return PolicyVouchersApiFp(this.configuration).checkAccountEligibility(requestParameters.checkAccountEligibilityRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
930
1151
|
}
|
|
931
1152
|
|
|
932
1153
|
/**
|
|
@@ -938,7 +1159,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
938
1159
|
* @memberof PolicyVouchersApi
|
|
939
1160
|
*/
|
|
940
1161
|
public createPolicyVoucher(requestParameters: PolicyVouchersApiCreatePolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
941
|
-
return PolicyVouchersApiFp(this.configuration).createPolicyVoucher(requestParameters.createPolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1162
|
+
return PolicyVouchersApiFp(this.configuration).createPolicyVoucher(requestParameters.createPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
942
1163
|
}
|
|
943
1164
|
|
|
944
1165
|
/**
|
|
@@ -950,7 +1171,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
950
1171
|
* @memberof PolicyVouchersApi
|
|
951
1172
|
*/
|
|
952
1173
|
public deletePolicyVoucher(requestParameters: PolicyVouchersApiDeletePolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
953
|
-
return PolicyVouchersApiFp(this.configuration).deletePolicyVoucher(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1174
|
+
return PolicyVouchersApiFp(this.configuration).deletePolicyVoucher(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
954
1175
|
}
|
|
955
1176
|
|
|
956
1177
|
/**
|
|
@@ -962,7 +1183,19 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
962
1183
|
* @memberof PolicyVouchersApi
|
|
963
1184
|
*/
|
|
964
1185
|
public getPolicyVoucher(requestParameters: PolicyVouchersApiGetPolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
965
|
-
return PolicyVouchersApiFp(this.configuration).getPolicyVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
1186
|
+
return PolicyVouchersApiFp(this.configuration).getPolicyVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* Lists policy voucher transactions (charges, redemptions, withdrawals), e.g. filters=createdAt>=2026-10-01;createdAt<=2026-10-31
|
|
1191
|
+
* @summary List policy voucher transactions
|
|
1192
|
+
* @param {PolicyVouchersApiListPolicyVoucherTransactionsRequest} requestParameters Request parameters.
|
|
1193
|
+
* @param {*} [options] Override http request option.
|
|
1194
|
+
* @throws {RequiredError}
|
|
1195
|
+
* @memberof PolicyVouchersApi
|
|
1196
|
+
*/
|
|
1197
|
+
public listPolicyVoucherTransactions(requestParameters: PolicyVouchersApiListPolicyVoucherTransactionsRequest = {}, options?: AxiosRequestConfig) {
|
|
1198
|
+
return PolicyVouchersApiFp(this.configuration).listPolicyVoucherTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
966
1199
|
}
|
|
967
1200
|
|
|
968
1201
|
/**
|
|
@@ -974,7 +1207,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
974
1207
|
* @memberof PolicyVouchersApi
|
|
975
1208
|
*/
|
|
976
1209
|
public listPolicyVouchers(requestParameters: PolicyVouchersApiListPolicyVouchersRequest = {}, options?: AxiosRequestConfig) {
|
|
977
|
-
return PolicyVouchersApiFp(this.configuration).listPolicyVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
1210
|
+
return PolicyVouchersApiFp(this.configuration).listPolicyVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
978
1211
|
}
|
|
979
1212
|
|
|
980
1213
|
/**
|
|
@@ -986,7 +1219,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
986
1219
|
* @memberof PolicyVouchersApi
|
|
987
1220
|
*/
|
|
988
1221
|
public redeemPolicyVoucher(requestParameters: PolicyVouchersApiRedeemPolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
989
|
-
return PolicyVouchersApiFp(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1222
|
+
return PolicyVouchersApiFp(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
990
1223
|
}
|
|
991
1224
|
|
|
992
1225
|
/**
|
|
@@ -998,6 +1231,6 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
998
1231
|
* @memberof PolicyVouchersApi
|
|
999
1232
|
*/
|
|
1000
1233
|
public withdrawPolicyVoucher(requestParameters: PolicyVouchersApiWithdrawPolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
1001
|
-
return PolicyVouchersApiFp(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1234
|
+
return PolicyVouchersApiFp(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1002
1235
|
}
|
|
1003
1236
|
}
|
package/api/vouchers-api.ts
CHANGED
|
@@ -71,8 +71,13 @@ export const VouchersApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
71
71
|
// http bearer authentication required
|
|
72
72
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
75
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
76
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
77
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
78
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
79
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
80
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
|
|
@@ -119,8 +124,13 @@ export const VouchersApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
119
124
|
// http bearer authentication required
|
|
120
125
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
121
126
|
|
|
122
|
-
|
|
123
|
-
|
|
127
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
128
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
129
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
130
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
131
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
132
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
133
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
124
134
|
}
|
|
125
135
|
|
|
126
136
|
|
|
@@ -169,8 +179,13 @@ export const VouchersApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
169
179
|
localVarQueryParameter['expand'] = expand;
|
|
170
180
|
}
|
|
171
181
|
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
183
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
184
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
185
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
186
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
187
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
188
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
174
189
|
}
|
|
175
190
|
|
|
176
191
|
|
|
@@ -245,8 +260,13 @@ export const VouchersApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
245
260
|
localVarQueryParameter['filters'] = filters;
|
|
246
261
|
}
|
|
247
262
|
|
|
248
|
-
|
|
249
|
-
|
|
263
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
264
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
265
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
266
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
267
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
268
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
269
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
250
270
|
}
|
|
251
271
|
|
|
252
272
|
|
|
@@ -293,8 +313,13 @@ export const VouchersApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
293
313
|
// http bearer authentication required
|
|
294
314
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
295
315
|
|
|
296
|
-
|
|
297
|
-
|
|
316
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
317
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
318
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
319
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
320
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
321
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
322
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
298
323
|
}
|
|
299
324
|
|
|
300
325
|
|
|
@@ -642,7 +667,7 @@ export class VouchersApi extends BaseAPI {
|
|
|
642
667
|
* @memberof VouchersApi
|
|
643
668
|
*/
|
|
644
669
|
public createVoucher(requestParameters: VouchersApiCreateVoucherRequest, options?: AxiosRequestConfig) {
|
|
645
|
-
return VouchersApiFp(this.configuration).createVoucher(requestParameters.createVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
670
|
+
return VouchersApiFp(this.configuration).createVoucher(requestParameters.createVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
646
671
|
}
|
|
647
672
|
|
|
648
673
|
/**
|
|
@@ -654,7 +679,7 @@ export class VouchersApi extends BaseAPI {
|
|
|
654
679
|
* @memberof VouchersApi
|
|
655
680
|
*/
|
|
656
681
|
public deleteVoucher(requestParameters: VouchersApiDeleteVoucherRequest, options?: AxiosRequestConfig) {
|
|
657
|
-
return VouchersApiFp(this.configuration).deleteVoucher(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
682
|
+
return VouchersApiFp(this.configuration).deleteVoucher(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
658
683
|
}
|
|
659
684
|
|
|
660
685
|
/**
|
|
@@ -666,7 +691,7 @@ export class VouchersApi extends BaseAPI {
|
|
|
666
691
|
* @memberof VouchersApi
|
|
667
692
|
*/
|
|
668
693
|
public getVoucher(requestParameters: VouchersApiGetVoucherRequest, options?: AxiosRequestConfig) {
|
|
669
|
-
return VouchersApiFp(this.configuration).getVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
694
|
+
return VouchersApiFp(this.configuration).getVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
670
695
|
}
|
|
671
696
|
|
|
672
697
|
/**
|
|
@@ -678,7 +703,7 @@ export class VouchersApi extends BaseAPI {
|
|
|
678
703
|
* @memberof VouchersApi
|
|
679
704
|
*/
|
|
680
705
|
public listVouchers(requestParameters: VouchersApiListVouchersRequest = {}, options?: AxiosRequestConfig) {
|
|
681
|
-
return VouchersApiFp(this.configuration).listVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
706
|
+
return VouchersApiFp(this.configuration).listVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
682
707
|
}
|
|
683
708
|
|
|
684
709
|
/**
|
|
@@ -690,6 +715,6 @@ export class VouchersApi extends BaseAPI {
|
|
|
690
715
|
* @memberof VouchersApi
|
|
691
716
|
*/
|
|
692
717
|
public updateVoucher(requestParameters: VouchersApiUpdateVoucherRequest, options?: AxiosRequestConfig) {
|
|
693
|
-
return VouchersApiFp(this.configuration).updateVoucher(requestParameters.code, requestParameters.updateVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
718
|
+
return VouchersApiFp(this.configuration).updateVoucher(requestParameters.code, requestParameters.updateVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
694
719
|
}
|
|
695
720
|
}
|