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