New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opencrvs/toolkit

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencrvs/toolkit - npm Package Compare versions

Comparing version 0.0.8-scopes to 0.0.9-events

dist/events/defineConfig.d.ts

6

dist/conditionals/conditionals.d.ts
import { JSONSchemaType } from 'ajv';
import { z } from 'zod';
import { EventDocument } from '../events';
import { ActionFormData, EventDocument } from '../events';
export declare function Conditional(): z.ZodType<JSONSchema>;

@@ -11,7 +11,7 @@ export type ConditionalParameters = {

$event: EventDocument;
$form: Record<string, any>;
$form: ActionFormData;
} | {
$form: Record<string, any>;
$form: ActionFormData;
});
export type JSONSchema = Omit<JSONSchemaType<ConditionalParameters>, 'properties'>;
//# sourceMappingURL=conditionals.d.ts.map

@@ -5,17 +5,37 @@ import { z } from 'zod';

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {
type: z.ZodLiteral<"CREATE">;
createdAtLocation: z.ZodString;
}>, "strip", z.ZodTypeAny, {
type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -26,17 +46,37 @@ }>;

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {
type: z.ZodLiteral<"CREATE">;
createdAtLocation: z.ZodString;
}>, "strip", z.ZodTypeAny, {
type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -46,3 +86,16 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -52,14 +105,37 @@ type: z.ZodLiteral<"DRAFT">;

type: "DRAFT";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "DRAFT";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -69,28 +145,58 @@ type: z.ZodLiteral<"VALIDATE">;

type: "VALIDATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "VALIDATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {
type: z.ZodLiteral<"NOTIFY">;
createdAtLocation: z.ZodString;
}>, "strip", z.ZodTypeAny, {
type: "NOTIFY";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "NOTIFY";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -100,3 +206,16 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -116,5 +235,10 @@ type: z.ZodLiteral<"REGISTER">;

type: "REGISTER";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
identifiers: {

@@ -126,5 +250,10 @@ trackingId: string;

type: "REGISTER";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
identifiers: {

@@ -137,3 +266,16 @@ trackingId: string;

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -143,14 +285,37 @@ type: z.ZodLiteral<"DECLARE">;

type: "DECLARE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "DECLARE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -161,11 +326,21 @@ type: z.ZodLiteral<"ASSIGN">;

type: "ASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
assignedTo: string;
}, {
type: "ASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
assignedTo: string;

@@ -175,3 +350,16 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -181,14 +369,37 @@ type: z.ZodLiteral<"UNASSIGN">;

type: "UNASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "UNASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -198,14 +409,25 @@ type: z.ZodLiteral<"CUSTOM">;

type: "CUSTOM";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "CUSTOM";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>]>;
export type ActionDocument = z.infer<typeof ActionDocument>;
export type CreatedAction = z.infer<typeof CreatedAction>;
export type ActionFormData = ActionDocument['data'];
export {};
//# sourceMappingURL=ActionDocument.d.ts.map

@@ -5,3 +5,15 @@ import { z } from 'zod';

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -21,4 +33,8 @@ type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;

type: "REGISTER";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
identifiers: {

@@ -30,4 +46,8 @@ trackingId: string;

}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
identifiers: {

@@ -43,3 +63,15 @@ trackingId: string;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -49,8 +81,16 @@ type: z.ZodDefault<z.ZodLiteral<"VALIDATE">>;

type: "VALIDATE";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;

@@ -62,3 +102,15 @@ type?: "VALIDATE" | undefined;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -69,9 +121,17 @@ type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;

type: "NOTIFY";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -84,3 +144,15 @@ eventId: string;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -90,8 +162,16 @@ type: z.ZodDefault<z.ZodLiteral<"DRAFT">>;

type: "DRAFT";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;

@@ -104,3 +184,15 @@ type?: "DRAFT" | undefined;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -110,8 +202,16 @@ type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;

type: "DECLARE";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;

@@ -121,6 +221,26 @@ type?: "DECLARE" | undefined;

export type DeclareActionInput = z.infer<typeof DeclareActionInput>;
/**
* ActionInput types are used to validate the input data for the action.
* In our use case, we use it directly with TRPC to validate the input data for the action.
* using z.literal(ActionType.ACTION).default(ActionType.ACTION) makes them more convenient to use
* without having to pass the type in the input data, when it's defined in the method.
*
* e.g. mutation.declare({createdAt: new Date()}) vs mutation.declare({createdAt: new Date(), type: 'DECLARE'})
*/
export declare const ActionInput: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
eventId: z.ZodString;
transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -131,9 +251,17 @@ type: z.ZodDefault<z.ZodLiteral<"CREATE">>;

type: "CREATE";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -145,3 +273,15 @@ eventId: string;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -151,8 +291,16 @@ type: z.ZodDefault<z.ZodLiteral<"VALIDATE">>;

type: "VALIDATE";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;

@@ -163,3 +311,15 @@ type?: "VALIDATE" | undefined;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -169,8 +329,16 @@ type: z.ZodDefault<z.ZodLiteral<"DRAFT">>;

type: "DRAFT";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;

@@ -181,3 +349,15 @@ type?: "DRAFT" | undefined;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -197,4 +377,8 @@ type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;

type: "REGISTER";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
identifiers: {

@@ -206,4 +390,8 @@ trackingId: string;

}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
identifiers: {

@@ -218,3 +406,15 @@ trackingId: string;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -225,9 +425,17 @@ type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;

type: "NOTIFY";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -239,3 +447,15 @@ eventId: string;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -245,8 +465,16 @@ type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;

type: "DECLARE";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;

@@ -257,3 +485,15 @@ type?: "DECLARE" | undefined;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -264,9 +504,17 @@ type: z.ZodDefault<z.ZodLiteral<"ASSIGN">>;

type: "ASSIGN";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
assignedTo: string;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
assignedTo: string;

@@ -278,3 +526,15 @@ eventId: string;

transactionId: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
}, {

@@ -284,8 +544,16 @@ type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>;

type: "UNASSIGN";
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
data: Record<string, any>;
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;

@@ -292,0 +560,0 @@ type?: "UNASSIGN" | undefined;

@@ -11,17 +11,37 @@ import { z } from 'zod';

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {
type: z.ZodLiteral<"CREATE">;
createdAtLocation: z.ZodString;
}>, "strip", z.ZodTypeAny, {
type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -31,3 +51,16 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -37,14 +70,37 @@ type: z.ZodLiteral<"DRAFT">;

type: "DRAFT";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "DRAFT";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -54,28 +110,58 @@ type: z.ZodLiteral<"VALIDATE">;

type: "VALIDATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "VALIDATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {
type: z.ZodLiteral<"NOTIFY">;
createdAtLocation: z.ZodString;
}>, "strip", z.ZodTypeAny, {
type: "NOTIFY";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "NOTIFY";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;

@@ -85,3 +171,16 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -101,5 +200,10 @@ type: z.ZodLiteral<"REGISTER">;

type: "REGISTER";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
identifiers: {

@@ -111,5 +215,10 @@ trackingId: string;

type: "REGISTER";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
identifiers: {

@@ -122,3 +231,16 @@ trackingId: string;

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -128,14 +250,37 @@ type: z.ZodLiteral<"DECLARE">;

type: "DECLARE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "DECLARE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -146,11 +291,21 @@ type: z.ZodLiteral<"ASSIGN">;

type: "ASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
assignedTo: string;
}, {
type: "ASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
assignedTo: string;

@@ -160,3 +315,16 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -166,14 +334,37 @@ type: z.ZodLiteral<"UNASSIGN">;

type: "UNASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "UNASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>, z.ZodObject<z.objectUtil.extendShape<{
createdAt: z.ZodString;
createdBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
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]>>;
createdAtLocation: z.ZodString;
}, {

@@ -183,14 +374,24 @@ type: z.ZodLiteral<"CUSTOM">;

type: "CUSTOM";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}, {
type: "CUSTOM";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
id: string;
type: string;
id: string;
transactionId: string;

@@ -201,27 +402,50 @@ createdAt: string;

type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "DRAFT";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "VALIDATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "NOTIFY";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "REGISTER";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
identifiers: {

@@ -233,25 +457,45 @@ trackingId: string;

type: "DECLARE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "ASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
assignedTo: string;
} | {
type: "UNASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "CUSTOM";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
})[];
}, {
id: string;
type: string;
id: string;
transactionId: string;

@@ -262,27 +506,50 @@ createdAt: string;

type: "CREATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "DRAFT";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "VALIDATE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "NOTIFY";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "REGISTER";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
identifiers: {

@@ -294,21 +561,41 @@ trackingId: string;

type: "DECLARE";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "ASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
assignedTo: string;
} | {
type: "UNASSIGN";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "CUSTOM";
data: Record<string, any>;
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
})[];

@@ -315,0 +602,0 @@ }>;

import { z } from 'zod';
export declare const EventIndex: z.ZodObject<{
export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
id: z.ZodString;

@@ -19,10 +19,11 @@ type: z.ZodString;

updatedBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
}, {
data: z.ZodRecord<z.ZodString, z.ZodAny>;
}>, "strip", z.ZodTypeAny, {
id: string;
type: string;
id: string;
status: "CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED";
data: Record<string, unknown>;
createdAt: string;
status: "DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED";
createdBy: string;
data: Record<string, any>;
createdAtLocation: string;

@@ -33,8 +34,8 @@ assignedTo: string | null;

}, {
id: string;
type: string;
id: string;
status: "CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED";
data: Record<string, unknown>;
createdAt: string;
status: "DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED";
createdBy: string;
data: Record<string, any>;
createdAtLocation: string;

@@ -46,43 +47,2 @@ assignedTo: string | null;

export type EventIndex = z.infer<typeof EventIndex>;
export declare const EventIndices: z.ZodArray<z.ZodObject<{
id: z.ZodString;
type: z.ZodString;
status: z.ZodNativeEnum<{
readonly CREATED: "CREATED";
readonly DRAFT: "DRAFT";
readonly NOTIFIED: "NOTIFIED";
readonly DECLARED: "DECLARED";
readonly REGISTERED: "REGISTERED";
readonly CERTIFIED: "CERTIFIED";
}>;
createdAt: z.ZodString;
createdBy: z.ZodString;
createdAtLocation: z.ZodString;
modifiedAt: z.ZodString;
assignedTo: z.ZodNullable<z.ZodString>;
updatedBy: z.ZodString;
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
type: string;
id: string;
status: "CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED";
data: Record<string, unknown>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
assignedTo: string | null;
modifiedAt: string;
updatedBy: string;
}, {
type: string;
id: string;
status: "CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED";
data: Record<string, unknown>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
assignedTo: string | null;
modifiedAt: string;
updatedBy: string;
}>, "many">;
//# sourceMappingURL=EventIndex.d.ts.map

@@ -15,3 +15,3 @@ import { z } from 'zod';

export type EventStatus = (typeof EventStatus)[keyof typeof EventStatus];
export declare const eventStatuses: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED")[];
export declare const eventStatuses: ("DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED")[];
export declare const EventStatuses: z.ZodNativeEnum<{

@@ -48,6 +48,6 @@ readonly CREATED: "CREATED";

}, "strip", z.ZodTypeAny, {
id: string;
type: string;
id: string;
status: "CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED";
createdAt: string;
status: "DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED";
createdBy: string;

@@ -59,6 +59,6 @@ createdAtLocation: string;

}, {
id: string;
type: string;
id: string;
status: "CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED";
createdAt: string;
status: "DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED";
createdBy: string;

@@ -65,0 +65,0 @@ createdAtLocation: string;

import { z } from 'zod';
import { DateFieldValue, FileFieldValue, ParagraphFieldValue, TextFieldValue } from './FieldValue';
export declare const ConditionalTypes: {
readonly SHOW: "SHOW";
readonly ENABLE: "ENABLE";
};
export type ConditionalTypes = (typeof ConditionalTypes)[keyof typeof ConditionalTypes];
declare const BaseField: z.ZodObject<{

@@ -35,2 +41,3 @@ id: z.ZodString;

disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
placeholder: z.ZodOptional<z.ZodObject<{

@@ -42,8 +49,8 @@ id: z.ZodString;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -58,8 +65,8 @@ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -69,4 +76,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -77,4 +84,4 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -90,11 +97,16 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;
}, "strip", z.ZodTypeAny, {
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
conditionals: ({

@@ -107,12 +119,7 @@ type: "SHOW";

})[];
label: {
id: string;
description: string;
defaultMessage: string;
};
validation?: {
message: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -128,6 +135,7 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -138,4 +146,4 @@ }, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -145,4 +153,4 @@ validation?: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -165,9 +173,27 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}>;
export type BaseField = z.infer<typeof BaseField>;
export declare const FieldType: {
readonly TEXT: "TEXT";
readonly DATE: "DATE";
readonly PARAGRAPH: "PARAGRAPH";
readonly RADIO_GROUP: "RADIO_GROUP";
readonly FILE: "FILE";
readonly HIDDEN: "HIDDEN";
};
export declare const fieldTypes: ("TEXT" | "DATE" | "PARAGRAPH" | "RADIO_GROUP" | "FILE" | "HIDDEN")[];
export type FieldType = (typeof fieldTypes)[number];
export type FieldValueByType = {
[FieldType.TEXT]: TextFieldValue;
[FieldType.DATE]: DateFieldValue;
[FieldType.PARAGRAPH]: ParagraphFieldValue;
[FieldType.RADIO_GROUP]: string;
[FieldType.FILE]: FileFieldValue;
};
export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{

@@ -206,2 +232,3 @@ id: z.ZodString;

disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
placeholder: z.ZodOptional<z.ZodObject<{

@@ -213,8 +240,8 @@ id: z.ZodString;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -229,8 +256,8 @@ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -240,4 +267,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -248,4 +275,4 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -261,8 +288,8 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -279,4 +306,9 @@ }, {

}>, "strip", z.ZodTypeAny, {
id: string;
type: "TEXT";
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
conditionals: ({

@@ -289,7 +321,2 @@ type: "SHOW";

})[];
label: {
id: string;
description: string;
defaultMessage: string;
};
options?: {

@@ -301,4 +328,4 @@ maxLength?: number | undefined;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -314,14 +341,15 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}, {
id: string;
type: "TEXT";
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -334,4 +362,4 @@ options?: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -354,6 +382,7 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -393,2 +422,3 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
placeholder: z.ZodOptional<z.ZodObject<{

@@ -400,8 +430,8 @@ id: z.ZodString;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -416,8 +446,8 @@ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -427,4 +457,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -435,4 +465,4 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -448,8 +478,8 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -465,8 +495,8 @@ }, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -476,4 +506,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -483,9 +513,14 @@ }, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}>>;
}>, "strip", z.ZodTypeAny, {
id: string;
type: "DATE";
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
conditionals: ({

@@ -498,12 +533,7 @@ type: "SHOW";

})[];
label: {
id: string;
description: string;
defaultMessage: string;
};
options?: {
notice?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -514,4 +544,4 @@ } | undefined;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -527,14 +557,15 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}, {
id: string;
type: "DATE";
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -544,4 +575,4 @@ options?: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -552,4 +583,4 @@ } | undefined;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -572,6 +603,7 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -611,2 +643,3 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
placeholder: z.ZodOptional<z.ZodObject<{

@@ -618,8 +651,8 @@ id: z.ZodString;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -634,8 +667,8 @@ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -645,4 +678,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -653,4 +686,4 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -666,8 +699,8 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -684,3 +717,2 @@ }, {

}>, "strip", z.ZodTypeAny, {
type: "PARAGRAPH";
id: string;

@@ -690,2 +722,8 @@ options: {

};
type: "PARAGRAPH";
label: {
id: string;
defaultMessage: string;
description: string;
};
conditionals: ({

@@ -698,12 +736,7 @@ type: "SHOW";

})[];
label: {
id: string;
description: string;
defaultMessage: string;
};
validation?: {
message: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -719,14 +752,15 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}, {
id: string;
type: "PARAGRAPH";
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -739,4 +773,4 @@ options?: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -759,6 +793,7 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -798,2 +833,3 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
placeholder: z.ZodOptional<z.ZodObject<{

@@ -805,8 +841,8 @@ id: z.ZodString;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -821,8 +857,8 @@ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -832,4 +868,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -840,4 +876,4 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -853,8 +889,8 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -874,3 +910,2 @@ }, {

}>, "strip", z.ZodTypeAny, {
type: "RADIO_GROUP";
id: string;

@@ -881,2 +916,8 @@ options: {

}[];
type: "RADIO_GROUP";
label: {
id: string;
defaultMessage: string;
description: string;
};
conditionals: ({

@@ -889,12 +930,7 @@ type: "SHOW";

})[];
label: {
id: string;
description: string;
defaultMessage: string;
};
validation?: {
message: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -910,9 +946,9 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}, {
type: "RADIO_GROUP";
id: string;

@@ -923,6 +959,7 @@ options: {

}[];
type: "RADIO_GROUP";
label: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -932,4 +969,4 @@ validation?: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -952,6 +989,7 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -991,2 +1029,3 @@ }>, z.ZodObject<z.objectUtil.extendShape<{

disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
placeholder: z.ZodOptional<z.ZodObject<{

@@ -998,8 +1037,8 @@ id: z.ZodString;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -1014,8 +1053,8 @@ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -1025,4 +1064,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -1033,4 +1072,4 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -1046,176 +1085,19 @@ validator: import("../conditionals/conditionals").JSONSchema;

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;
}, {
type: z.ZodLiteral<"HIDDEN">;
type: z.ZodLiteral<"FILE">;
}>, "strip", z.ZodTypeAny, {
type: "HIDDEN";
id: string;
conditionals: ({
type: "SHOW";
conditional: import("../conditionals/conditionals").JSONSchema;
} | {
type: "ENABLE";
conditional: import("../conditionals/conditionals").JSONSchema;
})[];
type: "FILE";
label: {
id: string;
description: string;
defaultMessage: string;
};
validation?: {
message: {
id: string;
description: string;
defaultMessage: string;
};
validator: import("../conditionals/conditionals").JSONSchema;
}[] | undefined;
required?: boolean | undefined;
dependsOn?: string[] | undefined;
initialValue?: string | {
dependsOn: string[];
expression: string;
} | undefined;
disabled?: boolean | undefined;
placeholder?: {
id: string;
description: string;
defaultMessage: string;
} | undefined;
}, {
type: "HIDDEN";
id: string;
label: {
id: string;
description: string;
defaultMessage: string;
};
validation?: {
message: {
id: string;
description: string;
defaultMessage: string;
};
validator: import("../conditionals/conditionals").JSONSchema;
}[] | undefined;
required?: boolean | undefined;
conditionals?: ({
type: "SHOW";
conditional: import("../conditionals/conditionals").JSONSchema;
} | {
type: "ENABLE";
conditional: import("../conditionals/conditionals").JSONSchema;
})[] | undefined;
dependsOn?: string[] | undefined;
initialValue?: string | {
expression: string;
dependsOn?: string[] | undefined;
} | undefined;
disabled?: boolean | undefined;
placeholder?: {
id: string;
description: string;
defaultMessage: string;
} | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{
id: z.ZodString;
conditionals: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"SHOW">;
conditional: z.ZodType<import("../conditionals/conditionals").JSONSchema, z.ZodTypeDef, import("../conditionals/conditionals").JSONSchema>;
}, "strip", z.ZodTypeAny, {
type: "SHOW";
conditional: import("../conditionals/conditionals").JSONSchema;
}, {
type: "SHOW";
conditional: import("../conditionals/conditionals").JSONSchema;
}>, z.ZodObject<{
type: z.ZodLiteral<"ENABLE">;
conditional: z.ZodType<import("../conditionals/conditionals").JSONSchema, z.ZodTypeDef, import("../conditionals/conditionals").JSONSchema>;
}, "strip", z.ZodTypeAny, {
type: "ENABLE";
conditional: import("../conditionals/conditionals").JSONSchema;
}, {
type: "ENABLE";
conditional: import("../conditionals/conditionals").JSONSchema;
}>]>, "many">>>;
initialValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
expression: z.ZodString;
}, "strip", z.ZodTypeAny, {
dependsOn: string[];
expression: string;
}, {
expression: string;
dependsOn?: string[] | undefined;
}>]>>;
required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
placeholder: 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;
}>>;
validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
validator: z.ZodType<import("../conditionals/conditionals").JSONSchema, z.ZodTypeDef, import("../conditionals/conditionals").JSONSchema>;
message: z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
description: string;
defaultMessage: string;
}, {
id: string;
description: string;
defaultMessage: string;
}>;
}, "strip", z.ZodTypeAny, {
message: {
id: string;
description: string;
defaultMessage: string;
};
validator: import("../conditionals/conditionals").JSONSchema;
}, {
message: {
id: string;
description: string;
defaultMessage: string;
};
validator: import("../conditionals/conditionals").JSONSchema;
}>, "many">>>;
dependsOn: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
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;
}>;
}, {
type: z.ZodLiteral<"FILE">;
}>, "strip", z.ZodTypeAny, {
type: "FILE";
id: string;
conditionals: ({

@@ -1228,12 +1110,7 @@ type: "SHOW";

})[];
label: {
id: string;
description: string;
defaultMessage: string;
};
validation?: {
message: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -1249,14 +1126,15 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}, {
id: string;
type: "FILE";
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -1266,4 +1144,4 @@ validation?: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -1286,10 +1164,10 @@ validator: import("../conditionals/conditionals").JSONSchema;

disabled?: boolean | undefined;
hidden?: boolean | undefined;
placeholder?: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}>]>;
export type FieldConfig = z.infer<typeof FieldConfig>;
export type FieldType = FieldConfig['type'];
export type FieldProps<T extends FieldType> = Extract<FieldConfig, {

@@ -1296,0 +1174,0 @@ type: T;

@@ -14,3 +14,6 @@ export * from './ActionConfig';

export * from './TranslationConfig';
export * from './FieldValue';
export * from './state';
export * from './utils';
export * from './defineConfig';
//# sourceMappingURL=index.d.ts.map

@@ -28,8 +28,9 @@ "use strict";

ActionType: () => ActionType,
ConditionalTypes: () => ConditionalTypes,
DeclareActionInput: () => DeclareActionInput,
DraftActionInput: () => DraftActionInput,
EventConfig: () => EventConfig,
EventConfigInput: () => EventConfigInput,
EventDocument: () => EventDocument,
EventIndex: () => EventIndex,
EventIndices: () => EventIndices,
EventInput: () => EventInput,

@@ -40,2 +41,5 @@ EventMetadata: () => EventMetadata,

FieldConfig: () => FieldConfig,
FieldType: () => FieldType,
FieldValue: () => FieldValue,
FileFieldValue: () => FileFieldValue,
FormConfig: () => FormConfig,

@@ -45,2 +49,3 @@ NotifyActionInput: () => NotifyActionInput,

SummaryConfig: () => SummaryConfig,
SummaryConfigInput: () => SummaryConfigInput,
TranslationConfig: () => TranslationConfig,

@@ -53,3 +58,7 @@ ValidateActionInput: () => ValidateActionInput,

eventStatuses: () => eventStatuses,
getCurrentEventState: () => getCurrentEventState
fieldTypes: () => fieldTypes,
findPageFields: () => findPageFields,
getCurrentEventState: () => getCurrentEventState,
resolveFieldLabels: () => resolveFieldLabels,
resolveLabelsFromKnownFields: () => resolveLabelsFromKnownFields
});

@@ -86,9 +95,13 @@ module.exports = __toCommonJS(events_exports);

// ../commons/src/events/FieldConfig.ts
var ConditionalTypes = {
SHOW: "SHOW",
ENABLE: "ENABLE"
};
var FieldId = import_zod3.z.string();
var ShowConditional = import_zod3.z.object({
type: import_zod3.z.literal("SHOW"),
type: import_zod3.z.literal(ConditionalTypes.SHOW),
conditional: Conditional()
});
var EnableConditional = import_zod3.z.object({
type: import_zod3.z.literal("ENABLE"),
type: import_zod3.z.literal(ConditionalTypes.ENABLE),
conditional: Conditional()

@@ -112,2 +125,3 @@ });

disabled: import_zod3.z.boolean().default(false).optional(),
hidden: import_zod3.z.boolean().default(false).optional(),
placeholder: TranslationConfig.optional(),

@@ -123,4 +137,13 @@ validation: import_zod3.z.array(

});
var FieldType = {
TEXT: "TEXT",
DATE: "DATE",
PARAGRAPH: "PARAGRAPH",
RADIO_GROUP: "RADIO_GROUP",
FILE: "FILE",
HIDDEN: "HIDDEN"
};
var fieldTypes = Object.values(FieldType);
var TextField = BaseField.extend({
type: import_zod3.z.literal("TEXT"),
type: import_zod3.z.literal(FieldType.TEXT),
options: import_zod3.z.object({

@@ -131,3 +154,3 @@ maxLength: import_zod3.z.number().optional().describe("Maximum length of the text")

var DateField = BaseField.extend({
type: import_zod3.z.literal("DATE"),
type: import_zod3.z.literal(FieldType.DATE),
options: import_zod3.z.object({

@@ -140,3 +163,3 @@ notice: TranslationConfig.describe(

var Paragraph = BaseField.extend({
type: import_zod3.z.literal("PARAGRAPH"),
type: import_zod3.z.literal(FieldType.PARAGRAPH),
options: import_zod3.z.object({

@@ -147,9 +170,6 @@ fontVariant: import_zod3.z.literal("reg16").optional()

var File = BaseField.extend({
type: import_zod3.z.literal("FILE")
type: import_zod3.z.literal(FieldType.FILE)
}).describe("File upload");
var Hidden = BaseField.extend({
type: import_zod3.z.literal("HIDDEN")
}).describe("Hidden field");
var RadioGroup = BaseField.extend({
type: import_zod3.z.literal("RADIO_GROUP"),
type: import_zod3.z.literal(FieldType.RADIO_GROUP),
options: import_zod3.z.array(

@@ -167,3 +187,2 @@ import_zod3.z.object({

RadioGroup,
Hidden,
File

@@ -214,2 +233,3 @@ ]);

DECLARE: "DECLARE",
DELETE: "DELETE",
CUSTOM: "CUSTOM"

@@ -237,2 +257,7 @@ };

);
var DeleteConfig = ActionConfigBase.merge(
import_zod5.z.object({
type: import_zod5.z.literal(ActionType.DELETE)
})
);
var CustomConfig = ActionConfigBase.merge(

@@ -248,2 +273,3 @@ import_zod5.z.object({

RegisterConfig,
DeleteConfig,
CustomConfig

@@ -257,15 +283,19 @@ ]);

var import_zod6 = require("zod");
var Field = import_zod6.z.object({
id: import_zod6.z.string().describe("Id of a field defined under form."),
label: TranslationConfig,
emptyValueMessage: TranslationConfig.optional()
});
var FieldInput = Field.extend({
// label is enforced during runtime.
label: TranslationConfig.optional()
});
var SummaryConfig = import_zod6.z.object({
title: TranslationConfig.describe("Header title of summary"),
fields: import_zod6.z.array(
import_zod6.z.object({
id: import_zod6.z.string().describe("Id of a field defined under form."),
label: TranslationConfig.optional()
})
).describe("Fields to be rendered under in summary.")
fields: import_zod6.z.array(Field).describe("Fields rendered in summary view.")
}).describe("Configuration for summary in event.");
var SummaryConfigInput = SummaryConfig.extend({
fields: import_zod6.z.array(FieldInput)
});
// ../commons/src/events/EventConfig.ts
var import_lodash = require("lodash");
// ../commons/src/events/WorkqueueConfig.ts

@@ -375,59 +405,5 @@ var import_zod8 = require("zod");

});
var findPageFields = (config) => {
return (0, import_lodash.flattenDeep)(
config.actions.map(
({ forms }) => forms.map(
({ pages }) => pages.map(
({ fields }) => fields.map((field) => ({ id: field.id, label: field.label }))
)
)
)
);
};
var fillFieldLabels = ({
pageFields,
refFields
}) => {
return refFields.map((field) => {
if (field.label) {
return field;
}
const metadataLabel = eventMetadataLabelMap[field.id];
if (metadataLabel) {
return {
...field,
label: metadataLabel
};
}
const pageLabel = pageFields.find((pageField) => pageField.id === field.id);
if (!pageLabel) {
throw new Error(`Referenced field ${field.id} does not have a label`);
}
return {
...field,
label: pageLabel.label
};
});
};
var defineConfig = (config) => {
const parsed = EventConfig.parse(config);
const pageFields = findPageFields(parsed);
return EventConfig.parse({
...parsed,
summary: {
...parsed.summary,
fields: fillFieldLabels({
pageFields,
refFields: parsed.summary.fields
})
},
workqueues: parsed.workqueues.map((workqueue) => ({
...workqueue,
fields: fillFieldLabels({
pageFields,
refFields: workqueue.fields
})
}))
});
};
var EventConfigInput = EventConfig.extend({
summary: SummaryConfigInput
});
var defineForm = (form) => FormConfig.parse(form);

@@ -443,28 +419,50 @@

// ../commons/src/events/EventDocument.ts
var import_zod13 = require("zod");
// ../commons/src/events/ActionDocument.ts
var import_zod12 = require("zod");
// ../commons/src/events/FieldValue.ts
var import_zod11 = require("zod");
var TextFieldValue = import_zod11.z.string();
var DateFieldValue = import_zod11.z.string().nullable();
var ParagraphFieldValue = import_zod11.z.string();
var FileFieldValue = import_zod11.z.object({
filename: import_zod11.z.string(),
originalFilename: import_zod11.z.string(),
type: import_zod11.z.string()
}).nullable();
var RadioGroupFieldValue = import_zod11.z.string();
var FieldValue = import_zod11.z.union([
TextFieldValue,
DateFieldValue,
ParagraphFieldValue,
FileFieldValue,
RadioGroupFieldValue
]);
// ../commons/src/events/ActionDocument.ts
var import_zod11 = require("zod");
var ActionBase = import_zod11.z.object({
createdAt: import_zod11.z.string().datetime(),
createdBy: import_zod11.z.string(),
data: import_zod11.z.record(import_zod11.z.string(), import_zod11.z.any())
var ActionBase = import_zod12.z.object({
createdAt: import_zod12.z.string().datetime(),
createdBy: import_zod12.z.string(),
data: import_zod12.z.record(import_zod12.z.string(), FieldValue),
createdAtLocation: import_zod12.z.string()
});
var AssignedAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.ASSIGN),
assignedTo: import_zod11.z.string()
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.ASSIGN),
assignedTo: import_zod12.z.string()
})
);
var UnassignedAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.UNASSIGN)
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.UNASSIGN)
})
);
var RegisterAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.REGISTER),
identifiers: import_zod11.z.object({
trackingId: import_zod11.z.string(),
registrationNumber: import_zod11.z.string()
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.REGISTER),
identifiers: import_zod12.z.object({
trackingId: import_zod12.z.string(),
registrationNumber: import_zod12.z.string()
})

@@ -474,34 +472,32 @@ })

var DeclareAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.DECLARE)
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.DECLARE)
})
);
var ValidateAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.VALIDATE)
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.VALIDATE)
})
);
var DraftAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.DRAFT)
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.DRAFT)
})
);
var CreatedAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.CREATE),
createdAtLocation: import_zod11.z.string()
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.CREATE)
})
);
var NotifiedAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.NOTIFY),
createdAtLocation: import_zod11.z.string()
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.NOTIFY)
})
);
var CustomAction = ActionBase.merge(
import_zod11.z.object({
type: import_zod11.z.literal(ActionType.CUSTOM)
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.CUSTOM)
})
);
var ActionDocument = import_zod11.z.discriminatedUnion("type", [
var ActionDocument = import_zod12.z.discriminatedUnion("type", [
CreatedAction,

@@ -519,30 +515,30 @@ DraftAction,

// ../commons/src/events/EventDocument.ts
var EventDocument = import_zod12.z.object({
id: import_zod12.z.string(),
type: import_zod12.z.string(),
transactionId: import_zod12.z.string(),
createdAt: import_zod12.z.string().datetime(),
updatedAt: import_zod12.z.string().datetime(),
actions: import_zod12.z.array(ActionDocument)
var EventDocument = import_zod13.z.object({
id: import_zod13.z.string(),
type: import_zod13.z.string(),
transactionId: import_zod13.z.string(),
createdAt: import_zod13.z.string().datetime(),
updatedAt: import_zod13.z.string().datetime(),
actions: import_zod13.z.array(ActionDocument)
});
// ../commons/src/events/ActionInput.ts
var import_zod13 = require("zod");
var BaseActionInput = import_zod13.z.object({
eventId: import_zod13.z.string(),
transactionId: import_zod13.z.string(),
data: import_zod13.z.record(import_zod13.z.any())
var import_zod14 = require("zod");
var BaseActionInput = import_zod14.z.object({
eventId: import_zod14.z.string(),
transactionId: import_zod14.z.string(),
data: import_zod14.z.record(import_zod14.z.string(), FieldValue)
});
var CreateActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.CREATE).default(ActionType.CREATE),
createdAtLocation: import_zod13.z.string()
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.CREATE).default(ActionType.CREATE),
createdAtLocation: import_zod14.z.string()
})
);
var RegisterActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.REGISTER).default(ActionType.REGISTER),
identifiers: import_zod13.z.object({
trackingId: import_zod13.z.string(),
registrationNumber: import_zod13.z.string()
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.REGISTER).default(ActionType.REGISTER),
identifiers: import_zod14.z.object({
trackingId: import_zod14.z.string(),
registrationNumber: import_zod14.z.string()
})

@@ -552,34 +548,34 @@ })

var ValidateActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.VALIDATE).default(ActionType.VALIDATE)
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.VALIDATE).default(ActionType.VALIDATE)
})
);
var NotifyActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.NOTIFY).default(ActionType.NOTIFY),
createdAtLocation: import_zod13.z.string()
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.NOTIFY).default(ActionType.NOTIFY),
createdAtLocation: import_zod14.z.string()
})
);
var DraftActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.DRAFT).default(ActionType.DRAFT)
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.DRAFT).default(ActionType.DRAFT)
})
);
var DeclareActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.DECLARE).default(ActionType.DECLARE)
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.DECLARE).default(ActionType.DECLARE)
})
);
var AssignActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.ASSIGN).default(ActionType.ASSIGN),
assignedTo: import_zod13.z.string()
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.ASSIGN).default(ActionType.ASSIGN),
assignedTo: import_zod14.z.string()
})
);
var UnassignActionInput = BaseActionInput.merge(
import_zod13.z.object({
type: import_zod13.z.literal(ActionType.UNASSIGN).default(ActionType.UNASSIGN)
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.UNASSIGN).default(ActionType.UNASSIGN)
})
);
var ActionInput = import_zod13.z.discriminatedUnion("type", [
var ActionInput = import_zod14.z.discriminatedUnion("type", [
CreateActionInput,

@@ -596,16 +592,6 @@ ValidateActionInput,

// ../commons/src/events/EventIndex.ts
var import_zod14 = require("zod");
var EventIndex = import_zod14.z.object({
id: import_zod14.z.string(),
type: import_zod14.z.string(),
status: EventStatuses,
createdAt: import_zod14.z.string().datetime(),
createdBy: import_zod14.z.string(),
createdAtLocation: import_zod14.z.string(),
modifiedAt: import_zod14.z.string().datetime(),
assignedTo: import_zod14.z.string().nullable(),
updatedBy: import_zod14.z.string(),
data: import_zod14.z.record(import_zod14.z.string(), import_zod14.z.unknown())
var import_zod15 = require("zod");
var EventIndex = EventMetadata.extend({
data: import_zod15.z.record(import_zod15.z.string(), import_zod15.z.any())
});
var EventIndices = import_zod14.z.array(EventIndex);

@@ -615,23 +601,23 @@ // ../commons/src/events/state/index.ts

return actions.reduce((status, action) => {
if (action.type === "CREATE") {
return "CREATED";
if (action.type === ActionType.CREATE) {
return EventStatus.CREATED;
}
if (action.type === "DECLARE") {
return "DECLARED";
if (action.type === ActionType.DECLARE) {
return EventStatus.DECLARED;
}
if (action.type === "DRAFT") {
return "DRAFT";
if (action.type === ActionType.DRAFT) {
return EventStatus.DRAFT;
}
if (action.type === "REGISTER") {
return "REGISTERED";
if (action.type === ActionType.REGISTER) {
return EventStatus.REGISTERED;
}
return status;
}, "CREATED");
}, EventStatus.CREATED);
}
function getAssignedUserFromActions(actions) {
return actions.reduce((status, action) => {
if (action.type === "ASSIGN") {
if (action.type === ActionType.ASSIGN) {
return action.assignedTo;
}
if (action.type === "UNASSIGN") {
if (action.type === ActionType.UNASSIGN) {
return null;

@@ -652,4 +638,7 @@ }

const creationAction = event.actions.find(
(action) => action.type === "CREATE"
(action) => action.type === ActionType.CREATE
);
if (!creationAction) {
throw new Error(`Event ${event.id} has no creation action`);
}
const latestAction = event.actions[event.actions.length - 1];

@@ -669,1 +658,78 @@ return {

}
// ../commons/src/events/utils.ts
var import_lodash = require("lodash");
var isMetadataField = (field) => field in eventMetadataLabelMap;
var findPageFields = (config) => {
return (0, import_lodash.flattenDeep)(
config.actions.map(
({ forms }) => forms.map(
({ pages }) => pages.map(
({ fields }) => fields.map(({ id, label, type }) => ({
id,
label,
type
}))
)
)
)
);
};
var resolveLabelsFromKnownFields = ({
pageFields,
refFields
}) => {
return refFields.map((field) => {
if (field.label) {
return field;
}
if (isMetadataField(field.id)) {
return {
...field,
label: eventMetadataLabelMap[field.id]
};
}
const pageLabel = pageFields.find((pageField) => pageField.id === field.id);
if (!pageLabel) {
throw new Error(`Referenced field ${field.id} does not have a label`);
}
return {
...field,
label: pageLabel.label
};
});
};
var resolveFieldLabels = ({
config,
pageFields
}) => {
return {
...config,
fields: resolveLabelsFromKnownFields({
pageFields,
refFields: config.fields
})
};
};
// ../commons/src/events/defineConfig.ts
var defineConfig = (config) => {
const input = EventConfigInput.parse(config);
const pageFields = findPageFields(input).map(({ id, label }) => ({
id,
label
}));
return EventConfig.parse({
...input,
summary: resolveFieldLabels({
config: input.summary,
pageFields
}),
workqueues: input.workqueues.map(
(workqueue) => resolveFieldLabels({
config: workqueue,
pageFields
})
)
});
};

@@ -9,12 +9,118 @@ import { z } from 'zod';

id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>;
fields: z.ZodArray<z.ZodObject<{
id: z.ZodString;
label: z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>;
emptyValueMessage: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>>;
}, "strip", z.ZodTypeAny, {
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
}, {
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
title: {
id: string;
defaultMessage: string;
description: string;
};
fields: {
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
}[];
}, {
title: {
id: string;
defaultMessage: string;
description: string;
};
fields: {
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
}[];
}>;
export declare const SummaryConfigInput: z.ZodObject<z.objectUtil.extendShape<{
title: z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>;
fields: z.ZodArray<z.ZodObject<{
id: z.ZodString;
label: z.ZodOptional<z.ZodObject<{
label: z.ZodObject<{
id: z.ZodString;

@@ -25,15 +131,101 @@ defaultMessage: z.ZodString;

id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>;
emptyValueMessage: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;
}, "strip", z.ZodTypeAny, {
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
}, {
id: string;
label: {
id: string;
defaultMessage: string;
description: string;
};
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
}>, "many">;
}, {
fields: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
id: z.ZodString;
label: z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>;
emptyValueMessage: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>>;
}, {
label: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
defaultMessage: z.ZodString;
description: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
defaultMessage: string;
description: string;
}, {
id: string;
defaultMessage: string;
description: string;
}>>;
}>, "strip", z.ZodTypeAny, {
id: string;
label?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;

@@ -44,11 +236,16 @@ }, {

id: string;
defaultMessage: string;
description: string;
} | undefined;
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
}>, "strip", z.ZodTypeAny, {
title: {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -59,4 +256,9 @@ fields: {

id: string;
defaultMessage: string;
description: string;
} | undefined;
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;

@@ -67,4 +269,4 @@ }[];

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -75,4 +277,9 @@ fields: {

id: string;
defaultMessage: string;
description: string;
} | undefined;
emptyValueMessage?: {
id: string;
defaultMessage: string;
description: string;
} | undefined;

@@ -82,3 +289,3 @@ }[];

export type SummaryConfig = z.infer<typeof SummaryConfig>;
export type SummaryConfigInput = z.input<typeof SummaryConfig>;
export type SummaryConfigInput = z.input<typeof SummaryConfigInput>;
//# sourceMappingURL=SummaryConfig.d.ts.map

@@ -8,10 +8,10 @@ import { z } from 'zod';

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;
export type TranslationConfig = z.infer<typeof TranslationConfig>;
//# sourceMappingURL=TranslationConfig.d.ts.map

@@ -13,8 +13,8 @@ import { z } from 'zod';

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>;

@@ -29,8 +29,8 @@ fields: z.ZodArray<z.ZodObject<{

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}, {
id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
}>>;

@@ -41,4 +41,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -49,4 +49,4 @@ }, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;

@@ -64,5 +64,5 @@ }>, "many">;

}, "strip", z.ZodTypeAny, {
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED")[];
status: ("DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED")[];
}, {
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED")[];
status: ("DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED")[];
}>, "many">;

@@ -73,4 +73,4 @@ }, "strip", z.ZodTypeAny, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -81,8 +81,8 @@ fields: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}[];
filters: {
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED")[];
status: ("DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED")[];
}[];

@@ -93,4 +93,4 @@ }, {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
};

@@ -101,11 +101,12 @@ fields: {

id: string;
defaultMessage: string;
description: string;
defaultMessage: string;
} | undefined;
}[];
filters: {
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "DRAFT" | "CREATED" | "NOTIFIED")[];
status: ("DRAFT" | "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "CERTIFIED")[];
}[];
}>;
export type WorkqueueConfig = z.infer<typeof WorkqueueConfig>;
export type WorkqueueConfigInput = z.input<typeof WorkqueueConfig>;
//# sourceMappingURL=WorkqueueConfig.d.ts.map
{
"name": "@opencrvs/toolkit",
"version": "0.0.8-scopes",
"version": "0.0.9-events",
"description": "OpenCRVS toolkit for building country configurations",

@@ -9,12 +9,9 @@ "license": "MPL-2.0",

"./events": "./dist/events/index.js",
"./scopes": "./dist/scopes/index.js",
"./conditionals": "./dist/conditionals/index.js"
},
"scripts": {
"build": "rimraf dist && tsc --build && yarn build-common-events:js && yarn copy-common-events:ts && yarn build-common-scopes:js && yarn copy-common-scopes:ts && yarn build-common-conditionals:js && yarn copy-common-conditionals:ts",
"build": "rimraf dist && tsc --build && yarn build-common-events:js && yarn copy-common-events:ts && yarn build-common-conditionals:js && yarn copy-common-conditionals:ts",
"build-common-events:js": "esbuild src/events/index.ts --bundle --format=cjs --outdir=./dist/events --allow-overwrite --packages=external",
"build-common-scopes:js": "esbuild src/scopes/index.ts --bundle --format=cjs --outdir=./dist/scopes --allow-overwrite --packages=external",
"build-common-conditionals:js": "esbuild src/conditionals/index.ts --bundle --format=cjs --outdir=./dist/conditionals --allow-overwrite --packages=external",
"copy-common-events:ts": "cp -r ../commons/build/dist/common/events/*.d.ts ./dist/events",
"copy-common-scopes:ts": "cp -r ../commons/build/dist/common/scopes.d.ts ./dist/scopes/index.d.ts",
"copy-common-conditionals:ts": "cp -r ../commons/build/dist/common/conditionals/*.d.ts ./dist/conditionals"

@@ -30,5 +27,4 @@ },

"moduleNameMapper": {
"@opencrvs/commons/events": "@opencrvs/commons/build/dist/common/events/index.js",
"@opencrvs/commons/scopes": "@opencrvs/commons/build/dist/common/scopes.js"
"@opencrvs/commons/events": "@opencrvs/commons/build/dist/common/events/index.js"
}
}

@@ -10,3 +10,2 @@ # OpenCRVS toolkit

events/ # re-exports events module from commons package
scopes/ # re-exports scopes module from commons package
lib.ts # standard library. currently empty

@@ -45,2 +44,2 @@ ```

- Package is published and should be used without knowledge of rest of the monorepo
- Package exposes `/events, /scopes` directory, with types, from `packages/commons` through the library, others are excluded.
- Package exposes `/events` directory, with types, from `packages/commons` through the library, others are excluded.

@@ -18,3 +18,2 @@ {

],
"@opencrvs/commons/scopes": ["../commons/src/scopes.ts"],
"@opencrvs/commons/events": ["../commons/src/events/index.ts"]

@@ -21,0 +20,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc