asfur 1.0.51 → 1.0.53

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/types.d.ts CHANGED
@@ -18,16 +18,16 @@ 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.ZodDate;
22
- updated_at: z.ZodOptional<z.ZodDate>;
21
+ created_at: z.ZodOptional<z.ZodNumber>;
22
+ updated_at: z.ZodOptional<z.ZodNumber>;
23
23
  user_id: z.ZodOptional<z.ZodString>;
24
+ subscribers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
24
25
  }, "strip", z.ZodTypeAny, {
25
26
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
26
27
  status: "approved" | "pending" | "inactive" | "in_review";
27
28
  source_id: string | number;
28
29
  source_name: string;
29
30
  is_public: boolean;
30
- created_at: Date;
31
31
  _id?: string | undefined;
32
32
  title?: string | undefined;
33
33
  source_public_id?: string | number | undefined;
@@ -38,14 +38,15 @@ export declare const zodSourceSchema: z.ZodObject<{
38
38
  source_geo?: string | undefined;
39
39
  tags?: string[] | undefined;
40
40
  metadata?: Record<string, any> | undefined;
41
- updated_at?: Date | undefined;
41
+ created_at?: number | undefined;
42
+ updated_at?: number | undefined;
42
43
  user_id?: string | undefined;
44
+ subscribers?: string[] | undefined;
43
45
  }, {
44
46
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
45
47
  status: "approved" | "pending" | "inactive" | "in_review";
46
48
  source_id: string | number;
47
49
  source_name: string;
48
- created_at: Date;
49
50
  _id?: string | undefined;
50
51
  title?: string | undefined;
51
52
  source_public_id?: string | number | undefined;
@@ -57,8 +58,10 @@ export declare const zodSourceSchema: z.ZodObject<{
57
58
  tags?: string[] | undefined;
58
59
  is_public?: boolean | undefined;
59
60
  metadata?: Record<string, any> | undefined;
60
- updated_at?: Date | undefined;
61
+ created_at?: number | undefined;
62
+ updated_at?: number | undefined;
61
63
  user_id?: string | undefined;
64
+ subscribers?: string[] | undefined;
62
65
  }>;
63
66
  export declare const zodDataSchema: z.ZodObject<{
64
67
  _id: z.ZodOptional<z.ZodString>;
@@ -92,6 +95,7 @@ export declare const zodDataSchema: z.ZodObject<{
92
95
  url: string;
93
96
  caption?: string | undefined;
94
97
  }>, "many">>;
98
+ author: z.ZodOptional<z.ZodString>;
95
99
  }, "strip", z.ZodTypeAny, {
96
100
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
97
101
  source_id: string | number;
@@ -116,6 +120,7 @@ export declare const zodDataSchema: z.ZodObject<{
116
120
  url: string;
117
121
  caption?: string | undefined;
118
122
  }[] | undefined;
123
+ author?: string | undefined;
119
124
  }, {
120
125
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "document" | "other";
121
126
  source_id: string | number;
@@ -140,6 +145,7 @@ export declare const zodDataSchema: z.ZodObject<{
140
145
  url: string;
141
146
  caption?: string | undefined;
142
147
  }[] | undefined;
148
+ author?: string | undefined;
143
149
  }>;
144
150
  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"];
145
151
  export declare const zodRelativeTimeRangeSchema: z.ZodObject<{
package/dist/types.js CHANGED
@@ -34,9 +34,10 @@ 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.coerce.date(),
38
- updated_at: zod_1.z.coerce.date().optional(),
39
- user_id: zod_1.z.string().optional(), // user identifier
37
+ created_at: zod_1.z.number().optional(),
38
+ updated_at: zod_1.z.number().optional(),
39
+ user_id: zod_1.z.string().optional(),
40
+ subscribers: zod_1.z.array(zod_1.z.string()).optional(), // array of user IDs who subscribed to this source
40
41
  });
41
42
  exports.zodDataSchema = zod_1.z.object({
42
43
  _id: zod_1.z.string().optional(),
@@ -63,7 +64,8 @@ exports.zodDataSchema = zod_1.z.object({
63
64
  url: zod_1.z.string().url(),
64
65
  caption: zod_1.z.string().optional(),
65
66
  }))
66
- .optional(), // media attachments
67
+ .optional(),
68
+ author: zod_1.z.string().optional(), // e.g., author name or ID
67
69
  });
68
70
  exports.relativeTimeRangeList = [
69
71
  // 'last_10_minutes',
package/index.ts CHANGED
@@ -2,16 +2,7 @@
2
2
  export * from './types';
3
3
 
4
4
  import { Schema } from 'mongoose';
5
- import {
6
- ConversationType,
7
- DataType,
8
- generalStatusList,
9
- InstructionsType,
10
- JobType,
11
- QueryType,
12
- SourceType,
13
- UserSettingsType,
14
- } from './types';
5
+ import { generalStatusList } from './types';
15
6
 
16
7
  export const MongoDataSchema = new Schema(
17
8
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
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
@@ -35,9 +35,10 @@ 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.coerce.date(),
39
- updated_at: z.coerce.date().optional(),
38
+ created_at: z.number().optional(),
39
+ updated_at: z.number().optional(),
40
40
  user_id: z.string().optional(), // user identifier
41
+ subscribers: z.array(z.string()).optional(), // array of user IDs who subscribed to this source
41
42
  });
42
43
 
43
44
  export const zodDataSchema = z.object({
@@ -68,6 +69,7 @@ export const zodDataSchema = z.object({
68
69
  })
69
70
  )
70
71
  .optional(), // media attachments
72
+ author: z.string().optional(), // e.g., author name or ID
71
73
  });
72
74
 
73
75
  export const relativeTimeRangeList = [