-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathresources-api.ts
More file actions
117 lines (106 loc) · 4.62 KB
/
resources-api.ts
File metadata and controls
117 lines (106 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/* tslint:disable */
/* eslint-disable */
/**
* NOTE: This file is auto generated by OpenAPI Generator.
* Do not edit the file 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 } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { DatabaseDocumentList } from '../models';
/**
* ResourcesApi - axios parameter creator
* @export
*/
export const ResourcesApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
doclist: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/doclist`;
// 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;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ResourcesApi - functional programming interface
* @export
*/
export const ResourcesApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ResourcesApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async doclist(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DatabaseDocumentList>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.doclist(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['ResourcesApi.doclist']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* ResourcesApi - factory interface
* @export
*/
export const ResourcesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ResourcesApiFp(configuration)
return {
/**
*
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
doclist(options?: RawAxiosRequestConfig): AxiosPromise<DatabaseDocumentList> {
return localVarFp.doclist(options).then((request) => request(axios, basePath));
},
};
};
/**
* ResourcesApi - object-oriented interface
* @export
* @class ResourcesApi
* @extends {BaseAPI}
*/
export class ResourcesApi extends BaseAPI {
/**
*
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourcesApi
*/
public doclist(options?: RawAxiosRequestConfig) {
return ResourcesApiFp(this.configuration).doclist(options).then((request) => request(this.axios, this.basePath));
}
}