@emilgroup/public-api-sdk 1.26.0 → 1.28.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.
@@ -71,6 +71,7 @@ models/lead-bank-account-class.ts
71
71
  models/lead-class.ts
72
72
  models/lead-policy-class.ts
73
73
  models/lead-policy-object-class.ts
74
+ models/link-lead-partner-request-dto.ts
74
75
  models/list-documents-response-class.ts
75
76
  models/list-product-documents-response-class.ts
76
77
  models/list-products-response-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.26.0 --save
20
+ npm install @emilgroup/public-api-sdk@1.28.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk@1.26.0
24
+ yarn add @emilgroup/public-api-sdk@1.28.0
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
@@ -29,7 +29,7 @@ import { GetBookingFunnelResponseClass } from '../models';
29
29
  export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Configuration) {
30
30
  return {
31
31
  /**
32
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
32
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
33
33
  * @summary Retrieve the booking funnel
34
34
  * @param {string} code Unique identifier for the object.
35
35
  * @param {string} [authorization] Bearer Token
@@ -84,7 +84,7 @@ export const BookingFunnelsApiFp = function(configuration?: Configuration) {
84
84
  const localVarAxiosParamCreator = BookingFunnelsApiAxiosParamCreator(configuration)
85
85
  return {
86
86
  /**
87
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
87
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
88
88
  * @summary Retrieve the booking funnel
89
89
  * @param {string} code Unique identifier for the object.
90
90
  * @param {string} [authorization] Bearer Token
@@ -106,7 +106,7 @@ export const BookingFunnelsApiFactory = function (configuration?: Configuration,
106
106
  const localVarFp = BookingFunnelsApiFp(configuration)
107
107
  return {
108
108
  /**
109
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
109
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
110
110
  * @summary Retrieve the booking funnel
111
111
  * @param {string} code Unique identifier for the object.
112
112
  * @param {string} [authorization] Bearer Token
@@ -148,7 +148,7 @@ export interface BookingFunnelsApiGetBookingFunnelRequest {
148
148
  */
149
149
  export class BookingFunnelsApi extends BaseAPI {
150
150
  /**
151
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
151
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
152
152
  * @summary Retrieve the booking funnel
153
153
  * @param {BookingFunnelsApiGetBookingFunnelRequest} requestParameters Request parameters.
154
154
  * @param {*} [options] Override http request option.
@@ -185,10 +185,11 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
185
185
  * @param {string} productCode
186
186
  * @param {string} code
187
187
  * @param {string} [authorization] Bearer Token
188
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
188
189
  * @param {*} [options] Override http request option.
189
190
  * @throws {RequiredError}
190
191
  */
191
- downloadProductDocumentUrl: async (productCode: string, code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
192
+ downloadProductDocumentUrl: async (productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
192
193
  // verify required parameter 'productCode' is not null or undefined
193
194
  assertParamExists('downloadProductDocumentUrl', 'productCode', productCode)
194
195
  // verify required parameter 'code' is not null or undefined
@@ -213,6 +214,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
213
214
  // http bearer authentication required
214
215
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
215
216
 
217
+ if (contentDisposition !== undefined) {
218
+ localVarQueryParameter['contentDisposition'] = contentDisposition;
219
+ }
220
+
216
221
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
217
222
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
218
223
  }
@@ -476,11 +481,12 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
476
481
  * @param {string} productCode
477
482
  * @param {string} code
478
483
  * @param {string} [authorization] Bearer Token
484
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
479
485
  * @param {*} [options] Override http request option.
480
486
  * @throws {RequiredError}
481
487
  */
482
- async downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>> {
483
- const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, options);
488
+ async downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>> {
489
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options);
484
490
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
485
491
  },
486
492
  /**
@@ -580,11 +586,12 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
580
586
  * @param {string} productCode
581
587
  * @param {string} code
582
588
  * @param {string} [authorization] Bearer Token
589
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
583
590
  * @param {*} [options] Override http request option.
584
591
  * @throws {RequiredError}
585
592
  */
586
- downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass> {
587
- return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, options).then((request) => request(axios, basePath));
593
+ downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass> {
594
+ return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options).then((request) => request(axios, basePath));
588
595
  },
589
596
  /**
590
597
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -729,6 +736,13 @@ export interface DocumentsApiDownloadProductDocumentUrlRequest {
729
736
  * @memberof DocumentsApiDownloadProductDocumentUrl
730
737
  */
731
738
  readonly authorization?: string
739
+
740
+ /**
741
+ * Content disposition override. Default will be depending on the document type.
742
+ * @type {'attachment' | 'inline'}
743
+ * @memberof DocumentsApiDownloadProductDocumentUrl
744
+ */
745
+ readonly contentDisposition?: 'attachment' | 'inline'
732
746
  }
733
747
 
734
748
  /**
@@ -923,7 +937,7 @@ export class DocumentsApi extends BaseAPI {
923
937
  * @memberof DocumentsApi
924
938
  */
925
939
  public downloadProductDocumentUrl(requestParameters: DocumentsApiDownloadProductDocumentUrlRequest, options?: AxiosRequestConfig) {
926
- return DocumentsApiFp(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
940
+ return DocumentsApiFp(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
927
941
  }
928
942
 
929
943
  /**
package/api/leads-api.ts CHANGED
@@ -182,7 +182,7 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
182
182
  };
183
183
  },
184
184
  /**
185
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
185
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
186
186
  * @summary Retrieve the lead
187
187
  * @param {string} code Unique identifier for the object.
188
188
  * @param {string} [authorization] Bearer Token
@@ -416,7 +416,7 @@ export const LeadsApiFp = function(configuration?: Configuration) {
416
416
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
417
417
  },
418
418
  /**
419
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
419
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
420
420
  * @summary Retrieve the lead
421
421
  * @param {string} code Unique identifier for the object.
422
422
  * @param {string} [authorization] Bearer Token
@@ -508,7 +508,7 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
508
508
  return localVarFp.createLeadSync(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
509
509
  },
510
510
  /**
511
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
511
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
512
512
  * @summary Retrieve the lead
513
513
  * @param {string} code Unique identifier for the object.
514
514
  * @param {string} [authorization] Bearer Token
@@ -753,7 +753,7 @@ export class LeadsApi extends BaseAPI {
753
753
  }
754
754
 
755
755
  /**
756
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
756
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
757
757
  * @summary Retrieve the lead
758
758
  * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
759
759
  * @param {*} [options] Override http request option.
package/base.ts CHANGED
@@ -77,6 +77,7 @@ const TOKEN_DATA = 'APP_TOKEN';
77
77
  export class BaseAPI {
78
78
  protected configuration: Configuration | undefined;
79
79
  private tokenData?: TokenData;
80
+ private permissions: Array<string> = [];
80
81
 
81
82
  constructor(configuration?: Configuration,
82
83
  protected basePath: string = BASE_PATH,
@@ -102,7 +103,15 @@ export class BaseAPI {
102
103
  }
103
104
 
104
105
  selectEnvironment(env: Environment) {
105
- this.configuration.basePath = env;
106
+ this.selectBasePath(env);
107
+ }
108
+
109
+ selectBasePath(path: string) {
110
+ this.configuration.basePath = path;
111
+ }
112
+
113
+ getPermissions(): Array<string> {
114
+ return this.permissions;
106
115
  }
107
116
 
108
117
  async authorize(username: string, password: string): Promise<void> {
@@ -119,23 +128,24 @@ export class BaseAPI {
119
128
 
120
129
  const response = await globalAxios.request<LoginClass>(options);
121
130
 
122
- const { data: { accessToken } } = response;
131
+ const { data: { accessToken, permissions } } = response;
123
132
 
124
133
  this.configuration.username = username;
125
134
  this.configuration.accessToken = `Bearer ${accessToken}`;
126
135
  this.tokenData.username = username;
127
136
  this.tokenData.accessToken = accessToken;
137
+ this.permissions = permissions;
128
138
 
129
139
  this.storeTokenData({
130
140
  ...this.tokenData
131
141
  });
132
142
  }
133
143
 
134
- async refreshTokenInternal(): Promise<string> {
144
+ async refreshTokenInternal(): Promise<LoginClass> {
135
145
  const { username } = this.configuration;
136
146
 
137
147
  if (!username) {
138
- return '';
148
+ throw new Error('Failed to refresh token.');
139
149
  }
140
150
 
141
151
  const options: AxiosRequestConfig = {
@@ -148,9 +158,9 @@ export class BaseAPI {
148
158
  withCredentials: true,
149
159
  };
150
160
 
151
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
161
+ const response = await globalAxios.request<LoginClass>(options);
152
162
 
153
- return accessToken;
163
+ return response.data;
154
164
  }
155
165
 
156
166
  private storeTokenData(tokenData?: TokenData) {
@@ -184,8 +194,9 @@ export class BaseAPI {
184
194
  && !originalConfig._retry) {
185
195
  originalConfig._retry = true;
186
196
  try {
187
- let tokenString = await this.refreshTokenInternal();
197
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
188
198
  const accessToken = `Bearer ${tokenString}`;
199
+ this.permissions = permissions;
189
200
 
190
201
  delete originalConfig.headers['Authorization']
191
202
 
@@ -210,8 +221,9 @@ export class BaseAPI {
210
221
  ) {
211
222
  _retry_count++;
212
223
  try {
213
- let tokenString = await this.refreshTokenInternal();
224
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
214
225
  const accessToken = `Bearer ${tokenString}`;
226
+ this.permissions = permissions;
215
227
 
216
228
  _retry = true;
217
229
  originalConfig.headers['Authorization'] = accessToken;
@@ -19,7 +19,7 @@ import { GetBookingFunnelResponseClass } from '../models';
19
19
  */
20
20
  export declare const BookingFunnelsApiAxiosParamCreator: (configuration?: Configuration) => {
21
21
  /**
22
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
22
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
23
23
  * @summary Retrieve the booking funnel
24
24
  * @param {string} code Unique identifier for the object.
25
25
  * @param {string} [authorization] Bearer Token
@@ -34,7 +34,7 @@ export declare const BookingFunnelsApiAxiosParamCreator: (configuration?: Config
34
34
  */
35
35
  export declare const BookingFunnelsApiFp: (configuration?: Configuration) => {
36
36
  /**
37
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
37
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
38
38
  * @summary Retrieve the booking funnel
39
39
  * @param {string} code Unique identifier for the object.
40
40
  * @param {string} [authorization] Bearer Token
@@ -49,7 +49,7 @@ export declare const BookingFunnelsApiFp: (configuration?: Configuration) => {
49
49
  */
50
50
  export declare const BookingFunnelsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
51
51
  /**
52
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
52
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
53
53
  * @summary Retrieve the booking funnel
54
54
  * @param {string} code Unique identifier for the object.
55
55
  * @param {string} [authorization] Bearer Token
@@ -85,7 +85,7 @@ export interface BookingFunnelsApiGetBookingFunnelRequest {
85
85
  */
86
86
  export declare class BookingFunnelsApi extends BaseAPI {
87
87
  /**
88
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
88
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
89
89
  * @summary Retrieve the booking funnel
90
90
  * @param {BookingFunnelsApiGetBookingFunnelRequest} requestParameters Request parameters.
91
91
  * @param {*} [options] Override http request option.
@@ -93,7 +93,7 @@ var BookingFunnelsApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
95
  /**
96
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
96
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
97
97
  * @summary Retrieve the booking funnel
98
98
  * @param {string} code Unique identifier for the object.
99
99
  * @param {string} [authorization] Bearer Token
@@ -151,7 +151,7 @@ var BookingFunnelsApiFp = function (configuration) {
151
151
  var localVarAxiosParamCreator = (0, exports.BookingFunnelsApiAxiosParamCreator)(configuration);
152
152
  return {
153
153
  /**
154
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
154
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
155
155
  * @summary Retrieve the booking funnel
156
156
  * @param {string} code Unique identifier for the object.
157
157
  * @param {string} [authorization] Bearer Token
@@ -182,7 +182,7 @@ var BookingFunnelsApiFactory = function (configuration, basePath, axios) {
182
182
  var localVarFp = (0, exports.BookingFunnelsApiFp)(configuration);
183
183
  return {
184
184
  /**
185
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
185
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
186
186
  * @summary Retrieve the booking funnel
187
187
  * @param {string} code Unique identifier for the object.
188
188
  * @param {string} [authorization] Bearer Token
@@ -207,7 +207,7 @@ var BookingFunnelsApi = /** @class */ (function (_super) {
207
207
  return _super !== null && _super.apply(this, arguments) || this;
208
208
  }
209
209
  /**
210
- * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
210
+ * Retrieves the details of the booking funnel that was previously created. Supply the unique booking funnel code that was returned when you created it and Emil Api will return the corresponding booking funnel information.
211
211
  * @summary Retrieve the booking funnel
212
212
  * @param {BookingFunnelsApiGetBookingFunnelRequest} requestParameters Request parameters.
213
213
  * @param {*} [options] Override http request option.
@@ -57,10 +57,11 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
57
57
  * @param {string} productCode
58
58
  * @param {string} code
59
59
  * @param {string} [authorization] Bearer Token
60
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
60
61
  * @param {*} [options] Override http request option.
61
62
  * @throws {RequiredError}
62
63
  */
63
- downloadProductDocumentUrl: (productCode: string, code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
64
+ downloadProductDocumentUrl: (productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig) => Promise<RequestArgs>;
64
65
  /**
65
66
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
66
67
  * @summary List documents
@@ -139,10 +140,11 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
139
140
  * @param {string} productCode
140
141
  * @param {string} code
141
142
  * @param {string} [authorization] Bearer Token
143
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
142
144
  * @param {*} [options] Override http request option.
143
145
  * @throws {RequiredError}
144
146
  */
145
- downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>>;
147
+ downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>>;
146
148
  /**
147
149
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
148
150
  * @summary List documents
@@ -221,10 +223,11 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
221
223
  * @param {string} productCode
222
224
  * @param {string} code
223
225
  * @param {string} [authorization] Bearer Token
226
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
224
227
  * @param {*} [options] Override http request option.
225
228
  * @throws {RequiredError}
226
229
  */
227
- downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass>;
230
+ downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass>;
228
231
  /**
229
232
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
230
233
  * @summary List documents
@@ -351,6 +354,12 @@ export interface DocumentsApiDownloadProductDocumentUrlRequest {
351
354
  * @memberof DocumentsApiDownloadProductDocumentUrl
352
355
  */
353
356
  readonly authorization?: string;
357
+ /**
358
+ * Content disposition override. Default will be depending on the document type.
359
+ * @type {'attachment' | 'inline'}
360
+ * @memberof DocumentsApiDownloadProductDocumentUrl
361
+ */
362
+ readonly contentDisposition?: 'attachment' | 'inline';
354
363
  }
355
364
  /**
356
365
  * Request parameters for listDocuments operation in DocumentsApi.
@@ -247,10 +247,11 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
247
247
  * @param {string} productCode
248
248
  * @param {string} code
249
249
  * @param {string} [authorization] Bearer Token
250
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
250
251
  * @param {*} [options] Override http request option.
251
252
  * @throws {RequiredError}
252
253
  */
253
- downloadProductDocumentUrl: function (productCode, code, authorization, options) {
254
+ downloadProductDocumentUrl: function (productCode, code, authorization, contentDisposition, options) {
254
255
  if (options === void 0) { options = {}; }
255
256
  return __awaiter(_this, void 0, void 0, function () {
256
257
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -279,6 +280,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
279
280
  // authentication bearer required
280
281
  // http bearer authentication required
281
282
  _a.sent();
283
+ if (contentDisposition !== undefined) {
284
+ localVarQueryParameter['contentDisposition'] = contentDisposition;
285
+ }
282
286
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
283
287
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
284
288
  }
@@ -564,15 +568,16 @@ var DocumentsApiFp = function (configuration) {
564
568
  * @param {string} productCode
565
569
  * @param {string} code
566
570
  * @param {string} [authorization] Bearer Token
571
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
567
572
  * @param {*} [options] Override http request option.
568
573
  * @throws {RequiredError}
569
574
  */
570
- downloadProductDocumentUrl: function (productCode, code, authorization, options) {
575
+ downloadProductDocumentUrl: function (productCode, code, authorization, contentDisposition, options) {
571
576
  return __awaiter(this, void 0, void 0, function () {
572
577
  var localVarAxiosArgs;
573
578
  return __generator(this, function (_a) {
574
579
  switch (_a.label) {
575
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, options)];
580
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options)];
576
581
  case 1:
577
582
  localVarAxiosArgs = _a.sent();
578
583
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -704,11 +709,12 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
704
709
  * @param {string} productCode
705
710
  * @param {string} code
706
711
  * @param {string} [authorization] Bearer Token
712
+ * @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
707
713
  * @param {*} [options] Override http request option.
708
714
  * @throws {RequiredError}
709
715
  */
710
- downloadProductDocumentUrl: function (productCode, code, authorization, options) {
711
- return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, options).then(function (request) { return request(axios, basePath); });
716
+ downloadProductDocumentUrl: function (productCode, code, authorization, contentDisposition, options) {
717
+ return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options).then(function (request) { return request(axios, basePath); });
712
718
  },
713
719
  /**
714
720
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -814,7 +820,7 @@ var DocumentsApi = /** @class */ (function (_super) {
814
820
  */
815
821
  DocumentsApi.prototype.downloadProductDocumentUrl = function (requestParameters, options) {
816
822
  var _this = this;
817
- return (0, exports.DocumentsApiFp)(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
823
+ return (0, exports.DocumentsApiFp)(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then(function (request) { return request(_this.axios, _this.basePath); });
818
824
  };
819
825
  /**
820
826
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -52,7 +52,7 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
52
52
  */
53
53
  createLeadSync: (createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
54
54
  /**
55
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
55
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
56
56
  * @summary Retrieve the lead
57
57
  * @param {string} code Unique identifier for the object.
58
58
  * @param {string} [authorization] Bearer Token
@@ -122,7 +122,7 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
122
122
  */
123
123
  createLeadSync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadResponseClass>>;
124
124
  /**
125
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
125
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
126
126
  * @summary Retrieve the lead
127
127
  * @param {string} code Unique identifier for the object.
128
128
  * @param {string} [authorization] Bearer Token
@@ -192,7 +192,7 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
192
192
  */
193
193
  createLeadSync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass>;
194
194
  /**
195
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
195
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
196
196
  * @summary Retrieve the lead
197
197
  * @param {string} code Unique identifier for the object.
198
198
  * @param {string} [authorization] Bearer Token
@@ -403,7 +403,7 @@ export declare class LeadsApi extends BaseAPI {
403
403
  */
404
404
  createLeadSync(requestParameters: LeadsApiCreateLeadSyncRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateLeadResponseClass, any>>;
405
405
  /**
406
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
406
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
407
407
  * @summary Retrieve the lead
408
408
  * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
409
409
  * @param {*} [options] Override http request option.
@@ -240,7 +240,7 @@ var LeadsApiAxiosParamCreator = function (configuration) {
240
240
  });
241
241
  },
242
242
  /**
243
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
243
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
244
244
  * @summary Retrieve the lead
245
245
  * @param {string} code Unique identifier for the object.
246
246
  * @param {string} [authorization] Bearer Token
@@ -511,7 +511,7 @@ var LeadsApiFp = function (configuration) {
511
511
  });
512
512
  },
513
513
  /**
514
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
514
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
515
515
  * @summary Retrieve the lead
516
516
  * @param {string} code Unique identifier for the object.
517
517
  * @param {string} [authorization] Bearer Token
@@ -639,7 +639,7 @@ var LeadsApiFactory = function (configuration, basePath, axios) {
639
639
  return localVarFp.createLeadSync(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
640
640
  },
641
641
  /**
642
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
642
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
643
643
  * @summary Retrieve the lead
644
644
  * @param {string} code Unique identifier for the object.
645
645
  * @param {string} [authorization] Bearer Token
@@ -734,7 +734,7 @@ var LeadsApi = /** @class */ (function (_super) {
734
734
  return (0, exports.LeadsApiFp)(this.configuration).createLeadSync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
735
735
  };
736
736
  /**
737
- * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
737
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
738
738
  * @summary Retrieve the lead
739
739
  * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
740
740
  * @param {*} [options] Override http request option.
package/dist/base.d.ts CHANGED
@@ -52,10 +52,13 @@ export declare class BaseAPI {
52
52
  protected axios: AxiosInstance;
53
53
  protected configuration: Configuration | undefined;
54
54
  private tokenData?;
55
+ private permissions;
55
56
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
56
57
  selectEnvironment(env: Environment): void;
58
+ selectBasePath(path: string): void;
59
+ getPermissions(): Array<string>;
57
60
  authorize(username: string, password: string): Promise<void>;
58
- refreshTokenInternal(): Promise<string>;
61
+ refreshTokenInternal(): Promise<LoginClass>;
59
62
  private storeTokenData;
60
63
  loadTokenData(): void;
61
64
  cleanTokenData(): void;
package/dist/base.js CHANGED
@@ -121,6 +121,7 @@ var BaseAPI = /** @class */ (function () {
121
121
  if (axios === void 0) { axios = axios_1.default; }
122
122
  this.basePath = basePath;
123
123
  this.axios = axios;
124
+ this.permissions = [];
124
125
  this.loadTokenData();
125
126
  if (configuration) {
126
127
  this.configuration = configuration;
@@ -138,13 +139,19 @@ var BaseAPI = /** @class */ (function () {
138
139
  this.attachInterceptor(axios);
139
140
  }
140
141
  BaseAPI.prototype.selectEnvironment = function (env) {
141
- this.configuration.basePath = env;
142
+ this.selectBasePath(env);
143
+ };
144
+ BaseAPI.prototype.selectBasePath = function (path) {
145
+ this.configuration.basePath = path;
146
+ };
147
+ BaseAPI.prototype.getPermissions = function () {
148
+ return this.permissions;
142
149
  };
143
150
  BaseAPI.prototype.authorize = function (username, password) {
144
151
  return __awaiter(this, void 0, void 0, function () {
145
- var options, response, accessToken;
146
- return __generator(this, function (_a) {
147
- switch (_a.label) {
152
+ var options, response, _a, accessToken, permissions;
153
+ return __generator(this, function (_b) {
154
+ switch (_b.label) {
148
155
  case 0:
149
156
  options = {
150
157
  method: 'POST',
@@ -158,12 +165,13 @@ var BaseAPI = /** @class */ (function () {
158
165
  };
159
166
  return [4 /*yield*/, axios_1.default.request(options)];
160
167
  case 1:
161
- response = _a.sent();
162
- accessToken = response.data.accessToken;
168
+ response = _b.sent();
169
+ _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
163
170
  this.configuration.username = username;
164
171
  this.configuration.accessToken = "Bearer ".concat(accessToken);
165
172
  this.tokenData.username = username;
166
173
  this.tokenData.accessToken = accessToken;
174
+ this.permissions = permissions;
167
175
  this.storeTokenData(__assign({}, this.tokenData));
168
176
  return [2 /*return*/];
169
177
  }
@@ -172,13 +180,13 @@ var BaseAPI = /** @class */ (function () {
172
180
  };
173
181
  BaseAPI.prototype.refreshTokenInternal = function () {
174
182
  return __awaiter(this, void 0, void 0, function () {
175
- var username, options, accessToken;
183
+ var username, options, response;
176
184
  return __generator(this, function (_a) {
177
185
  switch (_a.label) {
178
186
  case 0:
179
187
  username = this.configuration.username;
180
188
  if (!username) {
181
- return [2 /*return*/, ''];
189
+ throw new Error('Failed to refresh token.');
182
190
  }
183
191
  options = {
184
192
  method: 'POST',
@@ -191,8 +199,8 @@ var BaseAPI = /** @class */ (function () {
191
199
  };
192
200
  return [4 /*yield*/, axios_1.default.request(options)];
193
201
  case 1:
194
- accessToken = (_a.sent()).data.accessToken;
195
- return [2 /*return*/, accessToken];
202
+ response = _a.sent();
203
+ return [2 /*return*/, response.data];
196
204
  }
197
205
  });
198
206
  });
@@ -218,22 +226,23 @@ var BaseAPI = /** @class */ (function () {
218
226
  axios.interceptors.response.use(function (res) {
219
227
  return res;
220
228
  }, function (err) { return __awaiter(_this, void 0, void 0, function () {
221
- var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
222
- return __generator(this, function (_a) {
223
- switch (_a.label) {
229
+ var originalConfig, _a, tokenString, permissions, accessToken, _error_1, _b, tokenString, permissions, accessToken, _error_2;
230
+ return __generator(this, function (_c) {
231
+ switch (_c.label) {
224
232
  case 0:
225
233
  originalConfig = err.config;
226
234
  if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
227
235
  if (!((err.response.status === 401 || err.response.status === 403)
228
236
  && !originalConfig._retry)) return [3 /*break*/, 4];
229
237
  originalConfig._retry = true;
230
- _a.label = 1;
238
+ _c.label = 1;
231
239
  case 1:
232
- _a.trys.push([1, 3, , 4]);
240
+ _c.trys.push([1, 3, , 4]);
233
241
  return [4 /*yield*/, this.refreshTokenInternal()];
234
242
  case 2:
235
- tokenString = _a.sent();
243
+ _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
236
244
  accessToken = "Bearer ".concat(tokenString);
245
+ this.permissions = permissions;
237
246
  delete originalConfig.headers['Authorization'];
238
247
  originalConfig.headers['Authorization'] = accessToken;
239
248
  this.configuration.accessToken = accessToken;
@@ -241,7 +250,7 @@ var BaseAPI = /** @class */ (function () {
241
250
  this.storeTokenData(this.tokenData);
242
251
  return [2 /*return*/, axios(originalConfig)];
243
252
  case 3:
244
- _error_1 = _a.sent();
253
+ _error_1 = _c.sent();
245
254
  if (_error_1.response && _error_1.response.data) {
246
255
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
247
256
  }
@@ -252,13 +261,14 @@ var BaseAPI = /** @class */ (function () {
252
261
  && originalConfig.headers.hasOwnProperty('Authorization')
253
262
  && _retry_count < 4)) return [3 /*break*/, 9];
254
263
  _retry_count++;
255
- _a.label = 6;
264
+ _c.label = 6;
256
265
  case 6:
257
- _a.trys.push([6, 8, , 9]);
266
+ _c.trys.push([6, 8, , 9]);
258
267
  return [4 /*yield*/, this.refreshTokenInternal()];
259
268
  case 7:
260
- tokenString = _a.sent();
269
+ _b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
261
270
  accessToken = "Bearer ".concat(tokenString);
271
+ this.permissions = permissions;
262
272
  _retry = true;
263
273
  originalConfig.headers['Authorization'] = accessToken;
264
274
  this.configuration.accessToken = accessToken;
@@ -266,7 +276,7 @@ var BaseAPI = /** @class */ (function () {
266
276
  this.storeTokenData(this.tokenData);
267
277
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
268
278
  case 8:
269
- _error_2 = _a.sent();
279
+ _error_2 = _c.sent();
270
280
  if (_error_2.response && _error_2.response.data) {
271
281
  return [2 /*return*/, Promise.reject(_error_2.response.data)];
272
282
  }
@@ -18,11 +18,17 @@ import { InvoiceClass } from './invoice-class';
18
18
  */
19
19
  export interface CreateEstimatedInvoiceResponseClass {
20
20
  /**
21
- * Estimated invoice response
21
+ * The estimated invoice response based on the current policy data. This includes the calculated invoice for the specified billing period (e.g., monthly, quarterly) as defined by the policy. The invoice contains details such as gross amount, net amount, tax amount, and other invoice-related data for the specific period the invoice is generated for.
22
22
  * @type {InvoiceClass}
23
23
  * @memberof CreateEstimatedInvoiceResponseClass
24
24
  */
25
25
  'invoice'?: InvoiceClass;
26
+ /**
27
+ * The estimated yearly invoice response. This represents the invoice recalculated to a yearly format, standardizing the invoice values regardless of the billing frequency defined by the policy (e.g., monthly, quarterly, etc.). This yearly invoice gives an overview of the total cost for the entire year, including recalculated gross amount, net amount, tax amount, and other related invoice data, ensuring that all charges are displayed on a yearly basis. Note: If the original invoice is already set to a yearly billing frequency, the \'yearlyInvoice\' will be identical to the \'invoice\'.
28
+ * @type {InvoiceClass}
29
+ * @memberof CreateEstimatedInvoiceResponseClass
30
+ */
31
+ 'yearlyInvoice'?: InvoiceClass;
26
32
  /**
27
33
  * 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.
28
34
  * @type {object}
@@ -12,6 +12,7 @@
12
12
  import { CreateAccountRequestDto } from './create-account-request-dto';
13
13
  import { CreateBankAccountRequestDto } from './create-bank-account-request-dto';
14
14
  import { CreatePaymentMethodRequestDto } from './create-payment-method-request-dto';
15
+ import { LinkLeadPartnerRequestDto } from './link-lead-partner-request-dto';
15
16
  import { PolicyObjectRequestDto } from './policy-object-request-dto';
16
17
  import { PremiumOverrideRequestDto } from './premium-override-request-dto';
17
18
  import { UploadedDocumentDto } from './uploaded-document-dto';
@@ -89,10 +90,10 @@ export interface CreateLeadRequestDto {
89
90
  'status'?: string;
90
91
  /**
91
92
  * 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.
92
- * @type {Array<PremiumOverrideRequestDto>}
93
+ * @type {PremiumOverrideRequestDto}
93
94
  * @memberof CreateLeadRequestDto
94
95
  */
95
- 'premiumOverride'?: Array<PremiumOverrideRequestDto>;
96
+ 'premiumOverride'?: PremiumOverrideRequestDto;
96
97
  /**
97
98
  * Payment method, used to for payment method support, such as SEPA, invoice, etc. The payment method content will be validated if the \'validate\' flag is set to true.
98
99
  * @type {CreatePaymentMethodRequestDto}
@@ -106,15 +107,9 @@ export interface CreateLeadRequestDto {
106
107
  */
107
108
  'validate'?: boolean;
108
109
  /**
109
- * An optional partner code to establish a link between a lead and a partner. It must be sent together with the partner role code. It will be validated regardless of the value of the \'validate\' flag.
110
- * @type {string}
111
- * @memberof CreateLeadRequestDto
112
- */
113
- 'partnerCode'?: string;
114
- /**
115
- * An optional partner role code to establish a link between a lead and a partner. It must be sent together with the partner code. It will be validated regardless of the value of the \'validate\' flag.
116
- * @type {string}
110
+ * Optional partner object contains necessary information to link a partner to the policy. The partner content will be validated if the \'validate\' flag is set to true.
111
+ * @type {LinkLeadPartnerRequestDto}
117
112
  * @memberof CreateLeadRequestDto
118
113
  */
119
- 'partnerRoleCode'?: string;
114
+ 'partner'?: LinkLeadPartnerRequestDto;
120
115
  }
@@ -51,6 +51,7 @@ export * from './lead-bank-account-class';
51
51
  export * from './lead-class';
52
52
  export * from './lead-policy-class';
53
53
  export * from './lead-policy-object-class';
54
+ export * from './link-lead-partner-request-dto';
54
55
  export * from './list-documents-response-class';
55
56
  export * from './list-product-documents-response-class';
56
57
  export * from './list-products-response-class';
@@ -67,6 +67,7 @@ __exportStar(require("./lead-bank-account-class"), exports);
67
67
  __exportStar(require("./lead-class"), exports);
68
68
  __exportStar(require("./lead-policy-class"), exports);
69
69
  __exportStar(require("./lead-policy-object-class"), exports);
70
+ __exportStar(require("./link-lead-partner-request-dto"), exports);
70
71
  __exportStar(require("./list-documents-response-class"), exports);
71
72
  __exportStar(require("./list-product-documents-response-class"), exports);
72
73
  __exportStar(require("./list-products-response-class"), exports);
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Emil PublicAPI
3
+ * The Emil Public API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface LinkLeadPartnerRequestDto
16
+ */
17
+ export interface LinkLeadPartnerRequestDto {
18
+ /**
19
+ * The code of the partner with which the lead will be linked.
20
+ * @type {string}
21
+ * @memberof LinkLeadPartnerRequestDto
22
+ */
23
+ 'partnerCode': string;
24
+ /**
25
+ * The code of role that the partner will have in the established link between the lead and the partner.
26
+ * @type {string}
27
+ * @memberof LinkLeadPartnerRequestDto
28
+ */
29
+ 'partnerRoleCode': string;
30
+ /**
31
+ * The date of the start of linking with a partner.
32
+ * @type {string}
33
+ * @memberof LinkLeadPartnerRequestDto
34
+ */
35
+ 'startDate': string;
36
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil PublicAPI
6
+ * The Emil Public API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -23,11 +23,17 @@ import { InvoiceClass } from './invoice-class';
23
23
  */
24
24
  export interface CreateEstimatedInvoiceResponseClass {
25
25
  /**
26
- * Estimated invoice response
26
+ * The estimated invoice response based on the current policy data. This includes the calculated invoice for the specified billing period (e.g., monthly, quarterly) as defined by the policy. The invoice contains details such as gross amount, net amount, tax amount, and other invoice-related data for the specific period the invoice is generated for.
27
27
  * @type {InvoiceClass}
28
28
  * @memberof CreateEstimatedInvoiceResponseClass
29
29
  */
30
30
  'invoice'?: InvoiceClass;
31
+ /**
32
+ * The estimated yearly invoice response. This represents the invoice recalculated to a yearly format, standardizing the invoice values regardless of the billing frequency defined by the policy (e.g., monthly, quarterly, etc.). This yearly invoice gives an overview of the total cost for the entire year, including recalculated gross amount, net amount, tax amount, and other related invoice data, ensuring that all charges are displayed on a yearly basis. Note: If the original invoice is already set to a yearly billing frequency, the \'yearlyInvoice\' will be identical to the \'invoice\'.
33
+ * @type {InvoiceClass}
34
+ * @memberof CreateEstimatedInvoiceResponseClass
35
+ */
36
+ 'yearlyInvoice'?: InvoiceClass;
31
37
  /**
32
38
  * 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.
33
39
  * @type {object}
@@ -16,6 +16,7 @@
16
16
  import { CreateAccountRequestDto } from './create-account-request-dto';
17
17
  import { CreateBankAccountRequestDto } from './create-bank-account-request-dto';
18
18
  import { CreatePaymentMethodRequestDto } from './create-payment-method-request-dto';
19
+ import { LinkLeadPartnerRequestDto } from './link-lead-partner-request-dto';
19
20
  import { PolicyObjectRequestDto } from './policy-object-request-dto';
20
21
  import { PremiumOverrideRequestDto } from './premium-override-request-dto';
21
22
  import { UploadedDocumentDto } from './uploaded-document-dto';
@@ -94,10 +95,10 @@ export interface CreateLeadRequestDto {
94
95
  'status'?: string;
95
96
  /**
96
97
  * 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
- * @type {Array<PremiumOverrideRequestDto>}
98
+ * @type {PremiumOverrideRequestDto}
98
99
  * @memberof CreateLeadRequestDto
99
100
  */
100
- 'premiumOverride'?: Array<PremiumOverrideRequestDto>;
101
+ 'premiumOverride'?: PremiumOverrideRequestDto;
101
102
  /**
102
103
  * Payment method, used to for payment method support, such as SEPA, invoice, etc. The payment method content will be validated if the \'validate\' flag is set to true.
103
104
  * @type {CreatePaymentMethodRequestDto}
@@ -111,16 +112,10 @@ export interface CreateLeadRequestDto {
111
112
  */
112
113
  'validate'?: boolean;
113
114
  /**
114
- * An optional partner code to establish a link between a lead and a partner. It must be sent together with the partner role code. It will be validated regardless of the value of the \'validate\' flag.
115
- * @type {string}
116
- * @memberof CreateLeadRequestDto
117
- */
118
- 'partnerCode'?: string;
119
- /**
120
- * An optional partner role code to establish a link between a lead and a partner. It must be sent together with the partner code. It will be validated regardless of the value of the \'validate\' flag.
121
- * @type {string}
115
+ * Optional partner object contains necessary information to link a partner to the policy. The partner content will be validated if the \'validate\' flag is set to true.
116
+ * @type {LinkLeadPartnerRequestDto}
122
117
  * @memberof CreateLeadRequestDto
123
118
  */
124
- 'partnerRoleCode'?: string;
119
+ 'partner'?: LinkLeadPartnerRequestDto;
125
120
  }
126
121
 
package/models/index.ts CHANGED
@@ -51,6 +51,7 @@ export * from './lead-bank-account-class';
51
51
  export * from './lead-class';
52
52
  export * from './lead-policy-class';
53
53
  export * from './lead-policy-object-class';
54
+ export * from './link-lead-partner-request-dto';
54
55
  export * from './list-documents-response-class';
55
56
  export * from './list-product-documents-response-class';
56
57
  export * from './list-products-response-class';
@@ -0,0 +1,42 @@
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
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface LinkLeadPartnerRequestDto
21
+ */
22
+ export interface LinkLeadPartnerRequestDto {
23
+ /**
24
+ * The code of the partner with which the lead will be linked.
25
+ * @type {string}
26
+ * @memberof LinkLeadPartnerRequestDto
27
+ */
28
+ 'partnerCode': string;
29
+ /**
30
+ * The code of role that the partner will have in the established link between the lead and the partner.
31
+ * @type {string}
32
+ * @memberof LinkLeadPartnerRequestDto
33
+ */
34
+ 'partnerRoleCode': string;
35
+ /**
36
+ * The date of the start of linking with a partner.
37
+ * @type {string}
38
+ * @memberof LinkLeadPartnerRequestDto
39
+ */
40
+ 'startDate': string;
41
+ }
42
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/public-api-sdk",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "OpenAPI client for @emilgroup/public-api-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [