/* tslint:disable */ /* eslint-disable */ /** * openfilz-api * API for Document Management System * * The version of the OpenAPI document: 1.0.0 * * * 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 { AutoFileInboxRequest } from '../models'; // @ts-ignore import type { AutoFileJobView } from '../models'; // @ts-ignore import type { AutoFileJobsRequest } from '../models'; // @ts-ignore import type { AutoFileRequest } from '../models'; // @ts-ignore import type { FilingOutcome } from '../models'; /** * SmartFilingApi - axios parameter creator */ export const SmartFilingApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Runs smart filing for the given documents (e.g. the contents of an Inbox) and returns the job at once. * @summary File existing documents on demand * @param {AutoFileRequest} autoFileRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ file: async (autoFileRequest: AutoFileRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'autoFileRequest' is not null or undefined assertParamExists('file', 'autoFileRequest', autoFileRequest) const localVarPath = `/api/v1/ai/auto-file`; // 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 keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(autoFileRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Schedules one filing job for every active file directly in the caller\'s Inbox folder (the per-user Inbox of the smart-filing preferences) and returns the job at once, like the on-demand endpoint. 404 when the caller has no Inbox, 400 when the deployment does not offer it. * @summary File everything lying loose in the caller\'s Inbox * @param {AutoFileInboxRequest} [autoFileInboxRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ fileInbox: async (autoFileInboxRequest?: AutoFileInboxRequest, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/ai/auto-file/inbox`; // 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 keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(autoFileInboxRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Progress and outcome of a filing job * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ job: async (jobId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'jobId' is not null or undefined assertParamExists('job', 'jobId', jobId) const localVarPath = `/api/v1/ai/auto-file/{jobId}` .replace('{jobId}', encodeURIComponent(String(jobId))); // 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 keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Follows a whole upload batch in one call: the browser sends one upload request per file, so a batch leaves as many jobs to poll. Jobs that do not exist, or belong to somebody else, are left out of the answer rather than failing it. A POST because a batch of ids does not fit in a query string. * @summary Progress and outcome of several filing jobs * @param {AutoFileJobsRequest} autoFileJobsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ jobs: async (autoFileJobsRequest: AutoFileJobsRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'autoFileJobsRequest' is not null or undefined assertParamExists('jobs', 'autoFileJobsRequest', autoFileJobsRequest) const localVarPath = `/api/v1/ai/auto-file/jobs`; // 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 keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(autoFileJobsRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary The latest filing record of a document (the \"Filed by OpenFilz\" chip) * @param {string} documentId * @param {*} [options] Override http request option. * @throws {RequiredError} */ lastFiling: async (documentId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'documentId' is not null or undefined assertParamExists('lastFiling', 'documentId', documentId) const localVarPath = `/api/v1/ai/auto-file/document/{documentId}` .replace('{documentId}', encodeURIComponent(String(documentId))); // 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 keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Move every document the job filed back where it came from * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ undo: async (jobId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'jobId' is not null or undefined assertParamExists('undo', 'jobId', jobId) const localVarPath = `/api/v1/ai/auto-file/{jobId}/undo` .replace('{jobId}', encodeURIComponent(String(jobId))); // 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 keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Move one filed document back (the chip\'s \"Move back\") * @param {string} planId * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoFiling: async (planId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'planId' is not null or undefined assertParamExists('undoFiling', 'planId', planId) const localVarPath = `/api/v1/ai/auto-file/filing/{planId}/undo` .replace('{planId}', encodeURIComponent(String(planId))); // 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 keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Accept'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * SmartFilingApi - functional programming interface */ export const SmartFilingApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SmartFilingApiAxiosParamCreator(configuration) return { /** * Runs smart filing for the given documents (e.g. the contents of an Inbox) and returns the job at once. * @summary File existing documents on demand * @param {AutoFileRequest} autoFileRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async file(autoFileRequest: AutoFileRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.file(autoFileRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SmartFilingApi.file']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Schedules one filing job for every active file directly in the caller\'s Inbox folder (the per-user Inbox of the smart-filing preferences) and returns the job at once, like the on-demand endpoint. 404 when the caller has no Inbox, 400 when the deployment does not offer it. * @summary File everything lying loose in the caller\'s Inbox * @param {AutoFileInboxRequest} [autoFileInboxRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async fileInbox(autoFileInboxRequest?: AutoFileInboxRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fileInbox(autoFileInboxRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SmartFilingApi.fileInbox']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Progress and outcome of a filing job * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async job(jobId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.job(jobId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SmartFilingApi.job']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Follows a whole upload batch in one call: the browser sends one upload request per file, so a batch leaves as many jobs to poll. Jobs that do not exist, or belong to somebody else, are left out of the answer rather than failing it. A POST because a batch of ids does not fit in a query string. * @summary Progress and outcome of several filing jobs * @param {AutoFileJobsRequest} autoFileJobsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async jobs(autoFileJobsRequest: AutoFileJobsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.jobs(autoFileJobsRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SmartFilingApi.jobs']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary The latest filing record of a document (the \"Filed by OpenFilz\" chip) * @param {string} documentId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lastFiling(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lastFiling(documentId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SmartFilingApi.lastFiling']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Move every document the job filed back where it came from * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async undo(jobId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.undo(jobId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SmartFilingApi.undo']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Move one filed document back (the chip\'s \"Move back\") * @param {string} planId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async undoFiling(planId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.undoFiling(planId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SmartFilingApi.undoFiling']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * SmartFilingApi - factory interface */ export const SmartFilingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SmartFilingApiFp(configuration) return { /** * Runs smart filing for the given documents (e.g. the contents of an Inbox) and returns the job at once. * @summary File existing documents on demand * @param {AutoFileRequest} autoFileRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ file(autoFileRequest: AutoFileRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.file(autoFileRequest, options).then((request) => request(axios, basePath)); }, /** * Schedules one filing job for every active file directly in the caller\'s Inbox folder (the per-user Inbox of the smart-filing preferences) and returns the job at once, like the on-demand endpoint. 404 when the caller has no Inbox, 400 when the deployment does not offer it. * @summary File everything lying loose in the caller\'s Inbox * @param {AutoFileInboxRequest} [autoFileInboxRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ fileInbox(autoFileInboxRequest?: AutoFileInboxRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.fileInbox(autoFileInboxRequest, options).then((request) => request(axios, basePath)); }, /** * * @summary Progress and outcome of a filing job * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ job(jobId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.job(jobId, options).then((request) => request(axios, basePath)); }, /** * Follows a whole upload batch in one call: the browser sends one upload request per file, so a batch leaves as many jobs to poll. Jobs that do not exist, or belong to somebody else, are left out of the answer rather than failing it. A POST because a batch of ids does not fit in a query string. * @summary Progress and outcome of several filing jobs * @param {AutoFileJobsRequest} autoFileJobsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ jobs(autoFileJobsRequest: AutoFileJobsRequest, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.jobs(autoFileJobsRequest, options).then((request) => request(axios, basePath)); }, /** * * @summary The latest filing record of a document (the \"Filed by OpenFilz\" chip) * @param {string} documentId * @param {*} [options] Override http request option. * @throws {RequiredError} */ lastFiling(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.lastFiling(documentId, options).then((request) => request(axios, basePath)); }, /** * * @summary Move every document the job filed back where it came from * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ undo(jobId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.undo(jobId, options).then((request) => request(axios, basePath)); }, /** * * @summary Move one filed document back (the chip\'s \"Move back\") * @param {string} planId * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoFiling(planId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.undoFiling(planId, options).then((request) => request(axios, basePath)); }, }; }; /** * SmartFilingApi - object-oriented interface */ export class SmartFilingApi extends BaseAPI { /** * Runs smart filing for the given documents (e.g. the contents of an Inbox) and returns the job at once. * @summary File existing documents on demand * @param {AutoFileRequest} autoFileRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ public file(autoFileRequest: AutoFileRequest, options?: RawAxiosRequestConfig) { return SmartFilingApiFp(this.configuration).file(autoFileRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Schedules one filing job for every active file directly in the caller\'s Inbox folder (the per-user Inbox of the smart-filing preferences) and returns the job at once, like the on-demand endpoint. 404 when the caller has no Inbox, 400 when the deployment does not offer it. * @summary File everything lying loose in the caller\'s Inbox * @param {AutoFileInboxRequest} [autoFileInboxRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ public fileInbox(autoFileInboxRequest?: AutoFileInboxRequest, options?: RawAxiosRequestConfig) { return SmartFilingApiFp(this.configuration).fileInbox(autoFileInboxRequest, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Progress and outcome of a filing job * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ public job(jobId: string, options?: RawAxiosRequestConfig) { return SmartFilingApiFp(this.configuration).job(jobId, options).then((request) => request(this.axios, this.basePath)); } /** * Follows a whole upload batch in one call: the browser sends one upload request per file, so a batch leaves as many jobs to poll. Jobs that do not exist, or belong to somebody else, are left out of the answer rather than failing it. A POST because a batch of ids does not fit in a query string. * @summary Progress and outcome of several filing jobs * @param {AutoFileJobsRequest} autoFileJobsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ public jobs(autoFileJobsRequest: AutoFileJobsRequest, options?: RawAxiosRequestConfig) { return SmartFilingApiFp(this.configuration).jobs(autoFileJobsRequest, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary The latest filing record of a document (the \"Filed by OpenFilz\" chip) * @param {string} documentId * @param {*} [options] Override http request option. * @throws {RequiredError} */ public lastFiling(documentId: string, options?: RawAxiosRequestConfig) { return SmartFilingApiFp(this.configuration).lastFiling(documentId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Move every document the job filed back where it came from * @param {string} jobId * @param {*} [options] Override http request option. * @throws {RequiredError} */ public undo(jobId: string, options?: RawAxiosRequestConfig) { return SmartFilingApiFp(this.configuration).undo(jobId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Move one filed document back (the chip\'s \"Move back\") * @param {string} planId * @param {*} [options] Override http request option. * @throws {RequiredError} */ public undoFiling(planId: string, options?: RawAxiosRequestConfig) { return SmartFilingApiFp(this.configuration).undoFiling(planId, options).then((request) => request(this.axios, this.basePath)); } }