itlab-internal-services 2.16.18 → 2.16.20

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 (30) hide show
  1. package/dist/classes/document/commentable-document.class.d.ts +3 -199
  2. package/dist/classes/document/content-document.class.d.ts +3 -199
  3. package/dist/classes/document/likeable-document.class.d.ts +2 -205
  4. package/dist/classes/document/timestamps-document.class.d.ts +4 -200
  5. package/dist/classes/document/viewable-document.class.d.ts +2 -205
  6. package/dist/modules/services/base-http.service.js +17 -19
  7. package/dist/modules/services/providers/mail/dtos/{event-cancel-mail.dto.v1.d.ts → event-user-cancellation-mail.dto.v1.d.ts} +1 -1
  8. package/dist/modules/services/providers/mail/dtos/{event-invite-mail.dto.v1.d.ts → event-user-registration-mail.dto.v1.d.ts} +7 -3
  9. package/dist/modules/services/providers/mail/dtos/index.d.ts +4 -4
  10. package/dist/modules/services/providers/mail/dtos/index.js +4 -4
  11. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-cancel-mail.dto.v1.d.ts → lunch-roulette-cancellation-mail.dto.v1.d.ts} +1 -1
  12. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-submitted-mail.dto.v1.d.ts → lunch-roulette-registration-mail.dto.v1.d.ts} +1 -1
  13. package/dist/modules/services/providers/mail/mail-types.d.ts +6 -6
  14. package/dist/modules/services/providers/mail/mail-types.js +8 -8
  15. package/dist/modules/services/providers/mail/mail.service.d.ts +9 -9
  16. package/dist/modules/services/providers/mail/mail.service.js +12 -12
  17. package/dist/modules/services/providers/mail/models/index.d.ts +1 -0
  18. package/dist/modules/services/providers/mail/models/index.js +1 -0
  19. package/dist/modules/services/providers/mail/models/mail-attachment.model.d.ts +36 -0
  20. package/dist/modules/services/providers/mail/models/mail-attachment.model.js +38 -0
  21. package/dist/modules/services/providers/mail/models/mail-recipient.model.d.ts +2 -2
  22. package/dist/modules/services/providers/mail/models/mail-recipient.model.js +2 -2
  23. package/dist/pipes/queries/mongo-ids.pipe.js +9 -4
  24. package/dist/transform/mongo-ids.transform.js +5 -2
  25. package/dist/transform/string-array.transform.js +10 -3
  26. package/package.json +1 -1
  27. /package/dist/modules/services/providers/mail/dtos/{event-cancel-mail.dto.v1.js → event-user-cancellation-mail.dto.v1.js} +0 -0
  28. /package/dist/modules/services/providers/mail/dtos/{event-invite-mail.dto.v1.js → event-user-registration-mail.dto.v1.js} +0 -0
  29. /package/dist/modules/services/providers/mail/dtos/{lunch-roulette-cancel-mail.dto.v1.js → lunch-roulette-cancellation-mail.dto.v1.js} +0 -0
  30. /package/dist/modules/services/providers/mail/dtos/{lunch-roulette-submitted-mail.dto.v1.js → lunch-roulette-registration-mail.dto.v1.js} +0 -0
@@ -1,201 +1,5 @@
1
1
  import { LabComment } from 'itlab-functions';
2
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: import("mongoose").Types.ObjectId;
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<import("mongoose").Types.ObjectId, 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
- toBSON(): any;
89
- toJSON(options: import("mongoose").ToObjectOptions & {
90
- versionKey: false;
91
- virtuals: true;
92
- flattenObjectIds: true;
93
- }): Omit<{
94
- [x: string]: any;
95
- }, "__v">;
96
- toJSON(options: import("mongoose").ToObjectOptions & {
97
- virtuals: true;
98
- flattenObjectIds: true;
99
- }): {
100
- [x: string]: any;
101
- };
102
- toJSON(options: import("mongoose").ToObjectOptions & {
103
- versionKey: false;
104
- virtuals: true;
105
- }): Omit<any, "__v">;
106
- toJSON(options: import("mongoose").ToObjectOptions & {
107
- versionKey: false;
108
- flattenObjectIds: true;
109
- }): {
110
- [x: string]: any;
111
- [x: number]: any;
112
- [x: symbol]: any;
113
- };
114
- toJSON(options: import("mongoose").ToObjectOptions & {
115
- virtuals: true;
116
- }): any;
117
- toJSON(options: import("mongoose").ToObjectOptions & {
118
- versionKey: false;
119
- }): Omit<any, "__v">;
120
- toJSON(options?: import("mongoose").ToObjectOptions & {
121
- flattenMaps?: true;
122
- flattenObjectIds?: false;
123
- }): import("mongoose").FlattenMaps<any>;
124
- toJSON(options: import("mongoose").ToObjectOptions & {
125
- flattenObjectIds: false;
126
- }): import("mongoose").FlattenMaps<any>;
127
- toJSON(options: import("mongoose").ToObjectOptions & {
128
- flattenObjectIds: true;
129
- }): {
130
- [x: string]: any;
131
- };
132
- toJSON(options: import("mongoose").ToObjectOptions & {
133
- flattenMaps: false;
134
- }): any;
135
- toJSON(options: import("mongoose").ToObjectOptions & {
136
- flattenMaps: false;
137
- flattenObjectIds: true;
138
- }): any;
139
- toJSON<T = any>(options?: import("mongoose").ToObjectOptions & {
140
- flattenMaps?: true;
141
- flattenObjectIds?: false;
142
- }): import("mongoose").FlattenMaps<T>;
143
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
144
- flattenObjectIds: false;
145
- }): import("mongoose").FlattenMaps<T>;
146
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
147
- flattenObjectIds: true;
148
- }): import("mongoose").ObjectIdToString<import("mongoose").FlattenMaps<T>>;
149
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
150
- flattenMaps: false;
151
- }): T;
152
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
153
- flattenMaps: false;
154
- flattenObjectIds: true;
155
- }): import("mongoose").ObjectIdToString<T>;
156
- toObject(options: import("mongoose").ToObjectOptions & {
157
- versionKey: false;
158
- virtuals: true;
159
- flattenObjectIds: true;
160
- }): Omit<any, "__v">;
161
- toObject(options: import("mongoose").ToObjectOptions & {
162
- virtuals: true;
163
- flattenObjectIds: true;
164
- }): any;
165
- toObject(options: import("mongoose").ToObjectOptions & {
166
- versionKey: false;
167
- flattenObjectIds: true;
168
- }): Omit<any, "__v">;
169
- toObject(options: import("mongoose").ToObjectOptions & {
170
- versionKey: false;
171
- virtuals: true;
172
- }): Omit<any, "__v">;
173
- toObject(options: import("mongoose").ToObjectOptions & {
174
- virtuals: true;
175
- }): any;
176
- toObject(options: import("mongoose").ToObjectOptions & {
177
- versionKey: false;
178
- }): Omit<any, "__v">;
179
- toObject(options: import("mongoose").ToObjectOptions & {
180
- flattenObjectIds: true;
181
- }): any;
182
- toObject(options?: import("mongoose").ToObjectOptions): any;
183
- toObject<T>(options?: import("mongoose").ToObjectOptions): import("mongoose").Require_id<T> & {
184
- __v: number;
185
- };
186
- unmarkModified<T extends string | number | symbol>(path: T): void;
187
- unmarkModified(path: string): void;
188
- 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>>;
189
- validate<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): Promise<void>;
190
- validate(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): Promise<void>;
191
- validate(options: {
192
- pathsToSkip?: import("mongoose").pathsToSkip;
193
- }): Promise<void>;
194
- validateSync(options: {
195
- pathsToSkip?: import("mongoose").pathsToSkip;
196
- [k: string]: any;
197
- }): import("mongoose").Error.ValidationError | null;
198
- validateSync<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
199
- validateSync(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
200
- };
201
- } & TBase;
3
+ export declare function CommentableDocument<TBase extends new (...args: any[]) => Document>(Base: TBase): new (...args: any[]) => InstanceType<TBase> & {
4
+ comments?: LabComment[];
5
+ };
@@ -1,201 +1,5 @@
1
1
  import { LabHtmlContent, LabJsonContent, LabTextContent } from 'itlab-functions';
2
2
  import { Document } from 'mongoose';
3
- export declare function ContentDocument<TBase extends new (...args: any[]) => Document>(Base: TBase): {
4
- new (...args: any[]): {
5
- content?: LabJsonContent | LabHtmlContent | LabTextContent;
6
- _id: import("mongoose").Types.ObjectId;
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<import("mongoose").Types.ObjectId, 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
- toBSON(): any;
89
- toJSON(options: import("mongoose").ToObjectOptions & {
90
- versionKey: false;
91
- virtuals: true;
92
- flattenObjectIds: true;
93
- }): Omit<{
94
- [x: string]: any;
95
- }, "__v">;
96
- toJSON(options: import("mongoose").ToObjectOptions & {
97
- virtuals: true;
98
- flattenObjectIds: true;
99
- }): {
100
- [x: string]: any;
101
- };
102
- toJSON(options: import("mongoose").ToObjectOptions & {
103
- versionKey: false;
104
- virtuals: true;
105
- }): Omit<any, "__v">;
106
- toJSON(options: import("mongoose").ToObjectOptions & {
107
- versionKey: false;
108
- flattenObjectIds: true;
109
- }): {
110
- [x: string]: any;
111
- [x: number]: any;
112
- [x: symbol]: any;
113
- };
114
- toJSON(options: import("mongoose").ToObjectOptions & {
115
- virtuals: true;
116
- }): any;
117
- toJSON(options: import("mongoose").ToObjectOptions & {
118
- versionKey: false;
119
- }): Omit<any, "__v">;
120
- toJSON(options?: import("mongoose").ToObjectOptions & {
121
- flattenMaps?: true;
122
- flattenObjectIds?: false;
123
- }): import("mongoose").FlattenMaps<any>;
124
- toJSON(options: import("mongoose").ToObjectOptions & {
125
- flattenObjectIds: false;
126
- }): import("mongoose").FlattenMaps<any>;
127
- toJSON(options: import("mongoose").ToObjectOptions & {
128
- flattenObjectIds: true;
129
- }): {
130
- [x: string]: any;
131
- };
132
- toJSON(options: import("mongoose").ToObjectOptions & {
133
- flattenMaps: false;
134
- }): any;
135
- toJSON(options: import("mongoose").ToObjectOptions & {
136
- flattenMaps: false;
137
- flattenObjectIds: true;
138
- }): any;
139
- toJSON<T = any>(options?: import("mongoose").ToObjectOptions & {
140
- flattenMaps?: true;
141
- flattenObjectIds?: false;
142
- }): import("mongoose").FlattenMaps<T>;
143
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
144
- flattenObjectIds: false;
145
- }): import("mongoose").FlattenMaps<T>;
146
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
147
- flattenObjectIds: true;
148
- }): import("mongoose").ObjectIdToString<import("mongoose").FlattenMaps<T>>;
149
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
150
- flattenMaps: false;
151
- }): T;
152
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
153
- flattenMaps: false;
154
- flattenObjectIds: true;
155
- }): import("mongoose").ObjectIdToString<T>;
156
- toObject(options: import("mongoose").ToObjectOptions & {
157
- versionKey: false;
158
- virtuals: true;
159
- flattenObjectIds: true;
160
- }): Omit<any, "__v">;
161
- toObject(options: import("mongoose").ToObjectOptions & {
162
- virtuals: true;
163
- flattenObjectIds: true;
164
- }): any;
165
- toObject(options: import("mongoose").ToObjectOptions & {
166
- versionKey: false;
167
- flattenObjectIds: true;
168
- }): Omit<any, "__v">;
169
- toObject(options: import("mongoose").ToObjectOptions & {
170
- versionKey: false;
171
- virtuals: true;
172
- }): Omit<any, "__v">;
173
- toObject(options: import("mongoose").ToObjectOptions & {
174
- virtuals: true;
175
- }): any;
176
- toObject(options: import("mongoose").ToObjectOptions & {
177
- versionKey: false;
178
- }): Omit<any, "__v">;
179
- toObject(options: import("mongoose").ToObjectOptions & {
180
- flattenObjectIds: true;
181
- }): any;
182
- toObject(options?: import("mongoose").ToObjectOptions): any;
183
- toObject<T>(options?: import("mongoose").ToObjectOptions): import("mongoose").Require_id<T> & {
184
- __v: number;
185
- };
186
- unmarkModified<T extends string | number | symbol>(path: T): void;
187
- unmarkModified(path: string): void;
188
- 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>>;
189
- validate<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): Promise<void>;
190
- validate(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): Promise<void>;
191
- validate(options: {
192
- pathsToSkip?: import("mongoose").pathsToSkip;
193
- }): Promise<void>;
194
- validateSync(options: {
195
- pathsToSkip?: import("mongoose").pathsToSkip;
196
- [k: string]: any;
197
- }): import("mongoose").Error.ValidationError | null;
198
- validateSync<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
199
- validateSync(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
200
- };
201
- } & TBase;
3
+ export declare function ContentDocument<TBase extends new (...args: any[]) => Document>(Base: TBase): new (...args: any[]) => InstanceType<TBase> & {
4
+ content?: LabJsonContent | LabHtmlContent | LabTextContent;
5
+ };
@@ -1,208 +1,5 @@
1
1
  import { Document } from 'mongoose';
2
- import { User } from '../../models';
2
+ import { IsLikeable } from '../../types';
3
3
  export declare function LikeableDocument<TBase extends new (...args: any[]) => Document>(Base: TBase, options?: {
4
4
  requiredPermissions?: string[];
5
- }): {
6
- new (...args: any[]): {
7
- _likedBy?: string[];
8
- likes?: number;
9
- likedBy?: User[];
10
- hasLiked(accountId: string): boolean;
11
- addLike(accountId: string): Promise<number>;
12
- removeLike(accountId: string): Promise<number>;
13
- _id: import("mongoose").Types.ObjectId;
14
- $assertPopulated<Paths = {}>(path: string | string[], values?: Partial<Paths>): Omit</*elided*/ any, keyof Paths> & Paths;
15
- $clearModifiedPaths(): /*elided*/ any;
16
- $clone(): /*elided*/ any;
17
- $createModifiedPathsSnapshot(): import("mongoose").ModifiedPathsSnapshot;
18
- $getAllSubdocs(): Document[];
19
- $ignore(path: string): void;
20
- $isDefault(path?: string): boolean;
21
- $isDeleted(val?: boolean): boolean;
22
- $getPopulatedDocs(): Document[];
23
- $inc(path: string | string[], val?: number): /*elided*/ any;
24
- $isEmpty(path: string): boolean;
25
- $isValid(path: string): boolean;
26
- $locals: Record<string, unknown>;
27
- $markValid(path: string): void;
28
- $model<ModelType = import("mongoose").Model<unknown, {}, {}, {}, Document<unknown, {}, unknown, {}, {}> & Required<{
29
- _id: unknown;
30
- }> & {
31
- __v: number;
32
- }, any>>(name: string): ModelType;
33
- $model<ModelType = import("mongoose").Model<any, {}, {}, {}, any, any>>(): ModelType;
34
- $op: "save" | "validate" | "remove" | null;
35
- $restoreModifiedPathsSnapshot(snapshot: import("mongoose").ModifiedPathsSnapshot): /*elided*/ any;
36
- $session(session?: import("mongoose").ClientSession | null): import("mongoose").ClientSession | null;
37
- $set(path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
38
- $set(path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
39
- $set(value: string | Record<string, any>): /*elided*/ any;
40
- $where: Record<string, unknown>;
41
- baseModelName?: string;
42
- collection: import("mongoose").Collection;
43
- db: import("mongoose").Connection;
44
- deleteOne(options?: import("mongoose").QueryOptions): any;
45
- depopulate<Paths = {}>(path?: string | string[]): import("mongoose").MergeType</*elided*/ any, Paths>;
46
- directModifiedPaths(): Array<string>;
47
- equals(doc: Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}>): boolean;
48
- errors?: import("mongoose").Error.ValidationError;
49
- get<T extends string | number | symbol>(path: T, type?: any, options?: any): any;
50
- get(path: string, type?: any, options?: any): any;
51
- getChanges(): import("mongoose").UpdateQuery</*elided*/ any>;
52
- id?: any;
53
- increment(): /*elided*/ any;
54
- init(obj: import("mongoose").AnyObject, opts?: import("mongoose").AnyObject): /*elided*/ any;
55
- invalidate<T extends string | number | symbol>(path: T, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
56
- invalidate(path: string, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
57
- isDirectModified<T extends string | number | symbol>(path: T | T[]): boolean;
58
- isDirectModified(path: string | Array<string>): boolean;
59
- isDirectSelected<T extends string | number | symbol>(path: T): boolean;
60
- isDirectSelected(path: string): boolean;
61
- isInit<T extends string | number | symbol>(path: T): boolean;
62
- isInit(path: string): boolean;
63
- isModified<T extends string | number | symbol>(path?: T | T[], options?: {
64
- ignoreAtomics?: boolean;
65
- } | null): boolean;
66
- isModified(path?: string | Array<string>, options?: {
67
- ignoreAtomics?: boolean;
68
- } | null): boolean;
69
- isNew: boolean;
70
- isSelected<T extends string | number | symbol>(path: T): boolean;
71
- isSelected(path: string): boolean;
72
- markModified<T extends string | number | symbol>(path: T, scope?: any): void;
73
- markModified(path: string, scope?: any): void;
74
- model<ModelType = import("mongoose").Model<unknown, {}, {}, {}, Document<unknown, {}, unknown, {}, {}> & Required<{
75
- _id: unknown;
76
- }> & {
77
- __v: number;
78
- }, any>>(name: string): ModelType;
79
- model<ModelType = import("mongoose").Model<any, {}, {}, {}, any, any>>(): ModelType;
80
- modifiedPaths(options?: {
81
- includeChildren?: boolean;
82
- }): Array<string>;
83
- overwrite(obj: import("mongoose").AnyObject): /*elided*/ any;
84
- $parent(): Document | undefined;
85
- populate<Paths = {}>(path: string | import("mongoose").PopulateOptions | (string | import("mongoose").PopulateOptions)[]): Promise<import("mongoose").MergeType</*elided*/ any, Paths>>;
86
- 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>>;
87
- populated(path: string): any;
88
- replaceOne(replacement?: import("mongoose").AnyObject, options?: import("mongoose").QueryOptions | null): import("mongoose").Query<any, /*elided*/ any, {}, unknown, "find", Record<string, never>>;
89
- save(options?: import("mongoose").SaveOptions): Promise</*elided*/ any>;
90
- schema: import("mongoose").Schema;
91
- set<T extends string | number | symbol>(path: T, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
92
- set(path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
93
- set(path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): /*elided*/ any;
94
- set(value: string | Record<string, any>): /*elided*/ any;
95
- toBSON(): any;
96
- toJSON(options: import("mongoose").ToObjectOptions & {
97
- versionKey: false;
98
- virtuals: true;
99
- flattenObjectIds: true;
100
- }): Omit<{
101
- [x: string]: any;
102
- }, "__v">;
103
- toJSON(options: import("mongoose").ToObjectOptions & {
104
- virtuals: true;
105
- flattenObjectIds: true;
106
- }): {
107
- [x: string]: any;
108
- };
109
- toJSON(options: import("mongoose").ToObjectOptions & {
110
- versionKey: false;
111
- virtuals: true;
112
- }): Omit<any, "__v">;
113
- toJSON(options: import("mongoose").ToObjectOptions & {
114
- versionKey: false;
115
- flattenObjectIds: true;
116
- }): {
117
- [x: string]: any;
118
- [x: number]: any;
119
- [x: symbol]: any;
120
- };
121
- toJSON(options: import("mongoose").ToObjectOptions & {
122
- virtuals: true;
123
- }): any;
124
- toJSON(options: import("mongoose").ToObjectOptions & {
125
- versionKey: false;
126
- }): Omit<any, "__v">;
127
- toJSON(options?: import("mongoose").ToObjectOptions & {
128
- flattenMaps?: true;
129
- flattenObjectIds?: false;
130
- }): import("mongoose").FlattenMaps<any>;
131
- toJSON(options: import("mongoose").ToObjectOptions & {
132
- flattenObjectIds: false;
133
- }): import("mongoose").FlattenMaps<any>;
134
- toJSON(options: import("mongoose").ToObjectOptions & {
135
- flattenObjectIds: true;
136
- }): {
137
- [x: string]: any;
138
- };
139
- toJSON(options: import("mongoose").ToObjectOptions & {
140
- flattenMaps: false;
141
- }): any;
142
- toJSON(options: import("mongoose").ToObjectOptions & {
143
- flattenMaps: false;
144
- flattenObjectIds: true;
145
- }): any;
146
- toJSON<T = any>(options?: import("mongoose").ToObjectOptions & {
147
- flattenMaps?: true;
148
- flattenObjectIds?: false;
149
- }): import("mongoose").FlattenMaps<T>;
150
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
151
- flattenObjectIds: false;
152
- }): import("mongoose").FlattenMaps<T>;
153
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
154
- flattenObjectIds: true;
155
- }): import("mongoose").ObjectIdToString<import("mongoose").FlattenMaps<T>>;
156
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
157
- flattenMaps: false;
158
- }): T;
159
- toJSON<T = any>(options: import("mongoose").ToObjectOptions & {
160
- flattenMaps: false;
161
- flattenObjectIds: true;
162
- }): import("mongoose").ObjectIdToString<T>;
163
- toObject(options: import("mongoose").ToObjectOptions & {
164
- versionKey: false;
165
- virtuals: true;
166
- flattenObjectIds: true;
167
- }): Omit<any, "__v">;
168
- toObject(options: import("mongoose").ToObjectOptions & {
169
- virtuals: true;
170
- flattenObjectIds: true;
171
- }): any;
172
- toObject(options: import("mongoose").ToObjectOptions & {
173
- versionKey: false;
174
- flattenObjectIds: true;
175
- }): Omit<any, "__v">;
176
- toObject(options: import("mongoose").ToObjectOptions & {
177
- versionKey: false;
178
- virtuals: true;
179
- }): Omit<any, "__v">;
180
- toObject(options: import("mongoose").ToObjectOptions & {
181
- virtuals: true;
182
- }): any;
183
- toObject(options: import("mongoose").ToObjectOptions & {
184
- versionKey: false;
185
- }): Omit<any, "__v">;
186
- toObject(options: import("mongoose").ToObjectOptions & {
187
- flattenObjectIds: true;
188
- }): any;
189
- toObject(options?: import("mongoose").ToObjectOptions): any;
190
- toObject<T>(options?: import("mongoose").ToObjectOptions): import("mongoose").Require_id<T> & {
191
- __v: number;
192
- };
193
- unmarkModified<T extends string | number | symbol>(path: T): void;
194
- unmarkModified(path: string): void;
195
- 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>>;
196
- validate<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): Promise<void>;
197
- validate(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): Promise<void>;
198
- validate(options: {
199
- pathsToSkip?: import("mongoose").pathsToSkip;
200
- }): Promise<void>;
201
- validateSync(options: {
202
- pathsToSkip?: import("mongoose").pathsToSkip;
203
- [k: string]: any;
204
- }): import("mongoose").Error.ValidationError | null;
205
- validateSync<T extends string | number | symbol>(pathsToValidate?: T | T[], options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
206
- validateSync(pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
207
- };
208
- } & TBase;
5
+ }): new (...args: any[]) => InstanceType<TBase> & IsLikeable;