@sfxcode/nuxt-mongocamp-server 2.2.0 → 2.4.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/README.md +74 -1
- package/dist/module.d.mts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +95 -11
- package/dist/runtime/api/.openapi-generator/FILES +22 -0
- package/dist/runtime/api/apis/CollectionApi.d.ts +124 -0
- package/dist/runtime/api/apis/CollectionApi.js +205 -0
- package/dist/runtime/api/apis/DocumentApi.d.ts +162 -0
- package/dist/runtime/api/apis/DocumentApi.js +229 -0
- package/dist/runtime/api/docs/AuditEntry.md +52 -0
- package/dist/runtime/api/docs/CollectionApi.md +269 -2
- package/dist/runtime/api/docs/CollectionDeclaration.md +56 -0
- package/dist/runtime/api/docs/CollectionDeclarationAudit.md +34 -0
- package/dist/runtime/api/docs/CollectionDeclarationIndexesInner.md +38 -0
- package/dist/runtime/api/docs/CollectionDeclarationOwner.md +36 -0
- package/dist/runtime/api/docs/CollectionDeclarationRefsInner.md +38 -0
- package/dist/runtime/api/docs/CollectionDeclarationSoftDelete.md +36 -0
- package/dist/runtime/api/docs/CollectionDeclarationTimestamps.md +40 -0
- package/dist/runtime/api/docs/CollectionDeclarationVersioned.md +38 -0
- package/dist/runtime/api/docs/DocumentApi.md +303 -8
- package/dist/runtime/api/docs/ErrorDescription.md +4 -0
- package/dist/runtime/api/docs/ExportRequest.md +2 -0
- package/dist/runtime/api/docs/MongoFindRequest.md +2 -0
- package/dist/runtime/api/docs/SearchRequest.md +2 -0
- package/dist/runtime/api/docs/SuggestedValidator.md +40 -0
- package/dist/runtime/api/docs/ValidationIssue.md +36 -0
- package/dist/runtime/api/models/AuditEntry.d.ts +88 -0
- package/dist/runtime/api/models/AuditEntry.js +56 -0
- package/dist/runtime/api/models/CollectionDeclaration.d.ts +90 -0
- package/dist/runtime/api/models/CollectionDeclaration.js +87 -0
- package/dist/runtime/api/models/CollectionDeclarationAudit.d.ts +30 -0
- package/dist/runtime/api/models/CollectionDeclarationAudit.js +26 -0
- package/dist/runtime/api/models/CollectionDeclarationIndexesInner.d.ts +40 -0
- package/dist/runtime/api/models/CollectionDeclarationIndexesInner.js +32 -0
- package/dist/runtime/api/models/CollectionDeclarationOwner.d.ts +43 -0
- package/dist/runtime/api/models/CollectionDeclarationOwner.js +34 -0
- package/dist/runtime/api/models/CollectionDeclarationRefsInner.d.ts +38 -0
- package/dist/runtime/api/models/CollectionDeclarationRefsInner.js +31 -0
- package/dist/runtime/api/models/CollectionDeclarationSoftDelete.d.ts +34 -0
- package/dist/runtime/api/models/CollectionDeclarationSoftDelete.js +28 -0
- package/dist/runtime/api/models/CollectionDeclarationTimestamps.d.ts +42 -0
- package/dist/runtime/api/models/CollectionDeclarationTimestamps.js +33 -0
- package/dist/runtime/api/models/CollectionDeclarationVersioned.d.ts +46 -0
- package/dist/runtime/api/models/CollectionDeclarationVersioned.js +36 -0
- package/dist/runtime/api/models/ErrorDescription.d.ts +11 -0
- package/dist/runtime/api/models/ErrorDescription.js +10 -2
- package/dist/runtime/api/models/ExportRequest.d.ts +4 -0
- package/dist/runtime/api/models/ExportRequest.js +4 -2
- package/dist/runtime/api/models/MongoFindRequest.d.ts +4 -0
- package/dist/runtime/api/models/MongoFindRequest.js +4 -2
- package/dist/runtime/api/models/SearchRequest.d.ts +4 -0
- package/dist/runtime/api/models/SearchRequest.js +4 -2
- package/dist/runtime/api/models/SuggestedValidator.d.ts +44 -0
- package/dist/runtime/api/models/SuggestedValidator.js +35 -0
- package/dist/runtime/api/models/ValidationIssue.d.ts +34 -0
- package/dist/runtime/api/models/ValidationIssue.js +29 -0
- package/dist/runtime/api/models/index.d.ts +11 -0
- package/dist/runtime/api/models/index.js +11 -0
- package/dist/runtime/composables/mongocampApiCollection.d.ts +14 -15
- package/dist/runtime/composables/mongocampApiCollection.js +4 -1
- package/dist/runtime/composables/mongocampCollection.d.ts +144 -0
- package/dist/runtime/composables/mongocampCollection.js +241 -0
- package/dist/runtime/composables/mongocampLive.d.ts +36 -0
- package/dist/runtime/composables/mongocampLive.js +155 -0
- package/dist/runtime/composables/mongocampSearch.d.ts +12 -9
- package/dist/runtime/server/composables/mongocampServerCollection.d.ts +20 -0
- package/dist/runtime/server/composables/mongocampServerCollection.js +12 -0
- package/dist/runtime/server/mongocamp/plugin.d.ts +2 -2
- package/dist/runtime/server/mongocamp/plugin.js +10 -1
- package/dist/runtime/types/collections.d.ts +30 -0
- package/dist/runtime/types/collections.js +0 -0
- package/dist/runtime/utils/sse.d.ts +10 -0
- package/dist/runtime/utils/sse.js +33 -0
- package/dist/runtime/utils/toMongocampError.d.ts +7 -0
- package/dist/runtime/utils/toMongocampError.js +18 -1
- package/dist/types.d.mts +6 -0
- package/package.json +4 -3
|
@@ -12,14 +12,17 @@ All URIs are relative to *http://localhost*
|
|
|
12
12
|
| [**exportDocumentsByBody**](DocumentApi.md#exportdocumentsbybody) | **POST** /mongodb/collections/{collectionName}/documents/export | Export Documents of a Collection (filter in the body) |
|
|
13
13
|
| [**find**](DocumentApi.md#find) | **POST** /mongodb/collections/{collectionName}/documents | Documents in Collection |
|
|
14
14
|
| [**getDocument**](DocumentApi.md#getdocument) | **GET** /mongodb/collections/{collectionName}/documents/{documentId} | Document from Collection |
|
|
15
|
+
| [**getDocumentHistory**](DocumentApi.md#getdocumenthistory) | **GET** /mongodb/collections/{collectionName}/documents/{documentId}/history | History of a Document |
|
|
15
16
|
| [**importDocuments**](DocumentApi.md#importdocuments) | **POST** /mongodb/collections/{collectionName}/documents/import | Import Documents into a Collection |
|
|
16
17
|
| [**insert**](DocumentApi.md#insert) | **PUT** /mongodb/collections/{collectionName}/documents | Insert Document |
|
|
17
18
|
| [**insertMany**](DocumentApi.md#insertmany) | **PUT** /mongodb/collections/{collectionName}/documents/many/insert | Insert many Documents |
|
|
18
19
|
| [**listDocuments**](DocumentApi.md#listdocuments) | **GET** /mongodb/collections/{collectionName}/documents | Documents in Collection |
|
|
20
|
+
| [**restoreDocument**](DocumentApi.md#restoredocument) | **POST** /mongodb/collections/{collectionName}/documents/{documentId}/restore | Restore a soft-deleted Document |
|
|
19
21
|
| [**searchDocuments**](DocumentApi.md#searchdocuments) | **POST** /mongodb/collections/{collectionName}/documents/search | Search Documents in Collection |
|
|
20
22
|
| [**update**](DocumentApi.md#update) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId} | Update Document in Collection |
|
|
21
23
|
| [**updateDocumentPartial**](DocumentApi.md#updatedocumentpartial) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId}/partial | Update Document Parts in Collection |
|
|
22
24
|
| [**updateMany**](DocumentApi.md#updatemanyoperation) | **PATCH** /mongodb/collections/{collectionName}/documents/many/update | Update many in Collection |
|
|
25
|
+
| [**watchDocuments**](DocumentApi.md#watchdocuments) | **GET** /mongodb/collections/{collectionName}/documents/watch | Live Updates of a Collection |
|
|
23
26
|
|
|
24
27
|
|
|
25
28
|
|
|
@@ -105,7 +108,7 @@ example().catch(console.error);
|
|
|
105
108
|
|
|
106
109
|
## countDocuments
|
|
107
110
|
|
|
108
|
-
> CountResponse countDocuments(collectionName, filter, filterCaseInsensitive)
|
|
111
|
+
> CountResponse countDocuments(collectionName, withDeleted, filter, filterCaseInsensitive)
|
|
109
112
|
|
|
110
113
|
Count Documents in Collection
|
|
111
114
|
|
|
@@ -136,6 +139,8 @@ async function example() {
|
|
|
136
139
|
const body = {
|
|
137
140
|
// string | The name of your MongoDb Collection
|
|
138
141
|
collectionName: collectionName_example,
|
|
142
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
143
|
+
withDeleted: true,
|
|
139
144
|
// string | Filter Query like on the list of documents, by default all documents are counted (optional)
|
|
140
145
|
filter: filter_example,
|
|
141
146
|
// boolean | true: wildcards and prefixes of the Lucene filter ignore the case (the behaviour before 2.0.0). By default they are case-sensitive, so an index on the field serves a prefix like name:abc* (optional)
|
|
@@ -160,6 +165,7 @@ example().catch(console.error);
|
|
|
160
165
|
| Name | Type | Description | Notes |
|
|
161
166
|
|------------- | ------------- | ------------- | -------------|
|
|
162
167
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
168
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
163
169
|
| **filter** | `string` | Filter Query like on the list of documents, by default all documents are counted | [Optional] [Defaults to `undefined`] |
|
|
164
170
|
| **filterCaseInsensitive** | `boolean` | true: wildcards and prefixes of the Lucene filter ignore the case (the behaviour before 2.0.0). By default they are case-sensitive, so an index on the field serves a prefix like name:abc* | [Optional] [Defaults to `false`] |
|
|
165
171
|
|
|
@@ -188,7 +194,7 @@ example().catch(console.error);
|
|
|
188
194
|
|
|
189
195
|
## countDocumentsByBody
|
|
190
196
|
|
|
191
|
-
> CountResponse countDocumentsByBody(collectionName, countRequest, filterCaseInsensitive)
|
|
197
|
+
> CountResponse countDocumentsByBody(collectionName, countRequest, withDeleted, filterCaseInsensitive)
|
|
192
198
|
|
|
193
199
|
Count Documents in Collection (filter in the body)
|
|
194
200
|
|
|
@@ -221,6 +227,8 @@ async function example() {
|
|
|
221
227
|
collectionName: collectionName_example,
|
|
222
228
|
// CountRequest
|
|
223
229
|
countRequest: {"filter":"country:DE"},
|
|
230
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
231
|
+
withDeleted: true,
|
|
224
232
|
// boolean | true: wildcards and prefixes of the Lucene filter ignore the case (the behaviour before 2.0.0). By default they are case-sensitive, so an index on the field serves a prefix like name:abc* (optional)
|
|
225
233
|
filterCaseInsensitive: false,
|
|
226
234
|
} satisfies CountDocumentsByBodyRequest;
|
|
@@ -244,6 +252,7 @@ example().catch(console.error);
|
|
|
244
252
|
|------------- | ------------- | ------------- | -------------|
|
|
245
253
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
246
254
|
| **countRequest** | [CountRequest](CountRequest.md) | | |
|
|
255
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
247
256
|
| **filterCaseInsensitive** | `boolean` | true: wildcards and prefixes of the Lucene filter ignore the case (the behaviour before 2.0.0). By default they are case-sensitive, so an index on the field serves a prefix like name:abc* | [Optional] [Defaults to `false`] |
|
|
248
257
|
|
|
249
258
|
### Return type
|
|
@@ -361,7 +370,7 @@ example().catch(console.error);
|
|
|
361
370
|
|
|
362
371
|
## exportDocuments
|
|
363
372
|
|
|
364
|
-
> string exportDocuments(collectionName, format, filter, sort, projection, limit, extendedJson, filterCaseInsensitive, trailer)
|
|
373
|
+
> string exportDocuments(collectionName, expand, withDeleted, format, filter, sort, projection, limit, extendedJson, filterCaseInsensitive, trailer)
|
|
365
374
|
|
|
366
375
|
Export Documents of a Collection
|
|
367
376
|
|
|
@@ -392,6 +401,10 @@ async function example() {
|
|
|
392
401
|
const body = {
|
|
393
402
|
// string | The name of your MongoDb Collection
|
|
394
403
|
collectionName: collectionName_example,
|
|
404
|
+
// Array<string> | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. (optional)
|
|
405
|
+
expand: ...,
|
|
406
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
407
|
+
withDeleted: true,
|
|
395
408
|
// string | ndjson (one JSON document per line), json (one array) or csv (optional)
|
|
396
409
|
format: format_example,
|
|
397
410
|
// string | Filter Query like on the list of documents, by default all documents are exported (optional)
|
|
@@ -428,6 +441,8 @@ example().catch(console.error);
|
|
|
428
441
|
| Name | Type | Description | Notes |
|
|
429
442
|
|------------- | ------------- | ------------- | -------------|
|
|
430
443
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
444
|
+
| **expand** | `Array<string>` | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. | [Optional] |
|
|
445
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
431
446
|
| **format** | `string` | ndjson (one JSON document per line), json (one array) or csv | [Optional] [Defaults to `'ndjson'`] |
|
|
432
447
|
| **filter** | `string` | Filter Query like on the list of documents, by default all documents are exported | [Optional] [Defaults to `undefined`] |
|
|
433
448
|
| **sort** | `Array<string>` | Sorting like on the list of documents, a leading - sorts descending | [Optional] |
|
|
@@ -463,7 +478,7 @@ example().catch(console.error);
|
|
|
463
478
|
|
|
464
479
|
## exportDocumentsByBody
|
|
465
480
|
|
|
466
|
-
> string exportDocumentsByBody(collectionName, exportRequest, format, extendedJson, filterCaseInsensitive, trailer)
|
|
481
|
+
> string exportDocumentsByBody(collectionName, exportRequest, expand, withDeleted, format, extendedJson, filterCaseInsensitive, trailer)
|
|
467
482
|
|
|
468
483
|
Export Documents of a Collection (filter in the body)
|
|
469
484
|
|
|
@@ -496,6 +511,10 @@ async function example() {
|
|
|
496
511
|
collectionName: collectionName_example,
|
|
497
512
|
// ExportRequest
|
|
498
513
|
exportRequest: {"filter":"country:DE AND age:[18 TO 65]","sort":["-age"],"projection":["name","age"]},
|
|
514
|
+
// Array<string> | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. (optional)
|
|
515
|
+
expand: ...,
|
|
516
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
517
|
+
withDeleted: true,
|
|
499
518
|
// string | ndjson (one JSON document per line), json (one array) or csv (optional)
|
|
500
519
|
format: format_example,
|
|
501
520
|
// 'relaxed' | 'canonical' | 'plain' | relaxed (default since 2.0.0) or canonical: the documents as MongoDB Extended JSON with the types of their values ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}; canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}); a text that looks like a date is {\"$string\": ...}. plain: the format of 1.x (ids and dates as strings, every number as JSON number, no types). The default of a csv export is plain. (optional)
|
|
@@ -525,6 +544,8 @@ example().catch(console.error);
|
|
|
525
544
|
|------------- | ------------- | ------------- | -------------|
|
|
526
545
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
527
546
|
| **exportRequest** | [ExportRequest](ExportRequest.md) | | |
|
|
547
|
+
| **expand** | `Array<string>` | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. | [Optional] |
|
|
548
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
528
549
|
| **format** | `string` | ndjson (one JSON document per line), json (one array) or csv | [Optional] [Defaults to `'ndjson'`] |
|
|
529
550
|
| **extendedJson** | `relaxed`, `canonical`, `plain` | relaxed (default since 2.0.0) or canonical: the documents as MongoDB Extended JSON with the types of their values ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}; canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}); a text that looks like a date is {\"$string\": ...}. plain: the format of 1.x (ids and dates as strings, every number as JSON number, no types). The default of a csv export is plain. | [Optional] [Defaults to `'relaxed'`] [Enum: relaxed, canonical, plain] |
|
|
530
551
|
| **filterCaseInsensitive** | `boolean` | true: wildcards and prefixes of the Lucene filter ignore the case (the behaviour before 2.0.0). By default they are case-sensitive, so an index on the field serves a prefix like name:abc* | [Optional] [Defaults to `false`] |
|
|
@@ -556,7 +577,7 @@ example().catch(console.error);
|
|
|
556
577
|
|
|
557
578
|
## find
|
|
558
579
|
|
|
559
|
-
> Array<{ [key: string]: any | null; }> find(collectionName, mongoFindRequest, rowsPerPage, page, count, after, extendedJson)
|
|
580
|
+
> Array<{ [key: string]: any | null; }> find(collectionName, mongoFindRequest, expand, withDeleted, rowsPerPage, page, count, after, extendedJson)
|
|
560
581
|
|
|
561
582
|
Documents in Collection
|
|
562
583
|
|
|
@@ -589,6 +610,10 @@ async function example() {
|
|
|
589
610
|
collectionName: collectionName_example,
|
|
590
611
|
// MongoFindRequest
|
|
591
612
|
mongoFindRequest: {"filter":{"additionalProp1":"string","additionalProp2":123},"sort":{"additionalProp2":-1},"projection":{"additionalProp1":1,"additionalProp2":1}},
|
|
613
|
+
// Array<string> | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. (optional)
|
|
614
|
+
expand: ...,
|
|
615
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
616
|
+
withDeleted: true,
|
|
592
617
|
// number | Count elements per page (optional)
|
|
593
618
|
rowsPerPage: 100,
|
|
594
619
|
// number | Requested page of the ResultSets (optional)
|
|
@@ -620,6 +645,8 @@ example().catch(console.error);
|
|
|
620
645
|
|------------- | ------------- | ------------- | -------------|
|
|
621
646
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
622
647
|
| **mongoFindRequest** | [MongoFindRequest](MongoFindRequest.md) | | |
|
|
648
|
+
| **expand** | `Array<string>` | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. | [Optional] |
|
|
649
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
623
650
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
624
651
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
625
652
|
| **count** | `exact`, `none` | How the result is counted: exact (default) or none (no count headers, no count query) | [Optional] [Defaults to `'exact'`] [Enum: exact, none] |
|
|
@@ -652,7 +679,7 @@ example().catch(console.error);
|
|
|
652
679
|
|
|
653
680
|
## getDocument
|
|
654
681
|
|
|
655
|
-
> { [key: string]: any | null; } getDocument(collectionName, documentId, extendedJson)
|
|
682
|
+
> { [key: string]: any | null; } getDocument(collectionName, documentId, expand, withDeleted, extendedJson)
|
|
656
683
|
|
|
657
684
|
Document from Collection
|
|
658
685
|
|
|
@@ -685,6 +712,10 @@ async function example() {
|
|
|
685
712
|
collectionName: collectionName_example,
|
|
686
713
|
// string | DocumentId to read
|
|
687
714
|
documentId: documentId_example,
|
|
715
|
+
// Array<string> | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. (optional)
|
|
716
|
+
expand: ...,
|
|
717
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
718
|
+
withDeleted: true,
|
|
688
719
|
// 'relaxed' | 'canonical' | 'plain' | relaxed (default since 2.0.0) or canonical: the documents as MongoDB Extended JSON with the types of their values ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}; canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}); a text that looks like a date is {\"$string\": ...}. plain: the format of 1.x (ids and dates as strings, every number as JSON number, no types). (optional)
|
|
689
720
|
extendedJson: extendedJson_example,
|
|
690
721
|
} satisfies GetDocumentRequest;
|
|
@@ -708,6 +739,8 @@ example().catch(console.error);
|
|
|
708
739
|
|------------- | ------------- | ------------- | -------------|
|
|
709
740
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
710
741
|
| **documentId** | `string` | DocumentId to read | [Defaults to `undefined`] |
|
|
742
|
+
| **expand** | `Array<string>` | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. | [Optional] |
|
|
743
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
711
744
|
| **extendedJson** | `relaxed`, `canonical`, `plain` | relaxed (default since 2.0.0) or canonical: the documents as MongoDB Extended JSON with the types of their values ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}; canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}); a text that looks like a date is {\"$string\": ...}. plain: the format of 1.x (ids and dates as strings, every number as JSON number, no types). | [Optional] [Defaults to `'relaxed'`] [Enum: relaxed, canonical, plain] |
|
|
712
745
|
|
|
713
746
|
### Return type
|
|
@@ -733,6 +766,96 @@ example().catch(console.error);
|
|
|
733
766
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
734
767
|
|
|
735
768
|
|
|
769
|
+
## getDocumentHistory
|
|
770
|
+
|
|
771
|
+
> Array<AuditEntry> getDocumentHistory(collectionName, documentId, rowsPerPage, page, extendedJson)
|
|
772
|
+
|
|
773
|
+
History of a Document
|
|
774
|
+
|
|
775
|
+
The audit records of a document of a collection declared with audit, newest first (2.3.0). For users who can read the document; administrators of the collection also get the history of deleted documents. 404 for a collection without audit.
|
|
776
|
+
|
|
777
|
+
### Example
|
|
778
|
+
|
|
779
|
+
```ts
|
|
780
|
+
import {
|
|
781
|
+
Configuration,
|
|
782
|
+
DocumentApi,
|
|
783
|
+
} from '';
|
|
784
|
+
import type { GetDocumentHistoryRequest } from '';
|
|
785
|
+
|
|
786
|
+
async function example() {
|
|
787
|
+
console.log("🚀 Testing SDK...");
|
|
788
|
+
const config = new Configuration({
|
|
789
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
790
|
+
username: "YOUR USERNAME",
|
|
791
|
+
password: "YOUR PASSWORD",
|
|
792
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
793
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
794
|
+
// To configure API key authorization: apiKeyAuth
|
|
795
|
+
apiKey: "YOUR API KEY",
|
|
796
|
+
});
|
|
797
|
+
const api = new DocumentApi(config);
|
|
798
|
+
|
|
799
|
+
const body = {
|
|
800
|
+
// string | The name of your MongoDb Collection
|
|
801
|
+
collectionName: collectionName_example,
|
|
802
|
+
// string | DocumentId of the history
|
|
803
|
+
documentId: documentId_example,
|
|
804
|
+
// number (optional)
|
|
805
|
+
rowsPerPage: 789,
|
|
806
|
+
// number (optional)
|
|
807
|
+
page: 789,
|
|
808
|
+
// 'relaxed' | 'canonical' | 'plain' | relaxed (default), canonical or plain, as for the documents. (optional)
|
|
809
|
+
extendedJson: extendedJson_example,
|
|
810
|
+
} satisfies GetDocumentHistoryRequest;
|
|
811
|
+
|
|
812
|
+
try {
|
|
813
|
+
const data = await api.getDocumentHistory(body);
|
|
814
|
+
console.log(data);
|
|
815
|
+
} catch (error) {
|
|
816
|
+
console.error(error);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
// Run the test
|
|
821
|
+
example().catch(console.error);
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
### Parameters
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
| Name | Type | Description | Notes |
|
|
828
|
+
|------------- | ------------- | ------------- | -------------|
|
|
829
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
830
|
+
| **documentId** | `string` | DocumentId of the history | [Defaults to `undefined`] |
|
|
831
|
+
| **rowsPerPage** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
832
|
+
| **page** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
833
|
+
| **extendedJson** | `relaxed`, `canonical`, `plain` | relaxed (default), canonical or plain, as for the documents. | [Optional] [Defaults to `undefined`] [Enum: relaxed, canonical, plain] |
|
|
834
|
+
|
|
835
|
+
### Return type
|
|
836
|
+
|
|
837
|
+
[**Array<AuditEntry>**](AuditEntry.md)
|
|
838
|
+
|
|
839
|
+
### Authorization
|
|
840
|
+
|
|
841
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
842
|
+
|
|
843
|
+
### HTTP request headers
|
|
844
|
+
|
|
845
|
+
- **Content-Type**: Not defined
|
|
846
|
+
- **Accept**: `application/json`, `text/plain`
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
### HTTP response details
|
|
850
|
+
| Status code | Description | Response headers |
|
|
851
|
+
|-------------|-------------|------------------|
|
|
852
|
+
| **200** | | - |
|
|
853
|
+
| **400** | Invalid value for: body | - |
|
|
854
|
+
| **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
|
|
855
|
+
|
|
856
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
857
|
+
|
|
858
|
+
|
|
736
859
|
## importDocuments
|
|
737
860
|
|
|
738
861
|
> ImportResponse importDocuments(collectionName, body)
|
|
@@ -981,7 +1104,7 @@ example().catch(console.error);
|
|
|
981
1104
|
|
|
982
1105
|
## listDocuments
|
|
983
1106
|
|
|
984
|
-
> Array<{ [key: string]: any | null; }> listDocuments(collectionName, filter, sort, projection, rowsPerPage, page, count, after, extendedJson, filterCaseInsensitive)
|
|
1107
|
+
> Array<{ [key: string]: any | null; }> listDocuments(collectionName, expand, withDeleted, filter, sort, projection, rowsPerPage, page, count, after, extendedJson, filterCaseInsensitive)
|
|
985
1108
|
|
|
986
1109
|
Documents in Collection
|
|
987
1110
|
|
|
@@ -1012,6 +1135,10 @@ async function example() {
|
|
|
1012
1135
|
const body = {
|
|
1013
1136
|
// string | The name of your MongoDb Collection
|
|
1014
1137
|
collectionName: collectionName_example,
|
|
1138
|
+
// Array<string> | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. (optional)
|
|
1139
|
+
expand: ...,
|
|
1140
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
1141
|
+
withDeleted: true,
|
|
1015
1142
|
// string | MongoDB filter query, all documents by default (optional)
|
|
1016
1143
|
filter: filter_example,
|
|
1017
1144
|
// Array<string> | MongoDB sorting (optional)
|
|
@@ -1050,6 +1177,8 @@ example().catch(console.error);
|
|
|
1050
1177
|
| Name | Type | Description | Notes |
|
|
1051
1178
|
|------------- | ------------- | ------------- | -------------|
|
|
1052
1179
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1180
|
+
| **expand** | `Array<string>` | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. | [Optional] |
|
|
1181
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
1053
1182
|
| **filter** | `string` | MongoDB filter query, all documents by default | [Optional] [Defaults to `undefined`] |
|
|
1054
1183
|
| **sort** | `Array<string>` | MongoDB sorting | [Optional] |
|
|
1055
1184
|
| **projection** | `Array<string>` | MongoDB projection | [Optional] |
|
|
@@ -1084,9 +1213,90 @@ example().catch(console.error);
|
|
|
1084
1213
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1085
1214
|
|
|
1086
1215
|
|
|
1216
|
+
## restoreDocument
|
|
1217
|
+
|
|
1218
|
+
> UpdateResponse restoreDocument(collectionName, documentId)
|
|
1219
|
+
|
|
1220
|
+
Restore a soft-deleted Document
|
|
1221
|
+
|
|
1222
|
+
Removes the deleted mark of a document of a collection declared with softDelete (2.3.0). 404 for a collection without soft delete and for a document that is missing or not deleted.
|
|
1223
|
+
|
|
1224
|
+
### Example
|
|
1225
|
+
|
|
1226
|
+
```ts
|
|
1227
|
+
import {
|
|
1228
|
+
Configuration,
|
|
1229
|
+
DocumentApi,
|
|
1230
|
+
} from '';
|
|
1231
|
+
import type { RestoreDocumentRequest } from '';
|
|
1232
|
+
|
|
1233
|
+
async function example() {
|
|
1234
|
+
console.log("🚀 Testing SDK...");
|
|
1235
|
+
const config = new Configuration({
|
|
1236
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
1237
|
+
username: "YOUR USERNAME",
|
|
1238
|
+
password: "YOUR PASSWORD",
|
|
1239
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
1240
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
1241
|
+
// To configure API key authorization: apiKeyAuth
|
|
1242
|
+
apiKey: "YOUR API KEY",
|
|
1243
|
+
});
|
|
1244
|
+
const api = new DocumentApi(config);
|
|
1245
|
+
|
|
1246
|
+
const body = {
|
|
1247
|
+
// string | The name of your MongoDb Collection
|
|
1248
|
+
collectionName: collectionName_example,
|
|
1249
|
+
// string | DocumentId to restore
|
|
1250
|
+
documentId: documentId_example,
|
|
1251
|
+
} satisfies RestoreDocumentRequest;
|
|
1252
|
+
|
|
1253
|
+
try {
|
|
1254
|
+
const data = await api.restoreDocument(body);
|
|
1255
|
+
console.log(data);
|
|
1256
|
+
} catch (error) {
|
|
1257
|
+
console.error(error);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
// Run the test
|
|
1262
|
+
example().catch(console.error);
|
|
1263
|
+
```
|
|
1264
|
+
|
|
1265
|
+
### Parameters
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
| Name | Type | Description | Notes |
|
|
1269
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1270
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1271
|
+
| **documentId** | `string` | DocumentId to restore | [Defaults to `undefined`] |
|
|
1272
|
+
|
|
1273
|
+
### Return type
|
|
1274
|
+
|
|
1275
|
+
[**UpdateResponse**](UpdateResponse.md)
|
|
1276
|
+
|
|
1277
|
+
### Authorization
|
|
1278
|
+
|
|
1279
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
1280
|
+
|
|
1281
|
+
### HTTP request headers
|
|
1282
|
+
|
|
1283
|
+
- **Content-Type**: Not defined
|
|
1284
|
+
- **Accept**: `application/json`, `text/plain`
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
### HTTP response details
|
|
1288
|
+
| Status code | Description | Response headers |
|
|
1289
|
+
|-------------|-------------|------------------|
|
|
1290
|
+
| **200** | | - |
|
|
1291
|
+
| **400** | Invalid value for: body | - |
|
|
1292
|
+
| **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
|
|
1293
|
+
|
|
1294
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1295
|
+
|
|
1296
|
+
|
|
1087
1297
|
## searchDocuments
|
|
1088
1298
|
|
|
1089
|
-
> Array<{ [key: string]: any | null; }> searchDocuments(collectionName, searchRequest, rowsPerPage, page, count, after, extendedJson, filterCaseInsensitive)
|
|
1299
|
+
> Array<{ [key: string]: any | null; }> searchDocuments(collectionName, searchRequest, expand, withDeleted, rowsPerPage, page, count, after, extendedJson, filterCaseInsensitive)
|
|
1090
1300
|
|
|
1091
1301
|
Search Documents in Collection
|
|
1092
1302
|
|
|
@@ -1119,6 +1329,10 @@ async function example() {
|
|
|
1119
1329
|
collectionName: collectionName_example,
|
|
1120
1330
|
// SearchRequest
|
|
1121
1331
|
searchRequest: {"filter":"name:John AND age:[18 TO 65]","sort":["-age"],"projection":["name","age"]},
|
|
1332
|
+
// Array<string> | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. (optional)
|
|
1333
|
+
expand: ...,
|
|
1334
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
1335
|
+
withDeleted: true,
|
|
1122
1336
|
// number | Count elements per page (optional)
|
|
1123
1337
|
rowsPerPage: 100,
|
|
1124
1338
|
// number | Requested page of the ResultSets (optional)
|
|
@@ -1152,6 +1366,8 @@ example().catch(console.error);
|
|
|
1152
1366
|
|------------- | ------------- | ------------- | -------------|
|
|
1153
1367
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1154
1368
|
| **searchRequest** | [SearchRequest](SearchRequest.md) | | |
|
|
1369
|
+
| **expand** | `Array<string>` | References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference. | [Optional] |
|
|
1370
|
+
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. | [Optional] [Defaults to `false`] |
|
|
1155
1371
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
1156
1372
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
1157
1373
|
| **count** | `exact`, `none` | How the result is counted: exact (default) or none (no count headers, no count query) | [Optional] [Defaults to `'exact'`] [Enum: exact, none] |
|
|
@@ -1440,3 +1656,82 @@ example().catch(console.error);
|
|
|
1440
1656
|
|
|
1441
1657
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1442
1658
|
|
|
1659
|
+
|
|
1660
|
+
## watchDocuments
|
|
1661
|
+
|
|
1662
|
+
> string watchDocuments(collectionName, expand, filter, filterCaseInsensitive, lastEventID)
|
|
1663
|
+
|
|
1664
|
+
Live Updates of a Collection
|
|
1665
|
+
|
|
1666
|
+
The changes of the documents as Server-Sent Events (2.3.0), scoped like every read and by `filter`. Events: `upsert` (data `{ id, document }`, a document that is in the scope), `remove` (data `{ id }`, deleted or left the scope), `reset` (the client loads again). The `id` of an event is the resume token: send it as `Last-Event-ID` to resume. A comment every 25 seconds. Needs a replica set or a sharded cluster: 501 (code 5011) otherwise; at most `WATCH_MAX_STREAMS` streams per instance (503).
|
|
1667
|
+
|
|
1668
|
+
### Example
|
|
1669
|
+
|
|
1670
|
+
```ts
|
|
1671
|
+
import {
|
|
1672
|
+
Configuration,
|
|
1673
|
+
DocumentApi,
|
|
1674
|
+
} from '';
|
|
1675
|
+
import type { WatchDocumentsRequest } from '';
|
|
1676
|
+
|
|
1677
|
+
async function example() {
|
|
1678
|
+
console.log("🚀 Testing SDK...");
|
|
1679
|
+
const api = new DocumentApi();
|
|
1680
|
+
|
|
1681
|
+
const body = {
|
|
1682
|
+
// string | The name of your MongoDb Collection
|
|
1683
|
+
collectionName: collectionName_example,
|
|
1684
|
+
// Array<string> | References to expand in each upsert (2.4.0), like on the list of documents. A change of a referenced document sends no event. (optional)
|
|
1685
|
+
expand: ...,
|
|
1686
|
+
// string | Lucene filter of the documents to watch. (optional)
|
|
1687
|
+
filter: filter_example,
|
|
1688
|
+
// boolean (optional)
|
|
1689
|
+
filterCaseInsensitive: true,
|
|
1690
|
+
// string | The id of the last event the client got, to resume after it. (optional)
|
|
1691
|
+
lastEventID: lastEventID_example,
|
|
1692
|
+
} satisfies WatchDocumentsRequest;
|
|
1693
|
+
|
|
1694
|
+
try {
|
|
1695
|
+
const data = await api.watchDocuments(body);
|
|
1696
|
+
console.log(data);
|
|
1697
|
+
} catch (error) {
|
|
1698
|
+
console.error(error);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
// Run the test
|
|
1703
|
+
example().catch(console.error);
|
|
1704
|
+
```
|
|
1705
|
+
|
|
1706
|
+
### Parameters
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
| Name | Type | Description | Notes |
|
|
1710
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1711
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1712
|
+
| **expand** | `Array<string>` | References to expand in each upsert (2.4.0), like on the list of documents. A change of a referenced document sends no event. | [Optional] |
|
|
1713
|
+
| **filter** | `string` | Lucene filter of the documents to watch. | [Optional] [Defaults to `undefined`] |
|
|
1714
|
+
| **filterCaseInsensitive** | `boolean` | | [Optional] [Defaults to `undefined`] |
|
|
1715
|
+
| **lastEventID** | `string` | The id of the last event the client got, to resume after it. | [Optional] [Defaults to `undefined`] |
|
|
1716
|
+
|
|
1717
|
+
### Return type
|
|
1718
|
+
|
|
1719
|
+
**string**
|
|
1720
|
+
|
|
1721
|
+
### Authorization
|
|
1722
|
+
|
|
1723
|
+
No authorization required
|
|
1724
|
+
|
|
1725
|
+
### HTTP request headers
|
|
1726
|
+
|
|
1727
|
+
- **Content-Type**: Not defined
|
|
1728
|
+
- **Accept**: `text/event-stream`
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
### HTTP response details
|
|
1732
|
+
| Status code | Description | Response headers |
|
|
1733
|
+
|-------------|-------------|------------------|
|
|
1734
|
+
| **200** | text/event-stream | - |
|
|
1735
|
+
|
|
1736
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1737
|
+
|
|
@@ -9,6 +9,8 @@ Name | Type
|
|
|
9
9
|
`code` | number
|
|
10
10
|
`msg` | string
|
|
11
11
|
`additionalInfo` | string
|
|
12
|
+
`issues` | [Array<ValidationIssue>](ValidationIssue.md)
|
|
13
|
+
`current` | { [key: string]: any; }
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -20,6 +22,8 @@ const example = {
|
|
|
20
22
|
"code": null,
|
|
21
23
|
"msg": null,
|
|
22
24
|
"additionalInfo": null,
|
|
25
|
+
"issues": null,
|
|
26
|
+
"current": null,
|
|
23
27
|
} satisfies ErrorDescription
|
|
24
28
|
|
|
25
29
|
console.log(example)
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`sort` | Array<string>
|
|
11
11
|
`projection` | Array<string>
|
|
12
12
|
`limit` | number
|
|
13
|
+
`expand` | Array<string>
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"sort": null,
|
|
23
24
|
"projection": null,
|
|
24
25
|
"limit": null,
|
|
26
|
+
"expand": null,
|
|
25
27
|
} satisfies ExportRequest
|
|
26
28
|
|
|
27
29
|
console.log(example)
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`filter` | { [key: string]: any | null; }
|
|
10
10
|
`sort` | { [key: string]: any | null; }
|
|
11
11
|
`projection` | { [key: string]: any | null; }
|
|
12
|
+
`expand` | Array<string>
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const example = {
|
|
|
20
21
|
"filter": null,
|
|
21
22
|
"sort": null,
|
|
22
23
|
"projection": null,
|
|
24
|
+
"expand": null,
|
|
23
25
|
} satisfies MongoFindRequest
|
|
24
26
|
|
|
25
27
|
console.log(example)
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`filter` | string
|
|
10
10
|
`sort` | Array<string>
|
|
11
11
|
`projection` | Array<string>
|
|
12
|
+
`expand` | Array<string>
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const example = {
|
|
|
20
21
|
"filter": null,
|
|
21
22
|
"sort": null,
|
|
22
23
|
"projection": null,
|
|
24
|
+
"expand": null,
|
|
23
25
|
} satisfies SearchRequest
|
|
24
26
|
|
|
25
27
|
console.log(example)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# SuggestedValidator
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`validator` | { [key: string]: any; }
|
|
10
|
+
`count` | number
|
|
11
|
+
`sample` | number
|
|
12
|
+
`warnings` | Array<string>
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { SuggestedValidator } from ''
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"validator": null,
|
|
22
|
+
"count": null,
|
|
23
|
+
"sample": null,
|
|
24
|
+
"warnings": null,
|
|
25
|
+
} satisfies SuggestedValidator
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as SuggestedValidator
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ValidationIssue
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`path` | string
|
|
10
|
+
`message` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ValidationIssue } from ''
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"path": null,
|
|
20
|
+
"message": null,
|
|
21
|
+
} satisfies ValidationIssue
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ValidationIssue
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|