@opencrvs/toolkit
Advanced tools
Comparing version 0.0.30 to 0.0.31-rr
@@ -15,6 +15,4 @@ import { JSONSchemaType } from 'ajv'; | ||
}); | ||
/** | ||
* @public | ||
*/ | ||
/** @knipignore */ | ||
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; | ||
@@ -23,4 +24,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -31,7 +36,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "CREATE"; | ||
data: Record<string, string | { | ||
@@ -42,8 +48,6 @@ 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; | ||
@@ -69,4 +73,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -77,7 +85,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "CREATE"; | ||
data: Record<string, string | { | ||
@@ -88,7 +97,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -114,4 +121,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "VALIDATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -122,7 +133,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "VALIDATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "VALIDATE"; | ||
data: Record<string, string | { | ||
@@ -133,7 +145,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -159,4 +169,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "NOTIFY"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -167,7 +181,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "NOTIFY"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "NOTIFY"; | ||
data: Record<string, string | { | ||
@@ -178,7 +193,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -214,4 +227,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REGISTER"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -222,5 +239,2 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -231,3 +245,7 @@ trackingId: string; | ||
}, { | ||
id: string; | ||
type: "REGISTER"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -238,5 +256,2 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -248,2 +263,3 @@ trackingId: string; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -269,4 +285,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "DECLARE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -277,7 +297,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "DECLARE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "DECLARE"; | ||
data: Record<string, string | { | ||
@@ -288,7 +309,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -315,4 +334,9 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "ASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -323,2 +347,5 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "ASSIGN"; | ||
createdAt: string; | ||
@@ -328,4 +355,36 @@ 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: "ASSIGN"; | ||
type: z.ZodLiteral<"REQUEST_CORRECTION">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -336,8 +395,16 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: 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; | ||
@@ -361,6 +428,11 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
type: z.ZodLiteral<"APPROVE_CORRECTION">; | ||
requestId: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "UNASSIGN"; | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -371,7 +443,45 @@ 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: "UNASSIGN"; | ||
type: z.ZodLiteral<"REJECT_CORRECTION">; | ||
requestId: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -382,7 +492,18 @@ 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; | ||
@@ -406,6 +527,10 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"CUSTOM">; | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "CUSTOM"; | ||
id: string; | ||
type: "UNASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -416,7 +541,42 @@ 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 | { | ||
@@ -427,5 +587,13 @@ 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; | ||
@@ -432,0 +600,0 @@ }>]>; |
@@ -39,3 +39,2 @@ import { z } from 'zod'; | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -46,2 +45,3 @@ trackingId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
@@ -53,3 +53,2 @@ data: Record<string, string | { | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -60,5 +59,7 @@ 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<{ | ||
@@ -92,4 +93,4 @@ eventId: z.ZodString; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
eventId: string; | ||
duplicates: string[]; | ||
@@ -102,4 +103,4 @@ }, { | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
eventId: string; | ||
duplicates: string[]; | ||
@@ -133,2 +134,3 @@ type?: "VALIDATE" | undefined; | ||
draft: boolean; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -139,6 +141,6 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
createdAtLocation: string; | ||
eventId: string; | ||
}, { | ||
data: Record<string, string | { | ||
@@ -149,5 +151,4 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
type?: "NOTIFY" | undefined; | ||
@@ -184,5 +185,51 @@ draft?: boolean | undefined; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "DECLARE" | undefined; | ||
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 | { | ||
@@ -193,8 +240,114 @@ 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; | ||
type?: "DECLARE" | undefined; | ||
transactionId: string; | ||
metadata: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
type?: "REQUEST_CORRECTION" | undefined; | ||
draft?: boolean | undefined; | ||
}>; | ||
export type DeclareActionInput = z.infer<typeof DeclareActionInput>; | ||
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>; | ||
/** | ||
@@ -231,2 +384,3 @@ * ActionInput types are used to validate the input data for the action. | ||
draft: boolean; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -237,6 +391,6 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
createdAtLocation: string; | ||
eventId: string; | ||
}, { | ||
data: Record<string, string | { | ||
@@ -247,5 +401,4 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
type?: "CREATE" | undefined; | ||
@@ -281,4 +434,4 @@ draft?: boolean | undefined; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
eventId: string; | ||
duplicates: string[]; | ||
@@ -291,4 +444,4 @@ }, { | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
eventId: string; | ||
duplicates: string[]; | ||
@@ -334,3 +487,2 @@ type?: "VALIDATE" | undefined; | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -341,2 +493,3 @@ trackingId: string; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
@@ -348,3 +501,2 @@ data: Record<string, string | { | ||
} | null>; | ||
transactionId: string; | ||
identifiers: { | ||
@@ -355,2 +507,3 @@ trackingId: string; | ||
eventId: string; | ||
transactionId: string; | ||
type?: "REGISTER" | undefined; | ||
@@ -381,2 +534,3 @@ draft?: boolean | undefined; | ||
draft: boolean; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -387,6 +541,6 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
createdAtLocation: string; | ||
eventId: string; | ||
}, { | ||
data: Record<string, string | { | ||
@@ -397,5 +551,4 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
createdAtLocation: string; | ||
eventId: string; | ||
type?: "NOTIFY" | undefined; | ||
@@ -430,4 +583,4 @@ draft?: boolean | undefined; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
eventId: string; | ||
}, { | ||
@@ -439,4 +592,4 @@ data: Record<string, string | { | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
eventId: string; | ||
type?: "DECLARE" | undefined; | ||
@@ -467,2 +620,3 @@ draft?: boolean | undefined; | ||
draft: boolean; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -473,6 +627,6 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
}, { | ||
assignedTo: string; | ||
eventId: string; | ||
}, { | ||
data: Record<string, string | { | ||
@@ -483,5 +637,4 @@ type: string; | ||
} | null>; | ||
eventId: string; | ||
transactionId: string; | ||
assignedTo: string; | ||
eventId: string; | ||
type?: "ASSIGN" | undefined; | ||
@@ -516,5 +669,49 @@ 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 | { | ||
@@ -525,6 +722,108 @@ 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; | ||
type?: "UNASSIGN" | undefined; | ||
transactionId: string; | ||
metadata: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
type?: "REQUEST_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<"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; | ||
}>]>; | ||
@@ -531,0 +830,0 @@ export type ActionInput = z.input<typeof ActionInput>; |
import { z } from 'zod'; | ||
import { TranslationConfig } from './TranslationConfig'; | ||
declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{ | ||
@@ -186,31 +187,11 @@ fieldId: z.ZodString; | ||
id: z.ZodString; | ||
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; | ||
}>; | ||
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
query: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: TranslationConfig; | ||
query: ClauseOutput; | ||
}, { | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: TranslationConfig; | ||
query: ClauseInput; | ||
@@ -217,0 +198,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,4 +30,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -38,7 +42,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "CREATE"; | ||
data: Record<string, string | { | ||
@@ -49,7 +54,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -75,4 +78,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "VALIDATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -83,7 +90,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "VALIDATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "VALIDATE"; | ||
data: Record<string, string | { | ||
@@ -94,7 +102,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -120,4 +126,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "NOTIFY"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -128,7 +138,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "NOTIFY"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "NOTIFY"; | ||
data: Record<string, string | { | ||
@@ -139,7 +150,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -175,4 +184,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REGISTER"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -183,5 +196,2 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -192,3 +202,7 @@ trackingId: string; | ||
}, { | ||
id: string; | ||
type: "REGISTER"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -199,5 +213,2 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -209,2 +220,3 @@ trackingId: string; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -230,4 +242,8 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "DECLARE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -238,7 +254,8 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "DECLARE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
}, { | ||
type: "DECLARE"; | ||
data: Record<string, string | { | ||
@@ -249,7 +266,5 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodString; | ||
@@ -276,4 +291,9 @@ createdBy: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "ASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
@@ -284,2 +304,5 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "ASSIGN"; | ||
createdAt: string; | ||
@@ -289,4 +312,36 @@ 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: "ASSIGN"; | ||
type: z.ZodLiteral<"REQUEST_CORRECTION">; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -297,8 +352,16 @@ type: string; | ||
} | null>; | ||
}, { | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: 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; | ||
@@ -322,6 +385,11 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
type: z.ZodLiteral<"APPROVE_CORRECTION">; | ||
requestId: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "UNASSIGN"; | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -332,7 +400,45 @@ 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: "UNASSIGN"; | ||
type: z.ZodLiteral<"REJECT_CORRECTION">; | ||
requestId: z.ZodString; | ||
}>, "strip", z.ZodTypeAny, { | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -343,7 +449,18 @@ 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; | ||
@@ -367,6 +484,10 @@ createdBy: z.ZodString; | ||
}, { | ||
type: z.ZodLiteral<"CUSTOM">; | ||
type: z.ZodLiteral<"UNASSIGN">; | ||
}>, "strip", z.ZodTypeAny, { | ||
type: "CUSTOM"; | ||
id: string; | ||
type: "UNASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -377,7 +498,42 @@ 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 | { | ||
@@ -388,16 +544,25 @@ 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, { | ||
id: string; | ||
type: string; | ||
id: string; | ||
transactionId: string; | ||
createdAt: string; | ||
updatedAt: string; | ||
actions: ({ | ||
id: string; | ||
type: "CREATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -408,8 +573,9 @@ type: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "VALIDATE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
} | { | ||
type: "VALIDATE"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
@@ -420,8 +586,9 @@ type: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "NOTIFY"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
} | { | ||
type: "NOTIFY"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
@@ -432,8 +599,9 @@ type: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "REGISTER"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
} | { | ||
type: "REGISTER"; | ||
draft: boolean; | ||
data: Record<string, string | { | ||
@@ -444,5 +612,2 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -453,4 +618,8 @@ trackingId: string; | ||
} | { | ||
id: string; | ||
type: "DECLARE"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -461,8 +630,22 @@ type: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "ASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
} | { | ||
type: "ASSIGN"; | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -473,9 +656,22 @@ type: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
} | { | ||
type: "UNASSIGN"; | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -486,8 +682,22 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
} | { | ||
id: string; | ||
type: "UNASSIGN"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
} | { | ||
id: string; | ||
type: "CUSTOM"; | ||
draft: boolean; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -498,14 +708,14 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
})[]; | ||
createdAt: string; | ||
updatedAt: string; | ||
}, { | ||
id: string; | ||
type: string; | ||
id: string; | ||
transactionId: string; | ||
createdAt: string; | ||
updatedAt: string; | ||
actions: ({ | ||
id: string; | ||
type: "CREATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -516,8 +726,9 @@ type: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "VALIDATE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
type: "VALIDATE"; | ||
data: Record<string, string | { | ||
@@ -528,8 +739,9 @@ type: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "NOTIFY"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
type: "NOTIFY"; | ||
data: Record<string, string | { | ||
@@ -540,8 +752,9 @@ type: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "REGISTER"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
type: "REGISTER"; | ||
data: Record<string, string | { | ||
@@ -552,5 +765,2 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
identifiers: { | ||
@@ -562,3 +772,7 @@ trackingId: string; | ||
} | { | ||
id: string; | ||
type: "DECLARE"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -569,8 +783,22 @@ type: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "ASSIGN"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
type: "ASSIGN"; | ||
id: string; | ||
type: "REQUEST_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -581,9 +809,22 @@ type: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "APPROVE_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
assignedTo: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
type: "UNASSIGN"; | ||
id: string; | ||
type: "REJECT_CORRECTION"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -594,8 +835,22 @@ type: string; | ||
} | null>; | ||
requestId: string; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "UNASSIGN"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
type: string; | ||
filename: string; | ||
originalFilename: string; | ||
} | null>; | ||
draft?: boolean | undefined; | ||
} | { | ||
id: string; | ||
type: "CUSTOM"; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
data: Record<string, string | { | ||
@@ -606,9 +861,8 @@ type: string; | ||
} | null>; | ||
createdAt: string; | ||
createdBy: string; | ||
createdAtLocation: string; | ||
draft?: boolean | undefined; | ||
})[]; | ||
createdAt: string; | ||
updatedAt: string; | ||
}>; | ||
export type EventDocument = z.infer<typeof EventDocument>; | ||
//# sourceMappingURL=EventDocument.d.ts.map |
@@ -9,2 +9,4 @@ 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; | ||
@@ -11,0 +13,0 @@ export type BulletListFieldValue = z.infer<typeof BulletListFieldValue>; |
export * from './ActionConfig'; | ||
export * from './EventConfig'; | ||
export * from './EventConfigInput'; | ||
export * from './FieldConfig'; | ||
@@ -19,2 +20,3 @@ 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<{ | ||
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; | ||
}>>; | ||
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}, { | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}>; | ||
fields: z.ZodArray<z.ZodObject<{ | ||
id: z.ZodString; | ||
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; | ||
}>>; | ||
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>>; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}, { | ||
id: string; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}>, "many">; | ||
@@ -135,30 +36,10 @@ }, "strip", z.ZodTypeAny, { | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}; | ||
fields: { | ||
id: string; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}[]; | ||
@@ -168,30 +49,10 @@ }, { | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}; | ||
fields: { | ||
id: string; | ||
value: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
emptyValueMessage?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
value: TranslationConfig; | ||
label: TranslationConfig; | ||
emptyValueMessage?: TranslationConfig | undefined; | ||
}[]; | ||
@@ -198,0 +59,0 @@ }>; |
import { z } from 'zod'; | ||
export declare const TranslationConfig: z.ZodObject<{ | ||
export type TranslationConfig = { | ||
id: string; | ||
defaultMessage: string; | ||
description: string; | ||
}; | ||
export type MessageDescriptorZod = { | ||
id: z.ZodString; | ||
defaultMessage: z.ZodString; | ||
description: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}, { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}>; | ||
export type TranslationConfig = z.infer<typeof TranslationConfig>; | ||
}; | ||
type ExplicitTypeToReduceDeclarationSize = z.ZodObject<MessageDescriptorZod, 'strip', z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
export declare const TranslationConfig: ExplicitTypeToReduceDeclarationSize; | ||
export {}; | ||
//# 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'; | ||
@@ -37,9 +38,5 @@ import { WorkqueueConfig } from './WorkqueueConfig'; | ||
export declare function getAllFields(configuration: EventConfig): ({ | ||
id: string; | ||
type: "TEXT"; | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: TranslationConfig; | ||
options?: { | ||
@@ -50,10 +47,5 @@ type?: "number" | "text" | "email" | "password" | undefined; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -74,33 +66,17 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "DATE"; | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: TranslationConfig; | ||
options?: { | ||
notice?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
notice?: TranslationConfig | undefined; | ||
} | undefined; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -121,11 +97,7 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
type: "PARAGRAPH"; | ||
id: string; | ||
@@ -135,16 +107,8 @@ options: { | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
type: "PARAGRAPH"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -165,26 +129,21 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
type: "FILE"; | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
options: { | ||
size?: "NORMAL" | "LARGE" | undefined; | ||
}; | ||
type: "RADIO_GROUP"; | ||
label: TranslationConfig; | ||
optionValues: { | ||
value: string; | ||
label: TranslationConfig; | ||
}[]; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -205,34 +164,17 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
flexDirection?: "column" | "row" | "row-reverse" | "column-reverse" | undefined; | ||
} | { | ||
type: "RADIO_GROUP"; | ||
id: string; | ||
options: { | ||
value: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
}[]; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
type: "BULLET_LIST"; | ||
label: TranslationConfig; | ||
items: TranslationConfig[]; | ||
font: "reg12" | "reg14" | "reg16" | "reg18" | "h4" | "h3" | "h2" | "h1"; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -253,33 +195,14 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
flexDirection?: "row" | "row-reverse" | "column" | "column-reverse" | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
type: "BULLET_LIST"; | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
items: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}[]; | ||
font: "reg12" | "reg14" | "reg16" | "reg18" | "h4" | "h3" | "h2" | "h1"; | ||
type: "PAGE_HEADER"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -300,34 +223,45 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
type: "SELECT"; | ||
id: string; | ||
options: { | ||
value: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: TranslationConfig; | ||
}[]; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
type: "SELECT"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
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?: ({ | ||
@@ -348,26 +282,14 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
type: "CHECKBOX"; | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
type: "FILE"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -388,26 +310,14 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
id: string; | ||
type: "COUNTRY"; | ||
id: string; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -428,11 +338,7 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
placeholder?: TranslationConfig | undefined; | ||
} | { | ||
type: "LOCATION"; | ||
id: string; | ||
@@ -445,16 +351,8 @@ options: { | ||
}; | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
type: "LOCATION"; | ||
label: TranslationConfig; | ||
validation?: { | ||
message: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
message: TranslationConfig; | ||
validator?: any; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
@@ -475,11 +373,340 @@ type: "SHOW"; | ||
} | undefined; | ||
required?: boolean | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
placeholder?: TranslationConfig | undefined; | ||
})[]; | ||
export declare function getAllPages(configuration: EventConfig): { | ||
id: string; | ||
fields: ({ | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
} | undefined; | ||
})[]; | ||
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'; | ||
/** | ||
@@ -9,29 +10,9 @@ * Configuration for workqueue. Workqueues are used to display a list of events. | ||
column: z.ZodString; | ||
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; | ||
}>; | ||
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, TranslationConfig>; | ||
}, "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">; | ||
@@ -48,5 +29,5 @@ filters: z.ZodArray<z.ZodObject<{ | ||
}, "strip", z.ZodTypeAny, { | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
}, { | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
}>, "many">; | ||
@@ -56,11 +37,7 @@ }, "strip", z.ZodTypeAny, { | ||
fields: { | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
column: string; | ||
label: TranslationConfig; | ||
}[]; | ||
filters: { | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
}[]; | ||
@@ -70,11 +47,7 @@ }, { | ||
fields: { | ||
label: { | ||
id: string; | ||
description: string; | ||
defaultMessage: string; | ||
}; | ||
column: string; | ||
label: TranslationConfig; | ||
}[]; | ||
filters: { | ||
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[]; | ||
status: ("CREATED" | "NOTIFIED" | "DECLARED" | "VALIDATED" | "REGISTERED" | "CERTIFIED")[]; | ||
}[]; | ||
@@ -81,0 +54,0 @@ }>; |
@@ -36,3 +36,3 @@ import { JSONSchema } from '../commons/conditionals'; | ||
type: { | ||
const: "CREATE" | "VALIDATE" | "NOTIFY" | "REGISTER" | "DECLARE" | "ASSIGN" | "UNASSIGN" | "CUSTOM"; | ||
const: "CREATE" | "VALIDATE" | "NOTIFY" | "REGISTER" | "DECLARE" | "ASSIGN" | "REQUEST_CORRECTION" | "APPROVE_CORRECTION" | "REJECT_CORRECTION" | "UNASSIGN" | "CUSTOM"; | ||
}; | ||
@@ -91,12 +91,2 @@ 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,3 +29,2 @@ "use strict"; | ||
not: () => not, | ||
objectHasProperty: () => objectHasProperty, | ||
or: () => or2, | ||
@@ -122,2 +121,3 @@ userHasScope: () => userHasScope | ||
PARAGRAPH: "PARAGRAPH", | ||
PAGE_HEADER: "PAGE_HEADER", | ||
RADIO_GROUP: "RADIO_GROUP", | ||
@@ -164,2 +164,5 @@ 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({ | ||
@@ -174,3 +177,6 @@ type: import_zod3.z.literal(FieldType.FILE) | ||
type: import_zod3.z.literal(FieldType.RADIO_GROUP), | ||
options: import_zod3.z.array(SelectOption), | ||
optionValues: import_zod3.z.array(SelectOption).describe("A list of options"), | ||
options: import_zod3.z.object({ | ||
size: import_zod3.z.enum(["NORMAL", "LARGE"]).optional() | ||
}), | ||
flexDirection: import_zod3.z.enum(["row", "row-reverse", "column", "column-reverse"]).optional().describe("Direction to stack the options") | ||
@@ -209,2 +215,3 @@ }).describe("Grouped radio options"); | ||
BulletList, | ||
PageHeader, | ||
Select, | ||
@@ -255,3 +262,5 @@ Checkbox, | ||
VALIDATE: "VALIDATE", | ||
CORRECT: "CORRECT", | ||
REQUEST_CORRECTION: "REQUEST_CORRECTION", | ||
REJECT_CORRECTION: "REJECT_CORRECTION", | ||
APPROVE_CORRECTION: "APPROVE_CORRECTION", | ||
DETECT_DUPLICATE: "DETECT_DUPLICATE", | ||
@@ -288,2 +297,19 @@ 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( | ||
@@ -300,2 +326,5 @@ import_zod5.z.object({ | ||
DeleteConfig, | ||
RequestCorrectionConfig, | ||
RejectCorrectionConfig, | ||
ApproveCorrectionConfig, | ||
CustomConfig | ||
@@ -307,6 +336,73 @@ ]); | ||
// ../commons/src/events/DeduplicationConfig.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_zod6 = require("zod"); | ||
var Field = import_zod6.z.object({ | ||
id: import_zod6.z.string().describe("Id of summary field"), | ||
var import_zod7 = require("zod"); | ||
var Field = import_zod7.z.object({ | ||
id: import_zod7.z.string().describe("Id of summary field"), | ||
value: TranslationConfig.describe( | ||
@@ -318,17 +414,17 @@ "Summary field value. Can utilise values defined in configuration and EventMetadata" | ||
}); | ||
var Title = import_zod6.z.object({ | ||
id: import_zod6.z.string(), | ||
var Title = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
label: TranslationConfig.describe("Title content"), | ||
emptyValueMessage: TranslationConfig.optional() | ||
}); | ||
var SummaryConfig = import_zod6.z.object({ | ||
var SummaryConfig = import_zod7.z.object({ | ||
title: Title.describe("Title of summary view."), | ||
fields: import_zod6.z.array(Field).describe("Fields rendered in summary view.") | ||
fields: import_zod7.z.array(Field).describe("Fields rendered in summary view.") | ||
}).describe("Configuration for summary in event."); | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
var import_zod8 = require("zod"); | ||
var import_zod9 = require("zod"); | ||
// ../commons/src/events/EventMetadata.ts | ||
var import_zod7 = require("zod"); | ||
var import_zod8 = require("zod"); | ||
var EventStatus = { | ||
@@ -343,28 +439,28 @@ CREATED: "CREATED", | ||
var eventStatuses = Object.values(EventStatus); | ||
var EventStatuses = import_zod7.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
type: import_zod7.z.string(), | ||
var EventStatuses = import_zod8.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod8.z.object({ | ||
id: import_zod8.z.string(), | ||
type: import_zod8.z.string(), | ||
status: EventStatuses, | ||
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() | ||
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() | ||
}); | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
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({ | ||
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({ | ||
// @TODO: Improve typing by enforcing EventMetadataKeys and form page fields as possible values | ||
column: import_zod8.z.string(), | ||
column: import_zod9.z.string(), | ||
label: TranslationConfig | ||
}) | ||
), | ||
filters: import_zod8.z.array( | ||
import_zod8.z.object({ | ||
status: import_zod8.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
filters: import_zod9.z.array( | ||
import_zod9.z.object({ | ||
status: import_zod9.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
}) | ||
@@ -374,69 +470,2 @@ ).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 | ||
@@ -472,2 +501,3 @@ var EventConfig = import_zod10.z.object({ | ||
var ParagraphFieldValue = import_zod12.z.string(); | ||
var PageHeaderFieldValue = import_zod12.z.string(); | ||
var BulletListFieldValue = import_zod12.z.string(); | ||
@@ -497,2 +527,3 @@ var FileFieldValue = import_zod12.z.object({ | ||
var ActionBase = import_zod13.z.object({ | ||
id: import_zod13.z.string(), | ||
createdAt: import_zod13.z.string().datetime(), | ||
@@ -544,2 +575,19 @@ 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( | ||
@@ -557,2 +605,5 @@ import_zod13.z.object({ | ||
AssignedAction, | ||
RequestedCorrectionAction, | ||
ApprovedCorrectionAction, | ||
RejectedCorrectionAction, | ||
UnassignedAction, | ||
@@ -577,3 +628,2 @@ CustomAction | ||
type: import_zod14.z.string(), | ||
transactionId: import_zod14.z.string(), | ||
createdAt: import_zod14.z.string().datetime(), | ||
@@ -635,2 +685,20 @@ 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", [ | ||
@@ -643,3 +711,6 @@ CreateActionInput, | ||
AssignActionInput, | ||
UnassignActionInput | ||
UnassignActionInput, | ||
RequestCorrectionActionInput, | ||
RejectCorrectionActionInput, | ||
ApproveCorrectionActionInput | ||
]); | ||
@@ -775,2 +846,5 @@ | ||
// ../commons/src/uuid.ts | ||
var import_uuid = require("uuid"); | ||
// src/conditionals/deduplication.ts | ||
@@ -1042,13 +1116,1 @@ function and(clauses) { | ||
}; | ||
function objectHasProperty(property, type, format) { | ||
return { | ||
type: "object", | ||
properties: { | ||
[property]: { | ||
type, | ||
format | ||
} | ||
}, | ||
required: [property] | ||
}; | ||
} |
@@ -28,2 +28,3 @@ "use strict"; | ||
ActionType: () => ActionType, | ||
ApproveCorrectionActionInput: () => ApproveCorrectionActionInput, | ||
Clause: () => Clause, | ||
@@ -48,2 +49,4 @@ ConditionalTypes: () => ConditionalTypes, | ||
RegisterActionInput: () => RegisterActionInput, | ||
RejectCorrectionActionInput: () => RejectCorrectionActionInput, | ||
RequestCorrectionActionInput: () => RequestCorrectionActionInput, | ||
ResolvedUser: () => ResolvedUser, | ||
@@ -62,3 +65,5 @@ SummaryConfig: () => SummaryConfig, | ||
findPageFields: () => findPageFields, | ||
generateTransactionId: () => generateTransactionId, | ||
getAllFields: () => getAllFields, | ||
getAllPages: () => getAllPages, | ||
getCurrentEventState: () => getCurrentEventState, | ||
@@ -149,2 +154,3 @@ isUndeclaredDraft: () => isUndeclaredDraft, | ||
PARAGRAPH: "PARAGRAPH", | ||
PAGE_HEADER: "PAGE_HEADER", | ||
RADIO_GROUP: "RADIO_GROUP", | ||
@@ -191,2 +197,5 @@ 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({ | ||
@@ -201,3 +210,6 @@ type: import_zod3.z.literal(FieldType.FILE) | ||
type: import_zod3.z.literal(FieldType.RADIO_GROUP), | ||
options: import_zod3.z.array(SelectOption), | ||
optionValues: import_zod3.z.array(SelectOption).describe("A list of options"), | ||
options: import_zod3.z.object({ | ||
size: import_zod3.z.enum(["NORMAL", "LARGE"]).optional() | ||
}), | ||
flexDirection: import_zod3.z.enum(["row", "row-reverse", "column", "column-reverse"]).optional().describe("Direction to stack the options") | ||
@@ -236,2 +248,3 @@ }).describe("Grouped radio options"); | ||
BulletList, | ||
PageHeader, | ||
Select, | ||
@@ -282,3 +295,5 @@ Checkbox, | ||
VALIDATE: "VALIDATE", | ||
CORRECT: "CORRECT", | ||
REQUEST_CORRECTION: "REQUEST_CORRECTION", | ||
REJECT_CORRECTION: "REJECT_CORRECTION", | ||
APPROVE_CORRECTION: "APPROVE_CORRECTION", | ||
DETECT_DUPLICATE: "DETECT_DUPLICATE", | ||
@@ -315,2 +330,19 @@ 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( | ||
@@ -327,2 +359,5 @@ import_zod5.z.object({ | ||
DeleteConfig, | ||
RequestCorrectionConfig, | ||
RejectCorrectionConfig, | ||
ApproveCorrectionConfig, | ||
CustomConfig | ||
@@ -334,6 +369,73 @@ ]); | ||
// ../commons/src/events/DeduplicationConfig.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_zod6 = require("zod"); | ||
var Field = import_zod6.z.object({ | ||
id: import_zod6.z.string().describe("Id of summary field"), | ||
var import_zod7 = require("zod"); | ||
var Field = import_zod7.z.object({ | ||
id: import_zod7.z.string().describe("Id of summary field"), | ||
value: TranslationConfig.describe( | ||
@@ -345,17 +447,17 @@ "Summary field value. Can utilise values defined in configuration and EventMetadata" | ||
}); | ||
var Title = import_zod6.z.object({ | ||
id: import_zod6.z.string(), | ||
var Title = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
label: TranslationConfig.describe("Title content"), | ||
emptyValueMessage: TranslationConfig.optional() | ||
}); | ||
var SummaryConfig = import_zod6.z.object({ | ||
var SummaryConfig = import_zod7.z.object({ | ||
title: Title.describe("Title of summary view."), | ||
fields: import_zod6.z.array(Field).describe("Fields rendered in summary view.") | ||
fields: import_zod7.z.array(Field).describe("Fields rendered in summary view.") | ||
}).describe("Configuration for summary in event."); | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
var import_zod8 = require("zod"); | ||
var import_zod9 = require("zod"); | ||
// ../commons/src/events/EventMetadata.ts | ||
var import_zod7 = require("zod"); | ||
var import_zod8 = require("zod"); | ||
var EventStatus = { | ||
@@ -370,13 +472,13 @@ CREATED: "CREATED", | ||
var eventStatuses = Object.values(EventStatus); | ||
var EventStatuses = import_zod7.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod7.z.object({ | ||
id: import_zod7.z.string(), | ||
type: import_zod7.z.string(), | ||
var EventStatuses = import_zod8.z.nativeEnum(EventStatus); | ||
var EventMetadata = import_zod8.z.object({ | ||
id: import_zod8.z.string(), | ||
type: import_zod8.z.string(), | ||
status: EventStatuses, | ||
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() | ||
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() | ||
}); | ||
@@ -432,14 +534,14 @@ var eventMetadataLabelMap = { | ||
// ../commons/src/events/WorkqueueConfig.ts | ||
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({ | ||
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({ | ||
// @TODO: Improve typing by enforcing EventMetadataKeys and form page fields as possible values | ||
column: import_zod8.z.string(), | ||
column: import_zod9.z.string(), | ||
label: TranslationConfig | ||
}) | ||
), | ||
filters: import_zod8.z.array( | ||
import_zod8.z.object({ | ||
status: import_zod8.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
filters: import_zod9.z.array( | ||
import_zod9.z.object({ | ||
status: import_zod9.z.array(EventStatuses).describe("Defines which statusese are included in the workqueue.") | ||
}) | ||
@@ -449,69 +551,2 @@ ).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 | ||
@@ -528,2 +563,4 @@ var EventConfig = import_zod10.z.object({ | ||
}); | ||
// ../commons/src/events/EventConfigInput.ts | ||
var defineForm = (form) => FormConfig.parse(form); | ||
@@ -550,2 +587,3 @@ var defineFormPage = (formPage) => FormPage.parse(formPage); | ||
var ParagraphFieldValue = import_zod12.z.string(); | ||
var PageHeaderFieldValue = import_zod12.z.string(); | ||
var BulletListFieldValue = import_zod12.z.string(); | ||
@@ -575,2 +613,3 @@ var FileFieldValue = import_zod12.z.object({ | ||
var ActionBase = import_zod13.z.object({ | ||
id: import_zod13.z.string(), | ||
createdAt: import_zod13.z.string().datetime(), | ||
@@ -622,2 +661,19 @@ 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( | ||
@@ -635,2 +691,5 @@ import_zod13.z.object({ | ||
AssignedAction, | ||
RequestedCorrectionAction, | ||
ApprovedCorrectionAction, | ||
RejectedCorrectionAction, | ||
UnassignedAction, | ||
@@ -655,3 +714,2 @@ CustomAction | ||
type: import_zod14.z.string(), | ||
transactionId: import_zod14.z.string(), | ||
createdAt: import_zod14.z.string().datetime(), | ||
@@ -713,2 +771,20 @@ 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", [ | ||
@@ -721,3 +797,6 @@ CreateActionInput, | ||
AssignActionInput, | ||
UnassignActionInput | ||
UnassignActionInput, | ||
RequestCorrectionActionInput, | ||
RejectCorrectionActionInput, | ||
ApproveCorrectionActionInput | ||
]); | ||
@@ -765,2 +844,15 @@ | ||
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 { | ||
@@ -943,5 +1035,14 @@ ...status, | ||
return (0, import_lodash.flattenDeep)( | ||
config.actions.map( | ||
({ forms }) => forms.map(({ pages }) => pages.map(({ fields }) => fields)) | ||
) | ||
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)); | ||
}) | ||
); | ||
@@ -976,2 +1077,5 @@ }; | ||
} | ||
function getAllPages(configuration) { | ||
return configuration.actions.flatMap((action) => action.forms.filter((form) => form.active)).flatMap((form) => form.pages); | ||
} | ||
function validateWorkqueueConfig(workqueueConfigs) { | ||
@@ -1007,1 +1111,12 @@ 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", | ||
"version": "0.0.31-rr", | ||
"description": "OpenCRVS toolkit for building country configurations", | ||
@@ -18,2 +18,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"uuid": "^9.0.0", | ||
"ajv": "^8.17.1", | ||
@@ -25,2 +26,3 @@ "superjson": "1.9.0-0", | ||
"devDependencies": { | ||
"@types/uuid": "^9.0.3", | ||
"esbuild": "^0.24.0", | ||
@@ -27,0 +29,0 @@ "typescript": "^5.6.3", |
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
43
2871783
5
4
71835
+ Addeduuid@^9.0.0
+ Addeduuid@9.0.1(transitive)