@emilgroup/commission-sdk 1.0.0-beta.9 → 1.0.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 (156) hide show
  1. package/README.md +1 -51
  2. package/index.js +99 -0
  3. package/package.json +8 -21
  4. package/scripts/deploy.js +81 -0
  5. package/.openapi-generator/FILES +0 -56
  6. package/.openapi-generator/VERSION +0 -1
  7. package/.openapi-generator-ignore +0 -23
  8. package/api/commission-agreement-products-api.ts +0 -651
  9. package/api/commission-agreement-versions-api.ts +0 -573
  10. package/api/commission-agreements-api.ts +0 -680
  11. package/api/commission-recipients-api.ts +0 -693
  12. package/api/commissions-api.ts +0 -693
  13. package/api/default-api.ts +0 -124
  14. package/api.ts +0 -37
  15. package/base.ts +0 -331
  16. package/common.ts +0 -198
  17. package/configuration.ts +0 -110
  18. package/dist/api/commission-agreement-products-api.d.ts +0 -366
  19. package/dist/api/commission-agreement-products-api.js +0 -626
  20. package/dist/api/commission-agreement-versions-api.d.ts +0 -327
  21. package/dist/api/commission-agreement-versions-api.js +0 -545
  22. package/dist/api/commission-agreements-api.d.ts +0 -384
  23. package/dist/api/commission-agreements-api.js +0 -638
  24. package/dist/api/commission-recipients-api.d.ts +0 -393
  25. package/dist/api/commission-recipients-api.js +0 -644
  26. package/dist/api/commissions-api.d.ts +0 -393
  27. package/dist/api/commissions-api.js +0 -644
  28. package/dist/api/default-api.d.ts +0 -70
  29. package/dist/api/default-api.js +0 -200
  30. package/dist/api.d.ts +0 -17
  31. package/dist/api.js +0 -35
  32. package/dist/base.d.ts +0 -86
  33. package/dist/base.js +0 -367
  34. package/dist/common.d.ts +0 -91
  35. package/dist/common.js +0 -276
  36. package/dist/configuration.d.ts +0 -89
  37. package/dist/configuration.js +0 -52
  38. package/dist/index.d.ts +0 -15
  39. package/dist/index.js +0 -36
  40. package/dist/models/commission-agreement-class.d.ts +0 -89
  41. package/dist/models/commission-agreement-class.js +0 -25
  42. package/dist/models/commission-agreement-product-class.d.ts +0 -78
  43. package/dist/models/commission-agreement-product-class.js +0 -20
  44. package/dist/models/commission-agreement-version-class.d.ts +0 -79
  45. package/dist/models/commission-agreement-version-class.js +0 -15
  46. package/dist/models/commission-class.d.ts +0 -103
  47. package/dist/models/commission-class.js +0 -15
  48. package/dist/models/commission-item-class.d.ts +0 -84
  49. package/dist/models/commission-item-class.js +0 -21
  50. package/dist/models/commission-recipient-class.d.ts +0 -90
  51. package/dist/models/commission-recipient-class.js +0 -20
  52. package/dist/models/create-commission-agreement-product-request-dto.d.ts +0 -30
  53. package/dist/models/create-commission-agreement-product-request-dto.js +0 -15
  54. package/dist/models/create-commission-agreement-product-response-class.d.ts +0 -25
  55. package/dist/models/create-commission-agreement-product-response-class.js +0 -15
  56. package/dist/models/create-commission-agreement-request-dto.d.ts +0 -71
  57. package/dist/models/create-commission-agreement-request-dto.js +0 -25
  58. package/dist/models/create-commission-agreement-response-class.d.ts +0 -25
  59. package/dist/models/create-commission-agreement-response-class.js +0 -15
  60. package/dist/models/create-commission-agreement-version-request-dto.d.ts +0 -42
  61. package/dist/models/create-commission-agreement-version-request-dto.js +0 -15
  62. package/dist/models/create-commission-agreement-version-response-class.d.ts +0 -25
  63. package/dist/models/create-commission-agreement-version-response-class.js +0 -15
  64. package/dist/models/create-commission-item-request-dto.d.ts +0 -48
  65. package/dist/models/create-commission-item-request-dto.js +0 -21
  66. package/dist/models/create-commission-recipient-request-dto.d.ts +0 -36
  67. package/dist/models/create-commission-recipient-request-dto.js +0 -15
  68. package/dist/models/create-commission-recipient-response-class.d.ts +0 -25
  69. package/dist/models/create-commission-recipient-response-class.js +0 -15
  70. package/dist/models/create-commission-request-dto.d.ts +0 -55
  71. package/dist/models/create-commission-request-dto.js +0 -15
  72. package/dist/models/create-commission-response-class.d.ts +0 -25
  73. package/dist/models/create-commission-response-class.js +0 -15
  74. package/dist/models/get-commission-agreement-product-response-class.d.ts +0 -25
  75. package/dist/models/get-commission-agreement-product-response-class.js +0 -15
  76. package/dist/models/get-commission-agreement-response-class.d.ts +0 -25
  77. package/dist/models/get-commission-agreement-response-class.js +0 -15
  78. package/dist/models/get-commission-agreement-version-response-class.d.ts +0 -25
  79. package/dist/models/get-commission-agreement-version-response-class.js +0 -15
  80. package/dist/models/get-commission-recipient-response-class.d.ts +0 -25
  81. package/dist/models/get-commission-recipient-response-class.js +0 -15
  82. package/dist/models/get-commission-response-class.d.ts +0 -25
  83. package/dist/models/get-commission-response-class.js +0 -15
  84. package/dist/models/index.d.ts +0 -37
  85. package/dist/models/index.js +0 -53
  86. package/dist/models/inline-response200.d.ts +0 -54
  87. package/dist/models/inline-response200.js +0 -15
  88. package/dist/models/inline-response503.d.ts +0 -54
  89. package/dist/models/inline-response503.js +0 -15
  90. package/dist/models/list-commission-agreement-products-response-class.d.ts +0 -43
  91. package/dist/models/list-commission-agreement-products-response-class.js +0 -15
  92. package/dist/models/list-commission-agreement-versions-response-class.d.ts +0 -43
  93. package/dist/models/list-commission-agreement-versions-response-class.js +0 -15
  94. package/dist/models/list-commission-agreements-response-class.d.ts +0 -43
  95. package/dist/models/list-commission-agreements-response-class.js +0 -15
  96. package/dist/models/list-commission-recipients-response-class.d.ts +0 -43
  97. package/dist/models/list-commission-recipients-response-class.js +0 -15
  98. package/dist/models/list-commissions-response-class.d.ts +0 -43
  99. package/dist/models/list-commissions-response-class.js +0 -15
  100. package/dist/models/update-commission-agreement-product-request-dto.d.ts +0 -41
  101. package/dist/models/update-commission-agreement-product-request-dto.js +0 -20
  102. package/dist/models/update-commission-agreement-product-response-class.d.ts +0 -25
  103. package/dist/models/update-commission-agreement-product-response-class.js +0 -15
  104. package/dist/models/update-commission-agreement-request-dto.d.ts +0 -48
  105. package/dist/models/update-commission-agreement-request-dto.js +0 -21
  106. package/dist/models/update-commission-agreement-response-class.d.ts +0 -25
  107. package/dist/models/update-commission-agreement-response-class.js +0 -15
  108. package/dist/models/update-commission-recipient-request-dto.d.ts +0 -42
  109. package/dist/models/update-commission-recipient-request-dto.js +0 -15
  110. package/dist/models/update-commission-recipient-response-class.d.ts +0 -25
  111. package/dist/models/update-commission-recipient-response-class.js +0 -15
  112. package/dist/models/update-commission-request-dto.d.ts +0 -53
  113. package/dist/models/update-commission-request-dto.js +0 -20
  114. package/dist/models/update-commission-response-class.d.ts +0 -25
  115. package/dist/models/update-commission-response-class.js +0 -15
  116. package/git_push.sh +0 -57
  117. package/index.ts +0 -19
  118. package/models/commission-agreement-class.ts +0 -99
  119. package/models/commission-agreement-product-class.ts +0 -87
  120. package/models/commission-agreement-version-class.ts +0 -85
  121. package/models/commission-class.ts +0 -109
  122. package/models/commission-item-class.ts +0 -93
  123. package/models/commission-recipient-class.ts +0 -99
  124. package/models/create-commission-agreement-product-request-dto.ts +0 -36
  125. package/models/create-commission-agreement-product-response-class.ts +0 -31
  126. package/models/create-commission-agreement-request-dto.ts +0 -81
  127. package/models/create-commission-agreement-response-class.ts +0 -31
  128. package/models/create-commission-agreement-version-request-dto.ts +0 -48
  129. package/models/create-commission-agreement-version-response-class.ts +0 -31
  130. package/models/create-commission-item-request-dto.ts +0 -57
  131. package/models/create-commission-recipient-request-dto.ts +0 -42
  132. package/models/create-commission-recipient-response-class.ts +0 -31
  133. package/models/create-commission-request-dto.ts +0 -61
  134. package/models/create-commission-response-class.ts +0 -31
  135. package/models/get-commission-agreement-product-response-class.ts +0 -31
  136. package/models/get-commission-agreement-response-class.ts +0 -31
  137. package/models/get-commission-agreement-version-response-class.ts +0 -31
  138. package/models/get-commission-recipient-response-class.ts +0 -31
  139. package/models/get-commission-response-class.ts +0 -31
  140. package/models/index.ts +0 -37
  141. package/models/inline-response200.ts +0 -48
  142. package/models/inline-response503.ts +0 -48
  143. package/models/list-commission-agreement-products-response-class.ts +0 -49
  144. package/models/list-commission-agreement-versions-response-class.ts +0 -49
  145. package/models/list-commission-agreements-response-class.ts +0 -49
  146. package/models/list-commission-recipients-response-class.ts +0 -49
  147. package/models/list-commissions-response-class.ts +0 -49
  148. package/models/update-commission-agreement-product-request-dto.ts +0 -50
  149. package/models/update-commission-agreement-product-response-class.ts +0 -31
  150. package/models/update-commission-agreement-request-dto.ts +0 -57
  151. package/models/update-commission-agreement-response-class.ts +0 -31
  152. package/models/update-commission-recipient-request-dto.ts +0 -48
  153. package/models/update-commission-recipient-response-class.ts +0 -31
  154. package/models/update-commission-request-dto.ts +0 -62
  155. package/models/update-commission-response-class.ts +0 -31
  156. package/tsconfig.json +0 -23
@@ -1,693 +0,0 @@
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 {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
190
- * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
191
- * @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
192
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
193
- * @param {'createdAt'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
194
- * @param {'items'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
195
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
196
- * @param {*} [options] Override http request option.
197
- * @throws {RequiredError}
198
- */
199
- listCommissions: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt', search?: string, order?: 'createdAt', expand?: 'items', filters?: string, 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 (pageSize !== undefined) {
219
- localVarQueryParameter['pageSize'] = pageSize;
220
- }
221
-
222
- if (pageToken !== undefined) {
223
- localVarQueryParameter['pageToken'] = pageToken;
224
- }
225
-
226
- if (filter !== undefined) {
227
- localVarQueryParameter['filter'] = filter;
228
- }
229
-
230
- if (search !== undefined) {
231
- localVarQueryParameter['search'] = search;
232
- }
233
-
234
- if (order !== undefined) {
235
- localVarQueryParameter['order'] = order;
236
- }
237
-
238
- if (expand !== undefined) {
239
- localVarQueryParameter['expand'] = expand;
240
- }
241
-
242
- if (filters !== undefined) {
243
- localVarQueryParameter['filters'] = filters;
244
- }
245
-
246
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
247
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
248
- }
249
-
250
-
251
-
252
- setSearchParams(localVarUrlObj, localVarQueryParameter);
253
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
254
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
255
-
256
- return {
257
- url: toPathString(localVarUrlObj),
258
- options: localVarRequestOptions,
259
- };
260
- },
261
- /**
262
- * This will update commission.
263
- * @summary Update the commission
264
- * @param {string} code
265
- * @param {UpdateCommissionRequestDto} updateCommissionRequestDto
266
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
267
- * @param {*} [options] Override http request option.
268
- * @throws {RequiredError}
269
- */
270
- updateCommission: async (code: string, updateCommissionRequestDto: UpdateCommissionRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
271
- // verify required parameter 'code' is not null or undefined
272
- assertParamExists('updateCommission', 'code', code)
273
- // verify required parameter 'updateCommissionRequestDto' is not null or undefined
274
- assertParamExists('updateCommission', 'updateCommissionRequestDto', updateCommissionRequestDto)
275
- const localVarPath = `/commissionservice/v1/commissions/{code}`
276
- .replace(`{${"code"}}`, encodeURIComponent(String(code)));
277
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
278
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
279
- let baseOptions;
280
- let baseAccessToken;
281
- if (configuration) {
282
- baseOptions = configuration.baseOptions;
283
- baseAccessToken = configuration.accessToken;
284
- }
285
-
286
- const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
287
- const localVarHeaderParameter = {} as any;
288
- const localVarQueryParameter = {} as any;
289
-
290
- // authentication bearer required
291
- // http bearer authentication required
292
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
293
-
294
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
295
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
296
- }
297
-
298
-
299
-
300
- localVarHeaderParameter['Content-Type'] = 'application/json';
301
-
302
- setSearchParams(localVarUrlObj, localVarQueryParameter);
303
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
304
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
305
- localVarRequestOptions.data = serializeDataIfNeeded(updateCommissionRequestDto, localVarRequestOptions, configuration)
306
-
307
- return {
308
- url: toPathString(localVarUrlObj),
309
- options: localVarRequestOptions,
310
- };
311
- },
312
- }
313
- };
314
-
315
- /**
316
- * CommissionsApi - functional programming interface
317
- * @export
318
- */
319
- export const CommissionsApiFp = function(configuration?: Configuration) {
320
- const localVarAxiosParamCreator = CommissionsApiAxiosParamCreator(configuration)
321
- return {
322
- /**
323
- * This will create commission.
324
- * @summary Create the commission
325
- * @param {CreateCommissionRequestDto} createCommissionRequestDto
326
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
327
- * @param {*} [options] Override http request option.
328
- * @throws {RequiredError}
329
- */
330
- async createCommission(createCommissionRequestDto: CreateCommissionRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCommissionResponseClass>> {
331
- const localVarAxiosArgs = await localVarAxiosParamCreator.createCommission(createCommissionRequestDto, authorization, options);
332
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
333
- },
334
- /**
335
- * This will delete commission.
336
- * @summary Delete the commission
337
- * @param {string} code Unique identifier for the object.
338
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
339
- * @param {*} [options] Override http request option.
340
- * @throws {RequiredError}
341
- */
342
- async deleteCommission(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
343
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCommission(code, authorization, options);
344
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
345
- },
346
- /**
347
- * This will get commission.
348
- * @summary Retrieve the commission
349
- * @param {string} code Unique identifier for the object.
350
- * @param {string} expand
351
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
352
- * @param {*} [options] Override http request option.
353
- * @throws {RequiredError}
354
- */
355
- async getCommission(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCommissionResponseClass>> {
356
- const localVarAxiosArgs = await localVarAxiosParamCreator.getCommission(code, expand, authorization, options);
357
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
358
- },
359
- /**
360
- * Retrieves a list of commissions.
361
- * @summary List commissions
362
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
363
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
364
- * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
365
- * @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
366
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
367
- * @param {'createdAt'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
368
- * @param {'items'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
369
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
370
- * @param {*} [options] Override http request option.
371
- * @throws {RequiredError}
372
- */
373
- async listCommissions(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt', search?: string, order?: 'createdAt', expand?: 'items', filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCommissionsResponseClass>> {
374
- const localVarAxiosArgs = await localVarAxiosParamCreator.listCommissions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
375
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
376
- },
377
- /**
378
- * This will update commission.
379
- * @summary Update the commission
380
- * @param {string} code
381
- * @param {UpdateCommissionRequestDto} updateCommissionRequestDto
382
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
383
- * @param {*} [options] Override http request option.
384
- * @throws {RequiredError}
385
- */
386
- async updateCommission(code: string, updateCommissionRequestDto: UpdateCommissionRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCommissionResponseClass>> {
387
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateCommission(code, updateCommissionRequestDto, authorization, options);
388
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
389
- },
390
- }
391
- };
392
-
393
- /**
394
- * CommissionsApi - factory interface
395
- * @export
396
- */
397
- export const CommissionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
398
- const localVarFp = CommissionsApiFp(configuration)
399
- return {
400
- /**
401
- * This will create commission.
402
- * @summary Create the commission
403
- * @param {CreateCommissionRequestDto} createCommissionRequestDto
404
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
405
- * @param {*} [options] Override http request option.
406
- * @throws {RequiredError}
407
- */
408
- createCommission(createCommissionRequestDto: CreateCommissionRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCommissionResponseClass> {
409
- return localVarFp.createCommission(createCommissionRequestDto, authorization, options).then((request) => request(axios, basePath));
410
- },
411
- /**
412
- * This will delete commission.
413
- * @summary Delete the commission
414
- * @param {string} code Unique identifier for the object.
415
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
416
- * @param {*} [options] Override http request option.
417
- * @throws {RequiredError}
418
- */
419
- deleteCommission(code: string, authorization?: string, options?: any): AxiosPromise<void> {
420
- return localVarFp.deleteCommission(code, authorization, options).then((request) => request(axios, basePath));
421
- },
422
- /**
423
- * This will get commission.
424
- * @summary Retrieve the commission
425
- * @param {string} code Unique identifier for the object.
426
- * @param {string} expand
427
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
428
- * @param {*} [options] Override http request option.
429
- * @throws {RequiredError}
430
- */
431
- getCommission(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetCommissionResponseClass> {
432
- return localVarFp.getCommission(code, expand, authorization, options).then((request) => request(axios, basePath));
433
- },
434
- /**
435
- * Retrieves a list of commissions.
436
- * @summary List commissions
437
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
438
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
439
- * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
440
- * @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
441
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
442
- * @param {'createdAt'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
443
- * @param {'items'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
444
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
445
- * @param {*} [options] Override http request option.
446
- * @throws {RequiredError}
447
- */
448
- listCommissions(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt', search?: string, order?: 'createdAt', expand?: 'items', filters?: string, options?: any): AxiosPromise<ListCommissionsResponseClass> {
449
- return localVarFp.listCommissions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
450
- },
451
- /**
452
- * This will update commission.
453
- * @summary Update the commission
454
- * @param {string} code
455
- * @param {UpdateCommissionRequestDto} updateCommissionRequestDto
456
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
457
- * @param {*} [options] Override http request option.
458
- * @throws {RequiredError}
459
- */
460
- updateCommission(code: string, updateCommissionRequestDto: UpdateCommissionRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateCommissionResponseClass> {
461
- return localVarFp.updateCommission(code, updateCommissionRequestDto, authorization, options).then((request) => request(axios, basePath));
462
- },
463
- };
464
- };
465
-
466
- /**
467
- * Request parameters for createCommission operation in CommissionsApi.
468
- * @export
469
- * @interface CommissionsApiCreateCommissionRequest
470
- */
471
- export interface CommissionsApiCreateCommissionRequest {
472
- /**
473
- *
474
- * @type {CreateCommissionRequestDto}
475
- * @memberof CommissionsApiCreateCommission
476
- */
477
- readonly createCommissionRequestDto: CreateCommissionRequestDto
478
-
479
- /**
480
- * Bearer Token: provided by the login endpoint under the name accessToken.
481
- * @type {string}
482
- * @memberof CommissionsApiCreateCommission
483
- */
484
- readonly authorization?: string
485
- }
486
-
487
- /**
488
- * Request parameters for deleteCommission operation in CommissionsApi.
489
- * @export
490
- * @interface CommissionsApiDeleteCommissionRequest
491
- */
492
- export interface CommissionsApiDeleteCommissionRequest {
493
- /**
494
- * Unique identifier for the object.
495
- * @type {string}
496
- * @memberof CommissionsApiDeleteCommission
497
- */
498
- readonly code: string
499
-
500
- /**
501
- * Bearer Token: provided by the login endpoint under the name accessToken.
502
- * @type {string}
503
- * @memberof CommissionsApiDeleteCommission
504
- */
505
- readonly authorization?: string
506
- }
507
-
508
- /**
509
- * Request parameters for getCommission operation in CommissionsApi.
510
- * @export
511
- * @interface CommissionsApiGetCommissionRequest
512
- */
513
- export interface CommissionsApiGetCommissionRequest {
514
- /**
515
- * Unique identifier for the object.
516
- * @type {string}
517
- * @memberof CommissionsApiGetCommission
518
- */
519
- readonly code: string
520
-
521
- /**
522
- *
523
- * @type {string}
524
- * @memberof CommissionsApiGetCommission
525
- */
526
- readonly expand: string
527
-
528
- /**
529
- * Bearer Token: provided by the login endpoint under the name accessToken.
530
- * @type {string}
531
- * @memberof CommissionsApiGetCommission
532
- */
533
- readonly authorization?: string
534
- }
535
-
536
- /**
537
- * Request parameters for listCommissions operation in CommissionsApi.
538
- * @export
539
- * @interface CommissionsApiListCommissionsRequest
540
- */
541
- export interface CommissionsApiListCommissionsRequest {
542
- /**
543
- * Bearer Token: provided by the login endpoint under the name accessToken.
544
- * @type {string}
545
- * @memberof CommissionsApiListCommissions
546
- */
547
- readonly authorization?: string
548
-
549
- /**
550
- * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
551
- * @type {number}
552
- * @memberof CommissionsApiListCommissions
553
- */
554
- readonly pageSize?: number
555
-
556
- /**
557
- * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
558
- * @type {string}
559
- * @memberof CommissionsApiListCommissions
560
- */
561
- readonly pageToken?: string
562
-
563
- /**
564
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
565
- * @type {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'}
566
- * @memberof CommissionsApiListCommissions
567
- */
568
- readonly filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'
569
-
570
- /**
571
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
572
- * @type {string}
573
- * @memberof CommissionsApiListCommissions
574
- */
575
- readonly search?: string
576
-
577
- /**
578
- * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
579
- * @type {'createdAt'}
580
- * @memberof CommissionsApiListCommissions
581
- */
582
- readonly order?: 'createdAt'
583
-
584
- /**
585
- * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
586
- * @type {'items'}
587
- * @memberof CommissionsApiListCommissions
588
- */
589
- readonly expand?: 'items'
590
-
591
- /**
592
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
593
- * @type {string}
594
- * @memberof CommissionsApiListCommissions
595
- */
596
- readonly filters?: string
597
- }
598
-
599
- /**
600
- * Request parameters for updateCommission operation in CommissionsApi.
601
- * @export
602
- * @interface CommissionsApiUpdateCommissionRequest
603
- */
604
- export interface CommissionsApiUpdateCommissionRequest {
605
- /**
606
- *
607
- * @type {string}
608
- * @memberof CommissionsApiUpdateCommission
609
- */
610
- readonly code: string
611
-
612
- /**
613
- *
614
- * @type {UpdateCommissionRequestDto}
615
- * @memberof CommissionsApiUpdateCommission
616
- */
617
- readonly updateCommissionRequestDto: UpdateCommissionRequestDto
618
-
619
- /**
620
- * Bearer Token: provided by the login endpoint under the name accessToken.
621
- * @type {string}
622
- * @memberof CommissionsApiUpdateCommission
623
- */
624
- readonly authorization?: string
625
- }
626
-
627
- /**
628
- * CommissionsApi - object-oriented interface
629
- * @export
630
- * @class CommissionsApi
631
- * @extends {BaseAPI}
632
- */
633
- export class CommissionsApi extends BaseAPI {
634
- /**
635
- * This will create commission.
636
- * @summary Create the commission
637
- * @param {CommissionsApiCreateCommissionRequest} requestParameters Request parameters.
638
- * @param {*} [options] Override http request option.
639
- * @throws {RequiredError}
640
- * @memberof CommissionsApi
641
- */
642
- public createCommission(requestParameters: CommissionsApiCreateCommissionRequest, options?: AxiosRequestConfig) {
643
- return CommissionsApiFp(this.configuration).createCommission(requestParameters.createCommissionRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
644
- }
645
-
646
- /**
647
- * This will delete commission.
648
- * @summary Delete the commission
649
- * @param {CommissionsApiDeleteCommissionRequest} requestParameters Request parameters.
650
- * @param {*} [options] Override http request option.
651
- * @throws {RequiredError}
652
- * @memberof CommissionsApi
653
- */
654
- public deleteCommission(requestParameters: CommissionsApiDeleteCommissionRequest, options?: AxiosRequestConfig) {
655
- return CommissionsApiFp(this.configuration).deleteCommission(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
656
- }
657
-
658
- /**
659
- * This will get commission.
660
- * @summary Retrieve the commission
661
- * @param {CommissionsApiGetCommissionRequest} requestParameters Request parameters.
662
- * @param {*} [options] Override http request option.
663
- * @throws {RequiredError}
664
- * @memberof CommissionsApi
665
- */
666
- public getCommission(requestParameters: CommissionsApiGetCommissionRequest, options?: AxiosRequestConfig) {
667
- return CommissionsApiFp(this.configuration).getCommission(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
668
- }
669
-
670
- /**
671
- * Retrieves a list of commissions.
672
- * @summary List commissions
673
- * @param {CommissionsApiListCommissionsRequest} requestParameters Request parameters.
674
- * @param {*} [options] Override http request option.
675
- * @throws {RequiredError}
676
- * @memberof CommissionsApi
677
- */
678
- public listCommissions(requestParameters: CommissionsApiListCommissionsRequest = {}, options?: AxiosRequestConfig) {
679
- return CommissionsApiFp(this.configuration).listCommissions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
680
- }
681
-
682
- /**
683
- * This will update commission.
684
- * @summary Update the commission
685
- * @param {CommissionsApiUpdateCommissionRequest} requestParameters Request parameters.
686
- * @param {*} [options] Override http request option.
687
- * @throws {RequiredError}
688
- * @memberof CommissionsApi
689
- */
690
- public updateCommission(requestParameters: CommissionsApiUpdateCommissionRequest, options?: AxiosRequestConfig) {
691
- return CommissionsApiFp(this.configuration).updateCommission(requestParameters.code, requestParameters.updateCommissionRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
692
- }
693
- }