@emilgroup/commission-sdk-node 1.0.0-beta.1

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 (106) hide show
  1. package/.openapi-generator/FILES +40 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +84 -0
  5. package/api/commission-agreement-versions-api.ts +535 -0
  6. package/api/commission-agreements-api.ts +642 -0
  7. package/api/commissions-api.ts +641 -0
  8. package/api/default-api.ts +128 -0
  9. package/api.ts +37 -0
  10. package/base.ts +327 -0
  11. package/common.ts +199 -0
  12. package/configuration.ts +118 -0
  13. package/dist/api/commission-agreement-versions-api.d.ts +300 -0
  14. package/dist/api/commission-agreement-versions-api.js +531 -0
  15. package/dist/api/commission-agreements-api.d.ts +357 -0
  16. package/dist/api/commission-agreements-api.js +624 -0
  17. package/dist/api/commissions-api.d.ts +357 -0
  18. package/dist/api/commissions-api.js +624 -0
  19. package/dist/api/default-api.d.ts +70 -0
  20. package/dist/api/default-api.js +204 -0
  21. package/dist/api.d.ts +15 -0
  22. package/dist/api.js +33 -0
  23. package/dist/base.d.ts +88 -0
  24. package/dist/base.js +434 -0
  25. package/dist/common.d.ts +92 -0
  26. package/dist/common.js +277 -0
  27. package/dist/configuration.d.ts +96 -0
  28. package/dist/configuration.js +52 -0
  29. package/dist/index.d.ts +15 -0
  30. package/dist/index.js +36 -0
  31. package/dist/models/commission-agreement-class.d.ts +89 -0
  32. package/dist/models/commission-agreement-class.js +25 -0
  33. package/dist/models/commission-agreement-version-class.d.ts +79 -0
  34. package/dist/models/commission-agreement-version-class.js +15 -0
  35. package/dist/models/commission-class.d.ts +103 -0
  36. package/dist/models/commission-class.js +15 -0
  37. package/dist/models/commission-item-class.d.ts +84 -0
  38. package/dist/models/commission-item-class.js +21 -0
  39. package/dist/models/create-commission-agreement-request-dto.d.ts +71 -0
  40. package/dist/models/create-commission-agreement-request-dto.js +25 -0
  41. package/dist/models/create-commission-agreement-response-class.d.ts +25 -0
  42. package/dist/models/create-commission-agreement-response-class.js +15 -0
  43. package/dist/models/create-commission-agreement-version-request-dto.d.ts +42 -0
  44. package/dist/models/create-commission-agreement-version-request-dto.js +15 -0
  45. package/dist/models/create-commission-agreement-version-response-class.d.ts +25 -0
  46. package/dist/models/create-commission-agreement-version-response-class.js +15 -0
  47. package/dist/models/create-commission-item-request-dto.d.ts +48 -0
  48. package/dist/models/create-commission-item-request-dto.js +21 -0
  49. package/dist/models/create-commission-request-dto.d.ts +55 -0
  50. package/dist/models/create-commission-request-dto.js +15 -0
  51. package/dist/models/create-commission-response-class.d.ts +25 -0
  52. package/dist/models/create-commission-response-class.js +15 -0
  53. package/dist/models/get-commission-agreement-response-class.d.ts +25 -0
  54. package/dist/models/get-commission-agreement-response-class.js +15 -0
  55. package/dist/models/get-commission-agreement-version-response-class.d.ts +25 -0
  56. package/dist/models/get-commission-agreement-version-response-class.js +15 -0
  57. package/dist/models/get-commission-response-class.d.ts +25 -0
  58. package/dist/models/get-commission-response-class.js +15 -0
  59. package/dist/models/index.d.ts +23 -0
  60. package/dist/models/index.js +39 -0
  61. package/dist/models/inline-response200.d.ts +54 -0
  62. package/dist/models/inline-response200.js +15 -0
  63. package/dist/models/inline-response503.d.ts +54 -0
  64. package/dist/models/inline-response503.js +15 -0
  65. package/dist/models/list-commission-agreement-versions-response-class.d.ts +43 -0
  66. package/dist/models/list-commission-agreement-versions-response-class.js +15 -0
  67. package/dist/models/list-commission-agreements-response-class.d.ts +43 -0
  68. package/dist/models/list-commission-agreements-response-class.js +15 -0
  69. package/dist/models/list-commissions-response-class.d.ts +43 -0
  70. package/dist/models/list-commissions-response-class.js +15 -0
  71. package/dist/models/update-commission-agreement-request-dto.d.ts +48 -0
  72. package/dist/models/update-commission-agreement-request-dto.js +21 -0
  73. package/dist/models/update-commission-agreement-response-class.d.ts +25 -0
  74. package/dist/models/update-commission-agreement-response-class.js +15 -0
  75. package/dist/models/update-commission-request-dto.d.ts +53 -0
  76. package/dist/models/update-commission-request-dto.js +20 -0
  77. package/dist/models/update-commission-response-class.d.ts +25 -0
  78. package/dist/models/update-commission-response-class.js +15 -0
  79. package/git_push.sh +57 -0
  80. package/index.ts +19 -0
  81. package/models/commission-agreement-class.ts +99 -0
  82. package/models/commission-agreement-version-class.ts +85 -0
  83. package/models/commission-class.ts +109 -0
  84. package/models/commission-item-class.ts +93 -0
  85. package/models/create-commission-agreement-request-dto.ts +81 -0
  86. package/models/create-commission-agreement-response-class.ts +31 -0
  87. package/models/create-commission-agreement-version-request-dto.ts +48 -0
  88. package/models/create-commission-agreement-version-response-class.ts +31 -0
  89. package/models/create-commission-item-request-dto.ts +57 -0
  90. package/models/create-commission-request-dto.ts +61 -0
  91. package/models/create-commission-response-class.ts +31 -0
  92. package/models/get-commission-agreement-response-class.ts +31 -0
  93. package/models/get-commission-agreement-version-response-class.ts +31 -0
  94. package/models/get-commission-response-class.ts +31 -0
  95. package/models/index.ts +23 -0
  96. package/models/inline-response200.ts +48 -0
  97. package/models/inline-response503.ts +48 -0
  98. package/models/list-commission-agreement-versions-response-class.ts +49 -0
  99. package/models/list-commission-agreements-response-class.ts +49 -0
  100. package/models/list-commissions-response-class.ts +49 -0
  101. package/models/update-commission-agreement-request-dto.ts +57 -0
  102. package/models/update-commission-agreement-response-class.ts +31 -0
  103. package/models/update-commission-request-dto.ts +62 -0
  104. package/models/update-commission-response-class.ts +31 -0
  105. package/package.json +29 -0
  106. package/tsconfig.json +23 -0
@@ -0,0 +1,641 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CommissionService
5
+ * The EMIL CommissionService 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 { CreateCommissionRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateCommissionResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetCommissionResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListCommissionsResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateCommissionRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateCommissionResponseClass } from '../models';
35
+ // URLSearchParams not necessarily used
36
+ // @ts-ignore
37
+ import { URL, URLSearchParams } from 'url';
38
+ const FormData = require('form-data');
39
+ /**
40
+ * CommissionsApi - axios parameter creator
41
+ * @export
42
+ */
43
+ export const CommissionsApiAxiosParamCreator = function (configuration?: Configuration) {
44
+ return {
45
+ /**
46
+ * This will create commission.
47
+ * @summary Create the commission
48
+ * @param {CreateCommissionRequestDto} createCommissionRequestDto
49
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ createCommission: async (createCommissionRequestDto: CreateCommissionRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ // verify required parameter 'createCommissionRequestDto' is not null or undefined
55
+ assertParamExists('createCommission', 'createCommissionRequestDto', createCommissionRequestDto)
56
+ const localVarPath = `/commissionservice/v1/commissions`;
57
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
59
+ let baseOptions;
60
+ let baseAccessToken;
61
+ if (configuration) {
62
+ baseOptions = configuration.baseOptions;
63
+ baseAccessToken = configuration.accessToken;
64
+ }
65
+
66
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
67
+ const localVarHeaderParameter = {} as any;
68
+ const localVarQueryParameter = {} as any;
69
+
70
+ // authentication bearer required
71
+ // http bearer authentication required
72
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
73
+
74
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
75
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ }
77
+
78
+
79
+
80
+ localVarHeaderParameter['Content-Type'] = 'application/json';
81
+
82
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
83
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
84
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
85
+ localVarRequestOptions.data = serializeDataIfNeeded(createCommissionRequestDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * This will delete commission.
94
+ * @summary Delete the commission
95
+ * @param {string} code Unique identifier for the object.
96
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ deleteCommission: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'code' is not null or undefined
102
+ assertParamExists('deleteCommission', 'code', code)
103
+ const localVarPath = `/commissionservice/v1/commissions/{code}`
104
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
105
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
107
+ let baseOptions;
108
+ let baseAccessToken;
109
+ if (configuration) {
110
+ baseOptions = configuration.baseOptions;
111
+ baseAccessToken = configuration.accessToken;
112
+ }
113
+
114
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
115
+ const localVarHeaderParameter = {} as any;
116
+ const localVarQueryParameter = {} as any;
117
+
118
+ // authentication bearer required
119
+ // http bearer authentication required
120
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
+
122
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
123
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
124
+ }
125
+
126
+
127
+
128
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
129
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
130
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
131
+
132
+ return {
133
+ url: toPathString(localVarUrlObj),
134
+ options: localVarRequestOptions,
135
+ };
136
+ },
137
+ /**
138
+ * This will get commission.
139
+ * @summary Retrieve the commission
140
+ * @param {string} code Unique identifier for the object.
141
+ * @param {string} expand
142
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getCommission: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
147
+ // verify required parameter 'code' is not null or undefined
148
+ assertParamExists('getCommission', 'code', code)
149
+ // verify required parameter 'expand' is not null or undefined
150
+ assertParamExists('getCommission', 'expand', expand)
151
+ const localVarPath = `/commissionservice/v1/commissions/{code}`
152
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
153
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
155
+ let baseOptions;
156
+ let baseAccessToken;
157
+ if (configuration) {
158
+ baseOptions = configuration.baseOptions;
159
+ baseAccessToken = configuration.accessToken;
160
+ }
161
+
162
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
163
+ const localVarHeaderParameter = {} as any;
164
+ const localVarQueryParameter = {} as any;
165
+
166
+ // authentication bearer required
167
+ // http bearer authentication required
168
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
169
+
170
+ if (expand !== undefined) {
171
+ localVarQueryParameter['expand'] = expand;
172
+ }
173
+
174
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
175
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
176
+ }
177
+
178
+
179
+
180
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
181
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
182
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
183
+
184
+ return {
185
+ url: toPathString(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ };
188
+ },
189
+ /**
190
+ * Retrieves a list of commissions.
191
+ * @summary List commissions
192
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
193
+ * @param {'createdAt'} [order]
194
+ * @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter]
195
+ * @param {'items'} [expand]
196
+ * @param {*} [options] Override http request option.
197
+ * @throws {RequiredError}
198
+ */
199
+ listCommissions: async (authorization?: string, order?: 'createdAt', filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt', expand?: 'items', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
200
+ const localVarPath = `/commissionservice/v1/commissions`;
201
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
202
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
203
+ let baseOptions;
204
+ let baseAccessToken;
205
+ if (configuration) {
206
+ baseOptions = configuration.baseOptions;
207
+ baseAccessToken = configuration.accessToken;
208
+ }
209
+
210
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
211
+ const localVarHeaderParameter = {} as any;
212
+ const localVarQueryParameter = {} as any;
213
+
214
+ // authentication bearer required
215
+ // http bearer authentication required
216
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
217
+
218
+ if (order !== undefined) {
219
+ localVarQueryParameter['order'] = order;
220
+ }
221
+
222
+ if (filter !== undefined) {
223
+ localVarQueryParameter['filter'] = filter;
224
+ }
225
+
226
+ if (expand !== undefined) {
227
+ localVarQueryParameter['expand'] = expand;
228
+ }
229
+
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ }
233
+
234
+
235
+
236
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
237
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
238
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
239
+
240
+ return {
241
+ url: toPathString(localVarUrlObj),
242
+ options: localVarRequestOptions,
243
+ };
244
+ },
245
+ /**
246
+ * This will update commission.
247
+ * @summary Update the commission
248
+ * @param {string} code
249
+ * @param {UpdateCommissionRequestDto} updateCommissionRequestDto
250
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ updateCommission: async (code: string, updateCommissionRequestDto: UpdateCommissionRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
255
+ // verify required parameter 'code' is not null or undefined
256
+ assertParamExists('updateCommission', 'code', code)
257
+ // verify required parameter 'updateCommissionRequestDto' is not null or undefined
258
+ assertParamExists('updateCommission', 'updateCommissionRequestDto', updateCommissionRequestDto)
259
+ const localVarPath = `/commissionservice/v1/commissions/{code}`
260
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
261
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
262
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
263
+ let baseOptions;
264
+ let baseAccessToken;
265
+ if (configuration) {
266
+ baseOptions = configuration.baseOptions;
267
+ baseAccessToken = configuration.accessToken;
268
+ }
269
+
270
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
271
+ const localVarHeaderParameter = {} as any;
272
+ const localVarQueryParameter = {} as any;
273
+
274
+ // authentication bearer required
275
+ // http bearer authentication required
276
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
277
+
278
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
279
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
280
+ }
281
+
282
+
283
+
284
+ localVarHeaderParameter['Content-Type'] = 'application/json';
285
+
286
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
287
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
288
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
289
+ localVarRequestOptions.data = serializeDataIfNeeded(updateCommissionRequestDto, localVarRequestOptions, configuration)
290
+
291
+ return {
292
+ url: toPathString(localVarUrlObj),
293
+ options: localVarRequestOptions,
294
+ };
295
+ },
296
+ }
297
+ };
298
+
299
+ /**
300
+ * CommissionsApi - functional programming interface
301
+ * @export
302
+ */
303
+ export const CommissionsApiFp = function(configuration?: Configuration) {
304
+ const localVarAxiosParamCreator = CommissionsApiAxiosParamCreator(configuration)
305
+ return {
306
+ /**
307
+ * This will create commission.
308
+ * @summary Create the commission
309
+ * @param {CreateCommissionRequestDto} createCommissionRequestDto
310
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ */
314
+ async createCommission(createCommissionRequestDto: CreateCommissionRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCommissionResponseClass>> {
315
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCommission(createCommissionRequestDto, authorization, options);
316
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
317
+ },
318
+ /**
319
+ * This will delete commission.
320
+ * @summary Delete the commission
321
+ * @param {string} code Unique identifier for the object.
322
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ async deleteCommission(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
327
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCommission(code, authorization, options);
328
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
329
+ },
330
+ /**
331
+ * This will get commission.
332
+ * @summary Retrieve the commission
333
+ * @param {string} code Unique identifier for the object.
334
+ * @param {string} expand
335
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
336
+ * @param {*} [options] Override http request option.
337
+ * @throws {RequiredError}
338
+ */
339
+ async getCommission(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCommissionResponseClass>> {
340
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCommission(code, expand, authorization, options);
341
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
342
+ },
343
+ /**
344
+ * Retrieves a list of commissions.
345
+ * @summary List commissions
346
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
347
+ * @param {'createdAt'} [order]
348
+ * @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter]
349
+ * @param {'items'} [expand]
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ async listCommissions(authorization?: string, order?: 'createdAt', filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt', expand?: 'items', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCommissionsResponseClass>> {
354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCommissions(authorization, order, filter, expand, options);
355
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
356
+ },
357
+ /**
358
+ * This will update commission.
359
+ * @summary Update the commission
360
+ * @param {string} code
361
+ * @param {UpdateCommissionRequestDto} updateCommissionRequestDto
362
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ async updateCommission(code: string, updateCommissionRequestDto: UpdateCommissionRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCommissionResponseClass>> {
367
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateCommission(code, updateCommissionRequestDto, authorization, options);
368
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
369
+ },
370
+ }
371
+ };
372
+
373
+ /**
374
+ * CommissionsApi - factory interface
375
+ * @export
376
+ */
377
+ export const CommissionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
378
+ const localVarFp = CommissionsApiFp(configuration)
379
+ return {
380
+ /**
381
+ * This will create commission.
382
+ * @summary Create the commission
383
+ * @param {CreateCommissionRequestDto} createCommissionRequestDto
384
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ createCommission(createCommissionRequestDto: CreateCommissionRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCommissionResponseClass> {
389
+ return localVarFp.createCommission(createCommissionRequestDto, authorization, options).then((request) => request(axios, basePath));
390
+ },
391
+ /**
392
+ * This will delete commission.
393
+ * @summary Delete the commission
394
+ * @param {string} code Unique identifier for the object.
395
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ deleteCommission(code: string, authorization?: string, options?: any): AxiosPromise<void> {
400
+ return localVarFp.deleteCommission(code, authorization, options).then((request) => request(axios, basePath));
401
+ },
402
+ /**
403
+ * This will get commission.
404
+ * @summary Retrieve the commission
405
+ * @param {string} code Unique identifier for the object.
406
+ * @param {string} expand
407
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ */
411
+ getCommission(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetCommissionResponseClass> {
412
+ return localVarFp.getCommission(code, expand, authorization, options).then((request) => request(axios, basePath));
413
+ },
414
+ /**
415
+ * Retrieves a list of commissions.
416
+ * @summary List commissions
417
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
418
+ * @param {'createdAt'} [order]
419
+ * @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter]
420
+ * @param {'items'} [expand]
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ listCommissions(authorization?: string, order?: 'createdAt', filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt', expand?: 'items', options?: any): AxiosPromise<ListCommissionsResponseClass> {
425
+ return localVarFp.listCommissions(authorization, order, filter, expand, options).then((request) => request(axios, basePath));
426
+ },
427
+ /**
428
+ * This will update commission.
429
+ * @summary Update the commission
430
+ * @param {string} code
431
+ * @param {UpdateCommissionRequestDto} updateCommissionRequestDto
432
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
433
+ * @param {*} [options] Override http request option.
434
+ * @throws {RequiredError}
435
+ */
436
+ updateCommission(code: string, updateCommissionRequestDto: UpdateCommissionRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateCommissionResponseClass> {
437
+ return localVarFp.updateCommission(code, updateCommissionRequestDto, authorization, options).then((request) => request(axios, basePath));
438
+ },
439
+ };
440
+ };
441
+
442
+ /**
443
+ * Request parameters for createCommission operation in CommissionsApi.
444
+ * @export
445
+ * @interface CommissionsApiCreateCommissionRequest
446
+ */
447
+ export interface CommissionsApiCreateCommissionRequest {
448
+ /**
449
+ *
450
+ * @type {CreateCommissionRequestDto}
451
+ * @memberof CommissionsApiCreateCommission
452
+ */
453
+ readonly createCommissionRequestDto: CreateCommissionRequestDto
454
+
455
+ /**
456
+ * Bearer Token: provided by the login endpoint under the name accessToken.
457
+ * @type {string}
458
+ * @memberof CommissionsApiCreateCommission
459
+ */
460
+ readonly authorization?: string
461
+ }
462
+
463
+ /**
464
+ * Request parameters for deleteCommission operation in CommissionsApi.
465
+ * @export
466
+ * @interface CommissionsApiDeleteCommissionRequest
467
+ */
468
+ export interface CommissionsApiDeleteCommissionRequest {
469
+ /**
470
+ * Unique identifier for the object.
471
+ * @type {string}
472
+ * @memberof CommissionsApiDeleteCommission
473
+ */
474
+ readonly code: string
475
+
476
+ /**
477
+ * Bearer Token: provided by the login endpoint under the name accessToken.
478
+ * @type {string}
479
+ * @memberof CommissionsApiDeleteCommission
480
+ */
481
+ readonly authorization?: string
482
+ }
483
+
484
+ /**
485
+ * Request parameters for getCommission operation in CommissionsApi.
486
+ * @export
487
+ * @interface CommissionsApiGetCommissionRequest
488
+ */
489
+ export interface CommissionsApiGetCommissionRequest {
490
+ /**
491
+ * Unique identifier for the object.
492
+ * @type {string}
493
+ * @memberof CommissionsApiGetCommission
494
+ */
495
+ readonly code: string
496
+
497
+ /**
498
+ *
499
+ * @type {string}
500
+ * @memberof CommissionsApiGetCommission
501
+ */
502
+ readonly expand: string
503
+
504
+ /**
505
+ * Bearer Token: provided by the login endpoint under the name accessToken.
506
+ * @type {string}
507
+ * @memberof CommissionsApiGetCommission
508
+ */
509
+ readonly authorization?: string
510
+ }
511
+
512
+ /**
513
+ * Request parameters for listCommissions operation in CommissionsApi.
514
+ * @export
515
+ * @interface CommissionsApiListCommissionsRequest
516
+ */
517
+ export interface CommissionsApiListCommissionsRequest {
518
+ /**
519
+ * Bearer Token: provided by the login endpoint under the name accessToken.
520
+ * @type {string}
521
+ * @memberof CommissionsApiListCommissions
522
+ */
523
+ readonly authorization?: string
524
+
525
+ /**
526
+ *
527
+ * @type {'createdAt'}
528
+ * @memberof CommissionsApiListCommissions
529
+ */
530
+ readonly order?: 'createdAt'
531
+
532
+ /**
533
+ *
534
+ * @type {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'}
535
+ * @memberof CommissionsApiListCommissions
536
+ */
537
+ readonly filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'
538
+
539
+ /**
540
+ *
541
+ * @type {'items'}
542
+ * @memberof CommissionsApiListCommissions
543
+ */
544
+ readonly expand?: 'items'
545
+ }
546
+
547
+ /**
548
+ * Request parameters for updateCommission operation in CommissionsApi.
549
+ * @export
550
+ * @interface CommissionsApiUpdateCommissionRequest
551
+ */
552
+ export interface CommissionsApiUpdateCommissionRequest {
553
+ /**
554
+ *
555
+ * @type {string}
556
+ * @memberof CommissionsApiUpdateCommission
557
+ */
558
+ readonly code: string
559
+
560
+ /**
561
+ *
562
+ * @type {UpdateCommissionRequestDto}
563
+ * @memberof CommissionsApiUpdateCommission
564
+ */
565
+ readonly updateCommissionRequestDto: UpdateCommissionRequestDto
566
+
567
+ /**
568
+ * Bearer Token: provided by the login endpoint under the name accessToken.
569
+ * @type {string}
570
+ * @memberof CommissionsApiUpdateCommission
571
+ */
572
+ readonly authorization?: string
573
+ }
574
+
575
+ /**
576
+ * CommissionsApi - object-oriented interface
577
+ * @export
578
+ * @class CommissionsApi
579
+ * @extends {BaseAPI}
580
+ */
581
+ export class CommissionsApi extends BaseAPI {
582
+ /**
583
+ * This will create commission.
584
+ * @summary Create the commission
585
+ * @param {CommissionsApiCreateCommissionRequest} requestParameters Request parameters.
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ * @memberof CommissionsApi
589
+ */
590
+ public createCommission(requestParameters: CommissionsApiCreateCommissionRequest, options?: AxiosRequestConfig) {
591
+ return CommissionsApiFp(this.configuration).createCommission(requestParameters.createCommissionRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
592
+ }
593
+
594
+ /**
595
+ * This will delete commission.
596
+ * @summary Delete the commission
597
+ * @param {CommissionsApiDeleteCommissionRequest} requestParameters Request parameters.
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ * @memberof CommissionsApi
601
+ */
602
+ public deleteCommission(requestParameters: CommissionsApiDeleteCommissionRequest, options?: AxiosRequestConfig) {
603
+ return CommissionsApiFp(this.configuration).deleteCommission(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
604
+ }
605
+
606
+ /**
607
+ * This will get commission.
608
+ * @summary Retrieve the commission
609
+ * @param {CommissionsApiGetCommissionRequest} requestParameters Request parameters.
610
+ * @param {*} [options] Override http request option.
611
+ * @throws {RequiredError}
612
+ * @memberof CommissionsApi
613
+ */
614
+ public getCommission(requestParameters: CommissionsApiGetCommissionRequest, options?: AxiosRequestConfig) {
615
+ return CommissionsApiFp(this.configuration).getCommission(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
616
+ }
617
+
618
+ /**
619
+ * Retrieves a list of commissions.
620
+ * @summary List commissions
621
+ * @param {CommissionsApiListCommissionsRequest} requestParameters Request parameters.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ * @memberof CommissionsApi
625
+ */
626
+ public listCommissions(requestParameters: CommissionsApiListCommissionsRequest = {}, options?: AxiosRequestConfig) {
627
+ return CommissionsApiFp(this.configuration).listCommissions(requestParameters.authorization, requestParameters.order, requestParameters.filter, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
628
+ }
629
+
630
+ /**
631
+ * This will update commission.
632
+ * @summary Update the commission
633
+ * @param {CommissionsApiUpdateCommissionRequest} requestParameters Request parameters.
634
+ * @param {*} [options] Override http request option.
635
+ * @throws {RequiredError}
636
+ * @memberof CommissionsApi
637
+ */
638
+ public updateCommission(requestParameters: CommissionsApiUpdateCommissionRequest, options?: AxiosRequestConfig) {
639
+ return CommissionsApiFp(this.configuration).updateCommission(requestParameters.code, requestParameters.updateCommissionRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
640
+ }
641
+ }