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.
Files changed (201) hide show
  1. package/dist/classes/document/commentable-document.class.d.ts +200 -0
  2. package/dist/classes/document/commentable-document.class.js +24 -0
  3. package/dist/classes/document/content-document.class.d.ts +200 -0
  4. package/dist/classes/document/content-document.class.js +24 -0
  5. package/dist/classes/document/index.d.ts +4 -0
  6. package/dist/classes/document/index.js +11 -0
  7. package/dist/classes/document/likeable-document.class.d.ts +205 -0
  8. package/dist/classes/document/likeable-document.class.js +70 -0
  9. package/dist/classes/document/viewable-document.class.d.ts +205 -0
  10. package/dist/classes/document/viewable-document.class.js +67 -0
  11. package/dist/classes/document-updater.class.d.ts +40 -0
  12. package/dist/classes/document-updater.class.js +58 -0
  13. package/dist/classes/fetch-options/base-options.class.d.ts +18 -0
  14. package/dist/classes/fetch-options/base-options.class.js +81 -0
  15. package/dist/classes/fetch-options/comments-options.class.d.ts +6 -0
  16. package/dist/classes/fetch-options/comments-options.class.js +26 -0
  17. package/dist/classes/fetch-options/content-options.class.d.ts +7 -0
  18. package/dist/classes/fetch-options/content-options.class.js +32 -0
  19. package/dist/classes/fetch-options/drafted-options.class.d.ts +9 -0
  20. package/dist/classes/fetch-options/drafted-options.class.js +34 -0
  21. package/dist/classes/fetch-options/index.d.ts +6 -0
  22. package/dist/classes/fetch-options/index.js +15 -0
  23. package/dist/classes/fetch-options/liked-by-options.class.d.ts +8 -0
  24. package/dist/classes/fetch-options/liked-by-options.class.js +28 -0
  25. package/dist/classes/fetch-options/viewed-by-options.class.d.ts +9 -0
  26. package/dist/classes/fetch-options/viewed-by-options.class.js +28 -0
  27. package/dist/classes/index.d.ts +2 -2
  28. package/dist/classes/index.js +17 -3
  29. package/dist/classes/task-manager.class.d.ts +2 -2
  30. package/dist/classes/task-manager.class.js +4 -0
  31. package/dist/decorators/has-permission.decorator.d.ts +3 -0
  32. package/dist/decorators/has-permission.decorator.js +26 -0
  33. package/dist/decorators/index.d.ts +2 -0
  34. package/dist/decorators/index.js +2 -0
  35. package/dist/decorators/jwt.decorator.d.ts +1 -1
  36. package/dist/decorators/jwt.decorator.js +13 -11
  37. package/dist/decorators/schema-with-critical-keys.decorator.d.ts +12 -0
  38. package/dist/decorators/schema-with-critical-keys.decorator.js +16 -0
  39. package/dist/factories/index.d.ts +1 -0
  40. package/dist/factories/index.js +5 -0
  41. package/dist/factories/virtuals.factory.d.ts +80 -0
  42. package/dist/factories/virtuals.factory.js +172 -0
  43. package/dist/functions/create-schema.function.d.ts +3 -0
  44. package/dist/functions/create-schema.function.js +33 -0
  45. package/dist/functions/index.d.ts +1 -1
  46. package/dist/functions/index.js +3 -3
  47. package/dist/index.d.ts +6 -0
  48. package/dist/index.js +10 -0
  49. package/dist/likeable.interface.d.ts +42 -0
  50. package/dist/likeable.interface.js +48 -0
  51. package/dist/modules/_old/comment/comment.controller.d.ts +35 -0
  52. package/dist/modules/_old/comment/comment.controller.js +86 -0
  53. package/dist/modules/_old/comment/comment.model.d.ts +29 -0
  54. package/dist/modules/_old/comment/comment.model.js +43 -0
  55. package/dist/modules/_old/comment/comment.module-definition.d.ts +45 -0
  56. package/dist/modules/{comment → _old/comment}/comment.module-definition.js +2 -1
  57. package/dist/modules/_old/comment/comment.module.d.ts +22 -0
  58. package/dist/modules/_old/comment/comment.module.js +71 -0
  59. package/dist/modules/_old/comment/comment.service.d.ts +54 -0
  60. package/dist/modules/_old/comment/comment.service.js +133 -0
  61. package/dist/modules/_old/comment/index.d.ts +3 -0
  62. package/dist/modules/_old/comment/index.js +9 -0
  63. package/dist/modules/_old/content/content.module-definition.d.ts +5 -0
  64. package/dist/modules/_old/content/content.module-definition.js +8 -0
  65. package/dist/modules/_old/content/content.module.d.ts +31 -0
  66. package/dist/modules/_old/content/content.module.js +60 -0
  67. package/dist/modules/_old/content/content.service.d.ts +50 -0
  68. package/dist/modules/_old/content/content.service.js +145 -0
  69. package/dist/modules/_old/content/index.d.ts +2 -0
  70. package/dist/modules/_old/content/index.js +7 -0
  71. package/dist/modules/_old/database/database-module-options.interface.d.ts +41 -0
  72. package/dist/modules/_old/database/database.liveness-controller.d.ts +27 -0
  73. package/dist/modules/_old/database/database.liveness-controller.js +80 -0
  74. package/dist/modules/_old/database/database.module.d.ts +41 -0
  75. package/dist/modules/_old/database/database.module.js +97 -0
  76. package/dist/modules/_old/database/index.d.ts +6 -0
  77. package/dist/modules/_old/database/index.js +13 -0
  78. package/dist/modules/_old/database/lock-service/lock.schema.d.ts +38 -0
  79. package/dist/modules/_old/database/lock-service/lock.schema.js +51 -0
  80. package/dist/modules/_old/database/lock-service/lock.service.d.ts +53 -0
  81. package/dist/modules/_old/database/lock-service/lock.service.js +103 -0
  82. package/dist/modules/_old/database/model-service/dbs/hub-account.db.d.ts +28 -0
  83. package/dist/modules/_old/database/model-service/dbs/hub-account.db.js +44 -0
  84. package/dist/modules/_old/database/model-service/dbs/hub-books.db.d.ts +23 -0
  85. package/dist/modules/_old/database/model-service/dbs/hub-books.db.js +45 -0
  86. package/dist/modules/_old/database/model-service/dbs/hub-comments.db.d.ts +29 -0
  87. package/dist/modules/_old/database/model-service/dbs/hub-comments.db.js +68 -0
  88. package/dist/modules/_old/database/model-service/dbs/hub-content.db.d.ts +24 -0
  89. package/dist/modules/_old/database/model-service/dbs/hub-content.db.js +49 -0
  90. package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.d.ts +23 -0
  91. package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.js +45 -0
  92. package/dist/modules/_old/database/model-service/dbs/hub-events.db.d.ts +24 -0
  93. package/dist/modules/_old/database/model-service/dbs/hub-events.db.js +49 -0
  94. package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.d.ts +60 -0
  95. package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.js +106 -0
  96. package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.d.ts +25 -0
  97. package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.js +53 -0
  98. package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.d.ts +23 -0
  99. package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.js +45 -0
  100. package/dist/modules/_old/database/model-service/dbs/hub-team.db.d.ts +22 -0
  101. package/dist/modules/_old/database/model-service/dbs/hub-team.db.js +41 -0
  102. package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.d.ts +42 -0
  103. package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.js +81 -0
  104. package/dist/modules/_old/database/model-service/model.service.d.ts +8465 -0
  105. package/dist/modules/_old/database/model-service/model.service.js +136 -0
  106. package/dist/modules/_old/database/populate-service/populate.service.d.ts +73 -0
  107. package/dist/modules/_old/database/populate-service/populate.service.js +163 -0
  108. package/dist/modules/_old/database/service-mapper-service/service-mapper.service.d.ts +32 -0
  109. package/dist/modules/_old/database/service-mapper-service/service-mapper.service.js +73 -0
  110. package/dist/modules/_old/fetch/fetch.module.d.ts +31 -0
  111. package/dist/modules/_old/fetch/fetch.module.js +60 -0
  112. package/dist/modules/_old/fetch/fetch.service.d.ts +153 -0
  113. package/dist/modules/_old/fetch/fetch.service.js +274 -0
  114. package/dist/modules/_old/fetch/index.d.ts +2 -0
  115. package/dist/modules/_old/fetch/index.js +7 -0
  116. package/dist/modules/_old/index.d.ts +5 -0
  117. package/dist/modules/{comment → _old}/index.js +5 -2
  118. package/dist/modules/_old/like/index.d.ts +1 -0
  119. package/dist/modules/_old/like/index.js +5 -0
  120. package/dist/modules/_old/like/like.controller.d.ts +41 -0
  121. package/dist/modules/_old/like/like.controller.js +125 -0
  122. package/dist/modules/_old/like/like.module-definition.d.ts +20 -0
  123. package/dist/modules/_old/like/like.module-definition.js +8 -0
  124. package/dist/modules/_old/like/like.module.d.ts +21 -0
  125. package/dist/modules/_old/like/like.module.js +67 -0
  126. package/dist/modules/_old/like/like.service.d.ts +61 -0
  127. package/dist/modules/_old/like/like.service.js +103 -0
  128. package/dist/modules/authentication/guards/jwt-auth.guard.d.ts +1 -1
  129. package/dist/modules/authentication/guards/jwt-auth.guard.js +5 -3
  130. package/dist/modules/authentication/guards/permissions.guard.d.ts +1 -3
  131. package/dist/modules/authentication/guards/permissions.guard.js +2 -8
  132. package/dist/modules/authentication/guards/service-auth.guard.d.ts +0 -4
  133. package/dist/modules/authentication/guards/service-auth.guard.js +10 -13
  134. package/dist/modules/{comment/comment-module-options.interface.d.ts → comments/comments-module-options.interface.d.ts} +3 -2
  135. package/dist/modules/comments/comments-module-options.interface.js +2 -0
  136. package/dist/modules/{comment/comment.controller.d.ts → comments/comments.controller.d.ts} +7 -6
  137. package/dist/modules/{comment/comment.controller.js → comments/comments.controller.js} +14 -14
  138. package/dist/modules/comments/comments.module-definition.d.ts +4 -0
  139. package/dist/modules/comments/comments.module-definition.js +7 -0
  140. package/dist/modules/{comment/comment.module.d.ts → comments/comments.module.d.ts} +6 -6
  141. package/dist/modules/{comment/comment.module.js → comments/comments.module.js} +17 -16
  142. package/dist/modules/{comment/comment.service.d.ts → comments/comments.service.d.ts} +35 -9
  143. package/dist/modules/comments/comments.service.js +165 -0
  144. package/dist/modules/comments/index.d.ts +3 -0
  145. package/dist/modules/{services/providers/comments → comments}/index.js +2 -0
  146. package/dist/modules/index.d.ts +1 -1
  147. package/dist/modules/index.js +1 -1
  148. package/dist/modules/like/like-module-options.interface.d.ts +1 -0
  149. package/dist/modules/like/like.controller.d.ts +3 -2
  150. package/dist/modules/like/like.controller.js +4 -4
  151. package/dist/modules/like/like.module.js +1 -1
  152. package/dist/modules/like/like.service.d.ts +0 -16
  153. package/dist/modules/like/like.service.js +9 -28
  154. package/dist/modules/merge/merge-module-options.interface.d.ts +1 -0
  155. package/dist/modules/merge/merge.controller.d.ts +3 -2
  156. package/dist/modules/merge/merge.controller.js +4 -4
  157. package/dist/modules/merge/merge.module.js +1 -1
  158. package/dist/modules/services/providers/accounts.service.js +4 -0
  159. package/dist/modules/services/providers/index.d.ts +0 -1
  160. package/dist/modules/services/providers/index.js +0 -1
  161. package/dist/modules/services/services.module.js +0 -1
  162. package/dist/pipes/index.d.ts +1 -0
  163. package/dist/pipes/index.js +1 -0
  164. package/dist/pipes/restricted-fields.pipe.d.ts +35 -0
  165. package/dist/pipes/restricted-fields.pipe.js +83 -0
  166. package/dist/properties/content-return-type.property.d.ts +4 -0
  167. package/dist/properties/content-return-type.property.js +12 -7
  168. package/dist/properties/content.property.d.ts +7 -2
  169. package/dist/properties/content.property.js +11 -3
  170. package/dist/properties/index.d.ts +2 -4
  171. package/dist/properties/index.js +5 -5
  172. package/dist/transform/index.d.ts +2 -0
  173. package/dist/transform/index.js +2 -0
  174. package/dist/transform/mongo-id.transform.d.ts +4 -0
  175. package/dist/transform/mongo-id.transform.js +13 -0
  176. package/dist/transform/mongo-ids.transform.d.ts +4 -0
  177. package/dist/transform/mongo-ids.transform.js +16 -0
  178. package/dist/types/duplicable-model.type.d.ts +10 -0
  179. package/dist/types/duplicable-model.type.js +2 -0
  180. package/dist/types/index.d.ts +1 -0
  181. package/dist/types/index.js +1 -0
  182. package/dist/types/likeable.type.d.ts +4 -3
  183. package/dist/types/viewable.type.d.ts +4 -3
  184. package/dist/viewable.interface.d.ts +42 -0
  185. package/dist/viewable.interface.js +48 -0
  186. package/package.json +1 -1
  187. package/dist/classes/schema-builder.class.d.ts +0 -75
  188. package/dist/classes/schema-builder.class.js +0 -109
  189. package/dist/modules/comment/comment.module-definition.d.ts +0 -4
  190. package/dist/modules/comment/comment.service.js +0 -99
  191. package/dist/modules/comment/index.d.ts +0 -2
  192. package/dist/modules/services/providers/comments/comments.service-definition.d.ts +0 -1
  193. package/dist/modules/services/providers/comments/comments.service-definition.js +0 -4
  194. package/dist/modules/services/providers/comments/comments.service.d.ts +0 -60
  195. package/dist/modules/services/providers/comments/comments.service.js +0 -139
  196. package/dist/modules/services/providers/comments/index.d.ts +0 -1
  197. package/dist/properties/likeable.properties.d.ts +0 -1
  198. package/dist/properties/likeable.properties.js +0 -66
  199. package/dist/properties/viewable.properties.d.ts +0 -1
  200. package/dist/properties/viewable.properties.js +0 -66
  201. /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,4 @@
1
+ export { CommentableDocument } from './commentable-document.class';
2
+ export { ContentDocument } from './content-document.class';
3
+ export { LikeableDocument } from './likeable-document.class';
4
+ export { ViewableDocument } from './viewable-document.class';
@@ -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; } });