You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@opencrvs/toolkit

Package Overview
Dependencies
Maintainers
4
Versions
1380
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

to
1.8.0-rc.189e3e8

dist/commons/conditionals/validate-address.test.d.ts

1

dist/commons/conditionals/conditionals.d.ts

@@ -101,4 +101,5 @@ import { EventDocument } from '../events/EventDocument';

inArray: (values: string[]) => JSONSchema;
isValidEnglishName: () => JSONSchema;
};
export {};
//# sourceMappingURL=conditionals.d.ts.map

@@ -9,2 +9,29 @@ import { ConditionalParameters, JSONSchema } from './conditionals';

export declare function isFieldEnabled(field: FieldConfig, form: ActionUpdate | EventState): boolean;
export declare const errorMessages: {
hiddenField: {
id: string;
defaultMessage: string;
description: string;
};
invalidDate: {
defaultMessage: string;
description: string;
id: string;
};
invalidEmail: {
defaultMessage: string;
description: string;
id: string;
};
requiredField: {
defaultMessage: string;
description: string;
id: string;
};
invalidInput: {
defaultMessage: string;
description: string;
id: string;
};
};
/**

@@ -11,0 +38,0 @@ * Custom error map for Zod to override the default error messages in intl-formik format.

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

};
export declare const AddressType: {
readonly DOMESTIC: "DOMESTIC";
readonly INTERNATIONAL: "INTERNATIONAL";
};
export declare const FileFieldValue: z.ZodObject<{

@@ -26,2 +30,3 @@ filename: z.ZodString;

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -39,2 +44,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -50,2 +56,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -61,2 +68,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -70,2 +78,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -77,2 +86,3 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -84,2 +94,3 @@ urbanOrRural: "RURAL";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -97,2 +108,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -108,2 +120,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -119,2 +132,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -128,2 +142,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -135,2 +150,3 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -140,4 +156,36 @@ urbanOrRural: "RURAL";

}>;
export declare const AddressFieldValue: z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
export declare const GenericAddressValue: z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodString>;
addressLine1: z.ZodOptional<z.ZodString>;
addressLine2: z.ZodOptional<z.ZodString>;
addressLine3: z.ZodOptional<z.ZodString>;
postcodeOrZip: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
}>;
export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -155,2 +203,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -166,2 +215,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -176,2 +226,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -185,2 +236,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -192,8 +244,71 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | undefined;
}>]>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodString>;
addressLine1: z.ZodOptional<z.ZodString>;
addressLine2: z.ZodOptional<z.ZodString>;
addressLine3: z.ZodOptional<z.ZodString>;
postcodeOrZip: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
}>]>;
export declare const AddressFieldUpdateValue: z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
export declare const GenericAddressUpdateValue: z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>;
export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -211,2 +326,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -222,2 +338,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -232,2 +349,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -241,2 +359,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -248,5 +367,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>]>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]>;

@@ -253,0 +403,0 @@ export type AddressFieldValue = z.infer<typeof AddressFieldValue>;

314

dist/commons/events/defineConfig.d.ts

@@ -25,25 +25,7 @@ import { EventConfigInput } from './EventConfigInput';

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -72,25 +54,7 @@ title: import("./TranslationConfig").TranslationConfig;

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -104,3 +68,2 @@ title: import("./TranslationConfig").TranslationConfig;

type: "REJECT";
comment: string;
conditionals: ({

@@ -121,25 +84,7 @@ type: "SHOW";

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -150,7 +95,5 @@ title: import("./TranslationConfig").TranslationConfig;

}[];
isDuplicate: boolean;
draft?: boolean | undefined;
} | {
type: "MARKED_AS_DUPLICATE";
comment: string;
conditionals: ({

@@ -171,25 +114,7 @@ type: "SHOW";

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -200,7 +125,5 @@ title: import("./TranslationConfig").TranslationConfig;

}[];
duplicates: string[];
draft?: boolean | undefined;
} | {
type: "ARCHIVE";
comment: string;
conditionals: ({

@@ -221,25 +144,7 @@ type: "SHOW";

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -250,3 +155,2 @@ title: import("./TranslationConfig").TranslationConfig;

}[];
isDuplicate: boolean;
draft?: boolean | undefined;

@@ -270,25 +174,7 @@ } | {

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -317,25 +203,7 @@ title: import("./TranslationConfig").TranslationConfig;

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -364,25 +232,7 @@ title: import("./TranslationConfig").TranslationConfig;

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -411,25 +261,7 @@ title: import("./TranslationConfig").TranslationConfig;

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -440,48 +272,12 @@ title: import("./TranslationConfig").TranslationConfig;

}[];
onboardingForm: ({
type: import("./FormConfig").PageType.FORM;
onboardingForm: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
}[];
additionalDetailsForm: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
additionalDetailsForm: ({
type: import("./FormConfig").PageType.FORM;
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
draft?: boolean | undefined;

@@ -505,25 +301,7 @@ } | {

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -552,25 +330,7 @@ title: import("./TranslationConfig").TranslationConfig;

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -599,25 +359,7 @@ title: import("./TranslationConfig").TranslationConfig;

label: import("./TranslationConfig").TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: import("./TranslationConfig").TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: import("./TranslationConfig").TranslationConfig;
actions: {
verify: {
label: import("./TranslationConfig").TranslationConfig;
};
cancel: {
label: import("./TranslationConfig").TranslationConfig;
confirmation: {
title: import("./TranslationConfig").TranslationConfig;
body: import("./TranslationConfig").TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -624,0 +366,0 @@ title: import("./TranslationConfig").TranslationConfig;

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

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -54,2 +55,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -65,2 +67,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -75,2 +78,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

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

district: string;
addressType: "DOMESTIC";
province: string;

@@ -91,5 +96,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]>>;

@@ -125,2 +161,3 @@ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -138,2 +175,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -149,2 +187,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -159,2 +198,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -168,2 +208,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -175,5 +216,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]>>>;

@@ -192,2 +264,3 @@ createdAtLocation: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -203,2 +276,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -208,2 +282,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -224,2 +308,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -235,2 +320,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -240,2 +326,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -255,2 +351,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -266,2 +363,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -271,2 +369,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -287,2 +395,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -298,2 +407,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -303,2 +413,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -324,2 +444,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -335,2 +456,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -340,2 +462,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -356,2 +488,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -367,2 +500,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -372,2 +506,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -393,2 +537,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -404,2 +549,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -409,2 +555,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -425,2 +581,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -436,2 +593,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -441,2 +599,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -481,2 +649,3 @@ option: string;

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -494,2 +663,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -505,2 +675,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -515,2 +686,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -524,2 +696,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -531,5 +704,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]>>;

@@ -565,2 +769,3 @@ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -578,2 +783,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -589,2 +795,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -599,2 +806,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -608,2 +816,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -615,5 +824,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]>>>;

@@ -631,2 +871,3 @@ }, {

district: string;
addressType: "DOMESTIC";
province: string;

@@ -642,2 +883,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -647,2 +889,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -662,2 +914,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -673,2 +926,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -678,2 +932,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -693,2 +957,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -704,2 +969,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -709,2 +975,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -724,2 +1000,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -735,2 +1012,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -740,2 +1018,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -742,0 +1030,0 @@ option: string;

import { z } from 'zod';
import { EventConfig } from './EventConfig';
import { FormConfig, FormConfigInput, Page, PageInput } from './FormConfig';
import { FormConfig, FormConfigInput, FormPage } from './FormConfig';
export type EventConfigInput = z.input<typeof EventConfig>;
export declare const defineForm: (form: FormConfigInput) => FormConfig;
export declare const definePage: (formPage: PageInput) => Page;
export declare const defineFormPage: (formPage: FormPage) => FormPage;
//# sourceMappingURL=EventConfigInput.d.ts.map

@@ -24,5 +24,4 @@ export declare const FieldType: {

readonly SIGNATURE: "SIGNATURE";
readonly DATA: "DATA";
};
export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "HIDDEN" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA")[];
export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "HIDDEN" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE")[];
export type FieldType = (typeof fieldTypes)[number];

@@ -29,0 +28,0 @@ /**

import { z } from 'zod';
import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, Location, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField, Data } from './FieldConfig';
import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, Location, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField } from './FieldConfig';
import { FieldType } from './FieldType';

@@ -45,4 +45,5 @@ import { FieldValue, FieldUpdateValueSchema } from './FieldValue';

originalFilename: string;
}>>> | z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
}>>> | z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -60,2 +61,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -71,2 +73,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -81,2 +84,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -90,2 +94,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -97,5 +102,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>]>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]> | z.ZodArray<z.ZodObject<{

@@ -131,4 +167,5 @@ filename: z.ZodString;

originalFilename: string;
}>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
}>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -146,2 +183,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -157,2 +195,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -167,2 +206,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -176,2 +216,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -183,5 +224,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>]>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]>>>;

@@ -196,2 +268,3 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObject<Record<string, FieldUpdateValueSchema | NullishFieldValueSchema>, "strip", z.ZodTypeAny, {

district: string;
addressType: "DOMESTIC";
province: string;

@@ -207,2 +280,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -212,2 +286,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -226,2 +310,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -237,2 +322,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -242,2 +328,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -254,2 +350,3 @@ option: string;

country: string;
addressType: "DOMESTIC";
province: string;

@@ -271,2 +368,3 @@ district: string;

country?: undefined;
addressType?: undefined;
province?: undefined;

@@ -280,4 +378,26 @@ district?: undefined;

zipCode?: undefined;
} | null;
/**
* Maps complex or nested field types, such as Address fields, to their corresponding empty values.
*/
export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] | {
country: null;
addressType: "DOMESTIC";
province: null;
district: null;
urbanOrRural: string;
town: null;
residentialArea: null;
street: null;
number: null;
zipCode: null;
filename?: undefined;
originalFilename?: undefined;
type?: undefined;
} | {
filename: string;
originalFilename: string;
type: string;
country?: undefined;
addressType?: undefined;
province?: undefined;

@@ -291,5 +411,2 @@ district?: undefined;

zipCode?: undefined;
filename?: undefined;
originalFilename?: undefined;
type?: undefined;
} | null;

@@ -443,10 +560,3 @@ export declare const isParagraphFieldType: (field: {

};
export declare const isDataFieldType: (field: {
config: FieldConfig;
value: FieldValue;
}) => field is {
value: any;
config: Data;
};
export {};
//# sourceMappingURL=FieldTypeMapping.d.ts.map

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

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -65,2 +66,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -76,2 +78,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -86,2 +89,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -95,2 +99,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -102,5 +107,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | undefined;
}>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodString>;
addressLine1: z.ZodOptional<z.ZodString>;
addressLine2: z.ZodOptional<z.ZodString>;
addressLine3: z.ZodOptional<z.ZodString>;
postcodeOrZip: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
}>]>;

@@ -137,2 +173,3 @@ export type FieldValue = z.infer<typeof FieldValue>;

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -150,2 +187,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -161,2 +199,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -171,2 +210,3 @@ urbanOrRural: "URBAN";

country: z.ZodString;
addressType: z.ZodLiteral<"DOMESTIC">;
province: z.ZodString;

@@ -180,2 +220,3 @@ district: z.ZodString;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -187,5 +228,36 @@ urbanOrRural: "RURAL";

district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
}>, z.ZodObject<{
country: z.ZodString;
addressType: z.ZodLiteral<"INTERNATIONAL">;
state: z.ZodString;
district2: z.ZodString;
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}, {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
}>]>;

@@ -192,0 +264,0 @@ export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;

import { z } from 'zod';
import { TranslationConfig } from './TranslationConfig';
export declare enum PageType {
FORM = "FORM",
VERIFICATION = "VERIFICATION"
}
export declare const FormPage: z.ZodObject<{

@@ -15,5 +11,3 @@ id: z.ZodString;

fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
type: z.ZodDefault<z.ZodLiteral<PageType.FORM>>;
}, "strip", z.ZodTypeAny, {
type: PageType.FORM;
id: string;

@@ -30,21 +24,11 @@ title: TranslationConfig;

fields: import("./FieldConfig").Inferred[];
type?: PageType.FORM | undefined;
}>;
export declare const VerificationPageConfig: z.ZodObject<{
verify: z.ZodObject<{
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
}, "strip", z.ZodTypeAny, {
label: TranslationConfig;
}, {
label: {
id: string;
description: string;
defaultMessage: string;
};
export declare const FormConfig: z.ZodObject<{
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
cancel: z.ZodObject<{
version: z.ZodObject<{
id: z.ZodString;
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {

@@ -55,35 +39,7 @@ id: string;

}>;
confirmation: z.ZodObject<{
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
}, "strip", z.ZodTypeAny, {
title: TranslationConfig;
body: TranslationConfig;
}, {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
}>;
}, "strip", z.ZodTypeAny, {
id: string;
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
}, {
id: string;
label: {

@@ -94,246 +50,7 @@ id: string;

};
confirmation: {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
};
}>;
}, "strip", z.ZodTypeAny, {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
}, {
verify: {
label: {
id: string;
description: string;
defaultMessage: string;
};
};
cancel: {
label: {
id: string;
description: string;
defaultMessage: string;
};
confirmation: {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
};
};
}>;
export declare const VerificationPage: z.ZodObject<z.objectUtil.extendShape<{
id: z.ZodString;
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
type: z.ZodDefault<z.ZodLiteral<PageType.FORM>>;
}, {
type: z.ZodLiteral<PageType.VERIFICATION>;
actions: z.ZodObject<{
verify: z.ZodObject<{
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
}, "strip", z.ZodTypeAny, {
label: TranslationConfig;
}, {
label: {
id: string;
description: string;
defaultMessage: string;
};
}>;
cancel: z.ZodObject<{
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
confirmation: z.ZodObject<{
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
}, "strip", z.ZodTypeAny, {
title: TranslationConfig;
body: TranslationConfig;
}, {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
}>;
}, "strip", z.ZodTypeAny, {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
}, {
label: {
id: string;
description: string;
defaultMessage: string;
};
confirmation: {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
};
}>;
}, "strip", z.ZodTypeAny, {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
}, {
verify: {
label: {
id: string;
description: string;
defaultMessage: string;
};
};
cancel: {
label: {
id: string;
description: string;
defaultMessage: string;
};
confirmation: {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
};
};
}>;
}>, "strip", z.ZodTypeAny, {
type: PageType.VERIFICATION;
id: string;
title: TranslationConfig;
actions: {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
}, {
type: PageType.VERIFICATION;
id: string;
title: {
id: string;
description: string;
defaultMessage: string;
};
actions: {
verify: {
label: {
id: string;
description: string;
defaultMessage: string;
};
};
cancel: {
label: {
id: string;
description: string;
defaultMessage: string;
};
confirmation: {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
};
};
};
fields: import("./FieldConfig").Inferred[];
}>;
export type VerificationPageConfig = z.infer<typeof VerificationPageConfig>;
export type AllPageConfigs = typeof FormPage | typeof VerificationPage;
export declare const PageConfig: z.ZodDiscriminatedUnion<"type", AllPageConfigs[]>;
export type PageInput = z.input<typeof PageConfig>;
export type Page = z.infer<typeof PageConfig>;
export declare const FormConfig: z.ZodObject<{
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;
description: string;
defaultMessage: string;
}>;
version: z.ZodObject<{
active: z.ZodDefault<z.ZodBoolean>;
pages: z.ZodArray<z.ZodObject<{
id: z.ZodString;
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
id: string;

@@ -343,8 +60,10 @@ description: string;

}>;
fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
}, "strip", z.ZodTypeAny, {
id: string;
label: TranslationConfig;
title: TranslationConfig;
fields: import("./FieldConfig").Inferred[];
}, {
id: string;
label: {
title: {
id: string;

@@ -354,5 +73,4 @@ description: string;

};
}>;
active: z.ZodDefault<z.ZodBoolean>;
pages: z.ZodArray<z.ZodDiscriminatedUnion<"type", AllPageConfigs[]>, "many">;
fields: import("./FieldConfig").Inferred[];
}>, "many">;
review: z.ZodObject<{

@@ -383,25 +101,7 @@ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {

label: TranslationConfig;
pages: ({
type: PageType.FORM;
pages: {
id: string;
title: TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: PageType.VERIFICATION;
id: string;
title: TranslationConfig;
actions: {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -425,3 +125,3 @@ title: TranslationConfig;

};
pages: ({
pages: {
id: string;

@@ -434,41 +134,3 @@ title: {

fields: import("./FieldConfig").Inferred[];
type?: PageType.FORM | undefined;
} | {
type: PageType.VERIFICATION;
id: string;
title: {
id: string;
description: string;
defaultMessage: string;
};
actions: {
verify: {
label: {
id: string;
description: string;
defaultMessage: string;
};
};
cancel: {
label: {
id: string;
description: string;
defaultMessage: string;
};
confirmation: {
title: {
id: string;
description: string;
defaultMessage: string;
};
body: {
id: string;
description: string;
defaultMessage: string;
};
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -484,4 +146,5 @@ title: {

}>;
export type FormPage = z.infer<typeof FormPage>;
export type FormConfig = z.infer<typeof FormConfig>;
export type FormConfigInput = z.input<typeof FormConfig>;
//# sourceMappingURL=FormConfig.d.ts.map

@@ -17,2 +17,3 @@ import { ActionDocument } from './ActionDocument';

district: string;
addressType: "DOMESTIC";
province: string;

@@ -28,2 +29,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -33,2 +35,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
} | {
type: string;

@@ -84,2 +96,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -95,2 +108,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -100,2 +114,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -116,2 +140,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -127,2 +152,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -132,2 +158,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -151,2 +187,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -162,2 +199,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -167,2 +205,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -185,2 +233,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -196,2 +245,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -201,2 +251,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -220,2 +280,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -231,2 +292,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -236,2 +298,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -258,2 +330,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -269,2 +342,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -274,2 +348,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -293,2 +377,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -304,2 +389,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -309,2 +395,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -327,2 +423,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -338,2 +435,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -343,2 +441,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -362,2 +470,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -373,2 +482,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -378,2 +488,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -397,2 +517,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -408,2 +529,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -413,2 +535,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -432,2 +564,3 @@ option: string;

district: string;
addressType: "DOMESTIC";
province: string;

@@ -443,2 +576,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -448,2 +582,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;

@@ -450,0 +594,0 @@ option: string;

@@ -10,2 +10,4 @@ import { TranslationConfig } from './TranslationConfig';

import { FormConfig } from './FormConfig';
import { Draft } from './Draft';
import { EventDocument } from './EventDocument';
/**

@@ -42,25 +44,7 @@ * @returns All the fields in the event configuration input.

export declare function getAllFields(configuration: EventConfig): import("./FieldConfig").Inferred[];
export declare function getAllPages(configuration: EventConfig): ({
type: import("./FormConfig").PageType.FORM;
export declare function getAllPages(configuration: EventConfig): {
id: string;
title: TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: TranslationConfig;
actions: {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
export declare function validateWorkqueueConfig(workqueueConfigs: WorkqueueConfig[]): void;

@@ -74,25 +58,7 @@ export declare const findActiveActionForm: (configuration: EventConfig, action: ActionType) => {

label: TranslationConfig;
pages: ({
type: import("./FormConfig").PageType.FORM;
pages: {
id: string;
title: TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: TranslationConfig;
actions: {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
review: {

@@ -103,25 +69,7 @@ title: TranslationConfig;

} | undefined;
export declare const findActiveActionFormPages: (configuration: EventConfig, action: ActionType) => ({
type: import("./FormConfig").PageType.FORM;
export declare const findActiveActionFormPages: (configuration: EventConfig, action: ActionType) => {
id: string;
title: TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: TranslationConfig;
actions: {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[] | undefined;
}[] | undefined;
export declare const getFormFields: (formConfig: FormConfig) => import("./FieldConfig").Inferred[];

@@ -136,25 +84,7 @@ /**

export declare const findActiveActionFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
export declare const getActiveActionFormPages: (configuration: EventConfig, action: ActionType) => ({
type: import("./FormConfig").PageType.FORM;
export declare const getActiveActionFormPages: (configuration: EventConfig, action: ActionType) => {
id: string;
title: TranslationConfig;
fields: import("./FieldConfig").Inferred[];
} | {
type: import("./FormConfig").PageType.VERIFICATION;
id: string;
title: TranslationConfig;
actions: {
verify: {
label: TranslationConfig;
};
cancel: {
label: TranslationConfig;
confirmation: {
title: TranslationConfig;
body: TranslationConfig;
};
};
};
fields: import("./FieldConfig").Inferred[];
})[];
}[];
/**

@@ -172,2 +102,3 @@ * Returns all fields for the action type, including review fields, or throws

district: string;
addressType: "DOMESTIC";
province: string;

@@ -183,2 +114,3 @@ urbanOrRural: "URBAN";

district: string;
addressType: "DOMESTIC";
province: string;

@@ -188,2 +120,12 @@ urbanOrRural: "RURAL";

} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | undefined;
addressLine1?: string | undefined;
addressLine2?: string | undefined;
addressLine3?: string | undefined;
postcodeOrZip?: string | undefined;
} | {
type: string;

@@ -194,2 +136,104 @@ option: string;

}[]>;
export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]): {
id: string;
createdAt: string;
eventId: string;
transactionId: string;
action: {
type: ActionType;
data: Record<string, string | number | boolean | {
type: string;
filename: string;
originalFilename: string;
} | {
country: string;
district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "URBAN";
number?: string | null | undefined;
town?: string | null | undefined;
residentialArea?: string | null | undefined;
street?: string | null | undefined;
zipCode?: string | null | undefined;
} | {
country: string;
district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;
option: string;
filename: string;
originalFilename: string;
}[]>;
createdAt: string;
createdBy: string;
createdAtLocation: string;
metadata?: Record<string, string | number | boolean | {
type: string;
filename: string;
originalFilename: string;
} | {
country: string;
district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "URBAN";
number?: string | null | undefined;
town?: string | null | undefined;
residentialArea?: string | null | undefined;
street?: string | null | undefined;
zipCode?: string | null | undefined;
} | {
country: string;
district: string;
addressType: "DOMESTIC";
province: string;
urbanOrRural: "RURAL";
village?: string | null | undefined;
} | {
country: string;
state: string;
addressType: "INTERNATIONAL";
district2: string;
cityOrTown?: string | null | undefined;
addressLine1?: string | null | undefined;
addressLine2?: string | null | undefined;
addressLine3?: string | null | undefined;
postcodeOrZip?: string | null | undefined;
} | {
type: string;
option: string;
filename: string;
originalFilename: string;
}[]> | undefined;
};
}[];
export declare function createEmptyDraft(eventId: string, draftId: string, actionType: ActionType): {
id: string;
eventId: string;
createdAt: string;
transactionId: import("../uuid").UUID;
action: {
type: ActionType;
data: {};
metadata: {};
createdAt: string;
createdBy: string;
createdAtLocation: string;
};
};
//# sourceMappingURL=utils.d.ts.map

@@ -242,4 +242,21 @@ "use strict";

required: ["$form"]
}),
isValidEnglishName: () => defineConditional({
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
type: "string",
pattern: "^[\\p{Script=Latin}0-9'._-]*(\\([\\p{Script=Latin}0-9'._-]+\\))?[\\p{Script=Latin}0-9'._-]*( [\\p{Script=Latin}0-9'._-]*(\\([\\p{Script=Latin}0-9'._-]+\\))?[\\p{Script=Latin}0-9'._-]*)*$",
description: "Name must contain only letters, numbers, and allowed special characters ('._-). No double spaces."
}
},
required: [fieldId]
}
},
required: ["$form"]
})
};
}
{
"name": "@opencrvs/toolkit",
"version": "1.8.0-rc.17de4fd",
"version": "1.8.0-rc.189e3e8",
"description": "OpenCRVS toolkit for building country configurations",

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

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

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

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

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

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

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

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

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