harvester_sdk 1.0.21 → 1.0.23

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
@@ -585,29 +585,35 @@ export declare const MongoGeoSelectionSchema: Schema<any, import("mongoose").Mod
585
585
  virtuals: true;
586
586
  };
587
587
  }, {
588
+ status: "active" | "inactive" | "deleted";
588
589
  geos: string[];
589
590
  created_at?: number | null | undefined;
590
591
  updated_at?: number | null | undefined;
592
+ notes?: string | null | undefined;
591
593
  type?: string | null | undefined;
592
594
  description?: string | null | undefined;
595
+ region_id?: string | null | undefined;
593
596
  title?: string | null | undefined;
594
- region?: string | null | undefined;
595
597
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
598
+ status: "active" | "inactive" | "deleted";
596
599
  geos: string[];
597
600
  created_at?: number | null | undefined;
598
601
  updated_at?: number | null | undefined;
602
+ notes?: string | null | undefined;
599
603
  type?: string | null | undefined;
600
604
  description?: string | null | undefined;
605
+ region_id?: string | null | undefined;
601
606
  title?: string | null | undefined;
602
- region?: string | null | undefined;
603
607
  }>, {}> & import("mongoose").FlatRecord<{
608
+ status: "active" | "inactive" | "deleted";
604
609
  geos: string[];
605
610
  created_at?: number | null | undefined;
606
611
  updated_at?: number | null | undefined;
612
+ notes?: string | null | undefined;
607
613
  type?: string | null | undefined;
608
614
  description?: string | null | undefined;
615
+ region_id?: string | null | undefined;
609
616
  title?: string | null | undefined;
610
- region?: string | null | undefined;
611
617
  }> & {
612
618
  _id: import("mongoose").Types.ObjectId;
613
619
  } & {
package/dist/index.js CHANGED
@@ -267,7 +267,13 @@ exports.MongoGeoSelectionSchema = new mongoose_1.Schema({
267
267
  description: { type: String },
268
268
  type: { type: String },
269
269
  geos: { type: [String], default: [] },
270
- region: { type: String },
270
+ region_id: { type: String },
271
+ notes: { type: String },
272
+ status: {
273
+ type: String,
274
+ enum: types_1.generalStatusList,
275
+ default: 'active',
276
+ },
271
277
  created_at: { type: Number },
272
278
  updated_at: { type: Number }, // last update date
273
279
  }, {
package/dist/types.d.ts CHANGED
@@ -236,26 +236,32 @@ export declare const zodGeoSelectionSchema: z.ZodObject<{
236
236
  description: z.ZodOptional<z.ZodString>;
237
237
  type: z.ZodOptional<z.ZodString>;
238
238
  geos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
239
- region: z.ZodOptional<z.ZodString>;
239
+ region_id: z.ZodOptional<z.ZodString>;
240
+ notes: z.ZodOptional<z.ZodString>;
241
+ status: z.ZodOptional<z.ZodEnum<["active", "inactive", "deleted"]>>;
240
242
  created_at: z.ZodOptional<z.ZodNumber>;
241
243
  updated_at: z.ZodOptional<z.ZodNumber>;
242
244
  }, "strip", z.ZodTypeAny, {
243
245
  _id?: string | undefined;
244
246
  created_at?: number | undefined;
245
247
  updated_at?: number | undefined;
248
+ status?: "active" | "inactive" | "deleted" | undefined;
249
+ notes?: string | undefined;
246
250
  type?: string | undefined;
247
251
  description?: string | undefined;
252
+ region_id?: string | undefined;
248
253
  title?: string | undefined;
249
- region?: string | undefined;
250
254
  geos?: string[] | undefined;
251
255
  }, {
252
256
  _id?: string | undefined;
253
257
  created_at?: number | undefined;
254
258
  updated_at?: number | undefined;
259
+ status?: "active" | "inactive" | "deleted" | undefined;
260
+ notes?: string | undefined;
255
261
  type?: string | undefined;
256
262
  description?: string | undefined;
263
+ region_id?: string | undefined;
257
264
  title?: string | undefined;
258
- region?: string | undefined;
259
265
  geos?: string[] | undefined;
260
266
  }>;
261
267
  export declare const telegramMetadataSchema: z.ZodObject<{
@@ -1833,6 +1839,50 @@ export declare const zodDataSchemaWithValidation: z.ZodEffects<z.ZodObject<{
1833
1839
  processing_status?: "raw" | "processed" | "error" | undefined;
1834
1840
  processing_errors?: string | undefined;
1835
1841
  }>;
1842
+ export declare const zodDashboardStatsSchema: z.ZodObject<{
1843
+ total_active_sources: z.ZodOptional<z.ZodNumber>;
1844
+ total_discovered_sources: z.ZodOptional<z.ZodNumber>;
1845
+ total_sources: z.ZodOptional<z.ZodNumber>;
1846
+ total_groups: z.ZodOptional<z.ZodNumber>;
1847
+ regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1848
+ region_id: z.ZodOptional<z.ZodString>;
1849
+ region_name: z.ZodOptional<z.ZodString>;
1850
+ active_sources: z.ZodOptional<z.ZodNumber>;
1851
+ total_sources: z.ZodOptional<z.ZodNumber>;
1852
+ }, "strip", z.ZodTypeAny, {
1853
+ region_id?: string | undefined;
1854
+ total_sources?: number | undefined;
1855
+ region_name?: string | undefined;
1856
+ active_sources?: number | undefined;
1857
+ }, {
1858
+ region_id?: string | undefined;
1859
+ total_sources?: number | undefined;
1860
+ region_name?: string | undefined;
1861
+ active_sources?: number | undefined;
1862
+ }>, "many">>;
1863
+ }, "strip", z.ZodTypeAny, {
1864
+ total_active_sources?: number | undefined;
1865
+ total_discovered_sources?: number | undefined;
1866
+ total_sources?: number | undefined;
1867
+ total_groups?: number | undefined;
1868
+ regions?: {
1869
+ region_id?: string | undefined;
1870
+ total_sources?: number | undefined;
1871
+ region_name?: string | undefined;
1872
+ active_sources?: number | undefined;
1873
+ }[] | undefined;
1874
+ }, {
1875
+ total_active_sources?: number | undefined;
1876
+ total_discovered_sources?: number | undefined;
1877
+ total_sources?: number | undefined;
1878
+ total_groups?: number | undefined;
1879
+ regions?: {
1880
+ region_id?: string | undefined;
1881
+ total_sources?: number | undefined;
1882
+ region_name?: string | undefined;
1883
+ active_sources?: number | undefined;
1884
+ }[] | undefined;
1885
+ }>;
1836
1886
  export type RegionType = z.infer<typeof zodRegionSchema>;
1837
1887
  export type SourceGroupType = z.infer<typeof zodSourceGroupSchema>;
1838
1888
  export type SourceType = z.infer<typeof zodSourceSchema>;
@@ -1842,6 +1892,7 @@ export type AuthorType = z.infer<typeof authorSchema>;
1842
1892
  export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
1843
1893
  export type GeoType = z.infer<typeof zodGeoSchema>;
1844
1894
  export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
1895
+ export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
1845
1896
  export type TelegramMetadataType = z.infer<typeof telegramMetadataSchema>;
1846
1897
  export type FacebookMetadataType = z.infer<typeof facebookMetadataSchema>;
1847
1898
  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.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.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',
@@ -127,7 +127,9 @@ exports.zodGeoSelectionSchema = zod_1.z.object({
127
127
  description: zod_1.z.string().optional(),
128
128
  type: zod_1.z.string().optional(),
129
129
  geos: zod_1.z.array(zod_1.z.string()).optional(),
130
- region: zod_1.z.string().optional(),
130
+ region_id: zod_1.z.string().optional(),
131
+ notes: zod_1.z.string().optional(),
132
+ status: zod_1.z.enum(exports.generalStatusList).optional(),
131
133
  created_at: zod_1.z.number().optional(),
132
134
  updated_at: zod_1.z.number().optional(), // last update date
133
135
  });
@@ -333,3 +335,17 @@ exports.zodDataSchemaWithValidation = exports.zodDataSchema.refine((data) => {
333
335
  message: 'data_id is required for non-website platforms',
334
336
  path: ['data_id'],
335
337
  });
338
+ exports.zodDashboardStatsSchema = zod_1.z.object({
339
+ total_active_sources: zod_1.z.number().optional(),
340
+ total_discovered_sources: zod_1.z.number().optional(),
341
+ total_sources: zod_1.z.number().optional(),
342
+ total_groups: zod_1.z.number().optional(),
343
+ regions: zod_1.z
344
+ .array(zod_1.z.object({
345
+ region_id: zod_1.z.string().optional(),
346
+ region_name: zod_1.z.string().optional(),
347
+ active_sources: zod_1.z.number().optional(),
348
+ total_sources: zod_1.z.number().optional(),
349
+ }))
350
+ .optional(),
351
+ });
package/index.ts CHANGED
@@ -292,7 +292,13 @@ export const MongoGeoSelectionSchema = new Schema(
292
292
  description: { type: String }, // e.g., "A city in the USA"
293
293
  type: { type: String }, // e.g., "city", "region", "country"
294
294
  geos: { type: [String], default: [] }, // e.g., ["New York", "Los Angeles"]
295
- region: { type: String }, // e.g., "New York", "California"
295
+ region_id: { type: String }, // e.g., region ID
296
+ notes: { type: String }, // internal notes about the geo selection
297
+ status: {
298
+ type: String,
299
+ enum: generalStatusList,
300
+ default: 'active',
301
+ },
296
302
  created_at: { type: Number }, // creation date
297
303
  updated_at: { type: Number }, // last update date
298
304
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harvester_sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
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
@@ -137,7 +137,9 @@ export const zodGeoSelectionSchema = z.object({
137
137
  description: z.string().optional(), // e.g., "A city in the USA"
138
138
  type: z.string().optional(), // e.g., "city", "region", "country"
139
139
  geos: z.array(z.string()).optional(), // e.g., ["New York", "Los Angeles"]
140
- region: z.string().optional(), // e.g., "New York", "California"
140
+ region_id: z.string().optional(), // e.g., region ID
141
+ notes: z.string().optional(), // internal notes about the geo selection
142
+ status: z.enum(generalStatusList).optional(),
141
143
  created_at: z.number().optional(), // creation date
142
144
  updated_at: z.number().optional(), // last update date
143
145
  });
@@ -371,6 +373,23 @@ export const zodDataSchemaWithValidation = zodDataSchema.refine(
371
373
  }
372
374
  );
373
375
 
376
+ export const zodDashboardStatsSchema = z.object({
377
+ total_active_sources: z.number().optional(),
378
+ total_discovered_sources: z.number().optional(),
379
+ total_sources: z.number().optional(),
380
+ total_groups: z.number().optional(),
381
+ regions: z
382
+ .array(
383
+ z.object({
384
+ region_id: z.string().optional(),
385
+ region_name: z.string().optional(),
386
+ active_sources: z.number().optional(),
387
+ total_sources: z.number().optional(),
388
+ })
389
+ )
390
+ .optional(),
391
+ });
392
+
374
393
  export type RegionType = z.infer<typeof zodRegionSchema>;
375
394
  export type SourceGroupType = z.infer<typeof zodSourceGroupSchema>;
376
395
  export type SourceType = z.infer<typeof zodSourceSchema>;
@@ -380,6 +399,7 @@ export type AuthorType = z.infer<typeof authorSchema>;
380
399
  export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
381
400
  export type GeoType = z.infer<typeof zodGeoSchema>;
382
401
  export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
402
+ export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
383
403
 
384
404
  // Platform-specific metadata types
385
405
  export type TelegramMetadataType = z.infer<typeof telegramMetadataSchema>;