harvester_sdk 1.0.55 → 1.0.56
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 +34 -0
- package/dist/index.js +13 -1
- package/dist/types.d.ts +31 -0
- package/dist/types.js +10 -1
- package/index.ts +18 -0
- package/package.json +1 -1
- package/types.ts +11 -0
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,34 @@ 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
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
946
|
+
slug: string;
|
|
947
|
+
created_at: number;
|
|
948
|
+
updated_at: number;
|
|
949
|
+
notes?: string | null | undefined;
|
|
950
|
+
description?: string | null | undefined;
|
|
951
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
952
|
+
slug: string;
|
|
953
|
+
created_at: number;
|
|
954
|
+
updated_at: number;
|
|
955
|
+
notes?: string | null | undefined;
|
|
956
|
+
description?: string | null | undefined;
|
|
957
|
+
}> & {
|
|
958
|
+
_id: import("mongoose").Types.ObjectId;
|
|
959
|
+
} & {
|
|
960
|
+
__v: number;
|
|
961
|
+
}>;
|
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,14 @@ 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
|
+
slug: { type: String, required: true },
|
|
384
|
+
description: { type: String },
|
|
385
|
+
created_at: { type: Number, default: Date.now },
|
|
386
|
+
updated_at: { type: Number, default: Date.now },
|
|
387
|
+
notes: { type: String }, // internal notes about the geo selection group
|
|
388
|
+
}, {
|
|
389
|
+
versionKey: false,
|
|
390
|
+
toJSON: { virtuals: true },
|
|
391
|
+
toObject: { virtuals: true },
|
|
392
|
+
});
|
package/dist/types.d.ts
CHANGED
|
@@ -284,8 +284,31 @@ 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
|
+
slug: z.ZodString;
|
|
290
|
+
description: z.ZodOptional<z.ZodString>;
|
|
291
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
slug: string;
|
|
296
|
+
_id?: string | undefined;
|
|
297
|
+
created_at?: number | undefined;
|
|
298
|
+
updated_at?: number | undefined;
|
|
299
|
+
notes?: string | undefined;
|
|
300
|
+
description?: string | undefined;
|
|
301
|
+
}, {
|
|
302
|
+
slug: string;
|
|
303
|
+
_id?: string | undefined;
|
|
304
|
+
created_at?: number | undefined;
|
|
305
|
+
updated_at?: number | undefined;
|
|
306
|
+
notes?: string | undefined;
|
|
307
|
+
description?: string | undefined;
|
|
308
|
+
}>;
|
|
287
309
|
export declare const zodGeoSelectionSchema: z.ZodObject<{
|
|
288
310
|
_id: z.ZodOptional<z.ZodString>;
|
|
311
|
+
geo_selection_group_id: z.ZodOptional<z.ZodString>;
|
|
289
312
|
title: z.ZodOptional<z.ZodString>;
|
|
290
313
|
description: z.ZodOptional<z.ZodString>;
|
|
291
314
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -321,6 +344,7 @@ export declare const zodGeoSelectionSchema: z.ZodObject<{
|
|
|
321
344
|
description?: string | undefined;
|
|
322
345
|
region_id?: string | undefined;
|
|
323
346
|
title?: string | undefined;
|
|
347
|
+
geo_selection_group_id?: string | undefined;
|
|
324
348
|
geos?: string[] | undefined;
|
|
325
349
|
lat?: number | undefined;
|
|
326
350
|
lng?: number | undefined;
|
|
@@ -338,6 +362,7 @@ export declare const zodGeoSelectionSchema: z.ZodObject<{
|
|
|
338
362
|
description?: string | undefined;
|
|
339
363
|
region_id?: string | undefined;
|
|
340
364
|
title?: string | undefined;
|
|
365
|
+
geo_selection_group_id?: string | undefined;
|
|
341
366
|
geos?: string[] | undefined;
|
|
342
367
|
lat?: number | undefined;
|
|
343
368
|
lng?: number | undefined;
|
|
@@ -2082,6 +2107,7 @@ export type MediaItemType = z.infer<typeof mediaItemSchema>;
|
|
|
2082
2107
|
export type AuthorType = z.infer<typeof authorSchema>;
|
|
2083
2108
|
export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
|
|
2084
2109
|
export type GeoType = z.infer<typeof zodGeoSchema>;
|
|
2110
|
+
export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
|
|
2085
2111
|
export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
|
|
2086
2112
|
export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
|
|
2087
2113
|
export type RegionSummaryType = z.infer<typeof zodRegionSummarySchema>;
|
|
@@ -2108,6 +2134,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2108
2134
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2109
2135
|
geo_selection: z.ZodObject<{
|
|
2110
2136
|
_id: z.ZodOptional<z.ZodString>;
|
|
2137
|
+
geo_selection_group_id: z.ZodOptional<z.ZodString>;
|
|
2111
2138
|
title: z.ZodOptional<z.ZodString>;
|
|
2112
2139
|
description: z.ZodOptional<z.ZodString>;
|
|
2113
2140
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -2143,6 +2170,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2143
2170
|
description?: string | undefined;
|
|
2144
2171
|
region_id?: string | undefined;
|
|
2145
2172
|
title?: string | undefined;
|
|
2173
|
+
geo_selection_group_id?: string | undefined;
|
|
2146
2174
|
geos?: string[] | undefined;
|
|
2147
2175
|
lat?: number | undefined;
|
|
2148
2176
|
lng?: number | undefined;
|
|
@@ -2160,6 +2188,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2160
2188
|
description?: string | undefined;
|
|
2161
2189
|
region_id?: string | undefined;
|
|
2162
2190
|
title?: string | undefined;
|
|
2191
|
+
geo_selection_group_id?: string | undefined;
|
|
2163
2192
|
geos?: string[] | undefined;
|
|
2164
2193
|
lat?: number | undefined;
|
|
2165
2194
|
lng?: number | undefined;
|
|
@@ -2223,6 +2252,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2223
2252
|
description?: string | undefined;
|
|
2224
2253
|
region_id?: string | undefined;
|
|
2225
2254
|
title?: string | undefined;
|
|
2255
|
+
geo_selection_group_id?: string | undefined;
|
|
2226
2256
|
geos?: string[] | undefined;
|
|
2227
2257
|
lat?: number | undefined;
|
|
2228
2258
|
lng?: number | undefined;
|
|
@@ -2267,6 +2297,7 @@ export declare const zodEventSchema: z.ZodObject<{
|
|
|
2267
2297
|
description?: string | undefined;
|
|
2268
2298
|
region_id?: string | undefined;
|
|
2269
2299
|
title?: string | undefined;
|
|
2300
|
+
geo_selection_group_id?: string | undefined;
|
|
2270
2301
|
geos?: string[] | undefined;
|
|
2271
2302
|
lat?: number | undefined;
|
|
2272
2303
|
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,17 @@ 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
|
+
slug: zod_1.z.string(),
|
|
149
|
+
description: zod_1.z.string().optional(),
|
|
150
|
+
created_at: zod_1.z.number().optional(),
|
|
151
|
+
updated_at: zod_1.z.number().optional(),
|
|
152
|
+
notes: zod_1.z.string().optional(), // internal notes about the geo selection group
|
|
153
|
+
});
|
|
146
154
|
exports.zodGeoSelectionSchema = zod_1.z.object({
|
|
147
155
|
_id: zod_1.z.string().optional(),
|
|
156
|
+
geo_selection_group_id: zod_1.z.string().optional(),
|
|
148
157
|
title: zod_1.z.string().optional(),
|
|
149
158
|
description: zod_1.z.string().optional(),
|
|
150
159
|
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,18 @@ export const MongoEventSchema = new Schema(
|
|
|
418
421
|
toObject: { virtuals: true },
|
|
419
422
|
},
|
|
420
423
|
);
|
|
424
|
+
|
|
425
|
+
export const MongoGeoSelectionGroupSchema = new Schema(
|
|
426
|
+
{
|
|
427
|
+
slug: { type: String, required: true }, // e.g., "group-name"
|
|
428
|
+
description: { type: String }, // e.g., "Description of the group"
|
|
429
|
+
created_at: { type: Number, default: Date.now }, // creation date
|
|
430
|
+
updated_at: { type: Number, default: Date.now }, // last update date
|
|
431
|
+
notes: { type: String }, // internal notes about the geo selection group
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
versionKey: false,
|
|
435
|
+
toJSON: { virtuals: true },
|
|
436
|
+
toObject: { virtuals: true },
|
|
437
|
+
},
|
|
438
|
+
);
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -155,8 +155,18 @@ 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
|
+
slug: z.string(), // e.g., "group-name"
|
|
161
|
+
description: z.string().optional(), // e.g., "Description of the group"
|
|
162
|
+
created_at: z.number().optional(), // creation date
|
|
163
|
+
updated_at: z.number().optional(), // last update date
|
|
164
|
+
notes: z.string().optional(), // internal notes about the geo selection group
|
|
165
|
+
});
|
|
166
|
+
|
|
158
167
|
export const zodGeoSelectionSchema = z.object({
|
|
159
168
|
_id: z.string().optional(),
|
|
169
|
+
geo_selection_group_id: z.string().optional(), // e.g., geo selection group ID
|
|
160
170
|
title: z.string().optional(), // e.g., "New York, USA"
|
|
161
171
|
description: z.string().optional(), // e.g., "A city in the USA"
|
|
162
172
|
type: z.string().optional(), // e.g., "city", "region", "country"
|
|
@@ -471,6 +481,7 @@ export type MediaItemType = z.infer<typeof mediaItemSchema>;
|
|
|
471
481
|
export type AuthorType = z.infer<typeof authorSchema>;
|
|
472
482
|
export type RepliesInfoType = z.infer<typeof repliesInfoSchema>;
|
|
473
483
|
export type GeoType = z.infer<typeof zodGeoSchema>;
|
|
484
|
+
export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
|
|
474
485
|
export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
|
|
475
486
|
export type DashboardStatsType = z.infer<typeof zodDashboardStatsSchema>;
|
|
476
487
|
export type RegionSummaryType = z.infer<typeof zodRegionSummarySchema>;
|