@emilgroup/insurance-sdk-node 1.52.0 → 1.54.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 (218) hide show
  1. package/.openapi-generator/FILES +38 -1
  2. package/README.md +2 -2
  3. package/api/booking-funnel-versions-api.ts +4 -4
  4. package/api/booking-funnels-api.ts +20 -12
  5. package/api/commission-agreement-products-api.ts +710 -0
  6. package/api/commission-agreement-versions-api.ts +592 -0
  7. package/api/commission-agreements-api.ts +697 -0
  8. package/api/commission-recipients-api.ts +696 -0
  9. package/api/emil-functions-api.ts +8 -8
  10. package/api/{default-api.ts → health-check-api.ts} +21 -17
  11. package/api/insured-objects-api.ts +5 -2
  12. package/api/lead-statuses-api.ts +4 -4
  13. package/api/lead-versions-api.ts +4 -4
  14. package/api/leads-api.ts +4 -4
  15. package/api/partner-links-api.ts +4 -4
  16. package/api/partner-roles-api.ts +4 -4
  17. package/api/policies-api.ts +192 -237
  18. package/api/products-api.ts +8 -8
  19. package/api/status-transition-rules-api.ts +4 -4
  20. package/api.ts +10 -2
  21. package/base.ts +15 -7
  22. package/dist/api/booking-funnel-versions-api.d.ts +4 -4
  23. package/dist/api/booking-funnel-versions-api.js +4 -4
  24. package/dist/api/booking-funnels-api.d.ts +20 -16
  25. package/dist/api/booking-funnels-api.js +4 -4
  26. package/dist/api/commission-agreement-products-api.d.ts +403 -0
  27. package/dist/api/commission-agreement-products-api.js +652 -0
  28. package/dist/api/commission-agreement-versions-api.d.ts +337 -0
  29. package/dist/api/commission-agreement-versions-api.js +555 -0
  30. package/dist/api/commission-agreements-api.d.ts +394 -0
  31. package/dist/api/commission-agreements-api.js +646 -0
  32. package/dist/api/commission-recipients-api.d.ts +394 -0
  33. package/dist/api/commission-recipients-api.js +646 -0
  34. package/dist/api/emil-functions-api.d.ts +8 -8
  35. package/dist/api/emil-functions-api.js +8 -8
  36. package/dist/api/health-check-api.d.ts +70 -0
  37. package/dist/api/{default-api.js → health-check-api.js} +30 -26
  38. package/dist/api/insured-objects-api.js +4 -2
  39. package/dist/api/lead-statuses-api.d.ts +4 -4
  40. package/dist/api/lead-statuses-api.js +4 -4
  41. package/dist/api/lead-versions-api.d.ts +4 -4
  42. package/dist/api/lead-versions-api.js +4 -4
  43. package/dist/api/leads-api.d.ts +4 -4
  44. package/dist/api/leads-api.js +4 -4
  45. package/dist/api/partner-links-api.d.ts +4 -4
  46. package/dist/api/partner-links-api.js +3 -3
  47. package/dist/api/partner-roles-api.d.ts +4 -4
  48. package/dist/api/partner-roles-api.js +4 -4
  49. package/dist/api/policies-api.d.ts +150 -177
  50. package/dist/api/policies-api.js +143 -165
  51. package/dist/api/products-api.d.ts +8 -8
  52. package/dist/api/products-api.js +8 -8
  53. package/dist/api/status-transition-rules-api.d.ts +4 -4
  54. package/dist/api/status-transition-rules-api.js +4 -4
  55. package/dist/api.d.ts +5 -1
  56. package/dist/api.js +5 -1
  57. package/dist/base.d.ts +3 -1
  58. package/dist/base.js +27 -20
  59. package/dist/models/booking-funnel-class.d.ts +12 -0
  60. package/dist/models/commission-agreement-class.d.ts +101 -0
  61. package/dist/models/commission-agreement-class.js +23 -0
  62. package/dist/models/commission-agreement-item-class.d.ts +78 -0
  63. package/dist/models/commission-agreement-item-class.js +15 -0
  64. package/dist/models/commission-agreement-product-class.d.ts +84 -0
  65. package/dist/models/commission-agreement-product-class.js +15 -0
  66. package/dist/models/commission-agreement-version-class.d.ts +91 -0
  67. package/dist/models/commission-agreement-version-class.js +15 -0
  68. package/dist/models/commission-recipient-class.d.ts +90 -0
  69. package/dist/models/commission-recipient-class.js +15 -0
  70. package/dist/models/create-booking-funnel-response-class.d.ts +25 -0
  71. package/dist/models/create-booking-funnel-response-class.js +15 -0
  72. package/dist/models/create-commission-agreement-item-dto.d.ts +36 -0
  73. package/dist/models/create-commission-agreement-item-dto.js +15 -0
  74. package/dist/models/create-commission-agreement-product-request-dto.d.ts +42 -0
  75. package/dist/models/create-commission-agreement-product-request-dto.js +15 -0
  76. package/dist/models/create-commission-agreement-product-response-class.d.ts +25 -0
  77. package/dist/models/create-commission-agreement-product-response-class.js +15 -0
  78. package/dist/models/create-commission-agreement-request-dto.d.ts +75 -0
  79. package/dist/models/create-commission-agreement-request-dto.js +23 -0
  80. package/dist/models/create-commission-agreement-response-class.d.ts +25 -0
  81. package/dist/models/create-commission-agreement-response-class.js +15 -0
  82. package/dist/models/create-commission-agreement-version-request-dto.d.ts +49 -0
  83. package/dist/models/create-commission-agreement-version-request-dto.js +15 -0
  84. package/dist/models/create-commission-agreement-version-response-class.d.ts +25 -0
  85. package/dist/models/create-commission-agreement-version-response-class.js +15 -0
  86. package/dist/models/create-commission-recipient-request-dto.d.ts +48 -0
  87. package/dist/models/create-commission-recipient-request-dto.js +15 -0
  88. package/dist/models/create-commission-recipient-response-class.d.ts +25 -0
  89. package/dist/models/create-commission-recipient-response-class.js +15 -0
  90. package/dist/models/create-dummy-policy-request-dto.d.ts +6 -0
  91. package/dist/models/create-lead-request-dto.d.ts +4 -9
  92. package/dist/models/emil-function-class.d.ts +12 -0
  93. package/dist/models/get-booking-funnel-response-class.d.ts +25 -0
  94. package/dist/models/get-booking-funnel-response-class.js +15 -0
  95. package/dist/models/get-commission-agreement-product-response-class.d.ts +25 -0
  96. package/dist/models/get-commission-agreement-product-response-class.js +15 -0
  97. package/dist/models/get-commission-agreement-response-class.d.ts +25 -0
  98. package/dist/models/get-commission-agreement-response-class.js +15 -0
  99. package/dist/models/get-commission-agreement-version-response-class.d.ts +25 -0
  100. package/dist/models/get-commission-agreement-version-response-class.js +15 -0
  101. package/dist/models/get-commission-recipient-response-class.d.ts +25 -0
  102. package/dist/models/get-commission-recipient-response-class.js +15 -0
  103. package/dist/models/index.d.ts +33 -0
  104. package/dist/models/index.js +33 -0
  105. package/dist/models/insured-object-class.d.ts +12 -0
  106. package/dist/models/insured-object-type-class.d.ts +12 -0
  107. package/dist/models/lead-class.d.ts +12 -0
  108. package/dist/models/lead-status-class.d.ts +12 -0
  109. package/dist/models/link-lead-partner-request-dto.d.ts +36 -0
  110. package/dist/models/link-lead-partner-request-dto.js +15 -0
  111. package/dist/models/list-commission-agreement-products-response-class.d.ts +31 -0
  112. package/dist/models/list-commission-agreement-products-response-class.js +15 -0
  113. package/dist/models/list-commission-agreement-versions-response-class.d.ts +31 -0
  114. package/dist/models/list-commission-agreement-versions-response-class.js +15 -0
  115. package/dist/models/list-commission-agreements-response-class.d.ts +31 -0
  116. package/dist/models/list-commission-agreements-response-class.js +15 -0
  117. package/dist/models/list-commission-recipients-response-class.d.ts +31 -0
  118. package/dist/models/list-commission-recipients-response-class.js +15 -0
  119. package/dist/models/list-named-ranges-response-class.d.ts +3 -2
  120. package/dist/models/named-range-class.d.ts +12 -0
  121. package/dist/models/partner-link-class.d.ts +12 -0
  122. package/dist/models/partner-role-class.d.ts +12 -0
  123. package/dist/models/patch-booking-funnel-response-class.d.ts +25 -0
  124. package/dist/models/patch-booking-funnel-response-class.js +15 -0
  125. package/dist/models/policy-class.d.ts +12 -0
  126. package/dist/models/policy-object-class.d.ts +12 -0
  127. package/dist/models/policy-premium-class.d.ts +12 -0
  128. package/dist/models/policy-premium-item-class.d.ts +12 -0
  129. package/dist/models/policy-version-class.d.ts +12 -0
  130. package/dist/models/premium-formula-class.d.ts +12 -0
  131. package/dist/models/product-class.d.ts +12 -0
  132. package/dist/models/product-factor-class.d.ts +12 -0
  133. package/dist/models/product-factor-for-version-class.d.ts +12 -0
  134. package/dist/models/product-factor-value-class.d.ts +12 -0
  135. package/dist/models/product-field-class.d.ts +12 -0
  136. package/dist/models/product-field-type-class.d.ts +12 -0
  137. package/dist/models/product-version-class.d.ts +12 -0
  138. package/dist/models/shared-product-field-class.d.ts +12 -0
  139. package/dist/models/status-transition-rule-class.d.ts +12 -0
  140. package/dist/models/timeslice-class.d.ts +12 -0
  141. package/dist/models/update-booking-funnel-response-class.d.ts +25 -0
  142. package/dist/models/update-booking-funnel-response-class.js +15 -0
  143. package/dist/models/update-commission-agreement-product-request-dto.d.ts +42 -0
  144. package/dist/models/update-commission-agreement-product-request-dto.js +15 -0
  145. package/dist/models/update-commission-agreement-product-response-class.d.ts +25 -0
  146. package/dist/models/update-commission-agreement-product-response-class.js +15 -0
  147. package/dist/models/update-commission-agreement-request-dto.d.ts +44 -0
  148. package/dist/models/update-commission-agreement-request-dto.js +23 -0
  149. package/dist/models/update-commission-agreement-response-class.d.ts +25 -0
  150. package/dist/models/update-commission-agreement-response-class.js +15 -0
  151. package/dist/models/update-commission-recipient-request-dto.d.ts +48 -0
  152. package/dist/models/update-commission-recipient-request-dto.js +15 -0
  153. package/dist/models/update-commission-recipient-response-class.d.ts +25 -0
  154. package/dist/models/update-commission-recipient-response-class.js +15 -0
  155. package/models/booking-funnel-class.ts +12 -0
  156. package/models/commission-agreement-class.ts +110 -0
  157. package/models/commission-agreement-item-class.ts +84 -0
  158. package/models/commission-agreement-product-class.ts +90 -0
  159. package/models/commission-agreement-version-class.ts +97 -0
  160. package/models/commission-recipient-class.ts +96 -0
  161. package/models/create-booking-funnel-response-class.ts +31 -0
  162. package/models/create-commission-agreement-item-dto.ts +42 -0
  163. package/models/create-commission-agreement-product-request-dto.ts +48 -0
  164. package/models/create-commission-agreement-product-response-class.ts +31 -0
  165. package/models/create-commission-agreement-request-dto.ts +84 -0
  166. package/models/create-commission-agreement-response-class.ts +31 -0
  167. package/models/create-commission-agreement-version-request-dto.ts +55 -0
  168. package/models/create-commission-agreement-version-response-class.ts +31 -0
  169. package/models/create-commission-recipient-request-dto.ts +54 -0
  170. package/models/create-commission-recipient-response-class.ts +31 -0
  171. package/models/create-dummy-policy-request-dto.ts +6 -0
  172. package/models/create-lead-request-dto.ts +4 -9
  173. package/models/emil-function-class.ts +12 -0
  174. package/models/get-booking-funnel-response-class.ts +31 -0
  175. package/models/get-commission-agreement-product-response-class.ts +31 -0
  176. package/models/get-commission-agreement-response-class.ts +31 -0
  177. package/models/get-commission-agreement-version-response-class.ts +31 -0
  178. package/models/get-commission-recipient-response-class.ts +31 -0
  179. package/models/index.ts +33 -0
  180. package/models/insured-object-class.ts +12 -0
  181. package/models/insured-object-type-class.ts +12 -0
  182. package/models/lead-class.ts +12 -0
  183. package/models/lead-status-class.ts +12 -0
  184. package/models/link-lead-partner-request-dto.ts +42 -0
  185. package/models/list-commission-agreement-products-response-class.ts +37 -0
  186. package/models/list-commission-agreement-versions-response-class.ts +37 -0
  187. package/models/list-commission-agreements-response-class.ts +37 -0
  188. package/models/list-commission-recipients-response-class.ts +37 -0
  189. package/models/list-named-ranges-response-class.ts +3 -2
  190. package/models/named-range-class.ts +12 -0
  191. package/models/partner-link-class.ts +12 -0
  192. package/models/partner-role-class.ts +12 -0
  193. package/models/patch-booking-funnel-response-class.ts +31 -0
  194. package/models/policy-class.ts +12 -0
  195. package/models/policy-object-class.ts +12 -0
  196. package/models/policy-premium-class.ts +12 -0
  197. package/models/policy-premium-item-class.ts +12 -0
  198. package/models/policy-version-class.ts +12 -0
  199. package/models/premium-formula-class.ts +12 -0
  200. package/models/product-class.ts +12 -0
  201. package/models/product-factor-class.ts +12 -0
  202. package/models/product-factor-for-version-class.ts +12 -0
  203. package/models/product-factor-value-class.ts +12 -0
  204. package/models/product-field-class.ts +12 -0
  205. package/models/product-field-type-class.ts +12 -0
  206. package/models/product-version-class.ts +12 -0
  207. package/models/shared-product-field-class.ts +12 -0
  208. package/models/status-transition-rule-class.ts +12 -0
  209. package/models/timeslice-class.ts +12 -0
  210. package/models/update-booking-funnel-response-class.ts +31 -0
  211. package/models/update-commission-agreement-product-request-dto.ts +48 -0
  212. package/models/update-commission-agreement-product-response-class.ts +31 -0
  213. package/models/update-commission-agreement-request-dto.ts +53 -0
  214. package/models/update-commission-agreement-response-class.ts +31 -0
  215. package/models/update-commission-recipient-request-dto.ts +54 -0
  216. package/models/update-commission-recipient-response-class.ts +31 -0
  217. package/package.json +1 -1
  218. package/dist/api/default-api.d.ts +0 -66
@@ -137,7 +137,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
137
137
  };
138
138
  },
139
139
  /**
140
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
140
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
141
141
  * @summary Retrieve the product
142
142
  * @param {string} code Unique identifier for the object.
143
143
  * @param {number} id Unique identifier referencing the product.
@@ -201,7 +201,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
201
201
  };
202
202
  },
203
203
  /**
204
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
204
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
205
205
  * @summary Retrieve the product
206
206
  * @param {number} id Unique identifier referencing the product.
207
207
  * @param {string} code Unique identifier of the product that this object belongs to.
@@ -429,7 +429,7 @@ export const ProductsApiFp = function(configuration?: Configuration) {
429
429
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
430
430
  },
431
431
  /**
432
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
432
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
433
433
  * @summary Retrieve the product
434
434
  * @param {string} code Unique identifier for the object.
435
435
  * @param {number} id Unique identifier referencing the product.
@@ -444,7 +444,7 @@ export const ProductsApiFp = function(configuration?: Configuration) {
444
444
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
445
445
  },
446
446
  /**
447
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
447
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
448
448
  * @summary Retrieve the product
449
449
  * @param {number} id Unique identifier referencing the product.
450
450
  * @param {string} code Unique identifier of the product that this object belongs to.
@@ -522,7 +522,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
522
522
  return localVarFp.deleteProduct(id, authorization, options).then((request) => request(axios, basePath));
523
523
  },
524
524
  /**
525
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
525
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
526
526
  * @summary Retrieve the product
527
527
  * @param {string} code Unique identifier for the object.
528
528
  * @param {number} id Unique identifier referencing the product.
@@ -536,7 +536,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
536
536
  return localVarFp.getProductByCode(code, id, slug, authorization, expand, options).then((request) => request(axios, basePath));
537
537
  },
538
538
  /**
539
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
539
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
540
540
  * @summary Retrieve the product
541
541
  * @param {number} id Unique identifier referencing the product.
542
542
  * @param {string} code Unique identifier of the product that this object belongs to.
@@ -830,7 +830,7 @@ export class ProductsApi extends BaseAPI {
830
830
  }
831
831
 
832
832
  /**
833
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
833
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
834
834
  * @summary Retrieve the product
835
835
  * @param {ProductsApiGetProductByCodeRequest} requestParameters Request parameters.
836
836
  * @param {*} [options] Override http request option.
@@ -842,7 +842,7 @@ export class ProductsApi extends BaseAPI {
842
842
  }
843
843
 
844
844
  /**
845
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
845
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
846
846
  * @summary Retrieve the product
847
847
  * @param {ProductsApiGetProductByIdentifierRequest} requestParameters Request parameters.
848
848
  * @param {*} [options] Override http request option.
@@ -141,7 +141,7 @@ export const StatusTransitionRulesApiAxiosParamCreator = function (configuration
141
141
  };
142
142
  },
143
143
  /**
144
- * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
144
+ * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
145
145
  * @summary Retrieve the status transition rule
146
146
  * @param {string} code Unique identifier for the object.
147
147
  * @param {string} [authorization] Bearer Token
@@ -403,7 +403,7 @@ export const StatusTransitionRulesApiFp = function(configuration?: Configuration
403
403
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
404
404
  },
405
405
  /**
406
- * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
406
+ * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
407
407
  * @summary Retrieve the status transition rule
408
408
  * @param {string} code Unique identifier for the object.
409
409
  * @param {string} [authorization] Bearer Token
@@ -492,7 +492,7 @@ export const StatusTransitionRulesApiFactory = function (configuration?: Configu
492
492
  return localVarFp.deleteStatusTransitionRule(code, authorization, options).then((request) => request(axios, basePath));
493
493
  },
494
494
  /**
495
- * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
495
+ * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
496
496
  * @summary Retrieve the status transition rule
497
497
  * @param {string} code Unique identifier for the object.
498
498
  * @param {string} [authorization] Bearer Token
@@ -768,7 +768,7 @@ export class StatusTransitionRulesApi extends BaseAPI {
768
768
  }
769
769
 
770
770
  /**
771
- * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
771
+ * Retrieves the details of the status transition rule that was previously created. Supply the unique status transition rule code that was returned when you created it and Emil Api will return the corresponding status transition rule information.
772
772
  * @summary Retrieve the status transition rule
773
773
  * @param {StatusTransitionRulesApiGetStatusTransitionRuleRequest} requestParameters Request parameters.
774
774
  * @param {*} [options] Override http request option.
package/api.ts CHANGED
@@ -26,8 +26,12 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
26
26
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
27
27
  import { BookingFunnelVersionsApi } from './api';
28
28
  import { BookingFunnelsApi } from './api';
29
- import { DefaultApi } from './api';
29
+ import { CommissionAgreementProductsApi } from './api';
30
+ import { CommissionAgreementVersionsApi } from './api';
31
+ import { CommissionAgreementsApi } from './api';
32
+ import { CommissionRecipientsApi } from './api';
30
33
  import { EmilFunctionsApi } from './api';
34
+ import { HealthCheckApi } from './api';
31
35
  import { InsuredObjectTypesApi } from './api';
32
36
  import { InsuredObjectsApi } from './api';
33
37
  import { LeadStatusesApi } from './api';
@@ -47,8 +51,12 @@ import { StatusTransitionRulesApi } from './api';
47
51
 
48
52
  export * from './api/booking-funnel-versions-api';
49
53
  export * from './api/booking-funnels-api';
50
- export * from './api/default-api';
54
+ export * from './api/commission-agreement-products-api';
55
+ export * from './api/commission-agreement-versions-api';
56
+ export * from './api/commission-agreements-api';
57
+ export * from './api/commission-recipients-api';
51
58
  export * from './api/emil-functions-api';
59
+ export * from './api/health-check-api';
52
60
  export * from './api/insured-object-types-api';
53
61
  export * from './api/insured-objects-api';
54
62
  export * from './api/lead-statuses-api';
package/base.ts CHANGED
@@ -79,6 +79,7 @@ export class BaseAPI {
79
79
  protected configuration: Configuration;
80
80
  private username?: string;
81
81
  private password?: string;
82
+ private permissions: Array<string> = [];
82
83
 
83
84
  constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
84
85
  if (configuration) {
@@ -149,6 +150,10 @@ export class BaseAPI {
149
150
  this.configuration.basePath = env;
150
151
  }
151
152
 
153
+ getPermissions(): Array<string> {
154
+ return this.permissions;
155
+ }
156
+
152
157
  async authorize(username: string, password: string): Promise<void> {
153
158
  const options: AxiosRequestConfig = {
154
159
  method: 'POST',
@@ -163,20 +168,21 @@ export class BaseAPI {
163
168
 
164
169
  const response = await globalAxios.request<LoginClass>(options);
165
170
 
166
- const { data: { accessToken } } = response;
171
+ const { data: { accessToken, permissions } } = response;
167
172
  this.configuration.username = username;
168
173
  this.configuration.accessToken = `Bearer ${accessToken}`;
174
+ this.permissions = permissions;
169
175
 
170
176
  const refreshToken = this.extractRefreshToken(response)
171
177
  this.configuration.refreshToken = refreshToken;
172
178
  }
173
179
 
174
- async refreshTokenInternal(): Promise<string> {
180
+ async refreshTokenInternal(): Promise<LoginClass> {
175
181
  const { username, refreshToken } = this.configuration;
176
182
 
177
183
 
178
184
  if (!username || !refreshToken) {
179
- return '';
185
+ throw new Error('Failed to refresh token.');
180
186
  }
181
187
 
182
188
  const options: AxiosRequestConfig = {
@@ -190,9 +196,9 @@ export class BaseAPI {
190
196
  withCredentials: true,
191
197
  };
192
198
 
193
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
199
+ const response = await globalAxios.request<LoginClass>(options);
194
200
 
195
- return accessToken;
201
+ return response.data;
196
202
  }
197
203
 
198
204
  private extractRefreshToken(response: AxiosResponse): string {
@@ -221,8 +227,9 @@ export class BaseAPI {
221
227
  if (err.response.status === 401 && !originalConfig._retry) {
222
228
  originalConfig._retry = true;
223
229
  try {
224
- const tokenString = await this.refreshTokenInternal();
230
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
225
231
  const accessToken = `Bearer ${tokenString}`;
232
+ this.permissions = permissions;
226
233
 
227
234
  originalConfig.headers['Authorization'] = `Bearer ${accessToken}`
228
235
 
@@ -246,8 +253,9 @@ export class BaseAPI {
246
253
  ){
247
254
  _retry_count++;
248
255
  try {
249
- const tokenString = await this.refreshTokenInternal();
256
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
250
257
  const accessToken = `Bearer ${tokenString}`;
258
+ this.permissions = permissions;
251
259
 
252
260
  _retry = true;
253
261
  originalConfig.headers['Authorization'] = accessToken;
@@ -18,7 +18,7 @@ import { RequestArgs, BaseAPI } from '../base';
18
18
  */
19
19
  export declare const BookingFunnelVersionsApiAxiosParamCreator: (configuration?: Configuration) => {
20
20
  /**
21
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
21
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
22
22
  * @summary Retrieve the booking funnel version
23
23
  * @param {string} code
24
24
  * @param {number} version
@@ -50,7 +50,7 @@ export declare const BookingFunnelVersionsApiAxiosParamCreator: (configuration?:
50
50
  */
51
51
  export declare const BookingFunnelVersionsApiFp: (configuration?: Configuration) => {
52
52
  /**
53
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
53
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
54
54
  * @summary Retrieve the booking funnel version
55
55
  * @param {string} code
56
56
  * @param {number} version
@@ -82,7 +82,7 @@ export declare const BookingFunnelVersionsApiFp: (configuration?: Configuration)
82
82
  */
83
83
  export declare const BookingFunnelVersionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
84
84
  /**
85
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
85
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
86
86
  * @summary Retrieve the booking funnel version
87
87
  * @param {string} code
88
88
  * @param {number} version
@@ -202,7 +202,7 @@ export interface BookingFunnelVersionsApiListBookingFunnelVersionsRequest {
202
202
  */
203
203
  export declare class BookingFunnelVersionsApi extends BaseAPI {
204
204
  /**
205
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
205
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
206
206
  * @summary Retrieve the booking funnel version
207
207
  * @param {BookingFunnelVersionsApiGetBookingFunnelVersionRequest} requestParameters Request parameters.
208
208
  * @param {*} [options] Override http request option.
@@ -97,7 +97,7 @@ var BookingFunnelVersionsApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
99
  /**
100
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
100
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
101
101
  * @summary Retrieve the booking funnel version
102
102
  * @param {string} code
103
103
  * @param {number} version
@@ -235,7 +235,7 @@ var BookingFunnelVersionsApiFp = function (configuration) {
235
235
  var localVarAxiosParamCreator = (0, exports.BookingFunnelVersionsApiAxiosParamCreator)(configuration);
236
236
  return {
237
237
  /**
238
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
238
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
239
239
  * @summary Retrieve the booking funnel version
240
240
  * @param {string} code
241
241
  * @param {number} version
@@ -295,7 +295,7 @@ var BookingFunnelVersionsApiFactory = function (configuration, basePath, axios)
295
295
  var localVarFp = (0, exports.BookingFunnelVersionsApiFp)(configuration);
296
296
  return {
297
297
  /**
298
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
298
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
299
299
  * @summary Retrieve the booking funnel version
300
300
  * @param {string} code
301
301
  * @param {number} version
@@ -339,7 +339,7 @@ var BookingFunnelVersionsApi = /** @class */ (function (_super) {
339
339
  return _super !== null && _super.apply(this, arguments) || this;
340
340
  }
341
341
  /**
342
- * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
342
+ * Retrieves the details of the booking funnel version that was previously created. Supply the unique booking funnel version code that was returned when you created it and Emil Api will return the corresponding booking funnel version information.
343
343
  * @summary Retrieve the booking funnel version
344
344
  * @param {BookingFunnelVersionsApiGetBookingFunnelVersionRequest} requestParameters Request parameters.
345
345
  * @param {*} [options] Override http request option.
@@ -13,10 +13,14 @@ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { CreateBookingFunnelRequestDto } from '../models';
16
+ import { CreateBookingFunnelResponseClass } from '../models';
16
17
  import { DeleteResponseClass } from '../models';
18
+ import { GetBookingFunnelResponseClass } from '../models';
17
19
  import { ListBookingFunnelsResponseClass } from '../models';
18
20
  import { PatchBookingFunnelRequestDto } from '../models';
21
+ import { PatchBookingFunnelResponseClass } from '../models';
19
22
  import { UpdateBookingFunnelRequestDto } from '../models';
23
+ import { UpdateBookingFunnelResponseClass } from '../models';
20
24
  /**
21
25
  * BookingFunnelsApi - axios parameter creator
22
26
  * @export
@@ -41,7 +45,7 @@ export declare const BookingFunnelsApiAxiosParamCreator: (configuration?: Config
41
45
  */
42
46
  deleteBookingFunnel: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
43
47
  /**
44
- * 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.
48
+ * 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.
45
49
  * @summary Retrieve the booking funnel
46
50
  * @param {string} code
47
51
  * @param {string} [authorization] Bearer Token
@@ -97,7 +101,7 @@ export declare const BookingFunnelsApiFp: (configuration?: Configuration) => {
97
101
  * @param {*} [options] Override http request option.
98
102
  * @throws {RequiredError}
99
103
  */
100
- createBookingFunnel(createBookingFunnelRequestDto: CreateBookingFunnelRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
104
+ createBookingFunnel(createBookingFunnelRequestDto: CreateBookingFunnelRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateBookingFunnelResponseClass>>;
101
105
  /**
102
106
  * Permanently deletes the booking funnel. Supply the unique code that was returned when you created the booking funnel and this will delete it.
103
107
  * @summary Delete the booking funnel
@@ -108,14 +112,14 @@ export declare const BookingFunnelsApiFp: (configuration?: Configuration) => {
108
112
  */
109
113
  deleteBookingFunnel(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>>;
110
114
  /**
111
- * 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.
115
+ * 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.
112
116
  * @summary Retrieve the booking funnel
113
117
  * @param {string} code
114
118
  * @param {string} [authorization] Bearer Token
115
119
  * @param {*} [options] Override http request option.
116
120
  * @throws {RequiredError}
117
121
  */
118
- getBookingFunnel(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
122
+ getBookingFunnel(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBookingFunnelResponseClass>>;
119
123
  /**
120
124
  * Returns a list of booking funnels you have previously created. The booking funnels are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
121
125
  * @summary List booking funnels
@@ -139,7 +143,7 @@ export declare const BookingFunnelsApiFp: (configuration?: Configuration) => {
139
143
  * @param {*} [options] Override http request option.
140
144
  * @throws {RequiredError}
141
145
  */
142
- patchBookingFunnel(code: string, patchBookingFunnelRequestDto: PatchBookingFunnelRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
146
+ patchBookingFunnel(code: string, patchBookingFunnelRequestDto: PatchBookingFunnelRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PatchBookingFunnelResponseClass>>;
143
147
  /**
144
148
  * This will update a booking funnel.
145
149
  * @summary Update the booking funnel
@@ -149,7 +153,7 @@ export declare const BookingFunnelsApiFp: (configuration?: Configuration) => {
149
153
  * @param {*} [options] Override http request option.
150
154
  * @throws {RequiredError}
151
155
  */
152
- updateBookingFunnel(code: string, updateBookingFunnelRequestDto: UpdateBookingFunnelRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
156
+ updateBookingFunnel(code: string, updateBookingFunnelRequestDto: UpdateBookingFunnelRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateBookingFunnelResponseClass>>;
153
157
  };
154
158
  /**
155
159
  * BookingFunnelsApi - factory interface
@@ -164,7 +168,7 @@ export declare const BookingFunnelsApiFactory: (configuration?: Configuration, b
164
168
  * @param {*} [options] Override http request option.
165
169
  * @throws {RequiredError}
166
170
  */
167
- createBookingFunnel(createBookingFunnelRequestDto: CreateBookingFunnelRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
171
+ createBookingFunnel(createBookingFunnelRequestDto: CreateBookingFunnelRequestDto, authorization?: string, options?: any): AxiosPromise<CreateBookingFunnelResponseClass>;
168
172
  /**
169
173
  * Permanently deletes the booking funnel. Supply the unique code that was returned when you created the booking funnel and this will delete it.
170
174
  * @summary Delete the booking funnel
@@ -175,14 +179,14 @@ export declare const BookingFunnelsApiFactory: (configuration?: Configuration, b
175
179
  */
176
180
  deleteBookingFunnel(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass>;
177
181
  /**
178
- * 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.
182
+ * 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.
179
183
  * @summary Retrieve the booking funnel
180
184
  * @param {string} code
181
185
  * @param {string} [authorization] Bearer Token
182
186
  * @param {*} [options] Override http request option.
183
187
  * @throws {RequiredError}
184
188
  */
185
- getBookingFunnel(code: string, authorization?: string, options?: any): AxiosPromise<object>;
189
+ getBookingFunnel(code: string, authorization?: string, options?: any): AxiosPromise<GetBookingFunnelResponseClass>;
186
190
  /**
187
191
  * Returns a list of booking funnels you have previously created. The booking funnels are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
188
192
  * @summary List booking funnels
@@ -206,7 +210,7 @@ export declare const BookingFunnelsApiFactory: (configuration?: Configuration, b
206
210
  * @param {*} [options] Override http request option.
207
211
  * @throws {RequiredError}
208
212
  */
209
- patchBookingFunnel(code: string, patchBookingFunnelRequestDto: PatchBookingFunnelRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
213
+ patchBookingFunnel(code: string, patchBookingFunnelRequestDto: PatchBookingFunnelRequestDto, authorization?: string, options?: any): AxiosPromise<PatchBookingFunnelResponseClass>;
210
214
  /**
211
215
  * This will update a booking funnel.
212
216
  * @summary Update the booking funnel
@@ -216,7 +220,7 @@ export declare const BookingFunnelsApiFactory: (configuration?: Configuration, b
216
220
  * @param {*} [options] Override http request option.
217
221
  * @throws {RequiredError}
218
222
  */
219
- updateBookingFunnel(code: string, updateBookingFunnelRequestDto: UpdateBookingFunnelRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
223
+ updateBookingFunnel(code: string, updateBookingFunnelRequestDto: UpdateBookingFunnelRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateBookingFunnelResponseClass>;
220
224
  };
221
225
  /**
222
226
  * Request parameters for createBookingFunnel operation in BookingFunnelsApi.
@@ -395,7 +399,7 @@ export declare class BookingFunnelsApi extends BaseAPI {
395
399
  * @throws {RequiredError}
396
400
  * @memberof BookingFunnelsApi
397
401
  */
398
- createBookingFunnel(requestParameters: BookingFunnelsApiCreateBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
402
+ createBookingFunnel(requestParameters: BookingFunnelsApiCreateBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateBookingFunnelResponseClass, any>>;
399
403
  /**
400
404
  * Permanently deletes the booking funnel. Supply the unique code that was returned when you created the booking funnel and this will delete it.
401
405
  * @summary Delete the booking funnel
@@ -406,14 +410,14 @@ export declare class BookingFunnelsApi extends BaseAPI {
406
410
  */
407
411
  deleteBookingFunnel(requestParameters: BookingFunnelsApiDeleteBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseClass, any>>;
408
412
  /**
409
- * 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.
413
+ * 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.
410
414
  * @summary Retrieve the booking funnel
411
415
  * @param {BookingFunnelsApiGetBookingFunnelRequest} requestParameters Request parameters.
412
416
  * @param {*} [options] Override http request option.
413
417
  * @throws {RequiredError}
414
418
  * @memberof BookingFunnelsApi
415
419
  */
416
- getBookingFunnel(requestParameters: BookingFunnelsApiGetBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
420
+ getBookingFunnel(requestParameters: BookingFunnelsApiGetBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetBookingFunnelResponseClass, any>>;
417
421
  /**
418
422
  * Returns a list of booking funnels you have previously created. The booking funnels are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
419
423
  * @summary List booking funnels
@@ -430,7 +434,7 @@ export declare class BookingFunnelsApi extends BaseAPI {
430
434
  * @throws {RequiredError}
431
435
  * @memberof BookingFunnelsApi
432
436
  */
433
- patchBookingFunnel(requestParameters: BookingFunnelsApiPatchBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
437
+ patchBookingFunnel(requestParameters: BookingFunnelsApiPatchBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PatchBookingFunnelResponseClass, any>>;
434
438
  /**
435
439
  * This will update a booking funnel.
436
440
  * @summary Update the booking funnel
@@ -439,5 +443,5 @@ export declare class BookingFunnelsApi extends BaseAPI {
439
443
  * @throws {RequiredError}
440
444
  * @memberof BookingFunnelsApi
441
445
  */
442
- updateBookingFunnel(requestParameters: BookingFunnelsApiUpdateBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
446
+ updateBookingFunnel(requestParameters: BookingFunnelsApiUpdateBookingFunnelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateBookingFunnelResponseClass, any>>;
443
447
  }
@@ -194,7 +194,7 @@ var BookingFunnelsApiAxiosParamCreator = function (configuration) {
194
194
  });
195
195
  },
196
196
  /**
197
- * 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.
197
+ * 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.
198
198
  * @summary Retrieve the booking funnel
199
199
  * @param {string} code
200
200
  * @param {string} [authorization] Bearer Token
@@ -471,7 +471,7 @@ var BookingFunnelsApiFp = function (configuration) {
471
471
  });
472
472
  },
473
473
  /**
474
- * 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.
474
+ * 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.
475
475
  * @summary Retrieve the booking funnel
476
476
  * @param {string} code
477
477
  * @param {string} [authorization] Bearer Token
@@ -594,7 +594,7 @@ var BookingFunnelsApiFactory = function (configuration, basePath, axios) {
594
594
  return localVarFp.deleteBookingFunnel(code, authorization, options).then(function (request) { return request(axios, basePath); });
595
595
  },
596
596
  /**
597
- * 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.
597
+ * 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.
598
598
  * @summary Retrieve the booking funnel
599
599
  * @param {string} code
600
600
  * @param {string} [authorization] Bearer Token
@@ -683,7 +683,7 @@ var BookingFunnelsApi = /** @class */ (function (_super) {
683
683
  return (0, exports.BookingFunnelsApiFp)(this.configuration).deleteBookingFunnel(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
684
684
  };
685
685
  /**
686
- * 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.
686
+ * 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.
687
687
  * @summary Retrieve the booking funnel
688
688
  * @param {BookingFunnelsApiGetBookingFunnelRequest} requestParameters Request parameters.
689
689
  * @param {*} [options] Override http request option.