mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 04:48:51 +00:00
fix: change payloadPatternSchema to camel case
This commit is contained in:
parent
22007e451a
commit
a6d4f78c39
@ -10,13 +10,13 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
import { PayloadType } from './message';
|
import { PayloadType } from './message';
|
||||||
|
|
||||||
export const PayloadPatternSchema = z.object({
|
export const payloadPatternSchema = z.object({
|
||||||
label: z.string(),
|
label: z.string(),
|
||||||
value: z.string(),
|
value: z.string(),
|
||||||
type: z.nativeEnum(PayloadType).optional(),
|
type: z.nativeEnum(PayloadType).optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type PayloadPattern = z.infer<typeof PayloadPatternSchema>;
|
export type PayloadPattern = z.infer<typeof payloadPatternSchema>;
|
||||||
|
|
||||||
export const nlpPatternSchema = z.discriminatedUnion('match', [
|
export const nlpPatternSchema = z.discriminatedUnion('match', [
|
||||||
z.object({
|
z.object({
|
||||||
@ -35,7 +35,7 @@ export type NlpPattern = z.infer<typeof nlpPatternSchema>;
|
|||||||
export const patternSchema = z.union([
|
export const patternSchema = z.union([
|
||||||
z.string(),
|
z.string(),
|
||||||
z.instanceof(RegExp),
|
z.instanceof(RegExp),
|
||||||
PayloadPatternSchema,
|
payloadPatternSchema,
|
||||||
z.array(nlpPatternSchema),
|
z.array(nlpPatternSchema),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user