@sfxcode/nuxt-mongocamp-server 2.1.0 → 2.3.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 +71 -19
- package/dist/module.d.mts +16 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +103 -11
- package/dist/runtime/api/.openapi-generator/FILES +24 -2
- package/dist/runtime/api/apis/CollectionApi.d.ts +137 -0
- package/dist/runtime/api/apis/CollectionApi.js +213 -0
- package/dist/runtime/api/apis/DocumentApi.d.ts +225 -8
- package/dist/runtime/api/apis/DocumentApi.js +364 -5
- package/dist/runtime/api/docs/AuditEntry.md +52 -0
- package/dist/runtime/api/docs/CollectionApi.md +272 -2
- package/dist/runtime/api/docs/CollectionDeclaration.md +52 -0
- package/dist/runtime/api/docs/CollectionDeclarationAudit.md +34 -0
- package/dist/runtime/api/docs/CollectionDeclarationOwner.md +36 -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/CountRequest.md +34 -0
- package/dist/runtime/api/docs/DocumentApi.md +467 -12
- package/dist/runtime/api/docs/ErrorDescription.md +4 -0
- package/dist/runtime/api/docs/ExportRequest.md +40 -0
- package/dist/runtime/api/docs/MongoAggregateRequest.md +2 -0
- package/dist/runtime/api/docs/SettingsResponse.md +0 -6
- package/dist/runtime/api/docs/SuggestedValidator.md +40 -0
- package/dist/runtime/api/docs/{UpdateRequest.md → UpdateManyRequest.md} +4 -4
- 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 +80 -0
- package/dist/runtime/api/models/CollectionDeclaration.js +73 -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/CollectionDeclarationOwner.d.ts +43 -0
- package/dist/runtime/api/models/CollectionDeclarationOwner.js +34 -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/CountRequest.d.ts +30 -0
- package/dist/runtime/api/models/CountRequest.js +25 -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 +42 -0
- package/dist/runtime/api/models/ExportRequest.js +31 -0
- package/dist/runtime/api/models/Grant.d.ts +10 -1
- package/dist/runtime/api/models/Grant.js +5 -0
- package/dist/runtime/api/models/MongoAggregateRequest.d.ts +4 -0
- package/dist/runtime/api/models/MongoAggregateRequest.js +4 -2
- package/dist/runtime/api/models/SettingsResponse.d.ts +0 -14
- package/dist/runtime/api/models/SettingsResponse.js +0 -6
- package/dist/runtime/api/models/SuggestedValidator.d.ts +44 -0
- package/dist/runtime/api/models/SuggestedValidator.js +35 -0
- package/dist/runtime/api/models/UpdateManyRequest.d.ts +38 -0
- package/dist/runtime/api/models/{UpdateRequest.js → UpdateManyRequest.js} +7 -7
- 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 +12 -1
- package/dist/runtime/api/models/index.js +12 -1
- package/dist/runtime/composables/mongocampApiCollection.d.ts +14 -15
- package/dist/runtime/composables/mongocampApiCollection.js +4 -1
- package/dist/runtime/composables/mongocampCollection.d.ts +106 -0
- package/dist/runtime/composables/mongocampCollection.js +200 -0
- package/dist/runtime/composables/mongocampLive.d.ts +33 -0
- package/dist/runtime/composables/mongocampLive.js +152 -0
- package/dist/runtime/composables/mongocampSearch.d.ts +12 -9
- package/dist/runtime/server/mongocamp/core.d.ts +2 -0
- package/dist/runtime/server/mongocamp/core.js +8 -1
- package/dist/runtime/server/mongocamp/plugin.d.ts +5 -1
- package/dist/runtime/server/mongocamp/plugin.js +21 -1
- package/dist/runtime/types/collections.d.ts +20 -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
- package/dist/runtime/api/models/UpdateRequest.d.ts +0 -38
|
@@ -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)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# ExportRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`filter` | string
|
|
10
|
+
`sort` | Array<string>
|
|
11
|
+
`projection` | Array<string>
|
|
12
|
+
`limit` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ExportRequest } from ''
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"filter": null,
|
|
22
|
+
"sort": null,
|
|
23
|
+
"projection": null,
|
|
24
|
+
"limit": null,
|
|
25
|
+
} satisfies ExportRequest
|
|
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 ExportRequest
|
|
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
|
+
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`pipeline` | [Array<PipelineStage>](PipelineStage.md)
|
|
10
10
|
`allowDiskUse` | boolean
|
|
11
|
+
`filter` | string
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ import type { MongoAggregateRequest } from ''
|
|
|
18
19
|
const example = {
|
|
19
20
|
"pipeline": null,
|
|
20
21
|
"allowDiskUse": null,
|
|
22
|
+
"filter": null,
|
|
21
23
|
} satisfies MongoAggregateRequest
|
|
22
24
|
|
|
23
25
|
console.log(example)
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`routesPlugins` | Array<string>
|
|
10
|
-
`filePlugins` | Array<string>
|
|
11
|
-
`ignoredPlugins` | Array<string>
|
|
12
9
|
`configurations` | { [key: string]: any | null; }
|
|
13
10
|
|
|
14
11
|
## Example
|
|
@@ -18,9 +15,6 @@ import type { SettingsResponse } from ''
|
|
|
18
15
|
|
|
19
16
|
// TODO: Update the object below with actual values
|
|
20
17
|
const example = {
|
|
21
|
-
"routesPlugins": null,
|
|
22
|
-
"filePlugins": null,
|
|
23
|
-
"ignoredPlugins": null,
|
|
24
18
|
"configurations": null,
|
|
25
19
|
} satisfies SettingsResponse
|
|
26
20
|
|
|
@@ -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
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# UpdateManyRequest
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
@@ -12,13 +12,13 @@ Name | Type
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import type {
|
|
15
|
+
import type { UpdateManyRequest } from ''
|
|
16
16
|
|
|
17
17
|
// TODO: Update the object below with actual values
|
|
18
18
|
const example = {
|
|
19
19
|
"document": null,
|
|
20
20
|
"filter": null,
|
|
21
|
-
} satisfies
|
|
21
|
+
} satisfies UpdateManyRequest
|
|
22
22
|
|
|
23
23
|
console.log(example)
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
27
27
|
console.log(exampleJSON)
|
|
28
28
|
|
|
29
29
|
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateManyRequest
|
|
31
31
|
console.log(exampleParsed)
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
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 AuditEntry
|
|
16
|
+
*/
|
|
17
|
+
export interface AuditEntry {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
collection: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
database: string;
|
|
26
|
+
/**
|
|
27
|
+
* The _id of the document; absent on a summary record.
|
|
28
|
+
*/
|
|
29
|
+
documentId?: any | null;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
operation: AuditEntryOperationEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
user: string;
|
|
38
|
+
/**
|
|
39
|
+
* The time (Extended JSON date).
|
|
40
|
+
*/
|
|
41
|
+
at: {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
before?: {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
after?: {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A write of many documents: count and recorded.
|
|
58
|
+
*/
|
|
59
|
+
summary?: {
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
expiresAt?: {
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @export
|
|
71
|
+
*/
|
|
72
|
+
export declare const AuditEntryOperationEnum: {
|
|
73
|
+
readonly Insert: "insert";
|
|
74
|
+
readonly Replace: "replace";
|
|
75
|
+
readonly Update: "update";
|
|
76
|
+
readonly Delete: "delete";
|
|
77
|
+
readonly SoftDelete: "softDelete";
|
|
78
|
+
readonly Restore: "restore";
|
|
79
|
+
};
|
|
80
|
+
export type AuditEntryOperationEnum = typeof AuditEntryOperationEnum[keyof typeof AuditEntryOperationEnum];
|
|
81
|
+
/**
|
|
82
|
+
* Check if a given object implements the AuditEntry interface.
|
|
83
|
+
*/
|
|
84
|
+
export declare function instanceOfAuditEntry(value: object): value is AuditEntry;
|
|
85
|
+
export declare function AuditEntryFromJSON(json: any): AuditEntry;
|
|
86
|
+
export declare function AuditEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditEntry;
|
|
87
|
+
export declare function AuditEntryToJSON(json: any): AuditEntry;
|
|
88
|
+
export declare function AuditEntryToJSONTyped(value?: AuditEntry | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const AuditEntryOperationEnum = {
|
|
2
|
+
Insert: "insert",
|
|
3
|
+
Replace: "replace",
|
|
4
|
+
Update: "update",
|
|
5
|
+
Delete: "delete",
|
|
6
|
+
SoftDelete: "softDelete",
|
|
7
|
+
Restore: "restore"
|
|
8
|
+
};
|
|
9
|
+
export function instanceOfAuditEntry(value) {
|
|
10
|
+
if (!("collection" in value) || value["collection"] === void 0) return false;
|
|
11
|
+
if (!("database" in value) || value["database"] === void 0) return false;
|
|
12
|
+
if (!("operation" in value) || value["operation"] === void 0) return false;
|
|
13
|
+
if (!("user" in value) || value["user"] === void 0) return false;
|
|
14
|
+
if (!("at" in value) || value["at"] === void 0) return false;
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
export function AuditEntryFromJSON(json) {
|
|
18
|
+
return AuditEntryFromJSONTyped(json, false);
|
|
19
|
+
}
|
|
20
|
+
export function AuditEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
21
|
+
if (json == null) {
|
|
22
|
+
return json;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
"collection": json["collection"],
|
|
26
|
+
"database": json["database"],
|
|
27
|
+
"documentId": json["documentId"] === void 0 ? void 0 : json["documentId"] === null ? null : json["documentId"],
|
|
28
|
+
"operation": json["operation"],
|
|
29
|
+
"user": json["user"],
|
|
30
|
+
"at": json["at"],
|
|
31
|
+
"before": json["before"] == null ? void 0 : json["before"],
|
|
32
|
+
"after": json["after"] == null ? void 0 : json["after"],
|
|
33
|
+
"summary": json["summary"] == null ? void 0 : json["summary"],
|
|
34
|
+
"expiresAt": json["expiresAt"] == null ? void 0 : json["expiresAt"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function AuditEntryToJSON(json) {
|
|
38
|
+
return AuditEntryToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function AuditEntryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
"collection": value["collection"],
|
|
46
|
+
"database": value["database"],
|
|
47
|
+
"documentId": value["documentId"],
|
|
48
|
+
"operation": value["operation"],
|
|
49
|
+
"user": value["user"],
|
|
50
|
+
"at": value["at"],
|
|
51
|
+
"before": value["before"],
|
|
52
|
+
"after": value["after"],
|
|
53
|
+
"summary": value["summary"],
|
|
54
|
+
"expiresAt": value["expiresAt"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
import type { CollectionDeclarationAudit } from './CollectionDeclarationAudit.js';
|
|
13
|
+
import type { CollectionDeclarationTimestamps } from './CollectionDeclarationTimestamps.js';
|
|
14
|
+
import type { CollectionDeclarationVersioned } from './CollectionDeclarationVersioned.js';
|
|
15
|
+
import type { CollectionDeclarationOwner } from './CollectionDeclarationOwner.js';
|
|
16
|
+
import type { CollectionDeclarationSoftDelete } from './CollectionDeclarationSoftDelete.js';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface CollectionDeclaration
|
|
21
|
+
*/
|
|
22
|
+
export interface CollectionDeclaration {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
database: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
validation: CollectionDeclarationValidationEnum;
|
|
35
|
+
/**
|
|
36
|
+
* The fields the server writes (timestamps, owner, version, deleted mark); clients do not send them.
|
|
37
|
+
*/
|
|
38
|
+
systemFields: Array<string>;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
protectedFields: Array<string>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
timestamps?: CollectionDeclarationTimestamps;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
owner?: CollectionDeclarationOwner;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
softDelete?: CollectionDeclarationSoftDelete;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
versioned?: CollectionDeclarationVersioned;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
audit?: CollectionDeclarationAudit;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @export
|
|
66
|
+
*/
|
|
67
|
+
export declare const CollectionDeclarationValidationEnum: {
|
|
68
|
+
readonly Off: "off";
|
|
69
|
+
readonly Warn: "warn";
|
|
70
|
+
readonly Error: "error";
|
|
71
|
+
};
|
|
72
|
+
export type CollectionDeclarationValidationEnum = typeof CollectionDeclarationValidationEnum[keyof typeof CollectionDeclarationValidationEnum];
|
|
73
|
+
/**
|
|
74
|
+
* Check if a given object implements the CollectionDeclaration interface.
|
|
75
|
+
*/
|
|
76
|
+
export declare function instanceOfCollectionDeclaration(value: object): value is CollectionDeclaration;
|
|
77
|
+
export declare function CollectionDeclarationFromJSON(json: any): CollectionDeclaration;
|
|
78
|
+
export declare function CollectionDeclarationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionDeclaration;
|
|
79
|
+
export declare function CollectionDeclarationToJSON(json: any): CollectionDeclaration;
|
|
80
|
+
export declare function CollectionDeclarationToJSONTyped(value?: CollectionDeclaration | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CollectionDeclarationAuditFromJSON,
|
|
3
|
+
CollectionDeclarationAuditToJSON
|
|
4
|
+
} from "./CollectionDeclarationAudit.js";
|
|
5
|
+
import {
|
|
6
|
+
CollectionDeclarationTimestampsFromJSON,
|
|
7
|
+
CollectionDeclarationTimestampsToJSON
|
|
8
|
+
} from "./CollectionDeclarationTimestamps.js";
|
|
9
|
+
import {
|
|
10
|
+
CollectionDeclarationVersionedFromJSON,
|
|
11
|
+
CollectionDeclarationVersionedToJSON
|
|
12
|
+
} from "./CollectionDeclarationVersioned.js";
|
|
13
|
+
import {
|
|
14
|
+
CollectionDeclarationOwnerFromJSON,
|
|
15
|
+
CollectionDeclarationOwnerToJSON
|
|
16
|
+
} from "./CollectionDeclarationOwner.js";
|
|
17
|
+
import {
|
|
18
|
+
CollectionDeclarationSoftDeleteFromJSON,
|
|
19
|
+
CollectionDeclarationSoftDeleteToJSON
|
|
20
|
+
} from "./CollectionDeclarationSoftDelete.js";
|
|
21
|
+
export const CollectionDeclarationValidationEnum = {
|
|
22
|
+
Off: "off",
|
|
23
|
+
Warn: "warn",
|
|
24
|
+
Error: "error"
|
|
25
|
+
};
|
|
26
|
+
export function instanceOfCollectionDeclaration(value) {
|
|
27
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
28
|
+
if (!("database" in value) || value["database"] === void 0) return false;
|
|
29
|
+
if (!("validation" in value) || value["validation"] === void 0) return false;
|
|
30
|
+
if (!("systemFields" in value) || value["systemFields"] === void 0) return false;
|
|
31
|
+
if (!("protectedFields" in value) || value["protectedFields"] === void 0) return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
export function CollectionDeclarationFromJSON(json) {
|
|
35
|
+
return CollectionDeclarationFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function CollectionDeclarationFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
"name": json["name"],
|
|
43
|
+
"database": json["database"],
|
|
44
|
+
"validation": json["validation"],
|
|
45
|
+
"systemFields": json["systemFields"],
|
|
46
|
+
"protectedFields": json["protectedFields"],
|
|
47
|
+
"timestamps": json["timestamps"] == null ? void 0 : CollectionDeclarationTimestampsFromJSON(json["timestamps"]),
|
|
48
|
+
"owner": json["owner"] == null ? void 0 : CollectionDeclarationOwnerFromJSON(json["owner"]),
|
|
49
|
+
"softDelete": json["softDelete"] == null ? void 0 : CollectionDeclarationSoftDeleteFromJSON(json["softDelete"]),
|
|
50
|
+
"versioned": json["versioned"] == null ? void 0 : CollectionDeclarationVersionedFromJSON(json["versioned"]),
|
|
51
|
+
"audit": json["audit"] == null ? void 0 : CollectionDeclarationAuditFromJSON(json["audit"])
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function CollectionDeclarationToJSON(json) {
|
|
55
|
+
return CollectionDeclarationToJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
export function CollectionDeclarationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
"name": value["name"],
|
|
63
|
+
"database": value["database"],
|
|
64
|
+
"validation": value["validation"],
|
|
65
|
+
"systemFields": value["systemFields"],
|
|
66
|
+
"protectedFields": value["protectedFields"],
|
|
67
|
+
"timestamps": CollectionDeclarationTimestampsToJSON(value["timestamps"]),
|
|
68
|
+
"owner": CollectionDeclarationOwnerToJSON(value["owner"]),
|
|
69
|
+
"softDelete": CollectionDeclarationSoftDeleteToJSON(value["softDelete"]),
|
|
70
|
+
"versioned": CollectionDeclarationVersionedToJSON(value["versioned"]),
|
|
71
|
+
"audit": CollectionDeclarationAuditToJSON(value["audit"])
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 CollectionDeclarationAudit
|
|
16
|
+
*/
|
|
17
|
+
export interface CollectionDeclarationAudit {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
retentionDays: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the CollectionDeclarationAudit interface.
|
|
25
|
+
*/
|
|
26
|
+
export declare function instanceOfCollectionDeclarationAudit(value: object): value is CollectionDeclarationAudit;
|
|
27
|
+
export declare function CollectionDeclarationAuditFromJSON(json: any): CollectionDeclarationAudit;
|
|
28
|
+
export declare function CollectionDeclarationAuditFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionDeclarationAudit;
|
|
29
|
+
export declare function CollectionDeclarationAuditToJSON(json: any): CollectionDeclarationAudit;
|
|
30
|
+
export declare function CollectionDeclarationAuditToJSONTyped(value?: CollectionDeclarationAudit | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function instanceOfCollectionDeclarationAudit(value) {
|
|
2
|
+
if (!("retentionDays" in value) || value["retentionDays"] === void 0) return false;
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
export function CollectionDeclarationAuditFromJSON(json) {
|
|
6
|
+
return CollectionDeclarationAuditFromJSONTyped(json, false);
|
|
7
|
+
}
|
|
8
|
+
export function CollectionDeclarationAuditFromJSONTyped(json, ignoreDiscriminator) {
|
|
9
|
+
if (json == null) {
|
|
10
|
+
return json;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
"retentionDays": json["retentionDays"]
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function CollectionDeclarationAuditToJSON(json) {
|
|
17
|
+
return CollectionDeclarationAuditToJSONTyped(json, false);
|
|
18
|
+
}
|
|
19
|
+
export function CollectionDeclarationAuditToJSONTyped(value, ignoreDiscriminator = false) {
|
|
20
|
+
if (value == null) {
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
"retentionDays": value["retentionDays"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 CollectionDeclarationOwner
|
|
16
|
+
*/
|
|
17
|
+
export interface CollectionDeclarationOwner {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
field: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
read: CollectionDeclarationOwnerReadEnum;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export declare const CollectionDeclarationOwnerReadEnum: {
|
|
31
|
+
readonly Own: "own";
|
|
32
|
+
readonly All: "all";
|
|
33
|
+
readonly Custom: "custom";
|
|
34
|
+
};
|
|
35
|
+
export type CollectionDeclarationOwnerReadEnum = typeof CollectionDeclarationOwnerReadEnum[keyof typeof CollectionDeclarationOwnerReadEnum];
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the CollectionDeclarationOwner interface.
|
|
38
|
+
*/
|
|
39
|
+
export declare function instanceOfCollectionDeclarationOwner(value: object): value is CollectionDeclarationOwner;
|
|
40
|
+
export declare function CollectionDeclarationOwnerFromJSON(json: any): CollectionDeclarationOwner;
|
|
41
|
+
export declare function CollectionDeclarationOwnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionDeclarationOwner;
|
|
42
|
+
export declare function CollectionDeclarationOwnerToJSON(json: any): CollectionDeclarationOwner;
|
|
43
|
+
export declare function CollectionDeclarationOwnerToJSONTyped(value?: CollectionDeclarationOwner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const CollectionDeclarationOwnerReadEnum = {
|
|
2
|
+
Own: "own",
|
|
3
|
+
All: "all",
|
|
4
|
+
Custom: "custom"
|
|
5
|
+
};
|
|
6
|
+
export function instanceOfCollectionDeclarationOwner(value) {
|
|
7
|
+
if (!("field" in value) || value["field"] === void 0) return false;
|
|
8
|
+
if (!("read" in value) || value["read"] === void 0) return false;
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
export function CollectionDeclarationOwnerFromJSON(json) {
|
|
12
|
+
return CollectionDeclarationOwnerFromJSONTyped(json, false);
|
|
13
|
+
}
|
|
14
|
+
export function CollectionDeclarationOwnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
15
|
+
if (json == null) {
|
|
16
|
+
return json;
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
"field": json["field"],
|
|
20
|
+
"read": json["read"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function CollectionDeclarationOwnerToJSON(json) {
|
|
24
|
+
return CollectionDeclarationOwnerToJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function CollectionDeclarationOwnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
27
|
+
if (value == null) {
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
"field": value["field"],
|
|
32
|
+
"read": value["read"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 CollectionDeclarationSoftDelete
|
|
16
|
+
*/
|
|
17
|
+
export interface CollectionDeclarationSoftDelete {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
field: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
purgeAfterDays?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the CollectionDeclarationSoftDelete interface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function instanceOfCollectionDeclarationSoftDelete(value: object): value is CollectionDeclarationSoftDelete;
|
|
31
|
+
export declare function CollectionDeclarationSoftDeleteFromJSON(json: any): CollectionDeclarationSoftDelete;
|
|
32
|
+
export declare function CollectionDeclarationSoftDeleteFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionDeclarationSoftDelete;
|
|
33
|
+
export declare function CollectionDeclarationSoftDeleteToJSON(json: any): CollectionDeclarationSoftDelete;
|
|
34
|
+
export declare function CollectionDeclarationSoftDeleteToJSONTyped(value?: CollectionDeclarationSoftDelete | null, ignoreDiscriminator?: boolean): any;
|