/* tslint:disable */ /* eslint-disable */ /** * EMIL CommissionService * The EMIL CommissionService API description * * The version of the OpenAPI document: 1.0 * Contact: kontakt@emil.de * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { CreateCommissionCandidateRequestDto } from '../models'; // @ts-ignore import { CreateCommissionCandidateResponseClass } from '../models'; // @ts-ignore import { GetCommissionCandidateResponseClass } from '../models'; // @ts-ignore import { ListCommissionCandidatesResponseClass } from '../models'; // @ts-ignore import { UpdateCommissionCandidateRequestDto } from '../models'; // @ts-ignore import { UpdateCommissionCandidateResponseClass } from '../models'; /** * CommissionCandidatesApi - axios parameter creator * @export */ export const CommissionCandidatesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This will create commission candidate. * @summary Create the commission candidate * @param {CreateCommissionCandidateRequestDto} createCommissionCandidateRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCommissionCandidate: async (createCommissionCandidateRequestDto: CreateCommissionCandidateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createCommissionCandidateRequestDto' is not null or undefined assertParamExists('createCommissionCandidate', 'createCommissionCandidateRequestDto', createCommissionCandidateRequestDto) const localVarPath = `/commissionservice/v1/commission-candidates`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createCommissionCandidateRequestDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will delete commission candidate. * @summary Delete the commission candidate * @param {string} code Unique identifier for the object. * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCommissionCandidate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'code' is not null or undefined assertParamExists('deleteCommissionCandidate', 'code', code) const localVarPath = `/commissionservice/v1/commission-candidates/{code}` .replace(`{${"code"}}`, encodeURIComponent(String(code))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will get commission candidate. * @summary Retrieve the commission candidate * @param {string} code * @param {string} expand * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommissionCandidate: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'code' is not null or undefined assertParamExists('getCommissionCandidate', 'code', code) // verify required parameter 'expand' is not null or undefined assertParamExists('getCommissionCandidate', 'expand', expand) const localVarPath = `/commissionservice/v1/commission-candidates/{code}` .replace(`{${"code"}}`, encodeURIComponent(String(code))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (expand !== undefined) { localVarQueryParameter['expand'] = expand; } if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves a list of commission candidates. * @summary List commission candidates * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @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. * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, policyCode, invoiceCode</i> * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt, updatedAt, policyRenewalDate</i> * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @param {*} [options] Override http request option. * @throws {RequiredError} */ listCommissionCandidates: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/commissionservice/v1/commission-candidates`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } if (pageToken !== undefined) { localVarQueryParameter['pageToken'] = pageToken; } if (filter !== undefined) { localVarQueryParameter['filter'] = filter; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (order !== undefined) { localVarQueryParameter['order'] = order; } if (expand !== undefined) { localVarQueryParameter['expand'] = expand; } if (filters !== undefined) { localVarQueryParameter['filters'] = filters; } if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will update commission candidate. * @summary Update the commission candidate * @param {string} code * @param {UpdateCommissionCandidateRequestDto} updateCommissionCandidateRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCommissionCandidate: async (code: string, updateCommissionCandidateRequestDto: UpdateCommissionCandidateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'code' is not null or undefined assertParamExists('updateCommissionCandidate', 'code', code) // verify required parameter 'updateCommissionCandidateRequestDto' is not null or undefined assertParamExists('updateCommissionCandidate', 'updateCommissionCandidateRequestDto', updateCommissionCandidateRequestDto) const localVarPath = `/commissionservice/v1/commission-candidates/{code}` .replace(`{${"code"}}`, encodeURIComponent(String(code))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateCommissionCandidateRequestDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CommissionCandidatesApi - functional programming interface * @export */ export const CommissionCandidatesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CommissionCandidatesApiAxiosParamCreator(configuration) return { /** * This will create commission candidate. * @summary Create the commission candidate * @param {CreateCommissionCandidateRequestDto} createCommissionCandidateRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createCommissionCandidate(createCommissionCandidateRequestDto: CreateCommissionCandidateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createCommissionCandidate(createCommissionCandidateRequestDto, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This will delete commission candidate. * @summary Delete the commission candidate * @param {string} code Unique identifier for the object. * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteCommissionCandidate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCommissionCandidate(code, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This will get commission candidate. * @summary Retrieve the commission candidate * @param {string} code * @param {string} expand * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCommissionCandidate(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCommissionCandidate(code, expand, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a list of commission candidates. * @summary List commission candidates * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @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. * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, policyCode, invoiceCode</i> * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt, updatedAt, policyRenewalDate</i> * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listCommissionCandidates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listCommissionCandidates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This will update commission candidate. * @summary Update the commission candidate * @param {string} code * @param {UpdateCommissionCandidateRequestDto} updateCommissionCandidateRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateCommissionCandidate(code: string, updateCommissionCandidateRequestDto: UpdateCommissionCandidateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateCommissionCandidate(code, updateCommissionCandidateRequestDto, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * CommissionCandidatesApi - factory interface * @export */ export const CommissionCandidatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CommissionCandidatesApiFp(configuration) return { /** * This will create commission candidate. * @summary Create the commission candidate * @param {CreateCommissionCandidateRequestDto} createCommissionCandidateRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCommissionCandidate(createCommissionCandidateRequestDto: CreateCommissionCandidateRequestDto, authorization?: string, options?: any): AxiosPromise { return localVarFp.createCommissionCandidate(createCommissionCandidateRequestDto, authorization, options).then((request) => request(axios, basePath)); }, /** * This will delete commission candidate. * @summary Delete the commission candidate * @param {string} code Unique identifier for the object. * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCommissionCandidate(code: string, authorization?: string, options?: any): AxiosPromise { return localVarFp.deleteCommissionCandidate(code, authorization, options).then((request) => request(axios, basePath)); }, /** * This will get commission candidate. * @summary Retrieve the commission candidate * @param {string} code * @param {string} expand * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommissionCandidate(code: string, expand: string, authorization?: string, options?: any): AxiosPromise { return localVarFp.getCommissionCandidate(code, expand, authorization, options).then((request) => request(axios, basePath)); }, /** * Retrieves a list of commission candidates. * @summary List commission candidates * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @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. * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, policyCode, invoiceCode</i> * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt, updatedAt, policyRenewalDate</i> * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @param {*} [options] Override http request option. * @throws {RequiredError} */ listCommissionCandidates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise { return localVarFp.listCommissionCandidates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath)); }, /** * This will update commission candidate. * @summary Update the commission candidate * @param {string} code * @param {UpdateCommissionCandidateRequestDto} updateCommissionCandidateRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCommissionCandidate(code: string, updateCommissionCandidateRequestDto: UpdateCommissionCandidateRequestDto, authorization?: string, options?: any): AxiosPromise { return localVarFp.updateCommissionCandidate(code, updateCommissionCandidateRequestDto, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createCommissionCandidate operation in CommissionCandidatesApi. * @export * @interface CommissionCandidatesApiCreateCommissionCandidateRequest */ export interface CommissionCandidatesApiCreateCommissionCandidateRequest { /** * * @type {CreateCommissionCandidateRequestDto} * @memberof CommissionCandidatesApiCreateCommissionCandidate */ readonly createCommissionCandidateRequestDto: CreateCommissionCandidateRequestDto /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionCandidatesApiCreateCommissionCandidate */ readonly authorization?: string } /** * Request parameters for deleteCommissionCandidate operation in CommissionCandidatesApi. * @export * @interface CommissionCandidatesApiDeleteCommissionCandidateRequest */ export interface CommissionCandidatesApiDeleteCommissionCandidateRequest { /** * Unique identifier for the object. * @type {string} * @memberof CommissionCandidatesApiDeleteCommissionCandidate */ readonly code: string /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionCandidatesApiDeleteCommissionCandidate */ readonly authorization?: string } /** * Request parameters for getCommissionCandidate operation in CommissionCandidatesApi. * @export * @interface CommissionCandidatesApiGetCommissionCandidateRequest */ export interface CommissionCandidatesApiGetCommissionCandidateRequest { /** * * @type {string} * @memberof CommissionCandidatesApiGetCommissionCandidate */ readonly code: string /** * * @type {string} * @memberof CommissionCandidatesApiGetCommissionCandidate */ readonly expand: string /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionCandidatesApiGetCommissionCandidate */ readonly authorization?: string } /** * Request parameters for listCommissionCandidates operation in CommissionCandidatesApi. * @export * @interface CommissionCandidatesApiListCommissionCandidatesRequest */ export interface CommissionCandidatesApiListCommissionCandidatesRequest { /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly authorization?: string /** * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @type {number} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly pageSize?: number /** * 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. * @type {string} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly pageToken?: string /** * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @type {string} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly filter?: string /** * Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, policyCode, invoiceCode</i> * @type {string} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly search?: string /** * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt, updatedAt, policyRenewalDate</i> * @type {string} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly order?: string /** * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> * @type {string} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly expand?: string /** * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionCode, candidateType, status, policyRenewalDate, createdAt</i> * @type {string} * @memberof CommissionCandidatesApiListCommissionCandidates */ readonly filters?: string } /** * Request parameters for updateCommissionCandidate operation in CommissionCandidatesApi. * @export * @interface CommissionCandidatesApiUpdateCommissionCandidateRequest */ export interface CommissionCandidatesApiUpdateCommissionCandidateRequest { /** * * @type {string} * @memberof CommissionCandidatesApiUpdateCommissionCandidate */ readonly code: string /** * * @type {UpdateCommissionCandidateRequestDto} * @memberof CommissionCandidatesApiUpdateCommissionCandidate */ readonly updateCommissionCandidateRequestDto: UpdateCommissionCandidateRequestDto /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionCandidatesApiUpdateCommissionCandidate */ readonly authorization?: string } /** * CommissionCandidatesApi - object-oriented interface * @export * @class CommissionCandidatesApi * @extends {BaseAPI} */ export class CommissionCandidatesApi extends BaseAPI { /** * This will create commission candidate. * @summary Create the commission candidate * @param {CommissionCandidatesApiCreateCommissionCandidateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionCandidatesApi */ public createCommissionCandidate(requestParameters: CommissionCandidatesApiCreateCommissionCandidateRequest, options?: AxiosRequestConfig) { return CommissionCandidatesApiFp(this.configuration).createCommissionCandidate(requestParameters.createCommissionCandidateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will delete commission candidate. * @summary Delete the commission candidate * @param {CommissionCandidatesApiDeleteCommissionCandidateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionCandidatesApi */ public deleteCommissionCandidate(requestParameters: CommissionCandidatesApiDeleteCommissionCandidateRequest, options?: AxiosRequestConfig) { return CommissionCandidatesApiFp(this.configuration).deleteCommissionCandidate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will get commission candidate. * @summary Retrieve the commission candidate * @param {CommissionCandidatesApiGetCommissionCandidateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionCandidatesApi */ public getCommissionCandidate(requestParameters: CommissionCandidatesApiGetCommissionCandidateRequest, options?: AxiosRequestConfig) { return CommissionCandidatesApiFp(this.configuration).getCommissionCandidate(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a list of commission candidates. * @summary List commission candidates * @param {CommissionCandidatesApiListCommissionCandidatesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionCandidatesApi */ public listCommissionCandidates(requestParameters: CommissionCandidatesApiListCommissionCandidatesRequest = {}, options?: AxiosRequestConfig) { return CommissionCandidatesApiFp(this.configuration).listCommissionCandidates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath)); } /** * This will update commission candidate. * @summary Update the commission candidate * @param {CommissionCandidatesApiUpdateCommissionCandidateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionCandidatesApi */ public updateCommissionCandidate(requestParameters: CommissionCandidatesApiUpdateCommissionCandidateRequest, options?: AxiosRequestConfig) { return CommissionCandidatesApiFp(this.configuration).updateCommissionCandidate(requestParameters.code, requestParameters.updateCommissionCandidateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } }