@emilgroup/account-sdk 1.7.0 → 1.8.0

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.
@@ -4,6 +4,7 @@
4
4
  README.md
5
5
  api.ts
6
6
  api/accounts-api.ts
7
+ api/default-api.ts
7
8
  base.ts
8
9
  common.ts
9
10
  configuration.ts
@@ -12,12 +13,12 @@ index.ts
12
13
  models/account-class.ts
13
14
  models/create-account-request-dto.ts
14
15
  models/create-account-response-class.ts
15
- models/delete-request-dto.ts
16
16
  models/get-account-response-class.ts
17
17
  models/index.ts
18
+ models/inline-response200.ts
19
+ models/inline-response503.ts
18
20
  models/list-accounts-response-class.ts
19
21
  models/policy-class.ts
20
- models/register-policy-request-dto.ts
21
22
  models/update-account-request-dto.ts
22
23
  models/update-account-response-class.ts
23
24
  package.json
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/account-sdk@1.7.0 --save
20
+ npm install @emilgroup/account-sdk@1.8.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/account-sdk@1.7.0
24
+ yarn add @emilgroup/account-sdk@1.8.0
25
25
  ```
26
26
 
27
27
  And then you can import `AccountsApi`.
@@ -134,14 +134,16 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
134
134
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
135
135
  * @summary Retrieve the account
136
136
  * @param {string} code Unique identifier for the object.
137
+ * @param {string} expand
137
138
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
138
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
139
139
  * @param {*} [options] Override http request option.
140
140
  * @throws {RequiredError}
141
141
  */
142
- getAccount: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
142
+ getAccount: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
143
143
  // verify required parameter 'code' is not null or undefined
144
144
  assertParamExists('getAccount', 'code', code)
145
+ // verify required parameter 'expand' is not null or undefined
146
+ assertParamExists('getAccount', 'expand', expand)
145
147
  const localVarPath = `/accountservice/v1/accounts/{code}`
146
148
  .replace(`{${"code"}}`, encodeURIComponent(String(code)));
147
149
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -186,14 +188,14 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
186
188
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
187
189
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
188
190
  * @param {any} [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.
189
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
191
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
190
192
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
191
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
192
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
193
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
194
+ * @param {'policies'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
193
195
  * @param {*} [options] Override http request option.
194
196
  * @throws {RequiredError}
195
197
  */
196
- listAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
198
+ listAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName', search?: any, order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber', expand?: 'policies', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
197
199
  const localVarPath = `/accountservice/v1/accounts`;
198
200
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
199
201
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -332,7 +334,7 @@ export const AccountsApiFp = function(configuration?: Configuration) {
332
334
  * @param {*} [options] Override http request option.
333
335
  * @throws {RequiredError}
334
336
  */
335
- async deleteAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
337
+ async deleteAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
336
338
  const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccount(code, authorization, options);
337
339
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
338
340
  },
@@ -340,13 +342,13 @@ export const AccountsApiFp = function(configuration?: Configuration) {
340
342
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
341
343
  * @summary Retrieve the account
342
344
  * @param {string} code Unique identifier for the object.
345
+ * @param {string} expand
343
346
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
344
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
345
347
  * @param {*} [options] Override http request option.
346
348
  * @throws {RequiredError}
347
349
  */
348
- async getAccount(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountResponseClass>> {
349
- const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(code, authorization, expand, options);
350
+ async getAccount(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountResponseClass>> {
351
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(code, expand, authorization, options);
350
352
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
351
353
  },
352
354
  /**
@@ -355,14 +357,14 @@ export const AccountsApiFp = function(configuration?: Configuration) {
355
357
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
356
358
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
357
359
  * @param {any} [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.
358
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
360
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
359
361
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
360
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
361
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
362
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
363
+ * @param {'policies'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
362
364
  * @param {*} [options] Override http request option.
363
365
  * @throws {RequiredError}
364
366
  */
365
- async listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAccountsResponseClass>> {
367
+ async listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName', search?: any, order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber', expand?: 'policies', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAccountsResponseClass>> {
366
368
  const localVarAxiosArgs = await localVarAxiosParamCreator.listAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options);
367
369
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
368
370
  },
@@ -408,20 +410,20 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
408
410
  * @param {*} [options] Override http request option.
409
411
  * @throws {RequiredError}
410
412
  */
411
- deleteAccount(code: string, authorization?: string, options?: any): AxiosPromise<object> {
413
+ deleteAccount(code: string, authorization?: string, options?: any): AxiosPromise<void> {
412
414
  return localVarFp.deleteAccount(code, authorization, options).then((request) => request(axios, basePath));
413
415
  },
414
416
  /**
415
417
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
416
418
  * @summary Retrieve the account
417
419
  * @param {string} code Unique identifier for the object.
420
+ * @param {string} expand
418
421
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
419
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
420
422
  * @param {*} [options] Override http request option.
421
423
  * @throws {RequiredError}
422
424
  */
423
- getAccount(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetAccountResponseClass> {
424
- return localVarFp.getAccount(code, authorization, expand, options).then((request) => request(axios, basePath));
425
+ getAccount(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetAccountResponseClass> {
426
+ return localVarFp.getAccount(code, expand, authorization, options).then((request) => request(axios, basePath));
425
427
  },
426
428
  /**
427
429
  * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -429,14 +431,14 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
429
431
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
430
432
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
431
433
  * @param {any} [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.
432
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
434
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
433
435
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
434
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
435
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
436
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
437
+ * @param {'policies'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
436
438
  * @param {*} [options] Override http request option.
437
439
  * @throws {RequiredError}
438
440
  */
439
- listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListAccountsResponseClass> {
441
+ listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName', search?: any, order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber', expand?: 'policies', options?: any): AxiosPromise<ListAccountsResponseClass> {
440
442
  return localVarFp.listAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
441
443
  },
442
444
  /**
@@ -510,18 +512,18 @@ export interface AccountsApiGetAccountRequest {
510
512
  readonly code: string
511
513
 
512
514
  /**
513
- * Bearer Token: provided by the login endpoint under the name accessToken.
515
+ *
514
516
  * @type {string}
515
517
  * @memberof AccountsApiGetAccount
516
518
  */
517
- readonly authorization?: string
519
+ readonly expand: string
518
520
 
519
521
  /**
520
- * Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
522
+ * Bearer Token: provided by the login endpoint under the name accessToken.
521
523
  * @type {string}
522
524
  * @memberof AccountsApiGetAccount
523
525
  */
524
- readonly expand?: string
526
+ readonly authorization?: string
525
527
  }
526
528
 
527
529
  /**
@@ -553,10 +555,10 @@ export interface AccountsApiListAccountsRequest {
553
555
 
554
556
  /**
555
557
  * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
556
- * @type {any}
558
+ * @type {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'}
557
559
  * @memberof AccountsApiListAccounts
558
560
  */
559
- readonly filter?: any
561
+ readonly filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'
560
562
 
561
563
  /**
562
564
  * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
@@ -567,17 +569,17 @@ export interface AccountsApiListAccountsRequest {
567
569
 
568
570
  /**
569
571
  * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
570
- * @type {any}
572
+ * @type {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'}
571
573
  * @memberof AccountsApiListAccounts
572
574
  */
573
- readonly order?: any
575
+ readonly order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'
574
576
 
575
577
  /**
576
578
  * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
577
- * @type {any}
579
+ * @type {'policies'}
578
580
  * @memberof AccountsApiListAccounts
579
581
  */
580
- readonly expand?: any
582
+ readonly expand?: 'policies'
581
583
  }
582
584
 
583
585
  /**
@@ -648,7 +650,7 @@ export class AccountsApi extends BaseAPI {
648
650
  * @memberof AccountsApi
649
651
  */
650
652
  public getAccount(requestParameters: AccountsApiGetAccountRequest, options?: AxiosRequestConfig) {
651
- return AccountsApiFp(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
653
+ return AccountsApiFp(this.configuration).getAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
652
654
  }
653
655
 
654
656
  /**
@@ -0,0 +1,120 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AccountService
5
+ * The EMIL AccountService 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 { InlineResponse200 } from '../models';
25
+ // @ts-ignore
26
+ import { InlineResponse503 } from '../models';
27
+ /**
28
+ * DefaultApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ *
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
39
+ const localVarPath = `/accountservice/health`;
40
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
42
+ let baseOptions;
43
+ let baseAccessToken;
44
+ if (configuration) {
45
+ baseOptions = configuration.baseOptions;
46
+ baseAccessToken = configuration.accessToken;
47
+ }
48
+
49
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
50
+ const localVarHeaderParameter = {} as any;
51
+ const localVarQueryParameter = {} as any;
52
+
53
+
54
+
55
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
56
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
58
+
59
+ return {
60
+ url: toPathString(localVarUrlObj),
61
+ options: localVarRequestOptions,
62
+ };
63
+ },
64
+ }
65
+ };
66
+
67
+ /**
68
+ * DefaultApi - functional programming interface
69
+ * @export
70
+ */
71
+ export const DefaultApiFp = function(configuration?: Configuration) {
72
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
73
+ return {
74
+ /**
75
+ *
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
78
+ */
79
+ async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
80
+ const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
81
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
82
+ },
83
+ }
84
+ };
85
+
86
+ /**
87
+ * DefaultApi - factory interface
88
+ * @export
89
+ */
90
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
91
+ const localVarFp = DefaultApiFp(configuration)
92
+ return {
93
+ /**
94
+ *
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ check(options?: any): AxiosPromise<InlineResponse200> {
99
+ return localVarFp.check(options).then((request) => request(axios, basePath));
100
+ },
101
+ };
102
+ };
103
+
104
+ /**
105
+ * DefaultApi - object-oriented interface
106
+ * @export
107
+ * @class DefaultApi
108
+ * @extends {BaseAPI}
109
+ */
110
+ export class DefaultApi extends BaseAPI {
111
+ /**
112
+ *
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ * @memberof DefaultApi
116
+ */
117
+ public check(options?: AxiosRequestConfig) {
118
+ return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
119
+ }
120
+ }
package/api.ts CHANGED
@@ -21,7 +21,9 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
23
23
  import { AccountsApi } from './api';
24
+ import { DefaultApi } from './api';
24
25
 
25
26
 
26
27
  export * from './api/accounts-api';
28
+ export * from './api/default-api';
27
29
 
@@ -45,26 +45,26 @@ export declare const AccountsApiAxiosParamCreator: (configuration?: Configuratio
45
45
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
46
46
  * @summary Retrieve the account
47
47
  * @param {string} code Unique identifier for the object.
48
+ * @param {string} expand
48
49
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
49
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
50
50
  * @param {*} [options] Override http request option.
51
51
  * @throws {RequiredError}
52
52
  */
53
- getAccount: (code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
53
+ getAccount: (code: string, expand: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
54
54
  /**
55
55
  * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
56
56
  * @summary List accounts
57
57
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
58
58
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
59
59
  * @param {any} [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.
60
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
60
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
61
61
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
62
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
63
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
62
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
63
+ * @param {'policies'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
64
64
  * @param {*} [options] Override http request option.
65
65
  * @throws {RequiredError}
66
66
  */
67
- listAccounts: (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
67
+ listAccounts: (authorization?: string, pageSize?: any, pageToken?: any, filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName', search?: any, order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber', expand?: 'policies', options?: AxiosRequestConfig) => Promise<RequestArgs>;
68
68
  /**
69
69
  * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
70
70
  * @summary Update the account
@@ -98,31 +98,31 @@ export declare const AccountsApiFp: (configuration?: Configuration) => {
98
98
  * @param {*} [options] Override http request option.
99
99
  * @throws {RequiredError}
100
100
  */
101
- deleteAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
101
+ deleteAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
102
102
  /**
103
103
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
104
104
  * @summary Retrieve the account
105
105
  * @param {string} code Unique identifier for the object.
106
+ * @param {string} expand
106
107
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
107
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
108
108
  * @param {*} [options] Override http request option.
109
109
  * @throws {RequiredError}
110
110
  */
111
- getAccount(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountResponseClass>>;
111
+ getAccount(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountResponseClass>>;
112
112
  /**
113
113
  * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
114
114
  * @summary List accounts
115
115
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
116
116
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
117
117
  * @param {any} [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.
118
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
118
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
119
119
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
120
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
121
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
120
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
121
+ * @param {'policies'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
122
122
  * @param {*} [options] Override http request option.
123
123
  * @throws {RequiredError}
124
124
  */
125
- listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAccountsResponseClass>>;
125
+ listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName', search?: any, order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber', expand?: 'policies', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAccountsResponseClass>>;
126
126
  /**
127
127
  * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
128
128
  * @summary Update the account
@@ -156,31 +156,31 @@ export declare const AccountsApiFactory: (configuration?: Configuration, basePat
156
156
  * @param {*} [options] Override http request option.
157
157
  * @throws {RequiredError}
158
158
  */
159
- deleteAccount(code: string, authorization?: string, options?: any): AxiosPromise<object>;
159
+ deleteAccount(code: string, authorization?: string, options?: any): AxiosPromise<void>;
160
160
  /**
161
161
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
162
162
  * @summary Retrieve the account
163
163
  * @param {string} code Unique identifier for the object.
164
+ * @param {string} expand
164
165
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
165
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
166
166
  * @param {*} [options] Override http request option.
167
167
  * @throws {RequiredError}
168
168
  */
169
- getAccount(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetAccountResponseClass>;
169
+ getAccount(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetAccountResponseClass>;
170
170
  /**
171
171
  * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
172
172
  * @summary List accounts
173
173
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
174
174
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
175
175
  * @param {any} [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.
176
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
176
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
177
177
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
178
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
179
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
178
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
179
+ * @param {'policies'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
180
180
  * @param {*} [options] Override http request option.
181
181
  * @throws {RequiredError}
182
182
  */
183
- listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListAccountsResponseClass>;
183
+ listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName', search?: any, order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber', expand?: 'policies', options?: any): AxiosPromise<ListAccountsResponseClass>;
184
184
  /**
185
185
  * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
186
186
  * @summary Update the account
@@ -243,17 +243,17 @@ export interface AccountsApiGetAccountRequest {
243
243
  */
244
244
  readonly code: string;
245
245
  /**
246
- * Bearer Token: provided by the login endpoint under the name accessToken.
246
+ *
247
247
  * @type {string}
248
248
  * @memberof AccountsApiGetAccount
249
249
  */
250
- readonly authorization?: string;
250
+ readonly expand: string;
251
251
  /**
252
- * Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
252
+ * Bearer Token: provided by the login endpoint under the name accessToken.
253
253
  * @type {string}
254
254
  * @memberof AccountsApiGetAccount
255
255
  */
256
- readonly expand?: string;
256
+ readonly authorization?: string;
257
257
  }
258
258
  /**
259
259
  * Request parameters for listAccounts operation in AccountsApi.
@@ -281,10 +281,10 @@ export interface AccountsApiListAccountsRequest {
281
281
  readonly pageToken?: any;
282
282
  /**
283
283
  * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
284
- * @type {any}
284
+ * @type {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'}
285
285
  * @memberof AccountsApiListAccounts
286
286
  */
287
- readonly filter?: any;
287
+ readonly filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName';
288
288
  /**
289
289
  * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
290
290
  * @type {any}
@@ -293,16 +293,16 @@ export interface AccountsApiListAccountsRequest {
293
293
  readonly search?: any;
294
294
  /**
295
295
  * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
296
- * @type {any}
296
+ * @type {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'}
297
297
  * @memberof AccountsApiListAccounts
298
298
  */
299
- readonly order?: any;
299
+ readonly order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber';
300
300
  /**
301
301
  * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
302
- * @type {any}
302
+ * @type {'policies'}
303
303
  * @memberof AccountsApiListAccounts
304
304
  */
305
- readonly expand?: any;
305
+ readonly expand?: 'policies';
306
306
  }
307
307
  /**
308
308
  * Request parameters for updateAccount operation in AccountsApi.
@@ -353,7 +353,7 @@ export declare class AccountsApi extends BaseAPI {
353
353
  * @throws {RequiredError}
354
354
  * @memberof AccountsApi
355
355
  */
356
- deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
356
+ deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
357
357
  /**
358
358
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
359
359
  * @summary Retrieve the account