asfur 1.0.72 → 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 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
  } & {
@@ -158,6 +164,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
158
164
  url?: string | null | undefined;
159
165
  source_geo?: string | null | undefined;
160
166
  source_region?: string | null | undefined;
167
+ server?: string | null | undefined;
161
168
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
162
169
  status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
163
170
  subscribers: string[];
@@ -176,6 +183,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
176
183
  url?: string | null | undefined;
177
184
  source_geo?: string | null | undefined;
178
185
  source_region?: string | null | undefined;
186
+ server?: string | null | undefined;
179
187
  }>, {}> & import("mongoose").FlatRecord<{
180
188
  status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
181
189
  subscribers: string[];
@@ -194,6 +202,7 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
194
202
  url?: string | null | undefined;
195
203
  source_geo?: string | null | undefined;
196
204
  source_region?: string | null | undefined;
205
+ server?: string | null | undefined;
197
206
  }> & {
198
207
  _id: import("mongoose").Types.ObjectId;
199
208
  } & {
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
  }, {
@@ -86,7 +88,8 @@ exports.MongoSourceSchema = new mongoose_1.Schema({
86
88
  subscribers: { type: [String], default: [] },
87
89
  created_at: { type: Number, default: Date.now },
88
90
  updated_at: { type: Number, default: Date.now },
89
- source_region: { type: String }, // e.g., "New York", "California"
91
+ source_region: { type: String },
92
+ server: { type: String }, // e.g., server handling this source
90
93
  }, {
91
94
  versionKey: false,
92
95
  toJSON: { virtuals: true },
package/dist/types.d.ts CHANGED
@@ -76,6 +76,7 @@ export declare const zodSourceSchema: z.ZodObject<{
76
76
  user_id: z.ZodOptional<z.ZodString>;
77
77
  subscribers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
78
78
  source_region: z.ZodOptional<z.ZodString>;
79
+ server: z.ZodOptional<z.ZodString>;
79
80
  }, "strip", z.ZodTypeAny, {
80
81
  status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
81
82
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
@@ -97,6 +98,7 @@ export declare const zodSourceSchema: z.ZodObject<{
97
98
  metadata?: Record<string, any> | undefined;
98
99
  user_id?: string | undefined;
99
100
  source_region?: string | undefined;
101
+ server?: string | undefined;
100
102
  }, {
101
103
  status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
102
104
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
@@ -118,6 +120,7 @@ export declare const zodSourceSchema: z.ZodObject<{
118
120
  metadata?: Record<string, any> | undefined;
119
121
  user_id?: string | undefined;
120
122
  source_region?: string | undefined;
123
+ server?: string | undefined;
121
124
  }>;
122
125
  export declare const zodDataSchema: z.ZodObject<{
123
126
  _id: z.ZodOptional<z.ZodString>;
@@ -156,6 +159,8 @@ export declare const zodDataSchema: z.ZodObject<{
156
159
  entities: z.ZodOptional<z.ZodAny>;
157
160
  author_username: z.ZodOptional<z.ZodString>;
158
161
  author_id: z.ZodOptional<z.ZodString>;
162
+ pipeline_name: z.ZodOptional<z.ZodString>;
163
+ source_region: z.ZodOptional<z.ZodString>;
159
164
  }, "strip", z.ZodTypeAny, {
160
165
  timestamp: number;
161
166
  created_at: number;
@@ -171,6 +176,7 @@ export declare const zodDataSchema: z.ZodObject<{
171
176
  language?: string | undefined;
172
177
  source_geo?: string | undefined;
173
178
  metadata?: Record<string, any> | undefined;
179
+ source_region?: string | undefined;
174
180
  original_text?: string | undefined;
175
181
  translated_text?: string | undefined;
176
182
  is_reply?: boolean | undefined;
@@ -185,6 +191,7 @@ export declare const zodDataSchema: z.ZodObject<{
185
191
  entities?: any;
186
192
  author_username?: string | undefined;
187
193
  author_id?: string | undefined;
194
+ pipeline_name?: string | undefined;
188
195
  }, {
189
196
  timestamp: number;
190
197
  created_at: number;
@@ -200,6 +207,7 @@ export declare const zodDataSchema: z.ZodObject<{
200
207
  language?: string | undefined;
201
208
  source_geo?: string | undefined;
202
209
  metadata?: Record<string, any> | undefined;
210
+ source_region?: string | undefined;
203
211
  original_text?: string | undefined;
204
212
  translated_text?: string | undefined;
205
213
  is_reply?: boolean | undefined;
@@ -214,6 +222,7 @@ export declare const zodDataSchema: z.ZodObject<{
214
222
  entities?: any;
215
223
  author_username?: string | undefined;
216
224
  author_id?: string | undefined;
225
+ pipeline_name?: string | undefined;
217
226
  }>;
218
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"];
219
228
  export declare const zodRelativeTimeRangeSchema: z.ZodObject<{
@@ -618,6 +627,13 @@ export declare const zodApiKeySchema: z.ZodObject<{
618
627
  created_at?: number | undefined;
619
628
  updated_at?: number | undefined;
620
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
+ */
621
637
  export type SourceType = z.infer<typeof zodSourceSchema>;
622
638
  export type DataType = z.infer<typeof zodDataSchema>;
623
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({
@@ -58,7 +58,8 @@ exports.zodSourceSchema = zod_1.z.object({
58
58
  updated_at: zod_1.z.number().optional(),
59
59
  user_id: zod_1.z.string().optional(),
60
60
  subscribers: zod_1.z.array(zod_1.z.string()).optional(),
61
- source_region: zod_1.z.string().optional(), // e.g., "New York", "California"
61
+ source_region: zod_1.z.string().optional(),
62
+ server: zod_1.z.string().optional(), // e.g., server handling this source
62
63
  });
63
64
  exports.zodDataSchema = zod_1.z.object({
64
65
  _id: zod_1.z.string().optional(),
@@ -90,7 +91,9 @@ exports.zodDataSchema = zod_1.z.object({
90
91
  replies: zod_1.z.any().optional(),
91
92
  entities: zod_1.z.any().optional(),
92
93
  author_username: zod_1.z.string().optional(),
93
- author_id: zod_1.z.string().optional(), // e.g., author ID
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"
94
97
  });
95
98
  exports.relativeTimeRangeList = [
96
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
  },
@@ -81,6 +83,7 @@ export const MongoSourceSchema = new Schema(
81
83
  created_at: { type: Number, default: Date.now },
82
84
  updated_at: { type: Number, default: Date.now },
83
85
  source_region: { type: String }, // e.g., "New York", "California"
86
+ server: { type: String }, // e.g., server handling this source
84
87
  },
85
88
  {
86
89
  versionKey: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "description": "SDK for interacting with the Asfur API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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;
@@ -63,6 +63,7 @@ export const zodSourceSchema = z.object({
63
63
  user_id: z.string().optional(), // user identifier
64
64
  subscribers: z.array(z.string()).optional(), // array of user IDs who subscribed to this source
65
65
  source_region: z.string().optional(), // e.g., "New York", "California"
66
+ server: z.string().optional(), // e.g., server handling this source
66
67
  });
67
68
 
68
69
  export const zodDataSchema = z.object({
@@ -98,6 +99,8 @@ export const zodDataSchema = z.object({
98
99
  entities: z.any().optional(), // array of reply texts or IDs
99
100
  author_username: z.string().optional(), // e.g., author username
100
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"
101
104
  });
102
105
 
103
106
  export const relativeTimeRangeList = [
@@ -206,6 +209,13 @@ export const zodApiKeySchema = z.object({
206
209
  status: z.enum(generalStatusList).default('active'), // status of the API key
207
210
  });
208
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
+ */
209
219
  export type SourceType = z.infer<typeof zodSourceSchema>;
210
220
  export type DataType = z.infer<typeof zodDataSchema>;
211
221
  export type QueryType = z.infer<typeof zodQuerySchema>;