asfur 1.0.4 → 1.0.5

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
@@ -4,7 +4,7 @@ export declare const sourceSchema: z.ZodObject<{
4
4
  _id: z.ZodOptional<z.ZodString>;
5
5
  platform: z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website", "other"]>;
6
6
  source_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
7
- source_public_id: z.ZodOptional<z.ZodString>;
7
+ source_public_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
8
8
  source_name: z.ZodString;
9
9
  last_text_id: z.ZodOptional<z.ZodNumber>;
10
10
  url: z.ZodOptional<z.ZodString>;
@@ -23,7 +23,7 @@ export declare const sourceSchema: z.ZodObject<{
23
23
  source_name: string;
24
24
  created_at: Date;
25
25
  _id?: string | undefined;
26
- source_public_id?: string | undefined;
26
+ source_public_id?: string | number | undefined;
27
27
  last_text_id?: number | undefined;
28
28
  url?: string | undefined;
29
29
  description?: string | undefined;
@@ -39,7 +39,7 @@ export declare const sourceSchema: z.ZodObject<{
39
39
  source_name: string;
40
40
  created_at: Date;
41
41
  _id?: string | undefined;
42
- source_public_id?: string | undefined;
42
+ source_public_id?: string | number | undefined;
43
43
  last_text_id?: number | undefined;
44
44
  url?: string | undefined;
45
45
  description?: string | undefined;
@@ -64,6 +64,7 @@ export declare const sourceSchema: z.ZodObject<{
64
64
  export declare const textSchema: z.ZodObject<{
65
65
  _id: z.ZodOptional<z.ZodString>;
66
66
  source_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
67
+ source_public_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
67
68
  source_name: z.ZodString;
68
69
  platform_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
69
70
  platform: z.ZodEnum<["telegram", "facebook", "instagram", "tiktok", "website", "other"]>;
@@ -95,6 +96,7 @@ export declare const textSchema: z.ZodObject<{
95
96
  }, "strip", z.ZodTypeAny, {
96
97
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "other";
97
98
  source_id: string | number;
99
+ source_public_id: string | number;
98
100
  source_name: string;
99
101
  created_at: number | Date;
100
102
  platform_id: string | number;
@@ -118,6 +120,7 @@ export declare const textSchema: z.ZodObject<{
118
120
  }, {
119
121
  platform: "telegram" | "facebook" | "instagram" | "tiktok" | "website" | "other";
120
122
  source_id: string | number;
123
+ source_public_id: string | number;
121
124
  source_name: string;
122
125
  created_at: number | Date;
123
126
  platform_id: string | number;
package/dist/types.js CHANGED
@@ -14,7 +14,7 @@ exports.sourceSchema = zod_1.z.object({
14
14
  _id: zod_1.z.string().optional(),
15
15
  platform: zod_1.z.enum(exports.platformsList),
16
16
  source_id: zod_1.z.string().or(zod_1.z.number()),
17
- source_public_id: zod_1.z.string().optional(),
17
+ source_public_id: zod_1.z.string().or(zod_1.z.number()).optional(),
18
18
  source_name: zod_1.z.string(),
19
19
  last_text_id: zod_1.z.number().optional(),
20
20
  url: zod_1.z.string().url().optional(),
@@ -42,6 +42,7 @@ exports.sourceSchema = zod_1.z.object({
42
42
  exports.textSchema = zod_1.z.object({
43
43
  _id: zod_1.z.string().optional(),
44
44
  source_id: zod_1.z.string().or(zod_1.z.number()),
45
+ source_public_id: zod_1.z.string().or(zod_1.z.number()),
45
46
  source_name: zod_1.z.string(),
46
47
  platform_id: zod_1.z.string().or(zod_1.z.number()),
47
48
  platform: zod_1.z.enum(exports.platformsList),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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
@@ -13,7 +13,7 @@ export const sourceSchema = z.object({
13
13
  _id: z.string().optional(),
14
14
  platform: z.enum(platformsList), // e.g., 'telegram', 'facebook'
15
15
  source_id: z.string().or(z.number()), // original channel_id
16
- source_public_id: z.string().optional(), // e.g., '@telegram_channel_id'
16
+ source_public_id: z.string().or(z.number()).optional(), // e.g., '@telegram_channel_id'
17
17
  source_name: z.string(), // e.g., 'Telegram Channel Name'
18
18
  last_text_id: z.number().optional(), // last processed text ID
19
19
  url: z.string().url().optional(), // e.g., 'https://t.me/telegram_channel_name'
@@ -43,6 +43,7 @@ export const sourceSchema = z.object({
43
43
  export const textSchema = z.object({
44
44
  _id: z.string().optional(),
45
45
  source_id: z.string().or(z.number()), // INDEX - reference to Source _id (e.g., '60c72b2f9b1e8d3f4c8b4567')
46
+ source_public_id: z.string().or(z.number()), // e.g., 'telegram:1234567890' (message_id)
46
47
  source_name: z.string(), // e.g., 'Telegram Channel Name'
47
48
  platform_id: z.string().or(z.number()), // channel_id reference to Source source_id
48
49
  platform: z.enum(platformsList), // e.g., 'telegram', 'facebook'