@sfxcode/nuxt-mongocamp-server 2.2.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 +52 -1
- package/dist/module.d.mts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +91 -11
- package/dist/runtime/api/.openapi-generator/FILES +18 -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 +134 -0
- package/dist/runtime/api/apis/DocumentApi.js +208 -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 +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/DocumentApi.md +282 -8
- package/dist/runtime/api/docs/ErrorDescription.md +4 -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 +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/ErrorDescription.d.ts +11 -0
- package/dist/runtime/api/models/ErrorDescription.js +10 -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 +9 -0
- package/dist/runtime/api/models/index.js +9 -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 +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/plugin.d.ts +2 -2
- package/dist/runtime/server/mongocamp/plugin.js +10 -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
|
@@ -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;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function instanceOfCollectionDeclarationSoftDelete(value) {
|
|
2
|
+
if (!("field" in value) || value["field"] === void 0) return false;
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
export function CollectionDeclarationSoftDeleteFromJSON(json) {
|
|
6
|
+
return CollectionDeclarationSoftDeleteFromJSONTyped(json, false);
|
|
7
|
+
}
|
|
8
|
+
export function CollectionDeclarationSoftDeleteFromJSONTyped(json, ignoreDiscriminator) {
|
|
9
|
+
if (json == null) {
|
|
10
|
+
return json;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
"field": json["field"],
|
|
14
|
+
"purgeAfterDays": json["purgeAfterDays"] == null ? void 0 : json["purgeAfterDays"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function CollectionDeclarationSoftDeleteToJSON(json) {
|
|
18
|
+
return CollectionDeclarationSoftDeleteToJSONTyped(json, false);
|
|
19
|
+
}
|
|
20
|
+
export function CollectionDeclarationSoftDeleteToJSONTyped(value, ignoreDiscriminator = false) {
|
|
21
|
+
if (value == null) {
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
"field": value["field"],
|
|
26
|
+
"purgeAfterDays": value["purgeAfterDays"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 CollectionDeclarationTimestamps
|
|
16
|
+
*/
|
|
17
|
+
export interface CollectionDeclarationTimestamps {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
createdAt: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
createdBy?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
updatedBy?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check if a given object implements the CollectionDeclarationTimestamps interface.
|
|
37
|
+
*/
|
|
38
|
+
export declare function instanceOfCollectionDeclarationTimestamps(value: object): value is CollectionDeclarationTimestamps;
|
|
39
|
+
export declare function CollectionDeclarationTimestampsFromJSON(json: any): CollectionDeclarationTimestamps;
|
|
40
|
+
export declare function CollectionDeclarationTimestampsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionDeclarationTimestamps;
|
|
41
|
+
export declare function CollectionDeclarationTimestampsToJSON(json: any): CollectionDeclarationTimestamps;
|
|
42
|
+
export declare function CollectionDeclarationTimestampsToJSONTyped(value?: CollectionDeclarationTimestamps | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function instanceOfCollectionDeclarationTimestamps(value) {
|
|
2
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
3
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
export function CollectionDeclarationTimestampsFromJSON(json) {
|
|
7
|
+
return CollectionDeclarationTimestampsFromJSONTyped(json, false);
|
|
8
|
+
}
|
|
9
|
+
export function CollectionDeclarationTimestampsFromJSONTyped(json, ignoreDiscriminator) {
|
|
10
|
+
if (json == null) {
|
|
11
|
+
return json;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
"createdAt": json["createdAt"],
|
|
15
|
+
"updatedAt": json["updatedAt"],
|
|
16
|
+
"createdBy": json["createdBy"] == null ? void 0 : json["createdBy"],
|
|
17
|
+
"updatedBy": json["updatedBy"] == null ? void 0 : json["updatedBy"]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export function CollectionDeclarationTimestampsToJSON(json) {
|
|
21
|
+
return CollectionDeclarationTimestampsToJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function CollectionDeclarationTimestampsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24
|
+
if (value == null) {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
"createdAt": value["createdAt"],
|
|
29
|
+
"updatedAt": value["updatedAt"],
|
|
30
|
+
"createdBy": value["createdBy"],
|
|
31
|
+
"updatedBy": value["updatedBy"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 CollectionDeclarationVersioned
|
|
16
|
+
*/
|
|
17
|
+
export interface CollectionDeclarationVersioned {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
mode: CollectionDeclarationVersionedModeEnum;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
field: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
required: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const CollectionDeclarationVersionedModeEnum: {
|
|
35
|
+
readonly Counter: "counter";
|
|
36
|
+
readonly Timestamp: "timestamp";
|
|
37
|
+
};
|
|
38
|
+
export type CollectionDeclarationVersionedModeEnum = typeof CollectionDeclarationVersionedModeEnum[keyof typeof CollectionDeclarationVersionedModeEnum];
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the CollectionDeclarationVersioned interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfCollectionDeclarationVersioned(value: object): value is CollectionDeclarationVersioned;
|
|
43
|
+
export declare function CollectionDeclarationVersionedFromJSON(json: any): CollectionDeclarationVersioned;
|
|
44
|
+
export declare function CollectionDeclarationVersionedFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionDeclarationVersioned;
|
|
45
|
+
export declare function CollectionDeclarationVersionedToJSON(json: any): CollectionDeclarationVersioned;
|
|
46
|
+
export declare function CollectionDeclarationVersionedToJSONTyped(value?: CollectionDeclarationVersioned | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const CollectionDeclarationVersionedModeEnum = {
|
|
2
|
+
Counter: "counter",
|
|
3
|
+
Timestamp: "timestamp"
|
|
4
|
+
};
|
|
5
|
+
export function instanceOfCollectionDeclarationVersioned(value) {
|
|
6
|
+
if (!("mode" in value) || value["mode"] === void 0) return false;
|
|
7
|
+
if (!("field" in value) || value["field"] === void 0) return false;
|
|
8
|
+
if (!("required" in value) || value["required"] === void 0) return false;
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
export function CollectionDeclarationVersionedFromJSON(json) {
|
|
12
|
+
return CollectionDeclarationVersionedFromJSONTyped(json, false);
|
|
13
|
+
}
|
|
14
|
+
export function CollectionDeclarationVersionedFromJSONTyped(json, ignoreDiscriminator) {
|
|
15
|
+
if (json == null) {
|
|
16
|
+
return json;
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
"mode": json["mode"],
|
|
20
|
+
"field": json["field"],
|
|
21
|
+
"required": json["required"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function CollectionDeclarationVersionedToJSON(json) {
|
|
25
|
+
return CollectionDeclarationVersionedToJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function CollectionDeclarationVersionedToJSONTyped(value, ignoreDiscriminator = false) {
|
|
28
|
+
if (value == null) {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
"mode": value["mode"],
|
|
33
|
+
"field": value["field"],
|
|
34
|
+
"required": value["required"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ValidationIssue } from './ValidationIssue.js';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -27,6 +28,16 @@ export interface ErrorDescription {
|
|
|
27
28
|
*
|
|
28
29
|
*/
|
|
29
30
|
additionalInfo: string;
|
|
31
|
+
/**
|
|
32
|
+
* The fields of a document that is not valid (a schema, a before-hook or the validator of the collection). Only set for these errors.
|
|
33
|
+
*/
|
|
34
|
+
issues?: Array<ValidationIssue>;
|
|
35
|
+
/**
|
|
36
|
+
* The stored document of a version conflict (409, code 4092, 2.4.0), as Extended JSON: show it or merge with it, then send the change again with its version.
|
|
37
|
+
*/
|
|
38
|
+
current?: {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
};
|
|
30
41
|
}
|
|
31
42
|
/**
|
|
32
43
|
* Check if a given object implements the ErrorDescription interface.
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ValidationIssueFromJSON,
|
|
3
|
+
ValidationIssueToJSON
|
|
4
|
+
} from "./ValidationIssue.js";
|
|
1
5
|
export function instanceOfErrorDescription(value) {
|
|
2
6
|
if (!("code" in value) || value["code"] === void 0) return false;
|
|
3
7
|
if (!("msg" in value) || value["msg"] === void 0) return false;
|
|
@@ -14,7 +18,9 @@ export function ErrorDescriptionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
14
18
|
return {
|
|
15
19
|
"code": json["code"],
|
|
16
20
|
"msg": json["msg"],
|
|
17
|
-
"additionalInfo": json["additionalInfo"]
|
|
21
|
+
"additionalInfo": json["additionalInfo"],
|
|
22
|
+
"issues": json["issues"] == null ? void 0 : json["issues"].map(ValidationIssueFromJSON),
|
|
23
|
+
"current": json["current"] == null ? void 0 : json["current"]
|
|
18
24
|
};
|
|
19
25
|
}
|
|
20
26
|
export function ErrorDescriptionToJSON(json) {
|
|
@@ -27,6 +33,8 @@ export function ErrorDescriptionToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
27
33
|
return {
|
|
28
34
|
"code": value["code"],
|
|
29
35
|
"msg": value["msg"],
|
|
30
|
-
"additionalInfo": value["additionalInfo"]
|
|
36
|
+
"additionalInfo": value["additionalInfo"],
|
|
37
|
+
"issues": value["issues"] == null ? void 0 : value["issues"].map(ValidationIssueToJSON),
|
|
38
|
+
"current": value["current"]
|
|
31
39
|
};
|
|
32
40
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 SuggestedValidator
|
|
16
|
+
*/
|
|
17
|
+
export interface SuggestedValidator {
|
|
18
|
+
/**
|
|
19
|
+
* The validator: an object with the key $jsonSchema.
|
|
20
|
+
*/
|
|
21
|
+
validator: {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The number of documents of the collection.
|
|
26
|
+
*/
|
|
27
|
+
count: number;
|
|
28
|
+
/**
|
|
29
|
+
* The number of documents the suggestion is made of.
|
|
30
|
+
*/
|
|
31
|
+
sample: number;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
warnings: Array<string>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the SuggestedValidator interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfSuggestedValidator(value: object): value is SuggestedValidator;
|
|
41
|
+
export declare function SuggestedValidatorFromJSON(json: any): SuggestedValidator;
|
|
42
|
+
export declare function SuggestedValidatorFromJSONTyped(json: any, ignoreDiscriminator: boolean): SuggestedValidator;
|
|
43
|
+
export declare function SuggestedValidatorToJSON(json: any): SuggestedValidator;
|
|
44
|
+
export declare function SuggestedValidatorToJSONTyped(value?: SuggestedValidator | null, ignoreDiscriminator?: boolean): any;
|