@emilgroup/account-sdk 1.0.0 → 1.0.1
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/README.md +13 -9
- package/api/accounts-api.ts +162 -26
- package/dist/api/accounts-api.d.ts +141 -21
- package/dist/api/accounts-api.js +16 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @emilgroup/account-sdk@1.0.
|
|
1
|
+
## @emilgroup/account-sdk@1.0.1
|
|
2
2
|
|
|
3
3
|
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -22,27 +22,30 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition
|
|
|
22
22
|
navigate to the folder of your consuming project and run one of the following commands.
|
|
23
23
|
|
|
24
24
|
```
|
|
25
|
-
npm install @emilgroup/account-sdk@1.0.
|
|
25
|
+
npm install @emilgroup/account-sdk@1.0.1 --save
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
And then you can import `AccountsApi`.
|
|
29
31
|
|
|
30
32
|
```ts
|
|
31
|
-
import { EmilApi } from '@emilgroup/typescript-axios-sdk';
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
import { AccountsApi } from '@emilgroup/account-sdk'
|
|
35
|
+
|
|
36
|
+
const accounts = new AccountsApi();
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `
|
|
39
|
+
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `AccountsApi`:
|
|
37
40
|
|
|
38
41
|
```ts
|
|
39
42
|
async function listAccounts(): Promise<Void> {
|
|
40
43
|
try {
|
|
41
|
-
const
|
|
44
|
+
const accounts = new AccountsApi();
|
|
42
45
|
|
|
43
|
-
await
|
|
46
|
+
await accounts.authorize('username', 'password');
|
|
44
47
|
|
|
45
|
-
const { data: { items } } = await
|
|
48
|
+
const { data: { items } } = await accounts.listAccounts();
|
|
46
49
|
|
|
47
50
|
console.log(items);
|
|
48
51
|
} catch(error) {
|
|
@@ -50,3 +53,4 @@ async function listAccounts(): Promise<Void> {
|
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
```
|
|
56
|
+
|
package/api/accounts-api.ts
CHANGED
|
@@ -447,6 +447,153 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
|
|
|
447
447
|
};
|
|
448
448
|
};
|
|
449
449
|
|
|
450
|
+
/**
|
|
451
|
+
* Request parameters for createAccount operation in AccountsApi.
|
|
452
|
+
* @export
|
|
453
|
+
* @interface AccountsApiCreateAccountRequest
|
|
454
|
+
*/
|
|
455
|
+
export interface AccountsApiCreateAccountRequest {
|
|
456
|
+
/**
|
|
457
|
+
*
|
|
458
|
+
* @type {CreateAccountRequestDto}
|
|
459
|
+
* @memberof AccountsApiCreateAccount
|
|
460
|
+
*/
|
|
461
|
+
readonly createAccountRequestDto: CreateAccountRequestDto
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
465
|
+
* @type {string}
|
|
466
|
+
* @memberof AccountsApiCreateAccount
|
|
467
|
+
*/
|
|
468
|
+
readonly authorization?: string
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Request parameters for deleteAccount operation in AccountsApi.
|
|
473
|
+
* @export
|
|
474
|
+
* @interface AccountsApiDeleteAccountRequest
|
|
475
|
+
*/
|
|
476
|
+
export interface AccountsApiDeleteAccountRequest {
|
|
477
|
+
/**
|
|
478
|
+
* Unique identifier for the object.
|
|
479
|
+
* @type {string}
|
|
480
|
+
* @memberof AccountsApiDeleteAccount
|
|
481
|
+
*/
|
|
482
|
+
readonly code: string
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
486
|
+
* @type {string}
|
|
487
|
+
* @memberof AccountsApiDeleteAccount
|
|
488
|
+
*/
|
|
489
|
+
readonly authorization?: string
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Request parameters for getAccount operation in AccountsApi.
|
|
494
|
+
* @export
|
|
495
|
+
* @interface AccountsApiGetAccountRequest
|
|
496
|
+
*/
|
|
497
|
+
export interface AccountsApiGetAccountRequest {
|
|
498
|
+
/**
|
|
499
|
+
* Unique identifier for the object.
|
|
500
|
+
* @type {string}
|
|
501
|
+
* @memberof AccountsApiGetAccount
|
|
502
|
+
*/
|
|
503
|
+
readonly code: string
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
507
|
+
* @type {string}
|
|
508
|
+
* @memberof AccountsApiGetAccount
|
|
509
|
+
*/
|
|
510
|
+
readonly authorization?: string
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* 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.
|
|
514
|
+
* @type {string}
|
|
515
|
+
* @memberof AccountsApiGetAccount
|
|
516
|
+
*/
|
|
517
|
+
readonly expand?: string
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Request parameters for listAccounts operation in AccountsApi.
|
|
522
|
+
* @export
|
|
523
|
+
* @interface AccountsApiListAccountsRequest
|
|
524
|
+
*/
|
|
525
|
+
export interface AccountsApiListAccountsRequest {
|
|
526
|
+
/**
|
|
527
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
528
|
+
* @type {string}
|
|
529
|
+
* @memberof AccountsApiListAccounts
|
|
530
|
+
*/
|
|
531
|
+
readonly authorization?: string
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
535
|
+
* @type {number}
|
|
536
|
+
* @memberof AccountsApiListAccounts
|
|
537
|
+
*/
|
|
538
|
+
readonly pageSize?: number
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* 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.
|
|
542
|
+
* @type {string}
|
|
543
|
+
* @memberof AccountsApiListAccounts
|
|
544
|
+
*/
|
|
545
|
+
readonly pageToken?: string
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
|
|
549
|
+
* @type {string}
|
|
550
|
+
* @memberof AccountsApiListAccounts
|
|
551
|
+
*/
|
|
552
|
+
readonly filter?: string
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* 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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
|
|
556
|
+
* @type {string}
|
|
557
|
+
* @memberof AccountsApiListAccounts
|
|
558
|
+
*/
|
|
559
|
+
readonly order?: string
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* 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. Parameters: **policy**.
|
|
563
|
+
* @type {string}
|
|
564
|
+
* @memberof AccountsApiListAccounts
|
|
565
|
+
*/
|
|
566
|
+
readonly expand?: string
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Request parameters for updateAccount operation in AccountsApi.
|
|
571
|
+
* @export
|
|
572
|
+
* @interface AccountsApiUpdateAccountRequest
|
|
573
|
+
*/
|
|
574
|
+
export interface AccountsApiUpdateAccountRequest {
|
|
575
|
+
/**
|
|
576
|
+
* Unique identifier for the object.
|
|
577
|
+
* @type {string}
|
|
578
|
+
* @memberof AccountsApiUpdateAccount
|
|
579
|
+
*/
|
|
580
|
+
readonly code: string
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
*
|
|
584
|
+
* @type {UpdateAccountRequestDto}
|
|
585
|
+
* @memberof AccountsApiUpdateAccount
|
|
586
|
+
*/
|
|
587
|
+
readonly updateAccountRequestDto: UpdateAccountRequestDto
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
591
|
+
* @type {string}
|
|
592
|
+
* @memberof AccountsApiUpdateAccount
|
|
593
|
+
*/
|
|
594
|
+
readonly authorization?: string
|
|
595
|
+
}
|
|
596
|
+
|
|
450
597
|
/**
|
|
451
598
|
* AccountsApi - object-oriented interface
|
|
452
599
|
* @export
|
|
@@ -457,71 +604,60 @@ export class AccountsApi extends BaseAPI {
|
|
|
457
604
|
/**
|
|
458
605
|
* This will create an account in the database. Account creation is usually part of a complex workflow that starts with lead creation. Creating directly an account without prior knowledge might result in an unusable account. Look into lead creation for more information.
|
|
459
606
|
* @summary Create the account
|
|
460
|
-
* @param {
|
|
461
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
607
|
+
* @param {AccountsApiCreateAccountRequest} requestParameters Request parameters.
|
|
462
608
|
* @param {*} [options] Override http request option.
|
|
463
609
|
* @throws {RequiredError}
|
|
464
610
|
* @memberof AccountsApi
|
|
465
611
|
*/
|
|
466
|
-
public createAccount(
|
|
467
|
-
return AccountsApiFp(this.configuration).createAccount(createAccountRequestDto, authorization, options).then((request) => request(this.axios, this.basePath));
|
|
612
|
+
public createAccount(requestParameters: AccountsApiCreateAccountRequest, options?: AxiosRequestConfig) {
|
|
613
|
+
return AccountsApiFp(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
468
614
|
}
|
|
469
615
|
|
|
470
616
|
/**
|
|
471
617
|
* Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
|
|
472
618
|
* @summary Delete the account
|
|
473
|
-
* @param {
|
|
474
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
619
|
+
* @param {AccountsApiDeleteAccountRequest} requestParameters Request parameters.
|
|
475
620
|
* @param {*} [options] Override http request option.
|
|
476
621
|
* @throws {RequiredError}
|
|
477
622
|
* @memberof AccountsApi
|
|
478
623
|
*/
|
|
479
|
-
public deleteAccount(
|
|
480
|
-
return AccountsApiFp(this.configuration).deleteAccount(code, authorization, options).then((request) => request(this.axios, this.basePath));
|
|
624
|
+
public deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, options?: AxiosRequestConfig) {
|
|
625
|
+
return AccountsApiFp(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
481
626
|
}
|
|
482
627
|
|
|
483
628
|
/**
|
|
484
629
|
* 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.
|
|
485
630
|
* @summary Retrieve the account
|
|
486
|
-
* @param {
|
|
487
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
488
|
-
* @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.
|
|
631
|
+
* @param {AccountsApiGetAccountRequest} requestParameters Request parameters.
|
|
489
632
|
* @param {*} [options] Override http request option.
|
|
490
633
|
* @throws {RequiredError}
|
|
491
634
|
* @memberof AccountsApi
|
|
492
635
|
*/
|
|
493
|
-
public getAccount(
|
|
494
|
-
return AccountsApiFp(this.configuration).getAccount(code, authorization, expand, options).then((request) => request(this.axios, this.basePath));
|
|
636
|
+
public getAccount(requestParameters: AccountsApiGetAccountRequest, options?: AxiosRequestConfig) {
|
|
637
|
+
return AccountsApiFp(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
495
638
|
}
|
|
496
639
|
|
|
497
640
|
/**
|
|
498
641
|
* Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest account appearing first. For more information about pagination, read the Pagination documentation.
|
|
499
642
|
* @summary List accounts
|
|
500
|
-
* @param {
|
|
501
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
502
|
-
* @param {string} [pageToken] A cursor for use in pagination. *pageToken* is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
503
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
|
|
504
|
-
* @param {string} [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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
|
|
505
|
-
* @param {string} [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. Parameters: **policy**.
|
|
643
|
+
* @param {AccountsApiListAccountsRequest} requestParameters Request parameters.
|
|
506
644
|
* @param {*} [options] Override http request option.
|
|
507
645
|
* @throws {RequiredError}
|
|
508
646
|
* @memberof AccountsApi
|
|
509
647
|
*/
|
|
510
|
-
public listAccounts(
|
|
511
|
-
return AccountsApiFp(this.configuration).listAccounts(authorization, pageSize, pageToken, filter, order, expand, options).then((request) => request(this.axios, this.basePath));
|
|
648
|
+
public listAccounts(requestParameters: AccountsApiListAccountsRequest = {}, options?: AxiosRequestConfig) {
|
|
649
|
+
return AccountsApiFp(this.configuration).listAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
512
650
|
}
|
|
513
651
|
|
|
514
652
|
/**
|
|
515
653
|
* Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
516
654
|
* @summary Update the account
|
|
517
|
-
* @param {
|
|
518
|
-
* @param {UpdateAccountRequestDto} updateAccountRequestDto
|
|
519
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
655
|
+
* @param {AccountsApiUpdateAccountRequest} requestParameters Request parameters.
|
|
520
656
|
* @param {*} [options] Override http request option.
|
|
521
657
|
* @throws {RequiredError}
|
|
522
658
|
* @memberof AccountsApi
|
|
523
659
|
*/
|
|
524
|
-
public updateAccount(
|
|
525
|
-
return AccountsApiFp(this.configuration).updateAccount(code, updateAccountRequestDto, authorization, options).then((request) => request(this.axios, this.basePath));
|
|
660
|
+
public updateAccount(requestParameters: AccountsApiUpdateAccountRequest, options?: AxiosRequestConfig) {
|
|
661
|
+
return AccountsApiFp(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
526
662
|
}
|
|
527
663
|
}
|
|
@@ -189,6 +189,137 @@ export declare const AccountsApiFactory: (configuration?: Configuration, basePat
|
|
|
189
189
|
*/
|
|
190
190
|
updateAccount(code: string, updateAccountRequestDto: UpdateAccountRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateAccountResponseClass>;
|
|
191
191
|
};
|
|
192
|
+
/**
|
|
193
|
+
* Request parameters for createAccount operation in AccountsApi.
|
|
194
|
+
* @export
|
|
195
|
+
* @interface AccountsApiCreateAccountRequest
|
|
196
|
+
*/
|
|
197
|
+
export interface AccountsApiCreateAccountRequest {
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @type {CreateAccountRequestDto}
|
|
201
|
+
* @memberof AccountsApiCreateAccount
|
|
202
|
+
*/
|
|
203
|
+
readonly createAccountRequestDto: CreateAccountRequestDto;
|
|
204
|
+
/**
|
|
205
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
206
|
+
* @type {string}
|
|
207
|
+
* @memberof AccountsApiCreateAccount
|
|
208
|
+
*/
|
|
209
|
+
readonly authorization?: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Request parameters for deleteAccount operation in AccountsApi.
|
|
213
|
+
* @export
|
|
214
|
+
* @interface AccountsApiDeleteAccountRequest
|
|
215
|
+
*/
|
|
216
|
+
export interface AccountsApiDeleteAccountRequest {
|
|
217
|
+
/**
|
|
218
|
+
* Unique identifier for the object.
|
|
219
|
+
* @type {string}
|
|
220
|
+
* @memberof AccountsApiDeleteAccount
|
|
221
|
+
*/
|
|
222
|
+
readonly code: string;
|
|
223
|
+
/**
|
|
224
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
225
|
+
* @type {string}
|
|
226
|
+
* @memberof AccountsApiDeleteAccount
|
|
227
|
+
*/
|
|
228
|
+
readonly authorization?: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Request parameters for getAccount operation in AccountsApi.
|
|
232
|
+
* @export
|
|
233
|
+
* @interface AccountsApiGetAccountRequest
|
|
234
|
+
*/
|
|
235
|
+
export interface AccountsApiGetAccountRequest {
|
|
236
|
+
/**
|
|
237
|
+
* Unique identifier for the object.
|
|
238
|
+
* @type {string}
|
|
239
|
+
* @memberof AccountsApiGetAccount
|
|
240
|
+
*/
|
|
241
|
+
readonly code: string;
|
|
242
|
+
/**
|
|
243
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
244
|
+
* @type {string}
|
|
245
|
+
* @memberof AccountsApiGetAccount
|
|
246
|
+
*/
|
|
247
|
+
readonly authorization?: string;
|
|
248
|
+
/**
|
|
249
|
+
* 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.
|
|
250
|
+
* @type {string}
|
|
251
|
+
* @memberof AccountsApiGetAccount
|
|
252
|
+
*/
|
|
253
|
+
readonly expand?: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Request parameters for listAccounts operation in AccountsApi.
|
|
257
|
+
* @export
|
|
258
|
+
* @interface AccountsApiListAccountsRequest
|
|
259
|
+
*/
|
|
260
|
+
export interface AccountsApiListAccountsRequest {
|
|
261
|
+
/**
|
|
262
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
263
|
+
* @type {string}
|
|
264
|
+
* @memberof AccountsApiListAccounts
|
|
265
|
+
*/
|
|
266
|
+
readonly authorization?: string;
|
|
267
|
+
/**
|
|
268
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
269
|
+
* @type {number}
|
|
270
|
+
* @memberof AccountsApiListAccounts
|
|
271
|
+
*/
|
|
272
|
+
readonly pageSize?: number;
|
|
273
|
+
/**
|
|
274
|
+
* 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.
|
|
275
|
+
* @type {string}
|
|
276
|
+
* @memberof AccountsApiListAccounts
|
|
277
|
+
*/
|
|
278
|
+
readonly pageToken?: string;
|
|
279
|
+
/**
|
|
280
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
|
|
281
|
+
* @type {string}
|
|
282
|
+
* @memberof AccountsApiListAccounts
|
|
283
|
+
*/
|
|
284
|
+
readonly filter?: string;
|
|
285
|
+
/**
|
|
286
|
+
* 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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
|
|
287
|
+
* @type {string}
|
|
288
|
+
* @memberof AccountsApiListAccounts
|
|
289
|
+
*/
|
|
290
|
+
readonly order?: string;
|
|
291
|
+
/**
|
|
292
|
+
* 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. Parameters: **policy**.
|
|
293
|
+
* @type {string}
|
|
294
|
+
* @memberof AccountsApiListAccounts
|
|
295
|
+
*/
|
|
296
|
+
readonly expand?: string;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Request parameters for updateAccount operation in AccountsApi.
|
|
300
|
+
* @export
|
|
301
|
+
* @interface AccountsApiUpdateAccountRequest
|
|
302
|
+
*/
|
|
303
|
+
export interface AccountsApiUpdateAccountRequest {
|
|
304
|
+
/**
|
|
305
|
+
* Unique identifier for the object.
|
|
306
|
+
* @type {string}
|
|
307
|
+
* @memberof AccountsApiUpdateAccount
|
|
308
|
+
*/
|
|
309
|
+
readonly code: string;
|
|
310
|
+
/**
|
|
311
|
+
*
|
|
312
|
+
* @type {UpdateAccountRequestDto}
|
|
313
|
+
* @memberof AccountsApiUpdateAccount
|
|
314
|
+
*/
|
|
315
|
+
readonly updateAccountRequestDto: UpdateAccountRequestDto;
|
|
316
|
+
/**
|
|
317
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
318
|
+
* @type {string}
|
|
319
|
+
* @memberof AccountsApiUpdateAccount
|
|
320
|
+
*/
|
|
321
|
+
readonly authorization?: string;
|
|
322
|
+
}
|
|
192
323
|
/**
|
|
193
324
|
* AccountsApi - object-oriented interface
|
|
194
325
|
* @export
|
|
@@ -199,57 +330,46 @@ export declare class AccountsApi extends BaseAPI {
|
|
|
199
330
|
/**
|
|
200
331
|
* This will create an account in the database. Account creation is usually part of a complex workflow that starts with lead creation. Creating directly an account without prior knowledge might result in an unusable account. Look into lead creation for more information.
|
|
201
332
|
* @summary Create the account
|
|
202
|
-
* @param {
|
|
203
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
333
|
+
* @param {AccountsApiCreateAccountRequest} requestParameters Request parameters.
|
|
204
334
|
* @param {*} [options] Override http request option.
|
|
205
335
|
* @throws {RequiredError}
|
|
206
336
|
* @memberof AccountsApi
|
|
207
337
|
*/
|
|
208
|
-
createAccount(
|
|
338
|
+
createAccount(requestParameters: AccountsApiCreateAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateAccountResponseClass, any>>;
|
|
209
339
|
/**
|
|
210
340
|
* Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
|
|
211
341
|
* @summary Delete the account
|
|
212
|
-
* @param {
|
|
213
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
342
|
+
* @param {AccountsApiDeleteAccountRequest} requestParameters Request parameters.
|
|
214
343
|
* @param {*} [options] Override http request option.
|
|
215
344
|
* @throws {RequiredError}
|
|
216
345
|
* @memberof AccountsApi
|
|
217
346
|
*/
|
|
218
|
-
deleteAccount(
|
|
347
|
+
deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
219
348
|
/**
|
|
220
349
|
* 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.
|
|
221
350
|
* @summary Retrieve the account
|
|
222
|
-
* @param {
|
|
223
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
224
|
-
* @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.
|
|
351
|
+
* @param {AccountsApiGetAccountRequest} requestParameters Request parameters.
|
|
225
352
|
* @param {*} [options] Override http request option.
|
|
226
353
|
* @throws {RequiredError}
|
|
227
354
|
* @memberof AccountsApi
|
|
228
355
|
*/
|
|
229
|
-
getAccount(
|
|
356
|
+
getAccount(requestParameters: AccountsApiGetAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAccountResponseClass, any>>;
|
|
230
357
|
/**
|
|
231
358
|
* Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest account appearing first. For more information about pagination, read the Pagination documentation.
|
|
232
359
|
* @summary List accounts
|
|
233
|
-
* @param {
|
|
234
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
235
|
-
* @param {string} [pageToken] A cursor for use in pagination. *pageToken* is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
236
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
|
|
237
|
-
* @param {string} [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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
|
|
238
|
-
* @param {string} [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. Parameters: **policy**.
|
|
360
|
+
* @param {AccountsApiListAccountsRequest} requestParameters Request parameters.
|
|
239
361
|
* @param {*} [options] Override http request option.
|
|
240
362
|
* @throws {RequiredError}
|
|
241
363
|
* @memberof AccountsApi
|
|
242
364
|
*/
|
|
243
|
-
listAccounts(
|
|
365
|
+
listAccounts(requestParameters?: AccountsApiListAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAccountsResponseClass, any>>;
|
|
244
366
|
/**
|
|
245
367
|
* Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
246
368
|
* @summary Update the account
|
|
247
|
-
* @param {
|
|
248
|
-
* @param {UpdateAccountRequestDto} updateAccountRequestDto
|
|
249
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
369
|
+
* @param {AccountsApiUpdateAccountRequest} requestParameters Request parameters.
|
|
250
370
|
* @param {*} [options] Override http request option.
|
|
251
371
|
* @throws {RequiredError}
|
|
252
372
|
* @memberof AccountsApi
|
|
253
373
|
*/
|
|
254
|
-
updateAccount(
|
|
374
|
+
updateAccount(requestParameters: AccountsApiUpdateAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateAccountResponseClass, any>>;
|
|
255
375
|
}
|
package/dist/api/accounts-api.js
CHANGED
|
@@ -564,73 +564,63 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
564
564
|
/**
|
|
565
565
|
* This will create an account in the database. Account creation is usually part of a complex workflow that starts with lead creation. Creating directly an account without prior knowledge might result in an unusable account. Look into lead creation for more information.
|
|
566
566
|
* @summary Create the account
|
|
567
|
-
* @param {
|
|
568
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
567
|
+
* @param {AccountsApiCreateAccountRequest} requestParameters Request parameters.
|
|
569
568
|
* @param {*} [options] Override http request option.
|
|
570
569
|
* @throws {RequiredError}
|
|
571
570
|
* @memberof AccountsApi
|
|
572
571
|
*/
|
|
573
|
-
AccountsApi.prototype.createAccount = function (
|
|
572
|
+
AccountsApi.prototype.createAccount = function (requestParameters, options) {
|
|
574
573
|
var _this = this;
|
|
575
|
-
return (0, exports.AccountsApiFp)(this.configuration).createAccount(createAccountRequestDto, authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
574
|
+
return (0, exports.AccountsApiFp)(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
576
575
|
};
|
|
577
576
|
/**
|
|
578
577
|
* Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
|
|
579
578
|
* @summary Delete the account
|
|
580
|
-
* @param {
|
|
581
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
579
|
+
* @param {AccountsApiDeleteAccountRequest} requestParameters Request parameters.
|
|
582
580
|
* @param {*} [options] Override http request option.
|
|
583
581
|
* @throws {RequiredError}
|
|
584
582
|
* @memberof AccountsApi
|
|
585
583
|
*/
|
|
586
|
-
AccountsApi.prototype.deleteAccount = function (
|
|
584
|
+
AccountsApi.prototype.deleteAccount = function (requestParameters, options) {
|
|
587
585
|
var _this = this;
|
|
588
|
-
return (0, exports.AccountsApiFp)(this.configuration).deleteAccount(code, authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
586
|
+
return (0, exports.AccountsApiFp)(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
589
587
|
};
|
|
590
588
|
/**
|
|
591
589
|
* 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.
|
|
592
590
|
* @summary Retrieve the account
|
|
593
|
-
* @param {
|
|
594
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
595
|
-
* @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.
|
|
591
|
+
* @param {AccountsApiGetAccountRequest} requestParameters Request parameters.
|
|
596
592
|
* @param {*} [options] Override http request option.
|
|
597
593
|
* @throws {RequiredError}
|
|
598
594
|
* @memberof AccountsApi
|
|
599
595
|
*/
|
|
600
|
-
AccountsApi.prototype.getAccount = function (
|
|
596
|
+
AccountsApi.prototype.getAccount = function (requestParameters, options) {
|
|
601
597
|
var _this = this;
|
|
602
|
-
return (0, exports.AccountsApiFp)(this.configuration).getAccount(code, authorization, expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
598
|
+
return (0, exports.AccountsApiFp)(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
603
599
|
};
|
|
604
600
|
/**
|
|
605
601
|
* Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest account appearing first. For more information about pagination, read the Pagination documentation.
|
|
606
602
|
* @summary List accounts
|
|
607
|
-
* @param {
|
|
608
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
609
|
-
* @param {string} [pageToken] A cursor for use in pagination. *pageToken* is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
610
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
|
|
611
|
-
* @param {string} [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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
|
|
612
|
-
* @param {string} [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. Parameters: **policy**.
|
|
603
|
+
* @param {AccountsApiListAccountsRequest} requestParameters Request parameters.
|
|
613
604
|
* @param {*} [options] Override http request option.
|
|
614
605
|
* @throws {RequiredError}
|
|
615
606
|
* @memberof AccountsApi
|
|
616
607
|
*/
|
|
617
|
-
AccountsApi.prototype.listAccounts = function (
|
|
608
|
+
AccountsApi.prototype.listAccounts = function (requestParameters, options) {
|
|
618
609
|
var _this = this;
|
|
619
|
-
|
|
610
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
611
|
+
return (0, exports.AccountsApiFp)(this.configuration).listAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
620
612
|
};
|
|
621
613
|
/**
|
|
622
614
|
* Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
623
615
|
* @summary Update the account
|
|
624
|
-
* @param {
|
|
625
|
-
* @param {UpdateAccountRequestDto} updateAccountRequestDto
|
|
626
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
616
|
+
* @param {AccountsApiUpdateAccountRequest} requestParameters Request parameters.
|
|
627
617
|
* @param {*} [options] Override http request option.
|
|
628
618
|
* @throws {RequiredError}
|
|
629
619
|
* @memberof AccountsApi
|
|
630
620
|
*/
|
|
631
|
-
AccountsApi.prototype.updateAccount = function (
|
|
621
|
+
AccountsApi.prototype.updateAccount = function (requestParameters, options) {
|
|
632
622
|
var _this = this;
|
|
633
|
-
return (0, exports.AccountsApiFp)(this.configuration).updateAccount(code, updateAccountRequestDto, authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
623
|
+
return (0, exports.AccountsApiFp)(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
634
624
|
};
|
|
635
625
|
return AccountsApi;
|
|
636
626
|
}(base_1.BaseAPI));
|