harvester_sdk 1.0.34 → 1.0.36

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
@@ -652,3 +652,46 @@ export declare const MongoApiKeySchema: Schema<any, import("mongoose").Model<any
652
652
  } & {
653
653
  __v: number;
654
654
  }>;
655
+ export declare const MongoRegionSummarySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
656
+ versionKey: false;
657
+ toJSON: {
658
+ virtuals: true;
659
+ };
660
+ toObject: {
661
+ virtuals: true;
662
+ };
663
+ }, {
664
+ created_at: number;
665
+ updated_at: number;
666
+ questions: string[];
667
+ keywords: string[];
668
+ region_id?: string | null | undefined;
669
+ region_name?: string | null | undefined;
670
+ summary?: string | null | undefined;
671
+ start_date?: number | null | undefined;
672
+ end_date?: number | null | undefined;
673
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
674
+ created_at: number;
675
+ updated_at: number;
676
+ questions: string[];
677
+ keywords: string[];
678
+ region_id?: string | null | undefined;
679
+ region_name?: string | null | undefined;
680
+ summary?: string | null | undefined;
681
+ start_date?: number | null | undefined;
682
+ end_date?: number | null | undefined;
683
+ }>, {}> & import("mongoose").FlatRecord<{
684
+ created_at: number;
685
+ updated_at: number;
686
+ questions: string[];
687
+ keywords: string[];
688
+ region_id?: string | null | undefined;
689
+ region_name?: string | null | undefined;
690
+ summary?: string | null | undefined;
691
+ start_date?: number | null | undefined;
692
+ end_date?: number | null | undefined;
693
+ }> & {
694
+ _id: import("mongoose").Types.ObjectId;
695
+ } & {
696
+ __v: number;
697
+ }>;
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ 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.MongoApiKeySchema = exports.MongoGeoSelectionSchema = exports.MongoGeoSchema = exports.MongoSourceSchema = exports.MongoSourceGroupSchema = exports.MongoRegionSchema = exports.MongoDataSchema = exports.HarvesterSDKError = exports.createHarvesterSDK = exports.HarvesterSDK = void 0;
17
+ exports.MongoRegionSummarySchema = exports.MongoApiKeySchema = exports.MongoGeoSelectionSchema = exports.MongoGeoSchema = exports.MongoSourceSchema = exports.MongoSourceGroupSchema = exports.MongoRegionSchema = exports.MongoDataSchema = exports.HarvesterSDKError = exports.createHarvesterSDK = exports.HarvesterSDK = void 0;
18
18
  // Export types for consumers
19
19
  __exportStar(require("./types"), exports);
20
20
  // Export SDK
@@ -302,3 +302,18 @@ exports.MongoApiKeySchema = new mongoose_1.Schema({
302
302
  toJSON: { virtuals: true },
303
303
  toObject: { virtuals: true },
304
304
  });
305
+ exports.MongoRegionSummarySchema = new mongoose_1.Schema({
306
+ region_id: { type: String },
307
+ region_name: { type: String },
308
+ created_at: { type: Number, default: Date.now },
309
+ updated_at: { type: Number, default: Date.now },
310
+ questions: { type: [String], default: [] },
311
+ keywords: { type: [String], default: [] },
312
+ summary: { type: String },
313
+ start_date: { type: Number },
314
+ end_date: { type: Number }, // e.g., 1753812833000
315
+ }, {
316
+ versionKey: false,
317
+ toJSON: { virtuals: true },
318
+ toObject: { virtuals: true },
319
+ });
package/dist/types.d.ts CHANGED
@@ -50,6 +50,7 @@ export declare const zodSourceGroupSchema: z.ZodObject<{
50
50
  updated_at: z.ZodOptional<z.ZodNumber>;
51
51
  notes: z.ZodOptional<z.ZodString>;
52
52
  status: z.ZodOptional<z.ZodEnum<["active", "inactive", "deleted"]>>;
53
+ active_sources: z.ZodOptional<z.ZodNumber>;
53
54
  }, "strip", z.ZodTypeAny, {
54
55
  name: string;
55
56
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
@@ -61,6 +62,7 @@ export declare const zodSourceGroupSchema: z.ZodObject<{
61
62
  description?: string | undefined;
62
63
  region_id?: string | undefined;
63
64
  max_active_sources?: number | undefined;
65
+ active_sources?: number | undefined;
64
66
  }, {
65
67
  name: string;
66
68
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "youtube" | "twitter" | "x" | "reddit" | "linkedin" | "snapchat" | "whatsapp" | "discord" | "twitch";
@@ -72,6 +74,7 @@ export declare const zodSourceGroupSchema: z.ZodObject<{
72
74
  description?: string | undefined;
73
75
  region_id?: string | undefined;
74
76
  max_active_sources?: number | undefined;
77
+ active_sources?: number | undefined;
75
78
  }>;
76
79
  export declare const zodSourceSchema: z.ZodObject<{
77
80
  _id: z.ZodOptional<z.ZodString>;
@@ -1851,14 +1854,14 @@ export declare const zodDashboardStatsSchema: z.ZodObject<{
1851
1854
  total_sources: z.ZodOptional<z.ZodNumber>;
1852
1855
  }, "strip", z.ZodTypeAny, {
1853
1856
  region_id?: string | undefined;
1857
+ active_sources?: number | undefined;
1854
1858
  total_sources?: number | undefined;
1855
1859
  region_name?: string | undefined;
1856
- active_sources?: number | undefined;
1857
1860
  }, {
1858
1861
  region_id?: string | undefined;
1862
+ active_sources?: number | undefined;
1859
1863
  total_sources?: number | undefined;
1860
1864
  region_name?: string | undefined;
1861
- active_sources?: number | undefined;
1862
1865
  }>, "many">>;
1863
1866
  }, "strip", z.ZodTypeAny, {
1864
1867
  total_active_sources?: number | undefined;
@@ -1867,9 +1870,9 @@ export declare const zodDashboardStatsSchema: z.ZodObject<{
1867
1870
  total_groups?: number | undefined;
1868
1871
  regions?: {
1869
1872
  region_id?: string | undefined;
1873
+ active_sources?: number | undefined;
1870
1874
  total_sources?: number | undefined;
1871
1875
  region_name?: string | undefined;
1872
- active_sources?: number | undefined;
1873
1876
  }[] | undefined;
1874
1877
  }, {
1875
1878
  total_active_sources?: number | undefined;
@@ -1878,11 +1881,42 @@ export declare const zodDashboardStatsSchema: z.ZodObject<{
1878
1881
  total_groups?: number | undefined;
1879
1882
  regions?: {
1880
1883
  region_id?: string | undefined;
1884
+ active_sources?: number | undefined;
1881
1885
  total_sources?: number | undefined;
1882
1886
  region_name?: string | undefined;
1883
- active_sources?: number | undefined;
1884
1887
  }[] | undefined;
1885
1888
  }>;
1889
+ export declare const zodRegionSummarySchema: z.ZodObject<{
1890
+ region_id: z.ZodOptional<z.ZodString>;
1891
+ region_name: z.ZodOptional<z.ZodString>;
1892
+ created_at: z.ZodOptional<z.ZodNumber>;
1893
+ updated_at: z.ZodOptional<z.ZodNumber>;
1894
+ questions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1895
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1896
+ summary: z.ZodOptional<z.ZodString>;
1897
+ start_date: z.ZodOptional<z.ZodNumber>;
1898
+ end_date: z.ZodOptional<z.ZodNumber>;
1899
+ }, "strip", z.ZodTypeAny, {
1900
+ created_at?: number | undefined;
1901
+ updated_at?: number | undefined;
1902
+ region_id?: string | undefined;
1903
+ region_name?: string | undefined;
1904
+ questions?: string[] | undefined;
1905
+ keywords?: string[] | undefined;
1906
+ summary?: string | undefined;
1907
+ start_date?: number | undefined;
1908
+ end_date?: number | undefined;
1909
+ }, {
1910
+ created_at?: number | undefined;
1911
+ updated_at?: number | undefined;
1912
+ region_id?: string | undefined;
1913
+ region_name?: string | undefined;
1914
+ questions?: string[] | undefined;
1915
+ keywords?: string[] | undefined;
1916
+ summary?: string | undefined;
1917
+ start_date?: number | undefined;
1918
+ end_date?: number | undefined;
1919
+ }>;
1886
1920
  export type RegionType = z.infer<typeof zodRegionSchema>;
1887
1921
  export type SourceGroupType = z.infer<typeof zodSourceGroupSchema>;
1888
1922
  export type SourceType = z.infer<typeof zodSourceSchema>;
@@ -1893,6 +1927,7 @@ export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
1893
1927
  export type GeoType = z.infer<typeof zodGeoSchema>;
1894
1928
  export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
1895
1929
  export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
1930
+ export type RegionSummaryType = z.infer<typeof zodRegionSummarySchema>;
1896
1931
  export type TelegramMetadataType = z.infer<typeof telegramMetadataSchema>;
1897
1932
  export type FacebookMetadataType = z.infer<typeof facebookMetadataSchema>;
1898
1933
  export type InstagramMetadataType = z.infer<typeof instagramMetadataSchema>;
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zodDashboardStatsSchema = 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.zodRegionSummarySchema = exports.zodDashboardStatsSchema = 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',
@@ -71,6 +71,7 @@ exports.zodSourceGroupSchema = zod_1.z.object({
71
71
  updated_at: zod_1.z.number().optional(),
72
72
  notes: zod_1.z.string().optional(),
73
73
  status: zod_1.z.enum(exports.generalStatusList).optional(),
74
+ active_sources: zod_1.z.number().optional(), // e.g., current number of active sources
74
75
  });
75
76
  exports.zodSourceSchema = zod_1.z.object({
76
77
  _id: zod_1.z.string().optional(),
@@ -349,3 +350,14 @@ exports.zodDashboardStatsSchema = zod_1.z.object({
349
350
  }))
350
351
  .optional(),
351
352
  });
353
+ exports.zodRegionSummarySchema = zod_1.z.object({
354
+ region_id: zod_1.z.string().optional(),
355
+ region_name: zod_1.z.string().optional(),
356
+ created_at: zod_1.z.number().optional(),
357
+ updated_at: zod_1.z.number().optional(),
358
+ questions: zod_1.z.array(zod_1.z.string()).optional(),
359
+ keywords: zod_1.z.array(zod_1.z.string()).optional(),
360
+ summary: zod_1.z.string().optional(),
361
+ start_date: zod_1.z.number().optional(),
362
+ end_date: zod_1.z.number().optional(),
363
+ });
package/index.ts CHANGED
@@ -331,3 +331,22 @@ export const MongoApiKeySchema = new Schema(
331
331
  toObject: { virtuals: true },
332
332
  }
333
333
  );
334
+
335
+ export const MongoRegionSummarySchema = new Schema(
336
+ {
337
+ region_id: { type: String }, // e.g., region ID
338
+ region_name: { type: String }, // e.g., region name
339
+ created_at: { type: Number, default: Date.now }, // creation date
340
+ updated_at: { type: Number, default: Date.now }, // last update date
341
+ questions: { type: [String], default: [] }, // array of questions
342
+ keywords: { type: [String], default: [] }, // array of keywords
343
+ summary: { type: String }, // summary of the questions
344
+ start_date: { type: Number }, // e.g., 1751210833000
345
+ end_date: { type: Number }, // e.g., 1753812833000
346
+ },
347
+ {
348
+ versionKey: false,
349
+ toJSON: { virtuals: true },
350
+ toObject: { virtuals: true },
351
+ }
352
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harvester_sdk",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
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
@@ -76,6 +76,7 @@ export const zodSourceGroupSchema = z.object({
76
76
  updated_at: z.number().optional(), // last update date
77
77
  notes: z.string().optional(), // internal notes about the source group
78
78
  status: z.enum(generalStatusList).optional(),
79
+ active_sources: z.number().optional(), // e.g., current number of active sources
79
80
  });
80
81
 
81
82
  export const zodSourceSchema = z.object({
@@ -390,6 +391,18 @@ export const zodDashboardStatsSchema = z.object({
390
391
  .optional(),
391
392
  });
392
393
 
394
+ export const zodRegionSummarySchema = z.object({
395
+ region_id: z.string().optional(),
396
+ region_name: z.string().optional(),
397
+ created_at: z.number().optional(),
398
+ updated_at: z.number().optional(),
399
+ questions: z.array(z.string()).optional(),
400
+ keywords: z.array(z.string()).optional(),
401
+ summary: z.string().optional(),
402
+ start_date: z.number().optional(),
403
+ end_date: z.number().optional(),
404
+ })
405
+
393
406
  export type RegionType = z.infer<typeof zodRegionSchema>;
394
407
  export type SourceGroupType = z.infer<typeof zodSourceGroupSchema>;
395
408
  export type SourceType = z.infer<typeof zodSourceSchema>;
@@ -400,10 +413,11 @@ export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
400
413
  export type GeoType = z.infer<typeof zodGeoSchema>;
401
414
  export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
402
415
  export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
416
+ export type RegionSummaryType = z.infer<typeof zodRegionSummarySchema>;
403
417
 
404
418
  // Platform-specific metadata types
405
419
  export type TelegramMetadataType = z.infer<typeof telegramMetadataSchema>;
406
420
  export type FacebookMetadataType = z.infer<typeof facebookMetadataSchema>;
407
421
  export type InstagramMetadataType = z.infer<typeof instagramMetadataSchema>;
408
422
  export type TiktokMetadataType = z.infer<typeof tiktokMetadataSchema>;
409
- export type WebsiteMetadataType = z.infer<typeof websiteMetadataSchema>;
423
+ export type WebsiteMetadataType = z.infer<typeof websiteMetadataSchema>;