asfur 1.0.50 → 1.0.52
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 +15 -15
- package/dist/index.js +4 -15
- package/dist/types.d.ts +6 -6
- package/dist/types.js +2 -2
- package/index.ts +4 -15
- package/package.json +1 -1
- package/types.ts +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -127,48 +127,48 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
|
|
|
127
127
|
};
|
|
128
128
|
}, {
|
|
129
129
|
title: string;
|
|
130
|
-
platform:
|
|
130
|
+
platform: string;
|
|
131
131
|
status: "approved" | "pending" | "inactive" | "in_review";
|
|
132
|
-
source_id:
|
|
133
|
-
source_public_id:
|
|
132
|
+
source_id: any;
|
|
133
|
+
source_public_id: any;
|
|
134
134
|
source_name: string;
|
|
135
135
|
tags: string[];
|
|
136
136
|
is_public: boolean;
|
|
137
137
|
metadata: any;
|
|
138
|
-
created_at:
|
|
139
|
-
updated_at:
|
|
138
|
+
created_at: number;
|
|
139
|
+
updated_at: number;
|
|
140
140
|
last_text_id?: number | null | undefined;
|
|
141
141
|
url?: string | null | undefined;
|
|
142
142
|
description?: string | null | undefined;
|
|
143
143
|
source_geo?: string | null | undefined;
|
|
144
144
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
145
145
|
title: string;
|
|
146
|
-
platform:
|
|
146
|
+
platform: string;
|
|
147
147
|
status: "approved" | "pending" | "inactive" | "in_review";
|
|
148
|
-
source_id:
|
|
149
|
-
source_public_id:
|
|
148
|
+
source_id: any;
|
|
149
|
+
source_public_id: any;
|
|
150
150
|
source_name: string;
|
|
151
151
|
tags: string[];
|
|
152
152
|
is_public: boolean;
|
|
153
153
|
metadata: any;
|
|
154
|
-
created_at:
|
|
155
|
-
updated_at:
|
|
154
|
+
created_at: number;
|
|
155
|
+
updated_at: number;
|
|
156
156
|
last_text_id?: number | null | undefined;
|
|
157
157
|
url?: string | null | undefined;
|
|
158
158
|
description?: string | null | undefined;
|
|
159
159
|
source_geo?: string | null | undefined;
|
|
160
160
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
161
161
|
title: string;
|
|
162
|
-
platform:
|
|
162
|
+
platform: string;
|
|
163
163
|
status: "approved" | "pending" | "inactive" | "in_review";
|
|
164
|
-
source_id:
|
|
165
|
-
source_public_id:
|
|
164
|
+
source_id: any;
|
|
165
|
+
source_public_id: any;
|
|
166
166
|
source_name: string;
|
|
167
167
|
tags: string[];
|
|
168
168
|
is_public: boolean;
|
|
169
169
|
metadata: any;
|
|
170
|
-
created_at:
|
|
171
|
-
updated_at:
|
|
170
|
+
created_at: number;
|
|
171
|
+
updated_at: number;
|
|
172
172
|
last_text_id?: number | null | undefined;
|
|
173
173
|
url?: string | null | undefined;
|
|
174
174
|
description?: string | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -55,21 +55,10 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
|
|
|
55
55
|
title: { type: String, required: true },
|
|
56
56
|
platform: {
|
|
57
57
|
type: String,
|
|
58
|
-
enum: [
|
|
59
|
-
'telegram',
|
|
60
|
-
'facebook',
|
|
61
|
-
'twitter',
|
|
62
|
-
'instagram',
|
|
63
|
-
'tiktok',
|
|
64
|
-
'youtube',
|
|
65
|
-
'website',
|
|
66
|
-
'document',
|
|
67
|
-
'other',
|
|
68
|
-
],
|
|
69
58
|
required: true,
|
|
70
59
|
},
|
|
71
|
-
source_id: { type:
|
|
72
|
-
source_public_id: { type:
|
|
60
|
+
source_id: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
61
|
+
source_public_id: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
73
62
|
is_public: { type: Boolean, default: true },
|
|
74
63
|
description: { type: String },
|
|
75
64
|
last_text_id: { type: Number },
|
|
@@ -83,8 +72,8 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
|
|
|
83
72
|
tags: { type: [String], default: [] },
|
|
84
73
|
url: { type: String },
|
|
85
74
|
metadata: { type: Object, default: {} },
|
|
86
|
-
created_at: { type:
|
|
87
|
-
updated_at: { type:
|
|
75
|
+
created_at: { type: Number, default: Date.now },
|
|
76
|
+
updated_at: { type: Number, default: Date.now },
|
|
88
77
|
}, {
|
|
89
78
|
versionKey: false,
|
|
90
79
|
toJSON: { virtuals: true },
|
package/dist/types.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ export declare const zodSourceSchema: z.ZodObject<{
|
|
|
18
18
|
status: z.ZodEnum<["approved", "pending", "inactive", "in_review"]>;
|
|
19
19
|
is_public: z.ZodDefault<z.ZodBoolean>;
|
|
20
20
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
21
|
-
created_at: z.
|
|
22
|
-
updated_at: z.ZodOptional<z.
|
|
21
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
23
23
|
user_id: z.ZodOptional<z.ZodString>;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
25
|
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
|
|
@@ -27,7 +27,6 @@ export declare const zodSourceSchema: z.ZodObject<{
|
|
|
27
27
|
source_id: string | number;
|
|
28
28
|
source_name: string;
|
|
29
29
|
is_public: boolean;
|
|
30
|
-
created_at: Date;
|
|
31
30
|
_id?: string | undefined;
|
|
32
31
|
title?: string | undefined;
|
|
33
32
|
source_public_id?: string | number | undefined;
|
|
@@ -38,14 +37,14 @@ export declare const zodSourceSchema: z.ZodObject<{
|
|
|
38
37
|
source_geo?: string | undefined;
|
|
39
38
|
tags?: string[] | undefined;
|
|
40
39
|
metadata?: Record<string, any> | undefined;
|
|
41
|
-
|
|
40
|
+
created_at?: number | undefined;
|
|
41
|
+
updated_at?: number | undefined;
|
|
42
42
|
user_id?: string | undefined;
|
|
43
43
|
}, {
|
|
44
44
|
platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
|
|
45
45
|
status: "approved" | "pending" | "inactive" | "in_review";
|
|
46
46
|
source_id: string | number;
|
|
47
47
|
source_name: string;
|
|
48
|
-
created_at: Date;
|
|
49
48
|
_id?: string | undefined;
|
|
50
49
|
title?: string | undefined;
|
|
51
50
|
source_public_id?: string | number | undefined;
|
|
@@ -57,7 +56,8 @@ export declare const zodSourceSchema: z.ZodObject<{
|
|
|
57
56
|
tags?: string[] | undefined;
|
|
58
57
|
is_public?: boolean | undefined;
|
|
59
58
|
metadata?: Record<string, any> | undefined;
|
|
60
|
-
|
|
59
|
+
created_at?: number | undefined;
|
|
60
|
+
updated_at?: number | undefined;
|
|
61
61
|
user_id?: string | undefined;
|
|
62
62
|
}>;
|
|
63
63
|
export declare const zodDataSchema: z.ZodObject<{
|
package/dist/types.js
CHANGED
|
@@ -34,8 +34,8 @@ exports.zodSourceSchema = zod_1.z.object({
|
|
|
34
34
|
status: zod_1.z.enum(exports.statusList),
|
|
35
35
|
is_public: zod_1.z.boolean().default(true),
|
|
36
36
|
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
37
|
-
created_at: zod_1.z.
|
|
38
|
-
updated_at: zod_1.z.
|
|
37
|
+
created_at: zod_1.z.number().optional(),
|
|
38
|
+
updated_at: zod_1.z.number().optional(),
|
|
39
39
|
user_id: zod_1.z.string().optional(), // user identifier
|
|
40
40
|
});
|
|
41
41
|
exports.zodDataSchema = zod_1.z.object({
|
package/index.ts
CHANGED
|
@@ -58,21 +58,10 @@ export const MongoSourceSchema = new Schema(
|
|
|
58
58
|
title: { type: String, required: true }, // e.g., 'Telegram Channel Name'
|
|
59
59
|
platform: {
|
|
60
60
|
type: String,
|
|
61
|
-
enum: [
|
|
62
|
-
'telegram',
|
|
63
|
-
'facebook',
|
|
64
|
-
'twitter',
|
|
65
|
-
'instagram',
|
|
66
|
-
'tiktok',
|
|
67
|
-
'youtube',
|
|
68
|
-
'website',
|
|
69
|
-
'document',
|
|
70
|
-
'other',
|
|
71
|
-
],
|
|
72
61
|
required: true,
|
|
73
62
|
},
|
|
74
|
-
source_id: { type:
|
|
75
|
-
source_public_id: { type:
|
|
63
|
+
source_id: { type: Schema.Types.Mixed, required: true }, // original channel_id
|
|
64
|
+
source_public_id: { type: Schema.Types.Mixed, required: true }, // e.g., '@telegram_channel_id'
|
|
76
65
|
is_public: { type: Boolean, default: true }, // true if the source is public
|
|
77
66
|
description: { type: String }, // e.g., 'A channel about news and updates'
|
|
78
67
|
last_text_id: { type: Number }, // last processed text ID
|
|
@@ -86,8 +75,8 @@ export const MongoSourceSchema = new Schema(
|
|
|
86
75
|
tags: { type: [String], default: [] }, // array of tags
|
|
87
76
|
url: { type: String }, // e.g., 'https://t.me/telegram_channel_name'
|
|
88
77
|
metadata: { type: Object, default: {} }, // flexible per platform
|
|
89
|
-
created_at: { type:
|
|
90
|
-
updated_at: { type:
|
|
78
|
+
created_at: { type: Number, default: Date.now },
|
|
79
|
+
updated_at: { type: Number, default: Date.now },
|
|
91
80
|
},
|
|
92
81
|
{
|
|
93
82
|
versionKey: false,
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -35,8 +35,8 @@ export const zodSourceSchema = z.object({
|
|
|
35
35
|
status: z.enum(statusList), // INDEX
|
|
36
36
|
is_public: z.boolean().default(true), // true if the source is public
|
|
37
37
|
metadata: z.record(z.string(), z.any()).optional(), // flexible per platform
|
|
38
|
-
created_at: z.
|
|
39
|
-
updated_at: z.
|
|
38
|
+
created_at: z.number().optional(),
|
|
39
|
+
updated_at: z.number().optional(),
|
|
40
40
|
user_id: z.string().optional(), // user identifier
|
|
41
41
|
});
|
|
42
42
|
|