@sfxcode/nuxt-mongocamp-server 2.3.0 → 2.5.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 +24 -2
- package/dist/module.d.mts +10 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +41 -21
- package/dist/runtime/api/.openapi-generator/FILES +4 -0
- package/dist/runtime/api/apis/CollectionApi.d.ts +6 -6
- package/dist/runtime/api/apis/CollectionApi.js +4 -4
- package/dist/runtime/api/apis/DocumentApi.d.ts +42 -14
- package/dist/runtime/api/apis/DocumentApi.js +27 -6
- package/dist/runtime/api/docs/CollectionApi.md +6 -6
- package/dist/runtime/api/docs/CollectionDeclaration.md +4 -0
- package/dist/runtime/api/docs/CollectionDeclarationIndexesInner.md +38 -0
- package/dist/runtime/api/docs/CollectionDeclarationRefsInner.md +38 -0
- package/dist/runtime/api/docs/DocumentApi.md +47 -26
- 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/models/CollectionDeclaration.d.ts +10 -0
- package/dist/runtime/api/models/CollectionDeclaration.js +14 -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/CollectionDeclarationRefsInner.d.ts +38 -0
- package/dist/runtime/api/models/CollectionDeclarationRefsInner.js +31 -0
- package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
- 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/index.d.ts +2 -0
- package/dist/runtime/api/models/index.js +2 -0
- package/dist/runtime/composables/mongocampApi.d.ts +4 -0
- package/dist/runtime/composables/mongocampApi.js +10 -2
- package/dist/runtime/composables/mongocampAuth.js +29 -25
- package/dist/runtime/composables/mongocampCollection.d.ts +50 -11
- package/dist/runtime/composables/mongocampCollection.js +85 -21
- package/dist/runtime/composables/mongocampLive.d.ts +5 -2
- package/dist/runtime/composables/mongocampLive.js +30 -5
- package/dist/runtime/composables/mongocampSearch.js +12 -3
- package/dist/runtime/plugins/bson-payload.d.ts +8 -0
- package/dist/runtime/plugins/bson-payload.js +6 -0
- package/dist/runtime/server/composables/mongocampApi.d.ts +5 -1
- package/dist/runtime/server/composables/mongocampApi.js +1 -9
- package/dist/runtime/server/composables/mongocampServerApi.d.ts +4 -0
- package/dist/runtime/server/composables/mongocampServerApi.js +5 -0
- package/dist/runtime/server/composables/mongocampServerCollection.d.ts +20 -0
- package/dist/runtime/server/composables/mongocampServerCollection.js +12 -0
- package/dist/runtime/server/mongocamp/core.d.ts +1 -1
- package/dist/runtime/server/mongocamp/core.js +1 -1
- package/dist/runtime/server/mongocamp/embedded-api.d.ts +18 -0
- package/dist/runtime/server/mongocamp/embedded-api.js +10 -0
- package/dist/runtime/types/collections.d.ts +10 -0
- package/dist/runtime/utils/appState.d.ts +21 -0
- package/dist/runtime/utils/appState.js +11 -0
- package/dist/runtime/utils/bsonPayload.d.ts +8 -0
- package/dist/runtime/utils/bsonPayload.js +10 -0
- package/dist/runtime/utils/buildFieldFilterExpression.d.ts +4 -0
- package/dist/runtime/utils/buildFieldFilterExpression.js +5 -3
- package/dist/runtime/utils/sse.d.ts +1 -1
- package/dist/runtime/utils/sse.js +7 -1
- package/package.json +15 -7
|
@@ -62,7 +62,7 @@ async function example() {
|
|
|
62
62
|
collectionName: collectionName_example,
|
|
63
63
|
// MongoAggregateRequest
|
|
64
64
|
mongoAggregateRequest: ...,
|
|
65
|
-
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
65
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
66
66
|
withDeleted: true,
|
|
67
67
|
// number | Count elements per page (optional)
|
|
68
68
|
rowsPerPage: 100,
|
|
@@ -97,7 +97,7 @@ example().catch(console.error);
|
|
|
97
97
|
|------------- | ------------- | ------------- | -------------|
|
|
98
98
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
99
99
|
| **mongoAggregateRequest** | [MongoAggregateRequest](MongoAggregateRequest.md) | | |
|
|
100
|
-
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
100
|
+
| **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`] |
|
|
101
101
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
102
102
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
103
103
|
| **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] |
|
|
@@ -483,7 +483,7 @@ async function example() {
|
|
|
483
483
|
collectionName: collectionName_example,
|
|
484
484
|
// string | The field for your distinct Request.
|
|
485
485
|
field: field_example,
|
|
486
|
-
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
486
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
487
487
|
withDeleted: true,
|
|
488
488
|
// number | Count elements per page (optional)
|
|
489
489
|
rowsPerPage: 100,
|
|
@@ -514,7 +514,7 @@ example().catch(console.error);
|
|
|
514
514
|
|------------- | ------------- | ------------- | -------------|
|
|
515
515
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
516
516
|
| **field** | `string` | The field for your distinct Request. | [Defaults to `undefined`] |
|
|
517
|
-
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
517
|
+
| **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`] |
|
|
518
518
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
519
519
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
520
520
|
| **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] |
|
|
@@ -550,7 +550,7 @@ example().catch(console.error);
|
|
|
550
550
|
|
|
551
551
|
Declaration of a Collection
|
|
552
552
|
|
|
553
|
-
What a client needs to know of a declared collection (2.
|
|
553
|
+
What a client needs to know of a declared collection (2.3.0): fields it must not send, version and owner fields, behaviours. 404 for a collection that is not declared.
|
|
554
554
|
|
|
555
555
|
### Example
|
|
556
556
|
|
|
@@ -709,7 +709,7 @@ example().catch(console.error);
|
|
|
709
709
|
|
|
710
710
|
History of a Collection
|
|
711
711
|
|
|
712
|
-
The audit records of a collection declared with audit, newest first (2.
|
|
712
|
+
The audit records of a collection declared with audit, newest first (2.3.0); for the administrators of the collection. 404 for a collection without audit.
|
|
713
713
|
|
|
714
714
|
### Example
|
|
715
715
|
|
|
@@ -11,6 +11,8 @@ Name | Type
|
|
|
11
11
|
`validation` | string
|
|
12
12
|
`systemFields` | Array<string>
|
|
13
13
|
`protectedFields` | Array<string>
|
|
14
|
+
`indexes` | [Array<CollectionDeclarationIndexesInner>](CollectionDeclarationIndexesInner.md)
|
|
15
|
+
`refs` | [Array<CollectionDeclarationRefsInner>](CollectionDeclarationRefsInner.md)
|
|
14
16
|
`timestamps` | [CollectionDeclarationTimestamps](CollectionDeclarationTimestamps.md)
|
|
15
17
|
`owner` | [CollectionDeclarationOwner](CollectionDeclarationOwner.md)
|
|
16
18
|
`softDelete` | [CollectionDeclarationSoftDelete](CollectionDeclarationSoftDelete.md)
|
|
@@ -29,6 +31,8 @@ const example = {
|
|
|
29
31
|
"validation": null,
|
|
30
32
|
"systemFields": null,
|
|
31
33
|
"protectedFields": null,
|
|
34
|
+
"indexes": null,
|
|
35
|
+
"refs": null,
|
|
32
36
|
"timestamps": null,
|
|
33
37
|
"owner": null,
|
|
34
38
|
"softDelete": null,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionDeclarationIndexesInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`key` | { [key: string]: any; }
|
|
11
|
+
`unique` | boolean
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { CollectionDeclarationIndexesInner } from ''
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"name": null,
|
|
21
|
+
"key": null,
|
|
22
|
+
"unique": null,
|
|
23
|
+
} satisfies CollectionDeclarationIndexesInner
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as CollectionDeclarationIndexesInner
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionDeclarationRefsInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`field` | string
|
|
10
|
+
`collection` | string
|
|
11
|
+
`many` | boolean
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { CollectionDeclarationRefsInner } from ''
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"field": null,
|
|
21
|
+
"collection": null,
|
|
22
|
+
"many": null,
|
|
23
|
+
} satisfies CollectionDeclarationRefsInner
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as CollectionDeclarationRefsInner
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -139,7 +139,7 @@ async function example() {
|
|
|
139
139
|
const body = {
|
|
140
140
|
// string | The name of your MongoDb Collection
|
|
141
141
|
collectionName: collectionName_example,
|
|
142
|
-
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
142
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
143
143
|
withDeleted: true,
|
|
144
144
|
// string | Filter Query like on the list of documents, by default all documents are counted (optional)
|
|
145
145
|
filter: filter_example,
|
|
@@ -165,7 +165,7 @@ example().catch(console.error);
|
|
|
165
165
|
| Name | Type | Description | Notes |
|
|
166
166
|
|------------- | ------------- | ------------- | -------------|
|
|
167
167
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
168
|
-
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
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`] |
|
|
169
169
|
| **filter** | `string` | Filter Query like on the list of documents, by default all documents are counted | [Optional] [Defaults to `undefined`] |
|
|
170
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`] |
|
|
171
171
|
|
|
@@ -227,7 +227,7 @@ async function example() {
|
|
|
227
227
|
collectionName: collectionName_example,
|
|
228
228
|
// CountRequest
|
|
229
229
|
countRequest: {"filter":"country:DE"},
|
|
230
|
-
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
230
|
+
// boolean | Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise. (optional)
|
|
231
231
|
withDeleted: true,
|
|
232
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)
|
|
233
233
|
filterCaseInsensitive: false,
|
|
@@ -252,7 +252,7 @@ example().catch(console.error);
|
|
|
252
252
|
|------------- | ------------- | ------------- | -------------|
|
|
253
253
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
254
254
|
| **countRequest** | [CountRequest](CountRequest.md) | | |
|
|
255
|
-
| **withDeleted** | `boolean` | Soft-deleted documents too (collections declared with softDelete, 2.
|
|
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`] |
|
|
256
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`] |
|
|
257
257
|
|
|
258
258
|
### Return type
|
|
@@ -370,7 +370,7 @@ example().catch(console.error);
|
|
|
370
370
|
|
|
371
371
|
## exportDocuments
|
|
372
372
|
|
|
373
|
-
> string exportDocuments(collectionName, withDeleted, format, filter, sort, projection, limit, extendedJson, filterCaseInsensitive, trailer)
|
|
373
|
+
> string exportDocuments(collectionName, expand, withDeleted, format, filter, sort, projection, limit, extendedJson, filterCaseInsensitive, trailer)
|
|
374
374
|
|
|
375
375
|
Export Documents of a Collection
|
|
376
376
|
|
|
@@ -401,7 +401,9 @@ async function example() {
|
|
|
401
401
|
const body = {
|
|
402
402
|
// string | The name of your MongoDb Collection
|
|
403
403
|
collectionName: collectionName_example,
|
|
404
|
-
//
|
|
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)
|
|
405
407
|
withDeleted: true,
|
|
406
408
|
// string | ndjson (one JSON document per line), json (one array) or csv (optional)
|
|
407
409
|
format: format_example,
|
|
@@ -439,7 +441,8 @@ example().catch(console.error);
|
|
|
439
441
|
| Name | Type | Description | Notes |
|
|
440
442
|
|------------- | ------------- | ------------- | -------------|
|
|
441
443
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
442
|
-
| **
|
|
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`] |
|
|
443
446
|
| **format** | `string` | ndjson (one JSON document per line), json (one array) or csv | [Optional] [Defaults to `'ndjson'`] |
|
|
444
447
|
| **filter** | `string` | Filter Query like on the list of documents, by default all documents are exported | [Optional] [Defaults to `undefined`] |
|
|
445
448
|
| **sort** | `Array<string>` | Sorting like on the list of documents, a leading - sorts descending | [Optional] |
|
|
@@ -475,7 +478,7 @@ example().catch(console.error);
|
|
|
475
478
|
|
|
476
479
|
## exportDocumentsByBody
|
|
477
480
|
|
|
478
|
-
> string exportDocumentsByBody(collectionName, exportRequest, withDeleted, format, extendedJson, filterCaseInsensitive, trailer)
|
|
481
|
+
> string exportDocumentsByBody(collectionName, exportRequest, expand, withDeleted, format, extendedJson, filterCaseInsensitive, trailer)
|
|
479
482
|
|
|
480
483
|
Export Documents of a Collection (filter in the body)
|
|
481
484
|
|
|
@@ -508,7 +511,9 @@ async function example() {
|
|
|
508
511
|
collectionName: collectionName_example,
|
|
509
512
|
// ExportRequest
|
|
510
513
|
exportRequest: {"filter":"country:DE AND age:[18 TO 65]","sort":["-age"],"projection":["name","age"]},
|
|
511
|
-
//
|
|
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)
|
|
512
517
|
withDeleted: true,
|
|
513
518
|
// string | ndjson (one JSON document per line), json (one array) or csv (optional)
|
|
514
519
|
format: format_example,
|
|
@@ -539,7 +544,8 @@ example().catch(console.error);
|
|
|
539
544
|
|------------- | ------------- | ------------- | -------------|
|
|
540
545
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
541
546
|
| **exportRequest** | [ExportRequest](ExportRequest.md) | | |
|
|
542
|
-
| **
|
|
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`] |
|
|
543
549
|
| **format** | `string` | ndjson (one JSON document per line), json (one array) or csv | [Optional] [Defaults to `'ndjson'`] |
|
|
544
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] |
|
|
545
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`] |
|
|
@@ -571,7 +577,7 @@ example().catch(console.error);
|
|
|
571
577
|
|
|
572
578
|
## find
|
|
573
579
|
|
|
574
|
-
> Array<{ [key: string]: any | null; }> find(collectionName, mongoFindRequest, withDeleted, rowsPerPage, page, count, after, extendedJson)
|
|
580
|
+
> Array<{ [key: string]: any | null; }> find(collectionName, mongoFindRequest, expand, withDeleted, rowsPerPage, page, count, after, extendedJson)
|
|
575
581
|
|
|
576
582
|
Documents in Collection
|
|
577
583
|
|
|
@@ -604,7 +610,9 @@ async function example() {
|
|
|
604
610
|
collectionName: collectionName_example,
|
|
605
611
|
// MongoFindRequest
|
|
606
612
|
mongoFindRequest: {"filter":{"additionalProp1":"string","additionalProp2":123},"sort":{"additionalProp2":-1},"projection":{"additionalProp1":1,"additionalProp2":1}},
|
|
607
|
-
//
|
|
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)
|
|
608
616
|
withDeleted: true,
|
|
609
617
|
// number | Count elements per page (optional)
|
|
610
618
|
rowsPerPage: 100,
|
|
@@ -637,7 +645,8 @@ example().catch(console.error);
|
|
|
637
645
|
|------------- | ------------- | ------------- | -------------|
|
|
638
646
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
639
647
|
| **mongoFindRequest** | [MongoFindRequest](MongoFindRequest.md) | | |
|
|
640
|
-
| **
|
|
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`] |
|
|
641
650
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
642
651
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
643
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] |
|
|
@@ -670,7 +679,7 @@ example().catch(console.error);
|
|
|
670
679
|
|
|
671
680
|
## getDocument
|
|
672
681
|
|
|
673
|
-
> { [key: string]: any | null; } getDocument(collectionName, documentId, withDeleted, extendedJson)
|
|
682
|
+
> { [key: string]: any | null; } getDocument(collectionName, documentId, expand, withDeleted, extendedJson)
|
|
674
683
|
|
|
675
684
|
Document from Collection
|
|
676
685
|
|
|
@@ -703,7 +712,9 @@ async function example() {
|
|
|
703
712
|
collectionName: collectionName_example,
|
|
704
713
|
// string | DocumentId to read
|
|
705
714
|
documentId: documentId_example,
|
|
706
|
-
//
|
|
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)
|
|
707
718
|
withDeleted: true,
|
|
708
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)
|
|
709
720
|
extendedJson: extendedJson_example,
|
|
@@ -728,7 +739,8 @@ example().catch(console.error);
|
|
|
728
739
|
|------------- | ------------- | ------------- | -------------|
|
|
729
740
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
730
741
|
| **documentId** | `string` | DocumentId to read | [Defaults to `undefined`] |
|
|
731
|
-
| **
|
|
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`] |
|
|
732
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] |
|
|
733
745
|
|
|
734
746
|
### Return type
|
|
@@ -760,7 +772,7 @@ example().catch(console.error);
|
|
|
760
772
|
|
|
761
773
|
History of a Document
|
|
762
774
|
|
|
763
|
-
The audit records of a document of a collection declared with audit, newest first (2.
|
|
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.
|
|
764
776
|
|
|
765
777
|
### Example
|
|
766
778
|
|
|
@@ -1092,7 +1104,7 @@ example().catch(console.error);
|
|
|
1092
1104
|
|
|
1093
1105
|
## listDocuments
|
|
1094
1106
|
|
|
1095
|
-
> Array<{ [key: string]: any | null; }> listDocuments(collectionName, withDeleted, 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)
|
|
1096
1108
|
|
|
1097
1109
|
Documents in Collection
|
|
1098
1110
|
|
|
@@ -1123,7 +1135,9 @@ async function example() {
|
|
|
1123
1135
|
const body = {
|
|
1124
1136
|
// string | The name of your MongoDb Collection
|
|
1125
1137
|
collectionName: collectionName_example,
|
|
1126
|
-
//
|
|
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)
|
|
1127
1141
|
withDeleted: true,
|
|
1128
1142
|
// string | MongoDB filter query, all documents by default (optional)
|
|
1129
1143
|
filter: filter_example,
|
|
@@ -1163,7 +1177,8 @@ example().catch(console.error);
|
|
|
1163
1177
|
| Name | Type | Description | Notes |
|
|
1164
1178
|
|------------- | ------------- | ------------- | -------------|
|
|
1165
1179
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1166
|
-
| **
|
|
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`] |
|
|
1167
1182
|
| **filter** | `string` | MongoDB filter query, all documents by default | [Optional] [Defaults to `undefined`] |
|
|
1168
1183
|
| **sort** | `Array<string>` | MongoDB sorting | [Optional] |
|
|
1169
1184
|
| **projection** | `Array<string>` | MongoDB projection | [Optional] |
|
|
@@ -1204,7 +1219,7 @@ example().catch(console.error);
|
|
|
1204
1219
|
|
|
1205
1220
|
Restore a soft-deleted Document
|
|
1206
1221
|
|
|
1207
|
-
Removes the deleted mark of a document of a collection declared with softDelete (2.
|
|
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.
|
|
1208
1223
|
|
|
1209
1224
|
### Example
|
|
1210
1225
|
|
|
@@ -1281,7 +1296,7 @@ example().catch(console.error);
|
|
|
1281
1296
|
|
|
1282
1297
|
## searchDocuments
|
|
1283
1298
|
|
|
1284
|
-
> Array<{ [key: string]: any | null; }> searchDocuments(collectionName, searchRequest, withDeleted, rowsPerPage, page, count, after, extendedJson, filterCaseInsensitive)
|
|
1299
|
+
> Array<{ [key: string]: any | null; }> searchDocuments(collectionName, searchRequest, expand, withDeleted, rowsPerPage, page, count, after, extendedJson, filterCaseInsensitive)
|
|
1285
1300
|
|
|
1286
1301
|
Search Documents in Collection
|
|
1287
1302
|
|
|
@@ -1314,7 +1329,9 @@ async function example() {
|
|
|
1314
1329
|
collectionName: collectionName_example,
|
|
1315
1330
|
// SearchRequest
|
|
1316
1331
|
searchRequest: {"filter":"name:John AND age:[18 TO 65]","sort":["-age"],"projection":["name","age"]},
|
|
1317
|
-
//
|
|
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)
|
|
1318
1335
|
withDeleted: true,
|
|
1319
1336
|
// number | Count elements per page (optional)
|
|
1320
1337
|
rowsPerPage: 100,
|
|
@@ -1349,7 +1366,8 @@ example().catch(console.error);
|
|
|
1349
1366
|
|------------- | ------------- | ------------- | -------------|
|
|
1350
1367
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1351
1368
|
| **searchRequest** | [SearchRequest](SearchRequest.md) | | |
|
|
1352
|
-
| **
|
|
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`] |
|
|
1353
1371
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
1354
1372
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
1355
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] |
|
|
@@ -1641,11 +1659,11 @@ example().catch(console.error);
|
|
|
1641
1659
|
|
|
1642
1660
|
## watchDocuments
|
|
1643
1661
|
|
|
1644
|
-
> string watchDocuments(collectionName, filter, filterCaseInsensitive, lastEventID)
|
|
1662
|
+
> string watchDocuments(collectionName, expand, filter, filterCaseInsensitive, lastEventID)
|
|
1645
1663
|
|
|
1646
1664
|
Live Updates of a Collection
|
|
1647
1665
|
|
|
1648
|
-
The changes of the documents as Server-Sent Events (2.
|
|
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).
|
|
1649
1667
|
|
|
1650
1668
|
### Example
|
|
1651
1669
|
|
|
@@ -1663,6 +1681,8 @@ async function example() {
|
|
|
1663
1681
|
const body = {
|
|
1664
1682
|
// string | The name of your MongoDb Collection
|
|
1665
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: ...,
|
|
1666
1686
|
// string | Lucene filter of the documents to watch. (optional)
|
|
1667
1687
|
filter: filter_example,
|
|
1668
1688
|
// boolean (optional)
|
|
@@ -1689,6 +1709,7 @@ example().catch(console.error);
|
|
|
1689
1709
|
| Name | Type | Description | Notes |
|
|
1690
1710
|
|------------- | ------------- | ------------- | -------------|
|
|
1691
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] |
|
|
1692
1713
|
| **filter** | `string` | Lucene filter of the documents to watch. | [Optional] [Defaults to `undefined`] |
|
|
1693
1714
|
| **filterCaseInsensitive** | `boolean` | | [Optional] [Defaults to `undefined`] |
|
|
1694
1715
|
| **lastEventID** | `string` | The id of the last event the client got, to resume after it. | [Optional] [Defaults to `undefined`] |
|
|
@@ -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)
|
|
@@ -13,6 +13,8 @@ import type { CollectionDeclarationAudit } from './CollectionDeclarationAudit.js
|
|
|
13
13
|
import type { CollectionDeclarationTimestamps } from './CollectionDeclarationTimestamps.js';
|
|
14
14
|
import type { CollectionDeclarationVersioned } from './CollectionDeclarationVersioned.js';
|
|
15
15
|
import type { CollectionDeclarationOwner } from './CollectionDeclarationOwner.js';
|
|
16
|
+
import type { CollectionDeclarationRefsInner } from './CollectionDeclarationRefsInner.js';
|
|
17
|
+
import type { CollectionDeclarationIndexesInner } from './CollectionDeclarationIndexesInner.js';
|
|
16
18
|
import type { CollectionDeclarationSoftDelete } from './CollectionDeclarationSoftDelete.js';
|
|
17
19
|
/**
|
|
18
20
|
*
|
|
@@ -40,6 +42,14 @@ export interface CollectionDeclaration {
|
|
|
40
42
|
*
|
|
41
43
|
*/
|
|
42
44
|
protectedFields: Array<string>;
|
|
45
|
+
/**
|
|
46
|
+
* The indexes of the declaration and its behaviours (2.4.0), synced at the start.
|
|
47
|
+
*/
|
|
48
|
+
indexes: Array<CollectionDeclarationIndexesInner>;
|
|
49
|
+
/**
|
|
50
|
+
* The references of the declaration (2.4.0), the fields a read can expand (query parameter expand).
|
|
51
|
+
*/
|
|
52
|
+
refs: Array<CollectionDeclarationRefsInner>;
|
|
43
53
|
/**
|
|
44
54
|
*
|
|
45
55
|
*/
|
|
@@ -14,6 +14,14 @@ import {
|
|
|
14
14
|
CollectionDeclarationOwnerFromJSON,
|
|
15
15
|
CollectionDeclarationOwnerToJSON
|
|
16
16
|
} from "./CollectionDeclarationOwner.js";
|
|
17
|
+
import {
|
|
18
|
+
CollectionDeclarationRefsInnerFromJSON,
|
|
19
|
+
CollectionDeclarationRefsInnerToJSON
|
|
20
|
+
} from "./CollectionDeclarationRefsInner.js";
|
|
21
|
+
import {
|
|
22
|
+
CollectionDeclarationIndexesInnerFromJSON,
|
|
23
|
+
CollectionDeclarationIndexesInnerToJSON
|
|
24
|
+
} from "./CollectionDeclarationIndexesInner.js";
|
|
17
25
|
import {
|
|
18
26
|
CollectionDeclarationSoftDeleteFromJSON,
|
|
19
27
|
CollectionDeclarationSoftDeleteToJSON
|
|
@@ -29,6 +37,8 @@ export function instanceOfCollectionDeclaration(value) {
|
|
|
29
37
|
if (!("validation" in value) || value["validation"] === void 0) return false;
|
|
30
38
|
if (!("systemFields" in value) || value["systemFields"] === void 0) return false;
|
|
31
39
|
if (!("protectedFields" in value) || value["protectedFields"] === void 0) return false;
|
|
40
|
+
if (!("indexes" in value) || value["indexes"] === void 0) return false;
|
|
41
|
+
if (!("refs" in value) || value["refs"] === void 0) return false;
|
|
32
42
|
return true;
|
|
33
43
|
}
|
|
34
44
|
export function CollectionDeclarationFromJSON(json) {
|
|
@@ -44,6 +54,8 @@ export function CollectionDeclarationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
54
|
"validation": json["validation"],
|
|
45
55
|
"systemFields": json["systemFields"],
|
|
46
56
|
"protectedFields": json["protectedFields"],
|
|
57
|
+
"indexes": json["indexes"].map(CollectionDeclarationIndexesInnerFromJSON),
|
|
58
|
+
"refs": json["refs"].map(CollectionDeclarationRefsInnerFromJSON),
|
|
47
59
|
"timestamps": json["timestamps"] == null ? void 0 : CollectionDeclarationTimestampsFromJSON(json["timestamps"]),
|
|
48
60
|
"owner": json["owner"] == null ? void 0 : CollectionDeclarationOwnerFromJSON(json["owner"]),
|
|
49
61
|
"softDelete": json["softDelete"] == null ? void 0 : CollectionDeclarationSoftDeleteFromJSON(json["softDelete"]),
|
|
@@ -64,6 +76,8 @@ export function CollectionDeclarationToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
64
76
|
"validation": value["validation"],
|
|
65
77
|
"systemFields": value["systemFields"],
|
|
66
78
|
"protectedFields": value["protectedFields"],
|
|
79
|
+
"indexes": value["indexes"].map(CollectionDeclarationIndexesInnerToJSON),
|
|
80
|
+
"refs": value["refs"].map(CollectionDeclarationRefsInnerToJSON),
|
|
67
81
|
"timestamps": CollectionDeclarationTimestampsToJSON(value["timestamps"]),
|
|
68
82
|
"owner": CollectionDeclarationOwnerToJSON(value["owner"]),
|
|
69
83
|
"softDelete": CollectionDeclarationSoftDeleteToJSON(value["softDelete"]),
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mongocamp-library
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CollectionDeclarationIndexesInner
|
|
16
|
+
*/
|
|
17
|
+
export interface CollectionDeclarationIndexesInner {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
key: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
unique: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the CollectionDeclarationIndexesInner interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfCollectionDeclarationIndexesInner(value: object): value is CollectionDeclarationIndexesInner;
|
|
37
|
+
export declare function CollectionDeclarationIndexesInnerFromJSON(json: any): CollectionDeclarationIndexesInner;
|
|
38
|
+
export declare function CollectionDeclarationIndexesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionDeclarationIndexesInner;
|
|
39
|
+
export declare function CollectionDeclarationIndexesInnerToJSON(json: any): CollectionDeclarationIndexesInner;
|
|
40
|
+
export declare function CollectionDeclarationIndexesInnerToJSONTyped(value?: CollectionDeclarationIndexesInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function instanceOfCollectionDeclarationIndexesInner(value) {
|
|
2
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
3
|
+
if (!("key" in value) || value["key"] === void 0) return false;
|
|
4
|
+
if (!("unique" in value) || value["unique"] === void 0) return false;
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
export function CollectionDeclarationIndexesInnerFromJSON(json) {
|
|
8
|
+
return CollectionDeclarationIndexesInnerFromJSONTyped(json, false);
|
|
9
|
+
}
|
|
10
|
+
export function CollectionDeclarationIndexesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
11
|
+
if (json == null) {
|
|
12
|
+
return json;
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
"name": json["name"],
|
|
16
|
+
"key": json["key"],
|
|
17
|
+
"unique": json["unique"]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export function CollectionDeclarationIndexesInnerToJSON(json) {
|
|
21
|
+
return CollectionDeclarationIndexesInnerToJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function CollectionDeclarationIndexesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24
|
+
if (value == null) {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
"name": value["name"],
|
|
29
|
+
"key": value["key"],
|
|
30
|
+
"unique": value["unique"]
|
|
31
|
+
};
|
|
32
|
+
}
|