harvester_sdk 1.0.55 → 1.0.57
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 +43 -0
- package/dist/index.js +16 -1
- package/dist/types.d.ts +40 -0
- package/dist/types.js +13 -1
- package/index.ts +21 -0
- package/package.json +1 -1
- package/types.ts +15 -1
package/dist/index.d.ts
CHANGED
|
@@ -615,6 +615,7 @@ export declare const MongoGeoSelectionSchema: Schema<any, import("mongoose").Mod
|
|
|
615
615
|
description?: string | null | undefined;
|
|
616
616
|
region_id?: string | null | undefined;
|
|
617
617
|
title?: string | null | undefined;
|
|
618
|
+
geo_selection_group_id?: string | null | undefined;
|
|
618
619
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
619
620
|
status: "active" | "inactive" | "deleted";
|
|
620
621
|
geos: string[];
|
|
@@ -629,6 +630,7 @@ export declare const MongoGeoSelectionSchema: Schema<any, import("mongoose").Mod
|
|
|
629
630
|
description?: string | null | undefined;
|
|
630
631
|
region_id?: string | null | undefined;
|
|
631
632
|
title?: string | null | undefined;
|
|
633
|
+
geo_selection_group_id?: string | null | undefined;
|
|
632
634
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
633
635
|
status: "active" | "inactive" | "deleted";
|
|
634
636
|
geos: string[];
|
|
@@ -643,6 +645,7 @@ export declare const MongoGeoSelectionSchema: Schema<any, import("mongoose").Mod
|
|
|
643
645
|
description?: string | null | undefined;
|
|
644
646
|
region_id?: string | null | undefined;
|
|
645
647
|
title?: string | null | undefined;
|
|
648
|
+
geo_selection_group_id?: string | null | undefined;
|
|
646
649
|
}> & {
|
|
647
650
|
_id: import("mongoose").Types.ObjectId;
|
|
648
651
|
} & {
|
|
@@ -925,3 +928,43 @@ export declare const MongoEventSchema: Schema<any, import("mongoose").Model<any,
|
|
|
925
928
|
} & {
|
|
926
929
|
__v: number;
|
|
927
930
|
}>;
|
|
931
|
+
export declare const MongoGeoSelectionGroupSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
932
|
+
versionKey: false;
|
|
933
|
+
toJSON: {
|
|
934
|
+
virtuals: true;
|
|
935
|
+
};
|
|
936
|
+
toObject: {
|
|
937
|
+
virtuals: true;
|
|
938
|
+
};
|
|
939
|
+
}, {
|
|
940
|
+
slug: string;
|
|
941
|
+
created_at: number;
|
|
942
|
+
updated_at: number;
|
|
943
|
+
notes?: string | null | undefined;
|
|
944
|
+
description?: string | null | undefined;
|
|
945
|
+
region_id?: string | null | undefined;
|
|
946
|
+
user_id?: string | null | undefined;
|
|
947
|
+
limit?: number | null | undefined;
|
|
948
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
949
|
+
slug: string;
|
|
950
|
+
created_at: number;
|
|
951
|
+
updated_at: number;
|
|
952
|
+
notes?: string | null | undefined;
|
|
953
|
+
description?: string | null | undefined;
|
|
954
|
+
region_id?: string | null | undefined;
|
|
955
|
+
user_id?: string | null | undefined;
|
|
956
|
+
limit?: number | null | undefined;
|
|
957
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
958
|
+
slug: string;
|
|
959
|
+
created_at: number;
|
|
960
|
+
updated_at: number;
|
|
961
|
+
notes?: string | null | undefined;
|
|
962
|
+
description?: string | null | undefined;
|
|
963
|
+
region_id?: string | null | undefined;
|
|
964
|
+
user_id?: string | null | undefined;
|
|
965
|
+
limit?: number | null | undefined;
|
|
966
|
+
}> & {
|
|
967
|
+
_id: import("mongoose").Types.ObjectId;
|
|
968
|
+
} & {
|
|
969
|
+
__v: number;
|
|
970
|
+
}>;
|
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.MongoEventSchema = exports.MongoServerReportSchema = exports.MongoRegionSummarySchema = exports.MongoApiKeySchema = exports.MongoGeoSelectionSchema = exports.MongoGeoSchema = exports.MongoSourceSchema = exports.MongoSourceGroupSchema = exports.MongoRegionSchema = exports.MongoDataSchema = exports.HarvesterSDKError = exports.createHarvesterSDK = exports.HarvesterSDK = void 0;
|
|
17
|
+
exports.MongoGeoSelectionGroupSchema = exports.MongoEventSchema = exports.MongoServerReportSchema = 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
|
|
@@ -274,6 +274,7 @@ exports.MongoGeoSchema = new mongoose_1.Schema({
|
|
|
274
274
|
toObject: { virtuals: true },
|
|
275
275
|
});
|
|
276
276
|
exports.MongoGeoSelectionSchema = new mongoose_1.Schema({
|
|
277
|
+
geo_selection_group_id: { type: String },
|
|
277
278
|
title: { type: String },
|
|
278
279
|
description: { type: String },
|
|
279
280
|
type: { type: String },
|
|
@@ -378,3 +379,17 @@ exports.MongoEventSchema = new mongoose_1.Schema({
|
|
|
378
379
|
toJSON: { virtuals: true },
|
|
379
380
|
toObject: { virtuals: true },
|
|
380
381
|
});
|
|
382
|
+
exports.MongoGeoSelectionGroupSchema = new mongoose_1.Schema({
|
|
383
|
+
region_id: { type: String },
|
|
384
|
+
slug: { type: String, required: true },
|
|
385
|
+
description: { type: String },
|
|
386
|
+
created_at: { type: Number, default: Date.now },
|
|
387
|
+
updated_at: { type: Number, default: Date.now },
|
|
388
|
+
notes: { type: String },
|
|
389
|
+
limit: { type: Number },
|
|
390
|
+
user_id: { type: String }, // optional user ID of the creator/owner of this group
|
|
391
|
+
}, {
|
|
392
|
+
versionKey: false,
|
|
393
|
+
toJSON: { virtuals: true },
|
|
394
|
+
toObject: { virtuals: true },
|
|
395
|
+
});
|
package/dist/types.d.ts
CHANGED
|
@@ -284,8 +284,40 @@ export declare const zodGeoSchema: z.ZodObject<{
|
|
|
284
284
|
subscribers?: string[] | undefined;
|
|
285
285
|
is_used?: boolean | undefined;
|
|
286
286
|
}>;
|
|
287
|
+
export declare const zodGeoSelectionGroupSchema: z.ZodObject<{
|
|
288
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
289
|
+
region_id: z.ZodString;
|
|
290
|
+
slug: z.ZodString;
|
|
291
|
+
description: z.ZodOptional<z.ZodString>;
|
|
292
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
295
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
|
298
|
+
slug: string;
|
|
299
|
+
region_id: string;
|
|
300
|
+
_id?: string | undefined;
|
|
301
|
+
created_at?: number | undefined;
|
|
302
|
+
updated_at?: number | undefined;
|
|
303
|
+
notes?: string | undefined;
|
|
304
|
+
description?: string | undefined;
|
|
305
|
+
user_id?: string | undefined;
|
|
306
|
+
limit?: number | undefined;
|
|
307
|
+
}, {
|
|
308
|
+
slug: string;
|
|
309
|
+
region_id: string;
|
|
310
|
+
_id?: string | undefined;
|
|
311
|
+
created_at?: number | undefined;
|
|
312
|
+
updated_at?: number | undefined;
|
|
313
|
+
notes?: string | undefined;
|
|
314
|
+
description?: string | undefined;
|
|
315
|
+
user_id?: string | undefined;
|
|
316
|
+
limit?: number | undefined;
|
|
317
|
+
}>;
|
|
287
318
|
export declare const zodGeoSelectionSchema: z.ZodObject<{
|
|
288
319
|
_id: z.ZodOptional<z.ZodString>;
|
|
320
|
+
geo_selection_group_id: z.ZodOptional<z.ZodString>;
|
|
289
321
|
title: z.ZodOptional<z.ZodString>;
|
|
290
322
|
description: z.ZodOptional<z.ZodString>;
|
|
291
323
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -321,6 +353,7 @@ export declare const zodGeoSelectionSchema: z.ZodObject<{
|
|
|
321
353
|
description?: string | undefined;
|
|
322
354
|
region_id?: string | undefined;
|
|
323
355
|
title?: string | undefined;
|
|
356
|
+
geo_selection_group_id?: string | undefined;
|
|
324
357
|
geos?: string[] | undefined;
|
|
325
358
|
lat?: number | undefined;
|
|
326
359
|
lng?: number | undefined;
|
|
@@ -338,6 +371,7 @@ export declare const zodGeoSelectionSchema: z.ZodObject<{
|
|
|
338
371
|
description?: string | undefined;
|
|
339
372
|
region_id?: string | undefined;
|
|
340
373
|
title?: string | undefined;
|
|
374
|
+
geo_selection_group_id?: string | undefined;
|
|
341
375
|
geos?: string[] | undefined;
|
|
342
376
|
lat?: number | undefined;
|
|
343
377
|
lng?: number | undefined;
|
|
@@ -2082,6 +2116,7 @@ export type MediaItemType = z.infer<typeof mediaItemSchema>;
|
|
|
2082
2116
|
export type AuthorType = z.infer<typeof authorSchema>;
|
|
2083
2117
|
export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
|
|
2084
2118
|
export type GeoType = z.infer<typeof zodGeoSchema>;
|
|
2119
|
+
export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
|
|
2085
2120
|
export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
|
|
2086
2121
|
export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
|
|
2087
2122
|
export type RegionSummaryType = z.infer<typeof zodRegionSummarySchema>;
|
|
@@ -2108,6 +2143,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2108
2143
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2109
2144
|
geo_selection: z.ZodObject<{
|
|
2110
2145
|
_id: z.ZodOptional<z.ZodString>;
|
|
2146
|
+
geo_selection_group_id: z.ZodOptional<z.ZodString>;
|
|
2111
2147
|
title: z.ZodOptional<z.ZodString>;
|
|
2112
2148
|
description: z.ZodOptional<z.ZodString>;
|
|
2113
2149
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -2143,6 +2179,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2143
2179
|
description?: string | undefined;
|
|
2144
2180
|
region_id?: string | undefined;
|
|
2145
2181
|
title?: string | undefined;
|
|
2182
|
+
geo_selection_group_id?: string | undefined;
|
|
2146
2183
|
geos?: string[] | undefined;
|
|
2147
2184
|
lat?: number | undefined;
|
|
2148
2185
|
lng?: number | undefined;
|
|
@@ -2160,6 +2197,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2160
2197
|
description?: string | undefined;
|
|
2161
2198
|
region_id?: string | undefined;
|
|
2162
2199
|
title?: string | undefined;
|
|
2200
|
+
geo_selection_group_id?: string | undefined;
|
|
2163
2201
|
geos?: string[] | undefined;
|
|
2164
2202
|
lat?: number | undefined;
|
|
2165
2203
|
lng?: number | undefined;
|
|
@@ -2223,6 +2261,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2223
2261
|
description?: string | undefined;
|
|
2224
2262
|
region_id?: string | undefined;
|
|
2225
2263
|
title?: string | undefined;
|
|
2264
|
+
geo_selection_group_id?: string | undefined;
|
|
2226
2265
|
geos?: string[] | undefined;
|
|
2227
2266
|
lat?: number | undefined;
|
|
2228
2267
|
lng?: number | undefined;
|
|
@@ -2267,6 +2306,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2267
2306
|
description?: string | undefined;
|
|
2268
2307
|
region_id?: string | undefined;
|
|
2269
2308
|
title?: string | undefined;
|
|
2309
|
+
geo_selection_group_id?: string | undefined;
|
|
2270
2310
|
geos?: string[] | undefined;
|
|
2271
2311
|
lat?: number | undefined;
|
|
2272
2312
|
lng?: number | undefined;
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zodEventSchema = exports.zodServerReportSchema = 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;
|
|
3
|
+
exports.zodEventSchema = exports.zodServerReportSchema = 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.zodGeoSelectionGroupSchema = 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',
|
|
@@ -143,8 +143,20 @@ exports.zodGeoSchema = zod_1.z.object({
|
|
|
143
143
|
subscribers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
144
144
|
is_used: zod_1.z.boolean().optional().default(false), // true if this geo is used in any source
|
|
145
145
|
});
|
|
146
|
+
exports.zodGeoSelectionGroupSchema = zod_1.z.object({
|
|
147
|
+
_id: zod_1.z.string().optional(),
|
|
148
|
+
region_id: zod_1.z.string(),
|
|
149
|
+
slug: zod_1.z.string(),
|
|
150
|
+
description: zod_1.z.string().optional(),
|
|
151
|
+
created_at: zod_1.z.number().optional(),
|
|
152
|
+
updated_at: zod_1.z.number().optional(),
|
|
153
|
+
notes: zod_1.z.string().optional(),
|
|
154
|
+
limit: zod_1.z.number().optional(),
|
|
155
|
+
user_id: zod_1.z.string().optional(), // user who created this geo selection group
|
|
156
|
+
});
|
|
146
157
|
exports.zodGeoSelectionSchema = zod_1.z.object({
|
|
147
158
|
_id: zod_1.z.string().optional(),
|
|
159
|
+
geo_selection_group_id: zod_1.z.string().optional(),
|
|
148
160
|
title: zod_1.z.string().optional(),
|
|
149
161
|
description: zod_1.z.string().optional(),
|
|
150
162
|
type: zod_1.z.string().optional(),
|
package/index.ts
CHANGED
|
@@ -294,8 +294,11 @@ export const MongoGeoSchema = new Schema(
|
|
|
294
294
|
},
|
|
295
295
|
);
|
|
296
296
|
|
|
297
|
+
|
|
298
|
+
|
|
297
299
|
export const MongoGeoSelectionSchema = new Schema(
|
|
298
300
|
{
|
|
301
|
+
geo_selection_group_id: { type: String }, // e.g., geo selection group ID
|
|
299
302
|
title: { type: String }, // e.g., "New York, USA"
|
|
300
303
|
description: { type: String }, // e.g., "A city in the USA"
|
|
301
304
|
type: { type: String }, // e.g., "city", "region", "country"
|
|
@@ -418,3 +421,21 @@ export const MongoEventSchema = new Schema(
|
|
|
418
421
|
toObject: { virtuals: true },
|
|
419
422
|
},
|
|
420
423
|
);
|
|
424
|
+
|
|
425
|
+
export const MongoGeoSelectionGroupSchema = new Schema(
|
|
426
|
+
{
|
|
427
|
+
region_id: { type: String }, // e.g., region ID
|
|
428
|
+
slug: { type: String, required: true }, // e.g., "group-name"
|
|
429
|
+
description: { type: String }, // e.g., "Description of the group"
|
|
430
|
+
created_at: { type: Number, default: Date.now }, // creation date
|
|
431
|
+
updated_at: { type: Number, default: Date.now }, // last update date
|
|
432
|
+
notes: { type: String }, // internal notes about the geo selection group
|
|
433
|
+
limit: { type: Number }, // optional limit for number of geos in this group
|
|
434
|
+
user_id: { type: String }, // optional user ID of the creator/owner of this group
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
versionKey: false,
|
|
438
|
+
toJSON: { virtuals: true },
|
|
439
|
+
toObject: { virtuals: true },
|
|
440
|
+
},
|
|
441
|
+
);
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -155,8 +155,21 @@ export const zodGeoSchema = z.object({
|
|
|
155
155
|
is_used: z.boolean().optional().default(false), // true if this geo is used in any source
|
|
156
156
|
});
|
|
157
157
|
|
|
158
|
+
export const zodGeoSelectionGroupSchema = z.object({
|
|
159
|
+
_id: z.string().optional(),
|
|
160
|
+
region_id: z.string(), // e.g., region ID
|
|
161
|
+
slug: z.string(), // e.g., "group-name"
|
|
162
|
+
description: z.string().optional(), // e.g., "Description of the group"
|
|
163
|
+
created_at: z.number().optional(), // creation date
|
|
164
|
+
updated_at: z.number().optional(), // last update date
|
|
165
|
+
notes: z.string().optional(), // internal notes about the geo selection group
|
|
166
|
+
limit: z.number().optional(), // e.g., maximum number of geo selections allowed in this group
|
|
167
|
+
user_id: z.string().optional(), // user who created this geo selection group
|
|
168
|
+
});
|
|
169
|
+
|
|
158
170
|
export const zodGeoSelectionSchema = z.object({
|
|
159
171
|
_id: z.string().optional(),
|
|
172
|
+
geo_selection_group_id: z.string().optional(), // e.g., geo selection group ID
|
|
160
173
|
title: z.string().optional(), // e.g., "New York, USA"
|
|
161
174
|
description: z.string().optional(), // e.g., "A city in the USA"
|
|
162
175
|
type: z.string().optional(), // e.g., "city", "region", "country"
|
|
@@ -471,6 +484,7 @@ export type MediaItemType = z.infer<typeof mediaItemSchema>;
|
|
|
471
484
|
export type AuthorType = z.infer<typeof authorSchema>;
|
|
472
485
|
export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
|
|
473
486
|
export type GeoType = z.infer<typeof zodGeoSchema>;
|
|
487
|
+
export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
|
|
474
488
|
export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
|
|
475
489
|
export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
|
|
476
490
|
export type RegionSummaryType = z.infer<typeof zodRegionSummarySchema>;
|
|
@@ -521,4 +535,4 @@ export const zodEventSchema = z.object({
|
|
|
521
535
|
embeddings: z.array(z.number()).optional(), // e.g., vector embeddings for ML tasks
|
|
522
536
|
});
|
|
523
537
|
|
|
524
|
-
export type EventType = z.infer<typeof zodEventSchema>;
|
|
538
|
+
export type EventType = z.infer<typeof zodEventSchema>;
|