@libgot/whatsapp-bridge-sdk 1.0.34 → 1.0.36-rc.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.
Files changed (57) hide show
  1. package/README.md +2 -2
  2. package/api.ts +3 -0
  3. package/apis/auth-api.ts +26 -27
  4. package/apis/cellphone-api.ts +151 -0
  5. package/apis/chats-api.ts +116 -7
  6. package/apis/flows-api.ts +263 -0
  7. package/apis/sessions-api.ts +201 -0
  8. package/dist/api.d.ts +3 -0
  9. package/dist/api.js +3 -0
  10. package/dist/apis/auth-api.d.ts +12 -13
  11. package/dist/apis/auth-api.js +25 -25
  12. package/dist/apis/cellphone-api.d.ts +74 -0
  13. package/dist/apis/cellphone-api.js +161 -0
  14. package/dist/apis/chats-api.d.ts +50 -4
  15. package/dist/apis/chats-api.js +116 -7
  16. package/dist/apis/flows-api.d.ts +125 -0
  17. package/dist/apis/flows-api.js +283 -0
  18. package/dist/apis/sessions-api.d.ts +100 -0
  19. package/dist/apis/sessions-api.js +217 -0
  20. package/dist/models/apply-for-loan-response-dto.d.ts +19 -0
  21. package/dist/models/apply-for-loan-response-dto.js +15 -0
  22. package/dist/models/assignment-type-dto.d.ts +31 -0
  23. package/dist/models/assignment-type-dto.js +15 -0
  24. package/dist/models/cellphone-validation-dto.d.ts +24 -0
  25. package/dist/models/cellphone-validation-dto.js +15 -0
  26. package/dist/models/index.d.ts +8 -1
  27. package/dist/models/index.js +8 -1
  28. package/dist/models/send-template-data-dto.d.ts +18 -0
  29. package/dist/models/send-template-data-dto.js +14 -0
  30. package/dist/models/send-text-dto.d.ts +18 -0
  31. package/dist/models/send-text-dto.js +14 -0
  32. package/dist/models/session-response-data-dto.d.ts +25 -0
  33. package/dist/models/session-response-data-dto.js +15 -0
  34. package/dist/models/session-response-dto.d.ts +43 -0
  35. package/dist/models/session-response-dto.js +15 -0
  36. package/dist/models/sessions-response-data-dto.d.ts +25 -0
  37. package/dist/models/sessions-response-data-dto.js +15 -0
  38. package/dist/models/signature-data-dto.d.ts +19 -0
  39. package/dist/models/signature-data-dto.js +15 -0
  40. package/dist/models/whatsapp-chat-dto.d.ts +12 -0
  41. package/dist/models/whatsapp-message-dto.d.ts +6 -0
  42. package/dist/models/whatsapp-message-feedback.d.ts +43 -0
  43. package/dist/models/whatsapp-message-feedback.js +15 -0
  44. package/models/apply-for-loan-response-dto.ts +22 -0
  45. package/models/assignment-type-dto.ts +36 -0
  46. package/models/cellphone-validation-dto.ts +28 -0
  47. package/models/index.ts +8 -1
  48. package/models/send-template-data-dto.ts +21 -0
  49. package/models/send-text-dto.ts +21 -0
  50. package/models/session-response-data-dto.ts +29 -0
  51. package/models/session-response-dto.ts +50 -0
  52. package/models/sessions-response-data-dto.ts +29 -0
  53. package/models/signature-data-dto.ts +22 -0
  54. package/models/whatsapp-chat-dto.ts +14 -0
  55. package/models/whatsapp-message-dto.ts +7 -0
  56. package/models/whatsapp-message-feedback.ts +50 -0
  57. package/package.json +1 -1
@@ -78,6 +78,57 @@ const ChatsApiAxiosParamCreator = function (configuration) {
78
78
  options: localVarRequestOptions,
79
79
  };
80
80
  }),
81
+ /**
82
+ *
83
+ * @param {AssignmentTypeDto} body
84
+ * @param {string} cellphone
85
+ * @param {number} id
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ */
89
+ assignmentType: (body_1, cellphone_1, id_1, ...args_1) => __awaiter(this, [body_1, cellphone_1, id_1, ...args_1], void 0, function* (body, cellphone, id, options = {}) {
90
+ // verify required parameter 'body' is not null or undefined
91
+ if (body === null || body === undefined) {
92
+ throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling assignmentType.');
93
+ }
94
+ // verify required parameter 'cellphone' is not null or undefined
95
+ if (cellphone === null || cellphone === undefined) {
96
+ throw new base_1.RequiredError('cellphone', 'Required parameter cellphone was null or undefined when calling assignmentType.');
97
+ }
98
+ // verify required parameter 'id' is not null or undefined
99
+ if (id === null || id === undefined) {
100
+ throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling assignmentType.');
101
+ }
102
+ const localVarPath = `/api/chats/{cellphone}/assignment-type`
103
+ .replace(`{${"cellphone"}}`, encodeURIComponent(String(cellphone)))
104
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
105
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
107
+ let baseOptions;
108
+ if (configuration) {
109
+ baseOptions = configuration.baseOptions;
110
+ }
111
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
112
+ const localVarHeaderParameter = {};
113
+ const localVarQueryParameter = {};
114
+ localVarHeaderParameter['Content-Type'] = 'application/json';
115
+ const query = new URLSearchParams(localVarUrlObj.search);
116
+ for (const key in localVarQueryParameter) {
117
+ query.set(key, localVarQueryParameter[key]);
118
+ }
119
+ for (const key in options.params) {
120
+ query.set(key, options.params[key]);
121
+ }
122
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
125
+ const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
126
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
127
+ return {
128
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
129
+ options: localVarRequestOptions,
130
+ };
131
+ }),
81
132
  /**
82
133
  *
83
134
  * @param {number} id
@@ -125,10 +176,12 @@ const ChatsApiAxiosParamCreator = function (configuration) {
125
176
  * @param {number} [currentPage]
126
177
  * @param {number} [userId]
127
178
  * @param {boolean} [externallyInitiated]
179
+ * @param {number} [id]
180
+ * @param {string} [code]
128
181
  * @param {*} [options] Override http request option.
129
182
  * @throws {RequiredError}
130
183
  */
131
- getChats: (branchId_1, q_1, unassigned_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, externallyInitiated_1, ...args_1) => __awaiter(this, [branchId_1, q_1, unassigned_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, externallyInitiated_1, ...args_1], void 0, function* (branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, options = {}) {
184
+ getChats: (branchId_1, q_1, unassigned_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, externallyInitiated_1, id_1, code_1, ...args_1) => __awaiter(this, [branchId_1, q_1, unassigned_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, externallyInitiated_1, id_1, code_1, ...args_1], void 0, function* (branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, code, options = {}) {
132
185
  // verify required parameter 'branchId' is not null or undefined
133
186
  if (branchId === null || branchId === undefined) {
134
187
  throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
@@ -167,6 +220,12 @@ const ChatsApiAxiosParamCreator = function (configuration) {
167
220
  if (externallyInitiated !== undefined) {
168
221
  localVarQueryParameter['externallyInitiated'] = externallyInitiated;
169
222
  }
223
+ if (id !== undefined) {
224
+ localVarQueryParameter['id'] = id;
225
+ }
226
+ if (code !== undefined) {
227
+ localVarQueryParameter['code'] = code;
228
+ }
170
229
  const query = new URLSearchParams(localVarUrlObj.search);
171
230
  for (const key in localVarQueryParameter) {
172
231
  query.set(key, localVarQueryParameter[key]);
@@ -252,6 +311,23 @@ const ChatsApiFp = function (configuration) {
252
311
  };
253
312
  });
254
313
  },
314
+ /**
315
+ *
316
+ * @param {AssignmentTypeDto} body
317
+ * @param {string} cellphone
318
+ * @param {number} id
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ assignmentType(body, cellphone, id, options) {
323
+ return __awaiter(this, void 0, void 0, function* () {
324
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignmentType(body, cellphone, id, options);
325
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
326
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
327
+ return axios.request(axiosRequestArgs);
328
+ };
329
+ });
330
+ },
255
331
  /**
256
332
  *
257
333
  * @param {number} id
@@ -277,12 +353,14 @@ const ChatsApiFp = function (configuration) {
277
353
  * @param {number} [currentPage]
278
354
  * @param {number} [userId]
279
355
  * @param {boolean} [externallyInitiated]
356
+ * @param {number} [id]
357
+ * @param {string} [code]
280
358
  * @param {*} [options] Override http request option.
281
359
  * @throws {RequiredError}
282
360
  */
283
- getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, options) {
361
+ getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, code, options) {
284
362
  return __awaiter(this, void 0, void 0, function* () {
285
- const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, options);
363
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, code, options);
286
364
  return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
287
365
  const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
288
366
  return axios.request(axiosRequestArgs);
@@ -326,6 +404,19 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
326
404
  return (0, exports.ChatsApiFp)(configuration).assignToMe(body, id, options).then((request) => request(axios, basePath));
327
405
  });
328
406
  },
407
+ /**
408
+ *
409
+ * @param {AssignmentTypeDto} body
410
+ * @param {string} cellphone
411
+ * @param {number} id
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
415
+ assignmentType(body, cellphone, id, options) {
416
+ return __awaiter(this, void 0, void 0, function* () {
417
+ return (0, exports.ChatsApiFp)(configuration).assignmentType(body, cellphone, id, options).then((request) => request(axios, basePath));
418
+ });
419
+ },
329
420
  /**
330
421
  *
331
422
  * @param {number} id
@@ -347,12 +438,14 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
347
438
  * @param {number} [currentPage]
348
439
  * @param {number} [userId]
349
440
  * @param {boolean} [externallyInitiated]
441
+ * @param {number} [id]
442
+ * @param {string} [code]
350
443
  * @param {*} [options] Override http request option.
351
444
  * @throws {RequiredError}
352
445
  */
353
- getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, options) {
446
+ getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, code, options) {
354
447
  return __awaiter(this, void 0, void 0, function* () {
355
- return (0, exports.ChatsApiFp)(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, options).then((request) => request(axios, basePath));
448
+ return (0, exports.ChatsApiFp)(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, code, options).then((request) => request(axios, basePath));
356
449
  });
357
450
  },
358
451
  /**
@@ -390,6 +483,20 @@ class ChatsApi extends base_1.BaseAPI {
390
483
  return (0, exports.ChatsApiFp)(this.configuration).assignToMe(body, id, options).then((request) => request(this.axios, this.basePath));
391
484
  });
392
485
  }
486
+ /**
487
+ *
488
+ * @param {AssignmentTypeDto} body
489
+ * @param {string} cellphone
490
+ * @param {number} id
491
+ * @param {*} [options] Override http request option.
492
+ * @throws {RequiredError}
493
+ * @memberof ChatsApi
494
+ */
495
+ assignmentType(body, cellphone, id, options) {
496
+ return __awaiter(this, void 0, void 0, function* () {
497
+ return (0, exports.ChatsApiFp)(this.configuration).assignmentType(body, cellphone, id, options).then((request) => request(this.axios, this.basePath));
498
+ });
499
+ }
393
500
  /**
394
501
  *
395
502
  * @param {number} id
@@ -412,13 +519,15 @@ class ChatsApi extends base_1.BaseAPI {
412
519
  * @param {number} [currentPage]
413
520
  * @param {number} [userId]
414
521
  * @param {boolean} [externallyInitiated]
522
+ * @param {number} [id]
523
+ * @param {string} [code]
415
524
  * @param {*} [options] Override http request option.
416
525
  * @throws {RequiredError}
417
526
  * @memberof ChatsApi
418
527
  */
419
- getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, options) {
528
+ getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, code, options) {
420
529
  return __awaiter(this, void 0, void 0, function* () {
421
- return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, options).then((request) => request(this.axios, this.basePath));
530
+ return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, code, options).then((request) => request(this.axios, this.basePath));
422
531
  });
423
532
  }
424
533
  /**
@@ -0,0 +1,125 @@
1
+ /**
2
+ * whatsapp-bridge Node Api
3
+ * The whatsapp-bridge API description
4
+ *
5
+ * OpenAPI spec version: 0.0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by the swagger code generator program.
9
+ * https://github.com/swagger-api/swagger-codegen.git
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { ApplyForLoanResponseDto } from '../models';
16
+ import { SignatureDataDto } from '../models';
17
+ /**
18
+ * FlowsApi - axios parameter creator
19
+ * @export
20
+ */
21
+ export declare const FlowsApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ *
24
+ * @param {SignatureDataDto} body
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ applyForLoan: (body: SignatureDataDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ *
31
+ * @param {*} [options] Override http request option.
32
+ * @throws {RequiredError}
33
+ */
34
+ flowsControllerHandleGet: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
35
+ /**
36
+ *
37
+ * @param {number} leadId
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ flowsControllerHandleGet2: (leadId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
42
+ };
43
+ /**
44
+ * FlowsApi - functional programming interface
45
+ * @export
46
+ */
47
+ export declare const FlowsApiFp: (configuration?: Configuration) => {
48
+ /**
49
+ *
50
+ * @param {SignatureDataDto} body
51
+ * @param {*} [options] Override http request option.
52
+ * @throws {RequiredError}
53
+ */
54
+ applyForLoan(body: SignatureDataDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ApplyForLoanResponseDto>>>;
55
+ /**
56
+ *
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ flowsControllerHandleGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
61
+ /**
62
+ *
63
+ * @param {number} leadId
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ */
67
+ flowsControllerHandleGet2(leadId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
68
+ };
69
+ /**
70
+ * FlowsApi - factory interface
71
+ * @export
72
+ */
73
+ export declare const FlowsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
74
+ /**
75
+ *
76
+ * @param {SignatureDataDto} body
77
+ * @param {*} [options] Override http request option.
78
+ * @throws {RequiredError}
79
+ */
80
+ applyForLoan(body: SignatureDataDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ApplyForLoanResponseDto>>;
81
+ /**
82
+ *
83
+ * @param {*} [options] Override http request option.
84
+ * @throws {RequiredError}
85
+ */
86
+ flowsControllerHandleGet(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
87
+ /**
88
+ *
89
+ * @param {number} leadId
90
+ * @param {*} [options] Override http request option.
91
+ * @throws {RequiredError}
92
+ */
93
+ flowsControllerHandleGet2(leadId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
94
+ };
95
+ /**
96
+ * FlowsApi - object-oriented interface
97
+ * @export
98
+ * @class FlowsApi
99
+ * @extends {BaseAPI}
100
+ */
101
+ export declare class FlowsApi extends BaseAPI {
102
+ /**
103
+ *
104
+ * @param {SignatureDataDto} body
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ * @memberof FlowsApi
108
+ */
109
+ applyForLoan(body: SignatureDataDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ApplyForLoanResponseDto>>;
110
+ /**
111
+ *
112
+ * @param {*} [options] Override http request option.
113
+ * @throws {RequiredError}
114
+ * @memberof FlowsApi
115
+ */
116
+ flowsControllerHandleGet(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
117
+ /**
118
+ *
119
+ * @param {number} leadId
120
+ * @param {*} [options] Override http request option.
121
+ * @throws {RequiredError}
122
+ * @memberof FlowsApi
123
+ */
124
+ flowsControllerHandleGet2(leadId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
125
+ }
@@ -0,0 +1,283 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * whatsapp-bridge Node Api
6
+ * The whatsapp-bridge API description
7
+ *
8
+ * OpenAPI spec version: 0.0.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by the swagger code generator program.
12
+ * https://github.com/swagger-api/swagger-codegen.git
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.FlowsApi = exports.FlowsApiFactory = exports.FlowsApiFp = exports.FlowsApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const base_1 = require("../base");
30
+ /**
31
+ * FlowsApi - axios parameter creator
32
+ * @export
33
+ */
34
+ const FlowsApiAxiosParamCreator = function (configuration) {
35
+ return {
36
+ /**
37
+ *
38
+ * @param {SignatureDataDto} body
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ applyForLoan: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
43
+ // verify required parameter 'body' is not null or undefined
44
+ if (body === null || body === undefined) {
45
+ throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling applyForLoan.');
46
+ }
47
+ const localVarPath = `/api/flows/apply-for-loan`;
48
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
49
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
50
+ let baseOptions;
51
+ if (configuration) {
52
+ baseOptions = configuration.baseOptions;
53
+ }
54
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
55
+ const localVarHeaderParameter = {};
56
+ const localVarQueryParameter = {};
57
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58
+ const query = new URLSearchParams(localVarUrlObj.search);
59
+ for (const key in localVarQueryParameter) {
60
+ query.set(key, localVarQueryParameter[key]);
61
+ }
62
+ for (const key in options.params) {
63
+ query.set(key, options.params[key]);
64
+ }
65
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
66
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
67
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
68
+ const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
69
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
70
+ return {
71
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
72
+ options: localVarRequestOptions,
73
+ };
74
+ }),
75
+ /**
76
+ *
77
+ * @param {*} [options] Override http request option.
78
+ * @throws {RequiredError}
79
+ */
80
+ flowsControllerHandleGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
81
+ const localVarPath = `/api/flows`;
82
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
83
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
84
+ let baseOptions;
85
+ if (configuration) {
86
+ baseOptions = configuration.baseOptions;
87
+ }
88
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
89
+ const localVarHeaderParameter = {};
90
+ const localVarQueryParameter = {};
91
+ const query = new URLSearchParams(localVarUrlObj.search);
92
+ for (const key in localVarQueryParameter) {
93
+ query.set(key, localVarQueryParameter[key]);
94
+ }
95
+ for (const key in options.params) {
96
+ query.set(key, options.params[key]);
97
+ }
98
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
99
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
100
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
101
+ return {
102
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
103
+ options: localVarRequestOptions,
104
+ };
105
+ }),
106
+ /**
107
+ *
108
+ * @param {number} leadId
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ flowsControllerHandleGet2: (leadId_1, ...args_1) => __awaiter(this, [leadId_1, ...args_1], void 0, function* (leadId, options = {}) {
113
+ // verify required parameter 'leadId' is not null or undefined
114
+ if (leadId === null || leadId === undefined) {
115
+ throw new base_1.RequiredError('leadId', 'Required parameter leadId was null or undefined when calling flowsControllerHandleGet2.');
116
+ }
117
+ const localVarPath = `/api/flows/getOffer/{leadId}`
118
+ .replace(`{${"leadId"}}`, encodeURIComponent(String(leadId)));
119
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
120
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
121
+ let baseOptions;
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ }
125
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
126
+ const localVarHeaderParameter = {};
127
+ const localVarQueryParameter = {};
128
+ const query = new URLSearchParams(localVarUrlObj.search);
129
+ for (const key in localVarQueryParameter) {
130
+ query.set(key, localVarQueryParameter[key]);
131
+ }
132
+ for (const key in options.params) {
133
+ query.set(key, options.params[key]);
134
+ }
135
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
136
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
138
+ return {
139
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
140
+ options: localVarRequestOptions,
141
+ };
142
+ }),
143
+ };
144
+ };
145
+ exports.FlowsApiAxiosParamCreator = FlowsApiAxiosParamCreator;
146
+ /**
147
+ * FlowsApi - functional programming interface
148
+ * @export
149
+ */
150
+ const FlowsApiFp = function (configuration) {
151
+ return {
152
+ /**
153
+ *
154
+ * @param {SignatureDataDto} body
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ */
158
+ applyForLoan(body, options) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ const localVarAxiosArgs = yield (0, exports.FlowsApiAxiosParamCreator)(configuration).applyForLoan(body, options);
161
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
162
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
163
+ return axios.request(axiosRequestArgs);
164
+ };
165
+ });
166
+ },
167
+ /**
168
+ *
169
+ * @param {*} [options] Override http request option.
170
+ * @throws {RequiredError}
171
+ */
172
+ flowsControllerHandleGet(options) {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ const localVarAxiosArgs = yield (0, exports.FlowsApiAxiosParamCreator)(configuration).flowsControllerHandleGet(options);
175
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
176
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
177
+ return axios.request(axiosRequestArgs);
178
+ };
179
+ });
180
+ },
181
+ /**
182
+ *
183
+ * @param {number} leadId
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ */
187
+ flowsControllerHandleGet2(leadId, options) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const localVarAxiosArgs = yield (0, exports.FlowsApiAxiosParamCreator)(configuration).flowsControllerHandleGet2(leadId, options);
190
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
191
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
192
+ return axios.request(axiosRequestArgs);
193
+ };
194
+ });
195
+ },
196
+ };
197
+ };
198
+ exports.FlowsApiFp = FlowsApiFp;
199
+ /**
200
+ * FlowsApi - factory interface
201
+ * @export
202
+ */
203
+ const FlowsApiFactory = function (configuration, basePath, axios) {
204
+ return {
205
+ /**
206
+ *
207
+ * @param {SignatureDataDto} body
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ applyForLoan(body, options) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ return (0, exports.FlowsApiFp)(configuration).applyForLoan(body, options).then((request) => request(axios, basePath));
214
+ });
215
+ },
216
+ /**
217
+ *
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ flowsControllerHandleGet(options) {
222
+ return __awaiter(this, void 0, void 0, function* () {
223
+ return (0, exports.FlowsApiFp)(configuration).flowsControllerHandleGet(options).then((request) => request(axios, basePath));
224
+ });
225
+ },
226
+ /**
227
+ *
228
+ * @param {number} leadId
229
+ * @param {*} [options] Override http request option.
230
+ * @throws {RequiredError}
231
+ */
232
+ flowsControllerHandleGet2(leadId, options) {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ return (0, exports.FlowsApiFp)(configuration).flowsControllerHandleGet2(leadId, options).then((request) => request(axios, basePath));
235
+ });
236
+ },
237
+ };
238
+ };
239
+ exports.FlowsApiFactory = FlowsApiFactory;
240
+ /**
241
+ * FlowsApi - object-oriented interface
242
+ * @export
243
+ * @class FlowsApi
244
+ * @extends {BaseAPI}
245
+ */
246
+ class FlowsApi extends base_1.BaseAPI {
247
+ /**
248
+ *
249
+ * @param {SignatureDataDto} body
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ * @memberof FlowsApi
253
+ */
254
+ applyForLoan(body, options) {
255
+ return __awaiter(this, void 0, void 0, function* () {
256
+ return (0, exports.FlowsApiFp)(this.configuration).applyForLoan(body, options).then((request) => request(this.axios, this.basePath));
257
+ });
258
+ }
259
+ /**
260
+ *
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ * @memberof FlowsApi
264
+ */
265
+ flowsControllerHandleGet(options) {
266
+ return __awaiter(this, void 0, void 0, function* () {
267
+ return (0, exports.FlowsApiFp)(this.configuration).flowsControllerHandleGet(options).then((request) => request(this.axios, this.basePath));
268
+ });
269
+ }
270
+ /**
271
+ *
272
+ * @param {number} leadId
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ * @memberof FlowsApi
276
+ */
277
+ flowsControllerHandleGet2(leadId, options) {
278
+ return __awaiter(this, void 0, void 0, function* () {
279
+ return (0, exports.FlowsApiFp)(this.configuration).flowsControllerHandleGet2(leadId, options).then((request) => request(this.axios, this.basePath));
280
+ });
281
+ }
282
+ }
283
+ exports.FlowsApi = FlowsApi;