@emilgroup/public-api-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/.openapi-generator/FILES +63 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/documents-api.ts +438 -0
  6. package/api/leads-api.ts +478 -0
  7. package/api/notifications-api.ts +165 -0
  8. package/api/payments-setup-api.ts +300 -0
  9. package/api/products-api.ts +713 -0
  10. package/api.ts +40 -0
  11. package/base.ts +247 -0
  12. package/common.ts +198 -0
  13. package/configuration.ts +101 -0
  14. package/dist/api/documents-api.d.ts +252 -0
  15. package/dist/api/documents-api.js +439 -0
  16. package/dist/api/leads-api.d.ts +266 -0
  17. package/dist/api/leads-api.js +502 -0
  18. package/dist/api/notifications-api.d.ts +97 -0
  19. package/dist/api/notifications-api.js +224 -0
  20. package/dist/api/payments-setup-api.d.ts +172 -0
  21. package/dist/api/payments-setup-api.js +329 -0
  22. package/dist/api/products-api.d.ts +396 -0
  23. package/dist/api/products-api.js +700 -0
  24. package/dist/api.d.ts +20 -0
  25. package/dist/api.js +40 -0
  26. package/dist/base.d.ts +72 -0
  27. package/dist/base.js +293 -0
  28. package/dist/common.d.ts +91 -0
  29. package/dist/common.js +276 -0
  30. package/dist/configuration.d.ts +83 -0
  31. package/dist/configuration.js +44 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +35 -0
  34. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  35. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  36. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  37. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  38. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  39. package/dist/models/complete-payment-setup-response-class.js +15 -0
  40. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  41. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  42. package/dist/models/create-account-request-dto.d.ts +115 -0
  43. package/dist/models/create-account-request-dto.js +27 -0
  44. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  45. package/dist/models/create-bank-account-request-dto.js +15 -0
  46. package/dist/models/create-custom-application-request-dto.d.ts +35 -0
  47. package/dist/models/create-custom-application-request-dto.js +20 -0
  48. package/dist/models/create-custom-application-response-class.d.ts +24 -0
  49. package/dist/models/create-custom-application-response-class.js +15 -0
  50. package/dist/models/create-document-request-dto.d.ts +101 -0
  51. package/dist/models/create-document-request-dto.js +31 -0
  52. package/dist/models/create-estimated-invoice-request-dto.d.ts +49 -0
  53. package/dist/models/create-estimated-invoice-request-dto.js +20 -0
  54. package/dist/models/create-estimated-invoice-response-class.d.ts +31 -0
  55. package/dist/models/create-estimated-invoice-response-class.js +15 -0
  56. package/dist/models/create-lead-request-dto.d.ts +84 -0
  57. package/dist/models/create-lead-request-dto.js +22 -0
  58. package/dist/models/create-lead-response-class.d.ts +25 -0
  59. package/dist/models/create-lead-response-class.js +15 -0
  60. package/dist/models/document-class.d.ts +130 -0
  61. package/dist/models/document-class.js +41 -0
  62. package/dist/models/get-custom-css-response-class.d.ts +24 -0
  63. package/dist/models/get-custom-css-response-class.js +15 -0
  64. package/dist/models/get-lead-response-class.d.ts +25 -0
  65. package/dist/models/get-lead-response-class.js +15 -0
  66. package/dist/models/index.d.ts +45 -0
  67. package/dist/models/index.js +61 -0
  68. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
  69. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  70. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  71. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  72. package/dist/models/initiate-lead-response-class.d.ts +24 -0
  73. package/dist/models/initiate-lead-response-class.js +15 -0
  74. package/dist/models/initiate-payment-setup-request-dto.d.ts +32 -0
  75. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  76. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  77. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  78. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
  79. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  80. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  81. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  82. package/dist/models/insured-object-class.d.ts +67 -0
  83. package/dist/models/insured-object-class.js +15 -0
  84. package/dist/models/insured-object-type-class.d.ts +48 -0
  85. package/dist/models/insured-object-type-class.js +15 -0
  86. package/dist/models/invoice-class.d.ts +128 -0
  87. package/dist/models/invoice-class.js +15 -0
  88. package/dist/models/invoice-item-class.d.ts +108 -0
  89. package/dist/models/invoice-item-class.js +15 -0
  90. package/dist/models/invoice-status-class.d.ts +42 -0
  91. package/dist/models/invoice-status-class.js +15 -0
  92. package/dist/models/lead-account-class.d.ts +109 -0
  93. package/dist/models/lead-account-class.js +22 -0
  94. package/dist/models/lead-bank-account-class.d.ts +30 -0
  95. package/dist/models/lead-bank-account-class.js +15 -0
  96. package/dist/models/lead-class.d.ts +77 -0
  97. package/dist/models/lead-class.js +15 -0
  98. package/dist/models/lead-policy-class.d.ts +43 -0
  99. package/dist/models/lead-policy-class.js +15 -0
  100. package/dist/models/lead-policy-object-class.d.ts +30 -0
  101. package/dist/models/lead-policy-object-class.js +15 -0
  102. package/dist/models/list-documents-response-class.d.ts +31 -0
  103. package/dist/models/list-documents-response-class.js +15 -0
  104. package/dist/models/payment-method-class.d.ts +60 -0
  105. package/dist/models/payment-method-class.js +15 -0
  106. package/dist/models/policy-object-request-dto.d.ts +30 -0
  107. package/dist/models/policy-object-request-dto.js +15 -0
  108. package/dist/models/premium-override-dto.d.ts +53 -0
  109. package/dist/models/premium-override-dto.js +25 -0
  110. package/dist/models/premium-override-request-dto.d.ts +25 -0
  111. package/dist/models/premium-override-request-dto.js +15 -0
  112. package/dist/models/product-factor-class.d.ts +60 -0
  113. package/dist/models/product-factor-class.js +15 -0
  114. package/dist/models/product-field-class.d.ts +120 -0
  115. package/dist/models/product-field-class.js +15 -0
  116. package/dist/models/send-notification-request-dto.d.ts +36 -0
  117. package/dist/models/send-notification-request-dto.js +15 -0
  118. package/dist/models/send-notification-response-class.d.ts +24 -0
  119. package/dist/models/send-notification-response-class.js +15 -0
  120. package/dist/models/update-lead-request-dto.d.ts +84 -0
  121. package/dist/models/update-lead-request-dto.js +22 -0
  122. package/dist/models/update-lead-response-class.d.ts +25 -0
  123. package/dist/models/update-lead-response-class.js +15 -0
  124. package/dist/models/uploaded-document-dto.d.ts +24 -0
  125. package/dist/models/uploaded-document-dto.js +15 -0
  126. package/git_push.sh +57 -0
  127. package/index.ts +19 -0
  128. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  129. package/models/complete-payment-setup-request-dto.ts +38 -0
  130. package/models/complete-payment-setup-response-class.ts +31 -0
  131. package/models/complete-stripe-payment-setup-request-dto.ts +66 -0
  132. package/models/create-account-request-dto.ts +125 -0
  133. package/models/create-bank-account-request-dto.ts +36 -0
  134. package/models/create-custom-application-request-dto.ts +44 -0
  135. package/models/create-custom-application-response-class.ts +30 -0
  136. package/models/create-document-request-dto.ts +111 -0
  137. package/models/create-estimated-invoice-request-dto.ts +58 -0
  138. package/models/create-estimated-invoice-response-class.ts +37 -0
  139. package/models/create-lead-request-dto.ts +93 -0
  140. package/models/create-lead-response-class.ts +31 -0
  141. package/models/document-class.ts +141 -0
  142. package/models/get-custom-css-response-class.ts +30 -0
  143. package/models/get-lead-response-class.ts +31 -0
  144. package/models/index.ts +45 -0
  145. package/models/initiate-braintree-payment-setup-request-dto.ts +36 -0
  146. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  147. package/models/initiate-lead-response-class.ts +30 -0
  148. package/models/initiate-payment-setup-request-dto.ts +38 -0
  149. package/models/initiate-payment-setup-response-class.ts +38 -0
  150. package/models/initiate-stripe-payment-setup-request-dto.ts +36 -0
  151. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  152. package/models/insured-object-class.ts +73 -0
  153. package/models/insured-object-type-class.ts +54 -0
  154. package/models/invoice-class.ts +134 -0
  155. package/models/invoice-item-class.ts +114 -0
  156. package/models/invoice-status-class.ts +48 -0
  157. package/models/lead-account-class.ts +118 -0
  158. package/models/lead-bank-account-class.ts +36 -0
  159. package/models/lead-class.ts +83 -0
  160. package/models/lead-policy-class.ts +49 -0
  161. package/models/lead-policy-object-class.ts +36 -0
  162. package/models/list-documents-response-class.ts +37 -0
  163. package/models/payment-method-class.ts +66 -0
  164. package/models/policy-object-request-dto.ts +36 -0
  165. package/models/premium-override-dto.ts +63 -0
  166. package/models/premium-override-request-dto.ts +31 -0
  167. package/models/product-factor-class.ts +66 -0
  168. package/models/product-field-class.ts +126 -0
  169. package/models/send-notification-request-dto.ts +42 -0
  170. package/models/send-notification-response-class.ts +30 -0
  171. package/models/update-lead-request-dto.ts +93 -0
  172. package/models/update-lead-response-class.ts +31 -0
  173. package/models/uploaded-document-dto.ts +30 -0
  174. package/package.json +27 -0
  175. package/tsconfig.json +22 -0
@@ -0,0 +1,713 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Emil PublicAPI
5
+ * The Emil Public API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateCustomApplicationRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateCustomApplicationResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { CreateEstimatedInvoiceRequestDto } from '../models';
29
+ // @ts-ignore
30
+ import { CreateEstimatedInvoiceResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { GetCustomCssResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { InsuredObjectClass } from '../models';
35
+ // @ts-ignore
36
+ import { InsuredObjectTypeClass } from '../models';
37
+ // @ts-ignore
38
+ import { ProductFactorClass } from '../models';
39
+ /**
40
+ * ProductsApi - axios parameter creator
41
+ * @export
42
+ */
43
+ export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) {
44
+ return {
45
+ /**
46
+ * This will create an invoice product.
47
+ * @summary Create the invoice product
48
+ * @param {string} productCode
49
+ * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
50
+ * @param {string} [authorization] Bearer Token
51
+ * @param {*} [options] Override http request option.
52
+ * @throws {RequiredError}
53
+ */
54
+ createEstimatedInvoice: async (productCode: string, createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
55
+ // verify required parameter 'productCode' is not null or undefined
56
+ assertParamExists('createEstimatedInvoice', 'productCode', productCode)
57
+ // verify required parameter 'createEstimatedInvoiceRequestDto' is not null or undefined
58
+ assertParamExists('createEstimatedInvoice', 'createEstimatedInvoiceRequestDto', createEstimatedInvoiceRequestDto)
59
+ const localVarPath = `/publicapi/v1/products/{product_code}/product-invoice`
60
+ .replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
61
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
62
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
63
+ let baseOptions;
64
+ let baseAccessToken;
65
+ if (configuration) {
66
+ baseOptions = configuration.baseOptions;
67
+ baseAccessToken = configuration.accessToken;
68
+ }
69
+
70
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
71
+ const localVarHeaderParameter = {} as any;
72
+ const localVarQueryParameter = {} as any;
73
+
74
+ // authentication bearer required
75
+ // http bearer authentication required
76
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
77
+
78
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
79
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
80
+ }
81
+
82
+
83
+
84
+ localVarHeaderParameter['Content-Type'] = 'application/json';
85
+
86
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
87
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
88
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
89
+ localVarRequestOptions.data = serializeDataIfNeeded(createEstimatedInvoiceRequestDto, localVarRequestOptions, configuration)
90
+
91
+ return {
92
+ url: toPathString(localVarUrlObj),
93
+ options: localVarRequestOptions,
94
+ };
95
+ },
96
+ /**
97
+ * This will create a custom application for a specific provider.
98
+ * @summary Create the custom application
99
+ * @param {string} productCode
100
+ * @param {CreateCustomApplicationRequestDto} createCustomApplicationRequestDto
101
+ * @param {string} [authorization] Bearer Token
102
+ * @param {*} [options] Override http request option.
103
+ * @throws {RequiredError}
104
+ */
105
+ customApplication: async (productCode: string, createCustomApplicationRequestDto: CreateCustomApplicationRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
106
+ // verify required parameter 'productCode' is not null or undefined
107
+ assertParamExists('customApplication', 'productCode', productCode)
108
+ // verify required parameter 'createCustomApplicationRequestDto' is not null or undefined
109
+ assertParamExists('customApplication', 'createCustomApplicationRequestDto', createCustomApplicationRequestDto)
110
+ const localVarPath = `/publicapi/v1/products/{product_code}/custom-application`
111
+ .replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
112
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
113
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
114
+ let baseOptions;
115
+ let baseAccessToken;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ baseAccessToken = configuration.accessToken;
119
+ }
120
+
121
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
122
+ const localVarHeaderParameter = {} as any;
123
+ const localVarQueryParameter = {} as any;
124
+
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
128
+
129
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ }
132
+
133
+
134
+
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+
137
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
138
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
139
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
140
+ localVarRequestOptions.data = serializeDataIfNeeded(createCustomApplicationRequestDto, localVarRequestOptions, configuration)
141
+
142
+ return {
143
+ url: toPathString(localVarUrlObj),
144
+ options: localVarRequestOptions,
145
+ };
146
+ },
147
+ /**
148
+ * Returns a list of insured object types you have previously created. The insured object types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
149
+ * @summary List insured object types
150
+ * @param {string} [authorization] Bearer Token
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ getInsuredObjectTypes: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
155
+ const localVarPath = `/publicapi/v1/products/{product_code}/insured-object-types`;
156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
157
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
158
+ let baseOptions;
159
+ let baseAccessToken;
160
+ if (configuration) {
161
+ baseOptions = configuration.baseOptions;
162
+ baseAccessToken = configuration.accessToken;
163
+ }
164
+
165
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
166
+ const localVarHeaderParameter = {} as any;
167
+ const localVarQueryParameter = {} as any;
168
+
169
+ // authentication bearer required
170
+ // http bearer authentication required
171
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
172
+
173
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
174
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
175
+ }
176
+
177
+
178
+
179
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
180
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
182
+
183
+ return {
184
+ url: toPathString(localVarUrlObj),
185
+ options: localVarRequestOptions,
186
+ };
187
+ },
188
+ /**
189
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
190
+ * @summary List insured objects
191
+ * @param {string} productCode
192
+ * @param {string} [authorization] Bearer Token
193
+ * @param {*} [options] Override http request option.
194
+ * @throws {RequiredError}
195
+ */
196
+ getInsuredObjects: async (productCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
197
+ // verify required parameter 'productCode' is not null or undefined
198
+ assertParamExists('getInsuredObjects', 'productCode', productCode)
199
+ const localVarPath = `/publicapi/v1/products/{product_code}/insured-objects`
200
+ .replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
201
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
202
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
203
+ let baseOptions;
204
+ let baseAccessToken;
205
+ if (configuration) {
206
+ baseOptions = configuration.baseOptions;
207
+ baseAccessToken = configuration.accessToken;
208
+ }
209
+
210
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
211
+ const localVarHeaderParameter = {} as any;
212
+ const localVarQueryParameter = {} as any;
213
+
214
+ // authentication bearer required
215
+ // http bearer authentication required
216
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
217
+
218
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
219
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
220
+ }
221
+
222
+
223
+
224
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
225
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
226
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
227
+
228
+ return {
229
+ url: toPathString(localVarUrlObj),
230
+ options: localVarRequestOptions,
231
+ };
232
+ },
233
+ /**
234
+ * This will generate a custom css for booking funnel, based on product.
235
+ * @summary Generate a custom CSS
236
+ * @param {string} productCode
237
+ * @param {string} [authorization] Bearer Token
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ */
241
+ getProductCustomCss: async (productCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
242
+ // verify required parameter 'productCode' is not null or undefined
243
+ assertParamExists('getProductCustomCss', 'productCode', productCode)
244
+ const localVarPath = `/publicapi/v1/products/{product_code}/custom-css`
245
+ .replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
246
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
247
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
248
+ let baseOptions;
249
+ let baseAccessToken;
250
+ if (configuration) {
251
+ baseOptions = configuration.baseOptions;
252
+ baseAccessToken = configuration.accessToken;
253
+ }
254
+
255
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
256
+ const localVarHeaderParameter = {} as any;
257
+ const localVarQueryParameter = {} as any;
258
+
259
+ // authentication bearer required
260
+ // http bearer authentication required
261
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
262
+
263
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
264
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
265
+ }
266
+
267
+
268
+
269
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
270
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
271
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
272
+
273
+ return {
274
+ url: toPathString(localVarUrlObj),
275
+ options: localVarRequestOptions,
276
+ };
277
+ },
278
+ /**
279
+ * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
280
+ * @summary List product factors
281
+ * @param {string} productCode
282
+ * @param {string} allValues
283
+ * @param {string} [authorization] Bearer Token
284
+ * @param {*} [options] Override http request option.
285
+ * @throws {RequiredError}
286
+ */
287
+ getProductFactors: async (productCode: string, allValues: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
288
+ // verify required parameter 'productCode' is not null or undefined
289
+ assertParamExists('getProductFactors', 'productCode', productCode)
290
+ // verify required parameter 'allValues' is not null or undefined
291
+ assertParamExists('getProductFactors', 'allValues', allValues)
292
+ const localVarPath = `/publicapi/v1/products/{product_code}/product-factors`
293
+ .replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
294
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
295
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
296
+ let baseOptions;
297
+ let baseAccessToken;
298
+ if (configuration) {
299
+ baseOptions = configuration.baseOptions;
300
+ baseAccessToken = configuration.accessToken;
301
+ }
302
+
303
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
304
+ const localVarHeaderParameter = {} as any;
305
+ const localVarQueryParameter = {} as any;
306
+
307
+ // authentication bearer required
308
+ // http bearer authentication required
309
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
310
+
311
+ if (allValues !== undefined) {
312
+ localVarQueryParameter['all_values'] = allValues;
313
+ }
314
+
315
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
316
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
317
+ }
318
+
319
+
320
+
321
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
322
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
323
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
324
+
325
+ return {
326
+ url: toPathString(localVarUrlObj),
327
+ options: localVarRequestOptions,
328
+ };
329
+ },
330
+ }
331
+ };
332
+
333
+ /**
334
+ * ProductsApi - functional programming interface
335
+ * @export
336
+ */
337
+ export const ProductsApiFp = function(configuration?: Configuration) {
338
+ const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
339
+ return {
340
+ /**
341
+ * This will create an invoice product.
342
+ * @summary Create the invoice product
343
+ * @param {string} productCode
344
+ * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
345
+ * @param {string} [authorization] Bearer Token
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ async createEstimatedInvoice(productCode: string, createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEstimatedInvoiceResponseClass>> {
350
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createEstimatedInvoice(productCode, createEstimatedInvoiceRequestDto, authorization, options);
351
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
352
+ },
353
+ /**
354
+ * This will create a custom application for a specific provider.
355
+ * @summary Create the custom application
356
+ * @param {string} productCode
357
+ * @param {CreateCustomApplicationRequestDto} createCustomApplicationRequestDto
358
+ * @param {string} [authorization] Bearer Token
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ */
362
+ async customApplication(productCode: string, createCustomApplicationRequestDto: CreateCustomApplicationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCustomApplicationResponseClass>> {
363
+ const localVarAxiosArgs = await localVarAxiosParamCreator.customApplication(productCode, createCustomApplicationRequestDto, authorization, options);
364
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
365
+ },
366
+ /**
367
+ * Returns a list of insured object types you have previously created. The insured object types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
368
+ * @summary List insured object types
369
+ * @param {string} [authorization] Bearer Token
370
+ * @param {*} [options] Override http request option.
371
+ * @throws {RequiredError}
372
+ */
373
+ async getInsuredObjectTypes(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<InsuredObjectTypeClass>>> {
374
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInsuredObjectTypes(authorization, options);
375
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
376
+ },
377
+ /**
378
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
379
+ * @summary List insured objects
380
+ * @param {string} productCode
381
+ * @param {string} [authorization] Bearer Token
382
+ * @param {*} [options] Override http request option.
383
+ * @throws {RequiredError}
384
+ */
385
+ async getInsuredObjects(productCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<InsuredObjectClass>>> {
386
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInsuredObjects(productCode, authorization, options);
387
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
388
+ },
389
+ /**
390
+ * This will generate a custom css for booking funnel, based on product.
391
+ * @summary Generate a custom CSS
392
+ * @param {string} productCode
393
+ * @param {string} [authorization] Bearer Token
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ */
397
+ async getProductCustomCss(productCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomCssResponseClass>> {
398
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductCustomCss(productCode, authorization, options);
399
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
400
+ },
401
+ /**
402
+ * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
403
+ * @summary List product factors
404
+ * @param {string} productCode
405
+ * @param {string} allValues
406
+ * @param {string} [authorization] Bearer Token
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ */
410
+ async getProductFactors(productCode: string, allValues: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ProductFactorClass>>> {
411
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactors(productCode, allValues, authorization, options);
412
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
413
+ },
414
+ }
415
+ };
416
+
417
+ /**
418
+ * ProductsApi - factory interface
419
+ * @export
420
+ */
421
+ export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
422
+ const localVarFp = ProductsApiFp(configuration)
423
+ return {
424
+ /**
425
+ * This will create an invoice product.
426
+ * @summary Create the invoice product
427
+ * @param {string} productCode
428
+ * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
429
+ * @param {string} [authorization] Bearer Token
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ */
433
+ createEstimatedInvoice(productCode: string, createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateEstimatedInvoiceResponseClass> {
434
+ return localVarFp.createEstimatedInvoice(productCode, createEstimatedInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
435
+ },
436
+ /**
437
+ * This will create a custom application for a specific provider.
438
+ * @summary Create the custom application
439
+ * @param {string} productCode
440
+ * @param {CreateCustomApplicationRequestDto} createCustomApplicationRequestDto
441
+ * @param {string} [authorization] Bearer Token
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ customApplication(productCode: string, createCustomApplicationRequestDto: CreateCustomApplicationRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCustomApplicationResponseClass> {
446
+ return localVarFp.customApplication(productCode, createCustomApplicationRequestDto, authorization, options).then((request) => request(axios, basePath));
447
+ },
448
+ /**
449
+ * Returns a list of insured object types you have previously created. The insured object types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
450
+ * @summary List insured object types
451
+ * @param {string} [authorization] Bearer Token
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ getInsuredObjectTypes(authorization?: string, options?: any): AxiosPromise<Array<InsuredObjectTypeClass>> {
456
+ return localVarFp.getInsuredObjectTypes(authorization, options).then((request) => request(axios, basePath));
457
+ },
458
+ /**
459
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
460
+ * @summary List insured objects
461
+ * @param {string} productCode
462
+ * @param {string} [authorization] Bearer Token
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ */
466
+ getInsuredObjects(productCode: string, authorization?: string, options?: any): AxiosPromise<Array<InsuredObjectClass>> {
467
+ return localVarFp.getInsuredObjects(productCode, authorization, options).then((request) => request(axios, basePath));
468
+ },
469
+ /**
470
+ * This will generate a custom css for booking funnel, based on product.
471
+ * @summary Generate a custom CSS
472
+ * @param {string} productCode
473
+ * @param {string} [authorization] Bearer Token
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ */
477
+ getProductCustomCss(productCode: string, authorization?: string, options?: any): AxiosPromise<GetCustomCssResponseClass> {
478
+ return localVarFp.getProductCustomCss(productCode, authorization, options).then((request) => request(axios, basePath));
479
+ },
480
+ /**
481
+ * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
482
+ * @summary List product factors
483
+ * @param {string} productCode
484
+ * @param {string} allValues
485
+ * @param {string} [authorization] Bearer Token
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ */
489
+ getProductFactors(productCode: string, allValues: string, authorization?: string, options?: any): AxiosPromise<Array<ProductFactorClass>> {
490
+ return localVarFp.getProductFactors(productCode, allValues, authorization, options).then((request) => request(axios, basePath));
491
+ },
492
+ };
493
+ };
494
+
495
+ /**
496
+ * Request parameters for createEstimatedInvoice operation in ProductsApi.
497
+ * @export
498
+ * @interface ProductsApiCreateEstimatedInvoiceRequest
499
+ */
500
+ export interface ProductsApiCreateEstimatedInvoiceRequest {
501
+ /**
502
+ *
503
+ * @type {string}
504
+ * @memberof ProductsApiCreateEstimatedInvoice
505
+ */
506
+ readonly productCode: string
507
+
508
+ /**
509
+ *
510
+ * @type {CreateEstimatedInvoiceRequestDto}
511
+ * @memberof ProductsApiCreateEstimatedInvoice
512
+ */
513
+ readonly createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto
514
+
515
+ /**
516
+ * Bearer Token
517
+ * @type {string}
518
+ * @memberof ProductsApiCreateEstimatedInvoice
519
+ */
520
+ readonly authorization?: string
521
+ }
522
+
523
+ /**
524
+ * Request parameters for customApplication operation in ProductsApi.
525
+ * @export
526
+ * @interface ProductsApiCustomApplicationRequest
527
+ */
528
+ export interface ProductsApiCustomApplicationRequest {
529
+ /**
530
+ *
531
+ * @type {string}
532
+ * @memberof ProductsApiCustomApplication
533
+ */
534
+ readonly productCode: string
535
+
536
+ /**
537
+ *
538
+ * @type {CreateCustomApplicationRequestDto}
539
+ * @memberof ProductsApiCustomApplication
540
+ */
541
+ readonly createCustomApplicationRequestDto: CreateCustomApplicationRequestDto
542
+
543
+ /**
544
+ * Bearer Token
545
+ * @type {string}
546
+ * @memberof ProductsApiCustomApplication
547
+ */
548
+ readonly authorization?: string
549
+ }
550
+
551
+ /**
552
+ * Request parameters for getInsuredObjectTypes operation in ProductsApi.
553
+ * @export
554
+ * @interface ProductsApiGetInsuredObjectTypesRequest
555
+ */
556
+ export interface ProductsApiGetInsuredObjectTypesRequest {
557
+ /**
558
+ * Bearer Token
559
+ * @type {string}
560
+ * @memberof ProductsApiGetInsuredObjectTypes
561
+ */
562
+ readonly authorization?: string
563
+ }
564
+
565
+ /**
566
+ * Request parameters for getInsuredObjects operation in ProductsApi.
567
+ * @export
568
+ * @interface ProductsApiGetInsuredObjectsRequest
569
+ */
570
+ export interface ProductsApiGetInsuredObjectsRequest {
571
+ /**
572
+ *
573
+ * @type {string}
574
+ * @memberof ProductsApiGetInsuredObjects
575
+ */
576
+ readonly productCode: string
577
+
578
+ /**
579
+ * Bearer Token
580
+ * @type {string}
581
+ * @memberof ProductsApiGetInsuredObjects
582
+ */
583
+ readonly authorization?: string
584
+ }
585
+
586
+ /**
587
+ * Request parameters for getProductCustomCss operation in ProductsApi.
588
+ * @export
589
+ * @interface ProductsApiGetProductCustomCssRequest
590
+ */
591
+ export interface ProductsApiGetProductCustomCssRequest {
592
+ /**
593
+ *
594
+ * @type {string}
595
+ * @memberof ProductsApiGetProductCustomCss
596
+ */
597
+ readonly productCode: string
598
+
599
+ /**
600
+ * Bearer Token
601
+ * @type {string}
602
+ * @memberof ProductsApiGetProductCustomCss
603
+ */
604
+ readonly authorization?: string
605
+ }
606
+
607
+ /**
608
+ * Request parameters for getProductFactors operation in ProductsApi.
609
+ * @export
610
+ * @interface ProductsApiGetProductFactorsRequest
611
+ */
612
+ export interface ProductsApiGetProductFactorsRequest {
613
+ /**
614
+ *
615
+ * @type {string}
616
+ * @memberof ProductsApiGetProductFactors
617
+ */
618
+ readonly productCode: string
619
+
620
+ /**
621
+ *
622
+ * @type {string}
623
+ * @memberof ProductsApiGetProductFactors
624
+ */
625
+ readonly allValues: string
626
+
627
+ /**
628
+ * Bearer Token
629
+ * @type {string}
630
+ * @memberof ProductsApiGetProductFactors
631
+ */
632
+ readonly authorization?: string
633
+ }
634
+
635
+ /**
636
+ * ProductsApi - object-oriented interface
637
+ * @export
638
+ * @class ProductsApi
639
+ * @extends {BaseAPI}
640
+ */
641
+ export class ProductsApi extends BaseAPI {
642
+ /**
643
+ * This will create an invoice product.
644
+ * @summary Create the invoice product
645
+ * @param {ProductsApiCreateEstimatedInvoiceRequest} requestParameters Request parameters.
646
+ * @param {*} [options] Override http request option.
647
+ * @throws {RequiredError}
648
+ * @memberof ProductsApi
649
+ */
650
+ public createEstimatedInvoice(requestParameters: ProductsApiCreateEstimatedInvoiceRequest, options?: AxiosRequestConfig) {
651
+ return ProductsApiFp(this.configuration).createEstimatedInvoice(requestParameters.productCode, requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
652
+ }
653
+
654
+ /**
655
+ * This will create a custom application for a specific provider.
656
+ * @summary Create the custom application
657
+ * @param {ProductsApiCustomApplicationRequest} requestParameters Request parameters.
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ * @memberof ProductsApi
661
+ */
662
+ public customApplication(requestParameters: ProductsApiCustomApplicationRequest, options?: AxiosRequestConfig) {
663
+ return ProductsApiFp(this.configuration).customApplication(requestParameters.productCode, requestParameters.createCustomApplicationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
664
+ }
665
+
666
+ /**
667
+ * Returns a list of insured object types you have previously created. The insured object types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
668
+ * @summary List insured object types
669
+ * @param {ProductsApiGetInsuredObjectTypesRequest} requestParameters Request parameters.
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ * @memberof ProductsApi
673
+ */
674
+ public getInsuredObjectTypes(requestParameters: ProductsApiGetInsuredObjectTypesRequest = {}, options?: AxiosRequestConfig) {
675
+ return ProductsApiFp(this.configuration).getInsuredObjectTypes(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
676
+ }
677
+
678
+ /**
679
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
680
+ * @summary List insured objects
681
+ * @param {ProductsApiGetInsuredObjectsRequest} requestParameters Request parameters.
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ * @memberof ProductsApi
685
+ */
686
+ public getInsuredObjects(requestParameters: ProductsApiGetInsuredObjectsRequest, options?: AxiosRequestConfig) {
687
+ return ProductsApiFp(this.configuration).getInsuredObjects(requestParameters.productCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
688
+ }
689
+
690
+ /**
691
+ * This will generate a custom css for booking funnel, based on product.
692
+ * @summary Generate a custom CSS
693
+ * @param {ProductsApiGetProductCustomCssRequest} requestParameters Request parameters.
694
+ * @param {*} [options] Override http request option.
695
+ * @throws {RequiredError}
696
+ * @memberof ProductsApi
697
+ */
698
+ public getProductCustomCss(requestParameters: ProductsApiGetProductCustomCssRequest, options?: AxiosRequestConfig) {
699
+ return ProductsApiFp(this.configuration).getProductCustomCss(requestParameters.productCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
700
+ }
701
+
702
+ /**
703
+ * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
704
+ * @summary List product factors
705
+ * @param {ProductsApiGetProductFactorsRequest} requestParameters Request parameters.
706
+ * @param {*} [options] Override http request option.
707
+ * @throws {RequiredError}
708
+ * @memberof ProductsApi
709
+ */
710
+ public getProductFactors(requestParameters: ProductsApiGetProductFactorsRequest, options?: AxiosRequestConfig) {
711
+ return ProductsApiFp(this.configuration).getProductFactors(requestParameters.productCode, requestParameters.allValues, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
712
+ }
713
+ }