asfur 1.0.23 → 1.0.24

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
@@ -140,6 +140,7 @@ export declare const zodDataSchema: z.ZodObject<{
140
140
  caption?: string | undefined;
141
141
  }[] | undefined;
142
142
  }>;
143
+ export declare const relativeTimeRangeList: readonly ["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"];
143
144
  export declare const zodRelativeTimeRangeSchema: z.ZodObject<{
144
145
  type: z.ZodLiteral<"relative">;
145
146
  time: z.ZodEnum<["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
@@ -303,5 +304,6 @@ export type InstructionsType = z.infer<typeof zodInstructionsSchema>;
303
304
  export type StatusType = (typeof statusList)[number];
304
305
  export type TimeRangeType = z.infer<typeof zodRelativeTimeRangeSchema> | z.infer<typeof zodAbsoluteTimeRangeSchema>;
305
306
  export type TimeRangeTypeLiteral = 'relative' | 'absolute';
307
+ export type RelativeTimeRangeType = (typeof relativeTimeRangeList)[number];
306
308
  export type AddSourceToReviewType = Pick<SourceType, 'platform' | 'url' | 'description' | 'source_public_id'>;
307
309
  export type UserSettingsType = z.infer<typeof zodUserSettingsSchema>;
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.zodDataSchema = exports.zodSourceSchema = exports.statusList = exports.platformsList = void 0;
3
+ exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.statusList = exports.platformsList = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.platformsList = [
6
6
  'telegram',
@@ -64,6 +64,13 @@ exports.zodDataSchema = zod_1.z.object({
64
64
  }))
65
65
  .optional(), // media attachments
66
66
  });
67
+ exports.relativeTimeRangeList = [
68
+ 'last_12_hours',
69
+ 'last_24_hours',
70
+ 'last_48_hours',
71
+ 'last_72_hours',
72
+ 'last_week',
73
+ ];
67
74
  exports.zodRelativeTimeRangeSchema = zod_1.z.object({
68
75
  type: zod_1.z.literal('relative'),
69
76
  time: zod_1.z.enum([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
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
@@ -68,6 +68,14 @@ export const zodDataSchema = z.object({
68
68
  .optional(), // media attachments
69
69
  });
70
70
 
71
+ export const relativeTimeRangeList = [
72
+ 'last_12_hours',
73
+ 'last_24_hours',
74
+ 'last_48_hours',
75
+ 'last_72_hours',
76
+ 'last_week',
77
+ ] as const;
78
+
71
79
  export const zodRelativeTimeRangeSchema = z.object({
72
80
  type: z.literal('relative'),
73
81
  time: z.enum([
@@ -104,7 +112,6 @@ export const zodInstructionsSchema = z.object({
104
112
  updated_at: z.coerce.date().or(z.number()).optional(), // last update date
105
113
  });
106
114
 
107
-
108
115
  export const zodUserSettingsSchema = z.object({
109
116
  _id: z.string().optional(),
110
117
  sources: z.array(z.string()), // array of source _id strings
@@ -121,6 +128,7 @@ export type TimeRangeType =
121
128
  | z.infer<typeof zodRelativeTimeRangeSchema>
122
129
  | z.infer<typeof zodAbsoluteTimeRangeSchema>;
123
130
  export type TimeRangeTypeLiteral = 'relative' | 'absolute';
131
+ export type RelativeTimeRangeType = (typeof relativeTimeRangeList)[number];
124
132
  export type AddSourceToReviewType = Pick<
125
133
  SourceType,
126
134
  'platform' | 'url' | 'description' | 'source_public_id'