🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More

@opencrvs/toolkit

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencrvs/toolkit - npm Package Compare versions

Comparing version

to
0.0.10-events

@@ -35,6 +35,16 @@ import { JSONSchema } from '@opencrvs/commons/conditionals';

type: {
const: "CREATE" | "DRAFT" | "VALIDATE" | "NOTIFY" | "REGISTER" | "DECLARE" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
const: "CREATE" | "VALIDATE" | "NOTIFY" | "REGISTER" | "DECLARE" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
};
draft: {
type: string;
};
};
required: string[];
not: {
properties: {
draft: {
const: boolean;
};
};
};
};

@@ -72,3 +82,100 @@ };

};
isEqualTo: (value: string) => {
type: string;
properties: {
$form: {
type: string;
properties: {
[x: string]: {
const: string;
};
};
required: string[];
};
};
required: string[];
};
isInArray: (values: string[]) => {
type: string;
properties: {
$form: {
type: string;
properties: {
[x: string]: {
enum: string[];
};
};
required: string[];
};
};
required: string[];
};
isNotInArray: (values: string[]) => {
type: string;
properties: {
$form: {
type: string;
properties: {
[x: string]: {
not: {
enum: string[];
};
};
};
required: string[];
};
};
required: string[];
};
isUndefinedOrInArray: (values: string[]) => {
type: string;
properties: {
$form: {
type: string;
anyOf: ({
required: string[];
properties: {
[x: string]: {
enum: string[];
};
};
not?: undefined;
} | {
not: {
required: string[];
};
required?: undefined;
properties?: undefined;
})[];
};
};
required: string[];
};
isUndefinedOrNotInArray: (values: string[]) => {
type: string;
properties: {
$form: {
type: string;
anyOf: ({
required: string[];
properties: {
[x: string]: {
not: {
enum: string[];
};
};
};
not?: undefined;
} | {
not: {
required: string[];
};
required?: undefined;
properties?: undefined;
})[];
};
};
required: string[];
};
};
//# sourceMappingURL=index.d.ts.map

@@ -85,5 +85,15 @@ "use strict";

const: type
},
draft: {
type: "boolean"
}
},
required: ["type"]
required: ["type"],
not: {
properties: {
draft: {
const: true
}
}
}
}

@@ -121,4 +131,93 @@ }

required: ["$form", "$now"]
}),
isEqualTo: (value) => ({
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
const: value
}
},
required: [fieldId]
}
},
required: ["$form"]
}),
isInArray: (values) => ({
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
enum: values
}
},
required: [fieldId]
}
},
required: ["$form"]
}),
isNotInArray: (values) => ({
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
not: {
enum: values
}
}
},
required: [fieldId]
}
},
required: ["$form"]
}),
isUndefinedOrInArray: (values) => ({
type: "object",
properties: {
$form: {
type: "object",
anyOf: [
{
required: [fieldId],
properties: {
[fieldId]: {
enum: values
}
}
},
{ not: { required: [fieldId] } }
]
}
},
required: ["$form"]
}),
isUndefinedOrNotInArray: (values) => ({
type: "object",
properties: {
$form: {
type: "object",
anyOf: [
{
required: [fieldId],
properties: {
[fieldId]: {
not: {
enum: values
}
}
}
},
{ not: { required: [fieldId] } }
]
}
},
required: ["$form"]
})
};
}

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

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -24,4 +25,3 @@ }, {

type: "CREATE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -32,7 +32,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "CREATE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -43,3 +43,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>;

@@ -62,2 +65,3 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -68,4 +72,3 @@ }, {

type: "CREATE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -76,36 +79,7 @@ type: string;

} | null>;
createdAtLocation: string;
}, {
type: "CREATE";
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.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<"DRAFT">;
}>, "strip", z.ZodTypeAny, {
type: "DRAFT";
createdAt: string;
createdBy: string;
type: "CREATE";
data: Record<string, string | {

@@ -116,13 +90,6 @@ type: string;

} | null>;
createdAtLocation: string;
}, {
type: "DRAFT";
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -144,2 +111,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -150,4 +118,3 @@ }, {

type: "VALIDATE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -158,7 +125,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "VALIDATE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -169,3 +136,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -187,2 +157,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -193,4 +164,3 @@ }, {

type: "NOTIFY";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -201,7 +171,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "NOTIFY";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -212,3 +182,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -230,2 +203,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -246,4 +220,3 @@ }, {

type: "REGISTER";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -254,2 +227,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -262,4 +237,2 @@ identifiers: {

type: "REGISTER";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -270,2 +243,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -276,2 +251,3 @@ identifiers: {

};
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -293,2 +269,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -299,4 +276,3 @@ }, {

type: "DECLARE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -307,7 +283,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "DECLARE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -318,3 +294,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -336,2 +315,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -343,4 +323,3 @@ }, {

type: "ASSIGN";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -351,2 +330,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -356,4 +337,2 @@ assignedTo: string;

type: "ASSIGN";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -364,4 +343,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
assignedTo: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -383,2 +365,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -389,4 +372,3 @@ }, {

type: "UNASSIGN";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -397,7 +379,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "UNASSIGN";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -408,3 +390,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -426,2 +411,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -432,4 +418,3 @@ }, {

type: "CUSTOM";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -440,7 +425,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "CUSTOM";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -451,3 +436,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>]>;

@@ -454,0 +442,0 @@ export type ActionDocument = z.infer<typeof ActionDocument>;

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

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<{

@@ -33,3 +34,3 @@ filename: z.ZodString;

type: "REGISTER";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -40,2 +41,3 @@ type: string;

} | null>;
transactionId: string;
identifiers: {

@@ -47,3 +49,2 @@ trackingId: string;

}, {
transactionId: string;
data: Record<string, string | {

@@ -54,2 +55,3 @@ type: string;

} | null>;
transactionId: string;
identifiers: {

@@ -61,2 +63,3 @@ trackingId: string;

type?: "REGISTER" | undefined;
draft?: boolean | undefined;
}>;

@@ -66,2 +69,3 @@ export declare const ValidateActionInput: z.ZodObject<z.objectUtil.extendShape<{

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<{

@@ -84,3 +88,3 @@ filename: z.ZodString;

type: "VALIDATE";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -91,5 +95,5 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -100,4 +104,6 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
type?: "VALIDATE" | undefined;
draft?: boolean | undefined;
}>;

@@ -107,2 +113,3 @@ export declare const NotifyActionInput: z.ZodObject<z.objectUtil.extendShape<{

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<{

@@ -126,3 +133,3 @@ filename: z.ZodString;

type: "NOTIFY";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -133,6 +140,6 @@ type: string;

} | null>;
transactionId: string;
createdAtLocation: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -143,47 +150,12 @@ type: string;

} | null>;
transactionId: string;
createdAtLocation: string;
eventId: string;
type?: "NOTIFY" | undefined;
draft?: boolean | undefined;
}>;
export declare const DraftActionInput: z.ZodObject<z.objectUtil.extendShape<{
eventId: z.ZodString;
transactionId: 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]>>;
}, {
type: z.ZodDefault<z.ZodLiteral<"DRAFT">>;
}>, "strip", z.ZodTypeAny, {
type: "DRAFT";
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
type?: "DRAFT" | undefined;
}>;
export type DraftActionInput = z.infer<typeof DraftActionInput>;
export declare const DeclareActionInput: 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<{

@@ -206,3 +178,3 @@ filename: z.ZodString;

type: "DECLARE";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -213,5 +185,5 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -222,4 +194,6 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
type?: "DECLARE" | undefined;
draft?: boolean | undefined;
}>;

@@ -238,2 +212,3 @@ export type DeclareActionInput = z.infer<typeof DeclareActionInput>;

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<{

@@ -257,3 +232,3 @@ filename: z.ZodString;

type: "CREATE";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -264,6 +239,6 @@ type: string;

} | null>;
transactionId: string;
createdAtLocation: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -274,8 +249,11 @@ type: string;

} | null>;
transactionId: string;
createdAtLocation: string;
eventId: string;
type?: "CREATE" | 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<{

@@ -298,3 +276,3 @@ filename: z.ZodString;

type: "VALIDATE";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -305,33 +283,5 @@ type: string;

} | null>;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
type?: "VALIDATE" | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{
eventId: z.ZodString;
transactionId: 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]>>;
}, {
type: z.ZodDefault<z.ZodLiteral<"DRAFT">>;
}>, "strip", z.ZodTypeAny, {
type: "DRAFT";
transactionId: string;
data: Record<string, string | {

@@ -342,15 +292,10 @@ type: string;

} | null>;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
eventId: string;
type?: "DRAFT" | undefined;
type?: "VALIDATE" | 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<{

@@ -383,3 +328,3 @@ filename: z.ZodString;

type: "REGISTER";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -390,2 +335,3 @@ type: string;

} | null>;
transactionId: string;
identifiers: {

@@ -397,3 +343,2 @@ trackingId: string;

}, {
transactionId: string;
data: Record<string, string | {

@@ -404,2 +349,3 @@ type: string;

} | null>;
transactionId: string;
identifiers: {

@@ -411,5 +357,7 @@ trackingId: string;

type?: "REGISTER" | 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<{

@@ -433,3 +381,3 @@ filename: z.ZodString;

type: "NOTIFY";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -440,6 +388,6 @@ type: string;

} | null>;
transactionId: string;
createdAtLocation: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -450,8 +398,11 @@ type: string;

} | null>;
transactionId: string;
createdAtLocation: string;
eventId: string;
type?: "NOTIFY" | 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<{

@@ -474,3 +425,3 @@ filename: z.ZodString;

type: "DECLARE";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -481,5 +432,5 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -490,7 +441,10 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
type?: "DECLARE" | 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<{

@@ -514,3 +468,3 @@ filename: z.ZodString;

type: "ASSIGN";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -521,6 +475,6 @@ type: string;

} | null>;
transactionId: string;
assignedTo: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -531,8 +485,11 @@ type: string;

} | null>;
transactionId: string;
assignedTo: string;
eventId: string;
type?: "ASSIGN" | 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<{

@@ -555,3 +512,3 @@ filename: z.ZodString;

type: "UNASSIGN";
transactionId: string;
draft: boolean;
data: Record<string, string | {

@@ -562,5 +519,5 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
}, {
transactionId: string;
data: Record<string, string | {

@@ -571,6 +528,9 @@ type: string;

} | null>;
transactionId: string;
eventId: string;
type?: "UNASSIGN" | undefined;
draft?: boolean | undefined;
}>]>;
export type ActionInput = z.infer<typeof ActionInput>;
export type ActionInput = z.input<typeof ActionInput>;
export type ActionInputWithType = z.infer<typeof ActionInput>;
//# sourceMappingURL=ActionInput.d.ts.map

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

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -30,4 +31,3 @@ }, {

type: "CREATE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -38,36 +38,7 @@ type: string;

} | null>;
createdAtLocation: string;
}, {
type: "CREATE";
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.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<"DRAFT">;
}>, "strip", z.ZodTypeAny, {
type: "DRAFT";
createdAt: string;
createdBy: string;
type: "CREATE";
data: Record<string, string | {

@@ -78,13 +49,6 @@ type: string;

} | null>;
createdAtLocation: string;
}, {
type: "DRAFT";
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -106,2 +70,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -112,4 +77,3 @@ }, {

type: "VALIDATE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -120,7 +84,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "VALIDATE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -131,3 +95,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -149,2 +116,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -155,4 +123,3 @@ }, {

type: "NOTIFY";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -163,7 +130,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "NOTIFY";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -174,3 +141,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -192,2 +162,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -208,4 +179,3 @@ }, {

type: "REGISTER";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -216,2 +186,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -224,4 +196,2 @@ identifiers: {

type: "REGISTER";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -232,2 +202,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -238,2 +210,3 @@ identifiers: {

};
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -255,2 +228,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -261,4 +235,3 @@ }, {

type: "DECLARE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -269,7 +242,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "DECLARE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -280,3 +253,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -298,2 +274,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -305,4 +282,3 @@ }, {

type: "ASSIGN";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -313,2 +289,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -318,4 +296,2 @@ assignedTo: string;

type: "ASSIGN";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -326,4 +302,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
assignedTo: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -345,2 +324,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -351,4 +331,3 @@ }, {

type: "UNASSIGN";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -359,7 +338,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "UNASSIGN";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -370,3 +349,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{

@@ -388,2 +370,3 @@ createdAt: z.ZodString;

}>>, z.ZodString]>>;
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
createdAtLocation: z.ZodString;

@@ -394,4 +377,3 @@ }, {

type: "CUSTOM";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -402,7 +384,7 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
}, {
type: "CUSTOM";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -413,7 +395,10 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
type: string;
id: string;
type: string;
transactionId: string;

@@ -424,4 +409,3 @@ createdAt: string;

type: "CREATE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -432,17 +416,8 @@ type: string;

} | null>;
createdAtLocation: string;
} | {
type: "DRAFT";
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
} | {
type: "VALIDATE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -453,7 +428,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
} | {
type: "NOTIFY";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -464,7 +440,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
} | {
type: "REGISTER";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -475,2 +452,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -483,4 +462,3 @@ identifiers: {

type: "DECLARE";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -491,7 +469,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
} | {
type: "ASSIGN";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -502,2 +481,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -507,4 +488,3 @@ assignedTo: string;

type: "UNASSIGN";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -515,7 +495,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
} | {
type: "CUSTOM";
createdAt: string;
createdBy: string;
draft: boolean;
data: Record<string, string | {

@@ -526,7 +507,9 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
})[];
}, {
type: string;
id: string;
type: string;
transactionId: string;

@@ -537,4 +520,2 @@ createdAt: string;

type: "CREATE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -545,17 +526,8 @@ type: string;

} | null>;
createdAtLocation: string;
} | {
type: "DRAFT";
createdAt: string;
createdBy: string;
data: Record<string, string | {
type: string;
filename: string;
originalFilename: string;
} | null>;
createdAtLocation: string;
draft?: boolean | undefined;
} | {
type: "VALIDATE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -566,7 +538,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
} | {
type: "NOTIFY";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -577,7 +550,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
} | {
type: "REGISTER";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -588,2 +562,4 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;

@@ -594,6 +570,5 @@ identifiers: {

};
draft?: boolean | undefined;
} | {
type: "DECLARE";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -604,7 +579,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
} | {
type: "ASSIGN";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -615,8 +591,9 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
assignedTo: string;
draft?: boolean | undefined;
} | {
type: "UNASSIGN";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -627,7 +604,8 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
} | {
type: "CUSTOM";
createdAt: string;
createdBy: string;
data: Record<string, string | {

@@ -638,3 +616,6 @@ type: string;

} | null>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
draft?: boolean | undefined;
})[];

@@ -641,0 +622,0 @@ }>;

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

readonly CREATED: "CREATED";
readonly DRAFT: "DRAFT";
readonly NOTIFIED: "NOTIFIED";
readonly DECLARED: "DECLARED";
readonly VALIDATED: "VALIDATED";
readonly REGISTERED: "REGISTERED";

@@ -23,8 +23,8 @@ readonly CERTIFIED: "CERTIFIED";

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

@@ -35,8 +35,8 @@ assignedTo: string | null;

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

@@ -43,0 +43,0 @@ assignedTo: string | null;

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

readonly CREATED: "CREATED";
readonly DRAFT: "DRAFT";
readonly NOTIFIED: "NOTIFIED";
readonly DECLARED: "DECLARED";
readonly VALIDATED: "VALIDATED";
readonly REGISTERED: "REGISTERED";

@@ -16,8 +16,8 @@ readonly CERTIFIED: "CERTIFIED";

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

@@ -36,5 +36,5 @@ readonly CERTIFIED: "CERTIFIED";

readonly CREATED: "CREATED";
readonly DRAFT: "DRAFT";
readonly NOTIFIED: "NOTIFIED";
readonly DECLARED: "DECLARED";
readonly VALIDATED: "VALIDATED";
readonly REGISTERED: "REGISTERED";

@@ -50,6 +50,6 @@ readonly CERTIFIED: "CERTIFIED";

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

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

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

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

@@ -30,3 +30,2 @@ "use strict";

DeclareActionInput: () => DeclareActionInput,
DraftActionInput: () => DraftActionInput,
EventConfig: () => EventConfig,

@@ -59,2 +58,3 @@ EventConfigInput: () => EventConfigInput,

getCurrentEventState: () => getCurrentEventState,
isUndeclaredDraft: () => isUndeclaredDraft,
resolveFieldLabels: () => resolveFieldLabels,

@@ -95,2 +95,3 @@ resolveLabelsFromKnownFields: () => resolveLabelsFromKnownFields

SHOW: "SHOW",
HIDE: "HIDE",
ENABLE: "ENABLE"

@@ -103,2 +104,6 @@ };

});
var HideConditional = import_zod3.z.object({
type: import_zod3.z.literal(ConditionalTypes.HIDE),
conditional: Conditional()
});
var EnableConditional = import_zod3.z.object({

@@ -110,2 +115,3 @@ type: import_zod3.z.literal(ConditionalTypes.ENABLE),

ShowConditional,
HideConditional,
EnableConditional

@@ -142,3 +148,7 @@ ]);

FILE: "FILE",
HIDDEN: "HIDDEN"
HIDDEN: "HIDDEN",
BULLET_LIST: "BULLET_LIST",
CHECKBOX: "CHECKBOX",
SELECT: "SELECT",
COUNTRY: "COUNTRY"
};

@@ -149,4 +159,5 @@ var fieldTypes = Object.values(FieldType);

options: import_zod3.z.object({
maxLength: import_zod3.z.number().optional().describe("Maximum length of the text")
}).default({}).optional()
maxLength: import_zod3.z.number().optional().describe("Maximum length of the text"),
type: import_zod3.z.enum(["text", "email", "password", "number"]).optional()
}).default({ type: "text" }).optional()
}).describe("Text input");

@@ -164,3 +175,3 @@ var DateField = BaseField.extend({

options: import_zod3.z.object({
fontVariant: import_zod3.z.literal("reg16").optional()
fontVariant: import_zod3.z.enum(["reg12", "reg14", "reg16", "reg18", "h4", "h3", "h2", "h1"]).optional()
}).default({})

@@ -180,2 +191,21 @@ }).describe("A read-only HTML <p> paragraph");

}).describe("Grouped radio options");
var BulletList = BaseField.extend({
type: import_zod3.z.literal(FieldType.BULLET_LIST),
items: import_zod3.z.array(TranslationConfig).describe("A list of items"),
font: import_zod3.z.enum(["reg12", "reg14", "reg16", "reg18", "h4", "h3", "h2", "h1"])
}).describe("A list of bullet points");
var SelectOption = import_zod3.z.object({
value: import_zod3.z.string().describe("The value of the option"),
label: TranslationConfig.describe("The label of the option")
});
var Select = BaseField.extend({
type: import_zod3.z.literal(FieldType.SELECT),
options: import_zod3.z.array(SelectOption).describe("A list of options")
}).describe("Select input");
var CheckBox = BaseField.extend({
type: import_zod3.z.literal(FieldType.CHECKBOX)
}).describe("Check Box");
var Country = BaseField.extend({
type: import_zod3.z.literal(FieldType.COUNTRY)
}).describe("Country select field");
var FieldConfig = import_zod3.z.discriminatedUnion("type", [

@@ -186,3 +216,7 @@ TextField,

RadioGroup,
File
BulletList,
Select,
CheckBox,
File,
Country
]);

@@ -219,2 +253,3 @@

allowedWhen: Conditional().optional(),
draft: import_zod5.z.boolean().optional(),
forms: import_zod5.z.array(FormConfig)

@@ -224,3 +259,2 @@ });

CREATE: "CREATE",
DRAFT: "DRAFT",
ASSIGN: "ASSIGN",

@@ -305,5 +339,5 @@ UNASSIGN: "UNASSIGN",

CREATED: "CREATED",
DRAFT: "DRAFT",
NOTIFIED: "NOTIFIED",
DECLARED: "DECLARED",
VALIDATED: "VALIDATED",
REGISTERED: "REGISTERED",

@@ -445,2 +479,3 @@ CERTIFIED: "CERTIFIED"

data: import_zod12.z.record(import_zod12.z.string(), FieldValue),
draft: import_zod12.z.boolean().optional().default(false),
createdAtLocation: import_zod12.z.string()

@@ -478,7 +513,2 @@ });

);
var DraftAction = ActionBase.merge(
import_zod12.z.object({
type: import_zod12.z.literal(ActionType.DRAFT)
})
);
var CreatedAction = ActionBase.merge(

@@ -501,3 +531,2 @@ import_zod12.z.object({

CreatedAction,
DraftAction,
ValidateAction,

@@ -527,2 +556,3 @@ NotifiedAction,

transactionId: import_zod14.z.string(),
draft: import_zod14.z.boolean().optional().default(false),
data: import_zod14.z.record(import_zod14.z.string(), FieldValue)

@@ -556,7 +586,2 @@ });

);
var DraftActionInput = BaseActionInput.merge(
import_zod14.z.object({
type: import_zod14.z.literal(ActionType.DRAFT).default(ActionType.DRAFT)
})
);
var DeclareActionInput = BaseActionInput.merge(

@@ -581,3 +606,2 @@ import_zod14.z.object({

ValidateActionInput,
DraftActionInput,
RegisterActionInput,

@@ -602,7 +626,10 @@ NotifyActionInput,

}
if (action.draft) {
return status;
}
if (action.type === ActionType.DECLARE) {
return EventStatus.DECLARED;
}
if (action.type === ActionType.DRAFT) {
return EventStatus.DRAFT;
if (action.type === ActionType.VALIDATE) {
return EventStatus.VALIDATED;
}

@@ -634,2 +661,7 @@ if (action.type === ActionType.REGISTER) {

}
function isUndeclaredDraft(event) {
return event.actions.every(
({ type, draft }) => type === ActionType.CREATE || draft
);
}
function getCurrentEventState(event) {

@@ -636,0 +668,0 @@ const creationAction = event.actions.find(

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

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

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

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

@@ -39,8 +39,8 @@ emptyValueMessage: z.ZodOptional<z.ZodObject<{

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

@@ -51,9 +51,9 @@ }, "strip", z.ZodTypeAny, {

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

@@ -64,9 +64,9 @@ }, {

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

@@ -77,4 +77,4 @@ }>, "many">;

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

@@ -85,9 +85,9 @@ fields: {

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

@@ -98,4 +98,4 @@ }[];

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

@@ -106,9 +106,9 @@ fields: {

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

@@ -124,8 +124,8 @@ }[];

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

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

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

@@ -154,8 +154,8 @@ emptyValueMessage: z.ZodOptional<z.ZodObject<{

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

@@ -166,9 +166,9 @@ }, "strip", z.ZodTypeAny, {

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

@@ -179,9 +179,9 @@ }, {

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

@@ -198,8 +198,8 @@ }>, "many">;

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

@@ -212,8 +212,8 @@ emptyValueMessage: z.ZodOptional<z.ZodObject<{

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

@@ -227,8 +227,8 @@ }, {

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

@@ -239,9 +239,9 @@ }>, "strip", z.ZodTypeAny, {

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

@@ -252,9 +252,9 @@ }, {

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

@@ -265,4 +265,4 @@ }>, "many">;

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

@@ -273,9 +273,9 @@ fields: {

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

@@ -286,4 +286,4 @@ }[];

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

@@ -294,9 +294,9 @@ fields: {

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

@@ -303,0 +303,0 @@ }[];

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

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

@@ -45,11 +45,7 @@ import { TranslationConfig } from './TranslationConfig';

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

@@ -60,8 +56,12 @@ fields: {

}[];
id: string;
title: {
id: string;
description: string;
defaultMessage: string;
description: string;
};
filters: {
status: ("CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
}[];
};
//# sourceMappingURL=utils.d.ts.map

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

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

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

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

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

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

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

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

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

readonly CREATED: "CREATED";
readonly DRAFT: "DRAFT";
readonly NOTIFIED: "NOTIFIED";
readonly DECLARED: "DECLARED";
readonly VALIDATED: "VALIDATED";
readonly REGISTERED: "REGISTERED";

@@ -65,5 +65,5 @@ readonly CERTIFIED: "CERTIFIED";

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

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

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

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

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

@@ -94,4 +94,4 @@ }, {

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

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

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

@@ -110,0 +110,0 @@ }>;

{
"name": "@opencrvs/toolkit",
"version": "0.0.9-events",
"version": "0.0.10-events",
"description": "OpenCRVS toolkit for building country configurations",

@@ -5,0 +5,0 @@ "license": "MPL-2.0",

@@ -72,5 +72,15 @@ /*

const: type
},
draft: {
type: 'boolean'
}
},
required: ['type']
required: ['type'],
not: {
properties: {
draft: {
const: true
}
}
}
}

@@ -109,4 +119,93 @@ }

required: ['$form', '$now']
}),
isEqualTo: (value: string) => ({
type: 'object',
properties: {
$form: {
type: 'object',
properties: {
[fieldId]: {
const: value
}
},
required: [fieldId]
}
},
required: ['$form']
}),
isInArray: (values: string[]) => ({
type: 'object',
properties: {
$form: {
type: 'object',
properties: {
[fieldId]: {
enum: values
}
},
required: [fieldId]
}
},
required: ['$form']
}),
isNotInArray: (values: string[]) => ({
type: 'object',
properties: {
$form: {
type: 'object',
properties: {
[fieldId]: {
not: {
enum: values
}
}
},
required: [fieldId]
}
},
required: ['$form']
}),
isUndefinedOrInArray: (values: string[]) => ({
type: 'object',
properties: {
$form: {
type: 'object',
anyOf: [
{
required: [fieldId],
properties: {
[fieldId]: {
enum: values
}
}
},
{ not: { required: [fieldId] } }
]
}
},
required: ['$form']
}),
isUndefinedOrNotInArray: (values: string[]) => ({
type: 'object',
properties: {
$form: {
type: 'object',
anyOf: [
{
required: [fieldId],
properties: {
[fieldId]: {
not: {
enum: values
}
}
}
},
{ not: { required: [fieldId] } }
]
}
},
required: ['$form']
})
}
}

Sorry, the diff of this file is not supported yet

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