@emilgroup/public-api-sdk-node 1.22.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 (180) hide show
  1. package/.openapi-generator/FILES +3 -0
  2. package/README.md +2 -2
  3. package/api/documents-api.ts +114 -0
  4. package/api/products-api.ts +120 -0
  5. package/models/calculate-product-fields-request-dto.ts +37 -0
  6. package/models/calculate-product-fields-response-class.ts +31 -0
  7. package/models/create-estimated-invoice-response-class.ts +8 -1
  8. package/models/create-lead-request-dto.ts +7 -7
  9. package/models/document-class.ts +6 -0
  10. package/models/index.ts +3 -0
  11. package/models/inline-response200.ts +6 -6
  12. package/models/inline-response503.ts +6 -6
  13. package/models/policy-object-request-dto.ts +1 -1
  14. package/{dist/models/policy-object-request-dto.d.ts → models/policy-object-response-class.ts} +16 -16
  15. package/models/product-document-class.ts +7 -7
  16. package/models/update-lead-request-dto.ts +5 -5
  17. package/package.json +2 -2
  18. package/dist/api/address-completions-validations-api.d.ts +0 -215
  19. package/dist/api/address-completions-validations-api.js +0 -373
  20. package/dist/api/default-api.d.ts +0 -66
  21. package/dist/api/default-api.js +0 -200
  22. package/dist/api/documents-api.d.ts +0 -475
  23. package/dist/api/documents-api.js +0 -757
  24. package/dist/api/leads-api.d.ts +0 -441
  25. package/dist/api/leads-api.js +0 -791
  26. package/dist/api/notifications-api.d.ts +0 -211
  27. package/dist/api/notifications-api.js +0 -414
  28. package/dist/api/payments-setup-api.d.ts +0 -228
  29. package/dist/api/payments-setup-api.js +0 -426
  30. package/dist/api/products-api.d.ts +0 -497
  31. package/dist/api/products-api.js +0 -827
  32. package/dist/api.d.ts +0 -18
  33. package/dist/api.js +0 -36
  34. package/dist/base.d.ts +0 -78
  35. package/dist/base.js +0 -394
  36. package/dist/common.d.ts +0 -92
  37. package/dist/common.js +0 -277
  38. package/dist/configuration.d.ts +0 -90
  39. package/dist/configuration.js +0 -44
  40. package/dist/index.d.ts +0 -15
  41. package/dist/index.js +0 -36
  42. package/dist/models/address-completion-item-class.d.ts +0 -49
  43. package/dist/models/address-completion-item-class.js +0 -15
  44. package/dist/models/address-completion-response-class.d.ts +0 -25
  45. package/dist/models/address-completion-response-class.js +0 -15
  46. package/dist/models/address-field-score-class.d.ts +0 -48
  47. package/dist/models/address-field-score-class.js +0 -15
  48. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +0 -48
  49. package/dist/models/complete-braintree-payment-setup-request-dto.js +0 -15
  50. package/dist/models/complete-email-verification-dto.d.ts +0 -30
  51. package/dist/models/complete-email-verification-dto.js +0 -15
  52. package/dist/models/complete-email-verification-response-class.d.ts +0 -24
  53. package/dist/models/complete-email-verification-response-class.js +0 -15
  54. package/dist/models/complete-payment-setup-request-dto.d.ts +0 -32
  55. package/dist/models/complete-payment-setup-request-dto.js +0 -15
  56. package/dist/models/complete-payment-setup-response-class.d.ts +0 -25
  57. package/dist/models/complete-payment-setup-response-class.js +0 -15
  58. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +0 -60
  59. package/dist/models/complete-stripe-payment-setup-request-dto.js +0 -15
  60. package/dist/models/create-account-request-dto.d.ts +0 -132
  61. package/dist/models/create-account-request-dto.js +0 -31
  62. package/dist/models/create-bank-account-request-dto.d.ts +0 -30
  63. package/dist/models/create-bank-account-request-dto.js +0 -15
  64. package/dist/models/create-custom-application-request-dto.d.ts +0 -35
  65. package/dist/models/create-custom-application-request-dto.js +0 -20
  66. package/dist/models/create-custom-application-response-class.d.ts +0 -24
  67. package/dist/models/create-custom-application-response-class.js +0 -15
  68. package/dist/models/create-document-request-dto.d.ts +0 -132
  69. package/dist/models/create-document-request-dto.js +0 -43
  70. package/dist/models/create-estimated-invoice-request-dto.d.ts +0 -55
  71. package/dist/models/create-estimated-invoice-request-dto.js +0 -20
  72. package/dist/models/create-estimated-invoice-response-class.d.ts +0 -31
  73. package/dist/models/create-estimated-invoice-response-class.js +0 -15
  74. package/dist/models/create-lead-async-response-class.d.ts +0 -24
  75. package/dist/models/create-lead-async-response-class.js +0 -15
  76. package/dist/models/create-lead-request-dto.d.ts +0 -108
  77. package/dist/models/create-lead-request-dto.js +0 -15
  78. package/dist/models/create-lead-response-class.d.ts +0 -25
  79. package/dist/models/create-lead-response-class.js +0 -15
  80. package/dist/models/create-payment-method-request-dto.d.ts +0 -36
  81. package/dist/models/create-payment-method-request-dto.js +0 -20
  82. package/dist/models/create-presigned-post-request-dto.d.ts +0 -128
  83. package/dist/models/create-presigned-post-request-dto.js +0 -52
  84. package/dist/models/create-presigned-post-response-class.d.ts +0 -30
  85. package/dist/models/create-presigned-post-response-class.js +0 -15
  86. package/dist/models/document-class.d.ts +0 -138
  87. package/dist/models/document-class.js +0 -49
  88. package/dist/models/get-custom-css-response-class.d.ts +0 -24
  89. package/dist/models/get-custom-css-response-class.js +0 -15
  90. package/dist/models/get-lead-response-class.d.ts +0 -25
  91. package/dist/models/get-lead-response-class.js +0 -15
  92. package/dist/models/get-product-document-download-url-response-class.d.ts +0 -24
  93. package/dist/models/get-product-document-download-url-response-class.js +0 -15
  94. package/dist/models/get-public-psp-settings-response-class.d.ts +0 -30
  95. package/dist/models/get-public-psp-settings-response-class.js +0 -15
  96. package/dist/models/index.d.ts +0 -69
  97. package/dist/models/index.js +0 -85
  98. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +0 -30
  99. package/dist/models/initiate-braintree-payment-setup-request-dto.js +0 -15
  100. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +0 -24
  101. package/dist/models/initiate-braintree-payment-setup-response-class.js +0 -15
  102. package/dist/models/initiate-email-verification-dto.d.ts +0 -30
  103. package/dist/models/initiate-email-verification-dto.js +0 -15
  104. package/dist/models/initiate-email-verification-response-class.d.ts +0 -24
  105. package/dist/models/initiate-email-verification-response-class.js +0 -15
  106. package/dist/models/initiate-lead-response-class.d.ts +0 -24
  107. package/dist/models/initiate-lead-response-class.js +0 -15
  108. package/dist/models/initiate-payment-setup-request-dto.d.ts +0 -32
  109. package/dist/models/initiate-payment-setup-request-dto.js +0 -15
  110. package/dist/models/initiate-payment-setup-response-class.d.ts +0 -32
  111. package/dist/models/initiate-payment-setup-response-class.js +0 -15
  112. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +0 -30
  113. package/dist/models/initiate-stripe-payment-setup-request-dto.js +0 -15
  114. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +0 -30
  115. package/dist/models/initiate-stripe-payment-setup-response-class.js +0 -15
  116. package/dist/models/inline-response200.d.ts +0 -54
  117. package/dist/models/inline-response200.js +0 -15
  118. package/dist/models/inline-response503.d.ts +0 -54
  119. package/dist/models/inline-response503.js +0 -15
  120. package/dist/models/insured-object-class.d.ts +0 -85
  121. package/dist/models/insured-object-class.js +0 -15
  122. package/dist/models/insured-object-type-class.d.ts +0 -48
  123. package/dist/models/insured-object-type-class.js +0 -15
  124. package/dist/models/invoice-class.d.ts +0 -134
  125. package/dist/models/invoice-class.js +0 -15
  126. package/dist/models/invoice-item-class.d.ts +0 -120
  127. package/dist/models/invoice-item-class.js +0 -15
  128. package/dist/models/invoice-status-class.d.ts +0 -42
  129. package/dist/models/invoice-status-class.js +0 -15
  130. package/dist/models/lead-account-class.d.ts +0 -109
  131. package/dist/models/lead-account-class.js +0 -22
  132. package/dist/models/lead-bank-account-class.d.ts +0 -30
  133. package/dist/models/lead-bank-account-class.js +0 -15
  134. package/dist/models/lead-class.d.ts +0 -109
  135. package/dist/models/lead-class.js +0 -15
  136. package/dist/models/lead-policy-class.d.ts +0 -43
  137. package/dist/models/lead-policy-class.js +0 -15
  138. package/dist/models/lead-policy-object-class.d.ts +0 -36
  139. package/dist/models/lead-policy-object-class.js +0 -15
  140. package/dist/models/list-documents-response-class.d.ts +0 -31
  141. package/dist/models/list-documents-response-class.js +0 -15
  142. package/dist/models/list-product-documents-response-class.d.ts +0 -31
  143. package/dist/models/list-product-documents-response-class.js +0 -15
  144. package/dist/models/list-products-response-class.d.ts +0 -31
  145. package/dist/models/list-products-response-class.js +0 -15
  146. package/dist/models/payment-method-class.d.ts +0 -60
  147. package/dist/models/payment-method-class.js +0 -15
  148. package/dist/models/policy-object-request-dto.js +0 -15
  149. package/dist/models/premium-override-dto.d.ts +0 -55
  150. package/dist/models/premium-override-dto.js +0 -27
  151. package/dist/models/premium-override-request-dto.d.ts +0 -25
  152. package/dist/models/premium-override-request-dto.js +0 -15
  153. package/dist/models/product-class.d.ts +0 -80
  154. package/dist/models/product-class.js +0 -15
  155. package/dist/models/product-document-class.d.ts +0 -111
  156. package/dist/models/product-document-class.js +0 -36
  157. package/dist/models/product-factor-for-version-class.d.ts +0 -60
  158. package/dist/models/product-factor-for-version-class.js +0 -15
  159. package/dist/models/product-field-class.d.ts +0 -132
  160. package/dist/models/product-field-class.js +0 -15
  161. package/dist/models/product-version-class.d.ts +0 -61
  162. package/dist/models/product-version-class.js +0 -22
  163. package/dist/models/send-notification-request-dto.d.ts +0 -36
  164. package/dist/models/send-notification-request-dto.js +0 -15
  165. package/dist/models/send-notification-response-class.d.ts +0 -24
  166. package/dist/models/send-notification-response-class.js +0 -15
  167. package/dist/models/sepa-dto.d.ts +0 -30
  168. package/dist/models/sepa-dto.js +0 -15
  169. package/dist/models/structured-address-class.d.ts +0 -54
  170. package/dist/models/structured-address-class.js +0 -15
  171. package/dist/models/suggested-address-details-class.d.ts +0 -90
  172. package/dist/models/suggested-address-details-class.js +0 -15
  173. package/dist/models/update-lead-request-dto.d.ts +0 -95
  174. package/dist/models/update-lead-request-dto.js +0 -15
  175. package/dist/models/update-lead-response-class.d.ts +0 -25
  176. package/dist/models/update-lead-response-class.js +0 -15
  177. package/dist/models/uploaded-document-dto.d.ts +0 -24
  178. package/dist/models/uploaded-document-dto.js +0 -15
  179. package/dist/models/validate-address-response-class.d.ts +0 -50
  180. package/dist/models/validate-address-response-class.js +0 -15
@@ -18,6 +18,8 @@ index.ts
18
18
  models/address-completion-item-class.ts
19
19
  models/address-completion-response-class.ts
20
20
  models/address-field-score-class.ts
21
+ models/calculate-product-fields-request-dto.ts
22
+ models/calculate-product-fields-response-class.ts
21
23
  models/complete-braintree-payment-setup-request-dto.ts
22
24
  models/complete-email-verification-dto.ts
23
25
  models/complete-email-verification-response-class.ts
@@ -69,6 +71,7 @@ models/list-product-documents-response-class.ts
69
71
  models/list-products-response-class.ts
70
72
  models/payment-method-class.ts
71
73
  models/policy-object-request-dto.ts
74
+ models/policy-object-response-class.ts
72
75
  models/premium-override-dto.ts
73
76
  models/premium-override-request-dto.ts
74
77
  models/product-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/public-api-sdk-node@1.22.0 --save
20
+ npm install @emilgroup/public-api-sdk-node@1.26.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk-node@1.22.0
24
+ yarn add @emilgroup/public-api-sdk-node@1.26.0
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
@@ -89,6 +89,55 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
89
89
  options: localVarRequestOptions,
90
90
  };
91
91
  },
92
+ /**
93
+ * 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.
94
+ * @summary Delete a document
95
+ * @param {string} leadCode
96
+ * @param {string} code
97
+ * @param {string} [authorization] Bearer Token
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ deleteDocuments: async (leadCode: string, code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
102
+ // verify required parameter 'leadCode' is not null or undefined
103
+ assertParamExists('deleteDocuments', 'leadCode', leadCode)
104
+ // verify required parameter 'code' is not null or undefined
105
+ assertParamExists('deleteDocuments', 'code', code)
106
+ const localVarPath = `/publicapi/v1/documents/{code}/lead/{leadCode}`
107
+ .replace(`{${"leadCode"}}`, encodeURIComponent(String(leadCode)))
108
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
109
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
110
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
111
+ let baseOptions;
112
+ let baseAccessToken;
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
115
+ baseAccessToken = configuration.accessToken;
116
+ }
117
+
118
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
119
+ const localVarHeaderParameter = {} as any;
120
+ const localVarQueryParameter = {} as any;
121
+
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
125
+
126
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
127
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
128
+ }
129
+
130
+
131
+
132
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
133
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
135
+
136
+ return {
137
+ url: toPathString(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ };
140
+ },
92
141
  /**
93
142
  * 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.
94
143
  * @summary Download a document
@@ -395,6 +444,19 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
395
444
  const localVarAxiosArgs = await localVarAxiosParamCreator.createTemporaryDocument(createDocumentRequestDto, authorization, options);
396
445
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
397
446
  },
447
+ /**
448
+ * 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.
449
+ * @summary Delete a document
450
+ * @param {string} leadCode
451
+ * @param {string} code
452
+ * @param {string} [authorization] Bearer Token
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ */
456
+ async deleteDocuments(leadCode: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
457
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDocuments(leadCode, code, authorization, options);
458
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
459
+ },
398
460
  /**
399
461
  * 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.
400
462
  * @summary Download a document
@@ -487,6 +549,18 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
487
549
  createTemporaryDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
488
550
  return localVarFp.createTemporaryDocument(createDocumentRequestDto, authorization, options).then((request) => request(axios, basePath));
489
551
  },
552
+ /**
553
+ * 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.
554
+ * @summary Delete a document
555
+ * @param {string} leadCode
556
+ * @param {string} code
557
+ * @param {string} [authorization] Bearer Token
558
+ * @param {*} [options] Override http request option.
559
+ * @throws {RequiredError}
560
+ */
561
+ deleteDocuments(leadCode: string, code: string, authorization?: string, options?: any): AxiosPromise<void> {
562
+ return localVarFp.deleteDocuments(leadCode, code, authorization, options).then((request) => request(axios, basePath));
563
+ },
490
564
  /**
491
565
  * 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.
492
566
  * @summary Download a document
@@ -577,6 +651,34 @@ export interface DocumentsApiCreateTemporaryDocumentRequest {
577
651
  readonly authorization?: string
578
652
  }
579
653
 
654
+ /**
655
+ * Request parameters for deleteDocuments operation in DocumentsApi.
656
+ * @export
657
+ * @interface DocumentsApiDeleteDocumentsRequest
658
+ */
659
+ export interface DocumentsApiDeleteDocumentsRequest {
660
+ /**
661
+ *
662
+ * @type {string}
663
+ * @memberof DocumentsApiDeleteDocuments
664
+ */
665
+ readonly leadCode: string
666
+
667
+ /**
668
+ *
669
+ * @type {string}
670
+ * @memberof DocumentsApiDeleteDocuments
671
+ */
672
+ readonly code: string
673
+
674
+ /**
675
+ * Bearer Token
676
+ * @type {string}
677
+ * @memberof DocumentsApiDeleteDocuments
678
+ */
679
+ readonly authorization?: string
680
+ }
681
+
580
682
  /**
581
683
  * Request parameters for downloadDocument operation in DocumentsApi.
582
684
  * @export
@@ -778,6 +880,18 @@ export class DocumentsApi extends BaseAPI {
778
880
  return DocumentsApiFp(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
779
881
  }
780
882
 
883
+ /**
884
+ * 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.
885
+ * @summary Delete a document
886
+ * @param {DocumentsApiDeleteDocumentsRequest} requestParameters Request parameters.
887
+ * @param {*} [options] Override http request option.
888
+ * @throws {RequiredError}
889
+ * @memberof DocumentsApi
890
+ */
891
+ public deleteDocuments(requestParameters: DocumentsApiDeleteDocumentsRequest, options?: AxiosRequestConfig) {
892
+ return DocumentsApiFp(this.configuration).deleteDocuments(requestParameters.leadCode, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
893
+ }
894
+
781
895
  /**
782
896
  * 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.
783
897
  * @summary Download a document
@@ -21,6 +21,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
+ import { CalculateProductFieldsRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CalculateProductFieldsResponseClass } from '../models';
27
+ // @ts-ignore
24
28
  import { CreateCustomApplicationRequestDto } from '../models';
25
29
  // @ts-ignore
26
30
  import { CreateCustomApplicationResponseClass } from '../models';
@@ -48,6 +52,57 @@ const FormData = require('form-data');
48
52
  */
49
53
  export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) {
50
54
  return {
55
+ /**
56
+ * This will calculate product fields.
57
+ * @summary Create the product fields
58
+ * @param {string} productCode
59
+ * @param {CalculateProductFieldsRequestDto} calculateProductFieldsRequestDto
60
+ * @param {string} [authorization] Bearer Token
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ */
64
+ calculateProductFields: async (productCode: string, calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
65
+ // verify required parameter 'productCode' is not null or undefined
66
+ assertParamExists('calculateProductFields', 'productCode', productCode)
67
+ // verify required parameter 'calculateProductFieldsRequestDto' is not null or undefined
68
+ assertParamExists('calculateProductFields', 'calculateProductFieldsRequestDto', calculateProductFieldsRequestDto)
69
+ const localVarPath = `/publicapi/v1/products/{product_code}/calculate-product-fields`
70
+ .replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
71
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
73
+ let baseOptions;
74
+ let baseAccessToken;
75
+ if (configuration) {
76
+ baseOptions = configuration.baseOptions;
77
+ baseAccessToken = configuration.accessToken;
78
+ }
79
+
80
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
81
+ const localVarHeaderParameter = {} as any;
82
+ const localVarQueryParameter = {} as any;
83
+
84
+ // authentication bearer required
85
+ // http bearer authentication required
86
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
87
+
88
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
89
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
90
+ }
91
+
92
+
93
+
94
+ localVarHeaderParameter['Content-Type'] = 'application/json';
95
+
96
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
97
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
98
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
99
+ localVarRequestOptions.data = serializeDataIfNeeded(calculateProductFieldsRequestDto, localVarRequestOptions, configuration)
100
+
101
+ return {
102
+ url: toPathString(localVarUrlObj),
103
+ options: localVarRequestOptions,
104
+ };
105
+ },
51
106
  /**
52
107
  * This will create an invoice product.
53
108
  * @summary Create the invoice product
@@ -414,6 +469,19 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
414
469
  export const ProductsApiFp = function(configuration?: Configuration) {
415
470
  const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
416
471
  return {
472
+ /**
473
+ * This will calculate product fields.
474
+ * @summary Create the product fields
475
+ * @param {string} productCode
476
+ * @param {CalculateProductFieldsRequestDto} calculateProductFieldsRequestDto
477
+ * @param {string} [authorization] Bearer Token
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ async calculateProductFields(productCode: string, calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CalculateProductFieldsResponseClass>> {
482
+ const localVarAxiosArgs = await localVarAxiosParamCreator.calculateProductFields(productCode, calculateProductFieldsRequestDto, authorization, options);
483
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
484
+ },
417
485
  /**
418
486
  * This will create an invoice product.
419
487
  * @summary Create the invoice product
@@ -515,6 +583,18 @@ export const ProductsApiFp = function(configuration?: Configuration) {
515
583
  export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
516
584
  const localVarFp = ProductsApiFp(configuration)
517
585
  return {
586
+ /**
587
+ * This will calculate product fields.
588
+ * @summary Create the product fields
589
+ * @param {string} productCode
590
+ * @param {CalculateProductFieldsRequestDto} calculateProductFieldsRequestDto
591
+ * @param {string} [authorization] Bearer Token
592
+ * @param {*} [options] Override http request option.
593
+ * @throws {RequiredError}
594
+ */
595
+ calculateProductFields(productCode: string, calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto, authorization?: string, options?: any): AxiosPromise<CalculateProductFieldsResponseClass> {
596
+ return localVarFp.calculateProductFields(productCode, calculateProductFieldsRequestDto, authorization, options).then((request) => request(axios, basePath));
597
+ },
518
598
  /**
519
599
  * This will create an invoice product.
520
600
  * @summary Create the invoice product
@@ -602,6 +682,34 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
602
682
  };
603
683
  };
604
684
 
685
+ /**
686
+ * Request parameters for calculateProductFields operation in ProductsApi.
687
+ * @export
688
+ * @interface ProductsApiCalculateProductFieldsRequest
689
+ */
690
+ export interface ProductsApiCalculateProductFieldsRequest {
691
+ /**
692
+ *
693
+ * @type {string}
694
+ * @memberof ProductsApiCalculateProductFields
695
+ */
696
+ readonly productCode: string
697
+
698
+ /**
699
+ *
700
+ * @type {CalculateProductFieldsRequestDto}
701
+ * @memberof ProductsApiCalculateProductFields
702
+ */
703
+ readonly calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto
704
+
705
+ /**
706
+ * Bearer Token
707
+ * @type {string}
708
+ * @memberof ProductsApiCalculateProductFields
709
+ */
710
+ readonly authorization?: string
711
+ }
712
+
605
713
  /**
606
714
  * Request parameters for createEstimatedInvoice operation in ProductsApi.
607
715
  * @export
@@ -805,6 +913,18 @@ export interface ProductsApiListProductsRequest {
805
913
  * @extends {BaseAPI}
806
914
  */
807
915
  export class ProductsApi extends BaseAPI {
916
+ /**
917
+ * This will calculate product fields.
918
+ * @summary Create the product fields
919
+ * @param {ProductsApiCalculateProductFieldsRequest} requestParameters Request parameters.
920
+ * @param {*} [options] Override http request option.
921
+ * @throws {RequiredError}
922
+ * @memberof ProductsApi
923
+ */
924
+ public calculateProductFields(requestParameters: ProductsApiCalculateProductFieldsRequest, options?: AxiosRequestConfig) {
925
+ return ProductsApiFp(this.configuration).calculateProductFields(requestParameters.productCode, requestParameters.calculateProductFieldsRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
926
+ }
927
+
808
928
  /**
809
929
  * This will create an invoice product.
810
930
  * @summary Create the invoice product
@@ -0,0 +1,37 @@
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 { PolicyObjectRequestDto } from './policy-object-request-dto';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface CalculateProductFieldsRequestDto
22
+ */
23
+ export interface CalculateProductFieldsRequestDto {
24
+ /**
25
+ * Unique identifier referencing the product version.
26
+ * @type {number}
27
+ * @memberof CalculateProductFieldsRequestDto
28
+ */
29
+ 'productVersionId'?: number;
30
+ /**
31
+ * The policy objects to calculate product fields by.
32
+ * @type {Array<PolicyObjectRequestDto>}
33
+ * @memberof CalculateProductFieldsRequestDto
34
+ */
35
+ 'policyObjects'?: Array<PolicyObjectRequestDto>;
36
+ }
37
+
@@ -0,0 +1,31 @@
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 { PolicyObjectResponseClass } from './policy-object-response-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface CalculateProductFieldsResponseClass
22
+ */
23
+ export interface CalculateProductFieldsResponseClass {
24
+ /**
25
+ * Policy objects with calculated fields.
26
+ * @type {Array<PolicyObjectResponseClass>}
27
+ * @memberof CalculateProductFieldsResponseClass
28
+ */
29
+ 'policyObjects': Array<PolicyObjectResponseClass>;
30
+ }
31
+
@@ -13,6 +13,7 @@
13
13
  */
14
14
 
15
15
 
16
+ import { CalculateProductFieldsResponseClass } from './calculate-product-fields-response-class';
16
17
  import { InvoiceClass } from './invoice-class';
17
18
 
18
19
  /**
@@ -28,10 +29,16 @@ export interface CreateEstimatedInvoiceResponseClass {
28
29
  */
29
30
  'invoice'?: InvoiceClass;
30
31
  /**
31
- * In some cases, custom premium calculation needs to be used. In that case, a custom object is returned. It can hold up any kind of information. For more information, check the general documentation.
32
+ * In some cases, custom premium calculation needs to be used. In that case, a custom object is returned. It can hold up any kind of information. For more information, check the general documentation.
32
33
  * @type {object}
33
34
  * @memberof CreateEstimatedInvoiceResponseClass
34
35
  */
35
36
  'custom'?: object;
37
+ /**
38
+ * Calculated policy obejcts response
39
+ * @type {CalculateProductFieldsResponseClass}
40
+ * @memberof CreateEstimatedInvoiceResponseClass
41
+ */
42
+ 'policyObjects'?: CalculateProductFieldsResponseClass;
36
43
  }
37
44
 
@@ -57,7 +57,7 @@ export interface CreateLeadRequestDto {
57
57
  */
58
58
  'account'?: CreateAccountRequestDto;
59
59
  /**
60
- * The account code is used in cases where the account has been created before the lead. The create lead request should include either the \'accountCode\' or \'account\'. The account code will be validated if the \'validate\' flag is set to true.
60
+ * The account code is used in cases where the account has been created before the lead. The create lead request should include either the \'accountCode\' or \'account\'. The account code will be validated if the \'validate\' flag is set to true.
61
61
  * @type {string}
62
62
  * @memberof CreateLeadRequestDto
63
63
  */
@@ -69,31 +69,31 @@ export interface CreateLeadRequestDto {
69
69
  */
70
70
  'policyObjects'?: Array<PolicyObjectRequestDto>;
71
71
  /**
72
- * Bank account details, to be used for direct debit payments, the created bank account will be attached to the lead for later use, such as paying claims. The bank account content will be validated if the \'validate\' flag is set to true.
72
+ * Bank account details, to be used for direct debit payments, the created bank account will be attached to the lead for later use, such as paying claims. The bank account content will be validated if the \'validate\' flag is set to true.
73
73
  * @type {CreateBankAccountRequestDto}
74
74
  * @memberof CreateLeadRequestDto
75
75
  */
76
76
  'bankAccount'?: CreateBankAccountRequestDto;
77
77
  /**
78
- * Optional custom data for the lead. This field is useful for edge cases where the lead requires additional data for the risk carrier, such as creating an application in the risk carrier platform or performing a premium calculation. The custom data should include three main entities: \'data\', \'provider\', and \'productCode\'. The \'data\' entity contains information used in the risk carrier platform, the \'provider\' field contains the name of the provider (usually the risk carrier\'s name), the provider must be supported in EMIL, The \'productCode\' field contains the product code in EMIL
78
+ * Optional custom data for the lead. This field is useful for edge cases where the lead requires additional data for the risk carrier, such as creating an application in the risk carrier platform or performing a premium calculation. The custom data should include three main entities: \'data\', \'provider\', and \'productCode\'. The \'data\' entity contains information used in the risk carrier platform, the \'provider\' field contains the name of the provider (usually the risk carrier\'s name), the provider must be supported in EMIL, The \'productCode\' field contains the product code in EMIL
79
79
  * @type {object}
80
80
  * @memberof CreateLeadRequestDto
81
81
  */
82
82
  'customData'?: object;
83
83
  /**
84
- * Used to pass pre-uploaded documents to the lead. By providing the codes of the uploaded documents, they will be attached to the lead. The uploaded document content will be validated if the \'validate\' flag is set to true.
84
+ * Used to pass pre-uploaded documents to the lead. By providing the codes of the uploaded documents, they will be attached to the lead. The uploaded document content will be validated if the \'validate\' flag is set to true.
85
85
  * @type {UploadedDocumentDto}
86
86
  * @memberof CreateLeadRequestDto
87
87
  */
88
88
  'uploadedDocument'?: UploadedDocumentDto;
89
89
  /**
90
- * Lead status. Default values are \"created\", \"approved\" and \"declined\". However, those can be extended using /lead-statuses endpoint from insuranceservice.
90
+ * Lead status. Default values are \"created\", \"approved\" and \"declined\". However, those can be extended using /lead-statuses endpoint from insuranceservice.
91
91
  * @type {string}
92
92
  * @memberof CreateLeadRequestDto
93
93
  */
94
94
  'status'?: string;
95
95
  /**
96
- * Premium Override is utilized to override the premium calculation. The premium formulas will be disregarded when this object is present. The premium override content will be validated if the \'validate\' flag is set to true.
96
+ * Premium Override is utilized to override the premium calculation. The premium formulas will be disregarded when this object is present. The premium override content will be validated if the \'validate\' flag is set to true.
97
97
  * @type {Array<PremiumOverrideRequestDto>}
98
98
  * @memberof CreateLeadRequestDto
99
99
  */
@@ -105,7 +105,7 @@ export interface CreateLeadRequestDto {
105
105
  */
106
106
  'paymentMethod'?: CreatePaymentMethodRequestDto;
107
107
  /**
108
- * The validation indicator, with a default value of true, serves as a toggle. When set to false, it allows the bypassing of validation—a useful option for saving leads for later processing. This feature provides flexibility by enabling users to choose whether to enforce validation checks during the current stage or defer them for a subsequent time.
108
+ * The validation indicator, with a default value of true, serves as a toggle. When set to false, it allows the bypassing of validation—a useful option for saving leads for later processing. This feature provides flexibility by enabling users to choose whether to enforce validation checks during the current stage or defer them for a subsequent time.
109
109
  * @type {boolean}
110
110
  * @memberof CreateLeadRequestDto
111
111
  */
@@ -98,6 +98,12 @@ export interface DocumentClass {
98
98
  * @memberof DocumentClass
99
99
  */
100
100
  'filename': string;
101
+ /**
102
+ * Lead
103
+ * @type {string}
104
+ * @memberof DocumentClass
105
+ */
106
+ 'leadCode': string;
101
107
  /**
102
108
  * Time at which the object was created.
103
109
  * @type {string}
package/models/index.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export * from './address-completion-item-class';
2
2
  export * from './address-completion-response-class';
3
3
  export * from './address-field-score-class';
4
+ export * from './calculate-product-fields-request-dto';
5
+ export * from './calculate-product-fields-response-class';
4
6
  export * from './complete-braintree-payment-setup-request-dto';
5
7
  export * from './complete-email-verification-dto';
6
8
  export * from './complete-email-verification-response-class';
@@ -51,6 +53,7 @@ export * from './list-product-documents-response-class';
51
53
  export * from './list-products-response-class';
52
54
  export * from './payment-method-class';
53
55
  export * from './policy-object-request-dto';
56
+ export * from './policy-object-response-class';
54
57
  export * from './premium-override-dto';
55
58
  export * from './premium-override-request-dto';
56
59
  export * from './product-class';
@@ -28,21 +28,21 @@ export interface InlineResponse200 {
28
28
  'status'?: string;
29
29
  /**
30
30
  *
31
- * @type {{ [key: string]: { [key: string]: string; }; }}
31
+ * @type {{ [key: string]: { [key: string]: object; }; }}
32
32
  * @memberof InlineResponse200
33
33
  */
34
- 'info'?: { [key: string]: { [key: string]: string; }; } | null;
34
+ 'info'?: { [key: string]: { [key: string]: object; }; } | null;
35
35
  /**
36
36
  *
37
- * @type {{ [key: string]: { [key: string]: string; }; }}
37
+ * @type {{ [key: string]: { [key: string]: object; }; }}
38
38
  * @memberof InlineResponse200
39
39
  */
40
- 'error'?: { [key: string]: { [key: string]: string; }; } | null;
40
+ 'error'?: { [key: string]: { [key: string]: object; }; } | null;
41
41
  /**
42
42
  *
43
- * @type {{ [key: string]: { [key: string]: string; }; }}
43
+ * @type {{ [key: string]: { [key: string]: object; }; }}
44
44
  * @memberof InlineResponse200
45
45
  */
46
- 'details'?: { [key: string]: { [key: string]: string; }; };
46
+ 'details'?: { [key: string]: { [key: string]: object; }; };
47
47
  }
48
48
 
@@ -28,21 +28,21 @@ export interface InlineResponse503 {
28
28
  'status'?: string;
29
29
  /**
30
30
  *
31
- * @type {{ [key: string]: { [key: string]: string; }; }}
31
+ * @type {{ [key: string]: { [key: string]: object; }; }}
32
32
  * @memberof InlineResponse503
33
33
  */
34
- 'info'?: { [key: string]: { [key: string]: string; }; } | null;
34
+ 'info'?: { [key: string]: { [key: string]: object; }; } | null;
35
35
  /**
36
36
  *
37
- * @type {{ [key: string]: { [key: string]: string; }; }}
37
+ * @type {{ [key: string]: { [key: string]: object; }; }}
38
38
  * @memberof InlineResponse503
39
39
  */
40
- 'error'?: { [key: string]: { [key: string]: string; }; } | null;
40
+ 'error'?: { [key: string]: { [key: string]: object; }; } | null;
41
41
  /**
42
42
  *
43
- * @type {{ [key: string]: { [key: string]: string; }; }}
43
+ * @type {{ [key: string]: { [key: string]: object; }; }}
44
44
  * @memberof InlineResponse503
45
45
  */
46
- 'details'?: { [key: string]: { [key: string]: string; }; };
46
+ 'details'?: { [key: string]: { [key: string]: object; }; };
47
47
  }
48
48
 
@@ -27,7 +27,7 @@ export interface PolicyObjectRequestDto {
27
27
  */
28
28
  'insuredObjectId'?: number;
29
29
  /**
30
- * Insured object name. Human readable identifier of insured object. Can be used instead of insuredObjectId
30
+ * Insured object name. Human readable identifier of insured object. Can be used instead of insuredObjectId
31
31
  * @type {string}
32
32
  * @memberof PolicyObjectRequestDto
33
33
  */
@@ -1,3 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
1
3
  /**
2
4
  * Emil PublicAPI
3
5
  * The Emil Public API description
@@ -9,34 +11,32 @@
9
11
  * https://openapi-generator.tech
10
12
  * Do not edit the class manually.
11
13
  */
14
+
15
+
16
+
12
17
  /**
13
- *
18
+ *
14
19
  * @export
15
- * @interface PolicyObjectRequestDto
20
+ * @interface PolicyObjectResponseClass
16
21
  */
17
- export interface PolicyObjectRequestDto {
22
+ export interface PolicyObjectResponseClass {
18
23
  /**
19
24
  * The id of the insured object to be used in the policy. The insured object id will be validated if the \'validate\' flag is set to true.
20
25
  * @type {number}
21
- * @memberof PolicyObjectRequestDto
26
+ * @memberof PolicyObjectResponseClass
22
27
  */
23
- 'insuredObjectId'?: number;
28
+ 'insuredObjectId': number;
24
29
  /**
25
- * Insured object name. Human readable identifier of insured object. Can be used instead of insuredObjectId
30
+ * Insured object name. Human readable identifier of insured object. Can be used instead of insuredObjectId
26
31
  * @type {string}
27
- * @memberof PolicyObjectRequestDto
32
+ * @memberof PolicyObjectResponseClass
28
33
  */
29
- 'insuredObjectName'?: string;
34
+ 'insuredObjectName': string;
30
35
  /**
31
36
  * Insured object data. The date will be validated if the \'validate\' flag is set to true.
32
37
  * @type {object}
33
- * @memberof PolicyObjectRequestDto
34
- */
35
- 'data'?: object;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof PolicyObjectRequestDto
38
+ * @memberof PolicyObjectResponseClass
40
39
  */
41
- 'code'?: string;
40
+ 'data': object;
42
41
  }
42
+