@opencrvs/toolkit
Advanced tools
Comparing version 0.0.17-riku-events to 0.0.18-events
import { CreateTRPCClient } from '@trpc/client'; | ||
import { AppRouter } from './router'; | ||
/** | ||
* Creates a tRPC client with the specified base URL. | ||
* Creates a tRPC client with the specified base URL and authorization token. | ||
* | ||
* @param baseUrl - The base URL where the tRPC server can be found, e.g., 'https://farajaland.opencrvs.org/api/trpc'. | ||
* @returns A tRPC client configured with the provided base URL. | ||
* @param token - The authorization token to be used in the request headers. | ||
* @returns A tRPC client configured with the provided base URL and authorization token. | ||
*/ | ||
export declare function createClient(baseUrl: string): CreateTRPCClient<AppRouter>; | ||
export declare function createClient(baseUrl: string, token: `Bearer ${string}`): CreateTRPCClient<AppRouter>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -38,3 +38,3 @@ "use strict"; | ||
var import_superjson = __toESM(require("superjson")); | ||
function createClient(baseUrl) { | ||
function createClient(baseUrl, token) { | ||
return (0, import_client.createTRPCClient)({ | ||
@@ -44,3 +44,8 @@ links: [ | ||
url: baseUrl, | ||
transformer: import_superjson.default | ||
transformer: import_superjson.default, | ||
headers() { | ||
return { | ||
Authorization: token | ||
}; | ||
} | ||
}) | ||
@@ -47,0 +52,0 @@ ] |
import { JSONSchemaType } from 'ajv'; | ||
import { z } from 'zod'; | ||
import { ActionFormData, EventDocument } from '../events'; | ||
export declare function Conditional(): any; | ||
export declare function Conditional(): z.ZodType<Omit<JSONSchemaType<ConditionalParameters>, "properties">>; | ||
export type ConditionalParameters = { | ||
@@ -5,0 +6,0 @@ $now: string; |
@@ -17,3 +17,3 @@ import { z } from 'zod'; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -61,3 +61,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -104,3 +104,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -147,3 +147,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -190,3 +190,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -251,3 +251,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -294,3 +294,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -340,3 +340,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -383,3 +383,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -386,0 +386,0 @@ createdAtLocation: z.ZodString; |
@@ -18,3 +18,3 @@ import { z } from 'zod'; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -77,3 +77,3 @@ type: z.ZodDefault<z.ZodLiteral<"REGISTER">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -122,3 +122,3 @@ type: z.ZodDefault<z.ZodLiteral<"VALIDATE">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -167,3 +167,3 @@ type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -217,3 +217,3 @@ type: z.ZodDefault<z.ZodLiteral<"DECLARE">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -260,3 +260,3 @@ type: z.ZodDefault<z.ZodLiteral<"CREATE">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -303,3 +303,3 @@ type: z.ZodDefault<z.ZodLiteral<"VALIDATE">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -361,3 +361,3 @@ type: z.ZodDefault<z.ZodLiteral<"REGISTER">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -404,3 +404,3 @@ type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -444,3 +444,3 @@ type: z.ZodDefault<z.ZodLiteral<"DECLARE">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -487,3 +487,3 @@ type: z.ZodDefault<z.ZodLiteral<"ASSIGN">>; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
}, { | ||
@@ -490,0 +490,0 @@ type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>; |
@@ -183,2 +183,3 @@ import { z } from 'zod'; | ||
export declare const Clause: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>; | ||
export type Clause = z.infer<typeof Clause>; | ||
export declare const DeduplicationConfig: z.ZodObject<{ | ||
@@ -185,0 +186,0 @@ id: z.ZodString; |
@@ -23,3 +23,3 @@ import { z } from 'zod'; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -66,3 +66,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -109,3 +109,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -152,3 +152,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -213,3 +213,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -256,3 +256,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -302,3 +302,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -345,3 +345,3 @@ createdAtLocation: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>>; | ||
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -348,0 +348,0 @@ createdAtLocation: z.ZodString; |
@@ -9,2 +9,4 @@ import { z } from 'zod'; | ||
export type ParagraphFieldValue = z.infer<typeof ParagraphFieldValue>; | ||
declare const BulletListFieldValue: z.ZodString; | ||
export type BulletListFieldValue = z.infer<typeof BulletListFieldValue>; | ||
export declare const FileFieldValue: z.ZodNullable<z.ZodObject<{ | ||
@@ -26,3 +28,11 @@ filename: z.ZodString; | ||
export type RadioGroupFieldValue = z.infer<typeof RadioGroupFieldValue>; | ||
export type FieldTypeToFieldValue<T extends FieldType> = T extends 'TEXT' ? TextFieldValue : T extends 'PARAGRAPH' ? ParagraphFieldValue : T extends 'DATE' ? DateFieldValue : T extends 'FILE' ? FileFieldValue : T extends 'RADIO_GROUP' ? RadioGroupFieldValue : never; | ||
declare const CheckboxFieldValue: z.ZodEnum<["true", "false"]>; | ||
export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>; | ||
declare const LocationFieldValue: z.ZodString; | ||
export type LocationFieldValue = z.infer<typeof LocationFieldValue>; | ||
declare const SelectFieldValue: z.ZodString; | ||
export type SelectFieldValue = z.infer<typeof SelectFieldValue>; | ||
declare const CountryFieldValue: z.ZodString; | ||
export type CountryFieldValue = z.infer<typeof CountryFieldValue>; | ||
export type FieldTypeToFieldValue<T extends FieldType> = T extends 'TEXT' ? TextFieldValue : T extends 'PARAGRAPH' ? ParagraphFieldValue : T extends 'BULLET_LIST' ? BulletListFieldValue : T extends 'DATE' ? DateFieldValue : T extends 'FILE' ? FileFieldValue : T extends 'RADIO_GROUP' ? RadioGroupFieldValue : T extends 'CHECKBOX' ? CheckboxFieldValue : T extends 'LOCATION' ? LocationFieldValue : T extends 'COUNTRY' ? CountryFieldValue : T extends 'SELECT' ? SelectFieldValue : never; | ||
export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodNullable<z.ZodString>, z.ZodString, z.ZodNullable<z.ZodObject<{ | ||
@@ -40,5 +50,5 @@ filename: z.ZodString; | ||
originalFilename: string; | ||
}>>, z.ZodString]>; | ||
}>>, z.ZodString, z.ZodEnum<["true", "false"]>, z.ZodString, z.ZodString]>; | ||
export type FieldValue = z.infer<typeof FieldValue>; | ||
export {}; | ||
//# sourceMappingURL=FieldValue.d.ts.map |
@@ -60,2 +60,3 @@ "use strict"; | ||
fieldTypes: () => fieldTypes, | ||
findInputPageFields: () => findInputPageFields, | ||
findPageFields: () => findPageFields, | ||
@@ -154,3 +155,4 @@ getAllFields: () => getAllFields, | ||
SELECT: "SELECT", | ||
COUNTRY: "COUNTRY" | ||
COUNTRY: "COUNTRY", | ||
LOCATION: "LOCATION" | ||
}; | ||
@@ -192,10 +194,10 @@ var fieldTypes = Object.values(FieldType); | ||
}).describe("File upload"); | ||
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 RadioGroup = BaseField.extend({ | ||
type: import_zod3.z.literal(FieldType.RADIO_GROUP), | ||
options: import_zod3.z.array( | ||
import_zod3.z.object({ | ||
value: import_zod3.z.string().describe("The value of the option"), | ||
label: import_zod3.z.string().describe("The label of the option") | ||
}) | ||
) | ||
options: import_zod3.z.array(SelectOption), | ||
flexDirection: import_zod3.z.enum(["row", "row-reverse", "column", "column-reverse"]).optional().describe("Direction to stack the options") | ||
}).describe("Grouped radio options"); | ||
@@ -207,6 +209,2 @@ var BulletList = BaseField.extend({ | ||
}).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({ | ||
@@ -222,2 +220,12 @@ type: import_zod3.z.literal(FieldType.SELECT), | ||
}).describe("Country select field"); | ||
var LocationOptions = import_zod3.z.object({ | ||
partOf: import_zod3.z.object({ | ||
$data: import_zod3.z.string() | ||
}).optional().describe("Parent location"), | ||
type: import_zod3.z.enum(["ADMIN_STRUCTURE", "HEALTH_FACILITY", "CRVS_OFFICE"]) | ||
}); | ||
var Location = BaseField.extend({ | ||
type: import_zod3.z.literal(FieldType.LOCATION), | ||
options: LocationOptions | ||
}).describe("Location input field"); | ||
var FieldConfig = import_zod3.z.discriminatedUnion("type", [ | ||
@@ -232,3 +240,4 @@ TextField, | ||
File, | ||
Country | ||
Country, | ||
Location | ||
]); | ||
@@ -538,2 +547,3 @@ | ||
var ParagraphFieldValue = import_zod12.z.string(); | ||
var BulletListFieldValue = import_zod12.z.string(); | ||
var FileFieldValue = import_zod12.z.object({ | ||
@@ -545,2 +555,6 @@ filename: import_zod12.z.string(), | ||
var RadioGroupFieldValue = import_zod12.z.string(); | ||
var CheckboxFieldValue = import_zod12.z.enum(["true", "false"]); | ||
var LocationFieldValue = import_zod12.z.string(); | ||
var SelectFieldValue = import_zod12.z.string(); | ||
var CountryFieldValue = import_zod12.z.string(); | ||
var FieldValue = import_zod12.z.union([ | ||
@@ -551,3 +565,6 @@ TextFieldValue, | ||
FileFieldValue, | ||
RadioGroupFieldValue | ||
RadioGroupFieldValue, | ||
CheckboxFieldValue, | ||
LocationFieldValue, | ||
SelectFieldValue | ||
]); | ||
@@ -777,3 +794,3 @@ | ||
var isMetadataField = (field) => field in eventMetadataLabelMap; | ||
var findPageFields = (config) => { | ||
var findInputPageFields = (config) => { | ||
return (0, import_lodash.flattenDeep)( | ||
@@ -783,7 +800,3 @@ config.actions.map( | ||
({ pages }) => pages.map( | ||
({ fields }) => fields.map(({ id, label, type }) => ({ | ||
id, | ||
label, | ||
type | ||
})) | ||
({ fields }) => fields.map(({ id, label }) => ({ id, label })) | ||
) | ||
@@ -794,2 +807,9 @@ ) | ||
}; | ||
var findPageFields = (config) => { | ||
return (0, import_lodash.flattenDeep)( | ||
config.actions.map( | ||
({ forms }) => forms.map(({ pages }) => pages.map(({ fields }) => fields)) | ||
) | ||
); | ||
}; | ||
var resolveLabelsFromKnownFields = ({ | ||
@@ -838,6 +858,3 @@ pageFields, | ||
const input = EventConfigInput.parse(config); | ||
const pageFields = findPageFields(input).map(({ id, label }) => ({ | ||
id, | ||
label | ||
})); | ||
const pageFields = findInputPageFields(input); | ||
return EventConfig.parse({ | ||
@@ -844,0 +861,0 @@ ...input, |
@@ -6,12 +6,15 @@ import { TranslationConfig } from './TranslationConfig'; | ||
import { WorkqueueConfigInput } from './WorkqueueConfig'; | ||
import { FieldType } from './FieldConfig'; | ||
import { FieldConfig } from './FieldConfig'; | ||
/** | ||
* @returns All the fields in the event configuration. | ||
* @returns All the fields in the event configuration input. | ||
*/ | ||
export declare const findPageFields: (config: EventConfigInput) => Array<{ | ||
export declare const findInputPageFields: (config: EventConfigInput) => { | ||
id: string; | ||
label: TranslationConfig; | ||
type: FieldType; | ||
}>; | ||
}[]; | ||
/** | ||
* @returns All the fields in the event configuration. | ||
*/ | ||
export declare const findPageFields: (config: EventConfig) => FieldConfig[]; | ||
/** | ||
* | ||
@@ -84,3 +87,3 @@ * @param pageFields - All the fields in the event configuration | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -90,9 +93,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -132,3 +135,3 @@ dependsOn?: string[] | undefined; | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -138,9 +141,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -176,3 +179,3 @@ dependsOn?: string[] | undefined; | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -182,9 +185,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -208,3 +211,7 @@ dependsOn?: string[] | undefined; | ||
value: string; | ||
label: string; | ||
label: { | ||
id: string; | ||
defaultMessage: string; | ||
description: string; | ||
}; | ||
}[]; | ||
@@ -222,3 +229,3 @@ label: { | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -228,9 +235,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -249,2 +256,3 @@ dependsOn?: string[] | undefined; | ||
} | undefined; | ||
flexDirection?: "row" | "row-reverse" | "column" | "column-reverse" | undefined; | ||
} | { | ||
@@ -270,3 +278,3 @@ id: string; | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -276,9 +284,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -319,3 +327,3 @@ dependsOn?: string[] | undefined; | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -325,9 +333,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -360,3 +368,3 @@ dependsOn?: string[] | undefined; | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -366,9 +374,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -401,3 +409,3 @@ dependsOn?: string[] | undefined; | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -407,9 +415,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -442,3 +450,3 @@ dependsOn?: string[] | undefined; | ||
}; | ||
validator?: any; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
@@ -448,9 +456,9 @@ required?: boolean | undefined; | ||
type: "SHOW"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional?: any; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
@@ -469,3 +477,48 @@ dependsOn?: string[] | undefined; | ||
} | undefined; | ||
} | { | ||
id: string; | ||
type: "LOCATION"; | ||
options: { | ||
type: "ADMIN_STRUCTURE" | "HEALTH_FACILITY" | "CRVS_OFFICE"; | ||
partOf?: { | ||
$data: string; | ||
} | undefined; | ||
}; | ||
label: { | ||
id: string; | ||
defaultMessage: string; | ||
description: string; | ||
}; | ||
validation?: { | ||
message: { | ||
id: string; | ||
defaultMessage: string; | ||
description: string; | ||
}; | ||
validator: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
}[] | undefined; | ||
required?: boolean | undefined; | ||
conditionals?: ({ | ||
type: "SHOW"; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "HIDE"; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
} | { | ||
type: "ENABLE"; | ||
conditional: Omit<import("ajv").JSONSchemaType<import("../client").ConditionalParameters>, "properties">; | ||
})[] | undefined; | ||
dependsOn?: string[] | undefined; | ||
initialValue?: string | { | ||
dependsOn: string[]; | ||
expression: string; | ||
} | undefined; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
placeholder?: { | ||
id: string; | ||
defaultMessage: string; | ||
description: string; | ||
} | undefined; | ||
})[]; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@opencrvs/toolkit", | ||
"version": "0.0.17-riku-events", | ||
"version": "0.0.18-events", | ||
"description": "OpenCRVS toolkit for building country configurations", | ||
@@ -18,7 +18,9 @@ "license": "MPL-2.0", | ||
"superjson": "1.9.0-0", | ||
"@trpc/client": "^11.0.0-rc.648" | ||
"@trpc/client": "^11.0.0-rc.648", | ||
"@trpc/server": "^11.0.0-rc.532" | ||
}, | ||
"devDependencies": { | ||
"esbuild": "^0.24.0", | ||
"typescript": "^5.6.3" | ||
"typescript": "^5.6.3", | ||
"@opencrvs/events": "^1.7.0" | ||
}, | ||
@@ -25,0 +27,0 @@ "moduleNameMapper": { |
Sorry, the diff of this file is not supported yet
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
Sorry, the diff of this file is too big to display
5961854
125630
4
3
+ Added@trpc/server@^11.0.0-rc.532
+ Added@trpc/server@11.0.0-rc.730(transitive)