@emilgroup/insurance-sdk-node 1.48.1-beta.2 → 1.49.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 (141) hide show
  1. package/.openapi-generator/FILES +8 -21
  2. package/README.md +2 -2
  3. package/api/booking-funnels-api.ts +4 -4
  4. package/api/default-api.ts +4 -8
  5. package/api/insured-object-types-api.ts +4 -4
  6. package/api/insured-objects-api.ts +6 -9
  7. package/api/lead-statuses-api.ts +12 -96
  8. package/api/named-ranges-api.ts +4 -4
  9. package/api/policies-api.ts +180 -167
  10. package/api/policy-partner-roles-api.ts +683 -0
  11. package/api/premium-formulas-api.ts +4 -4
  12. package/api/product-factors-api.ts +4 -4
  13. package/api/product-fields-api.ts +8 -8
  14. package/api/products-api.ts +12 -12
  15. package/api.ts +2 -4
  16. package/dist/api/booking-funnels-api.d.ts +4 -4
  17. package/dist/api/booking-funnels-api.js +4 -4
  18. package/dist/api/default-api.d.ts +4 -8
  19. package/dist/api/default-api.js +4 -8
  20. package/dist/api/insured-object-types-api.d.ts +4 -4
  21. package/dist/api/insured-object-types-api.js +3 -3
  22. package/dist/api/insured-objects-api.d.ts +4 -4
  23. package/dist/api/insured-objects-api.js +5 -7
  24. package/dist/api/lead-statuses-api.d.ts +9 -63
  25. package/dist/api/lead-statuses-api.js +9 -45
  26. package/dist/api/named-ranges-api.d.ts +4 -4
  27. package/dist/api/named-ranges-api.js +3 -3
  28. package/dist/api/policies-api.d.ts +140 -131
  29. package/dist/api/policies-api.js +120 -114
  30. package/dist/api/policy-partner-roles-api.d.ts +385 -0
  31. package/dist/api/{partner-roles-api.js → policy-partner-roles-api.js} +139 -139
  32. package/dist/api/premium-formulas-api.d.ts +4 -4
  33. package/dist/api/premium-formulas-api.js +3 -3
  34. package/dist/api/product-factors-api.d.ts +4 -4
  35. package/dist/api/product-factors-api.js +3 -3
  36. package/dist/api/product-fields-api.d.ts +8 -8
  37. package/dist/api/product-fields-api.js +6 -6
  38. package/dist/api/products-api.d.ts +12 -12
  39. package/dist/api/products-api.js +9 -9
  40. package/dist/api.d.ts +1 -2
  41. package/dist/api.js +1 -2
  42. package/dist/models/booking-funnel-class.d.ts +1 -1
  43. package/dist/models/create-booking-funnel-request-dto.d.ts +1 -1
  44. package/dist/models/{update-partner-role-request-dto.d.ts → create-policy-partner-role-request-dto.d.ts} +6 -6
  45. package/dist/models/{emil-function-secret-class.d.ts → create-policy-partner-role-response-class.d.ts} +7 -12
  46. package/dist/models/create-product-request-dto.d.ts +1 -1
  47. package/dist/models/{create-partner-role-response-class.d.ts → get-policy-partner-role-response-class.d.ts} +7 -7
  48. package/dist/models/get-product-request-dto.d.ts +1 -1
  49. package/dist/models/index.d.ts +7 -19
  50. package/dist/models/index.js +7 -19
  51. package/dist/models/insured-object-type-class.d.ts +1 -1
  52. package/dist/models/invoice-item-class.d.ts +0 -12
  53. package/dist/models/lead-class.d.ts +1 -8
  54. package/dist/models/lead-status-class.d.ts +1 -1
  55. package/dist/models/{list-emil-functions-response-class.d.ts → list-policy-partner-roles-response-class.d.ts} +8 -8
  56. package/dist/models/list-policy-versions-request-dto.d.ts +1 -1
  57. package/dist/models/list-request-dto.d.ts +1 -1
  58. package/dist/models/patch-draft-policy-request-dto.d.ts +1 -1
  59. package/dist/models/policy-class.d.ts +0 -7
  60. package/dist/models/{partner-role-class.d.ts → policy-partner-role-class.d.ts} +10 -10
  61. package/dist/models/product-class.d.ts +1 -1
  62. package/dist/models/shared-update-named-range-request-dto.d.ts +1 -1
  63. package/dist/models/status-transition-rule-class.d.ts +1 -1
  64. package/dist/models/update-named-range-request-dto.d.ts +1 -1
  65. package/dist/models/{create-partner-role-request-dto.d.ts → update-policy-partner-role-request-dto.d.ts} +6 -6
  66. package/dist/models/{execute-emil-function-request-dto.d.ts → update-policy-partner-role-response-class.d.ts} +7 -6
  67. package/dist/models/update-product-request-dto.d.ts +1 -1
  68. package/models/booking-funnel-class.ts +1 -1
  69. package/models/create-booking-funnel-request-dto.ts +1 -1
  70. package/models/{update-partner-role-request-dto.ts → create-policy-partner-role-request-dto.ts} +6 -6
  71. package/models/{emil-function-secret-class.ts → create-policy-partner-role-response-class.ts} +7 -12
  72. package/models/create-product-request-dto.ts +1 -1
  73. package/models/{create-partner-role-response-class.ts → get-policy-partner-role-response-class.ts} +7 -7
  74. package/models/get-product-request-dto.ts +1 -1
  75. package/models/index.ts +7 -19
  76. package/models/insured-object-type-class.ts +1 -1
  77. package/models/invoice-item-class.ts +0 -12
  78. package/models/lead-class.ts +1 -8
  79. package/models/lead-status-class.ts +1 -1
  80. package/models/{list-emil-functions-response-class.ts → list-policy-partner-roles-response-class.ts} +8 -8
  81. package/models/list-policy-versions-request-dto.ts +1 -1
  82. package/models/list-request-dto.ts +1 -1
  83. package/models/patch-draft-policy-request-dto.ts +1 -1
  84. package/models/policy-class.ts +0 -7
  85. package/models/{partner-role-class.ts → policy-partner-role-class.ts} +10 -10
  86. package/models/product-class.ts +1 -1
  87. package/models/shared-update-named-range-request-dto.ts +1 -1
  88. package/models/status-transition-rule-class.ts +1 -1
  89. package/models/update-named-range-request-dto.ts +1 -1
  90. package/models/{create-partner-role-request-dto.ts → update-policy-partner-role-request-dto.ts} +6 -6
  91. package/models/{execute-emil-function-request-dto.ts → update-policy-partner-role-response-class.ts} +7 -6
  92. package/models/update-product-request-dto.ts +1 -1
  93. package/package.json +1 -1
  94. package/api/emil-functions-api.ts +0 -1314
  95. package/api/partner-roles-api.ts +0 -683
  96. package/dist/api/emil-functions-api.d.ts +0 -727
  97. package/dist/api/emil-functions-api.js +0 -1202
  98. package/dist/api/partner-roles-api.d.ts +0 -385
  99. package/dist/models/create-emil-function-request-dto.d.ts +0 -42
  100. package/dist/models/create-emil-function-secret-request-dto.d.ts +0 -36
  101. package/dist/models/emil-function-class.d.ts +0 -60
  102. package/dist/models/get-emil-function-secret-response-class.d.ts +0 -24
  103. package/dist/models/get-emil-function-secret-response-class.js +0 -15
  104. package/dist/models/get-partner-role-response-class.d.ts +0 -25
  105. package/dist/models/get-partner-role-response-class.js +0 -15
  106. package/dist/models/list-emil-function-secrets-response-class.d.ts +0 -25
  107. package/dist/models/list-emil-function-secrets-response-class.js +0 -15
  108. package/dist/models/list-emil-functions-response-class.js +0 -15
  109. package/dist/models/list-partner-roles-response-class.d.ts +0 -31
  110. package/dist/models/list-partner-roles-response-class.js +0 -15
  111. package/dist/models/partner-class.d.ts +0 -60
  112. package/dist/models/partner-class.js +0 -15
  113. package/dist/models/partner-link-class.d.ts +0 -86
  114. package/dist/models/partner-link-class.js +0 -15
  115. package/dist/models/partner-role-class.js +0 -15
  116. package/dist/models/update-emil-function-request-dto.d.ts +0 -42
  117. package/dist/models/update-emil-function-request-dto.js +0 -15
  118. package/dist/models/update-emil-function-secret-request-dto.d.ts +0 -30
  119. package/dist/models/update-emil-function-secret-request-dto.js +0 -15
  120. package/dist/models/update-partner-role-request-dto.js +0 -15
  121. package/dist/models/update-partner-role-response-class.d.ts +0 -25
  122. package/dist/models/update-partner-role-response-class.js +0 -15
  123. package/models/create-emil-function-request-dto.ts +0 -48
  124. package/models/create-emil-function-secret-request-dto.ts +0 -42
  125. package/models/emil-function-class.ts +0 -66
  126. package/models/get-emil-function-secret-response-class.ts +0 -30
  127. package/models/get-partner-role-response-class.ts +0 -31
  128. package/models/list-emil-function-secrets-response-class.ts +0 -31
  129. package/models/list-partner-roles-response-class.ts +0 -37
  130. package/models/partner-class.ts +0 -66
  131. package/models/partner-link-class.ts +0 -92
  132. package/models/update-emil-function-request-dto.ts +0 -48
  133. package/models/update-emil-function-secret-request-dto.ts +0 -36
  134. package/models/update-partner-role-response-class.ts +0 -31
  135. /package/dist/models/{create-emil-function-request-dto.js → create-policy-partner-role-request-dto.js} +0 -0
  136. /package/dist/models/{create-emil-function-secret-request-dto.js → create-policy-partner-role-response-class.js} +0 -0
  137. /package/dist/models/{create-partner-role-request-dto.js → get-policy-partner-role-response-class.js} +0 -0
  138. /package/dist/models/{create-partner-role-response-class.js → list-policy-partner-roles-response-class.js} +0 -0
  139. /package/dist/models/{emil-function-class.js → policy-partner-role-class.js} +0 -0
  140. /package/dist/models/{emil-function-secret-class.js → update-policy-partner-role-request-dto.js} +0 -0
  141. /package/dist/models/{execute-emil-function-request-dto.js → update-policy-partner-role-response-class.js} +0 -0
@@ -0,0 +1,683 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL InsuranceService
5
+ * The EMIL InsuranceService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreatePolicyPartnerRoleRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreatePolicyPartnerRoleResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { DeleteResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { GetPolicyPartnerRoleResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { ListPolicyPartnerRolesResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { UpdatePolicyPartnerRoleRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { UpdatePolicyPartnerRoleResponseClass } from '../models';
37
+ // URLSearchParams not necessarily used
38
+ // @ts-ignore
39
+ import { URL, URLSearchParams } from 'url';
40
+ const FormData = require('form-data');
41
+ /**
42
+ * PolicyPartnerRolesApi - axios parameter creator
43
+ * @export
44
+ */
45
+ export const PolicyPartnerRolesApiAxiosParamCreator = function (configuration?: Configuration) {
46
+ return {
47
+ /**
48
+ * This will create a policy partner role.
49
+ * @summary Create the policy partner role
50
+ * @param {CreatePolicyPartnerRoleRequestDto} createPolicyPartnerRoleRequestDto
51
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
52
+ * @param {*} [options] Override http request option.
53
+ * @throws {RequiredError}
54
+ */
55
+ createPolicyPartnerRole: async (createPolicyPartnerRoleRequestDto: CreatePolicyPartnerRoleRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
56
+ // verify required parameter 'createPolicyPartnerRoleRequestDto' is not null or undefined
57
+ assertParamExists('createPolicyPartnerRole', 'createPolicyPartnerRoleRequestDto', createPolicyPartnerRoleRequestDto)
58
+ const localVarPath = `/insuranceservice/v1/policy-partner-roles`;
59
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
60
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
61
+ let baseOptions;
62
+ let baseAccessToken;
63
+ if (configuration) {
64
+ baseOptions = configuration.baseOptions;
65
+ baseAccessToken = configuration.accessToken;
66
+ }
67
+
68
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
69
+ const localVarHeaderParameter = {} as any;
70
+ const localVarQueryParameter = {} as any;
71
+
72
+ // authentication bearer required
73
+ // http bearer authentication required
74
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
+
76
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
78
+ }
79
+
80
+
81
+
82
+ localVarHeaderParameter['Content-Type'] = 'application/json';
83
+
84
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
85
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
86
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
87
+ localVarRequestOptions.data = serializeDataIfNeeded(createPolicyPartnerRoleRequestDto, localVarRequestOptions, configuration)
88
+
89
+ return {
90
+ url: toPathString(localVarUrlObj),
91
+ options: localVarRequestOptions,
92
+ };
93
+ },
94
+ /**
95
+ * Permanently deletes the policy partner role. Supply the unique code that was returned when you created the policy partner role and this will delete it.
96
+ * @summary Delete the policy partner role
97
+ * @param {string} code Unique identifier for the object.
98
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ deletePolicyPartnerRole: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
103
+ // verify required parameter 'code' is not null or undefined
104
+ assertParamExists('deletePolicyPartnerRole', 'code', code)
105
+ const localVarPath = `/insuranceservice/v1/policy-partner-roles/{code}`
106
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
107
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
108
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
109
+ let baseOptions;
110
+ let baseAccessToken;
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ baseAccessToken = configuration.accessToken;
114
+ }
115
+
116
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
117
+ const localVarHeaderParameter = {} as any;
118
+ const localVarQueryParameter = {} as any;
119
+
120
+ // authentication bearer required
121
+ // http bearer authentication required
122
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
+
124
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
126
+ }
127
+
128
+
129
+
130
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
131
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
132
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
133
+
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ },
139
+ /**
140
+ * Retrieves the details of the policy partner role that was previously created. Supply the unique policy partner role code that was returned when you created it and Emil Api will return the corresponding policy partner role information.
141
+ * @summary Retrieve the policy partner role
142
+ * @param {string} code Unique identifier for the object.
143
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ getPolicyPartnerRole: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
148
+ // verify required parameter 'code' is not null or undefined
149
+ assertParamExists('getPolicyPartnerRole', 'code', code)
150
+ const localVarPath = `/insuranceservice/v1/policy-partner-roles/{code}`
151
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
152
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
153
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
154
+ let baseOptions;
155
+ let baseAccessToken;
156
+ if (configuration) {
157
+ baseOptions = configuration.baseOptions;
158
+ baseAccessToken = configuration.accessToken;
159
+ }
160
+
161
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
162
+ const localVarHeaderParameter = {} as any;
163
+ const localVarQueryParameter = {} as any;
164
+
165
+ // authentication bearer required
166
+ // http bearer authentication required
167
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
168
+
169
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
170
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
171
+ }
172
+
173
+
174
+
175
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
176
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
177
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
178
+
179
+ return {
180
+ url: toPathString(localVarUrlObj),
181
+ options: localVarRequestOptions,
182
+ };
183
+ },
184
+ /**
185
+ * Returns a list of policy partner roles you have previously created. The policy partner roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
186
+ * @summary List policy partner roles
187
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
188
+ * @param {number} [pageSize] Page size.
189
+ * @param {string} [pageToken] Page token.
190
+ * @param {'name' | 'productSlug'} [filter] List filter
191
+ * @param {'name' | 'productSlug'} [search] Search query.
192
+ * @param {'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt'} [order] Ordering criteria.
193
+ * @param {number} [expand] This entity has no expand parameters
194
+ * @param {string} [filters]
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ listPolicyPartnerRole: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: 'name' | 'productSlug', search?: 'name' | 'productSlug', order?: 'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt', expand?: number, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
199
+ const localVarPath = `/insuranceservice/v1/policy-partner-roles`;
200
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
201
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
202
+ let baseOptions;
203
+ let baseAccessToken;
204
+ if (configuration) {
205
+ baseOptions = configuration.baseOptions;
206
+ baseAccessToken = configuration.accessToken;
207
+ }
208
+
209
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
210
+ const localVarHeaderParameter = {} as any;
211
+ const localVarQueryParameter = {} as any;
212
+
213
+ // authentication bearer required
214
+ // http bearer authentication required
215
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
216
+
217
+ if (pageSize !== undefined) {
218
+ localVarQueryParameter['pageSize'] = pageSize;
219
+ }
220
+
221
+ if (pageToken !== undefined) {
222
+ localVarQueryParameter['pageToken'] = pageToken;
223
+ }
224
+
225
+ if (filter !== undefined) {
226
+ localVarQueryParameter['filter'] = filter;
227
+ }
228
+
229
+ if (search !== undefined) {
230
+ localVarQueryParameter['search'] = search;
231
+ }
232
+
233
+ if (order !== undefined) {
234
+ localVarQueryParameter['order'] = order;
235
+ }
236
+
237
+ if (expand !== undefined) {
238
+ localVarQueryParameter['expand'] = expand;
239
+ }
240
+
241
+ if (filters !== undefined) {
242
+ localVarQueryParameter['filters'] = filters;
243
+ }
244
+
245
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
247
+ }
248
+
249
+
250
+
251
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
252
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
253
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
254
+
255
+ return {
256
+ url: toPathString(localVarUrlObj),
257
+ options: localVarRequestOptions,
258
+ };
259
+ },
260
+ /**
261
+ * Updates the specified policy partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
262
+ * @summary Update the policy partner role
263
+ * @param {string} code Unique identifier for the object.
264
+ * @param {UpdatePolicyPartnerRoleRequestDto} updatePolicyPartnerRoleRequestDto
265
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ updatePolicyPartnerRole: async (code: string, updatePolicyPartnerRoleRequestDto: UpdatePolicyPartnerRoleRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
270
+ // verify required parameter 'code' is not null or undefined
271
+ assertParamExists('updatePolicyPartnerRole', 'code', code)
272
+ // verify required parameter 'updatePolicyPartnerRoleRequestDto' is not null or undefined
273
+ assertParamExists('updatePolicyPartnerRole', 'updatePolicyPartnerRoleRequestDto', updatePolicyPartnerRoleRequestDto)
274
+ const localVarPath = `/insuranceservice/v1/policy-partner-roles/{code}`
275
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
276
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
277
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
278
+ let baseOptions;
279
+ let baseAccessToken;
280
+ if (configuration) {
281
+ baseOptions = configuration.baseOptions;
282
+ baseAccessToken = configuration.accessToken;
283
+ }
284
+
285
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
286
+ const localVarHeaderParameter = {} as any;
287
+ const localVarQueryParameter = {} as any;
288
+
289
+ // authentication bearer required
290
+ // http bearer authentication required
291
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
292
+
293
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
294
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
295
+ }
296
+
297
+
298
+
299
+ localVarHeaderParameter['Content-Type'] = 'application/json';
300
+
301
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
302
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
303
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
304
+ localVarRequestOptions.data = serializeDataIfNeeded(updatePolicyPartnerRoleRequestDto, localVarRequestOptions, configuration)
305
+
306
+ return {
307
+ url: toPathString(localVarUrlObj),
308
+ options: localVarRequestOptions,
309
+ };
310
+ },
311
+ }
312
+ };
313
+
314
+ /**
315
+ * PolicyPartnerRolesApi - functional programming interface
316
+ * @export
317
+ */
318
+ export const PolicyPartnerRolesApiFp = function(configuration?: Configuration) {
319
+ const localVarAxiosParamCreator = PolicyPartnerRolesApiAxiosParamCreator(configuration)
320
+ return {
321
+ /**
322
+ * This will create a policy partner role.
323
+ * @summary Create the policy partner role
324
+ * @param {CreatePolicyPartnerRoleRequestDto} createPolicyPartnerRoleRequestDto
325
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ async createPolicyPartnerRole(createPolicyPartnerRoleRequestDto: CreatePolicyPartnerRoleRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePolicyPartnerRoleResponseClass>> {
330
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPolicyPartnerRole(createPolicyPartnerRoleRequestDto, authorization, options);
331
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
332
+ },
333
+ /**
334
+ * Permanently deletes the policy partner role. Supply the unique code that was returned when you created the policy partner role and this will delete it.
335
+ * @summary Delete the policy partner role
336
+ * @param {string} code Unique identifier for the object.
337
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ */
341
+ async deletePolicyPartnerRole(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
342
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePolicyPartnerRole(code, authorization, options);
343
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
344
+ },
345
+ /**
346
+ * Retrieves the details of the policy partner role that was previously created. Supply the unique policy partner role code that was returned when you created it and Emil Api will return the corresponding policy partner role information.
347
+ * @summary Retrieve the policy partner role
348
+ * @param {string} code Unique identifier for the object.
349
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ async getPolicyPartnerRole(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyPartnerRoleResponseClass>> {
354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicyPartnerRole(code, authorization, options);
355
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
356
+ },
357
+ /**
358
+ * Returns a list of policy partner roles you have previously created. The policy partner roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
359
+ * @summary List policy partner roles
360
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
361
+ * @param {number} [pageSize] Page size.
362
+ * @param {string} [pageToken] Page token.
363
+ * @param {'name' | 'productSlug'} [filter] List filter
364
+ * @param {'name' | 'productSlug'} [search] Search query.
365
+ * @param {'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt'} [order] Ordering criteria.
366
+ * @param {number} [expand] This entity has no expand parameters
367
+ * @param {string} [filters]
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ async listPolicyPartnerRole(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'name' | 'productSlug', search?: 'name' | 'productSlug', order?: 'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt', expand?: number, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPolicyPartnerRolesResponseClass>> {
372
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicyPartnerRole(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
373
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
374
+ },
375
+ /**
376
+ * Updates the specified policy partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
377
+ * @summary Update the policy partner role
378
+ * @param {string} code Unique identifier for the object.
379
+ * @param {UpdatePolicyPartnerRoleRequestDto} updatePolicyPartnerRoleRequestDto
380
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ async updatePolicyPartnerRole(code: string, updatePolicyPartnerRoleRequestDto: UpdatePolicyPartnerRoleRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePolicyPartnerRoleResponseClass>> {
385
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePolicyPartnerRole(code, updatePolicyPartnerRoleRequestDto, authorization, options);
386
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
387
+ },
388
+ }
389
+ };
390
+
391
+ /**
392
+ * PolicyPartnerRolesApi - factory interface
393
+ * @export
394
+ */
395
+ export const PolicyPartnerRolesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
396
+ const localVarFp = PolicyPartnerRolesApiFp(configuration)
397
+ return {
398
+ /**
399
+ * This will create a policy partner role.
400
+ * @summary Create the policy partner role
401
+ * @param {CreatePolicyPartnerRoleRequestDto} createPolicyPartnerRoleRequestDto
402
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ createPolicyPartnerRole(createPolicyPartnerRoleRequestDto: CreatePolicyPartnerRoleRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePolicyPartnerRoleResponseClass> {
407
+ return localVarFp.createPolicyPartnerRole(createPolicyPartnerRoleRequestDto, authorization, options).then((request) => request(axios, basePath));
408
+ },
409
+ /**
410
+ * Permanently deletes the policy partner role. Supply the unique code that was returned when you created the policy partner role and this will delete it.
411
+ * @summary Delete the policy partner role
412
+ * @param {string} code Unique identifier for the object.
413
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ deletePolicyPartnerRole(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass> {
418
+ return localVarFp.deletePolicyPartnerRole(code, authorization, options).then((request) => request(axios, basePath));
419
+ },
420
+ /**
421
+ * Retrieves the details of the policy partner role that was previously created. Supply the unique policy partner role code that was returned when you created it and Emil Api will return the corresponding policy partner role information.
422
+ * @summary Retrieve the policy partner role
423
+ * @param {string} code Unique identifier for the object.
424
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ getPolicyPartnerRole(code: string, authorization?: string, options?: any): AxiosPromise<GetPolicyPartnerRoleResponseClass> {
429
+ return localVarFp.getPolicyPartnerRole(code, authorization, options).then((request) => request(axios, basePath));
430
+ },
431
+ /**
432
+ * Returns a list of policy partner roles you have previously created. The policy partner roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
433
+ * @summary List policy partner roles
434
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
435
+ * @param {number} [pageSize] Page size.
436
+ * @param {string} [pageToken] Page token.
437
+ * @param {'name' | 'productSlug'} [filter] List filter
438
+ * @param {'name' | 'productSlug'} [search] Search query.
439
+ * @param {'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt'} [order] Ordering criteria.
440
+ * @param {number} [expand] This entity has no expand parameters
441
+ * @param {string} [filters]
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ listPolicyPartnerRole(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'name' | 'productSlug', search?: 'name' | 'productSlug', order?: 'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt', expand?: number, filters?: string, options?: any): AxiosPromise<ListPolicyPartnerRolesResponseClass> {
446
+ return localVarFp.listPolicyPartnerRole(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
447
+ },
448
+ /**
449
+ * Updates the specified policy partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
450
+ * @summary Update the policy partner role
451
+ * @param {string} code Unique identifier for the object.
452
+ * @param {UpdatePolicyPartnerRoleRequestDto} updatePolicyPartnerRoleRequestDto
453
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ updatePolicyPartnerRole(code: string, updatePolicyPartnerRoleRequestDto: UpdatePolicyPartnerRoleRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePolicyPartnerRoleResponseClass> {
458
+ return localVarFp.updatePolicyPartnerRole(code, updatePolicyPartnerRoleRequestDto, authorization, options).then((request) => request(axios, basePath));
459
+ },
460
+ };
461
+ };
462
+
463
+ /**
464
+ * Request parameters for createPolicyPartnerRole operation in PolicyPartnerRolesApi.
465
+ * @export
466
+ * @interface PolicyPartnerRolesApiCreatePolicyPartnerRoleRequest
467
+ */
468
+ export interface PolicyPartnerRolesApiCreatePolicyPartnerRoleRequest {
469
+ /**
470
+ *
471
+ * @type {CreatePolicyPartnerRoleRequestDto}
472
+ * @memberof PolicyPartnerRolesApiCreatePolicyPartnerRole
473
+ */
474
+ readonly createPolicyPartnerRoleRequestDto: CreatePolicyPartnerRoleRequestDto
475
+
476
+ /**
477
+ * Bearer Token: provided by the login endpoint under the name accessToken.
478
+ * @type {string}
479
+ * @memberof PolicyPartnerRolesApiCreatePolicyPartnerRole
480
+ */
481
+ readonly authorization?: string
482
+ }
483
+
484
+ /**
485
+ * Request parameters for deletePolicyPartnerRole operation in PolicyPartnerRolesApi.
486
+ * @export
487
+ * @interface PolicyPartnerRolesApiDeletePolicyPartnerRoleRequest
488
+ */
489
+ export interface PolicyPartnerRolesApiDeletePolicyPartnerRoleRequest {
490
+ /**
491
+ * Unique identifier for the object.
492
+ * @type {string}
493
+ * @memberof PolicyPartnerRolesApiDeletePolicyPartnerRole
494
+ */
495
+ readonly code: string
496
+
497
+ /**
498
+ * Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @type {string}
500
+ * @memberof PolicyPartnerRolesApiDeletePolicyPartnerRole
501
+ */
502
+ readonly authorization?: string
503
+ }
504
+
505
+ /**
506
+ * Request parameters for getPolicyPartnerRole operation in PolicyPartnerRolesApi.
507
+ * @export
508
+ * @interface PolicyPartnerRolesApiGetPolicyPartnerRoleRequest
509
+ */
510
+ export interface PolicyPartnerRolesApiGetPolicyPartnerRoleRequest {
511
+ /**
512
+ * Unique identifier for the object.
513
+ * @type {string}
514
+ * @memberof PolicyPartnerRolesApiGetPolicyPartnerRole
515
+ */
516
+ readonly code: string
517
+
518
+ /**
519
+ * Bearer Token: provided by the login endpoint under the name accessToken.
520
+ * @type {string}
521
+ * @memberof PolicyPartnerRolesApiGetPolicyPartnerRole
522
+ */
523
+ readonly authorization?: string
524
+ }
525
+
526
+ /**
527
+ * Request parameters for listPolicyPartnerRole operation in PolicyPartnerRolesApi.
528
+ * @export
529
+ * @interface PolicyPartnerRolesApiListPolicyPartnerRoleRequest
530
+ */
531
+ export interface PolicyPartnerRolesApiListPolicyPartnerRoleRequest {
532
+ /**
533
+ * Bearer Token: provided by the login endpoint under the name accessToken.
534
+ * @type {string}
535
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
536
+ */
537
+ readonly authorization?: string
538
+
539
+ /**
540
+ * Page size.
541
+ * @type {number}
542
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
543
+ */
544
+ readonly pageSize?: number
545
+
546
+ /**
547
+ * Page token.
548
+ * @type {string}
549
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
550
+ */
551
+ readonly pageToken?: string
552
+
553
+ /**
554
+ * List filter
555
+ * @type {'name' | 'productSlug'}
556
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
557
+ */
558
+ readonly filter?: 'name' | 'productSlug'
559
+
560
+ /**
561
+ * Search query.
562
+ * @type {'name' | 'productSlug'}
563
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
564
+ */
565
+ readonly search?: 'name' | 'productSlug'
566
+
567
+ /**
568
+ * Ordering criteria.
569
+ * @type {'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt'}
570
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
571
+ */
572
+ readonly order?: 'id' | 'name' | 'productSlug' | 'createdAt' | 'updatedAt'
573
+
574
+ /**
575
+ * This entity has no expand parameters
576
+ * @type {number}
577
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
578
+ */
579
+ readonly expand?: number
580
+
581
+ /**
582
+ *
583
+ * @type {string}
584
+ * @memberof PolicyPartnerRolesApiListPolicyPartnerRole
585
+ */
586
+ readonly filters?: string
587
+ }
588
+
589
+ /**
590
+ * Request parameters for updatePolicyPartnerRole operation in PolicyPartnerRolesApi.
591
+ * @export
592
+ * @interface PolicyPartnerRolesApiUpdatePolicyPartnerRoleRequest
593
+ */
594
+ export interface PolicyPartnerRolesApiUpdatePolicyPartnerRoleRequest {
595
+ /**
596
+ * Unique identifier for the object.
597
+ * @type {string}
598
+ * @memberof PolicyPartnerRolesApiUpdatePolicyPartnerRole
599
+ */
600
+ readonly code: string
601
+
602
+ /**
603
+ *
604
+ * @type {UpdatePolicyPartnerRoleRequestDto}
605
+ * @memberof PolicyPartnerRolesApiUpdatePolicyPartnerRole
606
+ */
607
+ readonly updatePolicyPartnerRoleRequestDto: UpdatePolicyPartnerRoleRequestDto
608
+
609
+ /**
610
+ * Bearer Token: provided by the login endpoint under the name accessToken.
611
+ * @type {string}
612
+ * @memberof PolicyPartnerRolesApiUpdatePolicyPartnerRole
613
+ */
614
+ readonly authorization?: string
615
+ }
616
+
617
+ /**
618
+ * PolicyPartnerRolesApi - object-oriented interface
619
+ * @export
620
+ * @class PolicyPartnerRolesApi
621
+ * @extends {BaseAPI}
622
+ */
623
+ export class PolicyPartnerRolesApi extends BaseAPI {
624
+ /**
625
+ * This will create a policy partner role.
626
+ * @summary Create the policy partner role
627
+ * @param {PolicyPartnerRolesApiCreatePolicyPartnerRoleRequest} requestParameters Request parameters.
628
+ * @param {*} [options] Override http request option.
629
+ * @throws {RequiredError}
630
+ * @memberof PolicyPartnerRolesApi
631
+ */
632
+ public createPolicyPartnerRole(requestParameters: PolicyPartnerRolesApiCreatePolicyPartnerRoleRequest, options?: AxiosRequestConfig) {
633
+ return PolicyPartnerRolesApiFp(this.configuration).createPolicyPartnerRole(requestParameters.createPolicyPartnerRoleRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
634
+ }
635
+
636
+ /**
637
+ * Permanently deletes the policy partner role. Supply the unique code that was returned when you created the policy partner role and this will delete it.
638
+ * @summary Delete the policy partner role
639
+ * @param {PolicyPartnerRolesApiDeletePolicyPartnerRoleRequest} requestParameters Request parameters.
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ * @memberof PolicyPartnerRolesApi
643
+ */
644
+ public deletePolicyPartnerRole(requestParameters: PolicyPartnerRolesApiDeletePolicyPartnerRoleRequest, options?: AxiosRequestConfig) {
645
+ return PolicyPartnerRolesApiFp(this.configuration).deletePolicyPartnerRole(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
646
+ }
647
+
648
+ /**
649
+ * Retrieves the details of the policy partner role that was previously created. Supply the unique policy partner role code that was returned when you created it and Emil Api will return the corresponding policy partner role information.
650
+ * @summary Retrieve the policy partner role
651
+ * @param {PolicyPartnerRolesApiGetPolicyPartnerRoleRequest} requestParameters Request parameters.
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ * @memberof PolicyPartnerRolesApi
655
+ */
656
+ public getPolicyPartnerRole(requestParameters: PolicyPartnerRolesApiGetPolicyPartnerRoleRequest, options?: AxiosRequestConfig) {
657
+ return PolicyPartnerRolesApiFp(this.configuration).getPolicyPartnerRole(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
658
+ }
659
+
660
+ /**
661
+ * Returns a list of policy partner roles you have previously created. The policy partner roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
662
+ * @summary List policy partner roles
663
+ * @param {PolicyPartnerRolesApiListPolicyPartnerRoleRequest} requestParameters Request parameters.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ * @memberof PolicyPartnerRolesApi
667
+ */
668
+ public listPolicyPartnerRole(requestParameters: PolicyPartnerRolesApiListPolicyPartnerRoleRequest = {}, options?: AxiosRequestConfig) {
669
+ return PolicyPartnerRolesApiFp(this.configuration).listPolicyPartnerRole(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
670
+ }
671
+
672
+ /**
673
+ * Updates the specified policy partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
674
+ * @summary Update the policy partner role
675
+ * @param {PolicyPartnerRolesApiUpdatePolicyPartnerRoleRequest} requestParameters Request parameters.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ * @memberof PolicyPartnerRolesApi
679
+ */
680
+ public updatePolicyPartnerRole(requestParameters: PolicyPartnerRolesApiUpdatePolicyPartnerRoleRequest, options?: AxiosRequestConfig) {
681
+ return PolicyPartnerRolesApiFp(this.configuration).updatePolicyPartnerRole(requestParameters.code, requestParameters.updatePolicyPartnerRoleRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
682
+ }
683
+ }