itlab-internal-services 2.16.1 → 2.16.3
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/dist/classes/document/commentable-document.class.d.ts +200 -0
- package/dist/classes/document/commentable-document.class.js +24 -0
- package/dist/classes/document/content-document.class.d.ts +200 -0
- package/dist/classes/document/content-document.class.js +24 -0
- package/dist/classes/document/index.d.ts +4 -0
- package/dist/classes/document/index.js +11 -0
- package/dist/classes/document/likeable-document.class.d.ts +205 -0
- package/dist/classes/document/likeable-document.class.js +70 -0
- package/dist/classes/document/viewable-document.class.d.ts +205 -0
- package/dist/classes/document/viewable-document.class.js +67 -0
- package/dist/classes/document-updater.class.d.ts +40 -0
- package/dist/classes/document-updater.class.js +58 -0
- package/dist/classes/fetch-options/base-options.class.d.ts +18 -0
- package/dist/classes/fetch-options/base-options.class.js +81 -0
- package/dist/classes/fetch-options/comments-options.class.d.ts +6 -0
- package/dist/classes/fetch-options/comments-options.class.js +26 -0
- package/dist/classes/fetch-options/content-options.class.d.ts +7 -0
- package/dist/classes/fetch-options/content-options.class.js +32 -0
- package/dist/classes/fetch-options/drafted-options.class.d.ts +9 -0
- package/dist/classes/fetch-options/drafted-options.class.js +34 -0
- package/dist/classes/fetch-options/index.d.ts +6 -0
- package/dist/classes/fetch-options/index.js +15 -0
- package/dist/classes/fetch-options/liked-by-options.class.d.ts +8 -0
- package/dist/classes/fetch-options/liked-by-options.class.js +28 -0
- package/dist/classes/fetch-options/viewed-by-options.class.d.ts +9 -0
- package/dist/classes/fetch-options/viewed-by-options.class.js +28 -0
- package/dist/classes/index.d.ts +2 -2
- package/dist/classes/index.js +17 -3
- package/dist/classes/task-manager.class.d.ts +2 -2
- package/dist/classes/task-manager.class.js +4 -0
- package/dist/decorators/has-permission.decorator.d.ts +3 -0
- package/dist/decorators/has-permission.decorator.js +26 -0
- package/dist/decorators/index.d.ts +2 -0
- package/dist/decorators/index.js +2 -0
- package/dist/decorators/jwt.decorator.d.ts +1 -1
- package/dist/decorators/jwt.decorator.js +13 -11
- package/dist/decorators/schema-with-critical-keys.decorator.d.ts +12 -0
- package/dist/decorators/schema-with-critical-keys.decorator.js +16 -0
- package/dist/factories/index.d.ts +1 -0
- package/dist/factories/index.js +5 -0
- package/dist/factories/virtuals.factory.d.ts +80 -0
- package/dist/factories/virtuals.factory.js +172 -0
- package/dist/functions/create-schema.function.d.ts +3 -0
- package/dist/functions/create-schema.function.js +33 -0
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/index.js +3 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.js +10 -0
- package/dist/likeable.interface.d.ts +42 -0
- package/dist/likeable.interface.js +48 -0
- package/dist/modules/_old/comment/comment.controller.d.ts +35 -0
- package/dist/modules/_old/comment/comment.controller.js +86 -0
- package/dist/modules/_old/comment/comment.model.d.ts +29 -0
- package/dist/modules/_old/comment/comment.model.js +43 -0
- package/dist/modules/_old/comment/comment.module-definition.d.ts +45 -0
- package/dist/modules/{comment → _old/comment}/comment.module-definition.js +2 -1
- package/dist/modules/_old/comment/comment.module.d.ts +22 -0
- package/dist/modules/_old/comment/comment.module.js +71 -0
- package/dist/modules/_old/comment/comment.service.d.ts +54 -0
- package/dist/modules/_old/comment/comment.service.js +133 -0
- package/dist/modules/_old/comment/index.d.ts +3 -0
- package/dist/modules/_old/comment/index.js +9 -0
- package/dist/modules/_old/content/content.module-definition.d.ts +5 -0
- package/dist/modules/_old/content/content.module-definition.js +8 -0
- package/dist/modules/_old/content/content.module.d.ts +31 -0
- package/dist/modules/_old/content/content.module.js +60 -0
- package/dist/modules/_old/content/content.service.d.ts +50 -0
- package/dist/modules/_old/content/content.service.js +145 -0
- package/dist/modules/_old/content/index.d.ts +2 -0
- package/dist/modules/_old/content/index.js +7 -0
- package/dist/modules/_old/database/database-module-options.interface.d.ts +41 -0
- package/dist/modules/_old/database/database.liveness-controller.d.ts +27 -0
- package/dist/modules/_old/database/database.liveness-controller.js +80 -0
- package/dist/modules/_old/database/database.module.d.ts +41 -0
- package/dist/modules/_old/database/database.module.js +97 -0
- package/dist/modules/_old/database/index.d.ts +6 -0
- package/dist/modules/_old/database/index.js +13 -0
- package/dist/modules/_old/database/lock-service/lock.schema.d.ts +38 -0
- package/dist/modules/_old/database/lock-service/lock.schema.js +51 -0
- package/dist/modules/_old/database/lock-service/lock.service.d.ts +53 -0
- package/dist/modules/_old/database/lock-service/lock.service.js +103 -0
- package/dist/modules/_old/database/model-service/dbs/hub-account.db.d.ts +28 -0
- package/dist/modules/_old/database/model-service/dbs/hub-account.db.js +44 -0
- package/dist/modules/_old/database/model-service/dbs/hub-books.db.d.ts +23 -0
- package/dist/modules/_old/database/model-service/dbs/hub-books.db.js +45 -0
- package/dist/modules/_old/database/model-service/dbs/hub-comments.db.d.ts +29 -0
- package/dist/modules/_old/database/model-service/dbs/hub-comments.db.js +68 -0
- package/dist/modules/_old/database/model-service/dbs/hub-content.db.d.ts +24 -0
- package/dist/modules/_old/database/model-service/dbs/hub-content.db.js +49 -0
- package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.d.ts +23 -0
- package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.js +45 -0
- package/dist/modules/_old/database/model-service/dbs/hub-events.db.d.ts +24 -0
- package/dist/modules/_old/database/model-service/dbs/hub-events.db.js +49 -0
- package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.d.ts +60 -0
- package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.js +106 -0
- package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.d.ts +25 -0
- package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.js +53 -0
- package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.d.ts +23 -0
- package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.js +45 -0
- package/dist/modules/_old/database/model-service/dbs/hub-team.db.d.ts +22 -0
- package/dist/modules/_old/database/model-service/dbs/hub-team.db.js +41 -0
- package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.d.ts +42 -0
- package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.js +81 -0
- package/dist/modules/_old/database/model-service/model.service.d.ts +8465 -0
- package/dist/modules/_old/database/model-service/model.service.js +136 -0
- package/dist/modules/_old/database/populate-service/populate.service.d.ts +73 -0
- package/dist/modules/_old/database/populate-service/populate.service.js +163 -0
- package/dist/modules/_old/database/service-mapper-service/service-mapper.service.d.ts +32 -0
- package/dist/modules/_old/database/service-mapper-service/service-mapper.service.js +73 -0
- package/dist/modules/_old/fetch/fetch.module.d.ts +31 -0
- package/dist/modules/_old/fetch/fetch.module.js +60 -0
- package/dist/modules/_old/fetch/fetch.service.d.ts +153 -0
- package/dist/modules/_old/fetch/fetch.service.js +274 -0
- package/dist/modules/_old/fetch/index.d.ts +2 -0
- package/dist/modules/_old/fetch/index.js +7 -0
- package/dist/modules/_old/index.d.ts +5 -0
- package/dist/modules/{comment → _old}/index.js +5 -2
- package/dist/modules/_old/like/index.d.ts +1 -0
- package/dist/modules/_old/like/index.js +5 -0
- package/dist/modules/_old/like/like.controller.d.ts +41 -0
- package/dist/modules/_old/like/like.controller.js +125 -0
- package/dist/modules/_old/like/like.module-definition.d.ts +20 -0
- package/dist/modules/_old/like/like.module-definition.js +8 -0
- package/dist/modules/_old/like/like.module.d.ts +21 -0
- package/dist/modules/_old/like/like.module.js +67 -0
- package/dist/modules/_old/like/like.service.d.ts +61 -0
- package/dist/modules/_old/like/like.service.js +103 -0
- package/dist/modules/authentication/guards/jwt-auth.guard.d.ts +1 -1
- package/dist/modules/authentication/guards/jwt-auth.guard.js +5 -3
- package/dist/modules/authentication/guards/permissions.guard.d.ts +1 -3
- package/dist/modules/authentication/guards/permissions.guard.js +2 -8
- package/dist/modules/authentication/guards/service-auth.guard.d.ts +0 -4
- package/dist/modules/authentication/guards/service-auth.guard.js +10 -13
- package/dist/modules/{comment/comment-module-options.interface.d.ts → comments/comments-module-options.interface.d.ts} +3 -2
- package/dist/modules/comments/comments-module-options.interface.js +2 -0
- package/dist/modules/{comment/comment.controller.d.ts → comments/comments.controller.d.ts} +7 -6
- package/dist/modules/{comment/comment.controller.js → comments/comments.controller.js} +14 -14
- package/dist/modules/comments/comments.module-definition.d.ts +4 -0
- package/dist/modules/comments/comments.module-definition.js +7 -0
- package/dist/modules/{comment/comment.module.d.ts → comments/comments.module.d.ts} +6 -6
- package/dist/modules/{comment/comment.module.js → comments/comments.module.js} +17 -16
- package/dist/modules/{comment/comment.service.d.ts → comments/comments.service.d.ts} +35 -9
- package/dist/modules/comments/comments.service.js +165 -0
- package/dist/modules/comments/index.d.ts +3 -0
- package/dist/modules/{services/providers/comments → comments}/index.js +2 -0
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/index.js +1 -1
- package/dist/modules/like/like-module-options.interface.d.ts +1 -0
- package/dist/modules/like/like.controller.d.ts +3 -2
- package/dist/modules/like/like.controller.js +4 -4
- package/dist/modules/like/like.module.js +1 -1
- package/dist/modules/like/like.service.d.ts +0 -16
- package/dist/modules/like/like.service.js +9 -28
- package/dist/modules/merge/merge-module-options.interface.d.ts +1 -0
- package/dist/modules/merge/merge.controller.d.ts +3 -2
- package/dist/modules/merge/merge.controller.js +4 -4
- package/dist/modules/merge/merge.module.js +1 -1
- package/dist/modules/services/providers/accounts.service.js +4 -0
- package/dist/modules/services/providers/index.d.ts +0 -1
- package/dist/modules/services/providers/index.js +0 -1
- package/dist/modules/services/services.module.js +0 -1
- package/dist/pipes/index.d.ts +1 -0
- package/dist/pipes/index.js +1 -0
- package/dist/pipes/restricted-fields.pipe.d.ts +35 -0
- package/dist/pipes/restricted-fields.pipe.js +83 -0
- package/dist/properties/content-return-type.property.d.ts +4 -0
- package/dist/properties/content-return-type.property.js +12 -7
- package/dist/properties/content.property.d.ts +7 -2
- package/dist/properties/content.property.js +11 -3
- package/dist/properties/index.d.ts +2 -4
- package/dist/properties/index.js +5 -5
- package/dist/transform/index.d.ts +2 -0
- package/dist/transform/index.js +2 -0
- package/dist/transform/mongo-id.transform.d.ts +4 -0
- package/dist/transform/mongo-id.transform.js +13 -0
- package/dist/transform/mongo-ids.transform.d.ts +4 -0
- package/dist/transform/mongo-ids.transform.js +16 -0
- package/dist/types/duplicable-model.type.d.ts +10 -0
- package/dist/types/duplicable-model.type.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/likeable.type.d.ts +4 -3
- package/dist/types/viewable.type.d.ts +4 -3
- package/dist/viewable.interface.d.ts +42 -0
- package/dist/viewable.interface.js +48 -0
- package/package.json +1 -1
- package/dist/classes/schema-builder.class.d.ts +0 -75
- package/dist/classes/schema-builder.class.js +0 -109
- package/dist/modules/comment/comment.module-definition.d.ts +0 -4
- package/dist/modules/comment/comment.service.js +0 -99
- package/dist/modules/comment/index.d.ts +0 -2
- package/dist/modules/services/providers/comments/comments.service-definition.d.ts +0 -1
- package/dist/modules/services/providers/comments/comments.service-definition.js +0 -4
- package/dist/modules/services/providers/comments/comments.service.d.ts +0 -60
- package/dist/modules/services/providers/comments/comments.service.js +0 -139
- package/dist/modules/services/providers/comments/index.d.ts +0 -1
- package/dist/properties/likeable.properties.d.ts +0 -1
- package/dist/properties/likeable.properties.js +0 -66
- package/dist/properties/viewable.properties.d.ts +0 -1
- package/dist/properties/viewable.properties.js +0 -66
- /package/dist/modules/{comment/comment-module-options.interface.js → _old/database/database-module-options.interface.js} +0 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { LabComment } from 'itlab-functions';
|
|
2
|
+
import { Document } from 'mongoose';
|
|
3
|
+
export declare function CommentableDocument<TBase extends new (...args: any[]) => Document>(Base: TBase): {
|
|
4
|
+
new (...args: any[]): {
|
|
5
|
+
comments?: LabComment[];
|
|
6
|
+
_id: unknown;
|
|
7
|
+
$assertPopulated<Paths = {}>(path: string | string[], values?: Partial<Paths>): Omit</*elided*/ any, keyof Paths> & Paths;
|
|
8
|
+
$clearModifiedPaths(): /*elided*/ any;
|
|
9
|
+
$clone(): /*elided*/ any;
|
|
10
|
+
$createModifiedPathsSnapshot(): import("mongoose").ModifiedPathsSnapshot;
|
|
11
|
+
$getAllSubdocs(): Document[];
|
|
12
|
+
$ignore(path: string): void;
|
|
13
|
+
$isDefault(path?: string): boolean;
|
|
14
|
+
$isDeleted(val?: boolean): boolean;
|
|
15
|
+
$getPopulatedDocs(): Document[];
|
|
16
|
+
$inc(path: string | string[], val?: number): /*elided*/ any;
|
|
17
|
+
$isEmpty(path: string): boolean;
|
|
18
|
+
$isValid(path: string): boolean;
|
|
19
|
+
$locals: Record<string, unknown>;
|
|
20
|
+
$markValid(path: string): void;
|
|
21
|
+
$model<ModelType = import("mongoose").Model<unknown, {}, {}, {}, Document<unknown, {}, unknown, {}, {}> & Required<{
|
|
22
|
+
_id: unknown;
|
|
23
|
+
}> & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}, any>>(name: string): ModelType;
|
|
26
|
+
$model<ModelType = import("mongoose").Model<any, {}, {}, {}, any, any>>(): ModelType;
|
|
27
|
+
$op: "save" | "validate" | "remove" | null;
|
|
28
|
+
$restoreModifiedPathsSnapshot(snapshot: import("mongoose").ModifiedPathsSnapshot): /*elided*/ any;
|
|
29
|
+
$session(session?: import("mongoose").ClientSession | null): import("mongoose").ClientSession | null;
|
|
30
|
+
$set(path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
31
|
+
$set(path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
32
|
+
$set(value: string | Record<string, any>): /*elided*/ any;
|
|
33
|
+
$where: Record<string, unknown>;
|
|
34
|
+
baseModelName?: string;
|
|
35
|
+
collection: import("mongoose").Collection;
|
|
36
|
+
db: import("mongoose").Connection;
|
|
37
|
+
deleteOne(options?: import("mongoose").QueryOptions): any;
|
|
38
|
+
depopulate<Paths = {}>(path?: string | string[]): import("mongoose").MergeType</*elided*/ any, Paths>;
|
|
39
|
+
directModifiedPaths(): Array<string>;
|
|
40
|
+
equals(doc: Document<unknown, any, any, Record<string, any>, {}>): boolean;
|
|
41
|
+
errors?: import("mongoose").Error.ValidationError;
|
|
42
|
+
get<T extends string | number | symbol>(path: T, type?: any, options?: any): any;
|
|
43
|
+
get(path: string, type?: any, options?: any): any;
|
|
44
|
+
getChanges(): import("mongoose").UpdateQuery</*elided*/ any>;
|
|
45
|
+
id?: any;
|
|
46
|
+
increment(): /*elided*/ any;
|
|
47
|
+
init(obj: import("mongoose").AnyObject, opts?: import("mongoose").AnyObject): /*elided*/ any;
|
|
48
|
+
invalidate<T extends string | number | symbol>(path: T, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
|
|
49
|
+
invalidate(path: string, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
|
|
50
|
+
isDirectModified<T extends string | number | symbol>(path: T | T[]): boolean;
|
|
51
|
+
isDirectModified(path: string | Array<string>): boolean;
|
|
52
|
+
isDirectSelected<T extends string | number | symbol>(path: T): boolean;
|
|
53
|
+
isDirectSelected(path: string): boolean;
|
|
54
|
+
isInit<T extends string | number | symbol>(path: T): boolean;
|
|
55
|
+
isInit(path: string): boolean;
|
|
56
|
+
isModified<T extends string | number | symbol>(path?: T | T[], options?: {
|
|
57
|
+
ignoreAtomics?: boolean;
|
|
58
|
+
} | null): boolean;
|
|
59
|
+
isModified(path?: string | Array<string>, options?: {
|
|
60
|
+
ignoreAtomics?: boolean;
|
|
61
|
+
} | null): boolean;
|
|
62
|
+
isNew: boolean;
|
|
63
|
+
isSelected<T extends string | number | symbol>(path: T): boolean;
|
|
64
|
+
isSelected(path: string): boolean;
|
|
65
|
+
markModified<T extends string | number | symbol>(path: T, scope?: any): void;
|
|
66
|
+
markModified(path: string, scope?: any): void;
|
|
67
|
+
model<ModelType = import("mongoose").Model<unknown, {}, {}, {}, Document<unknown, {}, unknown, {}, {}> & Required<{
|
|
68
|
+
_id: unknown;
|
|
69
|
+
}> & {
|
|
70
|
+
__v: number;
|
|
71
|
+
}, any>>(name: string): ModelType;
|
|
72
|
+
model<ModelType = import("mongoose").Model<any, {}, {}, {}, any, any>>(): ModelType;
|
|
73
|
+
modifiedPaths(options?: {
|
|
74
|
+
includeChildren?: boolean;
|
|
75
|
+
}): Array<string>;
|
|
76
|
+
overwrite(obj: import("mongoose").AnyObject): /*elided*/ any;
|
|
77
|
+
$parent(): Document | undefined;
|
|
78
|
+
populate<Paths = {}>(path: string | import("mongoose").PopulateOptions | (string | import("mongoose").PopulateOptions)[]): Promise<import("mongoose").MergeType</*elided*/ any, Paths>>;
|
|
79
|
+
populate<Paths = {}>(path: string, select?: string | import("mongoose").AnyObject, model?: import("mongoose").Model<any>, match?: import("mongoose").AnyObject, options?: import("mongoose").PopulateOptions): Promise<import("mongoose").MergeType</*elided*/ any, Paths>>;
|
|
80
|
+
populated(path: string): any;
|
|
81
|
+
replaceOne(replacement?: import("mongoose").AnyObject, options?: import("mongoose").QueryOptions | null): import("mongoose").Query<any, /*elided*/ any, {}, unknown, "find", Record<string, never>>;
|
|
82
|
+
save(options?: import("mongoose").SaveOptions): Promise</*elided*/ any>;
|
|
83
|
+
schema: import("mongoose").Schema;
|
|
84
|
+
set<T extends string | number | symbol>(path: T, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
85
|
+
set(path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
86
|
+
set(path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
87
|
+
set(value: string | Record<string, any>): /*elided*/ any;
|
|
88
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
89
|
+
versionKey: false;
|
|
90
|
+
virtuals: true;
|
|
91
|
+
flattenObjectIds: true;
|
|
92
|
+
}): Omit<{
|
|
93
|
+
[x: string]: any;
|
|
94
|
+
}, "__v">;
|
|
95
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
96
|
+
virtuals: true;
|
|
97
|
+
flattenObjectIds: true;
|
|
98
|
+
}): {
|
|
99
|
+
[x: string]: any;
|
|
100
|
+
};
|
|
101
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
102
|
+
versionKey: false;
|
|
103
|
+
virtuals: true;
|
|
104
|
+
}): Omit<any, "__v">;
|
|
105
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
106
|
+
versionKey: false;
|
|
107
|
+
flattenObjectIds: true;
|
|
108
|
+
}): {
|
|
109
|
+
[x: string]: any;
|
|
110
|
+
[x: number]: any;
|
|
111
|
+
[x: symbol]: any;
|
|
112
|
+
};
|
|
113
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
114
|
+
virtuals: true;
|
|
115
|
+
}): any;
|
|
116
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
117
|
+
versionKey: false;
|
|
118
|
+
}): Omit<any, "__v">;
|
|
119
|
+
toJSON(options?: import("mongoose").ToObjectOptions & {
|
|
120
|
+
flattenMaps?: true;
|
|
121
|
+
flattenObjectIds?: false;
|
|
122
|
+
}): import("mongoose").FlattenMaps<any>;
|
|
123
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
124
|
+
flattenObjectIds: false;
|
|
125
|
+
}): import("mongoose").FlattenMaps<any>;
|
|
126
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
127
|
+
flattenObjectIds: true;
|
|
128
|
+
}): {
|
|
129
|
+
[x: string]: any;
|
|
130
|
+
};
|
|
131
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
132
|
+
flattenMaps: false;
|
|
133
|
+
}): any;
|
|
134
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
135
|
+
flattenMaps: false;
|
|
136
|
+
flattenObjectIds: true;
|
|
137
|
+
}): any;
|
|
138
|
+
toJSON<T = any>(options?: import("mongoose").ToObjectOptions & {
|
|
139
|
+
flattenMaps?: true;
|
|
140
|
+
flattenObjectIds?: false;
|
|
141
|
+
}): import("mongoose").FlattenMaps<T>;
|
|
142
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
143
|
+
flattenObjectIds: false;
|
|
144
|
+
}): import("mongoose").FlattenMaps<T>;
|
|
145
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
146
|
+
flattenObjectIds: true;
|
|
147
|
+
}): import("mongoose").ObjectIdToString<import("mongoose").FlattenMaps<T>>;
|
|
148
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
149
|
+
flattenMaps: false;
|
|
150
|
+
}): T;
|
|
151
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
152
|
+
flattenMaps: false;
|
|
153
|
+
flattenObjectIds: true;
|
|
154
|
+
}): import("mongoose").ObjectIdToString<T>;
|
|
155
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
156
|
+
versionKey: false;
|
|
157
|
+
virtuals: true;
|
|
158
|
+
flattenObjectIds: true;
|
|
159
|
+
}): Omit<any, "__v">;
|
|
160
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
161
|
+
virtuals: true;
|
|
162
|
+
flattenObjectIds: true;
|
|
163
|
+
}): any;
|
|
164
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
165
|
+
versionKey: false;
|
|
166
|
+
flattenObjectIds: true;
|
|
167
|
+
}): Omit<any, "__v">;
|
|
168
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
169
|
+
versionKey: false;
|
|
170
|
+
virtuals: true;
|
|
171
|
+
}): Omit<any, "__v">;
|
|
172
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
173
|
+
virtuals: true;
|
|
174
|
+
}): any;
|
|
175
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
176
|
+
versionKey: false;
|
|
177
|
+
}): Omit<any, "__v">;
|
|
178
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
179
|
+
flattenObjectIds: true;
|
|
180
|
+
}): any;
|
|
181
|
+
toObject(options?: import("mongoose").ToObjectOptions): any;
|
|
182
|
+
toObject<T>(options?: import("mongoose").ToObjectOptions): import("mongoose").Require_id<T> & {
|
|
183
|
+
__v: number;
|
|
184
|
+
};
|
|
185
|
+
unmarkModified<T extends string | number | symbol>(path: T): void;
|
|
186
|
+
unmarkModified(path: string): void;
|
|
187
|
+
updateOne(update?: import("mongoose").UpdateWithAggregationPipeline | import("mongoose").UpdateQuery</*elided*/ any>, options?: import("mongoose").QueryOptions | null): import("mongoose").Query<any, /*elided*/ any, {}, unknown, "find", Record<string, never>>;
|
|
188
|
+
validate<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): Promise<void>;
|
|
189
|
+
validate(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): Promise<void>;
|
|
190
|
+
validate(options: {
|
|
191
|
+
pathsToSkip?: import("mongoose").pathsToSkip;
|
|
192
|
+
}): Promise<void>;
|
|
193
|
+
validateSync(options: {
|
|
194
|
+
pathsToSkip?: import("mongoose").pathsToSkip;
|
|
195
|
+
[k: string]: any;
|
|
196
|
+
}): import("mongoose").Error.ValidationError | null;
|
|
197
|
+
validateSync<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
|
|
198
|
+
validateSync(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
|
|
199
|
+
};
|
|
200
|
+
} & TBase;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CommentableDocument = CommentableDocument;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
function CommentableDocument(Base) {
|
|
16
|
+
class CommentableDocument extends Base {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Comments' }),
|
|
20
|
+
(0, mongoose_1.Virtual)(),
|
|
21
|
+
__metadata("design:type", Array)
|
|
22
|
+
], CommentableDocument.prototype, "comments", void 0);
|
|
23
|
+
return CommentableDocument;
|
|
24
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { LabContent, LabContentPopulated } from 'itlab-functions';
|
|
2
|
+
import { Document } from 'mongoose';
|
|
3
|
+
export declare function ContentDocument<TBase extends new (...args: any[]) => Document>(Base: TBase): {
|
|
4
|
+
new (...args: any[]): {
|
|
5
|
+
content?: LabContent | LabContentPopulated | string;
|
|
6
|
+
_id: unknown;
|
|
7
|
+
$assertPopulated<Paths = {}>(path: string | string[], values?: Partial<Paths>): Omit</*elided*/ any, keyof Paths> & Paths;
|
|
8
|
+
$clearModifiedPaths(): /*elided*/ any;
|
|
9
|
+
$clone(): /*elided*/ any;
|
|
10
|
+
$createModifiedPathsSnapshot(): import("mongoose").ModifiedPathsSnapshot;
|
|
11
|
+
$getAllSubdocs(): Document[];
|
|
12
|
+
$ignore(path: string): void;
|
|
13
|
+
$isDefault(path?: string): boolean;
|
|
14
|
+
$isDeleted(val?: boolean): boolean;
|
|
15
|
+
$getPopulatedDocs(): Document[];
|
|
16
|
+
$inc(path: string | string[], val?: number): /*elided*/ any;
|
|
17
|
+
$isEmpty(path: string): boolean;
|
|
18
|
+
$isValid(path: string): boolean;
|
|
19
|
+
$locals: Record<string, unknown>;
|
|
20
|
+
$markValid(path: string): void;
|
|
21
|
+
$model<ModelType = import("mongoose").Model<unknown, {}, {}, {}, Document<unknown, {}, unknown, {}, {}> & Required<{
|
|
22
|
+
_id: unknown;
|
|
23
|
+
}> & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}, any>>(name: string): ModelType;
|
|
26
|
+
$model<ModelType = import("mongoose").Model<any, {}, {}, {}, any, any>>(): ModelType;
|
|
27
|
+
$op: "save" | "validate" | "remove" | null;
|
|
28
|
+
$restoreModifiedPathsSnapshot(snapshot: import("mongoose").ModifiedPathsSnapshot): /*elided*/ any;
|
|
29
|
+
$session(session?: import("mongoose").ClientSession | null): import("mongoose").ClientSession | null;
|
|
30
|
+
$set(path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
31
|
+
$set(path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
32
|
+
$set(value: string | Record<string, any>): /*elided*/ any;
|
|
33
|
+
$where: Record<string, unknown>;
|
|
34
|
+
baseModelName?: string;
|
|
35
|
+
collection: import("mongoose").Collection;
|
|
36
|
+
db: import("mongoose").Connection;
|
|
37
|
+
deleteOne(options?: import("mongoose").QueryOptions): any;
|
|
38
|
+
depopulate<Paths = {}>(path?: string | string[]): import("mongoose").MergeType</*elided*/ any, Paths>;
|
|
39
|
+
directModifiedPaths(): Array<string>;
|
|
40
|
+
equals(doc: Document<unknown, any, any, Record<string, any>, {}>): boolean;
|
|
41
|
+
errors?: import("mongoose").Error.ValidationError;
|
|
42
|
+
get<T extends string | number | symbol>(path: T, type?: any, options?: any): any;
|
|
43
|
+
get(path: string, type?: any, options?: any): any;
|
|
44
|
+
getChanges(): import("mongoose").UpdateQuery</*elided*/ any>;
|
|
45
|
+
id?: any;
|
|
46
|
+
increment(): /*elided*/ any;
|
|
47
|
+
init(obj: import("mongoose").AnyObject, opts?: import("mongoose").AnyObject): /*elided*/ any;
|
|
48
|
+
invalidate<T extends string | number | symbol>(path: T, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
|
|
49
|
+
invalidate(path: string, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
|
|
50
|
+
isDirectModified<T extends string | number | symbol>(path: T | T[]): boolean;
|
|
51
|
+
isDirectModified(path: string | Array<string>): boolean;
|
|
52
|
+
isDirectSelected<T extends string | number | symbol>(path: T): boolean;
|
|
53
|
+
isDirectSelected(path: string): boolean;
|
|
54
|
+
isInit<T extends string | number | symbol>(path: T): boolean;
|
|
55
|
+
isInit(path: string): boolean;
|
|
56
|
+
isModified<T extends string | number | symbol>(path?: T | T[], options?: {
|
|
57
|
+
ignoreAtomics?: boolean;
|
|
58
|
+
} | null): boolean;
|
|
59
|
+
isModified(path?: string | Array<string>, options?: {
|
|
60
|
+
ignoreAtomics?: boolean;
|
|
61
|
+
} | null): boolean;
|
|
62
|
+
isNew: boolean;
|
|
63
|
+
isSelected<T extends string | number | symbol>(path: T): boolean;
|
|
64
|
+
isSelected(path: string): boolean;
|
|
65
|
+
markModified<T extends string | number | symbol>(path: T, scope?: any): void;
|
|
66
|
+
markModified(path: string, scope?: any): void;
|
|
67
|
+
model<ModelType = import("mongoose").Model<unknown, {}, {}, {}, Document<unknown, {}, unknown, {}, {}> & Required<{
|
|
68
|
+
_id: unknown;
|
|
69
|
+
}> & {
|
|
70
|
+
__v: number;
|
|
71
|
+
}, any>>(name: string): ModelType;
|
|
72
|
+
model<ModelType = import("mongoose").Model<any, {}, {}, {}, any, any>>(): ModelType;
|
|
73
|
+
modifiedPaths(options?: {
|
|
74
|
+
includeChildren?: boolean;
|
|
75
|
+
}): Array<string>;
|
|
76
|
+
overwrite(obj: import("mongoose").AnyObject): /*elided*/ any;
|
|
77
|
+
$parent(): Document | undefined;
|
|
78
|
+
populate<Paths = {}>(path: string | import("mongoose").PopulateOptions | (string | import("mongoose").PopulateOptions)[]): Promise<import("mongoose").MergeType</*elided*/ any, Paths>>;
|
|
79
|
+
populate<Paths = {}>(path: string, select?: string | import("mongoose").AnyObject, model?: import("mongoose").Model<any>, match?: import("mongoose").AnyObject, options?: import("mongoose").PopulateOptions): Promise<import("mongoose").MergeType</*elided*/ any, Paths>>;
|
|
80
|
+
populated(path: string): any;
|
|
81
|
+
replaceOne(replacement?: import("mongoose").AnyObject, options?: import("mongoose").QueryOptions | null): import("mongoose").Query<any, /*elided*/ any, {}, unknown, "find", Record<string, never>>;
|
|
82
|
+
save(options?: import("mongoose").SaveOptions): Promise</*elided*/ any>;
|
|
83
|
+
schema: import("mongoose").Schema;
|
|
84
|
+
set<T extends string | number | symbol>(path: T, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
85
|
+
set(path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
86
|
+
set(path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
|
|
87
|
+
set(value: string | Record<string, any>): /*elided*/ any;
|
|
88
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
89
|
+
versionKey: false;
|
|
90
|
+
virtuals: true;
|
|
91
|
+
flattenObjectIds: true;
|
|
92
|
+
}): Omit<{
|
|
93
|
+
[x: string]: any;
|
|
94
|
+
}, "__v">;
|
|
95
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
96
|
+
virtuals: true;
|
|
97
|
+
flattenObjectIds: true;
|
|
98
|
+
}): {
|
|
99
|
+
[x: string]: any;
|
|
100
|
+
};
|
|
101
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
102
|
+
versionKey: false;
|
|
103
|
+
virtuals: true;
|
|
104
|
+
}): Omit<any, "__v">;
|
|
105
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
106
|
+
versionKey: false;
|
|
107
|
+
flattenObjectIds: true;
|
|
108
|
+
}): {
|
|
109
|
+
[x: string]: any;
|
|
110
|
+
[x: number]: any;
|
|
111
|
+
[x: symbol]: any;
|
|
112
|
+
};
|
|
113
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
114
|
+
virtuals: true;
|
|
115
|
+
}): any;
|
|
116
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
117
|
+
versionKey: false;
|
|
118
|
+
}): Omit<any, "__v">;
|
|
119
|
+
toJSON(options?: import("mongoose").ToObjectOptions & {
|
|
120
|
+
flattenMaps?: true;
|
|
121
|
+
flattenObjectIds?: false;
|
|
122
|
+
}): import("mongoose").FlattenMaps<any>;
|
|
123
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
124
|
+
flattenObjectIds: false;
|
|
125
|
+
}): import("mongoose").FlattenMaps<any>;
|
|
126
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
127
|
+
flattenObjectIds: true;
|
|
128
|
+
}): {
|
|
129
|
+
[x: string]: any;
|
|
130
|
+
};
|
|
131
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
132
|
+
flattenMaps: false;
|
|
133
|
+
}): any;
|
|
134
|
+
toJSON(options: import("mongoose").ToObjectOptions & {
|
|
135
|
+
flattenMaps: false;
|
|
136
|
+
flattenObjectIds: true;
|
|
137
|
+
}): any;
|
|
138
|
+
toJSON<T = any>(options?: import("mongoose").ToObjectOptions & {
|
|
139
|
+
flattenMaps?: true;
|
|
140
|
+
flattenObjectIds?: false;
|
|
141
|
+
}): import("mongoose").FlattenMaps<T>;
|
|
142
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
143
|
+
flattenObjectIds: false;
|
|
144
|
+
}): import("mongoose").FlattenMaps<T>;
|
|
145
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
146
|
+
flattenObjectIds: true;
|
|
147
|
+
}): import("mongoose").ObjectIdToString<import("mongoose").FlattenMaps<T>>;
|
|
148
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
149
|
+
flattenMaps: false;
|
|
150
|
+
}): T;
|
|
151
|
+
toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
|
|
152
|
+
flattenMaps: false;
|
|
153
|
+
flattenObjectIds: true;
|
|
154
|
+
}): import("mongoose").ObjectIdToString<T>;
|
|
155
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
156
|
+
versionKey: false;
|
|
157
|
+
virtuals: true;
|
|
158
|
+
flattenObjectIds: true;
|
|
159
|
+
}): Omit<any, "__v">;
|
|
160
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
161
|
+
virtuals: true;
|
|
162
|
+
flattenObjectIds: true;
|
|
163
|
+
}): any;
|
|
164
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
165
|
+
versionKey: false;
|
|
166
|
+
flattenObjectIds: true;
|
|
167
|
+
}): Omit<any, "__v">;
|
|
168
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
169
|
+
versionKey: false;
|
|
170
|
+
virtuals: true;
|
|
171
|
+
}): Omit<any, "__v">;
|
|
172
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
173
|
+
virtuals: true;
|
|
174
|
+
}): any;
|
|
175
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
176
|
+
versionKey: false;
|
|
177
|
+
}): Omit<any, "__v">;
|
|
178
|
+
toObject(options: import("mongoose").ToObjectOptions & {
|
|
179
|
+
flattenObjectIds: true;
|
|
180
|
+
}): any;
|
|
181
|
+
toObject(options?: import("mongoose").ToObjectOptions): any;
|
|
182
|
+
toObject<T>(options?: import("mongoose").ToObjectOptions): import("mongoose").Require_id<T> & {
|
|
183
|
+
__v: number;
|
|
184
|
+
};
|
|
185
|
+
unmarkModified<T extends string | number | symbol>(path: T): void;
|
|
186
|
+
unmarkModified(path: string): void;
|
|
187
|
+
updateOne(update?: import("mongoose").UpdateWithAggregationPipeline | import("mongoose").UpdateQuery</*elided*/ any>, options?: import("mongoose").QueryOptions | null): import("mongoose").Query<any, /*elided*/ any, {}, unknown, "find", Record<string, never>>;
|
|
188
|
+
validate<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): Promise<void>;
|
|
189
|
+
validate(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): Promise<void>;
|
|
190
|
+
validate(options: {
|
|
191
|
+
pathsToSkip?: import("mongoose").pathsToSkip;
|
|
192
|
+
}): Promise<void>;
|
|
193
|
+
validateSync(options: {
|
|
194
|
+
pathsToSkip?: import("mongoose").pathsToSkip;
|
|
195
|
+
[k: string]: any;
|
|
196
|
+
}): import("mongoose").Error.ValidationError | null;
|
|
197
|
+
validateSync<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
|
|
198
|
+
validateSync(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
|
|
199
|
+
};
|
|
200
|
+
} & TBase;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ContentDocument = ContentDocument;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
function ContentDocument(Base) {
|
|
16
|
+
class ContentDocument extends Base {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Content' }),
|
|
20
|
+
(0, mongoose_1.Virtual)(),
|
|
21
|
+
__metadata("design:type", Object)
|
|
22
|
+
], ContentDocument.prototype, "content", void 0);
|
|
23
|
+
return ContentDocument;
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewableDocument = exports.LikeableDocument = exports.ContentDocument = exports.CommentableDocument = void 0;
|
|
4
|
+
var commentable_document_class_1 = require("./commentable-document.class");
|
|
5
|
+
Object.defineProperty(exports, "CommentableDocument", { enumerable: true, get: function () { return commentable_document_class_1.CommentableDocument; } });
|
|
6
|
+
var content_document_class_1 = require("./content-document.class");
|
|
7
|
+
Object.defineProperty(exports, "ContentDocument", { enumerable: true, get: function () { return content_document_class_1.ContentDocument; } });
|
|
8
|
+
var likeable_document_class_1 = require("./likeable-document.class");
|
|
9
|
+
Object.defineProperty(exports, "LikeableDocument", { enumerable: true, get: function () { return likeable_document_class_1.LikeableDocument; } });
|
|
10
|
+
var viewable_document_class_1 = require("./viewable-document.class");
|
|
11
|
+
Object.defineProperty(exports, "ViewableDocument", { enumerable: true, get: function () { return viewable_document_class_1.ViewableDocument; } });
|