@sfxcode/nuxt-mongocamp-server 1.3.0 → 1.4.1

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.
@@ -52,6 +52,10 @@ export interface UpdateFileInformationOperationRequest {
52
52
  *
53
53
  */
54
54
  export declare class FileApi extends runtime.BaseAPI {
55
+ /**
56
+ * Creates request options for deleteFile without sending the request
57
+ */
58
+ deleteFileRequestOpts(requestParameters: DeleteFileRequest): Promise<runtime.RequestOpts>;
55
59
  /**
56
60
  * Delete one File from given Bucket
57
61
  * Delete File from Bucket
@@ -62,6 +66,10 @@ export declare class FileApi extends runtime.BaseAPI {
62
66
  * Delete File from Bucket
63
67
  */
64
68
  deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
69
+ /**
70
+ * Creates request options for findFiles without sending the request
71
+ */
72
+ findFilesRequestOpts(requestParameters: FindFilesRequest): Promise<runtime.RequestOpts>;
65
73
  /**
66
74
  * Alternative to GET Route for more complex queries and URL max. Length
67
75
  * Files in Bucket
@@ -72,6 +80,10 @@ export declare class FileApi extends runtime.BaseAPI {
72
80
  * Files in Bucket
73
81
  */
74
82
  findFiles(requestParameters: FindFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FileInformation>>;
83
+ /**
84
+ * Creates request options for getFile without sending the request
85
+ */
86
+ getFileRequestOpts(requestParameters: GetFileRequest): Promise<runtime.RequestOpts>;
75
87
  /**
76
88
  * Get File from given Bucket
77
89
  * File from Bucket
@@ -82,6 +94,10 @@ export declare class FileApi extends runtime.BaseAPI {
82
94
  * File from Bucket
83
95
  */
84
96
  getFile(requestParameters: GetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
97
+ /**
98
+ * Creates request options for getFileInformation without sending the request
99
+ */
100
+ getFileInformationRequestOpts(requestParameters: GetFileInformationRequest): Promise<runtime.RequestOpts>;
85
101
  /**
86
102
  * Get one FileInformation from given Bucket
87
103
  * FileInformation from Bucket
@@ -92,6 +108,10 @@ export declare class FileApi extends runtime.BaseAPI {
92
108
  * FileInformation from Bucket
93
109
  */
94
110
  getFileInformation(requestParameters: GetFileInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileInformation>;
111
+ /**
112
+ * Creates request options for insertFile without sending the request
113
+ */
114
+ insertFileRequestOpts(requestParameters: InsertFileRequest): Promise<runtime.RequestOpts>;
95
115
  /**
96
116
  * Insert one File in given Bucket
97
117
  * Insert File
@@ -102,6 +122,10 @@ export declare class FileApi extends runtime.BaseAPI {
102
122
  * Insert File
103
123
  */
104
124
  insertFile(requestParameters: InsertFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InsertResponse>;
125
+ /**
126
+ * Creates request options for listFiles without sending the request
127
+ */
128
+ listFilesRequestOpts(requestParameters: ListFilesRequest): Promise<runtime.RequestOpts>;
105
129
  /**
106
130
  * Get Files paginated from given Bucket
107
131
  * Files in Bucket
@@ -112,6 +136,10 @@ export declare class FileApi extends runtime.BaseAPI {
112
136
  * Files in Bucket
113
137
  */
114
138
  listFiles(requestParameters: ListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FileInformation>>;
139
+ /**
140
+ * Creates request options for updateFileInformation without sending the request
141
+ */
142
+ updateFileInformationRequestOpts(requestParameters: UpdateFileInformationOperationRequest): Promise<runtime.RequestOpts>;
115
143
  /**
116
144
  * Replace MetaData and potential update FileName
117
145
  * Update FileInformation in Bucket
@@ -9,10 +9,9 @@ import {
9
9
  } from "../models/index.js";
10
10
  export class FileApi extends runtime.BaseAPI {
11
11
  /**
12
- * Delete one File from given Bucket
13
- * Delete File from Bucket
12
+ * Creates request options for deleteFile without sending the request
14
13
  */
15
- async deleteFileRaw(requestParameters, initOverrides) {
14
+ async deleteFileRequestOpts(requestParameters) {
16
15
  if (requestParameters["bucketName"] == null) {
17
16
  throw new runtime.RequiredError(
18
17
  "bucketName",
@@ -43,12 +42,20 @@ export class FileApi extends runtime.BaseAPI {
43
42
  let urlPath = `/mongodb/buckets/{bucketName}/files/{fileId}`;
44
43
  urlPath = urlPath.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters["bucketName"])));
45
44
  urlPath = urlPath.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters["fileId"])));
46
- const response = await this.request({
45
+ return {
47
46
  path: urlPath,
48
47
  method: "DELETE",
49
48
  headers: headerParameters,
50
49
  query: queryParameters
51
- }, initOverrides);
50
+ };
51
+ }
52
+ /**
53
+ * Delete one File from given Bucket
54
+ * Delete File from Bucket
55
+ */
56
+ async deleteFileRaw(requestParameters, initOverrides) {
57
+ const requestOptions = await this.deleteFileRequestOpts(requestParameters);
58
+ const response = await this.request(requestOptions, initOverrides);
52
59
  return new runtime.JSONApiResponse(response, (jsonValue) => DeleteResponseFromJSON(jsonValue));
53
60
  }
54
61
  /**
@@ -60,10 +67,9 @@ export class FileApi extends runtime.BaseAPI {
60
67
  return await response.value();
61
68
  }
62
69
  /**
63
- * Alternative to GET Route for more complex queries and URL max. Length
64
- * Files in Bucket
70
+ * Creates request options for findFiles without sending the request
65
71
  */
66
- async findFilesRaw(requestParameters, initOverrides) {
72
+ async findFilesRequestOpts(requestParameters) {
67
73
  if (requestParameters["bucketName"] == null) {
68
74
  throw new runtime.RequiredError(
69
75
  "bucketName",
@@ -100,13 +106,21 @@ export class FileApi extends runtime.BaseAPI {
100
106
  }
101
107
  let urlPath = `/mongodb/buckets/{bucketName}/files`;
102
108
  urlPath = urlPath.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters["bucketName"])));
103
- const response = await this.request({
109
+ return {
104
110
  path: urlPath,
105
111
  method: "POST",
106
112
  headers: headerParameters,
107
113
  query: queryParameters,
108
114
  body: MongoFindRequestToJSON(requestParameters["mongoFindRequest"])
109
- }, initOverrides);
115
+ };
116
+ }
117
+ /**
118
+ * Alternative to GET Route for more complex queries and URL max. Length
119
+ * Files in Bucket
120
+ */
121
+ async findFilesRaw(requestParameters, initOverrides) {
122
+ const requestOptions = await this.findFilesRequestOpts(requestParameters);
123
+ const response = await this.request(requestOptions, initOverrides);
110
124
  return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
111
125
  }
112
126
  /**
@@ -118,10 +132,9 @@ export class FileApi extends runtime.BaseAPI {
118
132
  return await response.value();
119
133
  }
120
134
  /**
121
- * Get File from given Bucket
122
- * File from Bucket
135
+ * Creates request options for getFile without sending the request
123
136
  */
124
- async getFileRaw(requestParameters, initOverrides) {
137
+ async getFileRequestOpts(requestParameters) {
125
138
  if (requestParameters["bucketName"] == null) {
126
139
  throw new runtime.RequiredError(
127
140
  "bucketName",
@@ -152,12 +165,20 @@ export class FileApi extends runtime.BaseAPI {
152
165
  let urlPath = `/mongodb/buckets/{bucketName}/files/{fileId}/file`;
153
166
  urlPath = urlPath.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters["bucketName"])));
154
167
  urlPath = urlPath.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters["fileId"])));
155
- const response = await this.request({
168
+ return {
156
169
  path: urlPath,
157
170
  method: "GET",
158
171
  headers: headerParameters,
159
172
  query: queryParameters
160
- }, initOverrides);
173
+ };
174
+ }
175
+ /**
176
+ * Get File from given Bucket
177
+ * File from Bucket
178
+ */
179
+ async getFileRaw(requestParameters, initOverrides) {
180
+ const requestOptions = await this.getFileRequestOpts(requestParameters);
181
+ const response = await this.request(requestOptions, initOverrides);
161
182
  return new runtime.BlobApiResponse(response);
162
183
  }
163
184
  /**
@@ -169,10 +190,9 @@ export class FileApi extends runtime.BaseAPI {
169
190
  return await response.value();
170
191
  }
171
192
  /**
172
- * Get one FileInformation from given Bucket
173
- * FileInformation from Bucket
193
+ * Creates request options for getFileInformation without sending the request
174
194
  */
175
- async getFileInformationRaw(requestParameters, initOverrides) {
195
+ async getFileInformationRequestOpts(requestParameters) {
176
196
  if (requestParameters["bucketName"] == null) {
177
197
  throw new runtime.RequiredError(
178
198
  "bucketName",
@@ -203,12 +223,20 @@ export class FileApi extends runtime.BaseAPI {
203
223
  let urlPath = `/mongodb/buckets/{bucketName}/files/{fileId}`;
204
224
  urlPath = urlPath.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters["bucketName"])));
205
225
  urlPath = urlPath.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters["fileId"])));
206
- const response = await this.request({
226
+ return {
207
227
  path: urlPath,
208
228
  method: "GET",
209
229
  headers: headerParameters,
210
230
  query: queryParameters
211
- }, initOverrides);
231
+ };
232
+ }
233
+ /**
234
+ * Get one FileInformation from given Bucket
235
+ * FileInformation from Bucket
236
+ */
237
+ async getFileInformationRaw(requestParameters, initOverrides) {
238
+ const requestOptions = await this.getFileInformationRequestOpts(requestParameters);
239
+ const response = await this.request(requestOptions, initOverrides);
212
240
  return new runtime.JSONApiResponse(response, (jsonValue) => FileInformationFromJSON(jsonValue));
213
241
  }
214
242
  /**
@@ -220,10 +248,9 @@ export class FileApi extends runtime.BaseAPI {
220
248
  return await response.value();
221
249
  }
222
250
  /**
223
- * Insert one File in given Bucket
224
- * Insert File
251
+ * Creates request options for insertFile without sending the request
225
252
  */
226
- async insertFileRaw(requestParameters, initOverrides) {
253
+ async insertFileRequestOpts(requestParameters) {
227
254
  if (requestParameters["bucketName"] == null) {
228
255
  throw new runtime.RequiredError(
229
256
  "bucketName",
@@ -280,13 +307,21 @@ export class FileApi extends runtime.BaseAPI {
280
307
  }
281
308
  let urlPath = `/mongodb/buckets/{bucketName}/files`;
282
309
  urlPath = urlPath.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters["bucketName"])));
283
- const response = await this.request({
310
+ return {
284
311
  path: urlPath,
285
312
  method: "PUT",
286
313
  headers: headerParameters,
287
314
  query: queryParameters,
288
315
  body: formParams
289
- }, initOverrides);
316
+ };
317
+ }
318
+ /**
319
+ * Insert one File in given Bucket
320
+ * Insert File
321
+ */
322
+ async insertFileRaw(requestParameters, initOverrides) {
323
+ const requestOptions = await this.insertFileRequestOpts(requestParameters);
324
+ const response = await this.request(requestOptions, initOverrides);
290
325
  return new runtime.JSONApiResponse(response, (jsonValue) => InsertResponseFromJSON(jsonValue));
291
326
  }
292
327
  /**
@@ -298,10 +333,9 @@ export class FileApi extends runtime.BaseAPI {
298
333
  return await response.value();
299
334
  }
300
335
  /**
301
- * Get Files paginated from given Bucket
302
- * Files in Bucket
336
+ * Creates request options for listFiles without sending the request
303
337
  */
304
- async listFilesRaw(requestParameters, initOverrides) {
338
+ async listFilesRequestOpts(requestParameters) {
305
339
  if (requestParameters["bucketName"] == null) {
306
340
  throw new runtime.RequiredError(
307
341
  "bucketName",
@@ -340,12 +374,20 @@ export class FileApi extends runtime.BaseAPI {
340
374
  }
341
375
  let urlPath = `/mongodb/buckets/{bucketName}/files`;
342
376
  urlPath = urlPath.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters["bucketName"])));
343
- const response = await this.request({
377
+ return {
344
378
  path: urlPath,
345
379
  method: "GET",
346
380
  headers: headerParameters,
347
381
  query: queryParameters
348
- }, initOverrides);
382
+ };
383
+ }
384
+ /**
385
+ * Get Files paginated from given Bucket
386
+ * Files in Bucket
387
+ */
388
+ async listFilesRaw(requestParameters, initOverrides) {
389
+ const requestOptions = await this.listFilesRequestOpts(requestParameters);
390
+ const response = await this.request(requestOptions, initOverrides);
349
391
  return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
350
392
  }
351
393
  /**
@@ -357,10 +399,9 @@ export class FileApi extends runtime.BaseAPI {
357
399
  return await response.value();
358
400
  }
359
401
  /**
360
- * Replace MetaData and potential update FileName
361
- * Update FileInformation in Bucket
402
+ * Creates request options for updateFileInformation without sending the request
362
403
  */
363
- async updateFileInformationRaw(requestParameters, initOverrides) {
404
+ async updateFileInformationRequestOpts(requestParameters) {
364
405
  if (requestParameters["bucketName"] == null) {
365
406
  throw new runtime.RequiredError(
366
407
  "bucketName",
@@ -398,13 +439,21 @@ export class FileApi extends runtime.BaseAPI {
398
439
  let urlPath = `/mongodb/buckets/{bucketName}/files/{fileId}`;
399
440
  urlPath = urlPath.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters["bucketName"])));
400
441
  urlPath = urlPath.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters["fileId"])));
401
- const response = await this.request({
442
+ return {
402
443
  path: urlPath,
403
444
  method: "PATCH",
404
445
  headers: headerParameters,
405
446
  query: queryParameters,
406
447
  body: UpdateFileInformationRequestToJSON(requestParameters["updateFileInformationRequest"])
407
- }, initOverrides);
448
+ };
449
+ }
450
+ /**
451
+ * Replace MetaData and potential update FileName
452
+ * Update FileInformation in Bucket
453
+ */
454
+ async updateFileInformationRaw(requestParameters, initOverrides) {
455
+ const requestOptions = await this.updateFileInformationRequestOpts(requestParameters);
456
+ const response = await this.request(requestOptions, initOverrides);
408
457
  return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
409
458
  }
410
459
  /**
@@ -54,6 +54,10 @@ export interface ListIndicesRequest {
54
54
  *
55
55
  */
56
56
  export declare class IndexApi extends runtime.BaseAPI {
57
+ /**
58
+ * Creates request options for createExpiringIndex without sending the request
59
+ */
60
+ createExpiringIndexRequestOpts(requestParameters: CreateExpiringIndexRequest): Promise<runtime.RequestOpts>;
57
61
  /**
58
62
  * Create expiring Index by Field for given Collection
59
63
  * Create expiring Index by Field for Collection
@@ -64,6 +68,10 @@ export declare class IndexApi extends runtime.BaseAPI {
64
68
  * Create expiring Index by Field for Collection
65
69
  */
66
70
  createExpiringIndex(requestParameters: CreateExpiringIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
71
+ /**
72
+ * Creates request options for createIndex without sending the request
73
+ */
74
+ createIndexRequestOpts(requestParameters: CreateIndexRequest): Promise<runtime.RequestOpts>;
67
75
  /**
68
76
  * Create Index for given Collection
69
77
  * Create Index for Collection
@@ -74,6 +82,10 @@ export declare class IndexApi extends runtime.BaseAPI {
74
82
  * Create Index for Collection
75
83
  */
76
84
  createIndex(requestParameters: CreateIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
85
+ /**
86
+ * Creates request options for createIndexForField without sending the request
87
+ */
88
+ createIndexForFieldRequestOpts(requestParameters: CreateIndexForFieldRequest): Promise<runtime.RequestOpts>;
77
89
  /**
78
90
  * Create Index by Field for given Collection
79
91
  * Create Index by Field for Collection
@@ -84,6 +96,10 @@ export declare class IndexApi extends runtime.BaseAPI {
84
96
  * Create Index by Field for Collection
85
97
  */
86
98
  createIndexForField(requestParameters: CreateIndexForFieldRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
99
+ /**
100
+ * Creates request options for createTextIndex without sending the request
101
+ */
102
+ createTextIndexRequestOpts(requestParameters: CreateTextIndexRequest): Promise<runtime.RequestOpts>;
87
103
  /**
88
104
  * Create text index by field for given collection
89
105
  * Create text index by field for collection
@@ -94,6 +110,10 @@ export declare class IndexApi extends runtime.BaseAPI {
94
110
  * Create text index by field for collection
95
111
  */
96
112
  createTextIndex(requestParameters: CreateTextIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
113
+ /**
114
+ * Creates request options for createUniqueIndex without sending the request
115
+ */
116
+ createUniqueIndexRequestOpts(requestParameters: CreateUniqueIndexRequest): Promise<runtime.RequestOpts>;
97
117
  /**
98
118
  * Create Unique Index by Field for given Collection
99
119
  * Create Unique Index
@@ -104,6 +124,10 @@ export declare class IndexApi extends runtime.BaseAPI {
104
124
  * Create Unique Index
105
125
  */
106
126
  createUniqueIndex(requestParameters: CreateUniqueIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
127
+ /**
128
+ * Creates request options for deleteIndex without sending the request
129
+ */
130
+ deleteIndexRequestOpts(requestParameters: DeleteIndexRequest): Promise<runtime.RequestOpts>;
107
131
  /**
108
132
  * Delete Index by Name for given Collection
109
133
  * Delete Index
@@ -114,6 +138,10 @@ export declare class IndexApi extends runtime.BaseAPI {
114
138
  * Delete Index
115
139
  */
116
140
  deleteIndex(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexDropResponse>;
141
+ /**
142
+ * Creates request options for index without sending the request
143
+ */
144
+ indexRequestOpts(requestParameters: IndexRequest): Promise<runtime.RequestOpts>;
117
145
  /**
118
146
  * Index by Name for given Collection
119
147
  * Index for Collection
@@ -124,6 +152,10 @@ export declare class IndexApi extends runtime.BaseAPI {
124
152
  * Index for Collection
125
153
  */
126
154
  index(requestParameters: IndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MongoIndex>;
155
+ /**
156
+ * Creates request options for listIndices without sending the request
157
+ */
158
+ listIndicesRequestOpts(requestParameters: ListIndicesRequest): Promise<runtime.RequestOpts>;
127
159
  /**
128
160
  * List all Indices for given Collection
129
161
  * List Indices for Collection