harvester_sdk 1.0.4 → 1.0.5

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
@@ -244,12 +244,13 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
244
244
  name: string;
245
245
  created_at: number;
246
246
  updated_at: number;
247
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
247
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
248
248
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
249
249
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
250
250
  tags: string[];
251
251
  is_public: boolean;
252
252
  metadata: any;
253
+ dominant_geos: string[];
253
254
  notes?: string | null | undefined;
254
255
  description?: string | null | undefined;
255
256
  region_id?: string | null | undefined;
@@ -269,12 +270,13 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
269
270
  name: string;
270
271
  created_at: number;
271
272
  updated_at: number;
272
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
273
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
273
274
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
274
275
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
275
276
  tags: string[];
276
277
  is_public: boolean;
277
278
  metadata: any;
279
+ dominant_geos: string[];
278
280
  notes?: string | null | undefined;
279
281
  description?: string | null | undefined;
280
282
  region_id?: string | null | undefined;
@@ -294,12 +296,13 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
294
296
  name: string;
295
297
  created_at: number;
296
298
  updated_at: number;
297
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
299
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
298
300
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
299
301
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
300
302
  tags: string[];
301
303
  is_public: boolean;
302
304
  metadata: any;
305
+ dominant_geos: string[];
303
306
  notes?: string | null | undefined;
304
307
  description?: string | null | undefined;
305
308
  region_id?: string | null | undefined;
package/dist/index.js CHANGED
@@ -131,6 +131,7 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
131
131
  updated_at: { type: Number, default: Date.now },
132
132
  region_id: { type: String },
133
133
  group_id: { type: String },
134
+ dominant_geos: { type: [String], default: [] },
134
135
  requested_by: {
135
136
  type: {
136
137
  user_id: { type: String },
package/dist/types.d.ts CHANGED
@@ -8,7 +8,7 @@ export declare const platformEntityMap: {
8
8
  readonly tiktok: readonly ["profile", "hashtag"];
9
9
  readonly website: readonly ["website"];
10
10
  };
11
- export declare const sourceStatusList: readonly ["active", "pending", "inactive", "requested", "deleted"];
11
+ export declare const sourceStatusList: readonly ["active", "pending", "inactive", "requested", "discovered", "deleted"];
12
12
  export declare const generalStatusList: readonly ["active", "inactive", "deleted"];
13
13
  export declare const zodRegionSchema: z.ZodObject<{
14
14
  _id: z.ZodOptional<z.ZodString>;
@@ -83,13 +83,14 @@ export declare const zodSourceSchema: z.ZodObject<{
83
83
  description: z.ZodOptional<z.ZodString>;
84
84
  language: z.ZodOptional<z.ZodString>;
85
85
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
- status: z.ZodEnum<["active", "pending", "inactive", "requested", "deleted"]>;
86
+ status: z.ZodEnum<["active", "pending", "inactive", "requested", "discovered", "deleted"]>;
87
87
  is_public: z.ZodDefault<z.ZodBoolean>;
88
88
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
89
89
  created_at: z.ZodOptional<z.ZodNumber>;
90
90
  updated_at: z.ZodOptional<z.ZodNumber>;
91
91
  region_id: z.ZodOptional<z.ZodString>;
92
92
  group_id: z.ZodOptional<z.ZodString>;
93
+ dominant_geos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
94
  requested_by: z.ZodOptional<z.ZodObject<{
94
95
  user_id: z.ZodOptional<z.ZodString>;
95
96
  username: z.ZodOptional<z.ZodString>;
@@ -112,7 +113,7 @@ export declare const zodSourceSchema: z.ZodObject<{
112
113
  notes: z.ZodOptional<z.ZodString>;
113
114
  }, "strip", z.ZodTypeAny, {
114
115
  name: string;
115
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
116
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
116
117
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
117
118
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
118
119
  is_public: boolean;
@@ -129,6 +130,7 @@ export declare const zodSourceSchema: z.ZodObject<{
129
130
  tags?: string[] | undefined;
130
131
  metadata?: Record<string, any> | undefined;
131
132
  group_id?: string | undefined;
133
+ dominant_geos?: string[] | undefined;
132
134
  requested_by?: {
133
135
  user_id?: string | undefined;
134
136
  username?: string | undefined;
@@ -138,7 +140,7 @@ export declare const zodSourceSchema: z.ZodObject<{
138
140
  } | undefined;
139
141
  }, {
140
142
  name: string;
141
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
143
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
142
144
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
143
145
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
144
146
  _id?: string | undefined;
@@ -155,6 +157,7 @@ export declare const zodSourceSchema: z.ZodObject<{
155
157
  is_public?: boolean | undefined;
156
158
  metadata?: Record<string, any> | undefined;
157
159
  group_id?: string | undefined;
160
+ dominant_geos?: string[] | undefined;
158
161
  requested_by?: {
159
162
  user_id?: string | undefined;
160
163
  username?: string | undefined;
package/dist/types.js CHANGED
@@ -30,6 +30,7 @@ exports.sourceStatusList = [
30
30
  'pending',
31
31
  'inactive',
32
32
  'requested',
33
+ 'discovered',
33
34
  'deleted', // sources that have been deleted
34
35
  ];
35
36
  exports.generalStatusList = ['active', 'inactive', 'deleted'];
@@ -73,6 +74,7 @@ exports.zodSourceSchema = zod_1.z.object({
73
74
  updated_at: zod_1.z.number().optional(),
74
75
  region_id: zod_1.z.string().optional(),
75
76
  group_id: zod_1.z.string().optional(),
77
+ dominant_geos: zod_1.z.array(zod_1.z.string()).optional(),
76
78
  requested_by: zod_1.z
77
79
  .object({
78
80
  user_id: zod_1.z.string().optional(),
package/index.ts CHANGED
@@ -135,6 +135,7 @@ export const MongoSourceSchema = new Schema(
135
135
  updated_at: { type: Number, default: Date.now },
136
136
  region_id: { type: String }, // e.g., region ID
137
137
  group_id: { type: String }, // e.g., source group ID
138
+ dominant_geos: { type: [String], default: [] }, // e.g., dominant geos associated with this source
138
139
  requested_by: {
139
140
  type: {
140
141
  user_id: { type: String },
@@ -146,7 +147,7 @@ export const MongoSourceSchema = new Schema(
146
147
  default: undefined,
147
148
  }, // user who requested this source
148
149
  notes: { type: String }, // internal notes about the source
149
-
150
+
150
151
  },
151
152
  {
152
153
  versionKey: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harvester_sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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
@@ -31,6 +31,7 @@ export const sourceStatusList = [
31
31
  'pending', // sources that are pending approval
32
32
  'inactive', // sources that are inactive
33
33
  'requested', // sources that are under review
34
+ 'discovered', // sources that have been discovered from an autopilot mode
34
35
  'deleted', // sources that have been deleted
35
36
  ] as const;
36
37
 
@@ -63,7 +64,7 @@ export const zodSourceGroupSchema = z.object({
63
64
  export const zodSourceSchema = z.object({
64
65
  _id: z.string().optional(),
65
66
  title: z.string().optional(), // e.g., 'Telegram Channel Name'
66
- platform: z.enum(platformsList), // e.g., 'telegram', 'facebook'
67
+ platform: z.enum(platformsList), // e.g., 'telegram', 'facebook' // INDEX
67
68
  entity: z.enum(entityTypesList), // e.g., 'channel', 'group', 'page', 'profile', 'hashtag'
68
69
  public_id: z.string().or(z.number()).optional(), // e.g., '@telegram_channel_id'
69
70
  name: z.string(), // e.g., 'Telegram Channel Name'
@@ -76,8 +77,9 @@ export const zodSourceSchema = z.object({
76
77
  metadata: z.record(z.string(), z.any()).optional(), // flexible per platform
77
78
  created_at: z.number().optional(),
78
79
  updated_at: z.number().optional(),
79
- region_id: z.string().optional(), // e.g., region ID
80
- group_id: z.string().optional(), // e.g., source group ID
80
+ region_id: z.string().optional(), // e.g., region ID // INDEX
81
+ group_id: z.string().optional(), // e.g., source group ID // INDEX
82
+ dominant_geos: z.array(z.string()).optional(), // e.g., dominant geos associated with this source
81
83
  requested_by: z
82
84
  .object({
83
85
  user_id: z.string().optional(),