asfur 1.0.80 → 1.0.82

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
@@ -34,9 +34,9 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
34
34
  virtuals: true;
35
35
  };
36
36
  }, {
37
- timestamp: number;
38
37
  created_at: number;
39
38
  updated_at: number;
39
+ timestamp: number;
40
40
  text_geo: string[];
41
41
  platform?: string | null | undefined;
42
42
  source_id?: string | null | undefined;
@@ -58,9 +58,9 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
58
58
  author_id?: string | null | undefined;
59
59
  pipeline_name?: string | null | undefined;
60
60
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
61
- timestamp: number;
62
61
  created_at: number;
63
62
  updated_at: number;
63
+ timestamp: number;
64
64
  text_geo: string[];
65
65
  platform?: string | null | undefined;
66
66
  source_id?: string | null | undefined;
@@ -82,9 +82,9 @@ export declare const MongoDataSchema: Schema<any, import("mongoose").Model<any,
82
82
  author_id?: string | null | undefined;
83
83
  pipeline_name?: string | null | undefined;
84
84
  }>, {}> & import("mongoose").FlatRecord<{
85
- timestamp: number;
86
85
  created_at: number;
87
86
  updated_at: number;
87
+ timestamp: number;
88
88
  text_geo: string[];
89
89
  platform?: string | null | undefined;
90
90
  source_id?: string | null | undefined;
@@ -147,11 +147,11 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
147
147
  virtuals: true;
148
148
  };
149
149
  }, {
150
- status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
151
- subscribers: string[];
152
150
  title: string;
151
+ status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
153
152
  created_at: number;
154
153
  updated_at: number;
154
+ subscribers: string[];
155
155
  platform: string;
156
156
  source_id: any;
157
157
  source_public_id: any;
@@ -166,11 +166,11 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
166
166
  source_region?: string | null | undefined;
167
167
  server?: string | null | undefined;
168
168
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
169
- status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
170
- subscribers: string[];
171
169
  title: string;
170
+ status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
172
171
  created_at: number;
173
172
  updated_at: number;
173
+ subscribers: string[];
174
174
  platform: string;
175
175
  source_id: any;
176
176
  source_public_id: any;
@@ -185,11 +185,11 @@ export declare const MongoSourceSchema: Schema<any, import("mongoose").Model<any
185
185
  source_region?: string | null | undefined;
186
186
  server?: string | null | undefined;
187
187
  }>, {}> & import("mongoose").FlatRecord<{
188
- status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
189
- subscribers: string[];
190
188
  title: string;
189
+ status: "approved" | "back_to_business" | "pending" | "inactive" | "in_review";
191
190
  created_at: number;
192
191
  updated_at: number;
192
+ subscribers: string[];
193
193
  platform: string;
194
194
  source_id: any;
195
195
  source_public_id: any;
@@ -217,8 +217,8 @@ export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any,
217
217
  virtuals: true;
218
218
  };
219
219
  }, {
220
- timestamp: number;
221
220
  geos: string[];
221
+ timestamp: number;
222
222
  user_id: string;
223
223
  sources: string[];
224
224
  geos_ids: string[];
@@ -228,8 +228,8 @@ export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any,
228
228
  user_instructions?: string | null | undefined;
229
229
  user_time_zone?: string | null | undefined;
230
230
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
231
- timestamp: number;
232
231
  geos: string[];
232
+ timestamp: number;
233
233
  user_id: string;
234
234
  sources: string[];
235
235
  geos_ids: string[];
@@ -239,8 +239,8 @@ export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any,
239
239
  user_instructions?: string | null | undefined;
240
240
  user_time_zone?: string | null | undefined;
241
241
  }>, {}> & import("mongoose").FlatRecord<{
242
- timestamp: number;
243
242
  geos: string[];
243
+ timestamp: number;
244
244
  user_id: string;
245
245
  sources: string[];
246
246
  geos_ids: string[];
@@ -406,24 +406,24 @@ export declare const MongoGeoSchema: Schema<any, import("mongoose").Model<any, a
406
406
  }, {
407
407
  subscribers: string[];
408
408
  is_used: boolean;
409
+ region?: string | null | undefined;
409
410
  geo_text?: string | null | undefined;
410
411
  timestamp?: number | null | undefined;
411
412
  count?: number | null | undefined;
412
- region?: string | null | undefined;
413
413
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
414
414
  subscribers: string[];
415
415
  is_used: boolean;
416
+ region?: string | null | undefined;
416
417
  geo_text?: string | null | undefined;
417
418
  timestamp?: number | null | undefined;
418
419
  count?: number | null | undefined;
419
- region?: string | null | undefined;
420
420
  }>, {}> & import("mongoose").FlatRecord<{
421
421
  subscribers: string[];
422
422
  is_used: boolean;
423
+ region?: string | null | undefined;
423
424
  geo_text?: string | null | undefined;
424
425
  timestamp?: number | null | undefined;
425
426
  count?: number | null | undefined;
426
- region?: string | null | undefined;
427
427
  }> & {
428
428
  _id: import("mongoose").Types.ObjectId;
429
429
  } & {
@@ -439,26 +439,26 @@ export declare const MongoGeoSelectionSchema: Schema<any, import("mongoose").Mod
439
439
  };
440
440
  }, {
441
441
  geos: string[];
442
- region?: string | null | undefined;
443
- type?: string | null | undefined;
444
442
  title?: string | null | undefined;
445
443
  description?: string | null | undefined;
444
+ type?: string | null | undefined;
445
+ region?: string | null | undefined;
446
446
  created_at?: number | null | undefined;
447
447
  updated_at?: number | null | undefined;
448
448
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
449
449
  geos: string[];
450
- region?: string | null | undefined;
451
- type?: string | null | undefined;
452
450
  title?: string | null | undefined;
453
451
  description?: string | null | undefined;
452
+ type?: string | null | undefined;
453
+ region?: string | null | undefined;
454
454
  created_at?: number | null | undefined;
455
455
  updated_at?: number | null | undefined;
456
456
  }>, {}> & import("mongoose").FlatRecord<{
457
457
  geos: string[];
458
- region?: string | null | undefined;
459
- type?: string | null | undefined;
460
458
  title?: string | null | undefined;
461
459
  description?: string | null | undefined;
460
+ type?: string | null | undefined;
461
+ region?: string | null | undefined;
462
462
  created_at?: number | null | undefined;
463
463
  updated_at?: number | null | undefined;
464
464
  }> & {
package/dist/types.d.ts CHANGED
@@ -2,6 +2,9 @@ import { z } from 'zod';
2
2
  export declare const platformsList: readonly ["telegram", "facebook", "instagram", "tiktok", "website", "document", "other"];
3
3
  export declare const statusList: readonly ["approved", "back_to_business", "pending", "inactive", "in_review"];
4
4
  export declare const generalStatusList: readonly ["active", "inactive"];
5
+ export interface GeoSelectionByRegion {
6
+ [region: string]: GeoSelectionType[];
7
+ }
5
8
  export declare const zodGeoSchema: z.ZodObject<{
6
9
  _id: z.ZodOptional<z.ZodString>;
7
10
  geo_text: z.ZodOptional<z.ZodString>;
@@ -13,17 +16,17 @@ export declare const zodGeoSchema: z.ZodObject<{
13
16
  }, "strip", z.ZodTypeAny, {
14
17
  is_used: boolean;
15
18
  _id?: string | undefined;
19
+ region?: string | undefined;
16
20
  geo_text?: string | undefined;
17
21
  timestamp?: number | undefined;
18
22
  count?: number | undefined;
19
- region?: string | undefined;
20
23
  subscribers?: string[] | undefined;
21
24
  }, {
22
25
  _id?: string | undefined;
26
+ region?: string | undefined;
23
27
  geo_text?: string | undefined;
24
28
  timestamp?: number | undefined;
25
29
  count?: number | undefined;
26
- region?: string | undefined;
27
30
  subscribers?: string[] | undefined;
28
31
  is_used?: boolean | undefined;
29
32
  }>;
@@ -38,20 +41,20 @@ export declare const zodGeoSelectionSchema: z.ZodObject<{
38
41
  updated_at: z.ZodOptional<z.ZodNumber>;
39
42
  }, "strip", z.ZodTypeAny, {
40
43
  _id?: string | undefined;
41
- region?: string | undefined;
42
- type?: string | undefined;
43
44
  title?: string | undefined;
44
45
  description?: string | undefined;
46
+ type?: string | undefined;
45
47
  geos?: string[] | undefined;
48
+ region?: string | undefined;
46
49
  created_at?: number | undefined;
47
50
  updated_at?: number | undefined;
48
51
  }, {
49
52
  _id?: string | undefined;
50
- region?: string | undefined;
51
- type?: string | undefined;
52
53
  title?: string | undefined;
53
54
  description?: string | undefined;
55
+ type?: string | undefined;
54
56
  geos?: string[] | undefined;
57
+ region?: string | undefined;
55
58
  created_at?: number | undefined;
56
59
  updated_at?: number | undefined;
57
60
  }>;
@@ -84,11 +87,11 @@ export declare const zodSourceSchema: z.ZodObject<{
84
87
  source_name: string;
85
88
  is_public: boolean;
86
89
  _id?: string | undefined;
87
- subscribers?: string[] | undefined;
88
90
  title?: string | undefined;
89
91
  description?: string | undefined;
90
92
  created_at?: number | undefined;
91
93
  updated_at?: number | undefined;
94
+ subscribers?: string[] | undefined;
92
95
  source_public_id?: string | number | undefined;
93
96
  last_text_id?: number | undefined;
94
97
  url?: string | undefined;
@@ -105,11 +108,11 @@ export declare const zodSourceSchema: z.ZodObject<{
105
108
  source_id: string | number;
106
109
  source_name: string;
107
110
  _id?: string | undefined;
108
- subscribers?: string[] | undefined;
109
111
  title?: string | undefined;
110
112
  description?: string | undefined;
111
113
  created_at?: number | undefined;
112
114
  updated_at?: number | undefined;
115
+ subscribers?: string[] | undefined;
113
116
  source_public_id?: string | number | undefined;
114
117
  last_text_id?: number | undefined;
115
118
  url?: string | undefined;
@@ -162,9 +165,9 @@ export declare const zodDataSchema: z.ZodObject<{
162
165
  pipeline_name: z.ZodOptional<z.ZodString>;
163
166
  source_region: z.ZodOptional<z.ZodString>;
164
167
  }, "strip", z.ZodTypeAny, {
165
- timestamp: number;
166
168
  created_at: number;
167
169
  updated_at: number;
170
+ timestamp: number;
168
171
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
169
172
  source_id: string | number;
170
173
  source_public_id: string | number;
@@ -193,9 +196,9 @@ export declare const zodDataSchema: z.ZodObject<{
193
196
  author_id?: string | undefined;
194
197
  pipeline_name?: string | undefined;
195
198
  }, {
196
- timestamp: number;
197
199
  created_at: number;
198
200
  updated_at: number;
201
+ timestamp: number;
199
202
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
200
203
  source_id: string | number;
201
204
  source_public_id: string | number;
@@ -293,9 +296,9 @@ export declare const zodQuerySchema: z.ZodObject<{
293
296
  end: number | Date;
294
297
  };
295
298
  _id?: string | undefined;
296
- timestamp?: number | undefined;
297
299
  title?: string | undefined;
298
300
  geos?: string[] | undefined;
301
+ timestamp?: number | undefined;
299
302
  query?: string | undefined;
300
303
  sources?: string[] | undefined;
301
304
  geos_ids?: string[] | undefined;
@@ -313,9 +316,9 @@ export declare const zodQuerySchema: z.ZodObject<{
313
316
  end: number | Date;
314
317
  };
315
318
  _id?: string | undefined;
316
- timestamp?: number | undefined;
317
319
  title?: string | undefined;
318
320
  geos?: string[] | undefined;
321
+ timestamp?: number | undefined;
319
322
  query?: string | undefined;
320
323
  sources?: string[] | undefined;
321
324
  geos_ids?: string[] | undefined;
@@ -438,8 +441,8 @@ export declare const zodConversationSchema: z.ZodObject<{
438
441
  }, {
439
442
  user_id: string;
440
443
  _id?: string | undefined;
441
- status?: "inactive" | "active" | undefined;
442
444
  title?: string | undefined;
445
+ status?: "inactive" | "active" | undefined;
443
446
  created_at?: number | Date | undefined;
444
447
  updated_at?: number | Date | undefined;
445
448
  thread_id?: string | undefined;
@@ -500,9 +503,9 @@ export declare const zodJobSchema: z.ZodObject<{
500
503
  end: number | Date;
501
504
  };
502
505
  _id?: string | undefined;
503
- timestamp?: number | undefined;
504
506
  title?: string | undefined;
505
507
  geos?: string[] | undefined;
508
+ timestamp?: number | undefined;
506
509
  query?: string | undefined;
507
510
  sources?: string[] | undefined;
508
511
  geos_ids?: string[] | undefined;
@@ -520,9 +523,9 @@ export declare const zodJobSchema: z.ZodObject<{
520
523
  end: number | Date;
521
524
  };
522
525
  _id?: string | undefined;
523
- timestamp?: number | undefined;
524
526
  title?: string | undefined;
525
527
  geos?: string[] | undefined;
528
+ timestamp?: number | undefined;
526
529
  query?: string | undefined;
527
530
  sources?: string[] | undefined;
528
531
  geos_ids?: string[] | undefined;
@@ -548,9 +551,9 @@ export declare const zodJobSchema: z.ZodObject<{
548
551
  end: number | Date;
549
552
  };
550
553
  _id?: string | undefined;
551
- timestamp?: number | undefined;
552
554
  title?: string | undefined;
553
555
  geos?: string[] | undefined;
556
+ timestamp?: number | undefined;
554
557
  query?: string | undefined;
555
558
  sources?: string[] | undefined;
556
559
  geos_ids?: string[] | undefined;
@@ -582,9 +585,9 @@ export declare const zodJobSchema: z.ZodObject<{
582
585
  end: number | Date;
583
586
  };
584
587
  _id?: string | undefined;
585
- timestamp?: number | undefined;
586
588
  title?: string | undefined;
587
589
  geos?: string[] | undefined;
590
+ timestamp?: number | undefined;
588
591
  query?: string | undefined;
589
592
  sources?: string[] | undefined;
590
593
  geos_ids?: string[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.80",
3
+ "version": "1.0.82",
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
@@ -20,6 +20,9 @@ export const statusList = [
20
20
 
21
21
  export const generalStatusList = ['active', 'inactive'] as const;
22
22
 
23
+ export interface GeoSelectionByRegion {
24
+ [region: string]: GeoSelectionType[];
25
+ }
23
26
 
24
27
  export const zodGeoSchema = z.object({
25
28
  _id: z.string().optional(),