asfur 1.0.32 → 1.0.33
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 +126 -0
- package/dist/types.js +12 -1
- package/package.json +1 -1
- package/types.ts +13 -0
package/dist/types.d.ts
CHANGED
|
@@ -329,6 +329,131 @@ export declare const zodConversationSchema: z.ZodObject<{
|
|
|
329
329
|
updated_at?: number | Date | undefined;
|
|
330
330
|
thread_id?: string | undefined;
|
|
331
331
|
}>;
|
|
332
|
+
export declare const zodAutomationJobSchema: z.ZodObject<{
|
|
333
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
334
|
+
job_name: z.ZodString;
|
|
335
|
+
job_description: z.ZodOptional<z.ZodString>;
|
|
336
|
+
created_at: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNumber]>>;
|
|
337
|
+
updated_at: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNumber]>>;
|
|
338
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
339
|
+
status: z.ZodDefault<z.ZodEnum<["active", "inactive"]>>;
|
|
340
|
+
user_id: z.ZodString;
|
|
341
|
+
query: z.ZodObject<{
|
|
342
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
343
|
+
title: z.ZodOptional<z.ZodString>;
|
|
344
|
+
query: z.ZodOptional<z.ZodString>;
|
|
345
|
+
sources: z.ZodArray<z.ZodString, "many">;
|
|
346
|
+
time_range: z.ZodUnion<[z.ZodObject<{
|
|
347
|
+
type: z.ZodLiteral<"relative">;
|
|
348
|
+
time: z.ZodEnum<["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
349
|
+
}, "strip", z.ZodTypeAny, {
|
|
350
|
+
type: "relative";
|
|
351
|
+
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
352
|
+
}, {
|
|
353
|
+
type: "relative";
|
|
354
|
+
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
355
|
+
}>, z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"absolute">;
|
|
357
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
|
|
358
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
|
|
359
|
+
}, "strip", z.ZodTypeAny, {
|
|
360
|
+
type: "absolute";
|
|
361
|
+
start: number | Date;
|
|
362
|
+
end: number | Date;
|
|
363
|
+
}, {
|
|
364
|
+
type: "absolute";
|
|
365
|
+
start: number | Date;
|
|
366
|
+
end: number | Date;
|
|
367
|
+
}>]>;
|
|
368
|
+
user_instructions: z.ZodOptional<z.ZodString>;
|
|
369
|
+
user_id: z.ZodString;
|
|
370
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
user_id: string;
|
|
373
|
+
sources: string[];
|
|
374
|
+
time_range: {
|
|
375
|
+
type: "relative";
|
|
376
|
+
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
377
|
+
} | {
|
|
378
|
+
type: "absolute";
|
|
379
|
+
start: number | Date;
|
|
380
|
+
end: number | Date;
|
|
381
|
+
};
|
|
382
|
+
_id?: string | undefined;
|
|
383
|
+
title?: string | undefined;
|
|
384
|
+
query?: string | undefined;
|
|
385
|
+
user_instructions?: string | undefined;
|
|
386
|
+
thread_id?: string | undefined;
|
|
387
|
+
}, {
|
|
388
|
+
user_id: string;
|
|
389
|
+
sources: string[];
|
|
390
|
+
time_range: {
|
|
391
|
+
type: "relative";
|
|
392
|
+
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
393
|
+
} | {
|
|
394
|
+
type: "absolute";
|
|
395
|
+
start: number | Date;
|
|
396
|
+
end: number | Date;
|
|
397
|
+
};
|
|
398
|
+
_id?: string | undefined;
|
|
399
|
+
title?: string | undefined;
|
|
400
|
+
query?: string | undefined;
|
|
401
|
+
user_instructions?: string | undefined;
|
|
402
|
+
thread_id?: string | undefined;
|
|
403
|
+
}>;
|
|
404
|
+
}, "strip", z.ZodTypeAny, {
|
|
405
|
+
status: "inactive" | "active";
|
|
406
|
+
user_id: string;
|
|
407
|
+
query: {
|
|
408
|
+
user_id: string;
|
|
409
|
+
sources: string[];
|
|
410
|
+
time_range: {
|
|
411
|
+
type: "relative";
|
|
412
|
+
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
413
|
+
} | {
|
|
414
|
+
type: "absolute";
|
|
415
|
+
start: number | Date;
|
|
416
|
+
end: number | Date;
|
|
417
|
+
};
|
|
418
|
+
_id?: string | undefined;
|
|
419
|
+
title?: string | undefined;
|
|
420
|
+
query?: string | undefined;
|
|
421
|
+
user_instructions?: string | undefined;
|
|
422
|
+
thread_id?: string | undefined;
|
|
423
|
+
};
|
|
424
|
+
job_name: string;
|
|
425
|
+
_id?: string | undefined;
|
|
426
|
+
created_at?: number | Date | undefined;
|
|
427
|
+
updated_at?: number | Date | undefined;
|
|
428
|
+
job_description?: string | undefined;
|
|
429
|
+
schedule?: string | undefined;
|
|
430
|
+
}, {
|
|
431
|
+
user_id: string;
|
|
432
|
+
query: {
|
|
433
|
+
user_id: string;
|
|
434
|
+
sources: string[];
|
|
435
|
+
time_range: {
|
|
436
|
+
type: "relative";
|
|
437
|
+
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
438
|
+
} | {
|
|
439
|
+
type: "absolute";
|
|
440
|
+
start: number | Date;
|
|
441
|
+
end: number | Date;
|
|
442
|
+
};
|
|
443
|
+
_id?: string | undefined;
|
|
444
|
+
title?: string | undefined;
|
|
445
|
+
query?: string | undefined;
|
|
446
|
+
user_instructions?: string | undefined;
|
|
447
|
+
thread_id?: string | undefined;
|
|
448
|
+
};
|
|
449
|
+
job_name: string;
|
|
450
|
+
_id?: string | undefined;
|
|
451
|
+
status?: "inactive" | "active" | undefined;
|
|
452
|
+
created_at?: number | Date | undefined;
|
|
453
|
+
updated_at?: number | Date | undefined;
|
|
454
|
+
job_description?: string | undefined;
|
|
455
|
+
schedule?: string | undefined;
|
|
456
|
+
}>;
|
|
332
457
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
|
333
458
|
export type DataType = z.infer<typeof zodDataSchema>;
|
|
334
459
|
export type QueryType = z.infer<typeof zodQuerySchema>;
|
|
@@ -340,3 +465,4 @@ export type RelativeTimeRangeType = (typeof relativeTimeRangeList)[number];
|
|
|
340
465
|
export type AddSourceToReviewType = Pick<SourceType, 'platform' | 'url' | 'description' | 'source_public_id'>;
|
|
341
466
|
export type UserSettingsType = z.infer<typeof zodUserSettingsSchema>;
|
|
342
467
|
export type ConversationType = z.infer<typeof zodConversationSchema>;
|
|
468
|
+
export type AutomationJobType = z.infer<typeof zodAutomationJobSchema>;
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.generalStatusList = exports.statusList = exports.platformsList = void 0;
|
|
3
|
+
exports.zodAutomationJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.generalStatusList = exports.statusList = exports.platformsList = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.platformsList = [
|
|
6
6
|
'telegram',
|
|
@@ -121,3 +121,14 @@ exports.zodConversationSchema = zod_1.z.object({
|
|
|
121
121
|
created_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
122
122
|
updated_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(), // last update date
|
|
123
123
|
});
|
|
124
|
+
exports.zodAutomationJobSchema = zod_1.z.object({
|
|
125
|
+
_id: zod_1.z.string().optional(),
|
|
126
|
+
job_name: zod_1.z.string().nonempty('Job name must be provided'),
|
|
127
|
+
job_description: zod_1.z.string().optional(),
|
|
128
|
+
created_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
129
|
+
updated_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
130
|
+
schedule: zod_1.z.string().optional(),
|
|
131
|
+
status: zod_1.z.enum(exports.generalStatusList).default('active'),
|
|
132
|
+
user_id: zod_1.z.string().nonempty('User ID must be provided'),
|
|
133
|
+
query: exports.zodQuerySchema, // query associated with the job
|
|
134
|
+
});
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -133,6 +133,18 @@ export const zodConversationSchema = z.object({
|
|
|
133
133
|
updated_at: z.coerce.date().or(z.number()).optional(), // last update date
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
+
export const zodAutomationJobSchema = z.object({
|
|
137
|
+
_id: z.string().optional(),
|
|
138
|
+
job_name: z.string().nonempty('Job name must be provided'), // name of the automation job
|
|
139
|
+
job_description: z.string().optional(), // optional description for the job
|
|
140
|
+
created_at: z.coerce.date().or(z.number()).optional(), // creation date
|
|
141
|
+
updated_at: z.coerce.date().or(z.number()).optional(), // last update date
|
|
142
|
+
schedule: z.string().optional(), // cron schedule for the job
|
|
143
|
+
status: z.enum(generalStatusList).default('active'), // status of the job
|
|
144
|
+
user_id: z.string().nonempty('User ID must be provided'), // user identifier
|
|
145
|
+
query: zodQuerySchema, // query associated with the job
|
|
146
|
+
});
|
|
147
|
+
|
|
136
148
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
|
137
149
|
export type DataType = z.infer<typeof zodDataSchema>;
|
|
138
150
|
export type QueryType = z.infer<typeof zodQuerySchema>;
|
|
@@ -149,3 +161,4 @@ export type AddSourceToReviewType = Pick<
|
|
|
149
161
|
>;
|
|
150
162
|
export type UserSettingsType = z.infer<typeof zodUserSettingsSchema>;
|
|
151
163
|
export type ConversationType = z.infer<typeof zodConversationSchema>;
|
|
164
|
+
export type AutomationJobType = z.infer<typeof zodAutomationJobSchema>;
|