/* tslint:disable */ /* eslint-disable */ /** * clients * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded, } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap, } from '../base'; // @ts-ignore import type { Client } from '../models'; // @ts-ignore import type { ClientRole } from '../models'; // @ts-ignore import type { ClientSearchCriteria } from '../models'; // @ts-ignore import type { CreditArrangement } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; // @ts-ignore import type { PatchOperation } from '../models'; /** * ClientsApi - axios parameter creator */ export const ClientsApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Delete client * @param {string} clientId The ID or encoded key of the client to be deleted. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete: async ( clientId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'clientId' is not null or undefined assertParamExists('_delete', 'clientId', clientId); const localVarPath = `/clients/{clientId}`.replace( `{${'clientId'}}`, encodeURIComponent(String(clientId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create client * @param {Client} client Client to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create: async ( client: Client, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('create', 'client', client); const localVarPath = `/clients`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( client, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get clients * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {string} [firstName] The first name, personal name, given name, or forename of the client. * @param {string} [lastName] The last name, surname, or family name of the client. * @param {string} [idNumber] The ID number of the client\'s identification document. * @param {GetAllStateEnum} [state] The state of the client to search for. * @param {string} [birthDate] The birth date of the client to search for. * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: firstName, lastName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll: async ( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, firstName?: string, lastName?: string, idNumber?: string, state?: GetAllStateEnum, birthDate?: string, sortBy?: string, options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/clients`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } if (creditOfficerUsername !== undefined) { localVarQueryParameter['creditOfficerUsername'] = creditOfficerUsername; } if (branchId !== undefined) { localVarQueryParameter['branchId'] = branchId; } if (centreId !== undefined) { localVarQueryParameter['centreId'] = centreId; } if (firstName !== undefined) { localVarQueryParameter['firstName'] = firstName; } if (lastName !== undefined) { localVarQueryParameter['lastName'] = lastName; } if (idNumber !== undefined) { localVarQueryParameter['idNumber'] = idNumber; } if (state !== undefined) { localVarQueryParameter['state'] = state; } if (birthDate !== undefined) { localVarQueryParameter['birthDate'] = (birthDate as any) instanceof Date ? (birthDate as any).toISOString().substring(0, 10) : birthDate; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById: async ( clientId: string, detailsLevel?: GetByIdDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'clientId' is not null or undefined assertParamExists('getById', 'clientId', clientId); const localVarPath = `/clients/{clientId}`.replace( `{${'clientId'}}`, encodeURIComponent(String(clientId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Credit arrangements list returned. * @param {string} clientId The ID or encoded key of the client to be returned. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCreditArrangementsByClientIdOrKey: async ( clientId: string, offset?: number, limit?: number, paginationDetails?: GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum, detailsLevel?: GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'clientId' is not null or undefined assertParamExists( 'getCreditArrangementsByClientIdOrKey', 'clientId', clientId, ); const localVarPath = `/clients/{clientId}/creditarrangements`.replace( `{${'clientId'}}`, encodeURIComponent(String(clientId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get client role for client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRoleByClientId: async ( clientId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'clientId' is not null or undefined assertParamExists('getRoleByClientId', 'clientId', clientId); const localVarPath = `/clients/{clientId}/role`.replace( `{${'clientId'}}`, encodeURIComponent(String(clientId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Partially update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch: async ( clientId: string, patchOperation: Array, keepAssociationForAccounts?: boolean, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'clientId' is not null or undefined assertParamExists('patch', 'clientId', clientId); // verify required parameter 'patchOperation' is not null or undefined assertParamExists('patch', 'patchOperation', patchOperation); const localVarPath = `/clients/{clientId}`.replace( `{${'clientId'}}`, encodeURIComponent(String(clientId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (keepAssociationForAccounts !== undefined) { localVarQueryParameter['keepAssociationForAccounts'] = keepAssociationForAccounts; } localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( patchOperation, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Search clients * @param {ClientSearchCriteria} clientSearchCriteria The criteria to search clients. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ search: async ( clientSearchCriteria: ClientSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, detailsLevel?: SearchDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'clientSearchCriteria' is not null or undefined assertParamExists('search', 'clientSearchCriteria', clientSearchCriteria); const localVarPath = `/clients:search`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( clientSearchCriteria, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Client} client Client to be updated. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ update: async ( clientId: string, client: Client, keepAssociationForAccounts?: boolean, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'clientId' is not null or undefined assertParamExists('update', 'clientId', clientId); // verify required parameter 'client' is not null or undefined assertParamExists('update', 'client', client); const localVarPath = `/clients/{clientId}`.replace( `{${'clientId'}}`, encodeURIComponent(String(clientId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (keepAssociationForAccounts !== undefined) { localVarQueryParameter['keepAssociationForAccounts'] = keepAssociationForAccounts; } localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( client, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * ClientsApi - functional programming interface */ export const ClientsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ClientsApiAxiosParamCreator(configuration); return { /** * * @summary Delete client * @param {string} clientId The ID or encoded key of the client to be deleted. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async _delete( clientId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator._delete( clientId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi._delete']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create client * @param {Client} client Client to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async create( client: Client, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.create( client, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.create']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get clients * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {string} [firstName] The first name, personal name, given name, or forename of the client. * @param {string} [lastName] The last name, surname, or family name of the client. * @param {string} [idNumber] The ID number of the client\'s identification document. * @param {GetAllStateEnum} [state] The state of the client to search for. * @param {string} [birthDate] The birth date of the client to search for. * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: firstName, lastName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, firstName?: string, lastName?: string, idNumber?: string, state?: GetAllStateEnum, birthDate?: string, sortBy?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, firstName, lastName, idNumber, state, birthDate, sortBy, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.getAll']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getById( clientId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getById( clientId, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.getById']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Credit arrangements list returned. * @param {string} clientId The ID or encoded key of the client to be returned. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCreditArrangementsByClientIdOrKey( clientId: string, offset?: number, limit?: number, paginationDetails?: GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum, detailsLevel?: GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getCreditArrangementsByClientIdOrKey( clientId, offset, limit, paginationDetails, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.getCreditArrangementsByClientIdOrKey']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get client role for client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getRoleByClientId( clientId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getRoleByClientId(clientId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.getRoleByClientId']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Partially update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patch( clientId: string, patchOperation: Array, keepAssociationForAccounts?: boolean, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.patch( clientId, patchOperation, keepAssociationForAccounts, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.patch']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Search clients * @param {ClientSearchCriteria} clientSearchCriteria The criteria to search clients. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async search( clientSearchCriteria: ClientSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.search( clientSearchCriteria, offset, limit, paginationDetails, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.search']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Client} client Client to be updated. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async update( clientId: string, client: Client, keepAssociationForAccounts?: boolean, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.update( clientId, client, keepAssociationForAccounts, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClientsApi.update']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ClientsApi - factory interface */ export const ClientsApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = ClientsApiFp(configuration); return { /** * * @summary Delete client * @param {string} clientId The ID or encoded key of the client to be deleted. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete( clientId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp ._delete(clientId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Create client * @param {Client} client Client to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create( client: Client, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .create(client, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get clients * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {string} [firstName] The first name, personal name, given name, or forename of the client. * @param {string} [lastName] The last name, surname, or family name of the client. * @param {string} [idNumber] The ID number of the client\'s identification document. * @param {GetAllStateEnum} [state] The state of the client to search for. * @param {string} [birthDate] The birth date of the client to search for. * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: firstName, lastName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, firstName?: string, lastName?: string, idNumber?: string, state?: GetAllStateEnum, birthDate?: string, sortBy?: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, firstName, lastName, idNumber, state, birthDate, sortBy, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById( clientId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getById(clientId, detailsLevel, options) .then((request) => request(axios, basePath)); }, /** * * @summary Credit arrangements list returned. * @param {string} clientId The ID or encoded key of the client to be returned. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCreditArrangementsByClientIdOrKey( clientId: string, offset?: number, limit?: number, paginationDetails?: GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum, detailsLevel?: GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getCreditArrangementsByClientIdOrKey( clientId, offset, limit, paginationDetails, detailsLevel, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get client role for client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRoleByClientId( clientId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getRoleByClientId(clientId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Partially update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch( clientId: string, patchOperation: Array, keepAssociationForAccounts?: boolean, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .patch(clientId, patchOperation, keepAssociationForAccounts, options) .then((request) => request(axios, basePath)); }, /** * * @summary Search clients * @param {ClientSearchCriteria} clientSearchCriteria The criteria to search clients. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ search( clientSearchCriteria: ClientSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .search( clientSearchCriteria, offset, limit, paginationDetails, detailsLevel, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Client} client Client to be updated. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ update( clientId: string, client: Client, keepAssociationForAccounts?: boolean, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .update(clientId, client, keepAssociationForAccounts, options) .then((request) => request(axios, basePath)); }, }; }; /** * ClientsApi - object-oriented interface */ export class ClientsApi extends BaseAPI { /** * * @summary Delete client * @param {string} clientId The ID or encoded key of the client to be deleted. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public _delete(clientId: string, options?: RawAxiosRequestConfig) { return ClientsApiFp(this.configuration) ._delete(clientId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create client * @param {Client} client Client to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public create( client: Client, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return ClientsApiFp(this.configuration) .create(client, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get clients * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {string} [firstName] The first name, personal name, given name, or forename of the client. * @param {string} [lastName] The last name, surname, or family name of the client. * @param {string} [idNumber] The ID number of the client\'s identification document. * @param {GetAllStateEnum} [state] The state of the client to search for. * @param {string} [birthDate] The birth date of the client to search for. * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: firstName, lastName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, firstName?: string, lastName?: string, idNumber?: string, state?: GetAllStateEnum, birthDate?: string, sortBy?: string, options?: RawAxiosRequestConfig, ) { return ClientsApiFp(this.configuration) .getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, firstName, lastName, idNumber, state, birthDate, sortBy, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getById( clientId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return ClientsApiFp(this.configuration) .getById(clientId, detailsLevel, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Credit arrangements list returned. * @param {string} clientId The ID or encoded key of the client to be returned. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getCreditArrangementsByClientIdOrKey( clientId: string, offset?: number, limit?: number, paginationDetails?: GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum, detailsLevel?: GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return ClientsApiFp(this.configuration) .getCreditArrangementsByClientIdOrKey( clientId, offset, limit, paginationDetails, detailsLevel, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get client role for client * @param {string} clientId The ID or encoded key of the client to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getRoleByClientId(clientId: string, options?: RawAxiosRequestConfig) { return ClientsApiFp(this.configuration) .getRoleByClientId(clientId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Partially update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public patch( clientId: string, patchOperation: Array, keepAssociationForAccounts?: boolean, options?: RawAxiosRequestConfig, ) { return ClientsApiFp(this.configuration) .patch(clientId, patchOperation, keepAssociationForAccounts, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Search clients * @param {ClientSearchCriteria} clientSearchCriteria The criteria to search clients. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public search( clientSearchCriteria: ClientSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return ClientsApiFp(this.configuration) .search( clientSearchCriteria, offset, limit, paginationDetails, detailsLevel, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Update client * @param {string} clientId The ID or encoded key of the client to be updated. * @param {Client} client Client to be updated. * @param {boolean} [keepAssociationForAccounts] The flag to allow associated accounts to maintain their branch, if client\'s changes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public update( clientId: string, client: Client, keepAssociationForAccounts?: boolean, options?: RawAxiosRequestConfig, ) { return ClientsApiFp(this.configuration) .update(clientId, client, keepAssociationForAccounts, options) .then((request) => request(this.axios, this.basePath)); } } export const GetAllPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetAllPaginationDetailsEnum = (typeof GetAllPaginationDetailsEnum)[keyof typeof GetAllPaginationDetailsEnum]; export const GetAllDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetAllDetailsLevelEnum = (typeof GetAllDetailsLevelEnum)[keyof typeof GetAllDetailsLevelEnum]; export const GetAllStateEnum = { PendingApproval: 'PENDING_APPROVAL', Inactive: 'INACTIVE', Active: 'ACTIVE', Exited: 'EXITED', Blacklisted: 'BLACKLISTED', Rejected: 'REJECTED', } as const; export type GetAllStateEnum = (typeof GetAllStateEnum)[keyof typeof GetAllStateEnum]; export const GetByIdDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetByIdDetailsLevelEnum = (typeof GetByIdDetailsLevelEnum)[keyof typeof GetByIdDetailsLevelEnum]; export const GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum = (typeof GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum)[keyof typeof GetCreditArrangementsByClientIdOrKeyPaginationDetailsEnum]; export const GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum = (typeof GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum)[keyof typeof GetCreditArrangementsByClientIdOrKeyDetailsLevelEnum]; export const SearchPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type SearchPaginationDetailsEnum = (typeof SearchPaginationDetailsEnum)[keyof typeof SearchPaginationDetailsEnum]; export const SearchDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type SearchDetailsLevelEnum = (typeof SearchDetailsLevelEnum)[keyof typeof SearchDetailsLevelEnum];