@aled1023/udl-sdk 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/api.d.ts +319 -0
- package/dist/api/api.js +538 -0
- package/dist/api/base.d.ts +42 -0
- package/dist/api/base.js +49 -0
- package/dist/api/common.d.ts +34 -0
- package/dist/api/common.js +139 -0
- package/dist/api/configuration.d.ts +98 -0
- package/dist/api/configuration.js +44 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +21 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +51 -0
- package/package.json +19 -0
package/dist/api/api.js
ADDED
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* OpenAPI definition
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.MinioCallbackControllerApi = exports.MinioCallbackControllerApiFactory = exports.MinioCallbackControllerApiFp = exports.MinioCallbackControllerApiAxiosParamCreator = exports.FileUploadControllerApi = exports.FileUploadControllerApiFactory = exports.FileUploadControllerApiFp = exports.FileUploadControllerApiAxiosParamCreator = exports.FileLifecycleControllerApi = exports.FileLifecycleControllerApiFactory = exports.FileLifecycleControllerApiFp = exports.FileLifecycleControllerApiAxiosParamCreator = void 0;
|
|
29
|
+
const axios_1 = __importDefault(require("axios"));
|
|
30
|
+
// Some imports not used depending on template conditions
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
const common_1 = require("./common");
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
const base_1 = require("./base");
|
|
35
|
+
/**
|
|
36
|
+
* FileLifecycleControllerApi - axios parameter creator
|
|
37
|
+
*/
|
|
38
|
+
const FileLifecycleControllerApiAxiosParamCreator = function (configuration) {
|
|
39
|
+
return {
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @param {number} fileId
|
|
43
|
+
* @param {string} [username]
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
deleteFile: (fileId_1, username_1, ...args_1) => __awaiter(this, [fileId_1, username_1, ...args_1], void 0, function* (fileId, username, options = {}) {
|
|
48
|
+
// verify required parameter 'fileId' is not null or undefined
|
|
49
|
+
(0, common_1.assertParamExists)('deleteFile', 'fileId', fileId);
|
|
50
|
+
const localVarPath = `/file/lifecycle/delete/{fileId}`
|
|
51
|
+
.replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
|
|
52
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
53
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
54
|
+
let baseOptions;
|
|
55
|
+
if (configuration) {
|
|
56
|
+
baseOptions = configuration.baseOptions;
|
|
57
|
+
}
|
|
58
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
59
|
+
const localVarHeaderParameter = {};
|
|
60
|
+
const localVarQueryParameter = {};
|
|
61
|
+
if (username !== undefined) {
|
|
62
|
+
localVarQueryParameter['username'] = username;
|
|
63
|
+
}
|
|
64
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
65
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
66
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
67
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
68
|
+
return {
|
|
69
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
70
|
+
options: localVarRequestOptions,
|
|
71
|
+
};
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
exports.FileLifecycleControllerApiAxiosParamCreator = FileLifecycleControllerApiAxiosParamCreator;
|
|
76
|
+
/**
|
|
77
|
+
* FileLifecycleControllerApi - functional programming interface
|
|
78
|
+
*/
|
|
79
|
+
const FileLifecycleControllerApiFp = function (configuration) {
|
|
80
|
+
const localVarAxiosParamCreator = (0, exports.FileLifecycleControllerApiAxiosParamCreator)(configuration);
|
|
81
|
+
return {
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @param {number} fileId
|
|
85
|
+
* @param {string} [username]
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
*/
|
|
89
|
+
deleteFile(fileId, username, options) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
var _a, _b, _c;
|
|
92
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFile(fileId, username, options);
|
|
93
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
94
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FileLifecycleControllerApi.deleteFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
95
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
exports.FileLifecycleControllerApiFp = FileLifecycleControllerApiFp;
|
|
101
|
+
/**
|
|
102
|
+
* FileLifecycleControllerApi - factory interface
|
|
103
|
+
*/
|
|
104
|
+
const FileLifecycleControllerApiFactory = function (configuration, basePath, axios) {
|
|
105
|
+
const localVarFp = (0, exports.FileLifecycleControllerApiFp)(configuration);
|
|
106
|
+
return {
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @param {number} fileId
|
|
110
|
+
* @param {string} [username]
|
|
111
|
+
* @param {*} [options] Override http request option.
|
|
112
|
+
* @throws {RequiredError}
|
|
113
|
+
*/
|
|
114
|
+
deleteFile(fileId, username, options) {
|
|
115
|
+
return localVarFp.deleteFile(fileId, username, options).then((request) => request(axios, basePath));
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
exports.FileLifecycleControllerApiFactory = FileLifecycleControllerApiFactory;
|
|
120
|
+
/**
|
|
121
|
+
* FileLifecycleControllerApi - object-oriented interface
|
|
122
|
+
*/
|
|
123
|
+
class FileLifecycleControllerApi extends base_1.BaseAPI {
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @param {number} fileId
|
|
127
|
+
* @param {string} [username]
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
*/
|
|
131
|
+
deleteFile(fileId, username, options) {
|
|
132
|
+
return (0, exports.FileLifecycleControllerApiFp)(this.configuration).deleteFile(fileId, username, options).then((request) => request(this.axios, this.basePath));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.FileLifecycleControllerApi = FileLifecycleControllerApi;
|
|
136
|
+
/**
|
|
137
|
+
* FileUploadControllerApi - axios parameter creator
|
|
138
|
+
*/
|
|
139
|
+
const FileUploadControllerApiAxiosParamCreator = function (configuration) {
|
|
140
|
+
return {
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @param {string} uploadId
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
*/
|
|
147
|
+
checkUploadedChunks: (uploadId_1, ...args_1) => __awaiter(this, [uploadId_1, ...args_1], void 0, function* (uploadId, options = {}) {
|
|
148
|
+
// verify required parameter 'uploadId' is not null or undefined
|
|
149
|
+
(0, common_1.assertParamExists)('checkUploadedChunks', 'uploadId', uploadId);
|
|
150
|
+
const localVarPath = `/upload/check/{uploadId}`
|
|
151
|
+
.replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
|
|
152
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
153
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
154
|
+
let baseOptions;
|
|
155
|
+
if (configuration) {
|
|
156
|
+
baseOptions = configuration.baseOptions;
|
|
157
|
+
}
|
|
158
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
159
|
+
const localVarHeaderParameter = {};
|
|
160
|
+
const localVarQueryParameter = {};
|
|
161
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
162
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
163
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
164
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
165
|
+
return {
|
|
166
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
167
|
+
options: localVarRequestOptions,
|
|
168
|
+
};
|
|
169
|
+
}),
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
* @param {CompleteUploadRequest} completeUploadRequest
|
|
173
|
+
* @param {*} [options] Override http request option.
|
|
174
|
+
* @throws {RequiredError}
|
|
175
|
+
*/
|
|
176
|
+
completeUpload: (completeUploadRequest_1, ...args_1) => __awaiter(this, [completeUploadRequest_1, ...args_1], void 0, function* (completeUploadRequest, options = {}) {
|
|
177
|
+
// verify required parameter 'completeUploadRequest' is not null or undefined
|
|
178
|
+
(0, common_1.assertParamExists)('completeUpload', 'completeUploadRequest', completeUploadRequest);
|
|
179
|
+
const localVarPath = `/upload/complete`;
|
|
180
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
181
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
182
|
+
let baseOptions;
|
|
183
|
+
if (configuration) {
|
|
184
|
+
baseOptions = configuration.baseOptions;
|
|
185
|
+
}
|
|
186
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
187
|
+
const localVarHeaderParameter = {};
|
|
188
|
+
const localVarQueryParameter = {};
|
|
189
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
190
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
191
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
192
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
193
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
194
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(completeUploadRequest, localVarRequestOptions, configuration);
|
|
195
|
+
return {
|
|
196
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
197
|
+
options: localVarRequestOptions,
|
|
198
|
+
};
|
|
199
|
+
}),
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* @param {InitUploadRequest} initUploadRequest
|
|
203
|
+
* @param {*} [options] Override http request option.
|
|
204
|
+
* @throws {RequiredError}
|
|
205
|
+
*/
|
|
206
|
+
initUpload: (initUploadRequest_1, ...args_1) => __awaiter(this, [initUploadRequest_1, ...args_1], void 0, function* (initUploadRequest, options = {}) {
|
|
207
|
+
// verify required parameter 'initUploadRequest' is not null or undefined
|
|
208
|
+
(0, common_1.assertParamExists)('initUpload', 'initUploadRequest', initUploadRequest);
|
|
209
|
+
const localVarPath = `/upload/init`;
|
|
210
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
211
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
212
|
+
let baseOptions;
|
|
213
|
+
if (configuration) {
|
|
214
|
+
baseOptions = configuration.baseOptions;
|
|
215
|
+
}
|
|
216
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
217
|
+
const localVarHeaderParameter = {};
|
|
218
|
+
const localVarQueryParameter = {};
|
|
219
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
220
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
221
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
222
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
223
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
224
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initUploadRequest, localVarRequestOptions, configuration);
|
|
225
|
+
return {
|
|
226
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
227
|
+
options: localVarRequestOptions,
|
|
228
|
+
};
|
|
229
|
+
}),
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @param {string} uploadId
|
|
233
|
+
* @param {number} chunkIndex
|
|
234
|
+
* @param {UploadChunkRequest} [uploadChunkRequest]
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
uploadChunk: (uploadId_1, chunkIndex_1, uploadChunkRequest_1, ...args_1) => __awaiter(this, [uploadId_1, chunkIndex_1, uploadChunkRequest_1, ...args_1], void 0, function* (uploadId, chunkIndex, uploadChunkRequest, options = {}) {
|
|
239
|
+
// verify required parameter 'uploadId' is not null or undefined
|
|
240
|
+
(0, common_1.assertParamExists)('uploadChunk', 'uploadId', uploadId);
|
|
241
|
+
// verify required parameter 'chunkIndex' is not null or undefined
|
|
242
|
+
(0, common_1.assertParamExists)('uploadChunk', 'chunkIndex', chunkIndex);
|
|
243
|
+
const localVarPath = `/upload/chunk`;
|
|
244
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
245
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
246
|
+
let baseOptions;
|
|
247
|
+
if (configuration) {
|
|
248
|
+
baseOptions = configuration.baseOptions;
|
|
249
|
+
}
|
|
250
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
251
|
+
const localVarHeaderParameter = {};
|
|
252
|
+
const localVarQueryParameter = {};
|
|
253
|
+
if (uploadId !== undefined) {
|
|
254
|
+
localVarQueryParameter['uploadId'] = uploadId;
|
|
255
|
+
}
|
|
256
|
+
if (chunkIndex !== undefined) {
|
|
257
|
+
localVarQueryParameter['chunkIndex'] = chunkIndex;
|
|
258
|
+
}
|
|
259
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
260
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
261
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
262
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
263
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
264
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadChunkRequest, localVarRequestOptions, configuration);
|
|
265
|
+
return {
|
|
266
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
267
|
+
options: localVarRequestOptions,
|
|
268
|
+
};
|
|
269
|
+
}),
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
exports.FileUploadControllerApiAxiosParamCreator = FileUploadControllerApiAxiosParamCreator;
|
|
273
|
+
/**
|
|
274
|
+
* FileUploadControllerApi - functional programming interface
|
|
275
|
+
*/
|
|
276
|
+
const FileUploadControllerApiFp = function (configuration) {
|
|
277
|
+
const localVarAxiosParamCreator = (0, exports.FileUploadControllerApiAxiosParamCreator)(configuration);
|
|
278
|
+
return {
|
|
279
|
+
/**
|
|
280
|
+
*
|
|
281
|
+
* @param {string} uploadId
|
|
282
|
+
* @param {*} [options] Override http request option.
|
|
283
|
+
* @throws {RequiredError}
|
|
284
|
+
*/
|
|
285
|
+
checkUploadedChunks(uploadId, options) {
|
|
286
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
287
|
+
var _a, _b, _c;
|
|
288
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.checkUploadedChunks(uploadId, options);
|
|
289
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
290
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FileUploadControllerApi.checkUploadedChunks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
291
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
292
|
+
});
|
|
293
|
+
},
|
|
294
|
+
/**
|
|
295
|
+
*
|
|
296
|
+
* @param {CompleteUploadRequest} completeUploadRequest
|
|
297
|
+
* @param {*} [options] Override http request option.
|
|
298
|
+
* @throws {RequiredError}
|
|
299
|
+
*/
|
|
300
|
+
completeUpload(completeUploadRequest, options) {
|
|
301
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
var _a, _b, _c;
|
|
303
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.completeUpload(completeUploadRequest, options);
|
|
304
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
305
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FileUploadControllerApi.completeUpload']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
306
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
307
|
+
});
|
|
308
|
+
},
|
|
309
|
+
/**
|
|
310
|
+
*
|
|
311
|
+
* @param {InitUploadRequest} initUploadRequest
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
initUpload(initUploadRequest, options) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
var _a, _b, _c;
|
|
318
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.initUpload(initUploadRequest, options);
|
|
319
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
320
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FileUploadControllerApi.initUpload']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
321
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
322
|
+
});
|
|
323
|
+
},
|
|
324
|
+
/**
|
|
325
|
+
*
|
|
326
|
+
* @param {string} uploadId
|
|
327
|
+
* @param {number} chunkIndex
|
|
328
|
+
* @param {UploadChunkRequest} [uploadChunkRequest]
|
|
329
|
+
* @param {*} [options] Override http request option.
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
*/
|
|
332
|
+
uploadChunk(uploadId, chunkIndex, uploadChunkRequest, options) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
+
var _a, _b, _c;
|
|
335
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadChunk(uploadId, chunkIndex, uploadChunkRequest, options);
|
|
336
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
337
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FileUploadControllerApi.uploadChunk']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
338
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
exports.FileUploadControllerApiFp = FileUploadControllerApiFp;
|
|
344
|
+
/**
|
|
345
|
+
* FileUploadControllerApi - factory interface
|
|
346
|
+
*/
|
|
347
|
+
const FileUploadControllerApiFactory = function (configuration, basePath, axios) {
|
|
348
|
+
const localVarFp = (0, exports.FileUploadControllerApiFp)(configuration);
|
|
349
|
+
return {
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
* @param {string} uploadId
|
|
353
|
+
* @param {*} [options] Override http request option.
|
|
354
|
+
* @throws {RequiredError}
|
|
355
|
+
*/
|
|
356
|
+
checkUploadedChunks(uploadId, options) {
|
|
357
|
+
return localVarFp.checkUploadedChunks(uploadId, options).then((request) => request(axios, basePath));
|
|
358
|
+
},
|
|
359
|
+
/**
|
|
360
|
+
*
|
|
361
|
+
* @param {CompleteUploadRequest} completeUploadRequest
|
|
362
|
+
* @param {*} [options] Override http request option.
|
|
363
|
+
* @throws {RequiredError}
|
|
364
|
+
*/
|
|
365
|
+
completeUpload(completeUploadRequest, options) {
|
|
366
|
+
return localVarFp.completeUpload(completeUploadRequest, options).then((request) => request(axios, basePath));
|
|
367
|
+
},
|
|
368
|
+
/**
|
|
369
|
+
*
|
|
370
|
+
* @param {InitUploadRequest} initUploadRequest
|
|
371
|
+
* @param {*} [options] Override http request option.
|
|
372
|
+
* @throws {RequiredError}
|
|
373
|
+
*/
|
|
374
|
+
initUpload(initUploadRequest, options) {
|
|
375
|
+
return localVarFp.initUpload(initUploadRequest, options).then((request) => request(axios, basePath));
|
|
376
|
+
},
|
|
377
|
+
/**
|
|
378
|
+
*
|
|
379
|
+
* @param {string} uploadId
|
|
380
|
+
* @param {number} chunkIndex
|
|
381
|
+
* @param {UploadChunkRequest} [uploadChunkRequest]
|
|
382
|
+
* @param {*} [options] Override http request option.
|
|
383
|
+
* @throws {RequiredError}
|
|
384
|
+
*/
|
|
385
|
+
uploadChunk(uploadId, chunkIndex, uploadChunkRequest, options) {
|
|
386
|
+
return localVarFp.uploadChunk(uploadId, chunkIndex, uploadChunkRequest, options).then((request) => request(axios, basePath));
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
exports.FileUploadControllerApiFactory = FileUploadControllerApiFactory;
|
|
391
|
+
/**
|
|
392
|
+
* FileUploadControllerApi - object-oriented interface
|
|
393
|
+
*/
|
|
394
|
+
class FileUploadControllerApi extends base_1.BaseAPI {
|
|
395
|
+
/**
|
|
396
|
+
*
|
|
397
|
+
* @param {string} uploadId
|
|
398
|
+
* @param {*} [options] Override http request option.
|
|
399
|
+
* @throws {RequiredError}
|
|
400
|
+
*/
|
|
401
|
+
checkUploadedChunks(uploadId, options) {
|
|
402
|
+
return (0, exports.FileUploadControllerApiFp)(this.configuration).checkUploadedChunks(uploadId, options).then((request) => request(this.axios, this.basePath));
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
*
|
|
406
|
+
* @param {CompleteUploadRequest} completeUploadRequest
|
|
407
|
+
* @param {*} [options] Override http request option.
|
|
408
|
+
* @throws {RequiredError}
|
|
409
|
+
*/
|
|
410
|
+
completeUpload(completeUploadRequest, options) {
|
|
411
|
+
return (0, exports.FileUploadControllerApiFp)(this.configuration).completeUpload(completeUploadRequest, options).then((request) => request(this.axios, this.basePath));
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
*
|
|
415
|
+
* @param {InitUploadRequest} initUploadRequest
|
|
416
|
+
* @param {*} [options] Override http request option.
|
|
417
|
+
* @throws {RequiredError}
|
|
418
|
+
*/
|
|
419
|
+
initUpload(initUploadRequest, options) {
|
|
420
|
+
return (0, exports.FileUploadControllerApiFp)(this.configuration).initUpload(initUploadRequest, options).then((request) => request(this.axios, this.basePath));
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
*
|
|
424
|
+
* @param {string} uploadId
|
|
425
|
+
* @param {number} chunkIndex
|
|
426
|
+
* @param {UploadChunkRequest} [uploadChunkRequest]
|
|
427
|
+
* @param {*} [options] Override http request option.
|
|
428
|
+
* @throws {RequiredError}
|
|
429
|
+
*/
|
|
430
|
+
uploadChunk(uploadId, chunkIndex, uploadChunkRequest, options) {
|
|
431
|
+
return (0, exports.FileUploadControllerApiFp)(this.configuration).uploadChunk(uploadId, chunkIndex, uploadChunkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
exports.FileUploadControllerApi = FileUploadControllerApi;
|
|
435
|
+
/**
|
|
436
|
+
* MinioCallbackControllerApi - axios parameter creator
|
|
437
|
+
*/
|
|
438
|
+
const MinioCallbackControllerApiAxiosParamCreator = function (configuration) {
|
|
439
|
+
return {
|
|
440
|
+
/**
|
|
441
|
+
*
|
|
442
|
+
* @param {string} authorization
|
|
443
|
+
* @param {MinioEvent} minioEvent
|
|
444
|
+
* @param {*} [options] Override http request option.
|
|
445
|
+
* @throws {RequiredError}
|
|
446
|
+
*/
|
|
447
|
+
handleMinioCallback: (authorization_1, minioEvent_1, ...args_1) => __awaiter(this, [authorization_1, minioEvent_1, ...args_1], void 0, function* (authorization, minioEvent, options = {}) {
|
|
448
|
+
// verify required parameter 'authorization' is not null or undefined
|
|
449
|
+
(0, common_1.assertParamExists)('handleMinioCallback', 'authorization', authorization);
|
|
450
|
+
// verify required parameter 'minioEvent' is not null or undefined
|
|
451
|
+
(0, common_1.assertParamExists)('handleMinioCallback', 'minioEvent', minioEvent);
|
|
452
|
+
const localVarPath = `/minio/callback`;
|
|
453
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
454
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
455
|
+
let baseOptions;
|
|
456
|
+
if (configuration) {
|
|
457
|
+
baseOptions = configuration.baseOptions;
|
|
458
|
+
}
|
|
459
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
460
|
+
const localVarHeaderParameter = {};
|
|
461
|
+
const localVarQueryParameter = {};
|
|
462
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
463
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
464
|
+
if (authorization != null) {
|
|
465
|
+
localVarHeaderParameter['Authorization'] = String(authorization);
|
|
466
|
+
}
|
|
467
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
468
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
469
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
470
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(minioEvent, localVarRequestOptions, configuration);
|
|
471
|
+
return {
|
|
472
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
473
|
+
options: localVarRequestOptions,
|
|
474
|
+
};
|
|
475
|
+
}),
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
exports.MinioCallbackControllerApiAxiosParamCreator = MinioCallbackControllerApiAxiosParamCreator;
|
|
479
|
+
/**
|
|
480
|
+
* MinioCallbackControllerApi - functional programming interface
|
|
481
|
+
*/
|
|
482
|
+
const MinioCallbackControllerApiFp = function (configuration) {
|
|
483
|
+
const localVarAxiosParamCreator = (0, exports.MinioCallbackControllerApiAxiosParamCreator)(configuration);
|
|
484
|
+
return {
|
|
485
|
+
/**
|
|
486
|
+
*
|
|
487
|
+
* @param {string} authorization
|
|
488
|
+
* @param {MinioEvent} minioEvent
|
|
489
|
+
* @param {*} [options] Override http request option.
|
|
490
|
+
* @throws {RequiredError}
|
|
491
|
+
*/
|
|
492
|
+
handleMinioCallback(authorization, minioEvent, options) {
|
|
493
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
494
|
+
var _a, _b, _c;
|
|
495
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.handleMinioCallback(authorization, minioEvent, options);
|
|
496
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
497
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MinioCallbackControllerApi.handleMinioCallback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
498
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
499
|
+
});
|
|
500
|
+
},
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
exports.MinioCallbackControllerApiFp = MinioCallbackControllerApiFp;
|
|
504
|
+
/**
|
|
505
|
+
* MinioCallbackControllerApi - factory interface
|
|
506
|
+
*/
|
|
507
|
+
const MinioCallbackControllerApiFactory = function (configuration, basePath, axios) {
|
|
508
|
+
const localVarFp = (0, exports.MinioCallbackControllerApiFp)(configuration);
|
|
509
|
+
return {
|
|
510
|
+
/**
|
|
511
|
+
*
|
|
512
|
+
* @param {string} authorization
|
|
513
|
+
* @param {MinioEvent} minioEvent
|
|
514
|
+
* @param {*} [options] Override http request option.
|
|
515
|
+
* @throws {RequiredError}
|
|
516
|
+
*/
|
|
517
|
+
handleMinioCallback(authorization, minioEvent, options) {
|
|
518
|
+
return localVarFp.handleMinioCallback(authorization, minioEvent, options).then((request) => request(axios, basePath));
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
exports.MinioCallbackControllerApiFactory = MinioCallbackControllerApiFactory;
|
|
523
|
+
/**
|
|
524
|
+
* MinioCallbackControllerApi - object-oriented interface
|
|
525
|
+
*/
|
|
526
|
+
class MinioCallbackControllerApi extends base_1.BaseAPI {
|
|
527
|
+
/**
|
|
528
|
+
*
|
|
529
|
+
* @param {string} authorization
|
|
530
|
+
* @param {MinioEvent} minioEvent
|
|
531
|
+
* @param {*} [options] Override http request option.
|
|
532
|
+
* @throws {RequiredError}
|
|
533
|
+
*/
|
|
534
|
+
handleMinioCallback(authorization, minioEvent, options) {
|
|
535
|
+
return (0, exports.MinioCallbackControllerApiFp)(this.configuration).handleMinioCallback(authorization, minioEvent, options).then((request) => request(this.axios, this.basePath));
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
exports.MinioCallbackControllerApi = MinioCallbackControllerApi;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI definition
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
export declare const COLLECTION_FORMATS: {
|
|
16
|
+
csv: string;
|
|
17
|
+
ssv: string;
|
|
18
|
+
tsv: string;
|
|
19
|
+
pipes: string;
|
|
20
|
+
};
|
|
21
|
+
export interface RequestArgs {
|
|
22
|
+
url: string;
|
|
23
|
+
options: RawAxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class BaseAPI {
|
|
26
|
+
protected basePath: string;
|
|
27
|
+
protected axios: AxiosInstance;
|
|
28
|
+
protected configuration: Configuration | undefined;
|
|
29
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
30
|
+
}
|
|
31
|
+
export declare class RequiredError extends Error {
|
|
32
|
+
field: string;
|
|
33
|
+
constructor(field: string, msg?: string);
|
|
34
|
+
}
|
|
35
|
+
interface ServerMap {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
url: string;
|
|
38
|
+
description: string;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export declare const operationServerMap: ServerMap;
|
|
42
|
+
export {};
|
package/dist/api/base.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* OpenAPI definition
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
exports.BASE_PATH = "http://localhost:8080/api".replace(/\/+$/, "");
|
|
22
|
+
exports.COLLECTION_FORMATS = {
|
|
23
|
+
csv: ",",
|
|
24
|
+
ssv: " ",
|
|
25
|
+
tsv: "\t",
|
|
26
|
+
pipes: "|",
|
|
27
|
+
};
|
|
28
|
+
class BaseAPI {
|
|
29
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
30
|
+
var _a;
|
|
31
|
+
this.basePath = basePath;
|
|
32
|
+
this.axios = axios;
|
|
33
|
+
if (configuration) {
|
|
34
|
+
this.configuration = configuration;
|
|
35
|
+
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.BaseAPI = BaseAPI;
|
|
40
|
+
;
|
|
41
|
+
class RequiredError extends Error {
|
|
42
|
+
constructor(field, msg) {
|
|
43
|
+
super(msg);
|
|
44
|
+
this.field = field;
|
|
45
|
+
this.name = "RequiredError";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.RequiredError = RequiredError;
|
|
49
|
+
exports.operationServerMap = {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI definition
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from "./configuration";
|
|
13
|
+
import type { RequestArgs } from "./base";
|
|
14
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @throws {RequiredError}
|
|
19
|
+
*/
|
|
20
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
21
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
22
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
23
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
24
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
25
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
26
|
+
/**
|
|
27
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
28
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
29
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
30
|
+
*/
|
|
31
|
+
export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
|
|
32
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
33
|
+
export declare const toPathString: (url: URL) => string;
|
|
34
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|