@sfxcode/nuxt-mongocamp-server 2.5.0 → 2.6.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/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/.openapi-generator/FILES +2 -0
- package/dist/runtime/api/apis/AdminApi.d.ts +28 -20
- package/dist/runtime/api/apis/AdminApi.js +49 -47
- package/dist/runtime/api/apis/ApplicationApi.d.ts +20 -0
- package/dist/runtime/api/apis/ApplicationApi.js +51 -0
- package/dist/runtime/api/apis/FileApi.d.ts +53 -0
- package/dist/runtime/api/apis/FileApi.js +81 -0
- package/dist/runtime/api/docs/AdminApi.md +33 -33
- package/dist/runtime/api/docs/ApplicationApi.md +79 -0
- package/dist/runtime/api/docs/CapabilityLimits.md +8 -0
- package/dist/runtime/api/docs/CollectionDeclaration.md +2 -0
- package/dist/runtime/api/docs/CollectionDeclarationIndexesInner.md +10 -0
- package/dist/runtime/api/docs/CollectionDeclarationReferencedByInner.md +40 -0
- package/dist/runtime/api/docs/FileApi.md +97 -0
- package/dist/runtime/api/models/CapabilityLimits.d.ts +16 -0
- package/dist/runtime/api/models/CapabilityLimits.js +12 -0
- package/dist/runtime/api/models/CollectionDeclaration.d.ts +5 -0
- package/dist/runtime/api/models/CollectionDeclaration.js +7 -0
- package/dist/runtime/api/models/CollectionDeclarationIndexesInner.d.ts +37 -0
- package/dist/runtime/api/models/CollectionDeclarationIndexesInner.js +21 -2
- package/dist/runtime/api/models/CollectionDeclarationReferencedByInner.d.ts +42 -0
- package/dist/runtime/api/models/CollectionDeclarationReferencedByInner.js +35 -0
- package/dist/runtime/api/models/CollectionDeclarationRefsInner.d.ts +2 -2
- package/dist/runtime/api/models/CollectionDeclarationRefsInner.js +2 -1
- package/dist/runtime/api/models/index.d.ts +1 -0
- package/dist/runtime/api/models/index.js +1 -0
- package/dist/runtime/client.d.ts +8 -0
- package/dist/runtime/client.js +3 -0
- package/dist/runtime/composables/mongocampApiAdmin.js +1 -1
- package/dist/runtime/utils/createMongocampApis.d.ts +9 -1
- package/dist/runtime/utils/createMongocampApis.js +9 -2
- package/dist/runtime/utils/keepLongs.d.ts +14 -0
- package/dist/runtime/utils/keepLongs.js +45 -0
- package/package.json +8 -4
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { defu } from 'defu';
|
|
|
4
4
|
export * from '../dist/runtime/api/index.js';
|
|
5
5
|
|
|
6
6
|
const name = "@sfxcode/nuxt-mongocamp-server";
|
|
7
|
-
const version = "2.
|
|
7
|
+
const version = "2.6.0";
|
|
8
8
|
|
|
9
9
|
const DefaultServerPrefix = "/api/mongocamp-server";
|
|
10
10
|
const DefaultCollectionsDir = "mongocamp";
|
|
@@ -26,6 +26,7 @@ docs/CollectionDeclaration.md
|
|
|
26
26
|
docs/CollectionDeclarationAudit.md
|
|
27
27
|
docs/CollectionDeclarationIndexesInner.md
|
|
28
28
|
docs/CollectionDeclarationOwner.md
|
|
29
|
+
docs/CollectionDeclarationReferencedByInner.md
|
|
29
30
|
docs/CollectionDeclarationRefsInner.md
|
|
30
31
|
docs/CollectionDeclarationSoftDelete.md
|
|
31
32
|
docs/CollectionDeclarationTimestamps.md
|
|
@@ -112,6 +113,7 @@ models/CollectionDeclaration.ts
|
|
|
112
113
|
models/CollectionDeclarationAudit.ts
|
|
113
114
|
models/CollectionDeclarationIndexesInner.ts
|
|
114
115
|
models/CollectionDeclarationOwner.ts
|
|
116
|
+
models/CollectionDeclarationReferencedByInner.ts
|
|
115
117
|
models/CollectionDeclarationRefsInner.ts
|
|
116
118
|
models/CollectionDeclarationSoftDelete.ts
|
|
117
119
|
models/CollectionDeclarationTimestamps.ts
|
|
@@ -41,6 +41,12 @@ export interface DeleteUserRequest {
|
|
|
41
41
|
*/
|
|
42
42
|
userId: string;
|
|
43
43
|
}
|
|
44
|
+
export interface GenerateNewApiKeyForUserRequest {
|
|
45
|
+
/**
|
|
46
|
+
* UserId to Update
|
|
47
|
+
*/
|
|
48
|
+
userId: string;
|
|
49
|
+
}
|
|
44
50
|
export interface GetRoleRequest {
|
|
45
51
|
/**
|
|
46
52
|
* RoleKey to search
|
|
@@ -53,12 +59,6 @@ export interface GetUserRequest {
|
|
|
53
59
|
*/
|
|
54
60
|
userId: string;
|
|
55
61
|
}
|
|
56
|
-
export interface GnerateNewApiKeyForUserRequest {
|
|
57
|
-
/**
|
|
58
|
-
* UserId to Update
|
|
59
|
-
*/
|
|
60
|
-
userId: string;
|
|
61
|
-
}
|
|
62
62
|
export interface ListRolesRequest {
|
|
63
63
|
/**
|
|
64
64
|
* Filter by a part of the userId
|
|
@@ -177,6 +177,20 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
177
177
|
* Delete User
|
|
178
178
|
*/
|
|
179
179
|
deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueBoolean>;
|
|
180
|
+
/**
|
|
181
|
+
* Creates request options for generateNewApiKeyForUser without sending the request
|
|
182
|
+
*/
|
|
183
|
+
generateNewApiKeyForUserRequestOpts(requestParameters: GenerateNewApiKeyForUserRequest): Promise<runtime.RequestOpts>;
|
|
184
|
+
/**
|
|
185
|
+
* Generate a new API key for the user
|
|
186
|
+
* Update ApiKey
|
|
187
|
+
*/
|
|
188
|
+
generateNewApiKeyForUserRaw(requestParameters: GenerateNewApiKeyForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JsonValueString>>;
|
|
189
|
+
/**
|
|
190
|
+
* Generate a new API key for the user
|
|
191
|
+
* Update ApiKey
|
|
192
|
+
*/
|
|
193
|
+
generateNewApiKeyForUser(requestParameters: GenerateNewApiKeyForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueString>;
|
|
180
194
|
/**
|
|
181
195
|
* Creates request options for getRole without sending the request
|
|
182
196
|
*/
|
|
@@ -205,20 +219,6 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
205
219
|
* UserProfile for userId
|
|
206
220
|
*/
|
|
207
221
|
getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserProfile>;
|
|
208
|
-
/**
|
|
209
|
-
* Creates request options for gnerateNewApiKeyForUser without sending the request
|
|
210
|
-
*/
|
|
211
|
-
gnerateNewApiKeyForUserRequestOpts(requestParameters: GnerateNewApiKeyForUserRequest): Promise<runtime.RequestOpts>;
|
|
212
|
-
/**
|
|
213
|
-
* Generate a new API key for the user
|
|
214
|
-
* Update ApiKey
|
|
215
|
-
*/
|
|
216
|
-
gnerateNewApiKeyForUserRaw(requestParameters: GnerateNewApiKeyForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JsonValueString>>;
|
|
217
|
-
/**
|
|
218
|
-
* Generate a new API key for the user
|
|
219
|
-
* Update ApiKey
|
|
220
|
-
*/
|
|
221
|
-
gnerateNewApiKeyForUser(requestParameters: GnerateNewApiKeyForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueString>;
|
|
222
222
|
/**
|
|
223
223
|
* Creates request options for listRoles without sending the request
|
|
224
224
|
*/
|
|
@@ -290,3 +290,11 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
290
290
|
*/
|
|
291
291
|
updateRolesForUser(requestParameters: UpdateRolesForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserProfile>;
|
|
292
292
|
}
|
|
293
|
+
/** @deprecated misspelled before 2.6.0, use {@link GenerateNewApiKeyForUserRequest} */
|
|
294
|
+
export type GnerateNewApiKeyForUserRequest = GenerateNewApiKeyForUserRequest;
|
|
295
|
+
export interface AdminApi {
|
|
296
|
+
/** @deprecated misspelled before 2.6.0, use {@link AdminApi.generateNewApiKeyForUser} */
|
|
297
|
+
gnerateNewApiKeyForUser(requestParameters: GenerateNewApiKeyForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueString>;
|
|
298
|
+
/** @deprecated misspelled before 2.6.0, use {@link AdminApi.generateNewApiKeyForUserRaw} */
|
|
299
|
+
gnerateNewApiKeyForUserRaw(requestParameters: GenerateNewApiKeyForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JsonValueString>>;
|
|
300
|
+
}
|
|
@@ -229,13 +229,13 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
229
229
|
return await response.value();
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
|
-
* Creates request options for
|
|
232
|
+
* Creates request options for generateNewApiKeyForUser without sending the request
|
|
233
233
|
*/
|
|
234
|
-
async
|
|
235
|
-
if (requestParameters["
|
|
234
|
+
async generateNewApiKeyForUserRequestOpts(requestParameters) {
|
|
235
|
+
if (requestParameters["userId"] == null) {
|
|
236
236
|
throw new runtime.RequiredError(
|
|
237
|
-
"
|
|
238
|
-
'Required parameter "
|
|
237
|
+
"userId",
|
|
238
|
+
'Required parameter "userId" was null or undefined when calling generateNewApiKeyForUser().'
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
241
|
const queryParameters = {};
|
|
@@ -253,40 +253,40 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
253
253
|
if (this.configuration && this.configuration.apiKey) {
|
|
254
254
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
255
255
|
}
|
|
256
|
-
let urlPath = `/admin/
|
|
257
|
-
urlPath = urlPath.replace("{
|
|
256
|
+
let urlPath = `/admin/users/{userId}/apikey`;
|
|
257
|
+
urlPath = urlPath.replace("{userId}", encodeURIComponent(String(requestParameters["userId"])));
|
|
258
258
|
return {
|
|
259
259
|
path: urlPath,
|
|
260
|
-
method: "
|
|
260
|
+
method: "PATCH",
|
|
261
261
|
headers: headerParameters,
|
|
262
262
|
query: queryParameters
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
266
|
+
* Generate a new API key for the user
|
|
267
|
+
* Update ApiKey
|
|
268
268
|
*/
|
|
269
|
-
async
|
|
270
|
-
const requestOptions = await this.
|
|
269
|
+
async generateNewApiKeyForUserRaw(requestParameters, initOverrides) {
|
|
270
|
+
const requestOptions = await this.generateNewApiKeyForUserRequestOpts(requestParameters);
|
|
271
271
|
const response = await this.request(requestOptions, initOverrides);
|
|
272
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
272
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JsonValueStringFromJSON(jsonValue));
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
275
|
-
*
|
|
276
|
-
*
|
|
275
|
+
* Generate a new API key for the user
|
|
276
|
+
* Update ApiKey
|
|
277
277
|
*/
|
|
278
|
-
async
|
|
279
|
-
const response = await this.
|
|
278
|
+
async generateNewApiKeyForUser(requestParameters, initOverrides) {
|
|
279
|
+
const response = await this.generateNewApiKeyForUserRaw(requestParameters, initOverrides);
|
|
280
280
|
return await response.value();
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
|
-
* Creates request options for
|
|
283
|
+
* Creates request options for getRole without sending the request
|
|
284
284
|
*/
|
|
285
|
-
async
|
|
286
|
-
if (requestParameters["
|
|
285
|
+
async getRoleRequestOpts(requestParameters) {
|
|
286
|
+
if (requestParameters["roleName"] == null) {
|
|
287
287
|
throw new runtime.RequiredError(
|
|
288
|
-
"
|
|
289
|
-
'Required parameter "
|
|
288
|
+
"roleName",
|
|
289
|
+
'Required parameter "roleName" was null or undefined when calling getRole().'
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
const queryParameters = {};
|
|
@@ -304,8 +304,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
304
304
|
if (this.configuration && this.configuration.apiKey) {
|
|
305
305
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
306
306
|
}
|
|
307
|
-
let urlPath = `/admin/
|
|
308
|
-
urlPath = urlPath.replace("{
|
|
307
|
+
let urlPath = `/admin/roles/{roleName}`;
|
|
308
|
+
urlPath = urlPath.replace("{roleName}", encodeURIComponent(String(requestParameters["roleName"])));
|
|
309
309
|
return {
|
|
310
310
|
path: urlPath,
|
|
311
311
|
method: "GET",
|
|
@@ -314,30 +314,30 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
|
-
* Get
|
|
318
|
-
*
|
|
317
|
+
* Get Role by RoleKey
|
|
318
|
+
* Get Role
|
|
319
319
|
*/
|
|
320
|
-
async
|
|
321
|
-
const requestOptions = await this.
|
|
320
|
+
async getRoleRaw(requestParameters, initOverrides) {
|
|
321
|
+
const requestOptions = await this.getRoleRequestOpts(requestParameters);
|
|
322
322
|
const response = await this.request(requestOptions, initOverrides);
|
|
323
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
323
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue));
|
|
324
324
|
}
|
|
325
325
|
/**
|
|
326
|
-
* Get
|
|
327
|
-
*
|
|
326
|
+
* Get Role by RoleKey
|
|
327
|
+
* Get Role
|
|
328
328
|
*/
|
|
329
|
-
async
|
|
330
|
-
const response = await this.
|
|
329
|
+
async getRole(requestParameters, initOverrides) {
|
|
330
|
+
const response = await this.getRoleRaw(requestParameters, initOverrides);
|
|
331
331
|
return await response.value();
|
|
332
332
|
}
|
|
333
333
|
/**
|
|
334
|
-
* Creates request options for
|
|
334
|
+
* Creates request options for getUser without sending the request
|
|
335
335
|
*/
|
|
336
|
-
async
|
|
336
|
+
async getUserRequestOpts(requestParameters) {
|
|
337
337
|
if (requestParameters["userId"] == null) {
|
|
338
338
|
throw new runtime.RequiredError(
|
|
339
339
|
"userId",
|
|
340
|
-
'Required parameter "userId" was null or undefined when calling
|
|
340
|
+
'Required parameter "userId" was null or undefined when calling getUser().'
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
343
|
const queryParameters = {};
|
|
@@ -355,30 +355,30 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
355
355
|
if (this.configuration && this.configuration.apiKey) {
|
|
356
356
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
357
357
|
}
|
|
358
|
-
let urlPath = `/admin/users/{userId}
|
|
358
|
+
let urlPath = `/admin/users/{userId}`;
|
|
359
359
|
urlPath = urlPath.replace("{userId}", encodeURIComponent(String(requestParameters["userId"])));
|
|
360
360
|
return {
|
|
361
361
|
path: urlPath,
|
|
362
|
-
method: "
|
|
362
|
+
method: "GET",
|
|
363
363
|
headers: headerParameters,
|
|
364
364
|
query: queryParameters
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
368
|
-
*
|
|
369
|
-
*
|
|
368
|
+
* Get UserProfile for user
|
|
369
|
+
* UserProfile for userId
|
|
370
370
|
*/
|
|
371
|
-
async
|
|
372
|
-
const requestOptions = await this.
|
|
371
|
+
async getUserRaw(requestParameters, initOverrides) {
|
|
372
|
+
const requestOptions = await this.getUserRequestOpts(requestParameters);
|
|
373
373
|
const response = await this.request(requestOptions, initOverrides);
|
|
374
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
374
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserProfileFromJSON(jsonValue));
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
|
-
*
|
|
378
|
-
*
|
|
377
|
+
* Get UserProfile for user
|
|
378
|
+
* UserProfile for userId
|
|
379
379
|
*/
|
|
380
|
-
async
|
|
381
|
-
const response = await this.
|
|
380
|
+
async getUser(requestParameters, initOverrides) {
|
|
381
|
+
const response = await this.getUserRaw(requestParameters, initOverrides);
|
|
382
382
|
return await response.value();
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
@@ -659,3 +659,5 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
659
659
|
return await response.value();
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
+
AdminApi.prototype.gnerateNewApiKeyForUser = AdminApi.prototype.generateNewApiKeyForUser;
|
|
663
|
+
AdminApi.prototype.gnerateNewApiKeyForUserRaw = AdminApi.prototype.generateNewApiKeyForUserRaw;
|
|
@@ -20,6 +20,12 @@ export interface GetConfigRequest {
|
|
|
20
20
|
*/
|
|
21
21
|
configurationKey: string;
|
|
22
22
|
}
|
|
23
|
+
export interface ResetConfigurationRequest {
|
|
24
|
+
/**
|
|
25
|
+
* configurationKey to reset
|
|
26
|
+
*/
|
|
27
|
+
configurationKey: string;
|
|
28
|
+
}
|
|
23
29
|
export interface ShutdownRequest {
|
|
24
30
|
/**
|
|
25
31
|
* Shutdown Server and don't send reboot event.
|
|
@@ -68,6 +74,20 @@ export declare class ApplicationApi extends runtime.BaseAPI {
|
|
|
68
74
|
* List Configurations
|
|
69
75
|
*/
|
|
70
76
|
listConfigurations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MongoCampConfiguration>>;
|
|
77
|
+
/**
|
|
78
|
+
* Creates request options for resetConfiguration without sending the request
|
|
79
|
+
*/
|
|
80
|
+
resetConfigurationRequestOpts(requestParameters: ResetConfigurationRequest): Promise<runtime.RequestOpts>;
|
|
81
|
+
/**
|
|
82
|
+
* Reset the Configuration to its default value (2.6.0), at once for a key that needs no restart. 404 for an unknown key, 400 for a key that is read at the start only, set by the environment or has a generated default (AUTH_SECRET).
|
|
83
|
+
* Reset Configuration
|
|
84
|
+
*/
|
|
85
|
+
resetConfigurationRaw(requestParameters: ResetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JsonValueBoolean>>;
|
|
86
|
+
/**
|
|
87
|
+
* Reset the Configuration to its default value (2.6.0), at once for a key that needs no restart. 404 for an unknown key, 400 for a key that is read at the start only, set by the environment or has a generated default (AUTH_SECRET).
|
|
88
|
+
* Reset Configuration
|
|
89
|
+
*/
|
|
90
|
+
resetConfiguration(requestParameters: ResetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueBoolean>;
|
|
71
91
|
/**
|
|
72
92
|
* Creates request options for settings without sending the request
|
|
73
93
|
*/
|
|
@@ -107,6 +107,57 @@ export class ApplicationApi extends runtime.BaseAPI {
|
|
|
107
107
|
const response = await this.listConfigurationsRaw(initOverrides);
|
|
108
108
|
return await response.value();
|
|
109
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Creates request options for resetConfiguration without sending the request
|
|
112
|
+
*/
|
|
113
|
+
async resetConfigurationRequestOpts(requestParameters) {
|
|
114
|
+
if (requestParameters["configurationKey"] == null) {
|
|
115
|
+
throw new runtime.RequiredError(
|
|
116
|
+
"configurationKey",
|
|
117
|
+
'Required parameter "configurationKey" was null or undefined when calling resetConfiguration().'
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
123
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
124
|
+
}
|
|
125
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
126
|
+
const token = this.configuration.accessToken;
|
|
127
|
+
const tokenString = await token("httpAuth", []);
|
|
128
|
+
if (tokenString) {
|
|
129
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
133
|
+
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
134
|
+
}
|
|
135
|
+
let urlPath = `/system/configurations/{configurationKey}`;
|
|
136
|
+
urlPath = urlPath.replace("{configurationKey}", encodeURIComponent(String(requestParameters["configurationKey"])));
|
|
137
|
+
return {
|
|
138
|
+
path: urlPath,
|
|
139
|
+
method: "DELETE",
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Reset the Configuration to its default value (2.6.0), at once for a key that needs no restart. 404 for an unknown key, 400 for a key that is read at the start only, set by the environment or has a generated default (AUTH_SECRET).
|
|
146
|
+
* Reset Configuration
|
|
147
|
+
*/
|
|
148
|
+
async resetConfigurationRaw(requestParameters, initOverrides) {
|
|
149
|
+
const requestOptions = await this.resetConfigurationRequestOpts(requestParameters);
|
|
150
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JsonValueBooleanFromJSON(jsonValue));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Reset the Configuration to its default value (2.6.0), at once for a key that needs no restart. 404 for an unknown key, 400 for a key that is read at the start only, set by the environment or has a generated default (AUTH_SECRET).
|
|
155
|
+
* Reset Configuration
|
|
156
|
+
*/
|
|
157
|
+
async resetConfiguration(requestParameters, initOverrides) {
|
|
158
|
+
const response = await this.resetConfigurationRaw(requestParameters, initOverrides);
|
|
159
|
+
return await response.value();
|
|
160
|
+
}
|
|
110
161
|
/**
|
|
111
162
|
* Creates request options for settings without sending the request
|
|
112
163
|
*/
|
|
@@ -14,6 +14,7 @@ import { type DeleteResponse } from '../models/DeleteResponse.js';
|
|
|
14
14
|
import { type FileInformation } from '../models/FileInformation.js';
|
|
15
15
|
import { type InsertResponse } from '../models/InsertResponse.js';
|
|
16
16
|
import { type MongoFindRequest } from '../models/MongoFindRequest.js';
|
|
17
|
+
import { type SearchRequest } from '../models/SearchRequest.js';
|
|
17
18
|
import { type UpdateFileInformationRequest } from '../models/UpdateFileInformationRequest.js';
|
|
18
19
|
import { type UpdateResponse } from '../models/UpdateResponse.js';
|
|
19
20
|
export interface DeleteFileRequest {
|
|
@@ -124,6 +125,36 @@ export interface ListFilesRequest {
|
|
|
124
125
|
*/
|
|
125
126
|
after?: string;
|
|
126
127
|
}
|
|
128
|
+
export interface SearchFilesRequest {
|
|
129
|
+
/**
|
|
130
|
+
* The name of your MongoDb Collection
|
|
131
|
+
*/
|
|
132
|
+
bucketName: string;
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
searchRequest: SearchRequest;
|
|
137
|
+
/**
|
|
138
|
+
* Count elements per page
|
|
139
|
+
*/
|
|
140
|
+
rowsPerPage?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Requested page of the ResultSets
|
|
143
|
+
*/
|
|
144
|
+
page?: number;
|
|
145
|
+
/**
|
|
146
|
+
* How the result is counted: exact (default) or none (no count headers, no count query)
|
|
147
|
+
*/
|
|
148
|
+
count?: SearchFilesCountEnum;
|
|
149
|
+
/**
|
|
150
|
+
* Cursor paging: the x-pagination-next value of the previous page, empty for the first page. The sort always ends with _id; cannot be combined with page
|
|
151
|
+
*/
|
|
152
|
+
after?: string;
|
|
153
|
+
/**
|
|
154
|
+
* true: wildcards and prefixes of the Lucene filter ignore the case.
|
|
155
|
+
*/
|
|
156
|
+
filterCaseInsensitive?: boolean;
|
|
157
|
+
}
|
|
127
158
|
export interface UpdateFileInformationOperationRequest {
|
|
128
159
|
/**
|
|
129
160
|
* The name of your MongoDb Collection
|
|
@@ -226,6 +257,20 @@ export declare class FileApi extends runtime.BaseAPI {
|
|
|
226
257
|
* Files in Bucket
|
|
227
258
|
*/
|
|
228
259
|
listFiles(requestParameters: ListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FileInformation>>;
|
|
260
|
+
/**
|
|
261
|
+
* Creates request options for searchFiles without sending the request
|
|
262
|
+
*/
|
|
263
|
+
searchFilesRequestOpts(requestParameters: SearchFilesRequest): Promise<runtime.RequestOpts>;
|
|
264
|
+
/**
|
|
265
|
+
* The files of the bucket with a Lucene filter (2.6.0), like the search of documents: filter, sort and projection in the request body (no URL limit), fields of the files collection (filename, length, uploadDate, metadata.*). The operators of FILTER_OPERATORS_DENIED are refused; PAGING_MAX_ROWS applies.
|
|
266
|
+
* Search Files in Bucket
|
|
267
|
+
*/
|
|
268
|
+
searchFilesRaw(requestParameters: SearchFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<FileInformation>>>;
|
|
269
|
+
/**
|
|
270
|
+
* The files of the bucket with a Lucene filter (2.6.0), like the search of documents: filter, sort and projection in the request body (no URL limit), fields of the files collection (filename, length, uploadDate, metadata.*). The operators of FILTER_OPERATORS_DENIED are refused; PAGING_MAX_ROWS applies.
|
|
271
|
+
* Search Files in Bucket
|
|
272
|
+
*/
|
|
273
|
+
searchFiles(requestParameters: SearchFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FileInformation>>;
|
|
229
274
|
/**
|
|
230
275
|
* Creates request options for updateFileInformation without sending the request
|
|
231
276
|
*/
|
|
@@ -257,3 +302,11 @@ export declare const ListFilesCountEnum: {
|
|
|
257
302
|
readonly None: "none";
|
|
258
303
|
};
|
|
259
304
|
export type ListFilesCountEnum = typeof ListFilesCountEnum[keyof typeof ListFilesCountEnum];
|
|
305
|
+
/**
|
|
306
|
+
* @export
|
|
307
|
+
*/
|
|
308
|
+
export declare const SearchFilesCountEnum: {
|
|
309
|
+
readonly Exact: "exact";
|
|
310
|
+
readonly None: "none";
|
|
311
|
+
};
|
|
312
|
+
export type SearchFilesCountEnum = typeof SearchFilesCountEnum[keyof typeof SearchFilesCountEnum];
|
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
MongoFindRequestToJSON
|
|
13
13
|
} from "../models/MongoFindRequest.js";
|
|
14
|
+
import {
|
|
15
|
+
SearchRequestToJSON
|
|
16
|
+
} from "../models/SearchRequest.js";
|
|
14
17
|
import {
|
|
15
18
|
UpdateFileInformationRequestToJSON
|
|
16
19
|
} from "../models/UpdateFileInformationRequest.js";
|
|
@@ -420,6 +423,80 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
420
423
|
const response = await this.listFilesRaw(requestParameters, initOverrides);
|
|
421
424
|
return await response.value();
|
|
422
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* Creates request options for searchFiles without sending the request
|
|
428
|
+
*/
|
|
429
|
+
async searchFilesRequestOpts(requestParameters) {
|
|
430
|
+
if (requestParameters["bucketName"] == null) {
|
|
431
|
+
throw new runtime.RequiredError(
|
|
432
|
+
"bucketName",
|
|
433
|
+
'Required parameter "bucketName" was null or undefined when calling searchFiles().'
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
if (requestParameters["searchRequest"] == null) {
|
|
437
|
+
throw new runtime.RequiredError(
|
|
438
|
+
"searchRequest",
|
|
439
|
+
'Required parameter "searchRequest" was null or undefined when calling searchFiles().'
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
const queryParameters = {};
|
|
443
|
+
if (requestParameters["rowsPerPage"] != null) {
|
|
444
|
+
queryParameters["rowsPerPage"] = requestParameters["rowsPerPage"];
|
|
445
|
+
}
|
|
446
|
+
if (requestParameters["page"] != null) {
|
|
447
|
+
queryParameters["page"] = requestParameters["page"];
|
|
448
|
+
}
|
|
449
|
+
if (requestParameters["count"] != null) {
|
|
450
|
+
queryParameters["count"] = requestParameters["count"];
|
|
451
|
+
}
|
|
452
|
+
if (requestParameters["after"] != null) {
|
|
453
|
+
queryParameters["after"] = requestParameters["after"];
|
|
454
|
+
}
|
|
455
|
+
if (requestParameters["filterCaseInsensitive"] != null) {
|
|
456
|
+
queryParameters["filterCaseInsensitive"] = requestParameters["filterCaseInsensitive"];
|
|
457
|
+
}
|
|
458
|
+
const headerParameters = {};
|
|
459
|
+
headerParameters["Content-Type"] = "application/json";
|
|
460
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
461
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
462
|
+
}
|
|
463
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
464
|
+
const token = this.configuration.accessToken;
|
|
465
|
+
const tokenString = await token("httpAuth", []);
|
|
466
|
+
if (tokenString) {
|
|
467
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
471
|
+
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
472
|
+
}
|
|
473
|
+
let urlPath = `/mongodb/buckets/{bucketName}/files/search`;
|
|
474
|
+
urlPath = urlPath.replace("{bucketName}", encodeURIComponent(String(requestParameters["bucketName"])));
|
|
475
|
+
return {
|
|
476
|
+
path: urlPath,
|
|
477
|
+
method: "POST",
|
|
478
|
+
headers: headerParameters,
|
|
479
|
+
query: queryParameters,
|
|
480
|
+
body: SearchRequestToJSON(requestParameters["searchRequest"])
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* The files of the bucket with a Lucene filter (2.6.0), like the search of documents: filter, sort and projection in the request body (no URL limit), fields of the files collection (filename, length, uploadDate, metadata.*). The operators of FILTER_OPERATORS_DENIED are refused; PAGING_MAX_ROWS applies.
|
|
485
|
+
* Search Files in Bucket
|
|
486
|
+
*/
|
|
487
|
+
async searchFilesRaw(requestParameters, initOverrides) {
|
|
488
|
+
const requestOptions = await this.searchFilesRequestOpts(requestParameters);
|
|
489
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
490
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* The files of the bucket with a Lucene filter (2.6.0), like the search of documents: filter, sort and projection in the request body (no URL limit), fields of the files collection (filename, length, uploadDate, metadata.*). The operators of FILTER_OPERATORS_DENIED are refused; PAGING_MAX_ROWS applies.
|
|
494
|
+
* Search Files in Bucket
|
|
495
|
+
*/
|
|
496
|
+
async searchFiles(requestParameters, initOverrides) {
|
|
497
|
+
const response = await this.searchFilesRaw(requestParameters, initOverrides);
|
|
498
|
+
return await response.value();
|
|
499
|
+
}
|
|
423
500
|
/**
|
|
424
501
|
* Creates request options for updateFileInformation without sending the request
|
|
425
502
|
*/
|
|
@@ -495,3 +572,7 @@ export const ListFilesCountEnum = {
|
|
|
495
572
|
Exact: "exact",
|
|
496
573
|
None: "none"
|
|
497
574
|
};
|
|
575
|
+
export const SearchFilesCountEnum = {
|
|
576
|
+
Exact: "exact",
|
|
577
|
+
None: "none"
|
|
578
|
+
};
|