asfur 1.0.11 → 1.0.13

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
@@ -185,6 +185,17 @@ export declare const zodQuerySchema: z.ZodObject<{
185
185
  user_instructions?: string | undefined;
186
186
  thread_id?: string | undefined;
187
187
  }>;
188
+ export declare const zodInstructionsSchema: z.ZodObject<{
189
+ user_id: z.ZodString;
190
+ prompt: z.ZodString;
191
+ }, "strip", z.ZodTypeAny, {
192
+ user_id: string;
193
+ prompt: string;
194
+ }, {
195
+ user_id: string;
196
+ prompt: string;
197
+ }>;
188
198
  export type SourceType = z.infer<typeof zodSourceSchema>;
189
199
  export type DataType = z.infer<typeof zodDataSchema>;
190
200
  export type QueryType = z.infer<typeof zodQuerySchema>;
201
+ export type InstructionsType = z.infer<typeof zodInstructionsSchema>;
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zodQuerySchema = exports.zodDataSchema = exports.zodSourceSchema = exports.platformsList = void 0;
3
+ exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodDataSchema = exports.zodSourceSchema = exports.platformsList = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.platformsList = [
6
6
  'telegram',
@@ -70,7 +70,7 @@ 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()).min(1, 'Must include at least one source ID'),
73
+ sources: zod_1.z.array(zod_1.z.string()),
74
74
  query: zod_1.z.string().nonempty('Query cannot be empty'),
75
75
  user_instructions: zod_1.z.string().optional(),
76
76
  time_range: zod_1.z.object({
@@ -80,3 +80,7 @@ exports.zodQuerySchema = zod_1.z.object({
80
80
  user_id: zod_1.z.string().nonempty('User ID must be provided'),
81
81
  thread_id: zod_1.z.string().optional(), // optional thread identifier
82
82
  });
83
+ exports.zodInstructionsSchema = zod_1.z.object({
84
+ user_id: zod_1.z.string().nonempty('User ID must be provided'),
85
+ prompt: zod_1.z.string().nonempty('Prompt cannot be empty'), // user prompt
86
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
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,7 +74,7 @@ export const zodDataSchema = z.object({
74
74
  });
75
75
 
76
76
  export const zodQuerySchema = z.object({
77
- sources: z.array(z.string()).min(1, 'Must include at least one source ID'), // array of source _id strings
77
+ sources: z.array(z.string()), // array of source _id strings
78
78
  query: z.string().nonempty('Query cannot be empty'), // search query includes geo information where it should be extracted with LLM
79
79
  user_instructions: z.string().optional(), // optional user instructions for the query
80
80
  time_range: z.object({
@@ -85,6 +85,12 @@ export const zodQuerySchema = z.object({
85
85
  thread_id: z.string().optional(), // optional thread identifier
86
86
  });
87
87
 
88
+ export const zodInstructionsSchema = z.object({
89
+ user_id: z.string().nonempty('User ID must be provided'), // user identifier
90
+ prompt: z.string().nonempty('Prompt cannot be empty'), // user prompt
91
+ })
92
+
88
93
  export type SourceType = z.infer<typeof zodSourceSchema>;
89
94
  export type DataType = z.infer<typeof zodDataSchema>;
90
95
  export type QueryType = z.infer<typeof zodQuerySchema>;
96
+ export type InstructionsType = z.infer<typeof zodInstructionsSchema>;