asfur 1.0.93 → 1.0.94
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/index.d.ts +14 -236
- package/dist/index.js +1 -92
- package/dist/types.d.ts +106 -210
- package/dist/types.js +3 -39
- package/index.ts +0 -106
- package/package.json +2 -1
- package/types.ts +23 -51
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/models" />
|
|
2
|
+
/// <reference types="mongoose/types/utility" />
|
|
3
|
+
/// <reference types="mongoose/types/document" />
|
|
4
|
+
/// <reference types="mongoose/types/types" />
|
|
1
5
|
/// <reference types="mongoose/types/aggregate" />
|
|
2
6
|
/// <reference types="mongoose/types/callback" />
|
|
3
7
|
/// <reference types="mongoose/types/collection" />
|
|
@@ -21,95 +25,10 @@
|
|
|
21
25
|
/// <reference types="mongoose/types/validation" />
|
|
22
26
|
/// <reference types="mongoose/types/virtuals" />
|
|
23
27
|
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
28
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
29
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
30
|
export * from './types';
|
|
27
31
|
import { Schema } from 'mongoose';
|
|
28
|
-
export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
29
|
-
versionKey: false;
|
|
30
|
-
toJSON: {
|
|
31
|
-
virtuals: true;
|
|
32
|
-
};
|
|
33
|
-
toObject: {
|
|
34
|
-
virtuals: true;
|
|
35
|
-
};
|
|
36
|
-
}, {
|
|
37
|
-
created_at: number;
|
|
38
|
-
updated_at: number;
|
|
39
|
-
timestamp: number;
|
|
40
|
-
text_geo: string[];
|
|
41
|
-
platform?: string | null | undefined;
|
|
42
|
-
source_id?: string | null | undefined;
|
|
43
|
-
source_public_id?: string | null | undefined;
|
|
44
|
-
source_name?: string | null | undefined;
|
|
45
|
-
source_geo?: string | null | undefined;
|
|
46
|
-
metadata?: any;
|
|
47
|
-
source_region?: string | null | undefined;
|
|
48
|
-
platform_id?: string | null | undefined;
|
|
49
|
-
original_text_id?: string | null | undefined;
|
|
50
|
-
original_text?: string | null | undefined;
|
|
51
|
-
translated_text?: string | null | undefined;
|
|
52
|
-
reply_to_message_id?: string | null | undefined;
|
|
53
|
-
media?: any;
|
|
54
|
-
author?: string | null | undefined;
|
|
55
|
-
replies?: any;
|
|
56
|
-
entities?: any;
|
|
57
|
-
author_username?: string | null | undefined;
|
|
58
|
-
author_id?: string | null | undefined;
|
|
59
|
-
pipeline_name?: string | null | undefined;
|
|
60
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
61
|
-
created_at: number;
|
|
62
|
-
updated_at: number;
|
|
63
|
-
timestamp: number;
|
|
64
|
-
text_geo: string[];
|
|
65
|
-
platform?: string | null | undefined;
|
|
66
|
-
source_id?: string | null | undefined;
|
|
67
|
-
source_public_id?: string | null | undefined;
|
|
68
|
-
source_name?: string | null | undefined;
|
|
69
|
-
source_geo?: string | null | undefined;
|
|
70
|
-
metadata?: any;
|
|
71
|
-
source_region?: string | null | undefined;
|
|
72
|
-
platform_id?: string | null | undefined;
|
|
73
|
-
original_text_id?: string | null | undefined;
|
|
74
|
-
original_text?: string | null | undefined;
|
|
75
|
-
translated_text?: string | null | undefined;
|
|
76
|
-
reply_to_message_id?: string | null | undefined;
|
|
77
|
-
media?: any;
|
|
78
|
-
author?: string | null | undefined;
|
|
79
|
-
replies?: any;
|
|
80
|
-
entities?: any;
|
|
81
|
-
author_username?: string | null | undefined;
|
|
82
|
-
author_id?: string | null | undefined;
|
|
83
|
-
pipeline_name?: string | null | undefined;
|
|
84
|
-
}>, {}> & import("mongoose").FlatRecord<{
|
|
85
|
-
created_at: number;
|
|
86
|
-
updated_at: number;
|
|
87
|
-
timestamp: number;
|
|
88
|
-
text_geo: string[];
|
|
89
|
-
platform?: string | null | undefined;
|
|
90
|
-
source_id?: string | null | undefined;
|
|
91
|
-
source_public_id?: string | null | undefined;
|
|
92
|
-
source_name?: string | null | undefined;
|
|
93
|
-
source_geo?: string | null | undefined;
|
|
94
|
-
metadata?: any;
|
|
95
|
-
source_region?: string | null | undefined;
|
|
96
|
-
platform_id?: string | null | undefined;
|
|
97
|
-
original_text_id?: string | null | undefined;
|
|
98
|
-
original_text?: string | null | undefined;
|
|
99
|
-
translated_text?: string | null | undefined;
|
|
100
|
-
reply_to_message_id?: string | null | undefined;
|
|
101
|
-
media?: any;
|
|
102
|
-
author?: string | null | undefined;
|
|
103
|
-
replies?: any;
|
|
104
|
-
entities?: any;
|
|
105
|
-
author_username?: string | null | undefined;
|
|
106
|
-
author_id?: string | null | undefined;
|
|
107
|
-
pipeline_name?: string | null | undefined;
|
|
108
|
-
}> & {
|
|
109
|
-
_id: import("mongoose").Types.ObjectId;
|
|
110
|
-
} & {
|
|
111
|
-
__v: number;
|
|
112
|
-
}>;
|
|
113
32
|
export declare const MongoInstructionsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
114
33
|
versionKey: false;
|
|
115
34
|
toJSON: {
|
|
@@ -138,76 +57,6 @@ export declare const MongoInstructionsSchema: Schema<any, import("mongoose").Mod
|
|
|
138
57
|
} & {
|
|
139
58
|
__v: number;
|
|
140
59
|
}>;
|
|
141
|
-
export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
142
|
-
versionKey: false;
|
|
143
|
-
toJSON: {
|
|
144
|
-
virtuals: true;
|
|
145
|
-
};
|
|
146
|
-
toObject: {
|
|
147
|
-
virtuals: true;
|
|
148
|
-
};
|
|
149
|
-
}, {
|
|
150
|
-
title: string;
|
|
151
|
-
status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
|
|
152
|
-
created_at: number;
|
|
153
|
-
updated_at: number;
|
|
154
|
-
subscribers: string[];
|
|
155
|
-
platform: string;
|
|
156
|
-
source_id: any;
|
|
157
|
-
source_public_id: any;
|
|
158
|
-
source_name: string;
|
|
159
|
-
tags: string[];
|
|
160
|
-
is_public: boolean;
|
|
161
|
-
metadata: any;
|
|
162
|
-
description?: string | null | undefined;
|
|
163
|
-
last_text_id?: number | null | undefined;
|
|
164
|
-
url?: string | null | undefined;
|
|
165
|
-
source_geo?: string | null | undefined;
|
|
166
|
-
source_region?: string | null | undefined;
|
|
167
|
-
server?: string | null | undefined;
|
|
168
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
169
|
-
title: string;
|
|
170
|
-
status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
|
|
171
|
-
created_at: number;
|
|
172
|
-
updated_at: number;
|
|
173
|
-
subscribers: string[];
|
|
174
|
-
platform: string;
|
|
175
|
-
source_id: any;
|
|
176
|
-
source_public_id: any;
|
|
177
|
-
source_name: string;
|
|
178
|
-
tags: string[];
|
|
179
|
-
is_public: boolean;
|
|
180
|
-
metadata: any;
|
|
181
|
-
description?: string | null | undefined;
|
|
182
|
-
last_text_id?: number | null | undefined;
|
|
183
|
-
url?: string | null | undefined;
|
|
184
|
-
source_geo?: string | null | undefined;
|
|
185
|
-
source_region?: string | null | undefined;
|
|
186
|
-
server?: string | null | undefined;
|
|
187
|
-
}>, {}> & import("mongoose").FlatRecord<{
|
|
188
|
-
title: string;
|
|
189
|
-
status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
|
|
190
|
-
created_at: number;
|
|
191
|
-
updated_at: number;
|
|
192
|
-
subscribers: string[];
|
|
193
|
-
platform: string;
|
|
194
|
-
source_id: any;
|
|
195
|
-
source_public_id: any;
|
|
196
|
-
source_name: string;
|
|
197
|
-
tags: string[];
|
|
198
|
-
is_public: boolean;
|
|
199
|
-
metadata: any;
|
|
200
|
-
description?: string | null | undefined;
|
|
201
|
-
last_text_id?: number | null | undefined;
|
|
202
|
-
url?: string | null | undefined;
|
|
203
|
-
source_geo?: string | null | undefined;
|
|
204
|
-
source_region?: string | null | undefined;
|
|
205
|
-
server?: string | null | undefined;
|
|
206
|
-
}> & {
|
|
207
|
-
_id: import("mongoose").Types.ObjectId;
|
|
208
|
-
} & {
|
|
209
|
-
__v: number;
|
|
210
|
-
}>;
|
|
211
60
|
export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
212
61
|
versionKey: false;
|
|
213
62
|
toJSON: {
|
|
@@ -217,8 +66,8 @@ export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any,
|
|
|
217
66
|
virtuals: true;
|
|
218
67
|
};
|
|
219
68
|
}, {
|
|
220
|
-
geos: string[];
|
|
221
69
|
timestamp: number;
|
|
70
|
+
geos: string[];
|
|
222
71
|
user_id: string;
|
|
223
72
|
sources: string[];
|
|
224
73
|
geos_ids: string[];
|
|
@@ -228,8 +77,8 @@ export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any,
|
|
|
228
77
|
user_instructions?: string | null | undefined;
|
|
229
78
|
user_time_zone?: string | null | undefined;
|
|
230
79
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
231
|
-
geos: string[];
|
|
232
80
|
timestamp: number;
|
|
81
|
+
geos: string[];
|
|
233
82
|
user_id: string;
|
|
234
83
|
sources: string[];
|
|
235
84
|
geos_ids: string[];
|
|
@@ -239,8 +88,8 @@ export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any,
|
|
|
239
88
|
user_instructions?: string | null | undefined;
|
|
240
89
|
user_time_zone?: string | null | undefined;
|
|
241
90
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
242
|
-
geos: string[];
|
|
243
91
|
timestamp: number;
|
|
92
|
+
geos: string[];
|
|
244
93
|
user_id: string;
|
|
245
94
|
sources: string[];
|
|
246
95
|
geos_ids: string[];
|
|
@@ -404,77 +253,6 @@ export declare const MongoJobSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
404
253
|
} & {
|
|
405
254
|
__v: number;
|
|
406
255
|
}>;
|
|
407
|
-
export declare const MongoGeoSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
408
|
-
versionKey: false;
|
|
409
|
-
toJSON: {
|
|
410
|
-
virtuals: true;
|
|
411
|
-
};
|
|
412
|
-
toObject: {
|
|
413
|
-
virtuals: true;
|
|
414
|
-
};
|
|
415
|
-
}, {
|
|
416
|
-
subscribers: string[];
|
|
417
|
-
is_used: boolean;
|
|
418
|
-
region?: string | null | undefined;
|
|
419
|
-
geo_text?: string | null | undefined;
|
|
420
|
-
timestamp?: number | null | undefined;
|
|
421
|
-
count?: number | null | undefined;
|
|
422
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
423
|
-
subscribers: string[];
|
|
424
|
-
is_used: boolean;
|
|
425
|
-
region?: string | null | undefined;
|
|
426
|
-
geo_text?: string | null | undefined;
|
|
427
|
-
timestamp?: number | null | undefined;
|
|
428
|
-
count?: number | null | undefined;
|
|
429
|
-
}>, {}> & import("mongoose").FlatRecord<{
|
|
430
|
-
subscribers: string[];
|
|
431
|
-
is_used: boolean;
|
|
432
|
-
region?: string | null | undefined;
|
|
433
|
-
geo_text?: string | null | undefined;
|
|
434
|
-
timestamp?: number | null | undefined;
|
|
435
|
-
count?: number | null | undefined;
|
|
436
|
-
}> & {
|
|
437
|
-
_id: import("mongoose").Types.ObjectId;
|
|
438
|
-
} & {
|
|
439
|
-
__v: number;
|
|
440
|
-
}>;
|
|
441
|
-
export declare const MongoGeoSelectionSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
442
|
-
versionKey: false;
|
|
443
|
-
toJSON: {
|
|
444
|
-
virtuals: true;
|
|
445
|
-
};
|
|
446
|
-
toObject: {
|
|
447
|
-
virtuals: true;
|
|
448
|
-
};
|
|
449
|
-
}, {
|
|
450
|
-
geos: string[];
|
|
451
|
-
title?: string | null | undefined;
|
|
452
|
-
description?: string | null | undefined;
|
|
453
|
-
type?: string | null | undefined;
|
|
454
|
-
region?: string | null | undefined;
|
|
455
|
-
created_at?: number | null | undefined;
|
|
456
|
-
updated_at?: number | null | undefined;
|
|
457
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
458
|
-
geos: string[];
|
|
459
|
-
title?: string | null | undefined;
|
|
460
|
-
description?: string | null | undefined;
|
|
461
|
-
type?: string | null | undefined;
|
|
462
|
-
region?: string | null | undefined;
|
|
463
|
-
created_at?: number | null | undefined;
|
|
464
|
-
updated_at?: number | null | undefined;
|
|
465
|
-
}>, {}> & import("mongoose").FlatRecord<{
|
|
466
|
-
geos: string[];
|
|
467
|
-
title?: string | null | undefined;
|
|
468
|
-
description?: string | null | undefined;
|
|
469
|
-
type?: string | null | undefined;
|
|
470
|
-
region?: string | null | undefined;
|
|
471
|
-
created_at?: number | null | undefined;
|
|
472
|
-
updated_at?: number | null | undefined;
|
|
473
|
-
}> & {
|
|
474
|
-
_id: import("mongoose").Types.ObjectId;
|
|
475
|
-
} & {
|
|
476
|
-
__v: number;
|
|
477
|
-
}>;
|
|
478
256
|
export declare const MongoApiKeySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
479
257
|
versionKey: false;
|
|
480
258
|
toJSON: {
|
|
@@ -519,8 +297,8 @@ export declare const MongoReportSchema: Schema<any, import("mongoose").Model<any
|
|
|
519
297
|
updated_at: number;
|
|
520
298
|
user_id: string;
|
|
521
299
|
process_status: "pending" | "in_progress" | "completed" | "failed";
|
|
522
|
-
title?: string | null | undefined;
|
|
523
300
|
type?: string | null | undefined;
|
|
301
|
+
title?: string | null | undefined;
|
|
524
302
|
thread_id?: string | null | undefined;
|
|
525
303
|
last_assistant_messages_count?: number | null | undefined;
|
|
526
304
|
additional_instructions?: string | null | undefined;
|
|
@@ -530,8 +308,8 @@ export declare const MongoReportSchema: Schema<any, import("mongoose").Model<any
|
|
|
530
308
|
updated_at: number;
|
|
531
309
|
user_id: string;
|
|
532
310
|
process_status: "pending" | "in_progress" | "completed" | "failed";
|
|
533
|
-
title?: string | null | undefined;
|
|
534
311
|
type?: string | null | undefined;
|
|
312
|
+
title?: string | null | undefined;
|
|
535
313
|
thread_id?: string | null | undefined;
|
|
536
314
|
last_assistant_messages_count?: number | null | undefined;
|
|
537
315
|
additional_instructions?: string | null | undefined;
|
|
@@ -541,8 +319,8 @@ export declare const MongoReportSchema: Schema<any, import("mongoose").Model<any
|
|
|
541
319
|
updated_at: number;
|
|
542
320
|
user_id: string;
|
|
543
321
|
process_status: "pending" | "in_progress" | "completed" | "failed";
|
|
544
|
-
title?: string | null | undefined;
|
|
545
322
|
type?: string | null | undefined;
|
|
323
|
+
title?: string | null | undefined;
|
|
546
324
|
thread_id?: string | null | undefined;
|
|
547
325
|
last_assistant_messages_count?: number | null | undefined;
|
|
548
326
|
additional_instructions?: string | null | undefined;
|
|
@@ -598,8 +376,8 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
598
376
|
virtuals: true;
|
|
599
377
|
};
|
|
600
378
|
}, {
|
|
601
|
-
title: string;
|
|
602
379
|
status: "inactive" | "active";
|
|
380
|
+
title: string;
|
|
603
381
|
created_at: number;
|
|
604
382
|
updated_at: number;
|
|
605
383
|
user_id: string;
|
|
@@ -611,8 +389,8 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
611
389
|
conversation_id?: string | null | undefined;
|
|
612
390
|
additional_instructions?: string | null | undefined;
|
|
613
391
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
614
|
-
title: string;
|
|
615
392
|
status: "inactive" | "active";
|
|
393
|
+
title: string;
|
|
616
394
|
created_at: number;
|
|
617
395
|
updated_at: number;
|
|
618
396
|
user_id: string;
|
|
@@ -624,8 +402,8 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
624
402
|
conversation_id?: string | null | undefined;
|
|
625
403
|
additional_instructions?: string | null | undefined;
|
|
626
404
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
627
|
-
title: string;
|
|
628
405
|
status: "inactive" | "active";
|
|
406
|
+
title: string;
|
|
629
407
|
created_at: number;
|
|
630
408
|
updated_at: number;
|
|
631
409
|
user_id: string;
|
package/dist/index.js
CHANGED
|
@@ -14,40 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.MongoScenarioScoreSchema = exports.MongoScenarioSchema = exports.MongoNotificationSchema = exports.MongoReportSchema = exports.MongoApiKeySchema = exports.
|
|
17
|
+
exports.MongoScenarioScoreSchema = exports.MongoScenarioSchema = exports.MongoNotificationSchema = exports.MongoReportSchema = exports.MongoApiKeySchema = exports.MongoJobSchema = exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.MongoQuerySchema = exports.MongoInstructionsSchema = void 0;
|
|
18
18
|
// Export types for consumers
|
|
19
19
|
__exportStar(require("./types"), exports);
|
|
20
20
|
const mongoose_1 = require("mongoose");
|
|
21
21
|
const types_1 = require("./types");
|
|
22
|
-
exports.MongoDataSchema = new mongoose_1.Schema({
|
|
23
|
-
source_id: { type: String || Number },
|
|
24
|
-
source_public_id: { type: String || Number },
|
|
25
|
-
source_name: String,
|
|
26
|
-
platform: String,
|
|
27
|
-
media: Object,
|
|
28
|
-
metadata: Object,
|
|
29
|
-
timestamp: { type: Number, required: true },
|
|
30
|
-
text_geo: { type: [String], default: [] },
|
|
31
|
-
source_geo: String,
|
|
32
|
-
platform_id: { type: String || Number },
|
|
33
|
-
original_text_id: { type: String || Number },
|
|
34
|
-
original_text: String,
|
|
35
|
-
translated_text: String,
|
|
36
|
-
author: String,
|
|
37
|
-
replies: Object,
|
|
38
|
-
entities: Object,
|
|
39
|
-
author_username: String,
|
|
40
|
-
author_id: String,
|
|
41
|
-
reply_to_message_id: { type: String || Number },
|
|
42
|
-
pipeline_name: { type: String },
|
|
43
|
-
source_region: { type: String },
|
|
44
|
-
created_at: { type: Number, default: Date.now },
|
|
45
|
-
updated_at: { type: Number, default: Date.now },
|
|
46
|
-
}, {
|
|
47
|
-
versionKey: false,
|
|
48
|
-
toJSON: { virtuals: true },
|
|
49
|
-
toObject: { virtuals: true },
|
|
50
|
-
});
|
|
51
22
|
exports.MongoInstructionsSchema = new mongoose_1.Schema({
|
|
52
23
|
user_id: { type: String, required: true },
|
|
53
24
|
prompt: { type: String },
|
|
@@ -58,43 +29,6 @@ exports.MongoInstructionsSchema = new mongoose_1.Schema({
|
|
|
58
29
|
toJSON: { virtuals: true },
|
|
59
30
|
toObject: { virtuals: true },
|
|
60
31
|
});
|
|
61
|
-
exports.MongoSourceSchema = new mongoose_1.Schema({
|
|
62
|
-
title: { type: String, required: true },
|
|
63
|
-
platform: {
|
|
64
|
-
type: String,
|
|
65
|
-
required: true,
|
|
66
|
-
},
|
|
67
|
-
source_id: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
68
|
-
source_public_id: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
69
|
-
is_public: { type: Boolean, default: true },
|
|
70
|
-
description: { type: String },
|
|
71
|
-
last_text_id: { type: Number },
|
|
72
|
-
source_geo: { type: String },
|
|
73
|
-
source_name: { type: String, required: true },
|
|
74
|
-
status: {
|
|
75
|
-
type: String,
|
|
76
|
-
enum: [
|
|
77
|
-
'approved',
|
|
78
|
-
'back_to_business',
|
|
79
|
-
'pending',
|
|
80
|
-
'inactive',
|
|
81
|
-
'in_review',
|
|
82
|
-
],
|
|
83
|
-
default: 'pending',
|
|
84
|
-
},
|
|
85
|
-
tags: { type: [String], default: [] },
|
|
86
|
-
url: { type: String },
|
|
87
|
-
metadata: { type: Object, default: {} },
|
|
88
|
-
subscribers: { type: [String], default: [] },
|
|
89
|
-
created_at: { type: Number, default: Date.now },
|
|
90
|
-
updated_at: { type: Number, default: Date.now },
|
|
91
|
-
source_region: { type: String },
|
|
92
|
-
server: { type: String }, // e.g., server handling this source
|
|
93
|
-
}, {
|
|
94
|
-
versionKey: false,
|
|
95
|
-
toJSON: { virtuals: true },
|
|
96
|
-
toObject: { virtuals: true },
|
|
97
|
-
});
|
|
98
32
|
exports.MongoQuerySchema = new mongoose_1.Schema({
|
|
99
33
|
title: { type: String },
|
|
100
34
|
query: { type: String },
|
|
@@ -180,31 +114,6 @@ exports.MongoJobSchema = new mongoose_1.Schema({
|
|
|
180
114
|
toJSON: { virtuals: true },
|
|
181
115
|
toObject: { virtuals: true },
|
|
182
116
|
});
|
|
183
|
-
exports.MongoGeoSchema = new mongoose_1.Schema({
|
|
184
|
-
geo_text: { type: String },
|
|
185
|
-
timestamp: { type: Number },
|
|
186
|
-
count: { type: Number },
|
|
187
|
-
region: { type: String },
|
|
188
|
-
subscribers: { type: [String], default: [] },
|
|
189
|
-
is_used: { type: Boolean, default: false }, // true if this geo is used in any source
|
|
190
|
-
}, {
|
|
191
|
-
versionKey: false,
|
|
192
|
-
toJSON: { virtuals: true },
|
|
193
|
-
toObject: { virtuals: true },
|
|
194
|
-
});
|
|
195
|
-
exports.MongoGeoSelectionSchema = new mongoose_1.Schema({
|
|
196
|
-
title: { type: String },
|
|
197
|
-
description: { type: String },
|
|
198
|
-
type: { type: String },
|
|
199
|
-
geos: { type: [String], default: [] },
|
|
200
|
-
region: { type: String },
|
|
201
|
-
created_at: { type: Number },
|
|
202
|
-
updated_at: { type: Number }, // last update date
|
|
203
|
-
}, {
|
|
204
|
-
versionKey: false,
|
|
205
|
-
toJSON: { virtuals: true },
|
|
206
|
-
toObject: { virtuals: true },
|
|
207
|
-
});
|
|
208
117
|
exports.MongoApiKeySchema = new mongoose_1.Schema({
|
|
209
118
|
user_id: { type: String, required: true },
|
|
210
119
|
api_key: { type: String, required: true },
|