@emilgroup/billing-sdk 1.63.1-beta.17 → 1.63.1-beta.18

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.
@@ -12,6 +12,7 @@ api/invoices-api.ts
12
12
  api/policy-billing-api.ts
13
13
  api/recurring-invoices-api.ts
14
14
  api/termination-invoices-api.ts
15
+ api/withdraw-invoices-api.ts
15
16
  base.ts
16
17
  common.ts
17
18
  configuration.ts
@@ -36,6 +37,8 @@ models/create-policy-billing-response-class.ts
36
37
  models/create-product-estimated-invoice-request-dto.ts
37
38
  models/create-product-estimated-invoice-response-class.ts
38
39
  models/create-termination-invoice-request-dto.ts
40
+ models/create-withdraw-invoice-request-dto-rest.ts
41
+ models/create-withdraw-invoice-request-dto.ts
39
42
  models/get-invoice-response-class.ts
40
43
  models/index.ts
41
44
  models/inline-response200.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/billing-sdk@1.63.1-beta.17 --save
20
+ npm install @emilgroup/billing-sdk@1.63.1-beta.18 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/billing-sdk@1.63.1-beta.17
24
+ yarn add @emilgroup/billing-sdk@1.63.1-beta.18
25
25
  ```
26
26
 
27
27
  And then you can import `InvoicesApi`.
@@ -146,11 +146,11 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
146
146
  * @param {string} [authorization] Bearer Token
147
147
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
148
148
  * @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.
149
- * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
149
+ * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
150
150
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
151
151
  * @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: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp</i>
152
152
  * @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/> <i>Allowed values: statuses, payments, invoiceItems<i>
153
- * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
153
+ * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
154
154
  * @param {*} [options] Override http request option.
155
155
  * @throws {RequiredError}
156
156
  */
@@ -335,11 +335,11 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
335
335
  * @param {string} [authorization] Bearer Token
336
336
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
337
337
  * @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.
338
- * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
338
+ * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
339
339
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
340
340
  * @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: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp</i>
341
341
  * @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/> <i>Allowed values: statuses, payments, invoiceItems<i>
342
- * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
342
+ * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
343
343
  * @param {*} [options] Override http request option.
344
344
  * @throws {RequiredError}
345
345
  */
@@ -406,11 +406,11 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
406
406
  * @param {string} [authorization] Bearer Token
407
407
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
408
408
  * @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.
409
- * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
409
+ * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
410
410
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
411
411
  * @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: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp</i>
412
412
  * @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/> <i>Allowed values: statuses, payments, invoiceItems<i>
413
- * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
413
+ * @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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
414
414
  * @param {*} [options] Override http request option.
415
415
  * @throws {RequiredError}
416
416
  */
@@ -522,7 +522,7 @@ export interface InvoicesApiListInvoicesRequest {
522
522
  readonly pageToken?: string
523
523
 
524
524
  /**
525
- * 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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
525
+ * 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: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
526
526
  * @type {string}
527
527
  * @memberof InvoicesApiListInvoices
528
528
  */
@@ -550,7 +550,7 @@ export interface InvoicesApiListInvoicesRequest {
550
550
  readonly expand?: string
551
551
 
552
552
  /**
553
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
553
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
554
554
  * @type {string}
555
555
  * @memberof InvoicesApiListInvoices
556
556
  */
@@ -0,0 +1,179 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL BillingService
5
+ * The EMIL BillingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateInvoiceResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { CreateWithdrawInvoiceRequestDtoRest } from '../models';
27
+ /**
28
+ * WithdrawInvoicesApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const WithdrawInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
35
+ * @summary Create the Withdraw invoice
36
+ * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
37
+ * @param {string} [authorization] Bearer Token
38
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ createWithdrawInvoice: async (createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
+ // verify required parameter 'createWithdrawInvoiceRequestDtoRest' is not null or undefined
44
+ assertParamExists('createWithdrawInvoice', 'createWithdrawInvoiceRequestDtoRest', createWithdrawInvoiceRequestDtoRest)
45
+ const localVarPath = `/billingservice/v1/withdraw-invoices`;
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ let baseAccessToken;
50
+ if (configuration) {
51
+ baseOptions = configuration.baseOptions;
52
+ baseAccessToken = configuration.accessToken;
53
+ }
54
+
55
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
56
+ const localVarHeaderParameter = {} as any;
57
+ const localVarQueryParameter = {} as any;
58
+
59
+ // authentication bearer required
60
+ // http bearer authentication required
61
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
62
+
63
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
64
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
65
+ }
66
+
67
+ if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
68
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
69
+ }
70
+
71
+
72
+
73
+ localVarHeaderParameter['Content-Type'] = 'application/json';
74
+
75
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
76
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
77
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
78
+ localVarRequestOptions.data = serializeDataIfNeeded(createWithdrawInvoiceRequestDtoRest, localVarRequestOptions, configuration)
79
+
80
+ return {
81
+ url: toPathString(localVarUrlObj),
82
+ options: localVarRequestOptions,
83
+ };
84
+ },
85
+ }
86
+ };
87
+
88
+ /**
89
+ * WithdrawInvoicesApi - functional programming interface
90
+ * @export
91
+ */
92
+ export const WithdrawInvoicesApiFp = function(configuration?: Configuration) {
93
+ const localVarAxiosParamCreator = WithdrawInvoicesApiAxiosParamCreator(configuration)
94
+ return {
95
+ /**
96
+ * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
97
+ * @summary Create the Withdraw invoice
98
+ * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
99
+ * @param {string} [authorization] Bearer Token
100
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ async createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
105
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options);
106
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
107
+ },
108
+ }
109
+ };
110
+
111
+ /**
112
+ * WithdrawInvoicesApi - factory interface
113
+ * @export
114
+ */
115
+ export const WithdrawInvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
116
+ const localVarFp = WithdrawInvoicesApiFp(configuration)
117
+ return {
118
+ /**
119
+ * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
120
+ * @summary Create the Withdraw invoice
121
+ * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
122
+ * @param {string} [authorization] Bearer Token
123
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
124
+ * @param {*} [options] Override http request option.
125
+ * @throws {RequiredError}
126
+ */
127
+ createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
128
+ return localVarFp.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
129
+ },
130
+ };
131
+ };
132
+
133
+ /**
134
+ * Request parameters for createWithdrawInvoice operation in WithdrawInvoicesApi.
135
+ * @export
136
+ * @interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest
137
+ */
138
+ export interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest {
139
+ /**
140
+ *
141
+ * @type {CreateWithdrawInvoiceRequestDtoRest}
142
+ * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
143
+ */
144
+ readonly createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest
145
+
146
+ /**
147
+ * Bearer Token
148
+ * @type {string}
149
+ * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
150
+ */
151
+ readonly authorization?: string
152
+
153
+ /**
154
+ * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
155
+ * @type {string}
156
+ * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
157
+ */
158
+ readonly idempotencyKey?: string
159
+ }
160
+
161
+ /**
162
+ * WithdrawInvoicesApi - object-oriented interface
163
+ * @export
164
+ * @class WithdrawInvoicesApi
165
+ * @extends {BaseAPI}
166
+ */
167
+ export class WithdrawInvoicesApi extends BaseAPI {
168
+ /**
169
+ * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
170
+ * @summary Create the Withdraw invoice
171
+ * @param {WithdrawInvoicesApiCreateWithdrawInvoiceRequest} requestParameters Request parameters.
172
+ * @param {*} [options] Override http request option.
173
+ * @throws {RequiredError}
174
+ * @memberof WithdrawInvoicesApi
175
+ */
176
+ public createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig) {
177
+ return WithdrawInvoicesApiFp(this.configuration).createWithdrawInvoice(requestParameters.createWithdrawInvoiceRequestDtoRest, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
178
+ }
179
+ }
package/api.ts CHANGED
@@ -29,6 +29,7 @@ import { InvoicesApi } from './api';
29
29
  import { PolicyBillingApi } from './api';
30
30
  import { RecurringInvoicesApi } from './api';
31
31
  import { TerminationInvoicesApi } from './api';
32
+ import { WithdrawInvoicesApi } from './api';
32
33
 
33
34
 
34
35
  export * from './api/correction-invoices-api';
@@ -40,4 +41,5 @@ export * from './api/invoices-api';
40
41
  export * from './api/policy-billing-api';
41
42
  export * from './api/recurring-invoices-api';
42
43
  export * from './api/termination-invoices-api';
44
+ export * from './api/withdraw-invoices-api';
43
45
 
package/base.ts CHANGED
@@ -102,10 +102,14 @@ export class BaseAPI {
102
102
  this.configuration = configuration;
103
103
  this.basePath = configuration.basePath || this.basePath;
104
104
 
105
- // Use config token if provided, otherwise use tokenData token
106
- const configToken = this.configuration.accessToken;
107
- const storedToken = accessToken ? `Bearer ${accessToken}` : '';
108
- this.configuration.accessToken = configToken || storedToken;
105
+ if (configuration.cookieAuth) {
106
+ this.useCookieAuth();
107
+ } else {
108
+ // Use config token if provided, otherwise use tokenData token
109
+ const configToken = this.configuration.accessToken;
110
+ const storedToken = accessToken ? `Bearer ${accessToken}` : '';
111
+ this.configuration.accessToken = configToken || storedToken;
112
+ }
109
113
  } else {
110
114
  const { accessToken, username } = this.tokenData;
111
115
 
@@ -119,6 +123,12 @@ export class BaseAPI {
119
123
  this.attachInterceptor(axios);
120
124
  }
121
125
 
126
+ // Cookie mode: the browser sends the HttpOnly access cookie, so no token is read from storage.
127
+ private useCookieAuth() {
128
+ this.configuration.username = this.configuration.username || this.tokenData.username;
129
+ this.configuration.baseOptions = { ...this.configuration.baseOptions, withCredentials: true };
130
+ }
131
+
122
132
  selectEnvironment(env: Environment) {
123
133
  this.selectBasePath(env);
124
134
  }
@@ -152,10 +162,12 @@ export class BaseAPI {
152
162
  const { data: { accessToken, permissions } } = response;
153
163
 
154
164
  this.configuration.username = username;
155
- this.configuration.accessToken = `Bearer ${accessToken}`;
156
165
  this.tokenData.username = username;
157
- this.tokenData.accessToken = accessToken;
158
166
  this.tokenData.permissions = permissions;
167
+ if (!this.configuration.cookieAuth) {
168
+ this.configuration.accessToken = `Bearer ${accessToken}`;
169
+ this.tokenData.accessToken = accessToken;
170
+ }
159
171
 
160
172
  // Switch workspace if provided
161
173
  if (targetWorkspace) {
@@ -178,7 +190,7 @@ export class BaseAPI {
178
190
  url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
179
191
  headers: {
180
192
  'Content-Type': 'application/json',
181
- 'Authorization': `Bearer ${this.configuration.accessToken}`,
193
+ ...(this.configuration.cookieAuth ? {} : { 'Authorization': `Bearer ${this.configuration.accessToken}` }),
182
194
  },
183
195
  data: {
184
196
  username: this.configuration.username,
@@ -190,10 +202,12 @@ export class BaseAPI {
190
202
  const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
191
203
 
192
204
  const { data: { accessToken, permissions } } = response;
193
-
194
- this.configuration.accessToken = `Bearer ${accessToken}`;
195
- this.tokenData.accessToken = accessToken;
205
+
196
206
  this.tokenData.permissions = permissions;
207
+ if (!this.configuration.cookieAuth) {
208
+ this.configuration.accessToken = `Bearer ${accessToken}`;
209
+ this.tokenData.accessToken = accessToken;
210
+ }
197
211
 
198
212
  this.storeTokenData({
199
213
  ...this.tokenData
@@ -233,6 +247,11 @@ export class BaseAPI {
233
247
 
234
248
  private storeTokenData(tokenData?: TokenData) {
235
249
  if (typeof window !== 'undefined') {
250
+ if (tokenData && this.configuration?.cookieAuth) {
251
+ // Cookie mode saves who is logged in, never the token; a token saved by apps not yet migrated stays.
252
+ const { username, permissions } = tokenData;
253
+ tokenData = { ...(defaultStorage().get<TokenData>(TOKEN_DATA) || {}), username, permissions };
254
+ }
236
255
  defaultStorage().set<TokenData>(TOKEN_DATA, tokenData);
237
256
  }
238
257
  }
@@ -263,15 +282,17 @@ export class BaseAPI {
263
282
  originalConfig._retry = true;
264
283
  try {
265
284
  const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
266
- const accessToken = `Bearer ${tokenString}`;
267
285
  this.tokenData.permissions = permissions;
268
286
 
269
287
  delete originalConfig.headers['Authorization']
270
288
 
271
- originalConfig.headers['Authorization'] = accessToken;
272
-
273
- this.configuration.accessToken = accessToken;
274
- this.tokenData.accessToken = tokenString;
289
+ // In cookie mode the refresh reply renewed the access cookie, so retry without a header.
290
+ if (!this.configuration.cookieAuth) {
291
+ const accessToken = `Bearer ${tokenString}`;
292
+ originalConfig.headers['Authorization'] = accessToken;
293
+ this.configuration.accessToken = accessToken;
294
+ this.tokenData.accessToken = tokenString;
295
+ }
275
296
 
276
297
  this.storeTokenData(this.tokenData);
277
298
 
package/configuration.ts CHANGED
@@ -21,6 +21,7 @@ export interface ConfigurationParameters {
21
21
  basePath?: string;
22
22
  baseOptions?: any;
23
23
  formDataCtor?: new () => any;
24
+ cookieAuth?: boolean;
24
25
  }
25
26
 
26
27
  export class Configuration {
@@ -74,6 +75,15 @@ export class Configuration {
74
75
  */
75
76
  formDataCtor?: new () => any;
76
77
 
78
+ /**
79
+ * Authenticate with the HttpOnly access cookie instead of a stored token: every call sends credentials.
80
+ * The browser holds one cookie, so use it with one logged-in account; log out through the auth service.
81
+ *
82
+ * @type {boolean}
83
+ * @memberof Configuration
84
+ */
85
+ cookieAuth?: boolean;
86
+
77
87
  constructor(param: ConfigurationParameters = {}) {
78
88
  this.apiKey = param.apiKey;
79
89
  this.username = param.username;
@@ -82,6 +92,7 @@ export class Configuration {
82
92
  this.basePath = param.basePath;
83
93
  this.baseOptions = param.baseOptions;
84
94
  this.formDataCtor = param.formDataCtor;
95
+ this.cookieAuth = param.cookieAuth;
85
96
  }
86
97
 
87
98
  /**
@@ -48,11 +48,11 @@ export declare const InvoicesApiAxiosParamCreator: (configuration?: Configuratio
48
48
  * @param {string} [authorization] Bearer Token
49
49
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
50
50
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
51
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
51
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
52
52
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
53
53
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
54
54
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
55
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
55
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
56
56
  * @param {*} [options] Override http request option.
57
57
  * @throws {RequiredError}
58
58
  */
@@ -105,11 +105,11 @@ export declare const InvoicesApiFp: (configuration?: Configuration) => {
105
105
  * @param {string} [authorization] Bearer Token
106
106
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
107
107
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
108
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
108
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
109
109
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
110
110
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
111
111
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
112
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
112
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
113
113
  * @param {*} [options] Override http request option.
114
114
  * @throws {RequiredError}
115
115
  */
@@ -162,11 +162,11 @@ export declare const InvoicesApiFactory: (configuration?: Configuration, basePat
162
162
  * @param {string} [authorization] Bearer Token
163
163
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
164
164
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
165
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
165
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
166
166
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
167
167
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
168
168
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
169
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
169
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
170
170
  * @param {*} [options] Override http request option.
171
171
  * @throws {RequiredError}
172
172
  */
@@ -263,7 +263,7 @@ export interface InvoicesApiListInvoicesRequest {
263
263
  */
264
264
  readonly pageToken?: string;
265
265
  /**
266
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
266
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
267
267
  * @type {string}
268
268
  * @memberof InvoicesApiListInvoices
269
269
  */
@@ -287,7 +287,7 @@ export interface InvoicesApiListInvoicesRequest {
287
287
  */
288
288
  readonly expand?: string;
289
289
  /**
290
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
290
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
291
291
  * @type {string}
292
292
  * @memberof InvoicesApiListInvoices
293
293
  */
@@ -205,11 +205,11 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
205
205
  * @param {string} [authorization] Bearer Token
206
206
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
207
207
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
208
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
208
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
209
209
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
210
210
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
211
211
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
212
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
212
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
213
213
  * @param {*} [options] Override http request option.
214
214
  * @throws {RequiredError}
215
215
  */
@@ -404,11 +404,11 @@ var InvoicesApiFp = function (configuration) {
404
404
  * @param {string} [authorization] Bearer Token
405
405
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
406
406
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
407
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
407
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
408
408
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
409
409
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
410
410
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
411
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
411
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
412
412
  * @param {*} [options] Override http request option.
413
413
  * @throws {RequiredError}
414
414
  */
@@ -493,11 +493,11 @@ var InvoicesApiFactory = function (configuration, basePath, axios) {
493
493
  * @param {string} [authorization] Bearer Token
494
494
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
495
495
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
496
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
496
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
497
497
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
498
498
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
499
499
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
500
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
500
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
501
501
  * @param {*} [options] Override http request option.
502
502
  * @throws {RequiredError}
503
503
  */