1209 lines
50 KiB
TypeScript
1209 lines
50 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Swagger Example API
|
|
* This is a sample server celler server.
|
|
*
|
|
* The version of the OpenAPI document: 1.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, AxiosRequestConfig } 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 } from './common';
|
|
import type { RequestArgs } from './base';
|
|
// @ts-ignore
|
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface ControllerChunkStatusResponse
|
|
*/
|
|
export interface ControllerChunkStatusResponse {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ControllerChunkStatusResponse
|
|
*/
|
|
'chunked'?: number;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof ControllerChunkStatusResponse
|
|
*/
|
|
'completed'?: boolean;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ControllerChunkStatusResponse
|
|
*/
|
|
'total'?: number;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GormDeletedAt
|
|
*/
|
|
export interface GormDeletedAt {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof GormDeletedAt
|
|
*/
|
|
'time'?: string;
|
|
/**
|
|
* Valid is true if Time is not NULL
|
|
* @type {boolean}
|
|
* @memberof GormDeletedAt
|
|
*/
|
|
'valid'?: boolean;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface LibraryLibraryIdDocumentsPostRequest
|
|
*/
|
|
export interface LibraryLibraryIdDocumentsPostRequest {
|
|
/**
|
|
* 标题
|
|
* @type {string}
|
|
* @memberof LibraryLibraryIdDocumentsPostRequest
|
|
*/
|
|
'Title': string;
|
|
/**
|
|
* 描述
|
|
* @type {string}
|
|
* @memberof LibraryLibraryIdDocumentsPostRequest
|
|
*/
|
|
'Description'?: string;
|
|
/**
|
|
* 文档内容
|
|
* @type {string}
|
|
* @memberof LibraryLibraryIdDocumentsPostRequest
|
|
*/
|
|
'Content'?: string;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface ModelDocument
|
|
*/
|
|
export interface ModelDocument {
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'chunked'?: boolean;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'content'?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'createdAt'?: string;
|
|
/**
|
|
*
|
|
* @type {GormDeletedAt}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'deletedAt'?: GormDeletedAt;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'description'?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'id'?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'libraryId'?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'title'?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'updatedAt'?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ModelDocument
|
|
*/
|
|
'userId'?: number;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface ModelLibrary
|
|
*/
|
|
export interface ModelLibrary {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelLibrary
|
|
*/
|
|
'createdAt'?: string;
|
|
/**
|
|
*
|
|
* @type {GormDeletedAt}
|
|
* @memberof ModelLibrary
|
|
*/
|
|
'deletedAt'?: GormDeletedAt;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ModelLibrary
|
|
*/
|
|
'id'?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelLibrary
|
|
*/
|
|
'name'?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelLibrary
|
|
*/
|
|
'password'?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ModelLibrary
|
|
*/
|
|
'updatedAt'?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ModelLibrary
|
|
*/
|
|
'userId'?: number;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface PkgResponseError
|
|
*/
|
|
export interface PkgResponseError {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PkgResponseError
|
|
*/
|
|
'message'?: string;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface PkgResponsePaginated
|
|
*/
|
|
export interface PkgResponsePaginated {
|
|
/**
|
|
*
|
|
* @type {object}
|
|
* @memberof PkgResponsePaginated
|
|
*/
|
|
'Data'?: object;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PkgResponsePaginated
|
|
*/
|
|
'Limit'?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PkgResponsePaginated
|
|
*/
|
|
'Page'?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PkgResponsePaginated
|
|
*/
|
|
'Total'?: number;
|
|
}
|
|
|
|
/**
|
|
* DocumentsApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const DocumentsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
*
|
|
* @summary 查看处理状态
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdChunksGet: async (libraryId: string, documentId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdChunksGet', 'libraryId', libraryId)
|
|
// verify required parameter 'documentId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdChunksGet', 'documentId', documentId)
|
|
const localVarPath = `/library/{LibraryId}/document/{DocumentId}/chunks`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)))
|
|
.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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary 删除文档
|
|
* @param {number} documentId 文档 ID
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdDelete: async (documentId: number, libraryId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'documentId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdDelete', 'documentId', documentId)
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdDelete', 'libraryId', libraryId)
|
|
const localVarPath = `/library/{LibraryId}/document/{DocumentId}`
|
|
.replace(`{${"DocumentId"}}`, encodeURIComponent(String(documentId)))
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)));
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary 显示文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdGet: async (libraryId: string, documentId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdGet', 'libraryId', libraryId)
|
|
// verify required parameter 'documentId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdGet', 'documentId', documentId)
|
|
const localVarPath = `/library/{LibraryId}/document/{DocumentId}`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)))
|
|
.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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary 更新文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {string} title 标题
|
|
* @param {string} content 内容
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdPut: async (libraryId: string, documentId: string, title: string, content: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdPut', 'libraryId', libraryId)
|
|
// verify required parameter 'documentId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdPut', 'documentId', documentId)
|
|
// verify required parameter 'title' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdPut', 'title', title)
|
|
// verify required parameter 'content' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentDocumentIdPut', 'content', content)
|
|
const localVarPath = `/library/{LibraryId}/document/{DocumentId}`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)))
|
|
.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: 'PUT', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
if (title !== undefined) {
|
|
localVarQueryParameter['Title'] = title;
|
|
}
|
|
|
|
if (content !== undefined) {
|
|
localVarQueryParameter['Content'] = content;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* 获取当前账号的文档列表
|
|
* @summary 获取文档列表
|
|
* @param {number} page 页码
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentsGet: async (page: number, libraryId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'page' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentsGet', 'page', page)
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentsGet', 'libraryId', libraryId)
|
|
const localVarPath = `/library/{LibraryId}/documents`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)));
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
if (page !== undefined) {
|
|
localVarQueryParameter['Page'] = page;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary 新建文档
|
|
* @param {string} libraryId 标题
|
|
* @param {LibraryLibraryIdDocumentsPostRequest} libraryLibraryIdDocumentsPostRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentsPost: async (libraryId: string, libraryLibraryIdDocumentsPostRequest: LibraryLibraryIdDocumentsPostRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentsPost', 'libraryId', libraryId)
|
|
// verify required parameter 'libraryLibraryIdDocumentsPostRequest' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDocumentsPost', 'libraryLibraryIdDocumentsPostRequest', libraryLibraryIdDocumentsPostRequest)
|
|
const localVarPath = `/library/{LibraryId}/documents`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)));
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
|
|
|
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
localVarRequestOptions.data = serializeDataIfNeeded(libraryLibraryIdDocumentsPostRequest, localVarRequestOptions, configuration)
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary Server Sent Events 查询文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} question 问题
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdQueryGet: async (libraryId: string, question: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdQueryGet', 'libraryId', libraryId)
|
|
// verify required parameter 'question' is not null or undefined
|
|
assertParamExists('libraryLibraryIdQueryGet', 'question', question)
|
|
const localVarPath = `/library/{LibraryId}/query`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)));
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
if (question !== undefined) {
|
|
localVarQueryParameter['Question'] = question;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* DocumentsApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = DocumentsApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary 查看处理状态
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdDocumentDocumentIdChunksGet(libraryId: string, documentId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ControllerChunkStatusResponse>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdDocumentDocumentIdChunksGet(libraryId, documentId, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DocumentsApi.libraryLibraryIdDocumentDocumentIdChunksGet']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary 删除文档
|
|
* @param {number} documentId 文档 ID
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdDocumentDocumentIdDelete(documentId: number, libraryId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdDocumentDocumentIdDelete(documentId, libraryId, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DocumentsApi.libraryLibraryIdDocumentDocumentIdDelete']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary 显示文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdDocumentDocumentIdGet(libraryId: string, documentId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ModelDocument>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdDocumentDocumentIdGet(libraryId, documentId, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DocumentsApi.libraryLibraryIdDocumentDocumentIdGet']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary 更新文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {string} title 标题
|
|
* @param {string} content 内容
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdDocumentDocumentIdPut(libraryId: string, documentId: string, title: string, content: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ModelDocument>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdDocumentDocumentIdPut(libraryId, documentId, title, content, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DocumentsApi.libraryLibraryIdDocumentDocumentIdPut']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
* 获取当前账号的文档列表
|
|
* @summary 获取文档列表
|
|
* @param {number} page 页码
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdDocumentsGet(page: number, libraryId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PkgResponsePaginated>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdDocumentsGet(page, libraryId, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DocumentsApi.libraryLibraryIdDocumentsGet']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary 新建文档
|
|
* @param {string} libraryId 标题
|
|
* @param {LibraryLibraryIdDocumentsPostRequest} libraryLibraryIdDocumentsPostRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdDocumentsPost(libraryId: string, libraryLibraryIdDocumentsPostRequest: LibraryLibraryIdDocumentsPostRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ModelDocument>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdDocumentsPost(libraryId, libraryLibraryIdDocumentsPostRequest, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DocumentsApi.libraryLibraryIdDocumentsPost']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary Server Sent Events 查询文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} question 问题
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdQueryGet(libraryId: string, question: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdQueryGet(libraryId, question, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DocumentsApi.libraryLibraryIdQueryGet']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* DocumentsApi - factory interface
|
|
* @export
|
|
*/
|
|
export const DocumentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = DocumentsApiFp(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary 查看处理状态
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdChunksGet(libraryId: string, documentId: string, options?: any): AxiosPromise<ControllerChunkStatusResponse> {
|
|
return localVarFp.libraryLibraryIdDocumentDocumentIdChunksGet(libraryId, documentId, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary 删除文档
|
|
* @param {number} documentId 文档 ID
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdDelete(documentId: number, libraryId: number, options?: any): AxiosPromise<void> {
|
|
return localVarFp.libraryLibraryIdDocumentDocumentIdDelete(documentId, libraryId, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary 显示文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdGet(libraryId: string, documentId: string, options?: any): AxiosPromise<ModelDocument> {
|
|
return localVarFp.libraryLibraryIdDocumentDocumentIdGet(libraryId, documentId, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary 更新文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {string} title 标题
|
|
* @param {string} content 内容
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentDocumentIdPut(libraryId: string, documentId: string, title: string, content: string, options?: any): AxiosPromise<ModelDocument> {
|
|
return localVarFp.libraryLibraryIdDocumentDocumentIdPut(libraryId, documentId, title, content, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* 获取当前账号的文档列表
|
|
* @summary 获取文档列表
|
|
* @param {number} page 页码
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentsGet(page: number, libraryId: number, options?: any): AxiosPromise<PkgResponsePaginated> {
|
|
return localVarFp.libraryLibraryIdDocumentsGet(page, libraryId, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary 新建文档
|
|
* @param {string} libraryId 标题
|
|
* @param {LibraryLibraryIdDocumentsPostRequest} libraryLibraryIdDocumentsPostRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDocumentsPost(libraryId: string, libraryLibraryIdDocumentsPostRequest: LibraryLibraryIdDocumentsPostRequest, options?: any): AxiosPromise<ModelDocument> {
|
|
return localVarFp.libraryLibraryIdDocumentsPost(libraryId, libraryLibraryIdDocumentsPostRequest, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary Server Sent Events 查询文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} question 问题
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdQueryGet(libraryId: string, question: string, options?: any): AxiosPromise<void> {
|
|
return localVarFp.libraryLibraryIdQueryGet(libraryId, question, options).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* DocumentsApi - object-oriented interface
|
|
* @export
|
|
* @class DocumentsApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class DocumentsApi extends BaseAPI {
|
|
/**
|
|
*
|
|
* @summary 查看处理状态
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DocumentsApi
|
|
*/
|
|
public libraryLibraryIdDocumentDocumentIdChunksGet(libraryId: string, documentId: string, options?: AxiosRequestConfig) {
|
|
return DocumentsApiFp(this.configuration).libraryLibraryIdDocumentDocumentIdChunksGet(libraryId, documentId, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary 删除文档
|
|
* @param {number} documentId 文档 ID
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DocumentsApi
|
|
*/
|
|
public libraryLibraryIdDocumentDocumentIdDelete(documentId: number, libraryId: number, options?: AxiosRequestConfig) {
|
|
return DocumentsApiFp(this.configuration).libraryLibraryIdDocumentDocumentIdDelete(documentId, libraryId, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary 显示文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DocumentsApi
|
|
*/
|
|
public libraryLibraryIdDocumentDocumentIdGet(libraryId: string, documentId: string, options?: AxiosRequestConfig) {
|
|
return DocumentsApiFp(this.configuration).libraryLibraryIdDocumentDocumentIdGet(libraryId, documentId, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary 更新文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} documentId 文档 ID
|
|
* @param {string} title 标题
|
|
* @param {string} content 内容
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DocumentsApi
|
|
*/
|
|
public libraryLibraryIdDocumentDocumentIdPut(libraryId: string, documentId: string, title: string, content: string, options?: AxiosRequestConfig) {
|
|
return DocumentsApiFp(this.configuration).libraryLibraryIdDocumentDocumentIdPut(libraryId, documentId, title, content, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* 获取当前账号的文档列表
|
|
* @summary 获取文档列表
|
|
* @param {number} page 页码
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DocumentsApi
|
|
*/
|
|
public libraryLibraryIdDocumentsGet(page: number, libraryId: number, options?: AxiosRequestConfig) {
|
|
return DocumentsApiFp(this.configuration).libraryLibraryIdDocumentsGet(page, libraryId, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary 新建文档
|
|
* @param {string} libraryId 标题
|
|
* @param {LibraryLibraryIdDocumentsPostRequest} libraryLibraryIdDocumentsPostRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DocumentsApi
|
|
*/
|
|
public libraryLibraryIdDocumentsPost(libraryId: string, libraryLibraryIdDocumentsPostRequest: LibraryLibraryIdDocumentsPostRequest, options?: AxiosRequestConfig) {
|
|
return DocumentsApiFp(this.configuration).libraryLibraryIdDocumentsPost(libraryId, libraryLibraryIdDocumentsPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary Server Sent Events 查询文档
|
|
* @param {string} libraryId 资料库 ID
|
|
* @param {string} question 问题
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DocumentsApi
|
|
*/
|
|
public libraryLibraryIdQueryGet(libraryId: string, question: string, options?: AxiosRequestConfig) {
|
|
return DocumentsApiFp(this.configuration).libraryLibraryIdQueryGet(libraryId, question, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* LibrariesApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const LibrariesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
*
|
|
* @summary 获取资料库列表
|
|
* @param {number} page 页码
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
librariesGet: async (page: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'page' is not null or undefined
|
|
assertParamExists('librariesGet', 'page', page)
|
|
const localVarPath = `/libraries`;
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
if (page !== undefined) {
|
|
localVarQueryParameter['Page'] = page;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary 新建资料库
|
|
* @param {string} name 资料库名称
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
librariesPost: async (name: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('librariesPost', 'name', name)
|
|
const localVarPath = `/libraries`;
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
if (name !== undefined) {
|
|
localVarQueryParameter['Name'] = name;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary 删除资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDelete: async (libraryId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdDelete', 'libraryId', libraryId)
|
|
const localVarPath = `/library/{LibraryId}`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)));
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary 显示资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdGet: async (libraryId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'libraryId' is not null or undefined
|
|
assertParamExists('libraryLibraryIdGet', 'libraryId', libraryId)
|
|
const localVarPath = `/library/{LibraryId}`
|
|
.replace(`{${"LibraryId"}}`, encodeURIComponent(String(libraryId)));
|
|
// 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 BearerToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* LibrariesApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const LibrariesApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = LibrariesApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary 获取资料库列表
|
|
* @param {number} page 页码
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async librariesGet(page: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PkgResponsePaginated>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.librariesGet(page, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['LibrariesApi.librariesGet']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary 新建资料库
|
|
* @param {string} name 资料库名称
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async librariesPost(name: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ModelLibrary>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.librariesPost(name, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['LibrariesApi.librariesPost']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary 删除资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdDelete(libraryId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdDelete(libraryId, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['LibrariesApi.libraryLibraryIdDelete']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary 显示资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async libraryLibraryIdGet(libraryId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.libraryLibraryIdGet(libraryId, options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['LibrariesApi.libraryLibraryIdGet']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* LibrariesApi - factory interface
|
|
* @export
|
|
*/
|
|
export const LibrariesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = LibrariesApiFp(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary 获取资料库列表
|
|
* @param {number} page 页码
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
librariesGet(page: number, options?: any): AxiosPromise<PkgResponsePaginated> {
|
|
return localVarFp.librariesGet(page, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary 新建资料库
|
|
* @param {string} name 资料库名称
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
librariesPost(name: string, options?: any): AxiosPromise<ModelLibrary> {
|
|
return localVarFp.librariesPost(name, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary 删除资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdDelete(libraryId: number, options?: any): AxiosPromise<void> {
|
|
return localVarFp.libraryLibraryIdDelete(libraryId, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary 显示资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
libraryLibraryIdGet(libraryId: number, options?: any): AxiosPromise<void> {
|
|
return localVarFp.libraryLibraryIdGet(libraryId, options).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* LibrariesApi - object-oriented interface
|
|
* @export
|
|
* @class LibrariesApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class LibrariesApi extends BaseAPI {
|
|
/**
|
|
*
|
|
* @summary 获取资料库列表
|
|
* @param {number} page 页码
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibrariesApi
|
|
*/
|
|
public librariesGet(page: number, options?: AxiosRequestConfig) {
|
|
return LibrariesApiFp(this.configuration).librariesGet(page, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary 新建资料库
|
|
* @param {string} name 资料库名称
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibrariesApi
|
|
*/
|
|
public librariesPost(name: string, options?: AxiosRequestConfig) {
|
|
return LibrariesApiFp(this.configuration).librariesPost(name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary 删除资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibrariesApi
|
|
*/
|
|
public libraryLibraryIdDelete(libraryId: number, options?: AxiosRequestConfig) {
|
|
return LibrariesApiFp(this.configuration).libraryLibraryIdDelete(libraryId, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary 显示资料库
|
|
* @param {number} libraryId 资料库 ID
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibrariesApi
|
|
*/
|
|
public libraryLibraryIdGet(libraryId: number, options?: AxiosRequestConfig) {
|
|
return LibrariesApiFp(this.configuration).libraryLibraryIdGet(libraryId, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
|