@emilgroup/public-api-sdk 1.20.0 → 1.25.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 +1 -2
  18. package/dist/api/address-completions-validations-api.d.ts +0 -215
  19. package/dist/api/address-completions-validations-api.js +0 -369
  20. package/dist/api/default-api.d.ts +0 -66
  21. package/dist/api/default-api.js +0 -196
  22. package/dist/api/documents-api.d.ts +0 -475
  23. package/dist/api/documents-api.js +0 -753
  24. package/dist/api/leads-api.d.ts +0 -441
  25. package/dist/api/leads-api.js +0 -787
  26. package/dist/api/notifications-api.d.ts +0 -211
  27. package/dist/api/notifications-api.js +0 -410
  28. package/dist/api/payments-setup-api.d.ts +0 -228
  29. package/dist/api/payments-setup-api.js +0 -422
  30. package/dist/api/products-api.d.ts +0 -497
  31. package/dist/api/products-api.js +0 -823
  32. package/dist/api.d.ts +0 -18
  33. package/dist/api.js +0 -36
  34. package/dist/base.d.ts +0 -74
  35. package/dist/base.js +0 -298
  36. package/dist/common.d.ts +0 -91
  37. package/dist/common.js +0 -276
  38. package/dist/configuration.d.ts +0 -83
  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@1.20.0 --save
20
+ npm install @emilgroup/public-api-sdk@1.25.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk@1.20.0
24
+ yarn add @emilgroup/public-api-sdk@1.25.0
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
@@ -85,6 +85,55 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
85
85
  options: localVarRequestOptions,
86
86
  };
87
87
  },
88
+ /**
89
+ * 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.
90
+ * @summary Delete a document
91
+ * @param {string} leadCode
92
+ * @param {string} code
93
+ * @param {string} [authorization] Bearer Token
94
+ * @param {*} [options] Override http request option.
95
+ * @throws {RequiredError}
96
+ */
97
+ deleteDocuments: async (leadCode: string, code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
98
+ // verify required parameter 'leadCode' is not null or undefined
99
+ assertParamExists('deleteDocuments', 'leadCode', leadCode)
100
+ // verify required parameter 'code' is not null or undefined
101
+ assertParamExists('deleteDocuments', 'code', code)
102
+ const localVarPath = `/publicapi/v1/documents/{code}/lead/{leadCode}`
103
+ .replace(`{${"leadCode"}}`, encodeURIComponent(String(leadCode)))
104
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
105
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
107
+ let baseOptions;
108
+ let baseAccessToken;
109
+ if (configuration) {
110
+ baseOptions = configuration.baseOptions;
111
+ baseAccessToken = configuration.accessToken;
112
+ }
113
+
114
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
115
+ const localVarHeaderParameter = {} as any;
116
+ const localVarQueryParameter = {} as any;
117
+
118
+ // authentication bearer required
119
+ // http bearer authentication required
120
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
+
122
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
123
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
124
+ }
125
+
126
+
127
+
128
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
129
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
130
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
131
+
132
+ return {
133
+ url: toPathString(localVarUrlObj),
134
+ options: localVarRequestOptions,
135
+ };
136
+ },
88
137
  /**
89
138
  * 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.
90
139
  * @summary Download a document
@@ -391,6 +440,19 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
391
440
  const localVarAxiosArgs = await localVarAxiosParamCreator.createTemporaryDocument(createDocumentRequestDto, authorization, options);
392
441
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
393
442
  },
443
+ /**
444
+ * 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.
445
+ * @summary Delete a document
446
+ * @param {string} leadCode
447
+ * @param {string} code
448
+ * @param {string} [authorization] Bearer Token
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ async deleteDocuments(leadCode: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
453
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDocuments(leadCode, code, authorization, options);
454
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
455
+ },
394
456
  /**
395
457
  * 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.
396
458
  * @summary Download a document
@@ -483,6 +545,18 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
483
545
  createTemporaryDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
484
546
  return localVarFp.createTemporaryDocument(createDocumentRequestDto, authorization, options).then((request) => request(axios, basePath));
485
547
  },
548
+ /**
549
+ * 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.
550
+ * @summary Delete a document
551
+ * @param {string} leadCode
552
+ * @param {string} code
553
+ * @param {string} [authorization] Bearer Token
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ */
557
+ deleteDocuments(leadCode: string, code: string, authorization?: string, options?: any): AxiosPromise<void> {
558
+ return localVarFp.deleteDocuments(leadCode, code, authorization, options).then((request) => request(axios, basePath));
559
+ },
486
560
  /**
487
561
  * 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.
488
562
  * @summary Download a document
@@ -573,6 +647,34 @@ export interface DocumentsApiCreateTemporaryDocumentRequest {
573
647
  readonly authorization?: string
574
648
  }
575
649
 
650
+ /**
651
+ * Request parameters for deleteDocuments operation in DocumentsApi.
652
+ * @export
653
+ * @interface DocumentsApiDeleteDocumentsRequest
654
+ */
655
+ export interface DocumentsApiDeleteDocumentsRequest {
656
+ /**
657
+ *
658
+ * @type {string}
659
+ * @memberof DocumentsApiDeleteDocuments
660
+ */
661
+ readonly leadCode: string
662
+
663
+ /**
664
+ *
665
+ * @type {string}
666
+ * @memberof DocumentsApiDeleteDocuments
667
+ */
668
+ readonly code: string
669
+
670
+ /**
671
+ * Bearer Token
672
+ * @type {string}
673
+ * @memberof DocumentsApiDeleteDocuments
674
+ */
675
+ readonly authorization?: string
676
+ }
677
+
576
678
  /**
577
679
  * Request parameters for downloadDocument operation in DocumentsApi.
578
680
  * @export
@@ -774,6 +876,18 @@ export class DocumentsApi extends BaseAPI {
774
876
  return DocumentsApiFp(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
775
877
  }
776
878
 
879
+ /**
880
+ * 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.
881
+ * @summary Delete a document
882
+ * @param {DocumentsApiDeleteDocumentsRequest} requestParameters Request parameters.
883
+ * @param {*} [options] Override http request option.
884
+ * @throws {RequiredError}
885
+ * @memberof DocumentsApi
886
+ */
887
+ public deleteDocuments(requestParameters: DocumentsApiDeleteDocumentsRequest, options?: AxiosRequestConfig) {
888
+ return DocumentsApiFp(this.configuration).deleteDocuments(requestParameters.leadCode, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
889
+ }
890
+
777
891
  /**
778
892
  * 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.
779
893
  * @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';
@@ -44,6 +48,57 @@ import { ProductFactorForVersionClass } from '../models';
44
48
  */
45
49
  export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) {
46
50
  return {
51
+ /**
52
+ * This will calculate product fields.
53
+ * @summary Create the product fields
54
+ * @param {string} productCode
55
+ * @param {CalculateProductFieldsRequestDto} calculateProductFieldsRequestDto
56
+ * @param {string} [authorization] Bearer Token
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ calculateProductFields: async (productCode: string, calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
61
+ // verify required parameter 'productCode' is not null or undefined
62
+ assertParamExists('calculateProductFields', 'productCode', productCode)
63
+ // verify required parameter 'calculateProductFieldsRequestDto' is not null or undefined
64
+ assertParamExists('calculateProductFields', 'calculateProductFieldsRequestDto', calculateProductFieldsRequestDto)
65
+ const localVarPath = `/publicapi/v1/products/{product_code}/calculate-product-fields`
66
+ .replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
67
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
68
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
69
+ let baseOptions;
70
+ let baseAccessToken;
71
+ if (configuration) {
72
+ baseOptions = configuration.baseOptions;
73
+ baseAccessToken = configuration.accessToken;
74
+ }
75
+
76
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
77
+ const localVarHeaderParameter = {} as any;
78
+ const localVarQueryParameter = {} as any;
79
+
80
+ // authentication bearer required
81
+ // http bearer authentication required
82
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
83
+
84
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
85
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
86
+ }
87
+
88
+
89
+
90
+ localVarHeaderParameter['Content-Type'] = 'application/json';
91
+
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95
+ localVarRequestOptions.data = serializeDataIfNeeded(calculateProductFieldsRequestDto, localVarRequestOptions, configuration)
96
+
97
+ return {
98
+ url: toPathString(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ },
47
102
  /**
48
103
  * This will create an invoice product.
49
104
  * @summary Create the invoice product
@@ -410,6 +465,19 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
410
465
  export const ProductsApiFp = function(configuration?: Configuration) {
411
466
  const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
412
467
  return {
468
+ /**
469
+ * This will calculate product fields.
470
+ * @summary Create the product fields
471
+ * @param {string} productCode
472
+ * @param {CalculateProductFieldsRequestDto} calculateProductFieldsRequestDto
473
+ * @param {string} [authorization] Bearer Token
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ */
477
+ async calculateProductFields(productCode: string, calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CalculateProductFieldsResponseClass>> {
478
+ const localVarAxiosArgs = await localVarAxiosParamCreator.calculateProductFields(productCode, calculateProductFieldsRequestDto, authorization, options);
479
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
480
+ },
413
481
  /**
414
482
  * This will create an invoice product.
415
483
  * @summary Create the invoice product
@@ -511,6 +579,18 @@ export const ProductsApiFp = function(configuration?: Configuration) {
511
579
  export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
512
580
  const localVarFp = ProductsApiFp(configuration)
513
581
  return {
582
+ /**
583
+ * This will calculate product fields.
584
+ * @summary Create the product fields
585
+ * @param {string} productCode
586
+ * @param {CalculateProductFieldsRequestDto} calculateProductFieldsRequestDto
587
+ * @param {string} [authorization] Bearer Token
588
+ * @param {*} [options] Override http request option.
589
+ * @throws {RequiredError}
590
+ */
591
+ calculateProductFields(productCode: string, calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto, authorization?: string, options?: any): AxiosPromise<CalculateProductFieldsResponseClass> {
592
+ return localVarFp.calculateProductFields(productCode, calculateProductFieldsRequestDto, authorization, options).then((request) => request(axios, basePath));
593
+ },
514
594
  /**
515
595
  * This will create an invoice product.
516
596
  * @summary Create the invoice product
@@ -598,6 +678,34 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
598
678
  };
599
679
  };
600
680
 
681
+ /**
682
+ * Request parameters for calculateProductFields operation in ProductsApi.
683
+ * @export
684
+ * @interface ProductsApiCalculateProductFieldsRequest
685
+ */
686
+ export interface ProductsApiCalculateProductFieldsRequest {
687
+ /**
688
+ *
689
+ * @type {string}
690
+ * @memberof ProductsApiCalculateProductFields
691
+ */
692
+ readonly productCode: string
693
+
694
+ /**
695
+ *
696
+ * @type {CalculateProductFieldsRequestDto}
697
+ * @memberof ProductsApiCalculateProductFields
698
+ */
699
+ readonly calculateProductFieldsRequestDto: CalculateProductFieldsRequestDto
700
+
701
+ /**
702
+ * Bearer Token
703
+ * @type {string}
704
+ * @memberof ProductsApiCalculateProductFields
705
+ */
706
+ readonly authorization?: string
707
+ }
708
+
601
709
  /**
602
710
  * Request parameters for createEstimatedInvoice operation in ProductsApi.
603
711
  * @export
@@ -801,6 +909,18 @@ export interface ProductsApiListProductsRequest {
801
909
  * @extends {BaseAPI}
802
910
  */
803
911
  export class ProductsApi extends BaseAPI {
912
+ /**
913
+ * This will calculate product fields.
914
+ * @summary Create the product fields
915
+ * @param {ProductsApiCalculateProductFieldsRequest} requestParameters Request parameters.
916
+ * @param {*} [options] Override http request option.
917
+ * @throws {RequiredError}
918
+ * @memberof ProductsApi
919
+ */
920
+ public calculateProductFields(requestParameters: ProductsApiCalculateProductFieldsRequest, options?: AxiosRequestConfig) {
921
+ return ProductsApiFp(this.configuration).calculateProductFields(requestParameters.productCode, requestParameters.calculateProductFieldsRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
922
+ }
923
+
804
924
  /**
805
925
  * This will create an invoice product.
806
926
  * @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
+