@opencrvs/toolkit
Advanced tools
Comparing version 0.0.30-rr to 0.0.30
@@ -15,4 +15,6 @@ import { JSONSchemaType } from 'ajv'; | ||
}); | ||
/** @knipignore */ | ||
/** | ||
* @public | ||
*/ | ||
export type JSONSchema = Omit<JSONSchemaType<ConditionalParameters>, 'properties'>; | ||
//# sourceMappingURL=conditionals.d.ts.map |
import { z } from 'zod'; | ||
declare const CreatedAction: z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -24,8 +23,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -36,8 +31,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "CREATE"; | ||
data: Record<string, string | { | ||
@@ -48,6 +42,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>; | ||
export declare const ActionDocument: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -73,8 +69,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -85,8 +77,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "CREATE"; | ||
data: Record<string, string | { | ||
@@ -97,5 +88,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -121,8 +114,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "VALIDATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -133,8 +122,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "VALIDATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "VALIDATE"; | ||
data: Record<string, string | { | ||
@@ -145,5 +133,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -169,8 +159,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "NOTIFY"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -181,8 +167,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "NOTIFY"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "NOTIFY"; | ||
data: Record<string, string | { | ||
@@ -193,5 +178,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -227,8 +214,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REGISTER"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -239,2 +222,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -245,7 +231,3 @@ trackingId: string; | ||
}, { | ||
id: string; | ||
type: "REGISTER"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -256,2 +238,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -263,3 +248,2 @@ trackingId: string; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -285,8 +269,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "DECLARE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -297,8 +277,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "DECLARE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "DECLARE"; | ||
data: Record<string, string | { | ||
@@ -309,5 +288,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -334,9 +315,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "ASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -347,5 +323,2 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "ASSIGN"; | ||
createdAt: string; | ||
@@ -355,36 +328,4 @@ createdBy: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
createdBy: z.ZodString; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
createdAtLocation: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"REQUEST_CORRECTION">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
type: "ASSIGN"; | ||
data: Record<string, string | { | ||
@@ -395,16 +336,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
assignedTo: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -428,11 +361,6 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"APPROVE_CORRECTION">; | ||
requestId: z.ZodString; | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
type: "UNASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -443,45 +371,7 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
}, { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
createdBy: z.ZodString; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
createdAtLocation: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"REJECT_CORRECTION">; | ||
requestId: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
type: "UNASSIGN"; | ||
data: Record<string, string | { | ||
@@ -492,18 +382,7 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
}, { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -527,10 +406,6 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
type: z.ZodLiteral<"CUSTOM">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "UNASSIGN"; | ||
type: "CUSTOM"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -541,42 +416,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "UNASSIGN"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
createdBy: z.ZodString; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
createdAtLocation: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"CUSTOM">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CUSTOM"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -587,13 +427,5 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CUSTOM"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
@@ -600,0 +432,0 @@ }>]>; |
@@ -39,2 +39,3 @@ import { z } from 'zod'; | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -45,3 +46,2 @@ trackingId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
@@ -53,2 +53,3 @@ data: Record<string, string | { | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -59,7 +60,5 @@ trackingId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "REGISTER" | undefined; | ||
draft?: boolean | undefined; | ||
}>; | ||
export type RegisterActionInput = z.infer<typeof RegisterActionInput>; | ||
export declare const ValidateActionInput: z.ZodObject<z.objectUtil.extendShape<{ | ||
@@ -93,4 +92,4 @@ eventId: z.ZodString; | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
duplicates: string[]; | ||
@@ -103,4 +102,4 @@ }, { | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
duplicates: string[]; | ||
@@ -134,3 +133,2 @@ type?: "VALIDATE" | undefined; | ||
draft: boolean; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -141,6 +139,6 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -151,4 +149,5 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "NOTIFY" | undefined; | ||
@@ -185,4 +184,4 @@ draft?: boolean | undefined; | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
@@ -194,4 +193,4 @@ data: Record<string, string | { | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "DECLARE" | undefined; | ||
@@ -201,154 +200,2 @@ draft?: boolean | undefined; | ||
export type DeclareActionInput = z.infer<typeof DeclareActionInput>; | ||
export declare const RequestCorrectionActionInput: z.ZodObject<z.objectUtil.extendShape<{ | ||
eventId: z.ZodString; | ||
transactionId: z.ZodString; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>; | ||
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
metadata: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
metadata: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
type?: "REQUEST_CORRECTION" | undefined; | ||
draft?: boolean | undefined; | ||
}>; | ||
export type RequestCorrectionActionInput = z.infer<typeof RequestCorrectionActionInput>; | ||
export declare const RejectCorrectionActionInput: z.ZodObject<z.objectUtil.extendShape<{ | ||
eventId: z.ZodString; | ||
transactionId: z.ZodString; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
requestId: z.ZodString; | ||
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "REJECT_CORRECTION" | undefined; | ||
draft?: boolean | undefined; | ||
}>; | ||
export type RejectCorrectionActionInput = z.infer<typeof RejectCorrectionActionInput>; | ||
export declare const ApproveCorrectionActionInput: z.ZodObject<z.objectUtil.extendShape<{ | ||
eventId: z.ZodString; | ||
transactionId: z.ZodString; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
requestId: z.ZodString; | ||
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "APPROVE_CORRECTION"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "APPROVE_CORRECTION" | undefined; | ||
draft?: boolean | undefined; | ||
}>; | ||
export type ApproveCorrectionActionInput = z.infer<typeof ApproveCorrectionActionInput>; | ||
/** | ||
@@ -385,3 +232,2 @@ * ActionInput types are used to validate the input data for the action. | ||
draft: boolean; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -392,6 +238,6 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -402,4 +248,5 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "CREATE" | undefined; | ||
@@ -435,4 +282,4 @@ draft?: boolean | undefined; | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
duplicates: string[]; | ||
@@ -445,4 +292,4 @@ }, { | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
duplicates: string[]; | ||
@@ -488,2 +335,3 @@ type?: "VALIDATE" | undefined; | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -494,3 +342,2 @@ trackingId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
@@ -502,2 +349,3 @@ data: Record<string, string | { | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -508,3 +356,2 @@ trackingId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "REGISTER" | undefined; | ||
@@ -535,3 +382,2 @@ draft?: boolean | undefined; | ||
draft: boolean; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -542,6 +388,6 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -552,4 +398,5 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "NOTIFY" | undefined; | ||
@@ -584,4 +431,4 @@ draft?: boolean | undefined; | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
@@ -593,4 +440,4 @@ data: Record<string, string | { | ||
} | null>; | ||
transactionId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "DECLARE" | undefined; | ||
@@ -621,3 +468,2 @@ draft?: boolean | undefined; | ||
draft: boolean; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -628,6 +474,6 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
assignedTo: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -638,4 +484,5 @@ type: string; | ||
} | null>; | ||
transactionId: string; | ||
assignedTo: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "ASSIGN" | undefined; | ||
@@ -670,49 +517,5 @@ draft?: boolean | undefined; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "UNASSIGN" | undefined; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
eventId: z.ZodString; | ||
transactionId: z.ZodString; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>; | ||
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
@@ -723,108 +526,6 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
metadata: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
metadata: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
type?: "REQUEST_CORRECTION" | undefined; | ||
type?: "UNASSIGN" | undefined; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
eventId: z.ZodString; | ||
transactionId: z.ZodString; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
requestId: z.ZodString; | ||
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "REJECT_CORRECTION" | undefined; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
eventId: z.ZodString; | ||
transactionId: z.ZodString; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
requestId: z.ZodString; | ||
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "APPROVE_CORRECTION"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "APPROVE_CORRECTION" | undefined; | ||
draft?: boolean | undefined; | ||
}>]>; | ||
@@ -831,0 +532,0 @@ export type ActionInput = z.input<typeof ActionInput>; |
import { z } from 'zod'; | ||
import { TranslationConfig } from './TranslationConfig'; | ||
declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{ | ||
@@ -187,11 +186,31 @@ fieldId: z.ZodString; | ||
id: z.ZodString; | ||
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
label: z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>; | ||
query: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
query: ClauseOutput; | ||
}, { | ||
id: string; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
query: ClauseInput; | ||
@@ -198,0 +217,0 @@ }>; |
@@ -5,6 +5,6 @@ import { z } from 'zod'; | ||
type: z.ZodString; | ||
transactionId: z.ZodString; | ||
createdAt: z.ZodString; | ||
updatedAt: z.ZodString; | ||
actions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -30,8 +30,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -42,8 +38,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "CREATE"; | ||
data: Record<string, string | { | ||
@@ -54,5 +49,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -78,8 +75,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "VALIDATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -90,8 +83,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "VALIDATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "VALIDATE"; | ||
data: Record<string, string | { | ||
@@ -102,5 +94,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -126,8 +120,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "NOTIFY"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -138,8 +128,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "NOTIFY"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "NOTIFY"; | ||
data: Record<string, string | { | ||
@@ -150,5 +139,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -184,8 +175,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REGISTER"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -196,2 +183,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -202,7 +192,3 @@ trackingId: string; | ||
}, { | ||
id: string; | ||
type: "REGISTER"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -213,2 +199,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -220,3 +209,2 @@ trackingId: string; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -242,8 +230,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "DECLARE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -254,8 +238,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "DECLARE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "DECLARE"; | ||
data: Record<string, string | { | ||
@@ -266,5 +249,7 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -291,9 +276,4 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "ASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -304,5 +284,2 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "ASSIGN"; | ||
createdAt: string; | ||
@@ -312,36 +289,4 @@ createdBy: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
createdBy: z.ZodString; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
createdAtLocation: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"REQUEST_CORRECTION">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
type: "ASSIGN"; | ||
data: Record<string, string | { | ||
@@ -352,16 +297,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
assignedTo: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -385,11 +322,6 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"APPROVE_CORRECTION">; | ||
requestId: z.ZodString; | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
type: "UNASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -400,45 +332,7 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
}, { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
createdBy: z.ZodString; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
createdAtLocation: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"REJECT_CORRECTION">; | ||
requestId: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
type: "UNASSIGN"; | ||
data: Record<string, string | { | ||
@@ -449,18 +343,7 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
}, { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -484,10 +367,6 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
type: z.ZodLiteral<"CUSTOM">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "UNASSIGN"; | ||
type: "CUSTOM"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -498,42 +377,7 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "UNASSIGN"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
createdBy: z.ZodString; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
filename: z.ZodString; | ||
originalFilename: z.ZodString; | ||
type: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}, { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
createdAtLocation: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"CUSTOM">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CUSTOM"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -544,25 +388,16 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CUSTOM"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
}>]>, "many">; | ||
}, "strip", z.ZodTypeAny, { | ||
type: string; | ||
id: string; | ||
type: string; | ||
transactionId: string; | ||
createdAt: string; | ||
updatedAt: string; | ||
actions: ({ | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -573,9 +408,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
} | { | ||
id: string; | ||
type: "VALIDATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -586,9 +420,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
} | { | ||
id: string; | ||
type: "NOTIFY"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -599,9 +432,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
} | { | ||
id: string; | ||
type: "REGISTER"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -612,2 +444,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -618,8 +453,4 @@ trackingId: string; | ||
} | { | ||
id: string; | ||
type: "DECLARE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -630,10 +461,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
} | { | ||
id: string; | ||
type: "ASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -644,21 +473,9 @@ type: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
assignedTo: string; | ||
} | { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
type: "UNASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -669,23 +486,8 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
} | { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
} | { | ||
id: string; | ||
type: "UNASSIGN"; | ||
type: "CUSTOM"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -696,26 +498,14 @@ type: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "CUSTOM"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
})[]; | ||
}, { | ||
type: string; | ||
id: string; | ||
transactionId: string; | ||
createdAt: string; | ||
updatedAt: string; | ||
}, { | ||
id: string; | ||
type: string; | ||
actions: ({ | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -726,9 +516,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "VALIDATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -739,9 +528,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "NOTIFY"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -752,9 +540,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "REGISTER"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -765,2 +552,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -772,7 +562,3 @@ trackingId: string; | ||
} | { | ||
id: string; | ||
type: "DECLARE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -783,10 +569,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "ASSIGN"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -797,21 +581,9 @@ type: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
assignedTo: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
type: "UNASSIGN"; | ||
data: Record<string, string | { | ||
@@ -822,23 +594,8 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "UNASSIGN"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
type: "CUSTOM"; | ||
data: Record<string, string | { | ||
@@ -849,20 +606,9 @@ type: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "CUSTOM"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
})[]; | ||
createdAt: string; | ||
updatedAt: string; | ||
}>; | ||
export type EventDocument = z.infer<typeof EventDocument>; | ||
//# sourceMappingURL=EventDocument.d.ts.map |
@@ -9,4 +9,2 @@ import { z } from 'zod'; | ||
export type ParagraphFieldValue = z.infer<typeof ParagraphFieldValue>; | ||
declare const PageHeaderFieldValue: z.ZodString; | ||
export type PageHeaderFieldValue = z.infer<typeof PageHeaderFieldValue>; | ||
declare const BulletListFieldValue: z.ZodString; | ||
@@ -13,0 +11,0 @@ export type BulletListFieldValue = z.infer<typeof BulletListFieldValue>; |
export * from './ActionConfig'; | ||
export * from './EventConfig'; | ||
export * from './EventConfigInput'; | ||
export * from './FieldConfig'; | ||
@@ -20,3 +19,2 @@ export * from './FormConfig'; | ||
export * from './DeduplicationConfig'; | ||
export * from './transactions'; | ||
//# sourceMappingURL=index.d.ts.map |
import { z } from 'zod'; | ||
import { TranslationConfig } from './TranslationConfig'; | ||
export declare const SummaryConfig: z.ZodObject<{ | ||
title: z.ZodObject<{ | ||
id: z.ZodString; | ||
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>>; | ||
label: z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>; | ||
emptyValueMessage: z.ZodOptional<z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}, { | ||
id: string; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}>; | ||
fields: z.ZodArray<z.ZodObject<{ | ||
id: z.ZodString; | ||
value: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>>; | ||
value: z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>; | ||
label: z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>; | ||
emptyValueMessage: z.ZodOptional<z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}, { | ||
id: string; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}>, "many">; | ||
@@ -36,10 +135,30 @@ }, "strip", z.ZodTypeAny, { | ||
id: string; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}; | ||
fields: { | ||
id: string; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}[]; | ||
@@ -49,10 +168,30 @@ }, { | ||
id: string; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}; | ||
fields: { | ||
id: string; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
}[]; | ||
@@ -59,0 +198,0 @@ }>; |
import { z } from 'zod'; | ||
export type TranslationConfig = { | ||
export declare const TranslationConfig: z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
}; | ||
export type MessageDescriptorZod = { | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}; | ||
type ExplicitTypeToReduceDeclarationSize = z.ZodObject<MessageDescriptorZod, 'strip', z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
export declare const TranslationConfig: ExplicitTypeToReduceDeclarationSize; | ||
export {}; | ||
defaultMessage: string; | ||
}>; | ||
export type TranslationConfig = z.infer<typeof TranslationConfig>; | ||
//# sourceMappingURL=TranslationConfig.d.ts.map |
import { TranslationConfig } from './TranslationConfig'; | ||
import { EventConfig } from './EventConfig'; | ||
import { EventConfigInput } from './EventConfigInput'; | ||
import { EventMetadataKeys } from './EventMetadata'; | ||
import { EventConfig, EventConfigInput } from './EventConfig'; | ||
import { FieldConfig } from './FieldConfig'; | ||
@@ -38,5 +37,9 @@ import { WorkqueueConfig } from './WorkqueueConfig'; | ||
export declare function getAllFields(configuration: EventConfig): ({ | ||
type: "TEXT"; | ||
id: string; | ||
type: "TEXT"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
options?: { | ||
@@ -47,5 +50,10 @@ type?: "number" | "text" | "email" | "password" | undefined; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -66,17 +74,33 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | { | ||
type: "DATE"; | ||
id: string; | ||
type: "DATE"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
options?: { | ||
notice?: TranslationConfig | undefined; | ||
notice?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | undefined; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -97,7 +121,11 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | { | ||
type: "PARAGRAPH"; | ||
id: string; | ||
@@ -107,8 +135,16 @@ options: { | ||
}; | ||
type: "PARAGRAPH"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -129,21 +165,26 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | { | ||
type: "FILE"; | ||
id: string; | ||
options: { | ||
size?: "NORMAL" | "LARGE" | undefined; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
type: "RADIO_GROUP"; | ||
label: TranslationConfig; | ||
optionValues: { | ||
value: string; | ||
label: TranslationConfig; | ||
}[]; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -164,17 +205,34 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
flexDirection?: "column" | "row" | "row-reverse" | "column-reverse" | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | { | ||
type: "RADIO_GROUP"; | ||
id: string; | ||
type: "BULLET_LIST"; | ||
label: TranslationConfig; | ||
items: TranslationConfig[]; | ||
font: "reg12" | "reg14" | "reg16" | "reg18" | "h4" | "h3" | "h2" | "h1"; | ||
options: { | ||
value: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
}[]; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -195,14 +253,33 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
flexDirection?: "row" | "row-reverse" | "column" | "column-reverse" | undefined; | ||
} | { | ||
type: "BULLET_LIST"; | ||
id: string; | ||
type: "PAGE_HEADER"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
items: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}[]; | ||
font: "reg12" | "reg14" | "reg16" | "reg18" | "h4" | "h3" | "h2" | "h1"; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -223,18 +300,34 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | { | ||
type: "SELECT"; | ||
id: string; | ||
options: { | ||
value: string; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
}[]; | ||
type: "SELECT"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -255,14 +348,26 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | { | ||
type: "CHECKBOX"; | ||
id: string; | ||
type: "CHECKBOX"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -283,14 +388,26 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
} | { | ||
type: "COUNTRY"; | ||
id: string; | ||
type: "FILE"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -311,34 +428,11 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "COUNTRY"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
type: "LOCATION"; | ||
id: string; | ||
@@ -351,8 +445,16 @@ options: { | ||
}; | ||
type: "LOCATION"; | ||
label: TranslationConfig; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validation?: { | ||
message: TranslationConfig; | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -373,340 +475,11 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
})[]; | ||
export declare function getAllPages(configuration: EventConfig): { | ||
id: string; | ||
fields: ({ | ||
id: string; | ||
type: "TEXT"; | ||
label: TranslationConfig; | ||
options?: { | ||
type?: "number" | "text" | "email" | "password" | undefined; | ||
maxLength?: number | undefined; | ||
} | undefined; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "DATE"; | ||
label: TranslationConfig; | ||
options?: { | ||
notice?: TranslationConfig | undefined; | ||
} | undefined; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
options: { | ||
fontVariant?: "reg12" | "reg14" | "reg16" | "reg18" | "h4" | "h3" | "h2" | "h1" | undefined; | ||
}; | ||
type: "PARAGRAPH"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
options: { | ||
size?: "NORMAL" | "LARGE" | undefined; | ||
}; | ||
type: "RADIO_GROUP"; | ||
label: TranslationConfig; | ||
optionValues: { | ||
value: string; | ||
label: TranslationConfig; | ||
}[]; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
flexDirection?: "column" | "row" | "row-reverse" | "column-reverse" | undefined; | ||
} | { | ||
id: string; | ||
type: "BULLET_LIST"; | ||
label: TranslationConfig; | ||
items: TranslationConfig[]; | ||
font: "reg12" | "reg14" | "reg16" | "reg18" | "h4" | "h3" | "h2" | "h1"; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "PAGE_HEADER"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
options: { | ||
value: string; | ||
label: TranslationConfig; | ||
}[]; | ||
type: "SELECT"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "CHECKBOX"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "FILE"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "COUNTRY"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
options: { | ||
type: "ADMIN_STRUCTURE" | "HEALTH_FACILITY" | "CRVS_OFFICE"; | ||
partOf?: { | ||
$data: string; | ||
} | undefined; | ||
}; | ||
type: "LOCATION"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional?: any; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
})[]; | ||
title: TranslationConfig; | ||
}[]; | ||
export declare function validateWorkqueueConfig(workqueueConfigs: WorkqueueConfig[]): void; | ||
//# sourceMappingURL=utils.d.ts.map |
import { z } from 'zod'; | ||
import { TranslationConfig } from './TranslationConfig'; | ||
/** | ||
@@ -10,9 +9,29 @@ * Configuration for workqueue. Workqueues are used to display a list of events. | ||
column: z.ZodString; | ||
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
label: z.ZodObject<{ | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
column: string; | ||
label: TranslationConfig; | ||
}, { | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
column: string; | ||
label: TranslationConfig; | ||
}>, "many">; | ||
@@ -29,5 +48,5 @@ filters: z.ZodArray<z.ZodObject<{ | ||
}, "strip", z.ZodTypeAny, { | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
}, { | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
}>, "many">; | ||
@@ -37,7 +56,11 @@ }, "strip", z.ZodTypeAny, { | ||
fields: { | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
column: string; | ||
label: TranslationConfig; | ||
}[]; | ||
filters: { | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
}[]; | ||
@@ -47,7 +70,11 @@ }, { | ||
fields: { | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
column: string; | ||
label: TranslationConfig; | ||
}[]; | ||
filters: { | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
}[]; | ||
@@ -54,0 +81,0 @@ }>; |
@@ -36,3 +36,3 @@ import { JSONSchema } from '../commons/conditionals'; | ||
type: { | ||
const: "CREATE" | "VALIDATE" | "NOTIFY" | "REGISTER" | "DECLARE" | "ASSIGN" | "REQUEST_CORRECTION" | "APPROVE_CORRECTION" | "REJECT_CORRECTION" | "UNASSIGN" | "CUSTOM"; | ||
const: "CREATE" | "VALIDATE" | "NOTIFY" | "REGISTER" | "DECLARE" | "ASSIGN" | "UNASSIGN" | "CUSTOM"; | ||
}; | ||
@@ -91,2 +91,12 @@ draft: { | ||
export declare function field(fieldId: string): FieldAPI; | ||
export declare function objectHasProperty(property: string, type: 'string' | 'number' | 'boolean' | 'array' | 'object', format?: string): { | ||
type: string; | ||
properties: { | ||
[x: string]: { | ||
type: "string" | "number" | "boolean" | "object" | "array"; | ||
format: string | undefined; | ||
}; | ||
}; | ||
required: string[]; | ||
}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -29,2 +29,3 @@ "use strict"; | ||
not: () => not, | ||
objectHasProperty: () => objectHasProperty, | ||
or: () => or2, | ||
@@ -121,3 +122,2 @@ userHasScope: () => userHasScope | ||
PARAGRAPH: "PARAGRAPH", | ||
PAGE_HEADER: "PAGE_HEADER", | ||
RADIO_GROUP: "RADIO_GROUP", | ||
@@ -164,5 +164,2 @@ FILE: "FILE", | ||
}).describe("A read-only HTML <p> paragraph"); | ||
var PageHeader = BaseField.extend({ | ||
type: import_zod3.z.literal(FieldType.PAGE_HEADER) | ||
}).describe("A read-only header component for form pages"); | ||
var File = BaseField.extend({ | ||
@@ -177,6 +174,3 @@ type: import_zod3.z.literal(FieldType.FILE) | ||
type: import_zod3.z.literal(FieldType.RADIO_GROUP), | ||
optionValues: import_zod3.z.array(SelectOption).describe("A list of options"), | ||
options: import_zod3.z.object({ | ||
size: import_zod3.z.enum(["NORMAL", "LARGE"]).optional() | ||
}), | ||
options: import_zod3.z.array(SelectOption), | ||
flexDirection: import_zod3.z.enum(["row", "row-reverse", "column", "column-reverse"]).optional().describe("Direction to stack the options") | ||
@@ -215,3 +209,2 @@ }).describe("Grouped radio options"); | ||
BulletList, | ||
PageHeader, | ||
Select, | ||
@@ -262,5 +255,3 @@ Checkbox, | ||
VALIDATE: "VALIDATE", | ||
REQUEST_CORRECTION: "REQUEST_CORRECTION", | ||
REJECT_CORRECTION: "REJECT_CORRECTION", | ||
APPROVE_CORRECTION: "APPROVE_CORRECTION", | ||
CORRECT: "CORRECT", | ||
DETECT_DUPLICATE: "DETECT_DUPLICATE", | ||
@@ -297,19 +288,2 @@ NOTIFY: "NOTIFY", | ||
); | ||
var RequestCorrectionConfig = ActionConfigBase.merge( | ||
import_zod5.z.object({ | ||
type: import_zod5.z.literal(ActionType.REQUEST_CORRECTION), | ||
onboardingForm: import_zod5.z.array(FormPage), | ||
additionalDetailsForm: import_zod5.z.array(FormPage) | ||
}) | ||
); | ||
var RejectCorrectionConfig = ActionConfigBase.merge( | ||
import_zod5.z.object({ | ||
type: import_zod5.z.literal(ActionType.REJECT_CORRECTION) | ||
}) | ||
); | ||
var ApproveCorrectionConfig = ActionConfigBase.merge( | ||
import_zod5.z.object({ | ||
type: import_zod5.z.literal(ActionType.APPROVE_CORRECTION) | ||
}) | ||
); | ||
var CustomConfig = ActionConfigBase.merge( | ||
@@ -326,5 +300,2 @@ import_zod5.z.object({ | ||
DeleteConfig, | ||
RequestCorrectionConfig, | ||
RejectCorrectionConfig, | ||
ApproveCorrectionConfig, | ||
CustomConfig | ||
@@ -336,73 +307,6 @@ ]); | ||
// ../commons/src/events/DeduplicationConfig.ts | ||
// ../commons/src/events/SummaryConfig.ts | ||
var import_zod6 = require("zod"); | ||
var FieldReference = import_zod6.z.string(); | ||
var Matcher = import_zod6.z.object({ | ||
fieldId: import_zod6.z.string(), | ||
options: import_zod6.z.object({ | ||
boost: import_zod6.z.number().optional() | ||
}).optional().default({}) | ||
}); | ||
var FuzzyMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("fuzzy"), | ||
options: import_zod6.z.object({ | ||
/** | ||
* Names of length 3 or less characters = 0 edits allowed | ||
* Names of length 4 - 6 characters = 1 edit allowed | ||
* Names of length >7 characters = 2 edits allowed | ||
*/ | ||
fuzziness: import_zod6.z.union([import_zod6.z.string(), import_zod6.z.number()]).optional().default("AUTO:4,7"), | ||
boost: import_zod6.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var StrictMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("strict"), | ||
options: import_zod6.z.object({ | ||
boost: import_zod6.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var DateRangeMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("dateRange"), | ||
options: import_zod6.z.object({ | ||
days: import_zod6.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod6.z.number().optional().default(1) | ||
}) | ||
}); | ||
var DateDistanceMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("dateDistance"), | ||
options: import_zod6.z.object({ | ||
days: import_zod6.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod6.z.number().optional().default(1) | ||
}) | ||
}); | ||
var And = import_zod6.z.object({ | ||
type: import_zod6.z.literal("and"), | ||
clauses: import_zod6.z.lazy(() => Clause.array()) | ||
}); | ||
var Or = import_zod6.z.object({ | ||
type: import_zod6.z.literal("or"), | ||
clauses: import_zod6.z.lazy(() => Clause.array()) | ||
}); | ||
var Clause = import_zod6.z.lazy( | ||
() => import_zod6.z.discriminatedUnion("type", [ | ||
And, | ||
Or, | ||
FuzzyMatcher, | ||
StrictMatcher, | ||
DateRangeMatcher, | ||
DateDistanceMatcher | ||
]) | ||
); | ||
var DeduplicationConfig = import_zod6.z.object({ | ||
id: import_zod6.z.string(), | ||
label: TranslationConfig, | ||
query: Clause | ||
}); | ||
// ../commons/src/events/SummaryConfig.ts | ||
var import_zod7 = require("zod"); | ||
var Field = import_zod7.z.object({ | ||
id: import_zod7.z.string().describe("Id of summary field"), | ||
var Field = import_zod6.z.object({ | ||
id: import_zod6.z.string().describe("Id of summary field"), | ||
value: TranslationConfig.describe( | ||
@@ -414,17 +318,17 @@ "Summary field value. Can utilise values defined in configuration and EventMetadata" | ||
}); | ||
var Title = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
var Title = import_zod6.z.object({ | ||
id: import_zod6.z.string(), | ||
label: TranslationConfig.describe("Title content"), | ||
emptyValueMessage: TranslationConfig.optional() | ||
}); | ||
var SummaryConfig = import_zod7.z.object({ | ||
var SummaryConfig = import_zod6.z.object({ | ||
title: Title.describe("Title of summary view."), | ||
fields: import_zod7.z.array(Field).describe("Fields rendered in summary view.") | ||
fields: import_zod6.z.array(Field).describe("Fields rendered in summary view.") | ||
}).describe("Configuration for summary in event."); | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
var import_zod9 = require("zod"); | ||
var import_zod8 = require("zod"); | ||
// ../commons/src/events/EventMetadata.ts | ||
var import_zod8 = require("zod"); | ||
var import_zod7 = require("zod"); | ||
var EventStatus = { | ||
@@ -439,28 +343,28 @@ CREATED: "CREATED", | ||
var eventStatuses = Object.values(EventStatus); | ||
var EventStatuses = import_zod8.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod8.z.object({ | ||
id: import_zod8.z.string(), | ||
type: import_zod8.z.string(), | ||
var EventStatuses = import_zod7.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
type: import_zod7.z.string(), | ||
status: EventStatuses, | ||
createdAt: import_zod8.z.string().datetime(), | ||
createdBy: import_zod8.z.string(), | ||
createdAtLocation: import_zod8.z.string(), | ||
modifiedAt: import_zod8.z.string().datetime(), | ||
assignedTo: import_zod8.z.string().nullable(), | ||
updatedBy: import_zod8.z.string() | ||
createdAt: import_zod7.z.string().datetime(), | ||
createdBy: import_zod7.z.string(), | ||
createdAtLocation: import_zod7.z.string(), | ||
modifiedAt: import_zod7.z.string().datetime(), | ||
assignedTo: import_zod7.z.string().nullable(), | ||
updatedBy: import_zod7.z.string() | ||
}); | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
var WorkqueueConfig = import_zod9.z.object({ | ||
id: import_zod9.z.string().describe("Unique identifier for workqueue."), | ||
fields: import_zod9.z.array( | ||
import_zod9.z.object({ | ||
var WorkqueueConfig = import_zod8.z.object({ | ||
id: import_zod8.z.string().describe("Unique identifier for workqueue."), | ||
fields: import_zod8.z.array( | ||
import_zod8.z.object({ | ||
// @TODO: Improve typing by enforcing EventMetadataKeys and form page fields as possible values | ||
column: import_zod9.z.string(), | ||
column: import_zod8.z.string(), | ||
label: TranslationConfig | ||
}) | ||
), | ||
filters: import_zod9.z.array( | ||
import_zod9.z.object({ | ||
status: import_zod9.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
filters: import_zod8.z.array( | ||
import_zod8.z.object({ | ||
status: import_zod8.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
}) | ||
@@ -470,2 +374,69 @@ ).describe("Filters to be applied to workqueue.") | ||
// ../commons/src/events/DeduplicationConfig.ts | ||
var import_zod9 = require("zod"); | ||
var FieldReference = import_zod9.z.string(); | ||
var Matcher = import_zod9.z.object({ | ||
fieldId: import_zod9.z.string(), | ||
options: import_zod9.z.object({ | ||
boost: import_zod9.z.number().optional() | ||
}).optional().default({}) | ||
}); | ||
var FuzzyMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("fuzzy"), | ||
options: import_zod9.z.object({ | ||
/** | ||
* Names of length 3 or less characters = 0 edits allowed | ||
* Names of length 4 - 6 characters = 1 edit allowed | ||
* Names of length >7 characters = 2 edits allowed | ||
*/ | ||
fuzziness: import_zod9.z.union([import_zod9.z.string(), import_zod9.z.number()]).optional().default("AUTO:4,7"), | ||
boost: import_zod9.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var StrictMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("strict"), | ||
options: import_zod9.z.object({ | ||
boost: import_zod9.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var DateRangeMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("dateRange"), | ||
options: import_zod9.z.object({ | ||
days: import_zod9.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod9.z.number().optional().default(1) | ||
}) | ||
}); | ||
var DateDistanceMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("dateDistance"), | ||
options: import_zod9.z.object({ | ||
days: import_zod9.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod9.z.number().optional().default(1) | ||
}) | ||
}); | ||
var And = import_zod9.z.object({ | ||
type: import_zod9.z.literal("and"), | ||
clauses: import_zod9.z.lazy(() => Clause.array()) | ||
}); | ||
var Or = import_zod9.z.object({ | ||
type: import_zod9.z.literal("or"), | ||
clauses: import_zod9.z.lazy(() => Clause.array()) | ||
}); | ||
var Clause = import_zod9.z.lazy( | ||
() => import_zod9.z.discriminatedUnion("type", [ | ||
And, | ||
Or, | ||
FuzzyMatcher, | ||
StrictMatcher, | ||
DateRangeMatcher, | ||
DateDistanceMatcher | ||
]) | ||
); | ||
var DeduplicationConfig = import_zod9.z.object({ | ||
id: import_zod9.z.string(), | ||
label: TranslationConfig, | ||
query: Clause | ||
}); | ||
// ../commons/src/events/EventConfig.ts | ||
@@ -501,3 +472,2 @@ var EventConfig = import_zod10.z.object({ | ||
var ParagraphFieldValue = import_zod12.z.string(); | ||
var PageHeaderFieldValue = import_zod12.z.string(); | ||
var BulletListFieldValue = import_zod12.z.string(); | ||
@@ -527,3 +497,2 @@ var FileFieldValue = import_zod12.z.object({ | ||
var ActionBase = import_zod13.z.object({ | ||
id: import_zod13.z.string(), | ||
createdAt: import_zod13.z.string().datetime(), | ||
@@ -575,19 +544,2 @@ createdBy: import_zod13.z.string(), | ||
); | ||
var RequestedCorrectionAction = ActionBase.merge( | ||
import_zod13.z.object({ | ||
type: import_zod13.z.literal(ActionType.REQUEST_CORRECTION) | ||
}) | ||
); | ||
var ApprovedCorrectionAction = ActionBase.merge( | ||
import_zod13.z.object({ | ||
type: import_zod13.z.literal(ActionType.APPROVE_CORRECTION), | ||
requestId: import_zod13.z.string() | ||
}) | ||
); | ||
var RejectedCorrectionAction = ActionBase.merge( | ||
import_zod13.z.object({ | ||
type: import_zod13.z.literal(ActionType.REJECT_CORRECTION), | ||
requestId: import_zod13.z.string() | ||
}) | ||
); | ||
var CustomAction = ActionBase.merge( | ||
@@ -605,5 +557,2 @@ import_zod13.z.object({ | ||
AssignedAction, | ||
RequestedCorrectionAction, | ||
ApprovedCorrectionAction, | ||
RejectedCorrectionAction, | ||
UnassignedAction, | ||
@@ -628,2 +577,3 @@ CustomAction | ||
type: import_zod14.z.string(), | ||
transactionId: import_zod14.z.string(), | ||
createdAt: import_zod14.z.string().datetime(), | ||
@@ -685,20 +635,2 @@ updatedAt: import_zod14.z.string().datetime(), | ||
); | ||
var RequestCorrectionActionInput = BaseActionInput.merge( | ||
import_zod15.z.object({ | ||
type: import_zod15.z.literal(ActionType.REQUEST_CORRECTION).default(ActionType.REQUEST_CORRECTION), | ||
metadata: import_zod15.z.record(import_zod15.z.string(), FieldValue) | ||
}) | ||
); | ||
var RejectCorrectionActionInput = BaseActionInput.merge( | ||
import_zod15.z.object({ | ||
requestId: import_zod15.z.string(), | ||
type: import_zod15.z.literal(ActionType.REJECT_CORRECTION).default(ActionType.REJECT_CORRECTION) | ||
}) | ||
); | ||
var ApproveCorrectionActionInput = BaseActionInput.merge( | ||
import_zod15.z.object({ | ||
requestId: import_zod15.z.string(), | ||
type: import_zod15.z.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION) | ||
}) | ||
); | ||
var ActionInput = import_zod15.z.discriminatedUnion("type", [ | ||
@@ -711,6 +643,3 @@ CreateActionInput, | ||
AssignActionInput, | ||
UnassignActionInput, | ||
RequestCorrectionActionInput, | ||
RejectCorrectionActionInput, | ||
ApproveCorrectionActionInput | ||
UnassignActionInput | ||
]); | ||
@@ -846,5 +775,2 @@ | ||
// ../commons/src/uuid.ts | ||
var import_uuid = require("uuid"); | ||
// src/conditionals/deduplication.ts | ||
@@ -1116,1 +1042,13 @@ function and(clauses) { | ||
}; | ||
function objectHasProperty(property, type, format) { | ||
return { | ||
type: "object", | ||
properties: { | ||
[property]: { | ||
type, | ||
format | ||
} | ||
}, | ||
required: [property] | ||
}; | ||
} |
@@ -28,3 +28,2 @@ "use strict"; | ||
ActionType: () => ActionType, | ||
ApproveCorrectionActionInput: () => ApproveCorrectionActionInput, | ||
Clause: () => Clause, | ||
@@ -49,4 +48,2 @@ ConditionalTypes: () => ConditionalTypes, | ||
RegisterActionInput: () => RegisterActionInput, | ||
RejectCorrectionActionInput: () => RejectCorrectionActionInput, | ||
RequestCorrectionActionInput: () => RequestCorrectionActionInput, | ||
ResolvedUser: () => ResolvedUser, | ||
@@ -65,5 +62,3 @@ SummaryConfig: () => SummaryConfig, | ||
findPageFields: () => findPageFields, | ||
generateTransactionId: () => generateTransactionId, | ||
getAllFields: () => getAllFields, | ||
getAllPages: () => getAllPages, | ||
getCurrentEventState: () => getCurrentEventState, | ||
@@ -154,3 +149,2 @@ isUndeclaredDraft: () => isUndeclaredDraft, | ||
PARAGRAPH: "PARAGRAPH", | ||
PAGE_HEADER: "PAGE_HEADER", | ||
RADIO_GROUP: "RADIO_GROUP", | ||
@@ -197,5 +191,2 @@ FILE: "FILE", | ||
}).describe("A read-only HTML <p> paragraph"); | ||
var PageHeader = BaseField.extend({ | ||
type: import_zod3.z.literal(FieldType.PAGE_HEADER) | ||
}).describe("A read-only header component for form pages"); | ||
var File = BaseField.extend({ | ||
@@ -210,6 +201,3 @@ type: import_zod3.z.literal(FieldType.FILE) | ||
type: import_zod3.z.literal(FieldType.RADIO_GROUP), | ||
optionValues: import_zod3.z.array(SelectOption).describe("A list of options"), | ||
options: import_zod3.z.object({ | ||
size: import_zod3.z.enum(["NORMAL", "LARGE"]).optional() | ||
}), | ||
options: import_zod3.z.array(SelectOption), | ||
flexDirection: import_zod3.z.enum(["row", "row-reverse", "column", "column-reverse"]).optional().describe("Direction to stack the options") | ||
@@ -248,3 +236,2 @@ }).describe("Grouped radio options"); | ||
BulletList, | ||
PageHeader, | ||
Select, | ||
@@ -295,5 +282,3 @@ Checkbox, | ||
VALIDATE: "VALIDATE", | ||
REQUEST_CORRECTION: "REQUEST_CORRECTION", | ||
REJECT_CORRECTION: "REJECT_CORRECTION", | ||
APPROVE_CORRECTION: "APPROVE_CORRECTION", | ||
CORRECT: "CORRECT", | ||
DETECT_DUPLICATE: "DETECT_DUPLICATE", | ||
@@ -330,19 +315,2 @@ NOTIFY: "NOTIFY", | ||
); | ||
var RequestCorrectionConfig = ActionConfigBase.merge( | ||
import_zod5.z.object({ | ||
type: import_zod5.z.literal(ActionType.REQUEST_CORRECTION), | ||
onboardingForm: import_zod5.z.array(FormPage), | ||
additionalDetailsForm: import_zod5.z.array(FormPage) | ||
}) | ||
); | ||
var RejectCorrectionConfig = ActionConfigBase.merge( | ||
import_zod5.z.object({ | ||
type: import_zod5.z.literal(ActionType.REJECT_CORRECTION) | ||
}) | ||
); | ||
var ApproveCorrectionConfig = ActionConfigBase.merge( | ||
import_zod5.z.object({ | ||
type: import_zod5.z.literal(ActionType.APPROVE_CORRECTION) | ||
}) | ||
); | ||
var CustomConfig = ActionConfigBase.merge( | ||
@@ -359,5 +327,2 @@ import_zod5.z.object({ | ||
DeleteConfig, | ||
RequestCorrectionConfig, | ||
RejectCorrectionConfig, | ||
ApproveCorrectionConfig, | ||
CustomConfig | ||
@@ -369,73 +334,6 @@ ]); | ||
// ../commons/src/events/DeduplicationConfig.ts | ||
// ../commons/src/events/SummaryConfig.ts | ||
var import_zod6 = require("zod"); | ||
var FieldReference = import_zod6.z.string(); | ||
var Matcher = import_zod6.z.object({ | ||
fieldId: import_zod6.z.string(), | ||
options: import_zod6.z.object({ | ||
boost: import_zod6.z.number().optional() | ||
}).optional().default({}) | ||
}); | ||
var FuzzyMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("fuzzy"), | ||
options: import_zod6.z.object({ | ||
/** | ||
* Names of length 3 or less characters = 0 edits allowed | ||
* Names of length 4 - 6 characters = 1 edit allowed | ||
* Names of length >7 characters = 2 edits allowed | ||
*/ | ||
fuzziness: import_zod6.z.union([import_zod6.z.string(), import_zod6.z.number()]).optional().default("AUTO:4,7"), | ||
boost: import_zod6.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var StrictMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("strict"), | ||
options: import_zod6.z.object({ | ||
boost: import_zod6.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var DateRangeMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("dateRange"), | ||
options: import_zod6.z.object({ | ||
days: import_zod6.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod6.z.number().optional().default(1) | ||
}) | ||
}); | ||
var DateDistanceMatcher = Matcher.extend({ | ||
type: import_zod6.z.literal("dateDistance"), | ||
options: import_zod6.z.object({ | ||
days: import_zod6.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod6.z.number().optional().default(1) | ||
}) | ||
}); | ||
var And = import_zod6.z.object({ | ||
type: import_zod6.z.literal("and"), | ||
clauses: import_zod6.z.lazy(() => Clause.array()) | ||
}); | ||
var Or = import_zod6.z.object({ | ||
type: import_zod6.z.literal("or"), | ||
clauses: import_zod6.z.lazy(() => Clause.array()) | ||
}); | ||
var Clause = import_zod6.z.lazy( | ||
() => import_zod6.z.discriminatedUnion("type", [ | ||
And, | ||
Or, | ||
FuzzyMatcher, | ||
StrictMatcher, | ||
DateRangeMatcher, | ||
DateDistanceMatcher | ||
]) | ||
); | ||
var DeduplicationConfig = import_zod6.z.object({ | ||
id: import_zod6.z.string(), | ||
label: TranslationConfig, | ||
query: Clause | ||
}); | ||
// ../commons/src/events/SummaryConfig.ts | ||
var import_zod7 = require("zod"); | ||
var Field = import_zod7.z.object({ | ||
id: import_zod7.z.string().describe("Id of summary field"), | ||
var Field = import_zod6.z.object({ | ||
id: import_zod6.z.string().describe("Id of summary field"), | ||
value: TranslationConfig.describe( | ||
@@ -447,17 +345,17 @@ "Summary field value. Can utilise values defined in configuration and EventMetadata" | ||
}); | ||
var Title = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
var Title = import_zod6.z.object({ | ||
id: import_zod6.z.string(), | ||
label: TranslationConfig.describe("Title content"), | ||
emptyValueMessage: TranslationConfig.optional() | ||
}); | ||
var SummaryConfig = import_zod7.z.object({ | ||
var SummaryConfig = import_zod6.z.object({ | ||
title: Title.describe("Title of summary view."), | ||
fields: import_zod7.z.array(Field).describe("Fields rendered in summary view.") | ||
fields: import_zod6.z.array(Field).describe("Fields rendered in summary view.") | ||
}).describe("Configuration for summary in event."); | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
var import_zod9 = require("zod"); | ||
var import_zod8 = require("zod"); | ||
// ../commons/src/events/EventMetadata.ts | ||
var import_zod8 = require("zod"); | ||
var import_zod7 = require("zod"); | ||
var EventStatus = { | ||
@@ -472,13 +370,13 @@ CREATED: "CREATED", | ||
var eventStatuses = Object.values(EventStatus); | ||
var EventStatuses = import_zod8.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod8.z.object({ | ||
id: import_zod8.z.string(), | ||
type: import_zod8.z.string(), | ||
var EventStatuses = import_zod7.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
type: import_zod7.z.string(), | ||
status: EventStatuses, | ||
createdAt: import_zod8.z.string().datetime(), | ||
createdBy: import_zod8.z.string(), | ||
createdAtLocation: import_zod8.z.string(), | ||
modifiedAt: import_zod8.z.string().datetime(), | ||
assignedTo: import_zod8.z.string().nullable(), | ||
updatedBy: import_zod8.z.string() | ||
createdAt: import_zod7.z.string().datetime(), | ||
createdBy: import_zod7.z.string(), | ||
createdAtLocation: import_zod7.z.string(), | ||
modifiedAt: import_zod7.z.string().datetime(), | ||
assignedTo: import_zod7.z.string().nullable(), | ||
updatedBy: import_zod7.z.string() | ||
}); | ||
@@ -534,14 +432,14 @@ var eventMetadataLabelMap = { | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
var WorkqueueConfig = import_zod9.z.object({ | ||
id: import_zod9.z.string().describe("Unique identifier for workqueue."), | ||
fields: import_zod9.z.array( | ||
import_zod9.z.object({ | ||
var WorkqueueConfig = import_zod8.z.object({ | ||
id: import_zod8.z.string().describe("Unique identifier for workqueue."), | ||
fields: import_zod8.z.array( | ||
import_zod8.z.object({ | ||
// @TODO: Improve typing by enforcing EventMetadataKeys and form page fields as possible values | ||
column: import_zod9.z.string(), | ||
column: import_zod8.z.string(), | ||
label: TranslationConfig | ||
}) | ||
), | ||
filters: import_zod9.z.array( | ||
import_zod9.z.object({ | ||
status: import_zod9.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
filters: import_zod8.z.array( | ||
import_zod8.z.object({ | ||
status: import_zod8.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
}) | ||
@@ -551,2 +449,69 @@ ).describe("Filters to be applied to workqueue.") | ||
// ../commons/src/events/DeduplicationConfig.ts | ||
var import_zod9 = require("zod"); | ||
var FieldReference = import_zod9.z.string(); | ||
var Matcher = import_zod9.z.object({ | ||
fieldId: import_zod9.z.string(), | ||
options: import_zod9.z.object({ | ||
boost: import_zod9.z.number().optional() | ||
}).optional().default({}) | ||
}); | ||
var FuzzyMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("fuzzy"), | ||
options: import_zod9.z.object({ | ||
/** | ||
* Names of length 3 or less characters = 0 edits allowed | ||
* Names of length 4 - 6 characters = 1 edit allowed | ||
* Names of length >7 characters = 2 edits allowed | ||
*/ | ||
fuzziness: import_zod9.z.union([import_zod9.z.string(), import_zod9.z.number()]).optional().default("AUTO:4,7"), | ||
boost: import_zod9.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var StrictMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("strict"), | ||
options: import_zod9.z.object({ | ||
boost: import_zod9.z.number().optional().default(1) | ||
}).optional().default({}) | ||
}); | ||
var DateRangeMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("dateRange"), | ||
options: import_zod9.z.object({ | ||
days: import_zod9.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod9.z.number().optional().default(1) | ||
}) | ||
}); | ||
var DateDistanceMatcher = Matcher.extend({ | ||
type: import_zod9.z.literal("dateDistance"), | ||
options: import_zod9.z.object({ | ||
days: import_zod9.z.number(), | ||
origin: FieldReference, | ||
boost: import_zod9.z.number().optional().default(1) | ||
}) | ||
}); | ||
var And = import_zod9.z.object({ | ||
type: import_zod9.z.literal("and"), | ||
clauses: import_zod9.z.lazy(() => Clause.array()) | ||
}); | ||
var Or = import_zod9.z.object({ | ||
type: import_zod9.z.literal("or"), | ||
clauses: import_zod9.z.lazy(() => Clause.array()) | ||
}); | ||
var Clause = import_zod9.z.lazy( | ||
() => import_zod9.z.discriminatedUnion("type", [ | ||
And, | ||
Or, | ||
FuzzyMatcher, | ||
StrictMatcher, | ||
DateRangeMatcher, | ||
DateDistanceMatcher | ||
]) | ||
); | ||
var DeduplicationConfig = import_zod9.z.object({ | ||
id: import_zod9.z.string(), | ||
label: TranslationConfig, | ||
query: Clause | ||
}); | ||
// ../commons/src/events/EventConfig.ts | ||
@@ -563,4 +528,2 @@ var EventConfig = import_zod10.z.object({ | ||
}); | ||
// ../commons/src/events/EventConfigInput.ts | ||
var defineForm = (form) => FormConfig.parse(form); | ||
@@ -587,3 +550,2 @@ var defineFormPage = (formPage) => FormPage.parse(formPage); | ||
var ParagraphFieldValue = import_zod12.z.string(); | ||
var PageHeaderFieldValue = import_zod12.z.string(); | ||
var BulletListFieldValue = import_zod12.z.string(); | ||
@@ -613,3 +575,2 @@ var FileFieldValue = import_zod12.z.object({ | ||
var ActionBase = import_zod13.z.object({ | ||
id: import_zod13.z.string(), | ||
createdAt: import_zod13.z.string().datetime(), | ||
@@ -661,19 +622,2 @@ createdBy: import_zod13.z.string(), | ||
); | ||
var RequestedCorrectionAction = ActionBase.merge( | ||
import_zod13.z.object({ | ||
type: import_zod13.z.literal(ActionType.REQUEST_CORRECTION) | ||
}) | ||
); | ||
var ApprovedCorrectionAction = ActionBase.merge( | ||
import_zod13.z.object({ | ||
type: import_zod13.z.literal(ActionType.APPROVE_CORRECTION), | ||
requestId: import_zod13.z.string() | ||
}) | ||
); | ||
var RejectedCorrectionAction = ActionBase.merge( | ||
import_zod13.z.object({ | ||
type: import_zod13.z.literal(ActionType.REJECT_CORRECTION), | ||
requestId: import_zod13.z.string() | ||
}) | ||
); | ||
var CustomAction = ActionBase.merge( | ||
@@ -691,5 +635,2 @@ import_zod13.z.object({ | ||
AssignedAction, | ||
RequestedCorrectionAction, | ||
ApprovedCorrectionAction, | ||
RejectedCorrectionAction, | ||
UnassignedAction, | ||
@@ -714,2 +655,3 @@ CustomAction | ||
type: import_zod14.z.string(), | ||
transactionId: import_zod14.z.string(), | ||
createdAt: import_zod14.z.string().datetime(), | ||
@@ -771,20 +713,2 @@ updatedAt: import_zod14.z.string().datetime(), | ||
); | ||
var RequestCorrectionActionInput = BaseActionInput.merge( | ||
import_zod15.z.object({ | ||
type: import_zod15.z.literal(ActionType.REQUEST_CORRECTION).default(ActionType.REQUEST_CORRECTION), | ||
metadata: import_zod15.z.record(import_zod15.z.string(), FieldValue) | ||
}) | ||
); | ||
var RejectCorrectionActionInput = BaseActionInput.merge( | ||
import_zod15.z.object({ | ||
requestId: import_zod15.z.string(), | ||
type: import_zod15.z.literal(ActionType.REJECT_CORRECTION).default(ActionType.REJECT_CORRECTION) | ||
}) | ||
); | ||
var ApproveCorrectionActionInput = BaseActionInput.merge( | ||
import_zod15.z.object({ | ||
requestId: import_zod15.z.string(), | ||
type: import_zod15.z.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION) | ||
}) | ||
); | ||
var ActionInput = import_zod15.z.discriminatedUnion("type", [ | ||
@@ -797,6 +721,3 @@ CreateActionInput, | ||
AssignActionInput, | ||
UnassignActionInput, | ||
RequestCorrectionActionInput, | ||
RejectCorrectionActionInput, | ||
ApproveCorrectionActionInput | ||
UnassignActionInput | ||
]); | ||
@@ -844,15 +765,2 @@ | ||
return actions.reduce((status, action) => { | ||
if (action.type === ActionType.REQUEST_CORRECTION) { | ||
return status; | ||
} | ||
if (action.type === ActionType.APPROVE_CORRECTION) { | ||
const requestAction = actions.find(({ id }) => id === action.requestId); | ||
if (!requestAction) { | ||
return status; | ||
} | ||
return { | ||
...status, | ||
...requestAction.data | ||
}; | ||
} | ||
return { | ||
@@ -1035,14 +943,5 @@ ...status, | ||
return (0, import_lodash.flattenDeep)( | ||
config.actions.map((action) => { | ||
if (action.type === ActionType.REQUEST_CORRECTION) { | ||
return [ | ||
...action.forms.map(({ pages }) => pages.map(({ fields }) => fields)), | ||
...(action.onboardingForm || []).flatMap(({ fields }) => fields), | ||
...(action.additionalDetailsForm || []).flatMap( | ||
({ fields }) => fields | ||
) | ||
]; | ||
} | ||
return action.forms.map(({ pages }) => pages.map(({ fields }) => fields)); | ||
}) | ||
config.actions.map( | ||
({ forms }) => forms.map(({ pages }) => pages.map(({ fields }) => fields)) | ||
) | ||
); | ||
@@ -1077,5 +976,2 @@ }; | ||
} | ||
function getAllPages(configuration) { | ||
return configuration.actions.flatMap((action) => action.forms.filter((form) => form.active)).flatMap((form) => form.pages); | ||
} | ||
function validateWorkqueueConfig(workqueueConfigs) { | ||
@@ -1111,12 +1007,1 @@ workqueueConfigs.map((workqueue) => { | ||
}; | ||
// ../commons/src/uuid.ts | ||
var import_uuid = require("uuid"); | ||
function getUUID() { | ||
return (0, import_uuid.v4)(); | ||
} | ||
// ../commons/src/events/transactions.ts | ||
function generateTransactionId() { | ||
return getUUID(); | ||
} |
{ | ||
"name": "@opencrvs/toolkit", | ||
"version": "0.0.30-rr", | ||
"version": "0.0.30", | ||
"description": "OpenCRVS toolkit for building country configurations", | ||
@@ -5,0 +5,0 @@ "license": "MPL-2.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
3480833
91399
41