@emilgroup/commission-sdk-node 1.0.0-beta.4 → 1.0.0-beta.40
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.
- package/.openapi-generator/FILES +39 -0
- package/README.md +2 -2
- package/api/commission-agreement-products-api.ts +655 -0
- package/api/commission-agreement-rules-api.ts +762 -0
- package/api/commission-agreements-api.ts +160 -27
- package/api/commission-recipients-api.ts +92 -37
- package/api/commission-settlements-api.ts +804 -0
- package/api/commissions-api.ts +121 -18
- package/api.ts +6 -0
- package/dist/api/commission-agreement-products-api.d.ts +366 -0
- package/dist/api/commission-agreement-products-api.js +630 -0
- package/dist/api/commission-agreement-rules-api.d.ts +423 -0
- package/dist/api/commission-agreement-rules-api.js +723 -0
- package/dist/api/commission-agreements-api.d.ts +98 -23
- package/dist/api/commission-agreements-api.js +127 -22
- package/dist/api/commission-recipients-api.d.ts +63 -27
- package/dist/api/commission-recipients-api.js +53 -29
- package/dist/api/commission-settlements-api.d.ts +450 -0
- package/dist/api/commission-settlements-api.js +741 -0
- package/dist/api/commissions-api.d.ts +74 -18
- package/dist/api/commissions-api.js +101 -9
- package/dist/api.d.ts +3 -0
- package/dist/api.js +3 -0
- package/dist/models/commission-agreement-class.d.ts +27 -3
- package/dist/models/commission-agreement-class.js +5 -1
- package/dist/models/commission-agreement-metadata-dto.d.ts +25 -0
- package/dist/models/commission-agreement-metadata-dto.js +15 -0
- package/dist/models/commission-agreement-metadata-partner-dto.d.ts +30 -0
- package/dist/models/commission-agreement-metadata-partner-dto.js +15 -0
- package/dist/models/commission-agreement-product-class.d.ts +77 -0
- package/dist/models/commission-agreement-product-class.js +20 -0
- package/dist/models/commission-agreement-rule-class.d.ts +93 -0
- package/dist/models/commission-agreement-rule-class.js +21 -0
- package/dist/models/commission-agreement-rule-config-dto.d.ts +25 -0
- package/dist/models/commission-agreement-rule-config-dto.js +15 -0
- package/dist/models/commission-agreement-rule-evaluation-class.d.ts +31 -0
- package/dist/models/commission-agreement-rule-evaluation-class.js +15 -0
- package/dist/models/commission-agreement-version-class.d.ts +7 -0
- package/dist/models/commission-class.d.ts +37 -6
- package/dist/models/commission-conditions-dto.d.ts +24 -0
- package/dist/models/commission-conditions-dto.js +15 -0
- package/dist/models/commission-config-dto.d.ts +63 -0
- package/dist/models/commission-config-dto.js +34 -0
- package/dist/models/commission-estimate-class.d.ts +59 -0
- package/dist/models/commission-estimate-class.js +25 -0
- package/dist/models/commission-settlement-class.d.ts +124 -0
- package/dist/models/commission-settlement-class.js +35 -0
- package/dist/models/create-commission-agreement-product-request-dto.d.ts +30 -0
- package/dist/models/create-commission-agreement-product-request-dto.js +15 -0
- package/dist/models/create-commission-agreement-product-response-class.d.ts +25 -0
- package/dist/models/create-commission-agreement-product-response-class.js +15 -0
- package/dist/models/create-commission-agreement-request-dto.d.ts +14 -3
- package/dist/models/create-commission-agreement-request-dto.js +5 -1
- package/dist/models/create-commission-agreement-rule-request-dto.d.ts +37 -0
- package/dist/models/create-commission-agreement-rule-request-dto.js +15 -0
- package/dist/models/create-commission-agreement-rule-response-class.d.ts +25 -0
- package/dist/models/create-commission-agreement-rule-response-class.js +15 -0
- package/dist/models/create-commission-agreement-version-request-dto.d.ts +1 -1
- package/dist/models/create-commission-request-dto.d.ts +3 -9
- package/dist/models/create-commission-settlement-request-dto.d.ts +57 -0
- package/dist/models/create-commission-settlement-request-dto.js +35 -0
- package/dist/models/create-commission-settlement-response-class.d.ts +25 -0
- package/dist/models/create-commission-settlement-response-class.js +15 -0
- package/dist/models/estimate-commissions-response-class.d.ts +73 -0
- package/dist/models/estimate-commissions-response-class.js +15 -0
- package/dist/models/evaluate-commission-agreement-rule-request-dto.d.ts +31 -0
- package/dist/models/evaluate-commission-agreement-rule-request-dto.js +15 -0
- package/dist/models/evaluate-commission-agreement-rule-response-class.d.ts +25 -0
- package/dist/models/evaluate-commission-agreement-rule-response-class.js +15 -0
- package/dist/models/evaluated-commission-class.d.ts +54 -0
- package/dist/models/evaluated-commission-class.js +21 -0
- package/dist/models/get-commission-agreement-product-response-class.d.ts +25 -0
- package/dist/models/get-commission-agreement-product-response-class.js +15 -0
- package/dist/models/get-commission-agreement-rule-response-class.d.ts +25 -0
- package/dist/models/get-commission-agreement-rule-response-class.js +15 -0
- package/dist/models/get-commission-settlement-response-class.d.ts +25 -0
- package/dist/models/get-commission-settlement-response-class.js +15 -0
- package/dist/models/index.d.ts +36 -0
- package/dist/models/index.js +36 -0
- package/dist/models/list-commission-agreement-products-response-class.d.ts +43 -0
- package/dist/models/list-commission-agreement-products-response-class.js +15 -0
- package/dist/models/list-commission-agreement-rules-response-class.d.ts +43 -0
- package/dist/models/list-commission-agreement-rules-response-class.js +15 -0
- package/dist/models/list-commission-settlements-response-class.d.ts +43 -0
- package/dist/models/list-commission-settlements-response-class.js +15 -0
- package/dist/models/patch-commission-agreement-status-request-dto.d.ts +37 -0
- package/dist/models/patch-commission-agreement-status-request-dto.js +22 -0
- package/dist/models/patch-commission-agreement-status-response-class.d.ts +25 -0
- package/dist/models/patch-commission-agreement-status-response-class.js +15 -0
- package/dist/models/publish-commission-settlements-request-dto.d.ts +24 -0
- package/dist/models/publish-commission-settlements-request-dto.js +15 -0
- package/dist/models/publish-commission-settlements-response-class.d.ts +25 -0
- package/dist/models/publish-commission-settlements-response-class.js +15 -0
- package/dist/models/update-commission-agreement-product-request-dto.d.ts +41 -0
- package/dist/models/update-commission-agreement-product-request-dto.js +20 -0
- package/dist/models/update-commission-agreement-product-response-class.d.ts +25 -0
- package/dist/models/update-commission-agreement-product-response-class.js +15 -0
- package/dist/models/update-commission-agreement-request-dto.d.ts +3 -1
- package/dist/models/update-commission-agreement-request-dto.js +2 -0
- package/dist/models/update-commission-agreement-rule-request-dto.d.ts +49 -0
- package/dist/models/update-commission-agreement-rule-request-dto.js +21 -0
- package/dist/models/update-commission-agreement-rule-response-class.d.ts +25 -0
- package/dist/models/update-commission-agreement-rule-response-class.js +15 -0
- package/dist/models/update-commission-request-dto.d.ts +5 -3
- package/dist/models/update-commission-request-dto.js +4 -2
- package/dist/models/update-commission-settlement-request-dto.d.ts +43 -0
- package/dist/models/update-commission-settlement-request-dto.js +22 -0
- package/dist/models/update-commission-settlement-response-class.d.ts +25 -0
- package/dist/models/update-commission-settlement-response-class.js +15 -0
- package/models/commission-agreement-class.ts +27 -3
- package/models/commission-agreement-metadata-dto.ts +31 -0
- package/models/commission-agreement-metadata-partner-dto.ts +36 -0
- package/models/commission-agreement-product-class.ts +86 -0
- package/models/commission-agreement-rule-class.ts +102 -0
- package/models/commission-agreement-rule-config-dto.ts +31 -0
- package/models/commission-agreement-rule-evaluation-class.ts +37 -0
- package/models/commission-agreement-version-class.ts +7 -0
- package/models/commission-class.ts +37 -6
- package/models/commission-conditions-dto.ts +30 -0
- package/models/commission-config-dto.ts +73 -0
- package/models/commission-estimate-class.ts +69 -0
- package/models/commission-settlement-class.ts +134 -0
- package/models/create-commission-agreement-product-request-dto.ts +36 -0
- package/models/create-commission-agreement-product-response-class.ts +31 -0
- package/models/create-commission-agreement-request-dto.ts +14 -3
- package/models/create-commission-agreement-rule-request-dto.ts +43 -0
- package/models/create-commission-agreement-rule-response-class.ts +31 -0
- package/models/create-commission-agreement-version-request-dto.ts +1 -1
- package/models/create-commission-request-dto.ts +3 -9
- package/models/create-commission-settlement-request-dto.ts +67 -0
- package/models/create-commission-settlement-response-class.ts +31 -0
- package/models/estimate-commissions-response-class.ts +79 -0
- package/models/evaluate-commission-agreement-rule-request-dto.ts +37 -0
- package/models/evaluate-commission-agreement-rule-response-class.ts +31 -0
- package/models/evaluated-commission-class.ts +63 -0
- package/models/get-commission-agreement-product-response-class.ts +31 -0
- package/models/get-commission-agreement-rule-response-class.ts +31 -0
- package/models/get-commission-settlement-response-class.ts +31 -0
- package/models/index.ts +36 -0
- package/models/list-commission-agreement-products-response-class.ts +49 -0
- package/models/list-commission-agreement-rules-response-class.ts +49 -0
- package/models/list-commission-settlements-response-class.ts +49 -0
- package/models/patch-commission-agreement-status-request-dto.ts +46 -0
- package/models/patch-commission-agreement-status-response-class.ts +31 -0
- package/models/publish-commission-settlements-request-dto.ts +30 -0
- package/models/publish-commission-settlements-response-class.ts +31 -0
- package/models/update-commission-agreement-product-request-dto.ts +50 -0
- package/models/update-commission-agreement-product-response-class.ts +31 -0
- package/models/update-commission-agreement-request-dto.ts +3 -1
- package/models/update-commission-agreement-rule-request-dto.ts +58 -0
- package/models/update-commission-agreement-rule-response-class.ts +31 -0
- package/models/update-commission-request-dto.ts +5 -3
- package/models/update-commission-settlement-request-dto.ts +52 -0
- package/models/update-commission-settlement-response-class.ts +31 -0
- package/package.json +1 -1
package/api/commissions-api.ts
CHANGED
|
@@ -25,6 +25,8 @@ import { CreateCommissionRequestDto } from '../models';
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { CreateCommissionResponseClass } from '../models';
|
|
27
27
|
// @ts-ignore
|
|
28
|
+
import { EstimateCommissionsResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
28
30
|
import { GetCommissionResponseClass } from '../models';
|
|
29
31
|
// @ts-ignore
|
|
30
32
|
import { ListCommissionsResponseClass } from '../models';
|
|
@@ -125,6 +127,51 @@ export const CommissionsApiAxiosParamCreator = function (configuration?: Configu
|
|
|
125
127
|
|
|
126
128
|
|
|
127
129
|
|
|
130
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
131
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
132
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
url: toPathString(localVarUrlObj),
|
|
136
|
+
options: localVarRequestOptions,
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* This will estimate commissions for a given policy.
|
|
141
|
+
* @summary Retrieve the estimate commissions
|
|
142
|
+
* @param {string} policyCode Unique identifier for the object.
|
|
143
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
*/
|
|
147
|
+
estimateCommission: async (policyCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
148
|
+
// verify required parameter 'policyCode' is not null or undefined
|
|
149
|
+
assertParamExists('estimateCommission', 'policyCode', policyCode)
|
|
150
|
+
const localVarPath = `/commissionservice/v1/commissions/estimate/{policyCode}`
|
|
151
|
+
.replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
|
|
152
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
153
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
154
|
+
let baseOptions;
|
|
155
|
+
let baseAccessToken;
|
|
156
|
+
if (configuration) {
|
|
157
|
+
baseOptions = configuration.baseOptions;
|
|
158
|
+
baseAccessToken = configuration.accessToken;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
162
|
+
const localVarHeaderParameter = {} as any;
|
|
163
|
+
const localVarQueryParameter = {} as any;
|
|
164
|
+
|
|
165
|
+
// authentication bearer required
|
|
166
|
+
// http bearer authentication required
|
|
167
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
168
|
+
|
|
169
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
170
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
128
175
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
129
176
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
130
177
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -192,15 +239,15 @@ export const CommissionsApiAxiosParamCreator = function (configuration?: Configu
|
|
|
192
239
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
193
240
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
194
241
|
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
195
|
-
* @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.
|
|
242
|
+
* @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
196
243
|
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
197
|
-
* @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.
|
|
198
|
-
* @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.
|
|
244
|
+
* @param {'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency'} [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.
|
|
245
|
+
* @param {'items' | 'agreement'} [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.
|
|
199
246
|
* @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.
|
|
200
247
|
* @param {*} [options] Override http request option.
|
|
201
248
|
* @throws {RequiredError}
|
|
202
249
|
*/
|
|
203
|
-
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> => {
|
|
250
|
+
listCommissions: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode', search?: string, order?: 'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency', expand?: 'items' | 'agreement', filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
204
251
|
const localVarPath = `/commissionservice/v1/commissions`;
|
|
205
252
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
206
253
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -347,6 +394,18 @@ export const CommissionsApiFp = function(configuration?: Configuration) {
|
|
|
347
394
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCommission(code, authorization, options);
|
|
348
395
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
349
396
|
},
|
|
397
|
+
/**
|
|
398
|
+
* This will estimate commissions for a given policy.
|
|
399
|
+
* @summary Retrieve the estimate commissions
|
|
400
|
+
* @param {string} policyCode Unique identifier for the object.
|
|
401
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
402
|
+
* @param {*} [options] Override http request option.
|
|
403
|
+
* @throws {RequiredError}
|
|
404
|
+
*/
|
|
405
|
+
async estimateCommission(policyCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EstimateCommissionsResponseClass>> {
|
|
406
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.estimateCommission(policyCode, authorization, options);
|
|
407
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
408
|
+
},
|
|
350
409
|
/**
|
|
351
410
|
* This will get commission.
|
|
352
411
|
* @summary Retrieve the commission
|
|
@@ -366,15 +425,15 @@ export const CommissionsApiFp = function(configuration?: Configuration) {
|
|
|
366
425
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
367
426
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
368
427
|
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
369
|
-
* @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.
|
|
428
|
+
* @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
370
429
|
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
371
|
-
* @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.
|
|
372
|
-
* @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.
|
|
430
|
+
* @param {'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency'} [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.
|
|
431
|
+
* @param {'items' | 'agreement'} [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.
|
|
373
432
|
* @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.
|
|
374
433
|
* @param {*} [options] Override http request option.
|
|
375
434
|
* @throws {RequiredError}
|
|
376
435
|
*/
|
|
377
|
-
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>> {
|
|
436
|
+
async listCommissions(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode', search?: string, order?: 'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency', expand?: 'items' | 'agreement', filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCommissionsResponseClass>> {
|
|
378
437
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listCommissions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
379
438
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
380
439
|
},
|
|
@@ -423,6 +482,17 @@ export const CommissionsApiFactory = function (configuration?: Configuration, ba
|
|
|
423
482
|
deleteCommission(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
424
483
|
return localVarFp.deleteCommission(code, authorization, options).then((request) => request(axios, basePath));
|
|
425
484
|
},
|
|
485
|
+
/**
|
|
486
|
+
* This will estimate commissions for a given policy.
|
|
487
|
+
* @summary Retrieve the estimate commissions
|
|
488
|
+
* @param {string} policyCode Unique identifier for the object.
|
|
489
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
490
|
+
* @param {*} [options] Override http request option.
|
|
491
|
+
* @throws {RequiredError}
|
|
492
|
+
*/
|
|
493
|
+
estimateCommission(policyCode: string, authorization?: string, options?: any): AxiosPromise<EstimateCommissionsResponseClass> {
|
|
494
|
+
return localVarFp.estimateCommission(policyCode, authorization, options).then((request) => request(axios, basePath));
|
|
495
|
+
},
|
|
426
496
|
/**
|
|
427
497
|
* This will get commission.
|
|
428
498
|
* @summary Retrieve the commission
|
|
@@ -441,15 +511,15 @@ export const CommissionsApiFactory = function (configuration?: Configuration, ba
|
|
|
441
511
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
442
512
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
443
513
|
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
444
|
-
* @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.
|
|
514
|
+
* @param {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
445
515
|
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
446
|
-
* @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.
|
|
447
|
-
* @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.
|
|
516
|
+
* @param {'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency'} [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.
|
|
517
|
+
* @param {'items' | 'agreement'} [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.
|
|
448
518
|
* @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.
|
|
449
519
|
* @param {*} [options] Override http request option.
|
|
450
520
|
* @throws {RequiredError}
|
|
451
521
|
*/
|
|
452
|
-
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> {
|
|
522
|
+
listCommissions(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode', search?: string, order?: 'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency', expand?: 'items' | 'agreement', filters?: string, options?: any): AxiosPromise<ListCommissionsResponseClass> {
|
|
453
523
|
return localVarFp.listCommissions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
454
524
|
},
|
|
455
525
|
/**
|
|
@@ -509,6 +579,27 @@ export interface CommissionsApiDeleteCommissionRequest {
|
|
|
509
579
|
readonly authorization?: string
|
|
510
580
|
}
|
|
511
581
|
|
|
582
|
+
/**
|
|
583
|
+
* Request parameters for estimateCommission operation in CommissionsApi.
|
|
584
|
+
* @export
|
|
585
|
+
* @interface CommissionsApiEstimateCommissionRequest
|
|
586
|
+
*/
|
|
587
|
+
export interface CommissionsApiEstimateCommissionRequest {
|
|
588
|
+
/**
|
|
589
|
+
* Unique identifier for the object.
|
|
590
|
+
* @type {string}
|
|
591
|
+
* @memberof CommissionsApiEstimateCommission
|
|
592
|
+
*/
|
|
593
|
+
readonly policyCode: string
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
597
|
+
* @type {string}
|
|
598
|
+
* @memberof CommissionsApiEstimateCommission
|
|
599
|
+
*/
|
|
600
|
+
readonly authorization?: string
|
|
601
|
+
}
|
|
602
|
+
|
|
512
603
|
/**
|
|
513
604
|
* Request parameters for getCommission operation in CommissionsApi.
|
|
514
605
|
* @export
|
|
@@ -566,10 +657,10 @@ export interface CommissionsApiListCommissionsRequest {
|
|
|
566
657
|
|
|
567
658
|
/**
|
|
568
659
|
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
569
|
-
* @type {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'}
|
|
660
|
+
* @type {'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode'}
|
|
570
661
|
* @memberof CommissionsApiListCommissions
|
|
571
662
|
*/
|
|
572
|
-
readonly filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'
|
|
663
|
+
readonly filter?: 'id' | 'code' | 'partnerCode' | 'policyCode' | 'commissionAgreementCode' | 'commissionAgreementVersionId' | 'status' | 'amount' | 'description' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'settlementCode'
|
|
573
664
|
|
|
574
665
|
/**
|
|
575
666
|
* To search the list by any field, pass search=xxx to fetch the result.
|
|
@@ -580,17 +671,17 @@ export interface CommissionsApiListCommissionsRequest {
|
|
|
580
671
|
|
|
581
672
|
/**
|
|
582
673
|
* 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.
|
|
583
|
-
* @type {'createdAt'}
|
|
674
|
+
* @type {'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency'}
|
|
584
675
|
* @memberof CommissionsApiListCommissions
|
|
585
676
|
*/
|
|
586
|
-
readonly order?: 'createdAt'
|
|
677
|
+
readonly order?: 'agreement.commissionAgreementNumber' | 'policyNumber' | 'partnerNumber' | 'createdAt' | 'updatedAt' | 'amount' | 'status' | 'agreement.billingFrequency'
|
|
587
678
|
|
|
588
679
|
/**
|
|
589
680
|
* 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.
|
|
590
|
-
* @type {'items'}
|
|
681
|
+
* @type {'items' | 'agreement'}
|
|
591
682
|
* @memberof CommissionsApiListCommissions
|
|
592
683
|
*/
|
|
593
|
-
readonly expand?: 'items'
|
|
684
|
+
readonly expand?: 'items' | 'agreement'
|
|
594
685
|
|
|
595
686
|
/**
|
|
596
687
|
* 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.
|
|
@@ -659,6 +750,18 @@ export class CommissionsApi extends BaseAPI {
|
|
|
659
750
|
return CommissionsApiFp(this.configuration).deleteCommission(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
660
751
|
}
|
|
661
752
|
|
|
753
|
+
/**
|
|
754
|
+
* This will estimate commissions for a given policy.
|
|
755
|
+
* @summary Retrieve the estimate commissions
|
|
756
|
+
* @param {CommissionsApiEstimateCommissionRequest} requestParameters Request parameters.
|
|
757
|
+
* @param {*} [options] Override http request option.
|
|
758
|
+
* @throws {RequiredError}
|
|
759
|
+
* @memberof CommissionsApi
|
|
760
|
+
*/
|
|
761
|
+
public estimateCommission(requestParameters: CommissionsApiEstimateCommissionRequest, options?: AxiosRequestConfig) {
|
|
762
|
+
return CommissionsApiFp(this.configuration).estimateCommission(requestParameters.policyCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
763
|
+
}
|
|
764
|
+
|
|
662
765
|
/**
|
|
663
766
|
* This will get commission.
|
|
664
767
|
* @summary Retrieve the commission
|
package/api.ts
CHANGED
|
@@ -24,16 +24,22 @@ import FormData from 'form-data'
|
|
|
24
24
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
|
27
|
+
import { CommissionAgreementProductsApi } from './api';
|
|
28
|
+
import { CommissionAgreementRulesApi } from './api';
|
|
27
29
|
import { CommissionAgreementVersionsApi } from './api';
|
|
28
30
|
import { CommissionAgreementsApi } from './api';
|
|
29
31
|
import { CommissionRecipientsApi } from './api';
|
|
32
|
+
import { CommissionSettlementsApi } from './api';
|
|
30
33
|
import { CommissionsApi } from './api';
|
|
31
34
|
import { DefaultApi } from './api';
|
|
32
35
|
|
|
33
36
|
|
|
37
|
+
export * from './api/commission-agreement-products-api';
|
|
38
|
+
export * from './api/commission-agreement-rules-api';
|
|
34
39
|
export * from './api/commission-agreement-versions-api';
|
|
35
40
|
export * from './api/commission-agreements-api';
|
|
36
41
|
export * from './api/commission-recipients-api';
|
|
42
|
+
export * from './api/commission-settlements-api';
|
|
37
43
|
export * from './api/commissions-api';
|
|
38
44
|
export * from './api/default-api';
|
|
39
45
|
|