asfur 1.0.7 → 1.0.9

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
@@ -149,37 +149,37 @@ export declare const zodDataSchema: z.ZodObject<{
149
149
  }[] | undefined;
150
150
  }>;
151
151
  export declare const zodQuerySchema: z.ZodObject<{
152
- sources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
153
- query: z.ZodOptional<z.ZodString>;
154
- time_range: z.ZodOptional<z.ZodObject<{
155
- start: z.ZodOptional<z.ZodDate>;
156
- end: z.ZodOptional<z.ZodDate>;
152
+ sources: z.ZodArray<z.ZodString, "many">;
153
+ query: z.ZodString;
154
+ time_range: z.ZodObject<{
155
+ start: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
156
+ end: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
157
157
  }, "strip", z.ZodTypeAny, {
158
- start?: Date | undefined;
159
- end?: Date | undefined;
158
+ start: number | Date;
159
+ end: number | Date;
160
160
  }, {
161
- start?: Date | undefined;
162
- end?: Date | undefined;
163
- }>>;
164
- user_id: z.ZodOptional<z.ZodString>;
161
+ start: number | Date;
162
+ end: number | Date;
163
+ }>;
164
+ user_id: z.ZodString;
165
165
  thread_id: z.ZodOptional<z.ZodString>;
166
166
  }, "strip", z.ZodTypeAny, {
167
- sources?: string[] | undefined;
168
- query?: string | undefined;
169
- time_range?: {
170
- start?: Date | undefined;
171
- end?: Date | undefined;
172
- } | undefined;
173
- user_id?: string | undefined;
167
+ sources: string[];
168
+ query: string;
169
+ time_range: {
170
+ start: number | Date;
171
+ end: number | Date;
172
+ };
173
+ user_id: string;
174
174
  thread_id?: string | undefined;
175
175
  }, {
176
- sources?: string[] | undefined;
177
- query?: string | undefined;
178
- time_range?: {
179
- start?: Date | undefined;
180
- end?: Date | undefined;
181
- } | undefined;
182
- user_id?: string | undefined;
176
+ sources: string[];
177
+ query: string;
178
+ time_range: {
179
+ start: number | Date;
180
+ end: number | Date;
181
+ };
182
+ user_id: string;
183
183
  thread_id?: string | undefined;
184
184
  }>;
185
185
  export type SourceType = z.infer<typeof zodSourceSchema>;
package/dist/types.js CHANGED
@@ -70,14 +70,12 @@ exports.zodDataSchema = zod_1.z.object({
70
70
  .optional(), // media attachments
71
71
  });
72
72
  exports.zodQuerySchema = zod_1.z.object({
73
- sources: zod_1.z.array(zod_1.z.string()).optional(),
74
- query: zod_1.z.string().optional(),
75
- time_range: zod_1.z
76
- .object({
77
- start: zod_1.z.coerce.date().optional(),
78
- end: zod_1.z.coerce.date().optional(), // end date
79
- })
80
- .optional(),
81
- user_id: zod_1.z.string().optional(),
73
+ sources: zod_1.z.array(zod_1.z.string()),
74
+ query: zod_1.z.string(),
75
+ time_range: zod_1.z.object({
76
+ start: zod_1.z.coerce.date().or(zod_1.z.number()),
77
+ end: zod_1.z.coerce.date().or(zod_1.z.number()), // end date
78
+ }),
79
+ user_id: zod_1.z.string(),
82
80
  thread_id: zod_1.z.string().optional(), // optional thread identifier
83
81
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
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
@@ -74,15 +74,13 @@ export const zodDataSchema = z.object({
74
74
  });
75
75
 
76
76
  export const zodQuerySchema = z.object({
77
- sources: z.array(z.string()).optional(), // array of source _id strings
78
- query: z.string().optional(), // search query includes geo information where it should be extracted with LLM
79
- time_range: z
80
- .object({
81
- start: z.coerce.date().optional(), // start date
82
- end: z.coerce.date().optional(), // end date
83
- })
84
- .optional(),
85
- user_id: z.string().optional(), // optional user identifier
77
+ sources: z.array(z.string()), // array of source _id strings
78
+ query: z.string(), // search query includes geo information where it should be extracted with LLM
79
+ time_range: z.object({
80
+ start: z.coerce.date().or(z.number()), // start date
81
+ end: z.coerce.date().or(z.number()), // end date
82
+ }),
83
+ user_id: z.string(), // user identifier
86
84
  thread_id: z.string().optional(), // optional thread identifier
87
85
  });
88
86