@emilgroup/account-sdk-node 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.
- package/.openapi-generator/FILES +3 -2
- package/README.md +2 -2
- package/api/accounts-api.ts +35 -33
- package/api/default-api.ts +124 -0
- package/api.ts +2 -0
- package/dist/api/accounts-api.d.ts +31 -31
- package/dist/api/accounts-api.js +20 -18
- package/dist/api/default-api.d.ts +66 -0
- package/dist/api/default-api.js +200 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/account-class.d.ts +8 -8
- package/dist/models/create-account-request-dto.d.ts +27 -27
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +2 -2
- package/dist/models/inline-response200.d.ts +54 -0
- package/dist/models/inline-response503.d.ts +54 -0
- package/dist/models/update-account-request-dto.d.ts +33 -33
- package/models/account-class.ts +8 -8
- package/models/create-account-request-dto.ts +27 -27
- package/models/index.ts +2 -2
- package/models/inline-response200.ts +48 -0
- package/models/inline-response503.ts +48 -0
- package/models/update-account-request-dto.ts +33 -33
- package/package.json +1 -1
- package/dist/models/delete-request-dto.d.ts +0 -24
- package/dist/models/register-policy-request-dto.d.ts +0 -36
- package/models/delete-request-dto.ts +0 -30
- package/models/register-policy-request-dto.ts +0 -42
- /package/dist/models/{delete-request-dto.js → inline-response200.js} +0 -0
- /package/dist/models/{register-policy-request-dto.js → inline-response503.js} +0 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -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-node@1.
|
|
20
|
+
npm install @emilgroup/account-sdk-node@1.8.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/account-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/account-sdk-node@1.8.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `AccountsApi`.
|
package/api/accounts-api.ts
CHANGED
|
@@ -138,14 +138,16 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
138
138
|
* 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.
|
|
139
139
|
* @summary Retrieve the account
|
|
140
140
|
* @param {string} code Unique identifier for the object.
|
|
141
|
+
* @param {string} expand
|
|
141
142
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
142
|
-
* @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.
|
|
143
143
|
* @param {*} [options] Override http request option.
|
|
144
144
|
* @throws {RequiredError}
|
|
145
145
|
*/
|
|
146
|
-
getAccount: async (code: string,
|
|
146
|
+
getAccount: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
147
147
|
// verify required parameter 'code' is not null or undefined
|
|
148
148
|
assertParamExists('getAccount', 'code', code)
|
|
149
|
+
// verify required parameter 'expand' is not null or undefined
|
|
150
|
+
assertParamExists('getAccount', 'expand', expand)
|
|
149
151
|
const localVarPath = `/accountservice/v1/accounts/{code}`
|
|
150
152
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
151
153
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -190,14 +192,14 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
190
192
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
191
193
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
192
194
|
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
193
|
-
* @param {
|
|
195
|
+
* @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.
|
|
194
196
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
195
|
-
* @param {
|
|
196
|
-
* @param {
|
|
197
|
+
* @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.
|
|
198
|
+
* @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.
|
|
197
199
|
* @param {*} [options] Override http request option.
|
|
198
200
|
* @throws {RequiredError}
|
|
199
201
|
*/
|
|
200
|
-
listAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
202
|
+
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> => {
|
|
201
203
|
const localVarPath = `/accountservice/v1/accounts`;
|
|
202
204
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
203
205
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -336,7 +338,7 @@ export const AccountsApiFp = function(configuration?: Configuration) {
|
|
|
336
338
|
* @param {*} [options] Override http request option.
|
|
337
339
|
* @throws {RequiredError}
|
|
338
340
|
*/
|
|
339
|
-
async deleteAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
341
|
+
async deleteAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
340
342
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccount(code, authorization, options);
|
|
341
343
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
342
344
|
},
|
|
@@ -344,13 +346,13 @@ export const AccountsApiFp = function(configuration?: Configuration) {
|
|
|
344
346
|
* 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.
|
|
345
347
|
* @summary Retrieve the account
|
|
346
348
|
* @param {string} code Unique identifier for the object.
|
|
349
|
+
* @param {string} expand
|
|
347
350
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
348
|
-
* @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.
|
|
349
351
|
* @param {*} [options] Override http request option.
|
|
350
352
|
* @throws {RequiredError}
|
|
351
353
|
*/
|
|
352
|
-
async getAccount(code: string,
|
|
353
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(code,
|
|
354
|
+
async getAccount(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountResponseClass>> {
|
|
355
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(code, expand, authorization, options);
|
|
354
356
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
355
357
|
},
|
|
356
358
|
/**
|
|
@@ -359,14 +361,14 @@ export const AccountsApiFp = function(configuration?: Configuration) {
|
|
|
359
361
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
360
362
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
361
363
|
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
362
|
-
* @param {
|
|
364
|
+
* @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.
|
|
363
365
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
364
|
-
* @param {
|
|
365
|
-
* @param {
|
|
366
|
+
* @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.
|
|
367
|
+
* @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.
|
|
366
368
|
* @param {*} [options] Override http request option.
|
|
367
369
|
* @throws {RequiredError}
|
|
368
370
|
*/
|
|
369
|
-
async listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
371
|
+
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>> {
|
|
370
372
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
371
373
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
372
374
|
},
|
|
@@ -412,20 +414,20 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
|
|
|
412
414
|
* @param {*} [options] Override http request option.
|
|
413
415
|
* @throws {RequiredError}
|
|
414
416
|
*/
|
|
415
|
-
deleteAccount(code: string, authorization?: string, options?: any): AxiosPromise<
|
|
417
|
+
deleteAccount(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
416
418
|
return localVarFp.deleteAccount(code, authorization, options).then((request) => request(axios, basePath));
|
|
417
419
|
},
|
|
418
420
|
/**
|
|
419
421
|
* 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.
|
|
420
422
|
* @summary Retrieve the account
|
|
421
423
|
* @param {string} code Unique identifier for the object.
|
|
424
|
+
* @param {string} expand
|
|
422
425
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
423
|
-
* @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.
|
|
424
426
|
* @param {*} [options] Override http request option.
|
|
425
427
|
* @throws {RequiredError}
|
|
426
428
|
*/
|
|
427
|
-
getAccount(code: string,
|
|
428
|
-
return localVarFp.getAccount(code,
|
|
429
|
+
getAccount(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetAccountResponseClass> {
|
|
430
|
+
return localVarFp.getAccount(code, expand, authorization, options).then((request) => request(axios, basePath));
|
|
429
431
|
},
|
|
430
432
|
/**
|
|
431
433
|
* 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.
|
|
@@ -433,14 +435,14 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
|
|
|
433
435
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
434
436
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
435
437
|
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
436
|
-
* @param {
|
|
438
|
+
* @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.
|
|
437
439
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
438
|
-
* @param {
|
|
439
|
-
* @param {
|
|
440
|
+
* @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.
|
|
441
|
+
* @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.
|
|
440
442
|
* @param {*} [options] Override http request option.
|
|
441
443
|
* @throws {RequiredError}
|
|
442
444
|
*/
|
|
443
|
-
listAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
445
|
+
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> {
|
|
444
446
|
return localVarFp.listAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
445
447
|
},
|
|
446
448
|
/**
|
|
@@ -514,18 +516,18 @@ export interface AccountsApiGetAccountRequest {
|
|
|
514
516
|
readonly code: string
|
|
515
517
|
|
|
516
518
|
/**
|
|
517
|
-
*
|
|
519
|
+
*
|
|
518
520
|
* @type {string}
|
|
519
521
|
* @memberof AccountsApiGetAccount
|
|
520
522
|
*/
|
|
521
|
-
readonly
|
|
523
|
+
readonly expand: string
|
|
522
524
|
|
|
523
525
|
/**
|
|
524
|
-
*
|
|
526
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
525
527
|
* @type {string}
|
|
526
528
|
* @memberof AccountsApiGetAccount
|
|
527
529
|
*/
|
|
528
|
-
readonly
|
|
530
|
+
readonly authorization?: string
|
|
529
531
|
}
|
|
530
532
|
|
|
531
533
|
/**
|
|
@@ -557,10 +559,10 @@ export interface AccountsApiListAccountsRequest {
|
|
|
557
559
|
|
|
558
560
|
/**
|
|
559
561
|
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
560
|
-
* @type {
|
|
562
|
+
* @type {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'}
|
|
561
563
|
* @memberof AccountsApiListAccounts
|
|
562
564
|
*/
|
|
563
|
-
readonly filter?:
|
|
565
|
+
readonly filter?: 'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'
|
|
564
566
|
|
|
565
567
|
/**
|
|
566
568
|
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
@@ -571,17 +573,17 @@ export interface AccountsApiListAccountsRequest {
|
|
|
571
573
|
|
|
572
574
|
/**
|
|
573
575
|
* 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.
|
|
574
|
-
* @type {
|
|
576
|
+
* @type {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'}
|
|
575
577
|
* @memberof AccountsApiListAccounts
|
|
576
578
|
*/
|
|
577
|
-
readonly order?:
|
|
579
|
+
readonly order?: 'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'
|
|
578
580
|
|
|
579
581
|
/**
|
|
580
582
|
* 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.
|
|
581
|
-
* @type {
|
|
583
|
+
* @type {'policies'}
|
|
582
584
|
* @memberof AccountsApiListAccounts
|
|
583
585
|
*/
|
|
584
|
-
readonly expand?:
|
|
586
|
+
readonly expand?: 'policies'
|
|
585
587
|
}
|
|
586
588
|
|
|
587
589
|
/**
|
|
@@ -652,7 +654,7 @@ export class AccountsApi extends BaseAPI {
|
|
|
652
654
|
* @memberof AccountsApi
|
|
653
655
|
*/
|
|
654
656
|
public getAccount(requestParameters: AccountsApiGetAccountRequest, options?: AxiosRequestConfig) {
|
|
655
|
-
return AccountsApiFp(this.configuration).getAccount(requestParameters.code, requestParameters.
|
|
657
|
+
return AccountsApiFp(this.configuration).getAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
656
658
|
}
|
|
657
659
|
|
|
658
660
|
/**
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
// URLSearchParams not necessarily used
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import { URL, URLSearchParams } from 'url';
|
|
30
|
+
const FormData = require('form-data');
|
|
31
|
+
/**
|
|
32
|
+
* DefaultApi - axios parameter creator
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
const localVarPath = `/accountservice/health`;
|
|
44
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
46
|
+
let baseOptions;
|
|
47
|
+
let baseAccessToken;
|
|
48
|
+
if (configuration) {
|
|
49
|
+
baseOptions = configuration.baseOptions;
|
|
50
|
+
baseAccessToken = configuration.accessToken;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
54
|
+
const localVarHeaderParameter = {} as any;
|
|
55
|
+
const localVarQueryParameter = {} as any;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
60
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
61
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
url: toPathString(localVarUrlObj),
|
|
65
|
+
options: localVarRequestOptions,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* DefaultApi - functional programming interface
|
|
73
|
+
* @export
|
|
74
|
+
*/
|
|
75
|
+
export const DefaultApiFp = function(configuration?: Configuration) {
|
|
76
|
+
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
|
|
77
|
+
return {
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @param {*} [options] Override http request option.
|
|
81
|
+
* @throws {RequiredError}
|
|
82
|
+
*/
|
|
83
|
+
async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
|
|
84
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
|
|
85
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* DefaultApi - factory interface
|
|
92
|
+
* @export
|
|
93
|
+
*/
|
|
94
|
+
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
95
|
+
const localVarFp = DefaultApiFp(configuration)
|
|
96
|
+
return {
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @param {*} [options] Override http request option.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
*/
|
|
102
|
+
check(options?: any): AxiosPromise<InlineResponse200> {
|
|
103
|
+
return localVarFp.check(options).then((request) => request(axios, basePath));
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* DefaultApi - object-oriented interface
|
|
110
|
+
* @export
|
|
111
|
+
* @class DefaultApi
|
|
112
|
+
* @extends {BaseAPI}
|
|
113
|
+
*/
|
|
114
|
+
export class DefaultApi extends BaseAPI {
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @param {*} [options] Override http request option.
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
* @memberof DefaultApi
|
|
120
|
+
*/
|
|
121
|
+
public check(options?: AxiosRequestConfig) {
|
|
122
|
+
return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
|
|
123
|
+
}
|
|
124
|
+
}
|
package/api.ts
CHANGED
|
@@ -25,7 +25,9 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
|
27
27
|
import { AccountsApi } from './api';
|
|
28
|
+
import { DefaultApi } from './api';
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
export * from './api/accounts-api';
|
|
32
|
+
export * from './api/default-api';
|
|
31
33
|
|
|
@@ -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,
|
|
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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
60
|
-
* @param {
|
|
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=xxx in order to fetch the result.
|
|
62
|
-
* @param {
|
|
63
|
-
* @param {
|
|
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?:
|
|
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<
|
|
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,
|
|
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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
118
|
-
* @param {
|
|
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=xxx in order to fetch the result.
|
|
120
|
-
* @param {
|
|
121
|
-
* @param {
|
|
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?:
|
|
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<
|
|
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,
|
|
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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
176
|
-
* @param {
|
|
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=xxx in order to fetch the result.
|
|
178
|
-
* @param {
|
|
179
|
-
* @param {
|
|
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?:
|
|
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
|
-
*
|
|
246
|
+
*
|
|
247
247
|
* @type {string}
|
|
248
248
|
* @memberof AccountsApiGetAccount
|
|
249
249
|
*/
|
|
250
|
-
readonly
|
|
250
|
+
readonly expand: string;
|
|
251
251
|
/**
|
|
252
|
-
*
|
|
252
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
253
253
|
* @type {string}
|
|
254
254
|
* @memberof AccountsApiGetAccount
|
|
255
255
|
*/
|
|
256
|
-
readonly
|
|
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 {
|
|
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?:
|
|
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=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 {
|
|
296
|
+
* @type {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'}
|
|
297
297
|
* @memberof AccountsApiListAccounts
|
|
298
298
|
*/
|
|
299
|
-
readonly order?:
|
|
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 {
|
|
302
|
+
* @type {'policies'}
|
|
303
303
|
* @memberof AccountsApiListAccounts
|
|
304
304
|
*/
|
|
305
|
-
readonly expand?:
|
|
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<
|
|
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
|