@emilgroup/account-sdk 1.0.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.
Files changed (58) hide show
  1. package/.openapi-generator/FILES +24 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +52 -0
  5. package/api/accounts-api.ts +527 -0
  6. package/api.ts +32 -0
  7. package/base.ts +182 -0
  8. package/common.ts +138 -0
  9. package/configuration.ts +109 -0
  10. package/dist/api/accounts-api.d.ts +255 -0
  11. package/dist/api/accounts-api.js +637 -0
  12. package/dist/api.d.ts +16 -0
  13. package/dist/api.js +36 -0
  14. package/dist/base.d.ts +68 -0
  15. package/dist/base.js +243 -0
  16. package/dist/common.d.ts +65 -0
  17. package/dist/common.js +243 -0
  18. package/dist/configuration.d.ts +90 -0
  19. package/dist/configuration.js +44 -0
  20. package/dist/index.d.ts +15 -0
  21. package/dist/index.js +35 -0
  22. package/dist/models/account-class.d.ts +132 -0
  23. package/dist/models/account-class.js +15 -0
  24. package/dist/models/create-account-request-dto.d.ts +102 -0
  25. package/dist/models/create-account-request-dto.js +21 -0
  26. package/dist/models/create-account-response-class.d.ts +25 -0
  27. package/dist/models/create-account-response-class.js +15 -0
  28. package/dist/models/delete-request-dto.d.ts +24 -0
  29. package/dist/models/delete-request-dto.js +15 -0
  30. package/dist/models/get-account-request-dto.d.ts +30 -0
  31. package/dist/models/get-account-request-dto.js +15 -0
  32. package/dist/models/get-account-response-class.d.ts +25 -0
  33. package/dist/models/get-account-response-class.js +15 -0
  34. package/dist/models/index.d.ts +10 -0
  35. package/dist/models/index.js +26 -0
  36. package/dist/models/list-accounts-response-class.d.ts +31 -0
  37. package/dist/models/list-accounts-response-class.js +15 -0
  38. package/dist/models/register-policy-request-dto.d.ts +36 -0
  39. package/dist/models/register-policy-request-dto.js +15 -0
  40. package/dist/models/update-account-request-dto.d.ts +108 -0
  41. package/dist/models/update-account-request-dto.js +21 -0
  42. package/dist/models/update-account-response-class.d.ts +25 -0
  43. package/dist/models/update-account-response-class.js +15 -0
  44. package/git_push.sh +57 -0
  45. package/index.ts +19 -0
  46. package/models/account-class.ts +138 -0
  47. package/models/create-account-request-dto.ts +111 -0
  48. package/models/create-account-response-class.ts +31 -0
  49. package/models/delete-request-dto.ts +30 -0
  50. package/models/get-account-request-dto.ts +36 -0
  51. package/models/get-account-response-class.ts +31 -0
  52. package/models/index.ts +10 -0
  53. package/models/list-accounts-response-class.ts +37 -0
  54. package/models/register-policy-request-dto.ts +42 -0
  55. package/models/update-account-request-dto.ts +117 -0
  56. package/models/update-account-response-class.ts +31 -0
  57. package/package.json +27 -0
  58. package/tsconfig.json +21 -0
@@ -0,0 +1,637 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL AccountService
6
+ * The EMIL AccountService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (_) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ Object.defineProperty(exports, "__esModule", { value: true });
78
+ exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiAxiosParamCreator = void 0;
79
+ var axios_1 = require("axios");
80
+ // Some imports not used depending on template conditions
81
+ // @ts-ignore
82
+ var common_1 = require("../common");
83
+ // @ts-ignore
84
+ var base_1 = require("../base");
85
+ /**
86
+ * AccountsApi - axios parameter creator
87
+ * @export
88
+ */
89
+ var AccountsApiAxiosParamCreator = function (configuration) {
90
+ var _this = this;
91
+ return {
92
+ /**
93
+ * 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.
94
+ * @summary Create the account
95
+ * @param {CreateAccountRequestDto} createAccountRequestDto
96
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ createAccount: function (createAccountRequestDto, authorization, options) {
101
+ if (options === void 0) { options = {}; }
102
+ return __awaiter(_this, void 0, void 0, function () {
103
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
104
+ return __generator(this, function (_a) {
105
+ switch (_a.label) {
106
+ case 0:
107
+ // verify required parameter 'createAccountRequestDto' is not null or undefined
108
+ (0, common_1.assertParamExists)('createAccount', 'createAccountRequestDto', createAccountRequestDto);
109
+ localVarPath = "/accountservice/v1/accounts";
110
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ baseAccessToken = configuration.accessToken;
114
+ }
115
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
116
+ localVarHeaderParameter = {};
117
+ localVarQueryParameter = {};
118
+ // authentication bearer required
119
+ // http bearer authentication required
120
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
121
+ case 1:
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ _a.sent();
125
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
126
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
127
+ }
128
+ localVarHeaderParameter['Content-Type'] = 'application/json';
129
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
130
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
131
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
132
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createAccountRequestDto, localVarRequestOptions, configuration);
133
+ return [2 /*return*/, {
134
+ url: (0, common_1.toPathString)(localVarUrlObj),
135
+ options: localVarRequestOptions,
136
+ }];
137
+ }
138
+ });
139
+ });
140
+ },
141
+ /**
142
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
143
+ * @summary Delete the account
144
+ * @param {string} code Unique identifier for the object.
145
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ deleteAccount: function (code, authorization, options) {
150
+ if (options === void 0) { options = {}; }
151
+ return __awaiter(_this, void 0, void 0, function () {
152
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
153
+ return __generator(this, function (_a) {
154
+ switch (_a.label) {
155
+ case 0:
156
+ // verify required parameter 'code' is not null or undefined
157
+ (0, common_1.assertParamExists)('deleteAccount', 'code', code);
158
+ localVarPath = "/accountservice/v1/accounts/{code}"
159
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
160
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
161
+ if (configuration) {
162
+ baseOptions = configuration.baseOptions;
163
+ baseAccessToken = configuration.accessToken;
164
+ }
165
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
166
+ localVarHeaderParameter = {};
167
+ localVarQueryParameter = {};
168
+ // authentication bearer required
169
+ // http bearer authentication required
170
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
171
+ case 1:
172
+ // authentication bearer required
173
+ // http bearer authentication required
174
+ _a.sent();
175
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
176
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
177
+ }
178
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
179
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
181
+ return [2 /*return*/, {
182
+ url: (0, common_1.toPathString)(localVarUrlObj),
183
+ options: localVarRequestOptions,
184
+ }];
185
+ }
186
+ });
187
+ });
188
+ },
189
+ /**
190
+ * 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.
191
+ * @summary Retrieve the account
192
+ * @param {string} code Unique identifier for the object.
193
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
194
+ * @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.
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ getAccount: function (code, authorization, expand, options) {
199
+ if (options === void 0) { options = {}; }
200
+ return __awaiter(_this, void 0, void 0, function () {
201
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
202
+ return __generator(this, function (_a) {
203
+ switch (_a.label) {
204
+ case 0:
205
+ // verify required parameter 'code' is not null or undefined
206
+ (0, common_1.assertParamExists)('getAccount', 'code', code);
207
+ localVarPath = "/accountservice/v1/accounts/{code}"
208
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
209
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
210
+ if (configuration) {
211
+ baseOptions = configuration.baseOptions;
212
+ baseAccessToken = configuration.accessToken;
213
+ }
214
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
215
+ localVarHeaderParameter = {};
216
+ localVarQueryParameter = {};
217
+ // authentication bearer required
218
+ // http bearer authentication required
219
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
220
+ case 1:
221
+ // authentication bearer required
222
+ // http bearer authentication required
223
+ _a.sent();
224
+ if (expand !== undefined) {
225
+ localVarQueryParameter['expand'] = expand;
226
+ }
227
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
228
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
229
+ }
230
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
231
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
232
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
233
+ return [2 /*return*/, {
234
+ url: (0, common_1.toPathString)(localVarUrlObj),
235
+ options: localVarRequestOptions,
236
+ }];
237
+ }
238
+ });
239
+ });
240
+ },
241
+ /**
242
+ * 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.
243
+ * @summary List accounts
244
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
245
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
246
+ * @param {string} [pageToken] A cursor for use in pagination. *pageToken* is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
247
+ * @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**
248
+ * @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**.
249
+ * @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**.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ listAccounts: function (authorization, pageSize, pageToken, filter, order, expand, options) {
254
+ if (options === void 0) { options = {}; }
255
+ return __awaiter(_this, void 0, void 0, function () {
256
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
257
+ return __generator(this, function (_a) {
258
+ switch (_a.label) {
259
+ case 0:
260
+ localVarPath = "/accountservice/v1/accounts";
261
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
262
+ if (configuration) {
263
+ baseOptions = configuration.baseOptions;
264
+ baseAccessToken = configuration.accessToken;
265
+ }
266
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
267
+ localVarHeaderParameter = {};
268
+ localVarQueryParameter = {};
269
+ // authentication bearer required
270
+ // http bearer authentication required
271
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
272
+ case 1:
273
+ // authentication bearer required
274
+ // http bearer authentication required
275
+ _a.sent();
276
+ if (pageSize !== undefined) {
277
+ localVarQueryParameter['pageSize'] = pageSize;
278
+ }
279
+ if (pageToken !== undefined) {
280
+ localVarQueryParameter['pageToken'] = pageToken;
281
+ }
282
+ if (filter !== undefined) {
283
+ localVarQueryParameter['filter'] = filter;
284
+ }
285
+ if (order !== undefined) {
286
+ localVarQueryParameter['order'] = order;
287
+ }
288
+ if (expand !== undefined) {
289
+ localVarQueryParameter['expand'] = expand;
290
+ }
291
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
292
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
293
+ }
294
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
295
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
296
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
297
+ return [2 /*return*/, {
298
+ url: (0, common_1.toPathString)(localVarUrlObj),
299
+ options: localVarRequestOptions,
300
+ }];
301
+ }
302
+ });
303
+ });
304
+ },
305
+ /**
306
+ * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
307
+ * @summary Update the account
308
+ * @param {string} code Unique identifier for the object.
309
+ * @param {UpdateAccountRequestDto} updateAccountRequestDto
310
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ */
314
+ updateAccount: function (code, updateAccountRequestDto, authorization, options) {
315
+ if (options === void 0) { options = {}; }
316
+ return __awaiter(_this, void 0, void 0, function () {
317
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
318
+ return __generator(this, function (_a) {
319
+ switch (_a.label) {
320
+ case 0:
321
+ // verify required parameter 'code' is not null or undefined
322
+ (0, common_1.assertParamExists)('updateAccount', 'code', code);
323
+ // verify required parameter 'updateAccountRequestDto' is not null or undefined
324
+ (0, common_1.assertParamExists)('updateAccount', 'updateAccountRequestDto', updateAccountRequestDto);
325
+ localVarPath = "/accountservice/v1/accounts/{code}"
326
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
327
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
328
+ if (configuration) {
329
+ baseOptions = configuration.baseOptions;
330
+ baseAccessToken = configuration.accessToken;
331
+ }
332
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
333
+ localVarHeaderParameter = {};
334
+ localVarQueryParameter = {};
335
+ // authentication bearer required
336
+ // http bearer authentication required
337
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
338
+ case 1:
339
+ // authentication bearer required
340
+ // http bearer authentication required
341
+ _a.sent();
342
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
343
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
344
+ }
345
+ localVarHeaderParameter['Content-Type'] = 'application/json';
346
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
347
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
348
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
349
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateAccountRequestDto, localVarRequestOptions, configuration);
350
+ return [2 /*return*/, {
351
+ url: (0, common_1.toPathString)(localVarUrlObj),
352
+ options: localVarRequestOptions,
353
+ }];
354
+ }
355
+ });
356
+ });
357
+ },
358
+ };
359
+ };
360
+ exports.AccountsApiAxiosParamCreator = AccountsApiAxiosParamCreator;
361
+ /**
362
+ * AccountsApi - functional programming interface
363
+ * @export
364
+ */
365
+ var AccountsApiFp = function (configuration) {
366
+ var localVarAxiosParamCreator = (0, exports.AccountsApiAxiosParamCreator)(configuration);
367
+ return {
368
+ /**
369
+ * 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.
370
+ * @summary Create the account
371
+ * @param {CreateAccountRequestDto} createAccountRequestDto
372
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ */
376
+ createAccount: function (createAccountRequestDto, authorization, options) {
377
+ return __awaiter(this, void 0, void 0, function () {
378
+ var localVarAxiosArgs;
379
+ return __generator(this, function (_a) {
380
+ switch (_a.label) {
381
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAccount(createAccountRequestDto, authorization, options)];
382
+ case 1:
383
+ localVarAxiosArgs = _a.sent();
384
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
385
+ }
386
+ });
387
+ });
388
+ },
389
+ /**
390
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
391
+ * @summary Delete the account
392
+ * @param {string} code Unique identifier for the object.
393
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ */
397
+ deleteAccount: function (code, authorization, options) {
398
+ return __awaiter(this, void 0, void 0, function () {
399
+ var localVarAxiosArgs;
400
+ return __generator(this, function (_a) {
401
+ switch (_a.label) {
402
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteAccount(code, authorization, options)];
403
+ case 1:
404
+ localVarAxiosArgs = _a.sent();
405
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
406
+ }
407
+ });
408
+ });
409
+ },
410
+ /**
411
+ * 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.
412
+ * @summary Retrieve the account
413
+ * @param {string} code Unique identifier for the object.
414
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
415
+ * @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.
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ */
419
+ getAccount: function (code, authorization, expand, options) {
420
+ return __awaiter(this, void 0, void 0, function () {
421
+ var localVarAxiosArgs;
422
+ return __generator(this, function (_a) {
423
+ switch (_a.label) {
424
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccount(code, authorization, expand, options)];
425
+ case 1:
426
+ localVarAxiosArgs = _a.sent();
427
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
428
+ }
429
+ });
430
+ });
431
+ },
432
+ /**
433
+ * 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.
434
+ * @summary List accounts
435
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
436
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
437
+ * @param {string} [pageToken] A cursor for use in pagination. *pageToken* is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
438
+ * @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**
439
+ * @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**.
440
+ * @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**.
441
+ * @param {*} [options] Override http request option.
442
+ * @throws {RequiredError}
443
+ */
444
+ listAccounts: function (authorization, pageSize, pageToken, filter, order, expand, options) {
445
+ return __awaiter(this, void 0, void 0, function () {
446
+ var localVarAxiosArgs;
447
+ return __generator(this, function (_a) {
448
+ switch (_a.label) {
449
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAccounts(authorization, pageSize, pageToken, filter, order, expand, options)];
450
+ case 1:
451
+ localVarAxiosArgs = _a.sent();
452
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
453
+ }
454
+ });
455
+ });
456
+ },
457
+ /**
458
+ * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
459
+ * @summary Update the account
460
+ * @param {string} code Unique identifier for the object.
461
+ * @param {UpdateAccountRequestDto} updateAccountRequestDto
462
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ */
466
+ updateAccount: function (code, updateAccountRequestDto, authorization, options) {
467
+ return __awaiter(this, void 0, void 0, function () {
468
+ var localVarAxiosArgs;
469
+ return __generator(this, function (_a) {
470
+ switch (_a.label) {
471
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAccount(code, updateAccountRequestDto, authorization, options)];
472
+ case 1:
473
+ localVarAxiosArgs = _a.sent();
474
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
475
+ }
476
+ });
477
+ });
478
+ },
479
+ };
480
+ };
481
+ exports.AccountsApiFp = AccountsApiFp;
482
+ /**
483
+ * AccountsApi - factory interface
484
+ * @export
485
+ */
486
+ var AccountsApiFactory = function (configuration, basePath, axios) {
487
+ var localVarFp = (0, exports.AccountsApiFp)(configuration);
488
+ return {
489
+ /**
490
+ * 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.
491
+ * @summary Create the account
492
+ * @param {CreateAccountRequestDto} createAccountRequestDto
493
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ createAccount: function (createAccountRequestDto, authorization, options) {
498
+ return localVarFp.createAccount(createAccountRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
499
+ },
500
+ /**
501
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
502
+ * @summary Delete the account
503
+ * @param {string} code Unique identifier for the object.
504
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ deleteAccount: function (code, authorization, options) {
509
+ return localVarFp.deleteAccount(code, authorization, options).then(function (request) { return request(axios, basePath); });
510
+ },
511
+ /**
512
+ * 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.
513
+ * @summary Retrieve the account
514
+ * @param {string} code Unique identifier for the object.
515
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
516
+ * @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.
517
+ * @param {*} [options] Override http request option.
518
+ * @throws {RequiredError}
519
+ */
520
+ getAccount: function (code, authorization, expand, options) {
521
+ return localVarFp.getAccount(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
522
+ },
523
+ /**
524
+ * 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.
525
+ * @summary List accounts
526
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
527
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
528
+ * @param {string} [pageToken] A cursor for use in pagination. *pageToken* is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
529
+ * @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**
530
+ * @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**.
531
+ * @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**.
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ */
535
+ listAccounts: function (authorization, pageSize, pageToken, filter, order, expand, options) {
536
+ return localVarFp.listAccounts(authorization, pageSize, pageToken, filter, order, expand, options).then(function (request) { return request(axios, basePath); });
537
+ },
538
+ /**
539
+ * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
540
+ * @summary Update the account
541
+ * @param {string} code Unique identifier for the object.
542
+ * @param {UpdateAccountRequestDto} updateAccountRequestDto
543
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
544
+ * @param {*} [options] Override http request option.
545
+ * @throws {RequiredError}
546
+ */
547
+ updateAccount: function (code, updateAccountRequestDto, authorization, options) {
548
+ return localVarFp.updateAccount(code, updateAccountRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
549
+ },
550
+ };
551
+ };
552
+ exports.AccountsApiFactory = AccountsApiFactory;
553
+ /**
554
+ * AccountsApi - object-oriented interface
555
+ * @export
556
+ * @class AccountsApi
557
+ * @extends {BaseAPI}
558
+ */
559
+ var AccountsApi = /** @class */ (function (_super) {
560
+ __extends(AccountsApi, _super);
561
+ function AccountsApi() {
562
+ return _super !== null && _super.apply(this, arguments) || this;
563
+ }
564
+ /**
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
+ * @summary Create the account
567
+ * @param {CreateAccountRequestDto} createAccountRequestDto
568
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ * @memberof AccountsApi
572
+ */
573
+ AccountsApi.prototype.createAccount = function (createAccountRequestDto, authorization, options) {
574
+ var _this = this;
575
+ return (0, exports.AccountsApiFp)(this.configuration).createAccount(createAccountRequestDto, authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
576
+ };
577
+ /**
578
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
579
+ * @summary Delete the account
580
+ * @param {string} code Unique identifier for the object.
581
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ * @memberof AccountsApi
585
+ */
586
+ AccountsApi.prototype.deleteAccount = function (code, authorization, options) {
587
+ var _this = this;
588
+ return (0, exports.AccountsApiFp)(this.configuration).deleteAccount(code, authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
589
+ };
590
+ /**
591
+ * 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
+ * @summary Retrieve the account
593
+ * @param {string} code Unique identifier for the object.
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.
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ * @memberof AccountsApi
599
+ */
600
+ AccountsApi.prototype.getAccount = function (code, authorization, expand, options) {
601
+ var _this = this;
602
+ return (0, exports.AccountsApiFp)(this.configuration).getAccount(code, authorization, expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
603
+ };
604
+ /**
605
+ * 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
+ * @summary List accounts
607
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
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&#x3D;1, your subsequent call can include pageToken&#x3D;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**.
613
+ * @param {*} [options] Override http request option.
614
+ * @throws {RequiredError}
615
+ * @memberof AccountsApi
616
+ */
617
+ AccountsApi.prototype.listAccounts = function (authorization, pageSize, pageToken, filter, order, expand, options) {
618
+ var _this = this;
619
+ return (0, exports.AccountsApiFp)(this.configuration).listAccounts(authorization, pageSize, pageToken, filter, order, expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
620
+ };
621
+ /**
622
+ * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
623
+ * @summary Update the account
624
+ * @param {string} code Unique identifier for the object.
625
+ * @param {UpdateAccountRequestDto} updateAccountRequestDto
626
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
627
+ * @param {*} [options] Override http request option.
628
+ * @throws {RequiredError}
629
+ * @memberof AccountsApi
630
+ */
631
+ AccountsApi.prototype.updateAccount = function (code, updateAccountRequestDto, authorization, options) {
632
+ var _this = this;
633
+ return (0, exports.AccountsApiFp)(this.configuration).updateAccount(code, updateAccountRequestDto, authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
634
+ };
635
+ return AccountsApi;
636
+ }(base_1.BaseAPI));
637
+ exports.AccountsApi = AccountsApi;