@emilgroup/public-api-sdk-node 1.26.0 → 1.27.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 (172) hide show
  1. package/README.md +2 -2
  2. package/dist/api/address-completions-validations-api.d.ts +215 -0
  3. package/dist/api/address-completions-validations-api.js +373 -0
  4. package/dist/api/default-api.d.ts +66 -0
  5. package/dist/api/default-api.js +200 -0
  6. package/dist/api/documents-api.d.ts +539 -0
  7. package/dist/api/documents-api.js +855 -0
  8. package/dist/api/leads-api.d.ts +441 -0
  9. package/dist/api/leads-api.js +791 -0
  10. package/dist/api/notifications-api.d.ts +211 -0
  11. package/dist/api/notifications-api.js +414 -0
  12. package/dist/api/payments-setup-api.d.ts +228 -0
  13. package/dist/api/payments-setup-api.js +426 -0
  14. package/dist/api/products-api.d.ts +563 -0
  15. package/dist/api/products-api.js +926 -0
  16. package/dist/api.d.ts +18 -0
  17. package/dist/api.js +36 -0
  18. package/dist/base.d.ts +78 -0
  19. package/dist/base.js +394 -0
  20. package/dist/common.d.ts +92 -0
  21. package/dist/common.js +277 -0
  22. package/dist/configuration.d.ts +90 -0
  23. package/dist/configuration.js +44 -0
  24. package/dist/index.d.ts +15 -0
  25. package/dist/index.js +36 -0
  26. package/dist/models/address-completion-item-class.d.ts +49 -0
  27. package/dist/models/address-completion-item-class.js +15 -0
  28. package/dist/models/address-completion-response-class.d.ts +25 -0
  29. package/dist/models/address-completion-response-class.js +15 -0
  30. package/dist/models/address-field-score-class.d.ts +48 -0
  31. package/dist/models/address-field-score-class.js +15 -0
  32. package/dist/models/calculate-product-fields-request-dto.d.ts +31 -0
  33. package/dist/models/calculate-product-fields-request-dto.js +15 -0
  34. package/dist/models/calculate-product-fields-response-class.d.ts +25 -0
  35. package/dist/models/calculate-product-fields-response-class.js +15 -0
  36. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  37. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  38. package/dist/models/complete-email-verification-dto.d.ts +30 -0
  39. package/dist/models/complete-email-verification-dto.js +15 -0
  40. package/dist/models/complete-email-verification-response-class.d.ts +24 -0
  41. package/dist/models/complete-email-verification-response-class.js +15 -0
  42. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  43. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  44. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  45. package/dist/models/complete-payment-setup-response-class.js +15 -0
  46. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  47. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  48. package/dist/models/create-account-request-dto.d.ts +132 -0
  49. package/dist/models/create-account-request-dto.js +31 -0
  50. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  51. package/dist/models/create-bank-account-request-dto.js +15 -0
  52. package/dist/models/create-custom-application-request-dto.d.ts +35 -0
  53. package/dist/models/create-custom-application-request-dto.js +20 -0
  54. package/dist/models/create-custom-application-response-class.d.ts +24 -0
  55. package/dist/models/create-custom-application-response-class.js +15 -0
  56. package/dist/models/create-document-request-dto.d.ts +132 -0
  57. package/dist/models/create-document-request-dto.js +43 -0
  58. package/dist/models/create-estimated-invoice-request-dto.d.ts +55 -0
  59. package/dist/models/create-estimated-invoice-request-dto.js +20 -0
  60. package/dist/models/create-estimated-invoice-response-class.d.ts +38 -0
  61. package/dist/models/create-estimated-invoice-response-class.js +15 -0
  62. package/dist/models/create-lead-async-response-class.d.ts +24 -0
  63. package/dist/models/create-lead-async-response-class.js +15 -0
  64. package/dist/models/create-lead-request-dto.d.ts +108 -0
  65. package/dist/models/create-lead-request-dto.js +15 -0
  66. package/dist/models/create-lead-response-class.d.ts +25 -0
  67. package/dist/models/create-lead-response-class.js +15 -0
  68. package/dist/models/create-payment-method-request-dto.d.ts +36 -0
  69. package/dist/models/create-payment-method-request-dto.js +20 -0
  70. package/dist/models/create-presigned-post-request-dto.d.ts +128 -0
  71. package/dist/models/create-presigned-post-request-dto.js +52 -0
  72. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  73. package/dist/models/create-presigned-post-response-class.js +15 -0
  74. package/dist/models/document-class.d.ts +144 -0
  75. package/dist/models/document-class.js +49 -0
  76. package/dist/models/get-custom-css-response-class.d.ts +24 -0
  77. package/dist/models/get-custom-css-response-class.js +15 -0
  78. package/dist/models/get-lead-response-class.d.ts +25 -0
  79. package/dist/models/get-lead-response-class.js +15 -0
  80. package/dist/models/get-product-document-download-url-response-class.d.ts +24 -0
  81. package/dist/models/get-product-document-download-url-response-class.js +15 -0
  82. package/dist/models/get-public-psp-settings-response-class.d.ts +30 -0
  83. package/dist/models/get-public-psp-settings-response-class.js +15 -0
  84. package/dist/models/index.d.ts +72 -0
  85. package/dist/models/index.js +88 -0
  86. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
  87. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  88. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  89. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  90. package/dist/models/initiate-email-verification-dto.d.ts +30 -0
  91. package/dist/models/initiate-email-verification-dto.js +15 -0
  92. package/dist/models/initiate-email-verification-response-class.d.ts +24 -0
  93. package/dist/models/initiate-email-verification-response-class.js +15 -0
  94. package/dist/models/initiate-lead-response-class.d.ts +24 -0
  95. package/dist/models/initiate-lead-response-class.js +15 -0
  96. package/dist/models/initiate-payment-setup-request-dto.d.ts +32 -0
  97. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  98. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  99. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  100. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
  101. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  102. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  103. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  104. package/dist/models/inline-response200.d.ts +54 -0
  105. package/dist/models/inline-response200.js +15 -0
  106. package/dist/models/inline-response503.d.ts +54 -0
  107. package/dist/models/inline-response503.js +15 -0
  108. package/dist/models/insured-object-class.d.ts +85 -0
  109. package/dist/models/insured-object-class.js +15 -0
  110. package/dist/models/insured-object-type-class.d.ts +48 -0
  111. package/dist/models/insured-object-type-class.js +15 -0
  112. package/dist/models/invoice-class.d.ts +134 -0
  113. package/dist/models/invoice-class.js +15 -0
  114. package/dist/models/invoice-item-class.d.ts +120 -0
  115. package/dist/models/invoice-item-class.js +15 -0
  116. package/dist/models/invoice-status-class.d.ts +42 -0
  117. package/dist/models/invoice-status-class.js +15 -0
  118. package/dist/models/lead-account-class.d.ts +109 -0
  119. package/dist/models/lead-account-class.js +22 -0
  120. package/dist/models/lead-bank-account-class.d.ts +30 -0
  121. package/dist/models/lead-bank-account-class.js +15 -0
  122. package/dist/models/lead-class.d.ts +109 -0
  123. package/dist/models/lead-class.js +15 -0
  124. package/dist/models/lead-policy-class.d.ts +43 -0
  125. package/dist/models/lead-policy-class.js +15 -0
  126. package/dist/models/lead-policy-object-class.d.ts +36 -0
  127. package/dist/models/lead-policy-object-class.js +15 -0
  128. package/dist/models/list-documents-response-class.d.ts +31 -0
  129. package/dist/models/list-documents-response-class.js +15 -0
  130. package/dist/models/list-product-documents-response-class.d.ts +31 -0
  131. package/dist/models/list-product-documents-response-class.js +15 -0
  132. package/dist/models/list-products-response-class.d.ts +31 -0
  133. package/dist/models/list-products-response-class.js +15 -0
  134. package/dist/models/payment-method-class.d.ts +60 -0
  135. package/dist/models/payment-method-class.js +15 -0
  136. package/dist/models/policy-object-request-dto.d.ts +42 -0
  137. package/dist/models/policy-object-request-dto.js +15 -0
  138. package/dist/models/policy-object-response-class.d.ts +36 -0
  139. package/dist/models/policy-object-response-class.js +15 -0
  140. package/dist/models/premium-override-dto.d.ts +55 -0
  141. package/dist/models/premium-override-dto.js +27 -0
  142. package/dist/models/premium-override-request-dto.d.ts +25 -0
  143. package/dist/models/premium-override-request-dto.js +15 -0
  144. package/dist/models/product-class.d.ts +80 -0
  145. package/dist/models/product-class.js +15 -0
  146. package/dist/models/product-document-class.d.ts +111 -0
  147. package/dist/models/product-document-class.js +36 -0
  148. package/dist/models/product-factor-for-version-class.d.ts +60 -0
  149. package/dist/models/product-factor-for-version-class.js +15 -0
  150. package/dist/models/product-field-class.d.ts +132 -0
  151. package/dist/models/product-field-class.js +15 -0
  152. package/dist/models/product-version-class.d.ts +61 -0
  153. package/dist/models/product-version-class.js +22 -0
  154. package/dist/models/send-notification-request-dto.d.ts +36 -0
  155. package/dist/models/send-notification-request-dto.js +15 -0
  156. package/dist/models/send-notification-response-class.d.ts +24 -0
  157. package/dist/models/send-notification-response-class.js +15 -0
  158. package/dist/models/sepa-dto.d.ts +30 -0
  159. package/dist/models/sepa-dto.js +15 -0
  160. package/dist/models/structured-address-class.d.ts +54 -0
  161. package/dist/models/structured-address-class.js +15 -0
  162. package/dist/models/suggested-address-details-class.d.ts +90 -0
  163. package/dist/models/suggested-address-details-class.js +15 -0
  164. package/dist/models/update-lead-request-dto.d.ts +95 -0
  165. package/dist/models/update-lead-request-dto.js +15 -0
  166. package/dist/models/update-lead-response-class.d.ts +25 -0
  167. package/dist/models/update-lead-response-class.js +15 -0
  168. package/dist/models/uploaded-document-dto.d.ts +24 -0
  169. package/dist/models/uploaded-document-dto.js +15 -0
  170. package/dist/models/validate-address-response-class.d.ts +50 -0
  171. package/dist/models/validate-address-response-class.js +15 -0
  172. package/package.json +1 -1
@@ -0,0 +1,855 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil PublicAPI
6
+ * The Emil Public API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
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 (g && (g = 0, op[0] && (_ = 0)), _) 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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.DocumentsApi = exports.DocumentsApiFactory = exports.DocumentsApiFp = exports.DocumentsApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * DocumentsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var DocumentsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * This will create a temporary document.
101
+ * @summary Create the temporary document
102
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'createDocumentRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createTemporaryDocument', 'createDocumentRequestDto', createDocumentRequestDto);
116
+ localVarPath = "/publicapi/v1/documents";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createDocumentRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * This will delete a document for a lead by lead code and document code.Documents which were created within last 24 hours can be deleted.
150
+ * @summary Delete a document
151
+ * @param {string} leadCode
152
+ * @param {string} code
153
+ * @param {string} [authorization] Bearer Token
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ */
157
+ deleteDocuments: function (leadCode, code, authorization, options) {
158
+ if (options === void 0) { options = {}; }
159
+ return __awaiter(_this, void 0, void 0, function () {
160
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
161
+ return __generator(this, function (_a) {
162
+ switch (_a.label) {
163
+ case 0:
164
+ // verify required parameter 'leadCode' is not null or undefined
165
+ (0, common_1.assertParamExists)('deleteDocuments', 'leadCode', leadCode);
166
+ // verify required parameter 'code' is not null or undefined
167
+ (0, common_1.assertParamExists)('deleteDocuments', 'code', code);
168
+ localVarPath = "/publicapi/v1/documents/{code}/lead/{leadCode}"
169
+ .replace("{".concat("leadCode", "}"), encodeURIComponent(String(leadCode)))
170
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
171
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
172
+ if (configuration) {
173
+ baseOptions = configuration.baseOptions;
174
+ baseAccessToken = configuration.accessToken;
175
+ }
176
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
177
+ localVarHeaderParameter = {};
178
+ localVarQueryParameter = {};
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
182
+ case 1:
183
+ // authentication bearer required
184
+ // http bearer authentication required
185
+ _a.sent();
186
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
187
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
188
+ }
189
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
190
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
192
+ return [2 /*return*/, {
193
+ url: (0, common_1.toPathString)(localVarUrlObj),
194
+ options: localVarRequestOptions,
195
+ }];
196
+ }
197
+ });
198
+ });
199
+ },
200
+ /**
201
+ * Retrieves the details of the specific document that was previously created. Supply the unique document code that was returned when you created it and Emil Api will return the corresponding document file to download.
202
+ * @summary Download a document
203
+ * @param {string} code
204
+ * @param {string} [authorization] Bearer Token
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ downloadDocument: function (code, authorization, options) {
209
+ if (options === void 0) { options = {}; }
210
+ return __awaiter(_this, void 0, void 0, function () {
211
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
212
+ return __generator(this, function (_a) {
213
+ switch (_a.label) {
214
+ case 0:
215
+ // verify required parameter 'code' is not null or undefined
216
+ (0, common_1.assertParamExists)('downloadDocument', 'code', code);
217
+ localVarPath = "/publicapi/v1/documents/download/{code}"
218
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
219
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
220
+ if (configuration) {
221
+ baseOptions = configuration.baseOptions;
222
+ baseAccessToken = configuration.accessToken;
223
+ }
224
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
225
+ localVarHeaderParameter = {};
226
+ localVarQueryParameter = {};
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
230
+ case 1:
231
+ // authentication bearer required
232
+ // http bearer authentication required
233
+ _a.sent();
234
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
235
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
236
+ }
237
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
238
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
239
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
240
+ return [2 /*return*/, {
241
+ url: (0, common_1.toPathString)(localVarUrlObj),
242
+ options: localVarRequestOptions,
243
+ }];
244
+ }
245
+ });
246
+ });
247
+ },
248
+ /**
249
+ *
250
+ * @summary Get pre-signed url for downloading product document
251
+ * @param {string} productCode
252
+ * @param {string} code
253
+ * @param {string} [authorization] Bearer Token
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ */
257
+ downloadProductDocumentUrl: function (productCode, code, authorization, options) {
258
+ if (options === void 0) { options = {}; }
259
+ return __awaiter(_this, void 0, void 0, function () {
260
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
261
+ return __generator(this, function (_a) {
262
+ switch (_a.label) {
263
+ case 0:
264
+ // verify required parameter 'productCode' is not null or undefined
265
+ (0, common_1.assertParamExists)('downloadProductDocumentUrl', 'productCode', productCode);
266
+ // verify required parameter 'code' is not null or undefined
267
+ (0, common_1.assertParamExists)('downloadProductDocumentUrl', 'code', code);
268
+ localVarPath = "/publicapi/v1/documents/product/{productCode}/{code}/download-url"
269
+ .replace("{".concat("productCode", "}"), encodeURIComponent(String(productCode)))
270
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
271
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
272
+ if (configuration) {
273
+ baseOptions = configuration.baseOptions;
274
+ baseAccessToken = configuration.accessToken;
275
+ }
276
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
277
+ localVarHeaderParameter = {};
278
+ localVarQueryParameter = {};
279
+ // authentication bearer required
280
+ // http bearer authentication required
281
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
282
+ case 1:
283
+ // authentication bearer required
284
+ // http bearer authentication required
285
+ _a.sent();
286
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
287
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
288
+ }
289
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
290
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
291
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
292
+ return [2 /*return*/, {
293
+ url: (0, common_1.toPathString)(localVarUrlObj),
294
+ options: localVarRequestOptions,
295
+ }];
296
+ }
297
+ });
298
+ });
299
+ },
300
+ /**
301
+ * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
302
+ * @summary List documents
303
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
304
+ * @param {string} [authorization] Bearer Token
305
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
306
+ * @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.
307
+ * @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.
308
+ * @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.
309
+ * @param {*} [options] Override http request option.
310
+ * @throws {RequiredError}
311
+ */
312
+ listDocuments: function (filter, authorization, pageSize, pageToken, order, expand, options) {
313
+ if (options === void 0) { options = {}; }
314
+ return __awaiter(_this, void 0, void 0, function () {
315
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
316
+ return __generator(this, function (_a) {
317
+ switch (_a.label) {
318
+ case 0:
319
+ // verify required parameter 'filter' is not null or undefined
320
+ (0, common_1.assertParamExists)('listDocuments', 'filter', filter);
321
+ localVarPath = "/publicapi/v1/documents";
322
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
323
+ if (configuration) {
324
+ baseOptions = configuration.baseOptions;
325
+ baseAccessToken = configuration.accessToken;
326
+ }
327
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
328
+ localVarHeaderParameter = {};
329
+ localVarQueryParameter = {};
330
+ // authentication bearer required
331
+ // http bearer authentication required
332
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
333
+ case 1:
334
+ // authentication bearer required
335
+ // http bearer authentication required
336
+ _a.sent();
337
+ if (pageSize !== undefined) {
338
+ localVarQueryParameter['pageSize'] = pageSize;
339
+ }
340
+ if (pageToken !== undefined) {
341
+ localVarQueryParameter['pageToken'] = pageToken;
342
+ }
343
+ if (filter !== undefined) {
344
+ localVarQueryParameter['filter'] = filter;
345
+ }
346
+ if (order !== undefined) {
347
+ localVarQueryParameter['order'] = order;
348
+ }
349
+ if (expand !== undefined) {
350
+ localVarQueryParameter['expand'] = expand;
351
+ }
352
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
353
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
354
+ }
355
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
356
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
357
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
358
+ return [2 /*return*/, {
359
+ url: (0, common_1.toPathString)(localVarUrlObj),
360
+ options: localVarRequestOptions,
361
+ }];
362
+ }
363
+ });
364
+ });
365
+ },
366
+ /**
367
+ * Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
368
+ * @summary List product documents
369
+ * @param {string} productCode
370
+ * @param {string} [authorization] Bearer Token
371
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
372
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
373
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
374
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
375
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
376
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
377
+ * @param {*} [options] Override http request option.
378
+ * @throws {RequiredError}
379
+ */
380
+ listProductDocuments: function (productCode, authorization, pageSize, pageToken, filter, search, order, expand, options) {
381
+ if (options === void 0) { options = {}; }
382
+ return __awaiter(_this, void 0, void 0, function () {
383
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
384
+ return __generator(this, function (_a) {
385
+ switch (_a.label) {
386
+ case 0:
387
+ // verify required parameter 'productCode' is not null or undefined
388
+ (0, common_1.assertParamExists)('listProductDocuments', 'productCode', productCode);
389
+ localVarPath = "/publicapi/v1/documents/{productCode}"
390
+ .replace("{".concat("productCode", "}"), encodeURIComponent(String(productCode)));
391
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
392
+ if (configuration) {
393
+ baseOptions = configuration.baseOptions;
394
+ baseAccessToken = configuration.accessToken;
395
+ }
396
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
397
+ localVarHeaderParameter = {};
398
+ localVarQueryParameter = {};
399
+ // authentication bearer required
400
+ // http bearer authentication required
401
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
402
+ case 1:
403
+ // authentication bearer required
404
+ // http bearer authentication required
405
+ _a.sent();
406
+ if (pageSize !== undefined) {
407
+ localVarQueryParameter['pageSize'] = pageSize;
408
+ }
409
+ if (pageToken !== undefined) {
410
+ localVarQueryParameter['pageToken'] = pageToken;
411
+ }
412
+ if (filter !== undefined) {
413
+ localVarQueryParameter['filter'] = filter;
414
+ }
415
+ if (search !== undefined) {
416
+ localVarQueryParameter['search'] = search;
417
+ }
418
+ if (order !== undefined) {
419
+ localVarQueryParameter['order'] = order;
420
+ }
421
+ if (expand !== undefined) {
422
+ localVarQueryParameter['expand'] = expand;
423
+ }
424
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
425
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
426
+ }
427
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
428
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
429
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
430
+ return [2 /*return*/, {
431
+ url: (0, common_1.toPathString)(localVarUrlObj),
432
+ options: localVarRequestOptions,
433
+ }];
434
+ }
435
+ });
436
+ });
437
+ },
438
+ /**
439
+ * This will create a URL that allows user upload its documents in Database.The URL can expire between 5 minutes and 7 days.
440
+ * @summary Upload documents using pre-signed URL
441
+ * @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
442
+ * @param {string} [authorization] Bearer Token
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ preSignedPost: function (createPresignedPostRequestDto, authorization, options) {
447
+ if (options === void 0) { options = {}; }
448
+ return __awaiter(_this, void 0, void 0, function () {
449
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
450
+ return __generator(this, function (_a) {
451
+ switch (_a.label) {
452
+ case 0:
453
+ // verify required parameter 'createPresignedPostRequestDto' is not null or undefined
454
+ (0, common_1.assertParamExists)('preSignedPost', 'createPresignedPostRequestDto', createPresignedPostRequestDto);
455
+ localVarPath = "/publicapi/v1/documents/pre-signed-post";
456
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
457
+ if (configuration) {
458
+ baseOptions = configuration.baseOptions;
459
+ baseAccessToken = configuration.accessToken;
460
+ }
461
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
462
+ localVarHeaderParameter = {};
463
+ localVarQueryParameter = {};
464
+ // authentication bearer required
465
+ // http bearer authentication required
466
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
467
+ case 1:
468
+ // authentication bearer required
469
+ // http bearer authentication required
470
+ _a.sent();
471
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
472
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
473
+ }
474
+ localVarHeaderParameter['Content-Type'] = 'application/json';
475
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
476
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
477
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
478
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPresignedPostRequestDto, localVarRequestOptions, configuration);
479
+ return [2 /*return*/, {
480
+ url: (0, common_1.toPathString)(localVarUrlObj),
481
+ options: localVarRequestOptions,
482
+ }];
483
+ }
484
+ });
485
+ });
486
+ },
487
+ };
488
+ };
489
+ exports.DocumentsApiAxiosParamCreator = DocumentsApiAxiosParamCreator;
490
+ /**
491
+ * DocumentsApi - functional programming interface
492
+ * @export
493
+ */
494
+ var DocumentsApiFp = function (configuration) {
495
+ var localVarAxiosParamCreator = (0, exports.DocumentsApiAxiosParamCreator)(configuration);
496
+ return {
497
+ /**
498
+ * This will create a temporary document.
499
+ * @summary Create the temporary document
500
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
501
+ * @param {string} [authorization] Bearer Token
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ */
505
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
506
+ return __awaiter(this, void 0, void 0, function () {
507
+ var localVarAxiosArgs;
508
+ return __generator(this, function (_a) {
509
+ switch (_a.label) {
510
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createTemporaryDocument(createDocumentRequestDto, authorization, options)];
511
+ case 1:
512
+ localVarAxiosArgs = _a.sent();
513
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
514
+ }
515
+ });
516
+ });
517
+ },
518
+ /**
519
+ * This will delete a document for a lead by lead code and document code.Documents which were created within last 24 hours can be deleted.
520
+ * @summary Delete a document
521
+ * @param {string} leadCode
522
+ * @param {string} code
523
+ * @param {string} [authorization] Bearer Token
524
+ * @param {*} [options] Override http request option.
525
+ * @throws {RequiredError}
526
+ */
527
+ deleteDocuments: function (leadCode, code, authorization, options) {
528
+ return __awaiter(this, void 0, void 0, function () {
529
+ var localVarAxiosArgs;
530
+ return __generator(this, function (_a) {
531
+ switch (_a.label) {
532
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteDocuments(leadCode, code, authorization, options)];
533
+ case 1:
534
+ localVarAxiosArgs = _a.sent();
535
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
536
+ }
537
+ });
538
+ });
539
+ },
540
+ /**
541
+ * Retrieves the details of the specific document that was previously created. Supply the unique document code that was returned when you created it and Emil Api will return the corresponding document file to download.
542
+ * @summary Download a document
543
+ * @param {string} code
544
+ * @param {string} [authorization] Bearer Token
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ downloadDocument: function (code, authorization, options) {
549
+ return __awaiter(this, void 0, void 0, function () {
550
+ var localVarAxiosArgs;
551
+ return __generator(this, function (_a) {
552
+ switch (_a.label) {
553
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadDocument(code, authorization, options)];
554
+ case 1:
555
+ localVarAxiosArgs = _a.sent();
556
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
557
+ }
558
+ });
559
+ });
560
+ },
561
+ /**
562
+ *
563
+ * @summary Get pre-signed url for downloading product document
564
+ * @param {string} productCode
565
+ * @param {string} code
566
+ * @param {string} [authorization] Bearer Token
567
+ * @param {*} [options] Override http request option.
568
+ * @throws {RequiredError}
569
+ */
570
+ downloadProductDocumentUrl: function (productCode, code, authorization, options) {
571
+ return __awaiter(this, void 0, void 0, function () {
572
+ var localVarAxiosArgs;
573
+ return __generator(this, function (_a) {
574
+ switch (_a.label) {
575
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, options)];
576
+ case 1:
577
+ localVarAxiosArgs = _a.sent();
578
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
579
+ }
580
+ });
581
+ });
582
+ },
583
+ /**
584
+ * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
585
+ * @summary List documents
586
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
587
+ * @param {string} [authorization] Bearer Token
588
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
589
+ * @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.
590
+ * @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.
591
+ * @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.
592
+ * @param {*} [options] Override http request option.
593
+ * @throws {RequiredError}
594
+ */
595
+ listDocuments: function (filter, authorization, pageSize, pageToken, order, expand, options) {
596
+ return __awaiter(this, void 0, void 0, function () {
597
+ var localVarAxiosArgs;
598
+ return __generator(this, function (_a) {
599
+ switch (_a.label) {
600
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocuments(filter, authorization, pageSize, pageToken, order, expand, options)];
601
+ case 1:
602
+ localVarAxiosArgs = _a.sent();
603
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
604
+ }
605
+ });
606
+ });
607
+ },
608
+ /**
609
+ * Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
610
+ * @summary List product documents
611
+ * @param {string} productCode
612
+ * @param {string} [authorization] Bearer Token
613
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
614
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
615
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
616
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
617
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
618
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
619
+ * @param {*} [options] Override http request option.
620
+ * @throws {RequiredError}
621
+ */
622
+ listProductDocuments: function (productCode, authorization, pageSize, pageToken, filter, search, order, expand, options) {
623
+ return __awaiter(this, void 0, void 0, function () {
624
+ var localVarAxiosArgs;
625
+ return __generator(this, function (_a) {
626
+ switch (_a.label) {
627
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductDocuments(productCode, authorization, pageSize, pageToken, filter, search, order, expand, options)];
628
+ case 1:
629
+ localVarAxiosArgs = _a.sent();
630
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
631
+ }
632
+ });
633
+ });
634
+ },
635
+ /**
636
+ * This will create a URL that allows user upload its documents in Database.The URL can expire between 5 minutes and 7 days.
637
+ * @summary Upload documents using pre-signed URL
638
+ * @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
639
+ * @param {string} [authorization] Bearer Token
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ */
643
+ preSignedPost: function (createPresignedPostRequestDto, authorization, options) {
644
+ return __awaiter(this, void 0, void 0, function () {
645
+ var localVarAxiosArgs;
646
+ return __generator(this, function (_a) {
647
+ switch (_a.label) {
648
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.preSignedPost(createPresignedPostRequestDto, authorization, options)];
649
+ case 1:
650
+ localVarAxiosArgs = _a.sent();
651
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
652
+ }
653
+ });
654
+ });
655
+ },
656
+ };
657
+ };
658
+ exports.DocumentsApiFp = DocumentsApiFp;
659
+ /**
660
+ * DocumentsApi - factory interface
661
+ * @export
662
+ */
663
+ var DocumentsApiFactory = function (configuration, basePath, axios) {
664
+ var localVarFp = (0, exports.DocumentsApiFp)(configuration);
665
+ return {
666
+ /**
667
+ * This will create a temporary document.
668
+ * @summary Create the temporary document
669
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
670
+ * @param {string} [authorization] Bearer Token
671
+ * @param {*} [options] Override http request option.
672
+ * @throws {RequiredError}
673
+ */
674
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
675
+ return localVarFp.createTemporaryDocument(createDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
676
+ },
677
+ /**
678
+ * This will delete a document for a lead by lead code and document code.Documents which were created within last 24 hours can be deleted.
679
+ * @summary Delete a document
680
+ * @param {string} leadCode
681
+ * @param {string} code
682
+ * @param {string} [authorization] Bearer Token
683
+ * @param {*} [options] Override http request option.
684
+ * @throws {RequiredError}
685
+ */
686
+ deleteDocuments: function (leadCode, code, authorization, options) {
687
+ return localVarFp.deleteDocuments(leadCode, code, authorization, options).then(function (request) { return request(axios, basePath); });
688
+ },
689
+ /**
690
+ * Retrieves the details of the specific document that was previously created. Supply the unique document code that was returned when you created it and Emil Api will return the corresponding document file to download.
691
+ * @summary Download a document
692
+ * @param {string} code
693
+ * @param {string} [authorization] Bearer Token
694
+ * @param {*} [options] Override http request option.
695
+ * @throws {RequiredError}
696
+ */
697
+ downloadDocument: function (code, authorization, options) {
698
+ return localVarFp.downloadDocument(code, authorization, options).then(function (request) { return request(axios, basePath); });
699
+ },
700
+ /**
701
+ *
702
+ * @summary Get pre-signed url for downloading product document
703
+ * @param {string} productCode
704
+ * @param {string} code
705
+ * @param {string} [authorization] Bearer Token
706
+ * @param {*} [options] Override http request option.
707
+ * @throws {RequiredError}
708
+ */
709
+ downloadProductDocumentUrl: function (productCode, code, authorization, options) {
710
+ return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, options).then(function (request) { return request(axios, basePath); });
711
+ },
712
+ /**
713
+ * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
714
+ * @summary List documents
715
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
716
+ * @param {string} [authorization] Bearer Token
717
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
718
+ * @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.
719
+ * @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.
720
+ * @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.
721
+ * @param {*} [options] Override http request option.
722
+ * @throws {RequiredError}
723
+ */
724
+ listDocuments: function (filter, authorization, pageSize, pageToken, order, expand, options) {
725
+ return localVarFp.listDocuments(filter, authorization, pageSize, pageToken, order, expand, options).then(function (request) { return request(axios, basePath); });
726
+ },
727
+ /**
728
+ * Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
729
+ * @summary List product documents
730
+ * @param {string} productCode
731
+ * @param {string} [authorization] Bearer Token
732
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
733
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
734
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
735
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
736
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
737
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
738
+ * @param {*} [options] Override http request option.
739
+ * @throws {RequiredError}
740
+ */
741
+ listProductDocuments: function (productCode, authorization, pageSize, pageToken, filter, search, order, expand, options) {
742
+ return localVarFp.listProductDocuments(productCode, authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
743
+ },
744
+ /**
745
+ * This will create a URL that allows user upload its documents in Database.The URL can expire between 5 minutes and 7 days.
746
+ * @summary Upload documents using pre-signed URL
747
+ * @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
748
+ * @param {string} [authorization] Bearer Token
749
+ * @param {*} [options] Override http request option.
750
+ * @throws {RequiredError}
751
+ */
752
+ preSignedPost: function (createPresignedPostRequestDto, authorization, options) {
753
+ return localVarFp.preSignedPost(createPresignedPostRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
754
+ },
755
+ };
756
+ };
757
+ exports.DocumentsApiFactory = DocumentsApiFactory;
758
+ /**
759
+ * DocumentsApi - object-oriented interface
760
+ * @export
761
+ * @class DocumentsApi
762
+ * @extends {BaseAPI}
763
+ */
764
+ var DocumentsApi = /** @class */ (function (_super) {
765
+ __extends(DocumentsApi, _super);
766
+ function DocumentsApi() {
767
+ return _super !== null && _super.apply(this, arguments) || this;
768
+ }
769
+ /**
770
+ * This will create a temporary document.
771
+ * @summary Create the temporary document
772
+ * @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
773
+ * @param {*} [options] Override http request option.
774
+ * @throws {RequiredError}
775
+ * @memberof DocumentsApi
776
+ */
777
+ DocumentsApi.prototype.createTemporaryDocument = function (requestParameters, options) {
778
+ var _this = this;
779
+ return (0, exports.DocumentsApiFp)(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
780
+ };
781
+ /**
782
+ * This will delete a document for a lead by lead code and document code.Documents which were created within last 24 hours can be deleted.
783
+ * @summary Delete a document
784
+ * @param {DocumentsApiDeleteDocumentsRequest} requestParameters Request parameters.
785
+ * @param {*} [options] Override http request option.
786
+ * @throws {RequiredError}
787
+ * @memberof DocumentsApi
788
+ */
789
+ DocumentsApi.prototype.deleteDocuments = function (requestParameters, options) {
790
+ var _this = this;
791
+ return (0, exports.DocumentsApiFp)(this.configuration).deleteDocuments(requestParameters.leadCode, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
792
+ };
793
+ /**
794
+ * Retrieves the details of the specific document that was previously created. Supply the unique document code that was returned when you created it and Emil Api will return the corresponding document file to download.
795
+ * @summary Download a document
796
+ * @param {DocumentsApiDownloadDocumentRequest} requestParameters Request parameters.
797
+ * @param {*} [options] Override http request option.
798
+ * @throws {RequiredError}
799
+ * @memberof DocumentsApi
800
+ */
801
+ DocumentsApi.prototype.downloadDocument = function (requestParameters, options) {
802
+ var _this = this;
803
+ return (0, exports.DocumentsApiFp)(this.configuration).downloadDocument(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
804
+ };
805
+ /**
806
+ *
807
+ * @summary Get pre-signed url for downloading product document
808
+ * @param {DocumentsApiDownloadProductDocumentUrlRequest} requestParameters Request parameters.
809
+ * @param {*} [options] Override http request option.
810
+ * @throws {RequiredError}
811
+ * @memberof DocumentsApi
812
+ */
813
+ DocumentsApi.prototype.downloadProductDocumentUrl = function (requestParameters, options) {
814
+ var _this = this;
815
+ return (0, exports.DocumentsApiFp)(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
816
+ };
817
+ /**
818
+ * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
819
+ * @summary List documents
820
+ * @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
821
+ * @param {*} [options] Override http request option.
822
+ * @throws {RequiredError}
823
+ * @memberof DocumentsApi
824
+ */
825
+ DocumentsApi.prototype.listDocuments = function (requestParameters, options) {
826
+ var _this = this;
827
+ return (0, exports.DocumentsApiFp)(this.configuration).listDocuments(requestParameters.filter, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
828
+ };
829
+ /**
830
+ * Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
831
+ * @summary List product documents
832
+ * @param {DocumentsApiListProductDocumentsRequest} requestParameters Request parameters.
833
+ * @param {*} [options] Override http request option.
834
+ * @throws {RequiredError}
835
+ * @memberof DocumentsApi
836
+ */
837
+ DocumentsApi.prototype.listProductDocuments = function (requestParameters, options) {
838
+ var _this = this;
839
+ return (0, exports.DocumentsApiFp)(this.configuration).listProductDocuments(requestParameters.productCode, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
840
+ };
841
+ /**
842
+ * This will create a URL that allows user upload its documents in Database.The URL can expire between 5 minutes and 7 days.
843
+ * @summary Upload documents using pre-signed URL
844
+ * @param {DocumentsApiPreSignedPostRequest} requestParameters Request parameters.
845
+ * @param {*} [options] Override http request option.
846
+ * @throws {RequiredError}
847
+ * @memberof DocumentsApi
848
+ */
849
+ DocumentsApi.prototype.preSignedPost = function (requestParameters, options) {
850
+ var _this = this;
851
+ return (0, exports.DocumentsApiFp)(this.configuration).preSignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
852
+ };
853
+ return DocumentsApi;
854
+ }(base_1.BaseAPI));
855
+ exports.DocumentsApi = DocumentsApi;