harvester_sdk 1.0.12 → 1.0.14
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 +15 -15
- package/dist/index.js +4 -3
- package/dist/types.d.ts +23 -25
- package/dist/types.js +11 -6
- package/index.ts +4 -3
- package/package.json +1 -1
- package/types.ts +10 -11
package/dist/index.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
76
76
|
}>;
|
|
77
77
|
is_reply: boolean;
|
|
78
78
|
processing_status: "raw" | "processed" | "error";
|
|
79
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | null | undefined;
|
|
79
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | null | undefined;
|
|
80
80
|
metadata?: any;
|
|
81
81
|
timestamp?: number | null | undefined;
|
|
82
82
|
is_pinned?: boolean | null | undefined;
|
|
@@ -93,7 +93,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
93
93
|
source_group_id?: string | null | undefined;
|
|
94
94
|
data_id?: any;
|
|
95
95
|
data_url?: string | null | undefined;
|
|
96
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | null | undefined;
|
|
96
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | null | undefined;
|
|
97
97
|
data_text?: string | null | undefined;
|
|
98
98
|
data_language?: string | null | undefined;
|
|
99
99
|
data_sentiment?: "positive" | "negative" | "neutral" | "mixed" | null | undefined;
|
|
@@ -169,7 +169,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
169
169
|
}>;
|
|
170
170
|
is_reply: boolean;
|
|
171
171
|
processing_status: "raw" | "processed" | "error";
|
|
172
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | null | undefined;
|
|
172
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | null | undefined;
|
|
173
173
|
metadata?: any;
|
|
174
174
|
timestamp?: number | null | undefined;
|
|
175
175
|
is_pinned?: boolean | null | undefined;
|
|
@@ -186,7 +186,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
186
186
|
source_group_id?: string | null | undefined;
|
|
187
187
|
data_id?: any;
|
|
188
188
|
data_url?: string | null | undefined;
|
|
189
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | null | undefined;
|
|
189
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | null | undefined;
|
|
190
190
|
data_text?: string | null | undefined;
|
|
191
191
|
data_language?: string | null | undefined;
|
|
192
192
|
data_sentiment?: "positive" | "negative" | "neutral" | "mixed" | null | undefined;
|
|
@@ -262,7 +262,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
262
262
|
}>;
|
|
263
263
|
is_reply: boolean;
|
|
264
264
|
processing_status: "raw" | "processed" | "error";
|
|
265
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | null | undefined;
|
|
265
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | null | undefined;
|
|
266
266
|
metadata?: any;
|
|
267
267
|
timestamp?: number | null | undefined;
|
|
268
268
|
is_pinned?: boolean | null | undefined;
|
|
@@ -279,7 +279,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
279
279
|
source_group_id?: string | null | undefined;
|
|
280
280
|
data_id?: any;
|
|
281
281
|
data_url?: string | null | undefined;
|
|
282
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | null | undefined;
|
|
282
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | null | undefined;
|
|
283
283
|
data_text?: string | null | undefined;
|
|
284
284
|
data_language?: string | null | undefined;
|
|
285
285
|
data_sentiment?: "positive" | "negative" | "neutral" | "mixed" | null | undefined;
|
|
@@ -367,7 +367,7 @@ export declare const MongoSourceGroupSchema: Schema<any, import("mongoose").Mode
|
|
|
367
367
|
created_at: number;
|
|
368
368
|
updated_at: number;
|
|
369
369
|
status: "active" | "inactive" | "deleted";
|
|
370
|
-
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
|
|
370
|
+
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
|
|
371
371
|
notes?: string | null | undefined;
|
|
372
372
|
description?: string | null | undefined;
|
|
373
373
|
region_id?: string | null | undefined;
|
|
@@ -377,7 +377,7 @@ export declare const MongoSourceGroupSchema: Schema<any, import("mongoose").Mode
|
|
|
377
377
|
created_at: number;
|
|
378
378
|
updated_at: number;
|
|
379
379
|
status: "active" | "inactive" | "deleted";
|
|
380
|
-
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
|
|
380
|
+
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
|
|
381
381
|
notes?: string | null | undefined;
|
|
382
382
|
description?: string | null | undefined;
|
|
383
383
|
region_id?: string | null | undefined;
|
|
@@ -387,7 +387,7 @@ export declare const MongoSourceGroupSchema: Schema<any, import("mongoose").Mode
|
|
|
387
387
|
created_at: number;
|
|
388
388
|
updated_at: number;
|
|
389
389
|
status: "active" | "inactive" | "deleted";
|
|
390
|
-
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
|
|
390
|
+
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
|
|
391
391
|
notes?: string | null | undefined;
|
|
392
392
|
description?: string | null | undefined;
|
|
393
393
|
region_id?: string | null | undefined;
|
|
@@ -409,8 +409,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
|
|
|
409
409
|
created_at: number;
|
|
410
410
|
updated_at: number;
|
|
411
411
|
status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
|
|
412
|
-
platform:
|
|
413
|
-
entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
|
|
412
|
+
platform: string;
|
|
414
413
|
tags: string[];
|
|
415
414
|
is_public: boolean;
|
|
416
415
|
metadata: any;
|
|
@@ -420,6 +419,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
|
|
|
420
419
|
description?: string | null | undefined;
|
|
421
420
|
region_id?: string | null | undefined;
|
|
422
421
|
title?: string | null | undefined;
|
|
422
|
+
entity?: string | null | undefined;
|
|
423
423
|
public_id?: any;
|
|
424
424
|
url?: string | null | undefined;
|
|
425
425
|
language?: string | null | undefined;
|
|
@@ -436,8 +436,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
|
|
|
436
436
|
created_at: number;
|
|
437
437
|
updated_at: number;
|
|
438
438
|
status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
|
|
439
|
-
platform:
|
|
440
|
-
entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
|
|
439
|
+
platform: string;
|
|
441
440
|
tags: string[];
|
|
442
441
|
is_public: boolean;
|
|
443
442
|
metadata: any;
|
|
@@ -447,6 +446,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
|
|
|
447
446
|
description?: string | null | undefined;
|
|
448
447
|
region_id?: string | null | undefined;
|
|
449
448
|
title?: string | null | undefined;
|
|
449
|
+
entity?: string | null | undefined;
|
|
450
450
|
public_id?: any;
|
|
451
451
|
url?: string | null | undefined;
|
|
452
452
|
language?: string | null | undefined;
|
|
@@ -463,8 +463,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
|
|
|
463
463
|
created_at: number;
|
|
464
464
|
updated_at: number;
|
|
465
465
|
status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
|
|
466
|
-
platform:
|
|
467
|
-
entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
|
|
466
|
+
platform: string;
|
|
468
467
|
tags: string[];
|
|
469
468
|
is_public: boolean;
|
|
470
469
|
metadata: any;
|
|
@@ -474,6 +473,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
|
|
|
474
473
|
description?: string | null | undefined;
|
|
475
474
|
region_id?: string | null | undefined;
|
|
476
475
|
title?: string | null | undefined;
|
|
476
|
+
entity?: string | null | undefined;
|
|
477
477
|
public_id?: any;
|
|
478
478
|
url?: string | null | undefined;
|
|
479
479
|
language?: string | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,7 @@ exports.MongoDataSchema = new mongoose_1.Schema({
|
|
|
54
54
|
'article',
|
|
55
55
|
'link',
|
|
56
56
|
'document',
|
|
57
|
+
'text'
|
|
57
58
|
],
|
|
58
59
|
},
|
|
59
60
|
// Content
|
|
@@ -202,13 +203,13 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
|
|
|
202
203
|
title: { type: String },
|
|
203
204
|
platform: {
|
|
204
205
|
type: String,
|
|
205
|
-
enum:
|
|
206
|
+
// enum: platformsList,
|
|
206
207
|
required: true,
|
|
207
208
|
},
|
|
208
209
|
entity: {
|
|
209
210
|
type: String,
|
|
210
|
-
enum:
|
|
211
|
-
required: true,
|
|
211
|
+
// enum: entityTypesList,
|
|
212
|
+
// required: true,
|
|
212
213
|
},
|
|
213
214
|
public_id: { type: mongoose_1.Schema.Types.Mixed },
|
|
214
215
|
url: { type: String },
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const platformsList: readonly ["telegram", "facebook", "instagram", "tiktok", "website"];
|
|
2
|
+
export declare const platformsList: readonly ["telegram", "facebook", "instagram", "tiktok", "website", "youtube", "twitter", "x", "reddit", "linkedin", "snapchat", "whatsapp", "discord", "twitch"];
|
|
3
3
|
export declare const entityTypesList: readonly ["profile", "group", "page", "channel", "hashtag", "website"];
|
|
4
4
|
export declare const platformEntityMap: {
|
|
5
5
|
readonly telegram: readonly ["channel", "group"];
|
|
@@ -43,7 +43,7 @@ export declare const zodSourceGroupSchema: z.ZodObject<{
|
|
|
43
43
|
_id: z.ZodOptional<z.ZodString>;
|
|
44
44
|
name: z.ZodString;
|
|
45
45
|
description: z.ZodOptional<z.ZodString>;
|
|
46
|
-
platform: z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website"]>;
|
|
46
|
+
platform: z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website", "youtube", "twitter", "x", "reddit", "linkedin", "snapchat", "whatsapp", "discord", "twitch"]>;
|
|
47
47
|
region_id: z.ZodOptional<z.ZodString>;
|
|
48
48
|
max_active_sources: z.ZodOptional<z.ZodNumber>;
|
|
49
49
|
created_at: z.ZodOptional<z.ZodNumber>;
|
|
@@ -52,7 +52,7 @@ export declare const zodSourceGroupSchema: z.ZodObject<{
|
|
|
52
52
|
status: z.ZodOptional<z.ZodEnum<["active", "inactive", "deleted"]>>;
|
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
|
54
54
|
name: string;
|
|
55
|
-
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
|
|
55
|
+
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
|
|
56
56
|
_id?: string | undefined;
|
|
57
57
|
created_at?: number | undefined;
|
|
58
58
|
updated_at?: number | undefined;
|
|
@@ -63,7 +63,7 @@ export declare const zodSourceGroupSchema: z.ZodObject<{
|
|
|
63
63
|
max_active_sources?: number | undefined;
|
|
64
64
|
}, {
|
|
65
65
|
name: string;
|
|
66
|
-
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
|
|
66
|
+
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
|
|
67
67
|
_id?: string | undefined;
|
|
68
68
|
created_at?: number | undefined;
|
|
69
69
|
updated_at?: number | undefined;
|
|
@@ -76,7 +76,7 @@ export declare const zodSourceGroupSchema: z.ZodObject<{
|
|
|
76
76
|
export declare const zodSourceSchema: z.ZodObject<{
|
|
77
77
|
_id: z.ZodOptional<z.ZodString>;
|
|
78
78
|
title: z.ZodOptional<z.ZodString>;
|
|
79
|
-
platform: z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website"]>;
|
|
79
|
+
platform: z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website", "youtube", "twitter", "x", "reddit", "linkedin", "snapchat", "whatsapp", "discord", "twitch"]>;
|
|
80
80
|
entity: z.ZodEnum<["profile", "group", "page", "channel", "hashtag", "website"]>;
|
|
81
81
|
public_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
82
82
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -115,7 +115,7 @@ export declare const zodSourceSchema: z.ZodObject<{
|
|
|
115
115
|
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
|
117
117
|
status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
|
|
118
|
-
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
|
|
118
|
+
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
|
|
119
119
|
entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
|
|
120
120
|
is_public: boolean;
|
|
121
121
|
_id?: string | undefined;
|
|
@@ -143,7 +143,7 @@ export declare const zodSourceSchema: z.ZodObject<{
|
|
|
143
143
|
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
144
144
|
}, {
|
|
145
145
|
status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
|
|
146
|
-
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
|
|
146
|
+
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
|
|
147
147
|
entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
|
|
148
148
|
_id?: string | undefined;
|
|
149
149
|
created_at?: number | undefined;
|
|
@@ -462,7 +462,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
462
462
|
data_timestamp: z.ZodOptional<z.ZodNumber>;
|
|
463
463
|
created_at: z.ZodNumber;
|
|
464
464
|
updated_at: z.ZodNumber;
|
|
465
|
-
platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website"]>>;
|
|
465
|
+
platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website", "youtube", "twitter", "x", "reddit", "linkedin", "snapchat", "whatsapp", "discord", "twitch"]>>;
|
|
466
466
|
source_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
467
467
|
source_title: z.ZodOptional<z.ZodString>;
|
|
468
468
|
source_url: z.ZodOptional<z.ZodString>;
|
|
@@ -472,7 +472,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
472
472
|
source_dominant_geos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
473
473
|
data_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
474
474
|
data_url: z.ZodOptional<z.ZodString>;
|
|
475
|
-
data_original_type: z.ZodOptional<z.ZodEnum<["post", "comment", "reply", "video", "image", "photo", "story", "reel", "article", "link", "document"]>>;
|
|
475
|
+
data_original_type: z.ZodOptional<z.ZodEnum<["post", "comment", "reply", "video", "image", "photo", "story", "reel", "article", "link", "document", "text"]>>;
|
|
476
476
|
data_text: z.ZodOptional<z.ZodString>;
|
|
477
477
|
data_language: z.ZodOptional<z.ZodString>;
|
|
478
478
|
data_geo: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -767,7 +767,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
767
767
|
is_reply: boolean;
|
|
768
768
|
processing_status: "raw" | "processed" | "error";
|
|
769
769
|
_id?: string | undefined;
|
|
770
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | undefined;
|
|
770
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | undefined;
|
|
771
771
|
metadata?: Record<string, any> | {
|
|
772
772
|
channel_id: string;
|
|
773
773
|
post_author: string | null;
|
|
@@ -837,7 +837,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
837
837
|
source_group_id?: string | undefined;
|
|
838
838
|
data_id?: string | number | undefined;
|
|
839
839
|
data_url?: string | undefined;
|
|
840
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | undefined;
|
|
840
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | undefined;
|
|
841
841
|
data_text?: string | undefined;
|
|
842
842
|
data_language?: string | undefined;
|
|
843
843
|
data_sentiment?: "positive" | "negative" | "neutral" | "mixed" | undefined;
|
|
@@ -877,7 +877,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
877
877
|
updated_at: number;
|
|
878
878
|
source_id: string | number;
|
|
879
879
|
_id?: string | undefined;
|
|
880
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | undefined;
|
|
880
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | undefined;
|
|
881
881
|
metadata?: Record<string, any> | {
|
|
882
882
|
channel_id: string;
|
|
883
883
|
post_author: string | null;
|
|
@@ -950,7 +950,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
950
950
|
source_dominant_geos?: string[] | undefined;
|
|
951
951
|
data_id?: string | number | undefined;
|
|
952
952
|
data_url?: string | undefined;
|
|
953
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | undefined;
|
|
953
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | undefined;
|
|
954
954
|
data_text?: string | undefined;
|
|
955
955
|
data_language?: string | undefined;
|
|
956
956
|
data_geo?: string[] | undefined;
|
|
@@ -1006,7 +1006,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1006
1006
|
data_timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1007
1007
|
created_at: z.ZodNumber;
|
|
1008
1008
|
updated_at: z.ZodNumber;
|
|
1009
|
-
platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website"]>>;
|
|
1009
|
+
platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website", "youtube", "twitter", "x", "reddit", "linkedin", "snapchat", "whatsapp", "discord", "twitch"]>>;
|
|
1010
1010
|
source_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1011
1011
|
source_title: z.ZodOptional<z.ZodString>;
|
|
1012
1012
|
source_url: z.ZodOptional<z.ZodString>;
|
|
@@ -1016,7 +1016,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1016
1016
|
source_dominant_geos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1017
1017
|
data_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1018
1018
|
data_url: z.ZodOptional<z.ZodString>;
|
|
1019
|
-
data_original_type: z.ZodOptional<z.ZodEnum<["post", "comment", "reply", "video", "image", "photo", "story", "reel", "article", "link", "document"]>>;
|
|
1019
|
+
data_original_type: z.ZodOptional<z.ZodEnum<["post", "comment", "reply", "video", "image", "photo", "story", "reel", "article", "link", "document", "text"]>>;
|
|
1020
1020
|
data_text: z.ZodOptional<z.ZodString>;
|
|
1021
1021
|
data_language: z.ZodOptional<z.ZodString>;
|
|
1022
1022
|
data_geo: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -1311,7 +1311,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1311
1311
|
is_reply: boolean;
|
|
1312
1312
|
processing_status: "raw" | "processed" | "error";
|
|
1313
1313
|
_id?: string | undefined;
|
|
1314
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | undefined;
|
|
1314
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | undefined;
|
|
1315
1315
|
metadata?: Record<string, any> | {
|
|
1316
1316
|
channel_id: string;
|
|
1317
1317
|
post_author: string | null;
|
|
@@ -1381,7 +1381,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1381
1381
|
source_group_id?: string | undefined;
|
|
1382
1382
|
data_id?: string | number | undefined;
|
|
1383
1383
|
data_url?: string | undefined;
|
|
1384
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | undefined;
|
|
1384
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | undefined;
|
|
1385
1385
|
data_text?: string | undefined;
|
|
1386
1386
|
data_language?: string | undefined;
|
|
1387
1387
|
data_sentiment?: "positive" | "negative" | "neutral" | "mixed" | undefined;
|
|
@@ -1421,7 +1421,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1421
1421
|
updated_at: number;
|
|
1422
1422
|
source_id: string | number;
|
|
1423
1423
|
_id?: string | undefined;
|
|
1424
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | undefined;
|
|
1424
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | undefined;
|
|
1425
1425
|
metadata?: Record<string, any> | {
|
|
1426
1426
|
channel_id: string;
|
|
1427
1427
|
post_author: string | null;
|
|
@@ -1494,7 +1494,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1494
1494
|
source_dominant_geos?: string[] | undefined;
|
|
1495
1495
|
data_id?: string | number | undefined;
|
|
1496
1496
|
data_url?: string | undefined;
|
|
1497
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | undefined;
|
|
1497
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | undefined;
|
|
1498
1498
|
data_text?: string | undefined;
|
|
1499
1499
|
data_language?: string | undefined;
|
|
1500
1500
|
data_geo?: string[] | undefined;
|
|
@@ -1565,7 +1565,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1565
1565
|
is_reply: boolean;
|
|
1566
1566
|
processing_status: "raw" | "processed" | "error";
|
|
1567
1567
|
_id?: string | undefined;
|
|
1568
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | undefined;
|
|
1568
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | undefined;
|
|
1569
1569
|
metadata?: Record<string, any> | {
|
|
1570
1570
|
channel_id: string;
|
|
1571
1571
|
post_author: string | null;
|
|
@@ -1635,7 +1635,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1635
1635
|
source_group_id?: string | undefined;
|
|
1636
1636
|
data_id?: string | number | undefined;
|
|
1637
1637
|
data_url?: string | undefined;
|
|
1638
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | undefined;
|
|
1638
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | undefined;
|
|
1639
1639
|
data_text?: string | undefined;
|
|
1640
1640
|
data_language?: string | undefined;
|
|
1641
1641
|
data_sentiment?: "positive" | "negative" | "neutral" | "mixed" | undefined;
|
|
@@ -1675,7 +1675,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1675
1675
|
updated_at: number;
|
|
1676
1676
|
source_id: string | number;
|
|
1677
1677
|
_id?: string | undefined;
|
|
1678
|
-
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | undefined;
|
|
1678
|
+
platform?: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch" | undefined;
|
|
1679
1679
|
metadata?: Record<string, any> | {
|
|
1680
1680
|
channel_id: string;
|
|
1681
1681
|
post_author: string | null;
|
|
@@ -1748,7 +1748,7 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
|
|
|
1748
1748
|
source_dominant_geos?: string[] | undefined;
|
|
1749
1749
|
data_id?: string | number | undefined;
|
|
1750
1750
|
data_url?: string | undefined;
|
|
1751
|
-
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | undefined;
|
|
1751
|
+
data_original_type?: "image" | "video" | "link" | "document" | "post" | "comment" | "reply" | "photo" | "story" | "reel" | "article" | "text" | undefined;
|
|
1752
1752
|
data_text?: string | undefined;
|
|
1753
1753
|
data_language?: string | undefined;
|
|
1754
1754
|
data_geo?: string[] | undefined;
|
|
@@ -1812,5 +1812,3 @@ export type FacebookMetadataType = z.infer<typeof facebookMetadataSchema>;
|
|
|
1812
1812
|
export type InstagramMetadataType = z.infer<typeof instagramMetadataSchema>;
|
|
1813
1813
|
export type TiktokMetadataType = z.infer<typeof tiktokMetadataSchema>;
|
|
1814
1814
|
export type WebsiteMetadataType = z.infer<typeof websiteMetadataSchema>;
|
|
1815
|
-
export type PlatformEntityType<T extends (typeof platformsList)[number]> = (typeof platformEntityMap)[T][number];
|
|
1816
|
-
export declare const getAllowedEntitiesForPlatform: (platform: (typeof platformsList)[number]) => readonly ["channel", "group"] | readonly ["profile", "page", "group"] | readonly ["profile", "hashtag"] | readonly ["website"];
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.zodDataSchemaWithValidation = exports.zodDataSchema = exports.authorSchema = exports.repliesInfoSchema = exports.mediaItemSchema = exports.websiteMetadataSchema = exports.tiktokMetadataSchema = exports.instagramMetadataSchema = exports.facebookMetadataSchema = exports.telegramMetadataSchema = exports.zodGeoSelectionSchema = exports.zodGeoSchema = exports.zodSourceSchema = exports.zodSourceGroupSchema = exports.zodRegionSchema = exports.generalStatusList = exports.sourceStatusList = exports.priorityLevels = exports.platformEntityMap = exports.entityTypesList = exports.platformsList = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.platformsList = [
|
|
6
6
|
'telegram',
|
|
@@ -8,6 +8,15 @@ exports.platformsList = [
|
|
|
8
8
|
'instagram',
|
|
9
9
|
'tiktok',
|
|
10
10
|
'website',
|
|
11
|
+
'youtube',
|
|
12
|
+
'twitter',
|
|
13
|
+
'x',
|
|
14
|
+
'reddit',
|
|
15
|
+
'linkedin',
|
|
16
|
+
'snapchat',
|
|
17
|
+
'whatsapp',
|
|
18
|
+
'discord',
|
|
19
|
+
'twitch',
|
|
11
20
|
];
|
|
12
21
|
exports.entityTypesList = [
|
|
13
22
|
'profile',
|
|
@@ -225,6 +234,7 @@ exports.zodDataSchema = zod_1.z.object({
|
|
|
225
234
|
'article',
|
|
226
235
|
'link',
|
|
227
236
|
'document',
|
|
237
|
+
'text'
|
|
228
238
|
]).optional(),
|
|
229
239
|
// Content
|
|
230
240
|
data_text: zod_1.z.string().optional(),
|
|
@@ -289,8 +299,3 @@ exports.zodDataSchemaWithValidation = exports.zodDataSchema.refine((data) => {
|
|
|
289
299
|
message: "data_id is required for non-website platforms",
|
|
290
300
|
path: ["data_id"],
|
|
291
301
|
});
|
|
292
|
-
// Helper function to get allowed entities for a platform
|
|
293
|
-
const getAllowedEntitiesForPlatform = (platform) => {
|
|
294
|
-
return exports.platformEntityMap[platform];
|
|
295
|
-
};
|
|
296
|
-
exports.getAllowedEntitiesForPlatform = getAllowedEntitiesForPlatform;
|
package/index.ts
CHANGED
|
@@ -47,6 +47,7 @@ export const MongoDataSchema = new Schema(
|
|
|
47
47
|
'article',
|
|
48
48
|
'link',
|
|
49
49
|
'document',
|
|
50
|
+
'text'
|
|
50
51
|
],
|
|
51
52
|
},
|
|
52
53
|
|
|
@@ -218,13 +219,13 @@ export const MongoSourceSchema = new Schema(
|
|
|
218
219
|
title: { type: String }, // e.g., 'Telegram Channel Name'
|
|
219
220
|
platform: {
|
|
220
221
|
type: String,
|
|
221
|
-
enum: platformsList,
|
|
222
|
+
// enum: platformsList,
|
|
222
223
|
required: true,
|
|
223
224
|
},
|
|
224
225
|
entity: {
|
|
225
226
|
type: String,
|
|
226
|
-
enum: entityTypesList,
|
|
227
|
-
required: true,
|
|
227
|
+
// enum: entityTypesList,
|
|
228
|
+
// required: true,
|
|
228
229
|
}, // e.g., 'channel', 'group', 'page', 'profile', 'hashtag'
|
|
229
230
|
public_id: { type: Schema.Types.Mixed }, // e.g., '@telegram_channel_id'
|
|
230
231
|
url: { type: String }, // e.g., 'https://t.me/telegram_channel_name'
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -6,6 +6,15 @@ export const platformsList = [
|
|
|
6
6
|
'instagram',
|
|
7
7
|
'tiktok',
|
|
8
8
|
'website',
|
|
9
|
+
'youtube',
|
|
10
|
+
'twitter',
|
|
11
|
+
'x',
|
|
12
|
+
'reddit',
|
|
13
|
+
'linkedin',
|
|
14
|
+
'snapchat',
|
|
15
|
+
'whatsapp',
|
|
16
|
+
'discord',
|
|
17
|
+
'twitch',
|
|
9
18
|
] as const;
|
|
10
19
|
|
|
11
20
|
export const entityTypesList = [
|
|
@@ -245,6 +254,7 @@ export const zodDataSchema = z.object({
|
|
|
245
254
|
'article',
|
|
246
255
|
'link',
|
|
247
256
|
'document',
|
|
257
|
+
'text'
|
|
248
258
|
]).optional(),
|
|
249
259
|
|
|
250
260
|
// Content
|
|
@@ -342,14 +352,3 @@ export type FacebookMetadataType = z.infer<typeof facebookMetadataSchema>;
|
|
|
342
352
|
export type InstagramMetadataType = z.infer<typeof instagramMetadataSchema>;
|
|
343
353
|
export type TiktokMetadataType = z.infer<typeof tiktokMetadataSchema>;
|
|
344
354
|
export type WebsiteMetadataType = z.infer<typeof websiteMetadataSchema>;
|
|
345
|
-
|
|
346
|
-
// Helper type to get allowed entities for a specific platform
|
|
347
|
-
export type PlatformEntityType<T extends (typeof platformsList)[number]> =
|
|
348
|
-
(typeof platformEntityMap)[T][number];
|
|
349
|
-
|
|
350
|
-
// Helper function to get allowed entities for a platform
|
|
351
|
-
export const getAllowedEntitiesForPlatform = (
|
|
352
|
-
platform: (typeof platformsList)[number]
|
|
353
|
-
) => {
|
|
354
|
-
return platformEntityMap[platform];
|
|
355
|
-
};
|