@emilgroup/insurance-sdk-node 1.48.0 → 1.48.1-beta.2

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 +21 -8
  2. package/README.md +2 -2
  3. package/api/booking-funnels-api.ts +4 -4
  4. package/api/default-api.ts +8 -4
  5. package/api/emil-functions-api.ts +1314 -0
  6. package/api/insured-object-types-api.ts +4 -4
  7. package/api/insured-objects-api.ts +9 -6
  8. package/api/lead-statuses-api.ts +96 -12
  9. package/api/named-ranges-api.ts +4 -4
  10. package/api/partner-roles-api.ts +683 -0
  11. package/api/policies-api.ts +167 -180
  12. package/api/premium-formulas-api.ts +4 -4
  13. package/api/product-factors-api.ts +4 -4
  14. package/api/product-fields-api.ts +8 -8
  15. package/api/products-api.ts +12 -12
  16. package/api.ts +4 -2
  17. package/dist/api/booking-funnels-api.d.ts +4 -4
  18. package/dist/api/booking-funnels-api.js +4 -4
  19. package/dist/api/default-api.d.ts +8 -4
  20. package/dist/api/default-api.js +8 -4
  21. package/dist/api/emil-functions-api.d.ts +727 -0
  22. package/dist/api/emil-functions-api.js +1202 -0
  23. package/dist/api/insured-object-types-api.d.ts +4 -4
  24. package/dist/api/insured-object-types-api.js +3 -3
  25. package/dist/api/insured-objects-api.d.ts +4 -4
  26. package/dist/api/insured-objects-api.js +7 -5
  27. package/dist/api/lead-statuses-api.d.ts +63 -9
  28. package/dist/api/lead-statuses-api.js +45 -9
  29. package/dist/api/named-ranges-api.d.ts +4 -4
  30. package/dist/api/named-ranges-api.js +3 -3
  31. package/dist/api/partner-roles-api.d.ts +385 -0
  32. package/dist/api/{policy-partner-roles-api.js → partner-roles-api.js} +139 -139
  33. package/dist/api/policies-api.d.ts +131 -140
  34. package/dist/api/policies-api.js +114 -120
  35. package/dist/api/premium-formulas-api.d.ts +4 -4
  36. package/dist/api/premium-formulas-api.js +3 -3
  37. package/dist/api/product-factors-api.d.ts +4 -4
  38. package/dist/api/product-factors-api.js +3 -3
  39. package/dist/api/product-fields-api.d.ts +8 -8
  40. package/dist/api/product-fields-api.js +6 -6
  41. package/dist/api/products-api.d.ts +12 -12
  42. package/dist/api/products-api.js +9 -9
  43. package/dist/api.d.ts +2 -1
  44. package/dist/api.js +2 -1
  45. package/dist/models/booking-funnel-class.d.ts +1 -1
  46. package/dist/models/create-booking-funnel-request-dto.d.ts +1 -1
  47. package/dist/models/create-emil-function-request-dto.d.ts +42 -0
  48. package/dist/models/create-emil-function-secret-request-dto.d.ts +36 -0
  49. package/dist/models/{update-policy-partner-role-request-dto.d.ts → create-partner-role-request-dto.d.ts} +6 -6
  50. package/dist/models/{get-policy-partner-role-response-class.d.ts → create-partner-role-response-class.d.ts} +7 -7
  51. package/dist/models/create-product-request-dto.d.ts +1 -1
  52. package/dist/models/emil-function-class.d.ts +60 -0
  53. package/dist/models/{create-policy-partner-role-response-class.d.ts → emil-function-secret-class.d.ts} +12 -7
  54. package/dist/models/execute-emil-function-request-dto.d.ts +24 -0
  55. package/dist/models/get-emil-function-secret-response-class.d.ts +24 -0
  56. package/dist/models/get-emil-function-secret-response-class.js +15 -0
  57. package/dist/models/{update-policy-partner-role-response-class.d.ts → get-partner-role-response-class.d.ts} +7 -7
  58. package/dist/models/get-partner-role-response-class.js +15 -0
  59. package/dist/models/get-product-request-dto.d.ts +1 -1
  60. package/dist/models/index.d.ts +19 -7
  61. package/dist/models/index.js +19 -7
  62. package/dist/models/insured-object-type-class.d.ts +1 -1
  63. package/dist/models/invoice-item-class.d.ts +12 -0
  64. package/dist/models/lead-class.d.ts +8 -1
  65. package/dist/models/lead-status-class.d.ts +1 -1
  66. package/dist/models/list-emil-function-secrets-response-class.d.ts +25 -0
  67. package/dist/models/list-emil-function-secrets-response-class.js +15 -0
  68. package/dist/models/{list-policy-partner-roles-response-class.d.ts → list-emil-functions-response-class.d.ts} +8 -8
  69. package/dist/models/list-emil-functions-response-class.js +15 -0
  70. package/dist/models/list-partner-roles-response-class.d.ts +31 -0
  71. package/dist/models/list-partner-roles-response-class.js +15 -0
  72. package/dist/models/list-policy-versions-request-dto.d.ts +1 -1
  73. package/dist/models/list-request-dto.d.ts +1 -1
  74. package/dist/models/partner-class.d.ts +60 -0
  75. package/dist/models/partner-class.js +15 -0
  76. package/dist/models/partner-link-class.d.ts +86 -0
  77. package/dist/models/partner-link-class.js +15 -0
  78. package/dist/models/{policy-partner-role-class.d.ts → partner-role-class.d.ts} +10 -10
  79. package/dist/models/partner-role-class.js +15 -0
  80. package/dist/models/patch-draft-policy-request-dto.d.ts +1 -1
  81. package/dist/models/policy-class.d.ts +7 -0
  82. package/dist/models/product-class.d.ts +1 -1
  83. package/dist/models/shared-update-named-range-request-dto.d.ts +1 -1
  84. package/dist/models/status-transition-rule-class.d.ts +1 -1
  85. package/dist/models/update-emil-function-request-dto.d.ts +42 -0
  86. package/dist/models/update-emil-function-request-dto.js +15 -0
  87. package/dist/models/update-emil-function-secret-request-dto.d.ts +30 -0
  88. package/dist/models/update-emil-function-secret-request-dto.js +15 -0
  89. package/dist/models/update-named-range-request-dto.d.ts +1 -1
  90. package/dist/models/{create-policy-partner-role-request-dto.d.ts → update-partner-role-request-dto.d.ts} +6 -6
  91. package/dist/models/update-partner-role-request-dto.js +15 -0
  92. package/dist/models/update-partner-role-response-class.d.ts +25 -0
  93. package/dist/models/update-partner-role-response-class.js +15 -0
  94. package/dist/models/update-product-request-dto.d.ts +1 -1
  95. package/models/booking-funnel-class.ts +1 -1
  96. package/models/create-booking-funnel-request-dto.ts +1 -1
  97. package/models/create-emil-function-request-dto.ts +48 -0
  98. package/models/create-emil-function-secret-request-dto.ts +42 -0
  99. package/models/{update-policy-partner-role-request-dto.ts → create-partner-role-request-dto.ts} +6 -6
  100. package/models/{get-policy-partner-role-response-class.ts → create-partner-role-response-class.ts} +7 -7
  101. package/models/create-product-request-dto.ts +1 -1
  102. package/models/emil-function-class.ts +66 -0
  103. package/models/{update-policy-partner-role-response-class.ts → emil-function-secret-class.ts} +12 -7
  104. package/models/execute-emil-function-request-dto.ts +30 -0
  105. package/models/get-emil-function-secret-response-class.ts +30 -0
  106. package/models/{create-policy-partner-role-response-class.ts → get-partner-role-response-class.ts} +7 -7
  107. package/models/get-product-request-dto.ts +1 -1
  108. package/models/index.ts +19 -7
  109. package/models/insured-object-type-class.ts +1 -1
  110. package/models/invoice-item-class.ts +12 -0
  111. package/models/lead-class.ts +8 -1
  112. package/models/lead-status-class.ts +1 -1
  113. package/models/list-emil-function-secrets-response-class.ts +31 -0
  114. package/models/{list-policy-partner-roles-response-class.ts → list-emil-functions-response-class.ts} +8 -8
  115. package/models/list-partner-roles-response-class.ts +37 -0
  116. package/models/list-policy-versions-request-dto.ts +1 -1
  117. package/models/list-request-dto.ts +1 -1
  118. package/models/partner-class.ts +66 -0
  119. package/models/partner-link-class.ts +92 -0
  120. package/models/{policy-partner-role-class.ts → partner-role-class.ts} +10 -10
  121. package/models/patch-draft-policy-request-dto.ts +1 -1
  122. package/models/policy-class.ts +7 -0
  123. package/models/product-class.ts +1 -1
  124. package/models/shared-update-named-range-request-dto.ts +1 -1
  125. package/models/status-transition-rule-class.ts +1 -1
  126. package/models/update-emil-function-request-dto.ts +48 -0
  127. package/models/update-emil-function-secret-request-dto.ts +36 -0
  128. package/models/update-named-range-request-dto.ts +1 -1
  129. package/models/{create-policy-partner-role-request-dto.ts → update-partner-role-request-dto.ts} +6 -6
  130. package/models/update-partner-role-response-class.ts +31 -0
  131. package/models/update-product-request-dto.ts +1 -1
  132. package/package.json +1 -1
  133. package/api/policy-partner-roles-api.ts +0 -683
  134. package/dist/api/policy-partner-roles-api.d.ts +0 -385
  135. /package/dist/models/{create-policy-partner-role-request-dto.js → create-emil-function-request-dto.js} +0 -0
  136. /package/dist/models/{create-policy-partner-role-response-class.js → create-emil-function-secret-request-dto.js} +0 -0
  137. /package/dist/models/{get-policy-partner-role-response-class.js → create-partner-role-request-dto.js} +0 -0
  138. /package/dist/models/{list-policy-partner-roles-response-class.js → create-partner-role-response-class.js} +0 -0
  139. /package/dist/models/{policy-partner-role-class.js → emil-function-class.js} +0 -0
  140. /package/dist/models/{update-policy-partner-role-request-dto.js → emil-function-secret-class.js} +0 -0
  141. /package/dist/models/{update-policy-partner-role-response-class.js → execute-emil-function-request-dto.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 { CreatePartnerRoleRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreatePartnerRoleResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { DeleteResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { GetPartnerRoleResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { ListPartnerRolesResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { UpdatePartnerRoleRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { UpdatePartnerRoleResponseClass } from '../models';
37
+ // URLSearchParams not necessarily used
38
+ // @ts-ignore
39
+ import { URL, URLSearchParams } from 'url';
40
+ const FormData = require('form-data');
41
+ /**
42
+ * PartnerRolesApi - axios parameter creator
43
+ * @export
44
+ */
45
+ export const PartnerRolesApiAxiosParamCreator = function (configuration?: Configuration) {
46
+ return {
47
+ /**
48
+ * This will create a partner role.
49
+ * @summary Create the partner role
50
+ * @param {CreatePartnerRoleRequestDto} createPartnerRoleRequestDto
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
+ createPartnerRole: async (createPartnerRoleRequestDto: CreatePartnerRoleRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
56
+ // verify required parameter 'createPartnerRoleRequestDto' is not null or undefined
57
+ assertParamExists('createPartnerRole', 'createPartnerRoleRequestDto', createPartnerRoleRequestDto)
58
+ const localVarPath = `/insuranceservice/v1/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(createPartnerRoleRequestDto, localVarRequestOptions, configuration)
88
+
89
+ return {
90
+ url: toPathString(localVarUrlObj),
91
+ options: localVarRequestOptions,
92
+ };
93
+ },
94
+ /**
95
+ * Permanently deletes the partner role. Supply the unique code that was returned when you created the partner role and this will delete it.
96
+ * @summary Delete the 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
+ deletePartnerRole: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
103
+ // verify required parameter 'code' is not null or undefined
104
+ assertParamExists('deletePartnerRole', 'code', code)
105
+ const localVarPath = `/insuranceservice/v1/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 partner role that was previously created. Supply the unique partner role code that was returned when you created it and Emil Api will return the corresponding partner role information.
141
+ * @summary Retrieve the 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
+ getPartnerRole: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
148
+ // verify required parameter 'code' is not null or undefined
149
+ assertParamExists('getPartnerRole', 'code', code)
150
+ const localVarPath = `/insuranceservice/v1/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 partner roles you have previously created. The 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 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 {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: name, productSlug&lt;/i&gt;
191
+ * @param {string} [search] Search query.
192
+ * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, name, productSlug, createdAt, updatedAt&lt;/i&gt;
193
+ * @param {string} [expand] This entity has no expand parameters
194
+ * @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ listPartnerRole: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
199
+ const localVarPath = `/insuranceservice/v1/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 partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
262
+ * @summary Update the partner role
263
+ * @param {string} code Unique identifier for the object.
264
+ * @param {UpdatePartnerRoleRequestDto} updatePartnerRoleRequestDto
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
+ updatePartnerRole: async (code: string, updatePartnerRoleRequestDto: UpdatePartnerRoleRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
270
+ // verify required parameter 'code' is not null or undefined
271
+ assertParamExists('updatePartnerRole', 'code', code)
272
+ // verify required parameter 'updatePartnerRoleRequestDto' is not null or undefined
273
+ assertParamExists('updatePartnerRole', 'updatePartnerRoleRequestDto', updatePartnerRoleRequestDto)
274
+ const localVarPath = `/insuranceservice/v1/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(updatePartnerRoleRequestDto, localVarRequestOptions, configuration)
305
+
306
+ return {
307
+ url: toPathString(localVarUrlObj),
308
+ options: localVarRequestOptions,
309
+ };
310
+ },
311
+ }
312
+ };
313
+
314
+ /**
315
+ * PartnerRolesApi - functional programming interface
316
+ * @export
317
+ */
318
+ export const PartnerRolesApiFp = function(configuration?: Configuration) {
319
+ const localVarAxiosParamCreator = PartnerRolesApiAxiosParamCreator(configuration)
320
+ return {
321
+ /**
322
+ * This will create a partner role.
323
+ * @summary Create the partner role
324
+ * @param {CreatePartnerRoleRequestDto} createPartnerRoleRequestDto
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 createPartnerRole(createPartnerRoleRequestDto: CreatePartnerRoleRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePartnerRoleResponseClass>> {
330
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPartnerRole(createPartnerRoleRequestDto, authorization, options);
331
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
332
+ },
333
+ /**
334
+ * Permanently deletes the partner role. Supply the unique code that was returned when you created the partner role and this will delete it.
335
+ * @summary Delete the 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 deletePartnerRole(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
342
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePartnerRole(code, authorization, options);
343
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
344
+ },
345
+ /**
346
+ * Retrieves the details of the partner role that was previously created. Supply the unique partner role code that was returned when you created it and Emil Api will return the corresponding partner role information.
347
+ * @summary Retrieve the 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 getPartnerRole(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerRoleResponseClass>> {
354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPartnerRole(code, authorization, options);
355
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
356
+ },
357
+ /**
358
+ * Returns a list of partner roles you have previously created. The 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 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 {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: name, productSlug&lt;/i&gt;
364
+ * @param {string} [search] Search query.
365
+ * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, name, productSlug, createdAt, updatedAt&lt;/i&gt;
366
+ * @param {string} [expand] This entity has no expand parameters
367
+ * @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ async listPartnerRole(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPartnerRolesResponseClass>> {
372
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPartnerRole(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
373
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
374
+ },
375
+ /**
376
+ * Updates the specified partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
377
+ * @summary Update the partner role
378
+ * @param {string} code Unique identifier for the object.
379
+ * @param {UpdatePartnerRoleRequestDto} updatePartnerRoleRequestDto
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 updatePartnerRole(code: string, updatePartnerRoleRequestDto: UpdatePartnerRoleRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePartnerRoleResponseClass>> {
385
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePartnerRole(code, updatePartnerRoleRequestDto, authorization, options);
386
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
387
+ },
388
+ }
389
+ };
390
+
391
+ /**
392
+ * PartnerRolesApi - factory interface
393
+ * @export
394
+ */
395
+ export const PartnerRolesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
396
+ const localVarFp = PartnerRolesApiFp(configuration)
397
+ return {
398
+ /**
399
+ * This will create a partner role.
400
+ * @summary Create the partner role
401
+ * @param {CreatePartnerRoleRequestDto} createPartnerRoleRequestDto
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
+ createPartnerRole(createPartnerRoleRequestDto: CreatePartnerRoleRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePartnerRoleResponseClass> {
407
+ return localVarFp.createPartnerRole(createPartnerRoleRequestDto, authorization, options).then((request) => request(axios, basePath));
408
+ },
409
+ /**
410
+ * Permanently deletes the partner role. Supply the unique code that was returned when you created the partner role and this will delete it.
411
+ * @summary Delete the 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
+ deletePartnerRole(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass> {
418
+ return localVarFp.deletePartnerRole(code, authorization, options).then((request) => request(axios, basePath));
419
+ },
420
+ /**
421
+ * Retrieves the details of the partner role that was previously created. Supply the unique partner role code that was returned when you created it and Emil Api will return the corresponding partner role information.
422
+ * @summary Retrieve the 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
+ getPartnerRole(code: string, authorization?: string, options?: any): AxiosPromise<GetPartnerRoleResponseClass> {
429
+ return localVarFp.getPartnerRole(code, authorization, options).then((request) => request(axios, basePath));
430
+ },
431
+ /**
432
+ * Returns a list of partner roles you have previously created. The 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 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 {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: name, productSlug&lt;/i&gt;
438
+ * @param {string} [search] Search query.
439
+ * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, name, productSlug, createdAt, updatedAt&lt;/i&gt;
440
+ * @param {string} [expand] This entity has no expand parameters
441
+ * @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ listPartnerRole(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPartnerRolesResponseClass> {
446
+ return localVarFp.listPartnerRole(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
447
+ },
448
+ /**
449
+ * Updates the specified partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
450
+ * @summary Update the partner role
451
+ * @param {string} code Unique identifier for the object.
452
+ * @param {UpdatePartnerRoleRequestDto} updatePartnerRoleRequestDto
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
+ updatePartnerRole(code: string, updatePartnerRoleRequestDto: UpdatePartnerRoleRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePartnerRoleResponseClass> {
458
+ return localVarFp.updatePartnerRole(code, updatePartnerRoleRequestDto, authorization, options).then((request) => request(axios, basePath));
459
+ },
460
+ };
461
+ };
462
+
463
+ /**
464
+ * Request parameters for createPartnerRole operation in PartnerRolesApi.
465
+ * @export
466
+ * @interface PartnerRolesApiCreatePartnerRoleRequest
467
+ */
468
+ export interface PartnerRolesApiCreatePartnerRoleRequest {
469
+ /**
470
+ *
471
+ * @type {CreatePartnerRoleRequestDto}
472
+ * @memberof PartnerRolesApiCreatePartnerRole
473
+ */
474
+ readonly createPartnerRoleRequestDto: CreatePartnerRoleRequestDto
475
+
476
+ /**
477
+ * Bearer Token: provided by the login endpoint under the name accessToken.
478
+ * @type {string}
479
+ * @memberof PartnerRolesApiCreatePartnerRole
480
+ */
481
+ readonly authorization?: string
482
+ }
483
+
484
+ /**
485
+ * Request parameters for deletePartnerRole operation in PartnerRolesApi.
486
+ * @export
487
+ * @interface PartnerRolesApiDeletePartnerRoleRequest
488
+ */
489
+ export interface PartnerRolesApiDeletePartnerRoleRequest {
490
+ /**
491
+ * Unique identifier for the object.
492
+ * @type {string}
493
+ * @memberof PartnerRolesApiDeletePartnerRole
494
+ */
495
+ readonly code: string
496
+
497
+ /**
498
+ * Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @type {string}
500
+ * @memberof PartnerRolesApiDeletePartnerRole
501
+ */
502
+ readonly authorization?: string
503
+ }
504
+
505
+ /**
506
+ * Request parameters for getPartnerRole operation in PartnerRolesApi.
507
+ * @export
508
+ * @interface PartnerRolesApiGetPartnerRoleRequest
509
+ */
510
+ export interface PartnerRolesApiGetPartnerRoleRequest {
511
+ /**
512
+ * Unique identifier for the object.
513
+ * @type {string}
514
+ * @memberof PartnerRolesApiGetPartnerRole
515
+ */
516
+ readonly code: string
517
+
518
+ /**
519
+ * Bearer Token: provided by the login endpoint under the name accessToken.
520
+ * @type {string}
521
+ * @memberof PartnerRolesApiGetPartnerRole
522
+ */
523
+ readonly authorization?: string
524
+ }
525
+
526
+ /**
527
+ * Request parameters for listPartnerRole operation in PartnerRolesApi.
528
+ * @export
529
+ * @interface PartnerRolesApiListPartnerRoleRequest
530
+ */
531
+ export interface PartnerRolesApiListPartnerRoleRequest {
532
+ /**
533
+ * Bearer Token: provided by the login endpoint under the name accessToken.
534
+ * @type {string}
535
+ * @memberof PartnerRolesApiListPartnerRole
536
+ */
537
+ readonly authorization?: string
538
+
539
+ /**
540
+ * Page size.
541
+ * @type {number}
542
+ * @memberof PartnerRolesApiListPartnerRole
543
+ */
544
+ readonly pageSize?: number
545
+
546
+ /**
547
+ * Page token.
548
+ * @type {string}
549
+ * @memberof PartnerRolesApiListPartnerRole
550
+ */
551
+ readonly pageToken?: string
552
+
553
+ /**
554
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: name, productSlug&lt;/i&gt;
555
+ * @type {string}
556
+ * @memberof PartnerRolesApiListPartnerRole
557
+ */
558
+ readonly filter?: string
559
+
560
+ /**
561
+ * Search query.
562
+ * @type {string}
563
+ * @memberof PartnerRolesApiListPartnerRole
564
+ */
565
+ readonly search?: string
566
+
567
+ /**
568
+ * Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, name, productSlug, createdAt, updatedAt&lt;/i&gt;
569
+ * @type {string}
570
+ * @memberof PartnerRolesApiListPartnerRole
571
+ */
572
+ readonly order?: string
573
+
574
+ /**
575
+ * This entity has no expand parameters
576
+ * @type {string}
577
+ * @memberof PartnerRolesApiListPartnerRole
578
+ */
579
+ readonly expand?: string
580
+
581
+ /**
582
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
583
+ * @type {string}
584
+ * @memberof PartnerRolesApiListPartnerRole
585
+ */
586
+ readonly filters?: string
587
+ }
588
+
589
+ /**
590
+ * Request parameters for updatePartnerRole operation in PartnerRolesApi.
591
+ * @export
592
+ * @interface PartnerRolesApiUpdatePartnerRoleRequest
593
+ */
594
+ export interface PartnerRolesApiUpdatePartnerRoleRequest {
595
+ /**
596
+ * Unique identifier for the object.
597
+ * @type {string}
598
+ * @memberof PartnerRolesApiUpdatePartnerRole
599
+ */
600
+ readonly code: string
601
+
602
+ /**
603
+ *
604
+ * @type {UpdatePartnerRoleRequestDto}
605
+ * @memberof PartnerRolesApiUpdatePartnerRole
606
+ */
607
+ readonly updatePartnerRoleRequestDto: UpdatePartnerRoleRequestDto
608
+
609
+ /**
610
+ * Bearer Token: provided by the login endpoint under the name accessToken.
611
+ * @type {string}
612
+ * @memberof PartnerRolesApiUpdatePartnerRole
613
+ */
614
+ readonly authorization?: string
615
+ }
616
+
617
+ /**
618
+ * PartnerRolesApi - object-oriented interface
619
+ * @export
620
+ * @class PartnerRolesApi
621
+ * @extends {BaseAPI}
622
+ */
623
+ export class PartnerRolesApi extends BaseAPI {
624
+ /**
625
+ * This will create a partner role.
626
+ * @summary Create the partner role
627
+ * @param {PartnerRolesApiCreatePartnerRoleRequest} requestParameters Request parameters.
628
+ * @param {*} [options] Override http request option.
629
+ * @throws {RequiredError}
630
+ * @memberof PartnerRolesApi
631
+ */
632
+ public createPartnerRole(requestParameters: PartnerRolesApiCreatePartnerRoleRequest, options?: AxiosRequestConfig) {
633
+ return PartnerRolesApiFp(this.configuration).createPartnerRole(requestParameters.createPartnerRoleRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
634
+ }
635
+
636
+ /**
637
+ * Permanently deletes the partner role. Supply the unique code that was returned when you created the partner role and this will delete it.
638
+ * @summary Delete the partner role
639
+ * @param {PartnerRolesApiDeletePartnerRoleRequest} requestParameters Request parameters.
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ * @memberof PartnerRolesApi
643
+ */
644
+ public deletePartnerRole(requestParameters: PartnerRolesApiDeletePartnerRoleRequest, options?: AxiosRequestConfig) {
645
+ return PartnerRolesApiFp(this.configuration).deletePartnerRole(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
646
+ }
647
+
648
+ /**
649
+ * Retrieves the details of the partner role that was previously created. Supply the unique partner role code that was returned when you created it and Emil Api will return the corresponding partner role information.
650
+ * @summary Retrieve the partner role
651
+ * @param {PartnerRolesApiGetPartnerRoleRequest} requestParameters Request parameters.
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ * @memberof PartnerRolesApi
655
+ */
656
+ public getPartnerRole(requestParameters: PartnerRolesApiGetPartnerRoleRequest, options?: AxiosRequestConfig) {
657
+ return PartnerRolesApiFp(this.configuration).getPartnerRole(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
658
+ }
659
+
660
+ /**
661
+ * Returns a list of partner roles you have previously created. The 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 partner roles
663
+ * @param {PartnerRolesApiListPartnerRoleRequest} requestParameters Request parameters.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ * @memberof PartnerRolesApi
667
+ */
668
+ public listPartnerRole(requestParameters: PartnerRolesApiListPartnerRoleRequest = {}, options?: AxiosRequestConfig) {
669
+ return PartnerRolesApiFp(this.configuration).listPartnerRole(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 partner role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
674
+ * @summary Update the partner role
675
+ * @param {PartnerRolesApiUpdatePartnerRoleRequest} requestParameters Request parameters.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ * @memberof PartnerRolesApi
679
+ */
680
+ public updatePartnerRole(requestParameters: PartnerRolesApiUpdatePartnerRoleRequest, options?: AxiosRequestConfig) {
681
+ return PartnerRolesApiFp(this.configuration).updatePartnerRole(requestParameters.code, requestParameters.updatePartnerRoleRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
682
+ }
683
+ }