@emilgroup/public-api-sdk 1.25.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +2 -2
  3. package/api/booking-funnels-api.ts +161 -0
  4. package/api/documents-api.ts +36 -22
  5. package/api/leads-api.ts +4 -4
  6. package/api/named-ranges-api.ts +250 -0
  7. package/api/products-api.ts +65 -38
  8. package/api.ts +4 -0
  9. package/base.ts +1 -0
  10. package/dist/api/address-completions-validations-api.d.ts +215 -0
  11. package/dist/api/address-completions-validations-api.js +369 -0
  12. package/dist/api/booking-funnels-api.d.ts +96 -0
  13. package/dist/api/booking-funnels-api.js +223 -0
  14. package/dist/api/default-api.d.ts +66 -0
  15. package/dist/api/default-api.js +196 -0
  16. package/dist/api/documents-api.d.ts +548 -0
  17. package/dist/api/documents-api.js +857 -0
  18. package/dist/api/leads-api.d.ts +441 -0
  19. package/dist/api/leads-api.js +787 -0
  20. package/dist/api/named-ranges-api.d.ts +150 -0
  21. package/dist/api/named-ranges-api.js +263 -0
  22. package/dist/api/notifications-api.d.ts +211 -0
  23. package/dist/api/notifications-api.js +410 -0
  24. package/dist/api/payments-setup-api.d.ts +228 -0
  25. package/dist/api/payments-setup-api.js +422 -0
  26. package/dist/api/products-api.d.ts +581 -0
  27. package/dist/api/products-api.js +933 -0
  28. package/dist/api.d.ts +20 -0
  29. package/dist/api.js +38 -0
  30. package/dist/base.d.ts +74 -0
  31. package/dist/base.js +299 -0
  32. package/dist/common.d.ts +91 -0
  33. package/dist/common.js +276 -0
  34. package/dist/configuration.d.ts +83 -0
  35. package/dist/configuration.js +44 -0
  36. package/dist/index.d.ts +15 -0
  37. package/dist/index.js +36 -0
  38. package/dist/models/address-completion-item-class.d.ts +49 -0
  39. package/dist/models/address-completion-item-class.js +15 -0
  40. package/dist/models/address-completion-response-class.d.ts +25 -0
  41. package/dist/models/address-completion-response-class.js +15 -0
  42. package/dist/models/address-field-score-class.d.ts +48 -0
  43. package/dist/models/address-field-score-class.js +15 -0
  44. package/dist/models/booking-funnel-class.d.ts +90 -0
  45. package/dist/models/booking-funnel-class.js +15 -0
  46. package/dist/models/calculate-product-fields-request-dto.d.ts +31 -0
  47. package/dist/models/calculate-product-fields-request-dto.js +15 -0
  48. package/dist/models/calculate-product-fields-response-class.d.ts +25 -0
  49. package/dist/models/calculate-product-fields-response-class.js +15 -0
  50. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  51. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  52. package/dist/models/complete-email-verification-dto.d.ts +30 -0
  53. package/dist/models/complete-email-verification-dto.js +15 -0
  54. package/dist/models/complete-email-verification-response-class.d.ts +24 -0
  55. package/dist/models/complete-email-verification-response-class.js +15 -0
  56. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  57. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  58. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  59. package/dist/models/complete-payment-setup-response-class.js +15 -0
  60. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  61. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  62. package/dist/models/create-account-request-dto.d.ts +132 -0
  63. package/dist/models/create-account-request-dto.js +31 -0
  64. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  65. package/dist/models/create-bank-account-request-dto.js +15 -0
  66. package/dist/models/create-custom-application-request-dto.d.ts +35 -0
  67. package/dist/models/create-custom-application-request-dto.js +20 -0
  68. package/dist/models/create-custom-application-response-class.d.ts +24 -0
  69. package/dist/models/create-custom-application-response-class.js +15 -0
  70. package/dist/models/create-document-request-dto.d.ts +132 -0
  71. package/dist/models/create-document-request-dto.js +43 -0
  72. package/dist/models/create-estimated-invoice-request-dto.d.ts +55 -0
  73. package/dist/models/create-estimated-invoice-request-dto.js +20 -0
  74. package/dist/models/create-estimated-invoice-response-class.d.ts +38 -0
  75. package/dist/models/create-estimated-invoice-response-class.js +15 -0
  76. package/dist/models/create-lead-async-response-class.d.ts +24 -0
  77. package/dist/models/create-lead-async-response-class.js +15 -0
  78. package/dist/models/create-lead-request-dto.d.ts +120 -0
  79. package/dist/models/create-lead-request-dto.js +15 -0
  80. package/dist/models/create-lead-response-class.d.ts +25 -0
  81. package/dist/models/create-lead-response-class.js +15 -0
  82. package/dist/models/create-payment-method-request-dto.d.ts +36 -0
  83. package/dist/models/create-payment-method-request-dto.js +20 -0
  84. package/dist/models/create-presigned-post-request-dto.d.ts +128 -0
  85. package/dist/models/create-presigned-post-request-dto.js +52 -0
  86. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  87. package/dist/models/create-presigned-post-response-class.js +15 -0
  88. package/dist/models/document-class.d.ts +144 -0
  89. package/dist/models/document-class.js +49 -0
  90. package/dist/models/filter-named-range-response-class.d.ts +42 -0
  91. package/dist/models/filter-named-range-response-class.js +15 -0
  92. package/dist/models/get-booking-funnel-response-class.d.ts +25 -0
  93. package/dist/models/get-booking-funnel-response-class.js +15 -0
  94. package/dist/models/get-custom-css-response-class.d.ts +24 -0
  95. package/dist/models/get-custom-css-response-class.js +15 -0
  96. package/dist/models/get-lead-response-class.d.ts +25 -0
  97. package/dist/models/get-lead-response-class.js +15 -0
  98. package/dist/models/get-product-document-download-url-response-class.d.ts +24 -0
  99. package/dist/models/get-product-document-download-url-response-class.js +15 -0
  100. package/dist/models/get-public-psp-settings-response-class.d.ts +30 -0
  101. package/dist/models/get-public-psp-settings-response-class.js +15 -0
  102. package/dist/models/index.d.ts +79 -0
  103. package/dist/models/index.js +95 -0
  104. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
  105. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  106. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  107. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  108. package/dist/models/initiate-email-verification-dto.d.ts +30 -0
  109. package/dist/models/initiate-email-verification-dto.js +15 -0
  110. package/dist/models/initiate-email-verification-response-class.d.ts +24 -0
  111. package/dist/models/initiate-email-verification-response-class.js +15 -0
  112. package/dist/models/initiate-lead-response-class.d.ts +24 -0
  113. package/dist/models/initiate-lead-response-class.js +15 -0
  114. package/dist/models/initiate-payment-setup-request-dto.d.ts +32 -0
  115. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  116. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  117. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  118. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
  119. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  120. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  121. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  122. package/dist/models/inline-response200.d.ts +54 -0
  123. package/dist/models/inline-response200.js +15 -0
  124. package/dist/models/inline-response503.d.ts +54 -0
  125. package/dist/models/inline-response503.js +15 -0
  126. package/dist/models/insured-object-class.d.ts +85 -0
  127. package/dist/models/insured-object-class.js +15 -0
  128. package/dist/models/insured-object-type-class.d.ts +48 -0
  129. package/dist/models/insured-object-type-class.js +15 -0
  130. package/dist/models/invoice-class.d.ts +134 -0
  131. package/dist/models/invoice-class.js +15 -0
  132. package/dist/models/invoice-item-class.d.ts +120 -0
  133. package/dist/models/invoice-item-class.js +15 -0
  134. package/dist/models/invoice-status-class.d.ts +42 -0
  135. package/dist/models/invoice-status-class.js +15 -0
  136. package/dist/models/lead-account-class.d.ts +109 -0
  137. package/dist/models/lead-account-class.js +22 -0
  138. package/dist/models/lead-bank-account-class.d.ts +30 -0
  139. package/dist/models/lead-bank-account-class.js +15 -0
  140. package/dist/models/lead-class.d.ts +116 -0
  141. package/dist/models/lead-class.js +15 -0
  142. package/dist/models/lead-policy-class.d.ts +43 -0
  143. package/dist/models/lead-policy-class.js +15 -0
  144. package/dist/models/lead-policy-object-class.d.ts +36 -0
  145. package/dist/models/lead-policy-object-class.js +15 -0
  146. package/dist/models/list-documents-response-class.d.ts +31 -0
  147. package/dist/models/list-documents-response-class.js +15 -0
  148. package/dist/models/list-product-documents-response-class.d.ts +31 -0
  149. package/dist/models/list-product-documents-response-class.js +15 -0
  150. package/dist/models/list-products-response-class.d.ts +31 -0
  151. package/dist/models/list-products-response-class.js +15 -0
  152. package/dist/models/partner-class.d.ts +60 -0
  153. package/dist/models/partner-class.js +15 -0
  154. package/dist/models/partner-link-class.d.ts +86 -0
  155. package/dist/models/partner-link-class.js +15 -0
  156. package/dist/models/partner-role-class.d.ts +54 -0
  157. package/dist/models/partner-role-class.js +15 -0
  158. package/dist/models/payment-method-class.d.ts +60 -0
  159. package/dist/models/payment-method-class.js +15 -0
  160. package/dist/models/policy-object-request-dto.d.ts +42 -0
  161. package/dist/models/policy-object-request-dto.js +15 -0
  162. package/dist/models/policy-object-response-class.d.ts +36 -0
  163. package/dist/models/policy-object-response-class.js +15 -0
  164. package/dist/models/premium-override-dto.d.ts +55 -0
  165. package/dist/models/premium-override-dto.js +27 -0
  166. package/dist/models/premium-override-request-dto.d.ts +25 -0
  167. package/dist/models/premium-override-request-dto.js +15 -0
  168. package/dist/models/product-class.d.ts +80 -0
  169. package/dist/models/product-class.js +15 -0
  170. package/dist/models/product-document-class.d.ts +123 -0
  171. package/dist/models/product-document-class.js +36 -0
  172. package/dist/models/product-factor-for-version-class.d.ts +61 -0
  173. package/dist/models/product-factor-for-version-class.js +15 -0
  174. package/dist/models/product-factor-value-for-version-class.d.ts +42 -0
  175. package/dist/models/product-factor-value-for-version-class.js +15 -0
  176. package/dist/models/product-field-class.d.ts +132 -0
  177. package/dist/models/product-field-class.js +15 -0
  178. package/dist/models/product-version-class.d.ts +61 -0
  179. package/dist/models/product-version-class.js +22 -0
  180. package/dist/models/send-notification-request-dto.d.ts +36 -0
  181. package/dist/models/send-notification-request-dto.js +15 -0
  182. package/dist/models/send-notification-response-class.d.ts +24 -0
  183. package/dist/models/send-notification-response-class.js +15 -0
  184. package/dist/models/sepa-dto.d.ts +30 -0
  185. package/dist/models/sepa-dto.js +15 -0
  186. package/dist/models/structured-address-class.d.ts +54 -0
  187. package/dist/models/structured-address-class.js +15 -0
  188. package/dist/models/suggested-address-details-class.d.ts +90 -0
  189. package/dist/models/suggested-address-details-class.js +15 -0
  190. package/dist/models/update-lead-request-dto.d.ts +95 -0
  191. package/dist/models/update-lead-request-dto.js +15 -0
  192. package/dist/models/update-lead-response-class.d.ts +25 -0
  193. package/dist/models/update-lead-response-class.js +15 -0
  194. package/dist/models/uploaded-document-dto.d.ts +24 -0
  195. package/dist/models/uploaded-document-dto.js +15 -0
  196. package/dist/models/validate-address-response-class.d.ts +50 -0
  197. package/dist/models/validate-address-response-class.js +15 -0
  198. package/models/address-field-score-class.ts +10 -10
  199. package/models/booking-funnel-class.ts +96 -0
  200. package/models/create-account-request-dto.ts +1 -1
  201. package/models/create-document-request-dto.ts +2 -2
  202. package/models/create-lead-request-dto.ts +13 -1
  203. package/models/create-presigned-post-request-dto.ts +2 -2
  204. package/models/document-class.ts +1 -1
  205. package/models/filter-named-range-response-class.ts +48 -0
  206. package/models/get-booking-funnel-response-class.ts +31 -0
  207. package/models/index.ts +7 -0
  208. package/models/initiate-email-verification-dto.ts +1 -1
  209. package/models/insured-object-type-class.ts +1 -1
  210. package/models/lead-account-class.ts +1 -1
  211. package/models/lead-class.ts +7 -0
  212. package/models/lead-policy-object-class.ts +2 -2
  213. package/models/partner-class.ts +66 -0
  214. package/models/partner-link-class.ts +92 -0
  215. package/models/partner-role-class.ts +60 -0
  216. package/models/product-class.ts +1 -1
  217. package/models/product-document-class.ts +14 -2
  218. package/models/product-factor-for-version-class.ts +4 -3
  219. package/models/product-factor-value-for-version-class.ts +48 -0
  220. package/models/send-notification-request-dto.ts +1 -1
  221. package/models/update-lead-request-dto.ts +1 -1
  222. package/package.json +1 -1
@@ -0,0 +1,857 @@
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
+ /**
89
+ * DocumentsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var DocumentsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create a temporary document.
97
+ * @summary Create the temporary document
98
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
99
+ * @param {string} [authorization] Bearer Token
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'createDocumentRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createTemporaryDocument', 'createDocumentRequestDto', createDocumentRequestDto);
112
+ localVarPath = "/publicapi/v1/documents";
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createDocumentRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * 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.
146
+ * @summary Delete a document
147
+ * @param {string} leadCode
148
+ * @param {string} code
149
+ * @param {string} [authorization] Bearer Token
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ deleteDocuments: function (leadCode, code, authorization, options) {
154
+ if (options === void 0) { options = {}; }
155
+ return __awaiter(_this, void 0, void 0, function () {
156
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
157
+ return __generator(this, function (_a) {
158
+ switch (_a.label) {
159
+ case 0:
160
+ // verify required parameter 'leadCode' is not null or undefined
161
+ (0, common_1.assertParamExists)('deleteDocuments', 'leadCode', leadCode);
162
+ // verify required parameter 'code' is not null or undefined
163
+ (0, common_1.assertParamExists)('deleteDocuments', 'code', code);
164
+ localVarPath = "/publicapi/v1/documents/{code}/lead/{leadCode}"
165
+ .replace("{".concat("leadCode", "}"), encodeURIComponent(String(leadCode)))
166
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
167
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ }
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ return [2 /*return*/, {
189
+ url: (0, common_1.toPathString)(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ }];
192
+ }
193
+ });
194
+ });
195
+ },
196
+ /**
197
+ * 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.
198
+ * @summary Download a document
199
+ * @param {string} code
200
+ * @param {string} [authorization] Bearer Token
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ downloadDocument: function (code, authorization, options) {
205
+ if (options === void 0) { options = {}; }
206
+ return __awaiter(_this, void 0, void 0, function () {
207
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
208
+ return __generator(this, function (_a) {
209
+ switch (_a.label) {
210
+ case 0:
211
+ // verify required parameter 'code' is not null or undefined
212
+ (0, common_1.assertParamExists)('downloadDocument', 'code', code);
213
+ localVarPath = "/publicapi/v1/documents/download/{code}"
214
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
215
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ baseAccessToken = configuration.accessToken;
219
+ }
220
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
221
+ localVarHeaderParameter = {};
222
+ localVarQueryParameter = {};
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
226
+ case 1:
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ _a.sent();
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ }
233
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
236
+ return [2 /*return*/, {
237
+ url: (0, common_1.toPathString)(localVarUrlObj),
238
+ options: localVarRequestOptions,
239
+ }];
240
+ }
241
+ });
242
+ });
243
+ },
244
+ /**
245
+ *
246
+ * @summary Get pre-signed url for downloading product document
247
+ * @param {string} productCode
248
+ * @param {string} code
249
+ * @param {string} [authorization] Bearer Token
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ downloadProductDocumentUrl: function (productCode, code, authorization, options) {
254
+ if (options === void 0) { options = {}; }
255
+ return __awaiter(_this, void 0, void 0, function () {
256
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
257
+ return __generator(this, function (_a) {
258
+ switch (_a.label) {
259
+ case 0:
260
+ // verify required parameter 'productCode' is not null or undefined
261
+ (0, common_1.assertParamExists)('downloadProductDocumentUrl', 'productCode', productCode);
262
+ // verify required parameter 'code' is not null or undefined
263
+ (0, common_1.assertParamExists)('downloadProductDocumentUrl', 'code', code);
264
+ localVarPath = "/publicapi/v1/documents/product/{productCode}/{code}/download-url"
265
+ .replace("{".concat("productCode", "}"), encodeURIComponent(String(productCode)))
266
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
267
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
268
+ if (configuration) {
269
+ baseOptions = configuration.baseOptions;
270
+ baseAccessToken = configuration.accessToken;
271
+ }
272
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
273
+ localVarHeaderParameter = {};
274
+ localVarQueryParameter = {};
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
278
+ case 1:
279
+ // authentication bearer required
280
+ // http bearer authentication required
281
+ _a.sent();
282
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
283
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
284
+ }
285
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
286
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
287
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
288
+ return [2 /*return*/, {
289
+ url: (0, common_1.toPathString)(localVarUrlObj),
290
+ options: localVarRequestOptions,
291
+ }];
292
+ }
293
+ });
294
+ });
295
+ },
296
+ /**
297
+ * 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.
298
+ * @summary List documents
299
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
300
+ * @param {string} [authorization] Bearer Token
301
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
302
+ * @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.
303
+ * @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.
304
+ * @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.
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ */
308
+ listDocuments: function (filter, authorization, pageSize, pageToken, order, expand, options) {
309
+ if (options === void 0) { options = {}; }
310
+ return __awaiter(_this, void 0, void 0, function () {
311
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
312
+ return __generator(this, function (_a) {
313
+ switch (_a.label) {
314
+ case 0:
315
+ // verify required parameter 'filter' is not null or undefined
316
+ (0, common_1.assertParamExists)('listDocuments', 'filter', filter);
317
+ localVarPath = "/publicapi/v1/documents";
318
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
319
+ if (configuration) {
320
+ baseOptions = configuration.baseOptions;
321
+ baseAccessToken = configuration.accessToken;
322
+ }
323
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
324
+ localVarHeaderParameter = {};
325
+ localVarQueryParameter = {};
326
+ // authentication bearer required
327
+ // http bearer authentication required
328
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
329
+ case 1:
330
+ // authentication bearer required
331
+ // http bearer authentication required
332
+ _a.sent();
333
+ if (pageSize !== undefined) {
334
+ localVarQueryParameter['pageSize'] = pageSize;
335
+ }
336
+ if (pageToken !== undefined) {
337
+ localVarQueryParameter['pageToken'] = pageToken;
338
+ }
339
+ if (filter !== undefined) {
340
+ localVarQueryParameter['filter'] = filter;
341
+ }
342
+ if (order !== undefined) {
343
+ localVarQueryParameter['order'] = order;
344
+ }
345
+ if (expand !== undefined) {
346
+ localVarQueryParameter['expand'] = expand;
347
+ }
348
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
349
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
350
+ }
351
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
352
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
353
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
354
+ return [2 /*return*/, {
355
+ url: (0, common_1.toPathString)(localVarUrlObj),
356
+ options: localVarRequestOptions,
357
+ }];
358
+ }
359
+ });
360
+ });
361
+ },
362
+ /**
363
+ * 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.
364
+ * @summary List product documents
365
+ * @param {string} productCode
366
+ * @param {string} [authorization] Bearer Token
367
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
368
+ * @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.
369
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
370
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
371
+ * @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.
372
+ * @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.
373
+ * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ listProductDocuments: function (productCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
378
+ if (options === void 0) { options = {}; }
379
+ return __awaiter(_this, void 0, void 0, function () {
380
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
381
+ return __generator(this, function (_a) {
382
+ switch (_a.label) {
383
+ case 0:
384
+ // verify required parameter 'productCode' is not null or undefined
385
+ (0, common_1.assertParamExists)('listProductDocuments', 'productCode', productCode);
386
+ localVarPath = "/publicapi/v1/documents/{productCode}"
387
+ .replace("{".concat("productCode", "}"), encodeURIComponent(String(productCode)));
388
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
389
+ if (configuration) {
390
+ baseOptions = configuration.baseOptions;
391
+ baseAccessToken = configuration.accessToken;
392
+ }
393
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
394
+ localVarHeaderParameter = {};
395
+ localVarQueryParameter = {};
396
+ // authentication bearer required
397
+ // http bearer authentication required
398
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
399
+ case 1:
400
+ // authentication bearer required
401
+ // http bearer authentication required
402
+ _a.sent();
403
+ if (pageSize !== undefined) {
404
+ localVarQueryParameter['pageSize'] = pageSize;
405
+ }
406
+ if (pageToken !== undefined) {
407
+ localVarQueryParameter['pageToken'] = pageToken;
408
+ }
409
+ if (filter !== undefined) {
410
+ localVarQueryParameter['filter'] = filter;
411
+ }
412
+ if (search !== undefined) {
413
+ localVarQueryParameter['search'] = search;
414
+ }
415
+ if (order !== undefined) {
416
+ localVarQueryParameter['order'] = order;
417
+ }
418
+ if (expand !== undefined) {
419
+ localVarQueryParameter['expand'] = expand;
420
+ }
421
+ if (filters !== undefined) {
422
+ localVarQueryParameter['filters'] = filters;
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(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 50. 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] To search the list by any field, pass search&#x3D;xxx 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 {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ */
623
+ listProductDocuments: function (productCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
624
+ return __awaiter(this, void 0, void 0, function () {
625
+ var localVarAxiosArgs;
626
+ return __generator(this, function (_a) {
627
+ switch (_a.label) {
628
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductDocuments(productCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
629
+ case 1:
630
+ localVarAxiosArgs = _a.sent();
631
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
632
+ }
633
+ });
634
+ });
635
+ },
636
+ /**
637
+ * This will create a URL that allows user upload its documents in Database.The URL can expire between 5 minutes and 7 days.
638
+ * @summary Upload documents using pre-signed URL
639
+ * @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
640
+ * @param {string} [authorization] Bearer Token
641
+ * @param {*} [options] Override http request option.
642
+ * @throws {RequiredError}
643
+ */
644
+ preSignedPost: function (createPresignedPostRequestDto, authorization, options) {
645
+ return __awaiter(this, void 0, void 0, function () {
646
+ var localVarAxiosArgs;
647
+ return __generator(this, function (_a) {
648
+ switch (_a.label) {
649
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.preSignedPost(createPresignedPostRequestDto, authorization, options)];
650
+ case 1:
651
+ localVarAxiosArgs = _a.sent();
652
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
653
+ }
654
+ });
655
+ });
656
+ },
657
+ };
658
+ };
659
+ exports.DocumentsApiFp = DocumentsApiFp;
660
+ /**
661
+ * DocumentsApi - factory interface
662
+ * @export
663
+ */
664
+ var DocumentsApiFactory = function (configuration, basePath, axios) {
665
+ var localVarFp = (0, exports.DocumentsApiFp)(configuration);
666
+ return {
667
+ /**
668
+ * This will create a temporary document.
669
+ * @summary Create the temporary document
670
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
671
+ * @param {string} [authorization] Bearer Token
672
+ * @param {*} [options] Override http request option.
673
+ * @throws {RequiredError}
674
+ */
675
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
676
+ return localVarFp.createTemporaryDocument(createDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
677
+ },
678
+ /**
679
+ * 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.
680
+ * @summary Delete a document
681
+ * @param {string} leadCode
682
+ * @param {string} code
683
+ * @param {string} [authorization] Bearer Token
684
+ * @param {*} [options] Override http request option.
685
+ * @throws {RequiredError}
686
+ */
687
+ deleteDocuments: function (leadCode, code, authorization, options) {
688
+ return localVarFp.deleteDocuments(leadCode, code, authorization, options).then(function (request) { return request(axios, basePath); });
689
+ },
690
+ /**
691
+ * 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.
692
+ * @summary Download a document
693
+ * @param {string} code
694
+ * @param {string} [authorization] Bearer Token
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ */
698
+ downloadDocument: function (code, authorization, options) {
699
+ return localVarFp.downloadDocument(code, authorization, options).then(function (request) { return request(axios, basePath); });
700
+ },
701
+ /**
702
+ *
703
+ * @summary Get pre-signed url for downloading product document
704
+ * @param {string} productCode
705
+ * @param {string} code
706
+ * @param {string} [authorization] Bearer Token
707
+ * @param {*} [options] Override http request option.
708
+ * @throws {RequiredError}
709
+ */
710
+ downloadProductDocumentUrl: function (productCode, code, authorization, options) {
711
+ return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, options).then(function (request) { return request(axios, basePath); });
712
+ },
713
+ /**
714
+ * 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.
715
+ * @summary List documents
716
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
717
+ * @param {string} [authorization] Bearer Token
718
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
719
+ * @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.
720
+ * @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.
721
+ * @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.
722
+ * @param {*} [options] Override http request option.
723
+ * @throws {RequiredError}
724
+ */
725
+ listDocuments: function (filter, authorization, pageSize, pageToken, order, expand, options) {
726
+ return localVarFp.listDocuments(filter, authorization, pageSize, pageToken, order, expand, options).then(function (request) { return request(axios, basePath); });
727
+ },
728
+ /**
729
+ * 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.
730
+ * @summary List product documents
731
+ * @param {string} productCode
732
+ * @param {string} [authorization] Bearer Token
733
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
734
+ * @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.
735
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
736
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
737
+ * @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.
738
+ * @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.
739
+ * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ */
743
+ listProductDocuments: function (productCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
744
+ return localVarFp.listProductDocuments(productCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
745
+ },
746
+ /**
747
+ * This will create a URL that allows user upload its documents in Database.The URL can expire between 5 minutes and 7 days.
748
+ * @summary Upload documents using pre-signed URL
749
+ * @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
750
+ * @param {string} [authorization] Bearer Token
751
+ * @param {*} [options] Override http request option.
752
+ * @throws {RequiredError}
753
+ */
754
+ preSignedPost: function (createPresignedPostRequestDto, authorization, options) {
755
+ return localVarFp.preSignedPost(createPresignedPostRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
756
+ },
757
+ };
758
+ };
759
+ exports.DocumentsApiFactory = DocumentsApiFactory;
760
+ /**
761
+ * DocumentsApi - object-oriented interface
762
+ * @export
763
+ * @class DocumentsApi
764
+ * @extends {BaseAPI}
765
+ */
766
+ var DocumentsApi = /** @class */ (function (_super) {
767
+ __extends(DocumentsApi, _super);
768
+ function DocumentsApi() {
769
+ return _super !== null && _super.apply(this, arguments) || this;
770
+ }
771
+ /**
772
+ * This will create a temporary document.
773
+ * @summary Create the temporary document
774
+ * @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
775
+ * @param {*} [options] Override http request option.
776
+ * @throws {RequiredError}
777
+ * @memberof DocumentsApi
778
+ */
779
+ DocumentsApi.prototype.createTemporaryDocument = function (requestParameters, options) {
780
+ var _this = this;
781
+ return (0, exports.DocumentsApiFp)(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
782
+ };
783
+ /**
784
+ * 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.
785
+ * @summary Delete a document
786
+ * @param {DocumentsApiDeleteDocumentsRequest} requestParameters Request parameters.
787
+ * @param {*} [options] Override http request option.
788
+ * @throws {RequiredError}
789
+ * @memberof DocumentsApi
790
+ */
791
+ DocumentsApi.prototype.deleteDocuments = function (requestParameters, options) {
792
+ var _this = this;
793
+ return (0, exports.DocumentsApiFp)(this.configuration).deleteDocuments(requestParameters.leadCode, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
794
+ };
795
+ /**
796
+ * 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.
797
+ * @summary Download a document
798
+ * @param {DocumentsApiDownloadDocumentRequest} requestParameters Request parameters.
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ * @memberof DocumentsApi
802
+ */
803
+ DocumentsApi.prototype.downloadDocument = function (requestParameters, options) {
804
+ var _this = this;
805
+ return (0, exports.DocumentsApiFp)(this.configuration).downloadDocument(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
806
+ };
807
+ /**
808
+ *
809
+ * @summary Get pre-signed url for downloading product document
810
+ * @param {DocumentsApiDownloadProductDocumentUrlRequest} requestParameters Request parameters.
811
+ * @param {*} [options] Override http request option.
812
+ * @throws {RequiredError}
813
+ * @memberof DocumentsApi
814
+ */
815
+ DocumentsApi.prototype.downloadProductDocumentUrl = function (requestParameters, options) {
816
+ var _this = this;
817
+ return (0, exports.DocumentsApiFp)(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
818
+ };
819
+ /**
820
+ * 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.
821
+ * @summary List documents
822
+ * @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
823
+ * @param {*} [options] Override http request option.
824
+ * @throws {RequiredError}
825
+ * @memberof DocumentsApi
826
+ */
827
+ DocumentsApi.prototype.listDocuments = function (requestParameters, options) {
828
+ var _this = this;
829
+ 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); });
830
+ };
831
+ /**
832
+ * 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.
833
+ * @summary List product documents
834
+ * @param {DocumentsApiListProductDocumentsRequest} requestParameters Request parameters.
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ * @memberof DocumentsApi
838
+ */
839
+ DocumentsApi.prototype.listProductDocuments = function (requestParameters, options) {
840
+ var _this = this;
841
+ return (0, exports.DocumentsApiFp)(this.configuration).listProductDocuments(requestParameters.productCode, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
842
+ };
843
+ /**
844
+ * This will create a URL that allows user upload its documents in Database.The URL can expire between 5 minutes and 7 days.
845
+ * @summary Upload documents using pre-signed URL
846
+ * @param {DocumentsApiPreSignedPostRequest} requestParameters Request parameters.
847
+ * @param {*} [options] Override http request option.
848
+ * @throws {RequiredError}
849
+ * @memberof DocumentsApi
850
+ */
851
+ DocumentsApi.prototype.preSignedPost = function (requestParameters, options) {
852
+ var _this = this;
853
+ return (0, exports.DocumentsApiFp)(this.configuration).preSignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
854
+ };
855
+ return DocumentsApi;
856
+ }(base_1.BaseAPI));
857
+ exports.DocumentsApi = DocumentsApi;