asfur 1.0.12 → 1.0.14

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,26 @@ 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
+ _id: z.ZodOptional<z.ZodString>;
190
+ user_id: z.ZodString;
191
+ prompt: z.ZodString;
192
+ created_at: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNumber]>>;
193
+ updated_at: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNumber]>>;
194
+ }, "strip", z.ZodTypeAny, {
195
+ user_id: string;
196
+ prompt: string;
197
+ _id?: string | undefined;
198
+ created_at?: number | Date | undefined;
199
+ updated_at?: number | Date | undefined;
200
+ }, {
201
+ user_id: string;
202
+ prompt: string;
203
+ _id?: string | undefined;
204
+ created_at?: number | Date | undefined;
205
+ updated_at?: number | Date | undefined;
206
+ }>;
188
207
  export type SourceType = z.infer<typeof zodSourceSchema>;
189
208
  export type DataType = z.infer<typeof zodDataSchema>;
190
209
  export type QueryType = z.infer<typeof zodQuerySchema>;
210
+ 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',
@@ -80,3 +80,10 @@ 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
+ _id: zod_1.z.string().optional(),
85
+ user_id: zod_1.z.string().nonempty('User ID must be provided'),
86
+ prompt: zod_1.z.string().nonempty('Prompt cannot be empty'),
87
+ created_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
88
+ updated_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(), // last update date
89
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
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
@@ -85,6 +85,15 @@ 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
+ _id: z.string().optional(),
90
+ user_id: z.string().nonempty('User ID must be provided'), // user identifier
91
+ prompt: z.string().nonempty('Prompt cannot be empty'), // user prompt
92
+ created_at: z.coerce.date().or(z.number()).optional(), // creation date
93
+ updated_at: z.coerce.date().or(z.number()).optional(), // last update date
94
+ })
95
+
88
96
  export type SourceType = z.infer<typeof zodSourceSchema>;
89
97
  export type DataType = z.infer<typeof zodDataSchema>;
90
98
  export type QueryType = z.infer<typeof zodQuerySchema>;
99
+ export type InstructionsType = z.infer<typeof zodInstructionsSchema>;