asfur 1.0.126 → 1.0.128
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/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/types.d.ts +23 -20
- package/dist/types.js +3 -2
- package/index.ts +1 -0
- package/package.json +1 -1
- package/types.ts +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -791,6 +791,7 @@ export declare const MongoPredefinedQuerySchema: Schema<any, import("mongoose").
|
|
|
791
791
|
query: string;
|
|
792
792
|
geos: string[];
|
|
793
793
|
geos_ids: any[];
|
|
794
|
+
user_id: string;
|
|
794
795
|
created_at: number;
|
|
795
796
|
updated_at: number;
|
|
796
797
|
title?: string | null | undefined;
|
|
@@ -801,6 +802,7 @@ export declare const MongoPredefinedQuerySchema: Schema<any, import("mongoose").
|
|
|
801
802
|
query: string;
|
|
802
803
|
geos: string[];
|
|
803
804
|
geos_ids: any[];
|
|
805
|
+
user_id: string;
|
|
804
806
|
created_at: number;
|
|
805
807
|
updated_at: number;
|
|
806
808
|
title?: string | null | undefined;
|
|
@@ -811,6 +813,7 @@ export declare const MongoPredefinedQuerySchema: Schema<any, import("mongoose").
|
|
|
811
813
|
query: string;
|
|
812
814
|
geos: string[];
|
|
813
815
|
geos_ids: any[];
|
|
816
|
+
user_id: string;
|
|
814
817
|
created_at: number;
|
|
815
818
|
updated_at: number;
|
|
816
819
|
title?: string | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -312,6 +312,7 @@ exports.MongoSendWhatsappSchema = new mongoose_1.Schema({
|
|
|
312
312
|
toObject: { virtuals: true },
|
|
313
313
|
});
|
|
314
314
|
exports.MongoPredefinedQuerySchema = new mongoose_1.Schema({
|
|
315
|
+
user_id: { type: String, required: true },
|
|
315
316
|
title: { type: String },
|
|
316
317
|
query: { type: String, required: true },
|
|
317
318
|
geos: { type: [String] },
|
package/dist/types.d.ts
CHANGED
|
@@ -2065,6 +2065,7 @@ export declare const zodSendWhatsappSchema: z.ZodObject<{
|
|
|
2065
2065
|
}>;
|
|
2066
2066
|
export declare const zodPredefinedQuerySchema: z.ZodObject<{
|
|
2067
2067
|
_id: z.ZodOptional<z.ZodString>;
|
|
2068
|
+
user_id: z.ZodString;
|
|
2068
2069
|
title: z.ZodString;
|
|
2069
2070
|
query: z.ZodString;
|
|
2070
2071
|
geos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -2078,7 +2079,7 @@ export declare const zodPredefinedQuerySchema: z.ZodObject<{
|
|
|
2078
2079
|
_id: string;
|
|
2079
2080
|
name: string;
|
|
2080
2081
|
}>]>, "many">>;
|
|
2081
|
-
time_range: z.ZodUnion<[z.ZodObject<{
|
|
2082
|
+
time_range: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
2082
2083
|
type: z.ZodLiteral<"relative">;
|
|
2083
2084
|
time: z.ZodEnum<["last_30_minutes", "last_1_hour", "last_2_hours", "last_6_hours", "last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
2084
2085
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2099,43 +2100,37 @@ export declare const zodPredefinedQuerySchema: z.ZodObject<{
|
|
|
2099
2100
|
type: "absolute";
|
|
2100
2101
|
start: number;
|
|
2101
2102
|
end: number;
|
|
2102
|
-
}>]
|
|
2103
|
+
}>]>>;
|
|
2103
2104
|
user_instructions: z.ZodOptional<z.ZodString>;
|
|
2104
|
-
status: z.ZodDefault<z.ZodEnum<["active", "inactive"]
|
|
2105
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["active", "inactive"]>>>;
|
|
2105
2106
|
created_at: z.ZodOptional<z.ZodNumber>;
|
|
2106
2107
|
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
2107
2108
|
}, "strip", z.ZodTypeAny, {
|
|
2108
|
-
status: "active" | "inactive";
|
|
2109
2109
|
title: string;
|
|
2110
2110
|
query: string;
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
2114
|
-
} | {
|
|
2115
|
-
type: "absolute";
|
|
2116
|
-
start: number;
|
|
2117
|
-
end: number;
|
|
2118
|
-
};
|
|
2111
|
+
user_id: string;
|
|
2112
|
+
status?: "active" | "inactive" | undefined;
|
|
2119
2113
|
_id?: string | undefined;
|
|
2120
2114
|
geos?: string[] | undefined;
|
|
2121
2115
|
geos_ids?: (string | {
|
|
2122
2116
|
_id: string;
|
|
2123
2117
|
name: string;
|
|
2124
2118
|
})[] | undefined;
|
|
2125
|
-
|
|
2126
|
-
created_at?: number | undefined;
|
|
2127
|
-
updated_at?: number | undefined;
|
|
2128
|
-
}, {
|
|
2129
|
-
title: string;
|
|
2130
|
-
query: string;
|
|
2131
|
-
time_range: {
|
|
2119
|
+
time_range?: {
|
|
2132
2120
|
type: "relative";
|
|
2133
2121
|
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
2134
2122
|
} | {
|
|
2135
2123
|
type: "absolute";
|
|
2136
2124
|
start: number;
|
|
2137
2125
|
end: number;
|
|
2138
|
-
};
|
|
2126
|
+
} | undefined;
|
|
2127
|
+
user_instructions?: string | undefined;
|
|
2128
|
+
created_at?: number | undefined;
|
|
2129
|
+
updated_at?: number | undefined;
|
|
2130
|
+
}, {
|
|
2131
|
+
title: string;
|
|
2132
|
+
query: string;
|
|
2133
|
+
user_id: string;
|
|
2139
2134
|
status?: "active" | "inactive" | undefined;
|
|
2140
2135
|
_id?: string | undefined;
|
|
2141
2136
|
geos?: string[] | undefined;
|
|
@@ -2143,6 +2138,14 @@ export declare const zodPredefinedQuerySchema: z.ZodObject<{
|
|
|
2143
2138
|
_id: string;
|
|
2144
2139
|
name: string;
|
|
2145
2140
|
})[] | undefined;
|
|
2141
|
+
time_range?: {
|
|
2142
|
+
type: "relative";
|
|
2143
|
+
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
2144
|
+
} | {
|
|
2145
|
+
type: "absolute";
|
|
2146
|
+
start: number;
|
|
2147
|
+
end: number;
|
|
2148
|
+
} | undefined;
|
|
2146
2149
|
user_instructions?: string | undefined;
|
|
2147
2150
|
created_at?: number | undefined;
|
|
2148
2151
|
updated_at?: number | undefined;
|
package/dist/types.js
CHANGED
|
@@ -295,15 +295,16 @@ exports.zodSendWhatsappSchema = zod_1.z.object({
|
|
|
295
295
|
});
|
|
296
296
|
exports.zodPredefinedQuerySchema = zod_1.z.object({
|
|
297
297
|
_id: zod_1.z.string().optional(),
|
|
298
|
+
user_id: zod_1.z.string().nonempty('User ID must be provided'),
|
|
298
299
|
title: zod_1.z.string().nonempty('Predefined query title must be provided'),
|
|
299
300
|
query: zod_1.z.string().nonempty('Predefined query must be provided'),
|
|
300
301
|
geos: zod_1.z.array(zod_1.z.string()).optional(),
|
|
301
302
|
geos_ids: zod_1.z
|
|
302
303
|
.array(zod_1.z.string().or(zod_1.z.object({ _id: zod_1.z.string(), name: zod_1.z.string() })))
|
|
303
304
|
.optional(),
|
|
304
|
-
time_range: exports.zodRelativeTimeRangeSchema.or(exports.zodAbsoluteTimeRangeSchema),
|
|
305
|
+
time_range: exports.zodRelativeTimeRangeSchema.or(exports.zodAbsoluteTimeRangeSchema).optional(),
|
|
305
306
|
user_instructions: zod_1.z.string().optional(),
|
|
306
|
-
status: zod_1.z.enum(exports.generalStatusList).default('active'),
|
|
307
|
+
status: zod_1.z.enum(exports.generalStatusList).default('active').optional(),
|
|
307
308
|
created_at: zod_1.z.number().optional(),
|
|
308
309
|
updated_at: zod_1.z.number().optional(), // last update date
|
|
309
310
|
});
|
package/index.ts
CHANGED
|
@@ -359,6 +359,7 @@ export const MongoSendWhatsappSchema = new Schema(
|
|
|
359
359
|
|
|
360
360
|
export const MongoPredefinedQuerySchema = new Schema(
|
|
361
361
|
{
|
|
362
|
+
user_id: { type: String, required: true }, // user identifier
|
|
362
363
|
title: { type: String }, // title of the predefined query
|
|
363
364
|
query: { type: String, required: true }, // the actual predefined query
|
|
364
365
|
geos: { type: [String] }, // array of geo strings
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -348,15 +348,16 @@ export const zodSendWhatsappSchema = z.object({
|
|
|
348
348
|
|
|
349
349
|
export const zodPredefinedQuerySchema = z.object({
|
|
350
350
|
_id: z.string().optional(),
|
|
351
|
+
user_id: z.string().nonempty('User ID must be provided'), // user identifier
|
|
351
352
|
title: z.string().nonempty('Predefined query title must be provided'), // title of the predefined query
|
|
352
353
|
query: z.string().nonempty('Predefined query must be provided'), // the actual predefined query
|
|
353
354
|
geos: z.array(z.string()).optional(), // array of geo strings
|
|
354
355
|
geos_ids: z
|
|
355
356
|
.array(z.string().or(z.object({ _id: z.string(), name: z.string() })))
|
|
356
357
|
.optional(), // array of geo _id strings
|
|
357
|
-
time_range: zodRelativeTimeRangeSchema.or(zodAbsoluteTimeRangeSchema), // optional time range for the predefined query
|
|
358
|
+
time_range: zodRelativeTimeRangeSchema.or(zodAbsoluteTimeRangeSchema).optional(), // optional time range for the predefined query
|
|
358
359
|
user_instructions: z.string().optional(), // optional user instructions for the predefined query
|
|
359
|
-
status: z.enum(generalStatusList).default('active'), // status of the predefined query
|
|
360
|
+
status: z.enum(generalStatusList).default('active').optional(), // status of the predefined query
|
|
360
361
|
created_at: z.number().optional(), // creation date
|
|
361
362
|
updated_at: z.number().optional(), // last update date
|
|
362
363
|
});
|