harvester_sdk 1.0.4 → 1.0.6

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
@@ -241,15 +241,15 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
241
241
  virtuals: true;
242
242
  };
243
243
  }, {
244
- name: string;
245
244
  created_at: number;
246
245
  updated_at: number;
247
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
246
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
248
247
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
249
248
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
250
249
  tags: string[];
251
250
  is_public: boolean;
252
251
  metadata: any;
252
+ dominant_geos: string[];
253
253
  notes?: string | null | undefined;
254
254
  description?: string | null | undefined;
255
255
  region_id?: string | null | undefined;
@@ -266,15 +266,15 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
266
266
  requested_at?: number | null | undefined;
267
267
  } | null | undefined;
268
268
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
269
- name: string;
270
269
  created_at: number;
271
270
  updated_at: number;
272
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
271
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
273
272
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
274
273
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
275
274
  tags: string[];
276
275
  is_public: boolean;
277
276
  metadata: any;
277
+ dominant_geos: string[];
278
278
  notes?: string | null | undefined;
279
279
  description?: string | null | undefined;
280
280
  region_id?: string | null | undefined;
@@ -291,15 +291,15 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
291
291
  requested_at?: number | null | undefined;
292
292
  } | null | undefined;
293
293
  }>, {}> & import("mongoose").FlatRecord<{
294
- name: string;
295
294
  created_at: number;
296
295
  updated_at: number;
297
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
296
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
298
297
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
299
298
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
300
299
  tags: string[];
301
300
  is_public: boolean;
302
301
  metadata: any;
302
+ dominant_geos: string[];
303
303
  notes?: string | null | undefined;
304
304
  description?: string | null | undefined;
305
305
  region_id?: string | null | undefined;
package/dist/index.js CHANGED
@@ -115,7 +115,6 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
115
115
  required: true,
116
116
  },
117
117
  public_id: { type: mongoose_1.Schema.Types.Mixed },
118
- name: { type: String, required: true },
119
118
  url: { type: String },
120
119
  description: { type: String },
121
120
  language: { type: String },
@@ -131,6 +130,7 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
131
130
  updated_at: { type: Number, default: Date.now },
132
131
  region_id: { type: String },
133
132
  group_id: { type: String },
133
+ dominant_geos: { type: [String], default: [] },
134
134
  requested_by: {
135
135
  type: {
136
136
  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>;
@@ -78,18 +78,18 @@ export declare const zodSourceSchema: z.ZodObject<{
78
78
  platform: z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website"]>;
79
79
  entity: z.ZodEnum<["profile", "group", "page", "channel", "hashtag", "website"]>;
80
80
  public_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
81
- name: z.ZodString;
82
81
  url: z.ZodOptional<z.ZodString>;
83
82
  description: z.ZodOptional<z.ZodString>;
84
83
  language: z.ZodOptional<z.ZodString>;
85
84
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
- status: z.ZodEnum<["active", "pending", "inactive", "requested", "deleted"]>;
85
+ status: z.ZodEnum<["active", "pending", "inactive", "requested", "discovered", "deleted"]>;
87
86
  is_public: z.ZodDefault<z.ZodBoolean>;
88
87
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
89
88
  created_at: z.ZodOptional<z.ZodNumber>;
90
89
  updated_at: z.ZodOptional<z.ZodNumber>;
91
90
  region_id: z.ZodOptional<z.ZodString>;
92
91
  group_id: z.ZodOptional<z.ZodString>;
92
+ dominant_geos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
93
  requested_by: z.ZodOptional<z.ZodObject<{
94
94
  user_id: z.ZodOptional<z.ZodString>;
95
95
  username: z.ZodOptional<z.ZodString>;
@@ -111,8 +111,7 @@ export declare const zodSourceSchema: z.ZodObject<{
111
111
  }>>;
112
112
  notes: z.ZodOptional<z.ZodString>;
113
113
  }, "strip", z.ZodTypeAny, {
114
- name: string;
115
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
114
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
116
115
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
117
116
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
118
117
  is_public: boolean;
@@ -129,6 +128,7 @@ export declare const zodSourceSchema: z.ZodObject<{
129
128
  tags?: string[] | undefined;
130
129
  metadata?: Record<string, any> | undefined;
131
130
  group_id?: string | undefined;
131
+ dominant_geos?: string[] | undefined;
132
132
  requested_by?: {
133
133
  user_id?: string | undefined;
134
134
  username?: string | undefined;
@@ -137,8 +137,7 @@ export declare const zodSourceSchema: z.ZodObject<{
137
137
  requested_at?: number | undefined;
138
138
  } | undefined;
139
139
  }, {
140
- name: string;
141
- status: "active" | "pending" | "inactive" | "requested" | "deleted";
140
+ status: "active" | "pending" | "inactive" | "requested" | "discovered" | "deleted";
142
141
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website";
143
142
  entity: "website" | "profile" | "group" | "page" | "channel" | "hashtag";
144
143
  _id?: string | undefined;
@@ -155,6 +154,7 @@ export declare const zodSourceSchema: z.ZodObject<{
155
154
  is_public?: boolean | undefined;
156
155
  metadata?: Record<string, any> | undefined;
157
156
  group_id?: string | undefined;
157
+ dominant_geos?: string[] | undefined;
158
158
  requested_by?: {
159
159
  user_id?: string | undefined;
160
160
  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'];
@@ -61,7 +62,6 @@ exports.zodSourceSchema = zod_1.z.object({
61
62
  platform: zod_1.z.enum(exports.platformsList),
62
63
  entity: zod_1.z.enum(exports.entityTypesList),
63
64
  public_id: zod_1.z.string().or(zod_1.z.number()).optional(),
64
- name: zod_1.z.string(),
65
65
  url: zod_1.z.string().url().optional(),
66
66
  description: zod_1.z.string().optional(),
67
67
  language: zod_1.z.string().optional(),
@@ -73,6 +73,7 @@ exports.zodSourceSchema = zod_1.z.object({
73
73
  updated_at: zod_1.z.number().optional(),
74
74
  region_id: zod_1.z.string().optional(),
75
75
  group_id: zod_1.z.string().optional(),
76
+ dominant_geos: zod_1.z.array(zod_1.z.string()).optional(),
76
77
  requested_by: zod_1.z
77
78
  .object({
78
79
  user_id: zod_1.z.string().optional(),
package/index.ts CHANGED
@@ -119,7 +119,6 @@ export const MongoSourceSchema = new Schema(
119
119
  required: true,
120
120
  }, // e.g., 'channel', 'group', 'page', 'profile', 'hashtag'
121
121
  public_id: { type: Schema.Types.Mixed }, // e.g., '@telegram_channel_id'
122
- name: { type: String, required: true }, // e.g., 'Telegram Channel Name'
123
122
  url: { type: String }, // e.g., 'https://t.me/telegram_channel_name'
124
123
  description: { type: String }, // e.g., 'A channel about news and updates'
125
124
  language: { type: String },
@@ -135,6 +134,7 @@ export const MongoSourceSchema = new Schema(
135
134
  updated_at: { type: Number, default: Date.now },
136
135
  region_id: { type: String }, // e.g., region ID
137
136
  group_id: { type: String }, // e.g., source group ID
137
+ dominant_geos: { type: [String], default: [] }, // e.g., dominant geos associated with this source
138
138
  requested_by: {
139
139
  type: {
140
140
  user_id: { type: String },
@@ -146,7 +146,7 @@ export const MongoSourceSchema = new Schema(
146
146
  default: undefined,
147
147
  }, // user who requested this source
148
148
  notes: { type: String }, // internal notes about the source
149
-
149
+
150
150
  },
151
151
  {
152
152
  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.6",
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,10 +64,9 @@ 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
- name: z.string(), // e.g., 'Telegram Channel Name'
70
70
  url: z.string().url().optional(), // e.g., 'https://t.me/telegram_channel_name'
71
71
  description: z.string().optional(), // e.g., 'A channel about news and updates'
72
72
  language: z.string().optional(),
@@ -76,8 +76,9 @@ export const zodSourceSchema = z.object({
76
76
  metadata: z.record(z.string(), z.any()).optional(), // flexible per platform
77
77
  created_at: z.number().optional(),
78
78
  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
79
+ region_id: z.string().optional(), // e.g., region ID // INDEX
80
+ group_id: z.string().optional(), // e.g., source group ID // INDEX
81
+ dominant_geos: z.array(z.string()).optional(), // e.g., dominant geos associated with this source
81
82
  requested_by: z
82
83
  .object({
83
84
  user_id: z.string().optional(),