asfur 1.0.59 → 1.0.61
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 +28 -0
- package/dist/index.js +18 -2
- package/dist/types.d.ts +17 -0
- package/dist/types.js +7 -1
- package/index.ts +21 -1
- package/package.json +1 -1
- package/types.ts +8 -0
package/dist/index.d.ts
CHANGED
|
@@ -368,3 +368,31 @@ export declare const MongoJobSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
368
368
|
} & {
|
|
369
369
|
__v: number;
|
|
370
370
|
}>;
|
|
371
|
+
export declare const MongoGeoSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
372
|
+
versionKey: false;
|
|
373
|
+
toJSON: {
|
|
374
|
+
virtuals: true;
|
|
375
|
+
};
|
|
376
|
+
toObject: {
|
|
377
|
+
virtuals: true;
|
|
378
|
+
};
|
|
379
|
+
}, {
|
|
380
|
+
timestamp?: number | null | undefined;
|
|
381
|
+
geo_text?: string | null | undefined;
|
|
382
|
+
count?: number | null | undefined;
|
|
383
|
+
region?: string | null | undefined;
|
|
384
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
385
|
+
timestamp?: number | null | undefined;
|
|
386
|
+
geo_text?: string | null | undefined;
|
|
387
|
+
count?: number | null | undefined;
|
|
388
|
+
region?: string | null | undefined;
|
|
389
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
390
|
+
timestamp?: number | null | undefined;
|
|
391
|
+
geo_text?: string | null | undefined;
|
|
392
|
+
count?: number | null | undefined;
|
|
393
|
+
region?: string | null | undefined;
|
|
394
|
+
}> & {
|
|
395
|
+
_id: import("mongoose").Types.ObjectId;
|
|
396
|
+
} & {
|
|
397
|
+
__v: number;
|
|
398
|
+
}>;
|
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.MongoJobSchema = exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.MongoQuerySchema = exports.MongoSourceSchema = exports.MongoInstructionsSchema = exports.MongoDataSchema = void 0;
|
|
17
|
+
exports.MongoGeoSchema = exports.MongoJobSchema = exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.MongoQuerySchema = exports.MongoSourceSchema = exports.MongoInstructionsSchema = exports.MongoDataSchema = void 0;
|
|
18
18
|
// Export types for consumers
|
|
19
19
|
__exportStar(require("./types"), exports);
|
|
20
20
|
const mongoose_1 = require("mongoose");
|
|
@@ -71,7 +71,13 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
|
|
|
71
71
|
source_name: { type: String, required: true },
|
|
72
72
|
status: {
|
|
73
73
|
type: String,
|
|
74
|
-
enum: [
|
|
74
|
+
enum: [
|
|
75
|
+
'approved',
|
|
76
|
+
'back_to_business',
|
|
77
|
+
'pending',
|
|
78
|
+
'inactive',
|
|
79
|
+
'in_review',
|
|
80
|
+
],
|
|
75
81
|
default: 'pending',
|
|
76
82
|
},
|
|
77
83
|
tags: { type: [String], default: [] },
|
|
@@ -162,3 +168,13 @@ exports.MongoJobSchema = new mongoose_1.Schema({
|
|
|
162
168
|
toJSON: { virtuals: true },
|
|
163
169
|
toObject: { virtuals: true },
|
|
164
170
|
});
|
|
171
|
+
exports.MongoGeoSchema = new mongoose_1.Schema({
|
|
172
|
+
geo_text: { type: String },
|
|
173
|
+
timestamp: { type: Number },
|
|
174
|
+
count: { type: Number },
|
|
175
|
+
region: { type: String }, // e.g., "New York", "California"
|
|
176
|
+
}, {
|
|
177
|
+
versionKey: false,
|
|
178
|
+
toJSON: { virtuals: true },
|
|
179
|
+
toObject: { virtuals: true },
|
|
180
|
+
});
|
package/dist/types.d.ts
CHANGED
|
@@ -521,6 +521,22 @@ export declare const zodCronScheduleResponseSchema: z.ZodObject<{
|
|
|
521
521
|
schedule?: string | undefined;
|
|
522
522
|
error?: string | undefined;
|
|
523
523
|
}>;
|
|
524
|
+
export declare const zodGeoSchema: z.ZodObject<{
|
|
525
|
+
geo_text: z.ZodOptional<z.ZodString>;
|
|
526
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
527
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
528
|
+
region: z.ZodOptional<z.ZodString>;
|
|
529
|
+
}, "strip", z.ZodTypeAny, {
|
|
530
|
+
timestamp?: number | undefined;
|
|
531
|
+
geo_text?: string | undefined;
|
|
532
|
+
count?: number | undefined;
|
|
533
|
+
region?: string | undefined;
|
|
534
|
+
}, {
|
|
535
|
+
timestamp?: number | undefined;
|
|
536
|
+
geo_text?: string | undefined;
|
|
537
|
+
count?: number | undefined;
|
|
538
|
+
region?: string | undefined;
|
|
539
|
+
}>;
|
|
524
540
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
|
525
541
|
export type DataType = z.infer<typeof zodDataSchema>;
|
|
526
542
|
export type QueryType = z.infer<typeof zodQuerySchema>;
|
|
@@ -534,3 +550,4 @@ export type UserSettingsType = z.infer<typeof zodUserSettingsSchema>;
|
|
|
534
550
|
export type ConversationType = z.infer<typeof zodConversationSchema>;
|
|
535
551
|
export type JobType = z.infer<typeof zodJobSchema>;
|
|
536
552
|
export type CronScheduleResponseType = z.infer<typeof zodCronScheduleResponseSchema>;
|
|
553
|
+
export type GeoType = z.infer<typeof zodGeoSchema>;
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zodCronScheduleResponseSchema = exports.zodJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.generalStatusList = exports.statusList = exports.platformsList = void 0;
|
|
3
|
+
exports.zodGeoSchema = exports.zodCronScheduleResponseSchema = exports.zodJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.generalStatusList = exports.statusList = exports.platformsList = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.platformsList = [
|
|
6
6
|
'telegram',
|
|
@@ -155,3 +155,9 @@ exports.zodCronScheduleResponseSchema = zod_1.z.object({
|
|
|
155
155
|
is_ok: zod_1.z.boolean(),
|
|
156
156
|
error: zod_1.z.string().optional(), // error message if the cron job is invalid
|
|
157
157
|
});
|
|
158
|
+
exports.zodGeoSchema = zod_1.z.object({
|
|
159
|
+
geo_text: zod_1.z.string().optional(),
|
|
160
|
+
timestamp: zod_1.z.number().optional(),
|
|
161
|
+
count: zod_1.z.number().optional(),
|
|
162
|
+
region: zod_1.z.string().optional(), // e.g., "New York", "California"
|
|
163
|
+
});
|
package/index.ts
CHANGED
|
@@ -65,7 +65,13 @@ export const MongoSourceSchema = new Schema(
|
|
|
65
65
|
source_name: { type: String, required: true }, // e.g., 'Telegram Channel Name'
|
|
66
66
|
status: {
|
|
67
67
|
type: String,
|
|
68
|
-
enum: [
|
|
68
|
+
enum: [
|
|
69
|
+
'approved',
|
|
70
|
+
'back_to_business',
|
|
71
|
+
'pending',
|
|
72
|
+
'inactive',
|
|
73
|
+
'in_review',
|
|
74
|
+
],
|
|
69
75
|
default: 'pending',
|
|
70
76
|
}, // INDEX
|
|
71
77
|
tags: { type: [String], default: [] }, // array of tags
|
|
@@ -174,3 +180,17 @@ export const MongoJobSchema = new Schema(
|
|
|
174
180
|
toObject: { virtuals: true },
|
|
175
181
|
}
|
|
176
182
|
);
|
|
183
|
+
|
|
184
|
+
export const MongoGeoSchema = new Schema(
|
|
185
|
+
{
|
|
186
|
+
geo_text: { type: String }, // e.g., "New York, USA"
|
|
187
|
+
timestamp: { type: Number }, // e.g., 1751210833000
|
|
188
|
+
count: { type: Number }, // e.g., 42
|
|
189
|
+
region: { type: String }, // e.g., "New York", "California"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
versionKey: false,
|
|
193
|
+
toJSON: { virtuals: true },
|
|
194
|
+
toObject: { virtuals: true },
|
|
195
|
+
}
|
|
196
|
+
);
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -170,6 +170,13 @@ export const zodCronScheduleResponseSchema = z.object({
|
|
|
170
170
|
error: z.string().optional(), // error message if the cron job is invalid
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
+
export const zodGeoSchema = z.object({
|
|
174
|
+
geo_text: z.string().optional(), // e.g., "New York, USA"
|
|
175
|
+
timestamp: z.number().optional(), // e.g., 1751210833000
|
|
176
|
+
count: z.number().optional(), // e.g., 42
|
|
177
|
+
region: z.string().optional(), // e.g., "New York", "California"
|
|
178
|
+
});
|
|
179
|
+
|
|
173
180
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
|
174
181
|
export type DataType = z.infer<typeof zodDataSchema>;
|
|
175
182
|
export type QueryType = z.infer<typeof zodQuerySchema>;
|
|
@@ -190,3 +197,4 @@ export type JobType = z.infer<typeof zodJobSchema>;
|
|
|
190
197
|
export type CronScheduleResponseType = z.infer<
|
|
191
198
|
typeof zodCronScheduleResponseSchema
|
|
192
199
|
>;
|
|
200
|
+
export type GeoType = z.infer<typeof zodGeoSchema>;
|