harvester_sdk 1.0.13 → 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 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;
@@ -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;
@@ -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;
@@ -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;
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>;
@@ -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;
@@ -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;
@@ -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>;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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.getAllowedEntitiesForPlatform = 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;
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',
@@ -290,8 +299,3 @@ exports.zodDataSchemaWithValidation = exports.zodDataSchema.refine((data) => {
290
299
  message: "data_id is required for non-website platforms",
291
300
  path: ["data_id"],
292
301
  });
293
- // Helper function to get allowed entities for a platform
294
- const getAllowedEntitiesForPlatform = (platform) => {
295
- return exports.platformEntityMap[platform];
296
- };
297
- exports.getAllowedEntitiesForPlatform = getAllowedEntitiesForPlatform;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harvester_sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "SDK for interacting with the Harvester API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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 = [
@@ -343,14 +352,3 @@ export type FacebookMetadataType = z.infer<typeof facebookMetadataSchema>;
343
352
  export type InstagramMetadataType = z.infer<typeof instagramMetadataSchema>;
344
353
  export type TiktokMetadataType = z.infer<typeof tiktokMetadataSchema>;
345
354
  export type WebsiteMetadataType = z.infer<typeof websiteMetadataSchema>;
346
-
347
- // Helper type to get allowed entities for a specific platform
348
- export type PlatformEntityType<T extends (typeof platformsList)[number]> =
349
- (typeof platformEntityMap)[T][number];
350
-
351
- // Helper function to get allowed entities for a platform
352
- export const getAllowedEntitiesForPlatform = (
353
- platform: (typeof platformsList)[number]
354
- ) => {
355
- return platformEntityMap[platform];
356
- };