asfur 1.0.73 → 1.0.74
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 +6 -0
- package/dist/index.js +2 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.js +4 -2
- package/index.ts +2 -0
- package/package.json +1 -1
- package/types.ts +15 -6
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
44
44
|
source_name?: string | null | undefined;
|
|
45
45
|
source_geo?: string | null | undefined;
|
|
46
46
|
metadata?: any;
|
|
47
|
+
source_region?: string | null | undefined;
|
|
47
48
|
platform_id?: string | null | undefined;
|
|
48
49
|
original_text_id?: string | null | undefined;
|
|
49
50
|
original_text?: string | null | undefined;
|
|
@@ -55,6 +56,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
55
56
|
entities?: any;
|
|
56
57
|
author_username?: string | null | undefined;
|
|
57
58
|
author_id?: string | null | undefined;
|
|
59
|
+
pipeline_name?: string | null | undefined;
|
|
58
60
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
59
61
|
timestamp: number;
|
|
60
62
|
created_at: number;
|
|
@@ -66,6 +68,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
66
68
|
source_name?: string | null | undefined;
|
|
67
69
|
source_geo?: string | null | undefined;
|
|
68
70
|
metadata?: any;
|
|
71
|
+
source_region?: string | null | undefined;
|
|
69
72
|
platform_id?: string | null | undefined;
|
|
70
73
|
original_text_id?: string | null | undefined;
|
|
71
74
|
original_text?: string | null | undefined;
|
|
@@ -77,6 +80,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
77
80
|
entities?: any;
|
|
78
81
|
author_username?: string | null | undefined;
|
|
79
82
|
author_id?: string | null | undefined;
|
|
83
|
+
pipeline_name?: string | null | undefined;
|
|
80
84
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
81
85
|
timestamp: number;
|
|
82
86
|
created_at: number;
|
|
@@ -88,6 +92,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
88
92
|
source_name?: string | null | undefined;
|
|
89
93
|
source_geo?: string | null | undefined;
|
|
90
94
|
metadata?: any;
|
|
95
|
+
source_region?: string | null | undefined;
|
|
91
96
|
platform_id?: string | null | undefined;
|
|
92
97
|
original_text_id?: string | null | undefined;
|
|
93
98
|
original_text?: string | null | undefined;
|
|
@@ -99,6 +104,7 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
|
|
|
99
104
|
entities?: any;
|
|
100
105
|
author_username?: string | null | undefined;
|
|
101
106
|
author_id?: string | null | undefined;
|
|
107
|
+
pipeline_name?: string | null | undefined;
|
|
102
108
|
}> & {
|
|
103
109
|
_id: import("mongoose").Types.ObjectId;
|
|
104
110
|
} & {
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,8 @@ exports.MongoDataSchema = new mongoose_1.Schema({
|
|
|
39
39
|
author_username: String,
|
|
40
40
|
author_id: String,
|
|
41
41
|
reply_to_message_id: { type: String || Number },
|
|
42
|
+
pipeline_name: { type: String },
|
|
43
|
+
source_region: { type: String },
|
|
42
44
|
created_at: { type: Number, default: Date.now },
|
|
43
45
|
updated_at: { type: Number, default: Date.now },
|
|
44
46
|
}, {
|
package/dist/types.d.ts
CHANGED
|
@@ -159,6 +159,8 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
159
159
|
entities: z.ZodOptional<z.ZodAny>;
|
|
160
160
|
author_username: z.ZodOptional<z.ZodString>;
|
|
161
161
|
author_id: z.ZodOptional<z.ZodString>;
|
|
162
|
+
pipeline_name: z.ZodOptional<z.ZodString>;
|
|
163
|
+
source_region: z.ZodOptional<z.ZodString>;
|
|
162
164
|
}, "strip", z.ZodTypeAny, {
|
|
163
165
|
timestamp: number;
|
|
164
166
|
created_at: number;
|
|
@@ -174,6 +176,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
174
176
|
language?: string | undefined;
|
|
175
177
|
source_geo?: string | undefined;
|
|
176
178
|
metadata?: Record<string, any> | undefined;
|
|
179
|
+
source_region?: string | undefined;
|
|
177
180
|
original_text?: string | undefined;
|
|
178
181
|
translated_text?: string | undefined;
|
|
179
182
|
is_reply?: boolean | undefined;
|
|
@@ -188,6 +191,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
188
191
|
entities?: any;
|
|
189
192
|
author_username?: string | undefined;
|
|
190
193
|
author_id?: string | undefined;
|
|
194
|
+
pipeline_name?: string | undefined;
|
|
191
195
|
}, {
|
|
192
196
|
timestamp: number;
|
|
193
197
|
created_at: number;
|
|
@@ -203,6 +207,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
203
207
|
language?: string | undefined;
|
|
204
208
|
source_geo?: string | undefined;
|
|
205
209
|
metadata?: Record<string, any> | undefined;
|
|
210
|
+
source_region?: string | undefined;
|
|
206
211
|
original_text?: string | undefined;
|
|
207
212
|
translated_text?: string | undefined;
|
|
208
213
|
is_reply?: boolean | undefined;
|
|
@@ -217,6 +222,7 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
217
222
|
entities?: any;
|
|
218
223
|
author_username?: string | undefined;
|
|
219
224
|
author_id?: string | undefined;
|
|
225
|
+
pipeline_name?: string | undefined;
|
|
220
226
|
}>;
|
|
221
227
|
export declare const relativeTimeRangeList: readonly ["last_30_minutes", "last_1_hour", "last_2_hours", "last_6_hours", "last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week", "7_october"];
|
|
222
228
|
export declare const zodRelativeTimeRangeSchema: z.ZodObject<{
|
|
@@ -621,6 +627,13 @@ export declare const zodApiKeySchema: z.ZodObject<{
|
|
|
621
627
|
created_at?: number | undefined;
|
|
622
628
|
updated_at?: number | undefined;
|
|
623
629
|
}>;
|
|
630
|
+
/**
|
|
631
|
+
* 'approved' - active and approved sources,
|
|
632
|
+
* 'back_to_business' - sources that were paused and now resumed,
|
|
633
|
+
* 'pending' - sources that are pending approval,
|
|
634
|
+
* 'inactive' - sources that are inactive,
|
|
635
|
+
* 'in_review' - sources that are under review
|
|
636
|
+
*/
|
|
624
637
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
|
625
638
|
export type DataType = z.infer<typeof zodDataSchema>;
|
|
626
639
|
export type QueryType = z.infer<typeof zodQuerySchema>;
|
package/dist/types.js
CHANGED
|
@@ -16,7 +16,7 @@ exports.statusList = [
|
|
|
16
16
|
'back_to_business',
|
|
17
17
|
'pending',
|
|
18
18
|
'inactive',
|
|
19
|
-
'in_review',
|
|
19
|
+
'in_review', // sources that are under review
|
|
20
20
|
];
|
|
21
21
|
exports.generalStatusList = ['active', 'inactive'];
|
|
22
22
|
exports.zodGeoSchema = zod_1.z.object({
|
|
@@ -91,7 +91,9 @@ exports.zodDataSchema = zod_1.z.object({
|
|
|
91
91
|
replies: zod_1.z.any().optional(),
|
|
92
92
|
entities: zod_1.z.any().optional(),
|
|
93
93
|
author_username: zod_1.z.string().optional(),
|
|
94
|
-
author_id: zod_1.z.string().optional(),
|
|
94
|
+
author_id: zod_1.z.string().optional(),
|
|
95
|
+
pipeline_name: zod_1.z.string().optional(),
|
|
96
|
+
source_region: zod_1.z.string().optional(), // e.g., "New York", "California"
|
|
95
97
|
});
|
|
96
98
|
exports.relativeTimeRangeList = [
|
|
97
99
|
// 'last_10_minutes',
|
package/index.ts
CHANGED
|
@@ -25,6 +25,8 @@ export const MongoDataSchema = new Schema(
|
|
|
25
25
|
author_username: String,
|
|
26
26
|
author_id: String,
|
|
27
27
|
reply_to_message_id: { type: String || Number },
|
|
28
|
+
pipeline_name: { type: String },
|
|
29
|
+
source_region: { type: String },
|
|
28
30
|
created_at: { type: Number, default: Date.now },
|
|
29
31
|
updated_at: { type: Number, default: Date.now },
|
|
30
32
|
},
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { pipeline, z } from 'zod';
|
|
2
2
|
|
|
3
3
|
export const platformsList = [
|
|
4
4
|
'telegram',
|
|
@@ -11,11 +11,11 @@ export const platformsList = [
|
|
|
11
11
|
] as const;
|
|
12
12
|
|
|
13
13
|
export const statusList = [
|
|
14
|
-
'approved',
|
|
15
|
-
'back_to_business',
|
|
16
|
-
'pending',
|
|
17
|
-
'inactive',
|
|
18
|
-
'in_review',
|
|
14
|
+
'approved', // active and approved sources
|
|
15
|
+
'back_to_business', // sources that were paused and now resumed
|
|
16
|
+
'pending', // sources that are pending approval
|
|
17
|
+
'inactive', // sources that are inactive
|
|
18
|
+
'in_review', // sources that are under review
|
|
19
19
|
] as const;
|
|
20
20
|
|
|
21
21
|
export const generalStatusList = ['active', 'inactive'] as const;
|
|
@@ -99,6 +99,8 @@ export const zodDataSchema = z.object({
|
|
|
99
99
|
entities: z.any().optional(), // array of reply texts or IDs
|
|
100
100
|
author_username: z.string().optional(), // e.g., author username
|
|
101
101
|
author_id: z.string().optional(), // e.g., author ID
|
|
102
|
+
pipeline_name: z.string().optional(), // e.g., 'default_pipeline'
|
|
103
|
+
source_region: z.string().optional(), // e.g., "New York", "California"
|
|
102
104
|
});
|
|
103
105
|
|
|
104
106
|
export const relativeTimeRangeList = [
|
|
@@ -207,6 +209,13 @@ export const zodApiKeySchema = z.object({
|
|
|
207
209
|
status: z.enum(generalStatusList).default('active'), // status of the API key
|
|
208
210
|
});
|
|
209
211
|
|
|
212
|
+
/**
|
|
213
|
+
* 'approved' - active and approved sources,
|
|
214
|
+
* 'back_to_business' - sources that were paused and now resumed,
|
|
215
|
+
* 'pending' - sources that are pending approval,
|
|
216
|
+
* 'inactive' - sources that are inactive,
|
|
217
|
+
* 'in_review' - sources that are under review
|
|
218
|
+
*/
|
|
210
219
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
|
211
220
|
export type DataType = z.infer<typeof zodDataSchema>;
|
|
212
221
|
export type QueryType = z.infer<typeof zodQuerySchema>;
|