@opencrvs/toolkit 2.1.0-rc.d078d1a → 2.1.0-rc.d13869e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8242,37 +8242,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8242
8242
  responseSummary: {
8243
8243
  clientId: string;
8244
8244
  };
8245
- } | {
8246
- id: string;
8247
- clientId: string;
8248
- clientType: "system" | "user";
8249
- createdAt: string;
8250
- operation: "locations.create";
8251
- requestData: {
8252
- id: string;
8253
- versionId: string;
8254
- name: string;
8255
- externalId?: string | null | undefined;
8256
- effectiveFrom: string;
8257
- status: string;
8258
- administrativeAreaId?: string | null | undefined;
8259
- locationType?: string | null | undefined;
8260
- };
8261
- } | {
8262
- id: string;
8263
- clientId: string;
8264
- clientType: "system" | "user";
8265
- createdAt: string;
8266
- operation: "administrativeAreas.create";
8267
- requestData: {
8268
- id: string;
8269
- versionId: string;
8270
- name: string;
8271
- externalId?: string | null | undefined;
8272
- effectiveFrom: string;
8273
- status: string;
8274
- parentId?: string | null | undefined;
8275
- };
8276
8245
  } | {
8277
8246
  id: string;
8278
8247
  clientId: string;
@@ -8405,34 +8374,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8405
8374
  output: void;
8406
8375
  meta: object;
8407
8376
  }>;
8408
- create: import("@trpc/server").TRPCMutationProcedure<{
8409
- input: {
8410
- id?: string | undefined;
8411
- versionId?: string | undefined;
8412
- name: string;
8413
- externalId?: string | null | undefined;
8414
- administrativeAreaId: string | null;
8415
- locationType: string | null;
8416
- effectiveFrom?: string | undefined;
8417
- status?: "active" | "inactive" | undefined;
8418
- };
8419
- output: {
8420
- id: string & import("zod").$brand<"UUID">;
8421
- name: string;
8422
- externalId?: string | null | undefined;
8423
- administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8424
- locationType: string | null;
8425
- status: "active" | "inactive";
8426
- versions: {
8427
- versionId: string & import("zod").$brand<"UUID">;
8428
- effectiveFrom: string;
8429
- name: string;
8430
- externalId?: string | null | undefined;
8431
- status: "active" | "inactive";
8432
- }[];
8433
- };
8434
- meta: import("trpc-to-openapi").OpenApiMeta;
8435
- }>;
8436
8377
  get: import("@trpc/server").TRPCQueryProcedure<{
8437
8378
  input: {
8438
8379
  id: string;
@@ -8807,7 +8748,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8807
8748
  $event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
8808
8749
  };
8809
8750
  }[];
8810
- icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileLock" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
8751
+ icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
8811
8752
  emptyMessage?: {
8812
8753
  id: string;
8813
8754
  defaultMessage: string;
@@ -8879,32 +8820,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8879
8820
  output: void;
8880
8821
  meta: object;
8881
8822
  }>;
8882
- create: import("@trpc/server").TRPCMutationProcedure<{
8883
- input: {
8884
- id?: string | undefined;
8885
- versionId?: string | undefined;
8886
- name: string;
8887
- externalId?: string | null | undefined;
8888
- parentId: string | null;
8889
- effectiveFrom?: string | undefined;
8890
- status?: "active" | "inactive" | undefined;
8891
- };
8892
- output: {
8893
- id: string & import("zod").$brand<"UUID">;
8894
- name: string;
8895
- externalId?: string | null | undefined;
8896
- parentId: (string & import("zod").$brand<"UUID">) | null;
8897
- status: "active" | "inactive";
8898
- versions: {
8899
- versionId: string & import("zod").$brand<"UUID">;
8900
- effectiveFrom: string;
8901
- name: string;
8902
- externalId?: string | null | undefined;
8903
- status: "active" | "inactive";
8904
- }[];
8905
- };
8906
- meta: import("trpc-to-openapi").OpenApiMeta;
8907
- }>;
8908
8823
  }>>;
8909
8824
  integrations: import("@trpc/server").TRPCBuiltRouter<{
8910
8825
  ctx: Partial<{
@@ -85,17 +85,17 @@ export declare const now: typeof todayDateTimeValueSerializer;
85
85
  export declare const user: typeof userSerializer & {
86
86
  scope: (scope: import("../scopes").ScopeType) => {
87
87
  attribute: (option: import("../scopes").ScopeOptionKey) => {
88
- $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
89
- $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
88
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
89
+ $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
90
90
  };
91
91
  };
92
92
  jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
93
- $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
94
- $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
93
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
94
+ $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
95
95
  }) => {
96
96
  $jurisdiction: "administrativeArea" | "all" | "location" | {
97
- $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
98
- $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
97
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
98
+ $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
99
99
  };
100
100
  };
101
101
  hasScope: (scope: string) => JSONSchema;
@@ -14,7 +14,6 @@ import { EventDocument } from '../events/EventDocument';
14
14
  import { EventIndex } from '../events/EventIndex';
15
15
  import { Location } from '../events/locations';
16
16
  import { SystemVariables } from '../events/TemplateConfig';
17
- import { AvailableIcons } from '../icons';
18
17
  /** Returns today's date as an ISO date string (YYYY-MM-DD). */
19
18
  export declare function todayISO(): string;
20
19
  /**
@@ -70,21 +69,13 @@ export declare function validate(schema: JSONSchema, data: ConditionalParameters
70
69
  export declare function validateValue(schema: JSONSchema, data: unknown): boolean;
71
70
  export declare function isOnline(): boolean;
72
71
  export declare function isConditionMet(conditional: JSONSchema, values: EventState | ActionUpdate, context: ValidatorContext): boolean;
73
- export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, FieldValue>, context: ValidatorContext, event: EventIndex): boolean;
74
- /**
75
- * Given an EventConfig's `icon` map (icon name -> conditional) and a real
76
- * event, returns the name of the first icon (in definition order) whose
77
- * conditional matches, or `undefined` if there's no icon config or nothing
78
- * matches — callers should fall back to a default icon in that case.
79
- */
80
- export declare function resolveEventIcon(iconConfig: EventConfig['icon'], event: EventIndex, context: ValidatorContext): AvailableIcons | undefined;
72
+ export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, FieldValue>, context: ValidatorContext, _event: EventIndex): boolean;
81
73
  export type ValidatorContext = {
82
74
  user?: ITokenPayload;
83
75
  leafAdminStructureLocationIds?: Array<{
84
76
  id: UUID;
85
77
  }>;
86
78
  event?: EventDocument;
87
- eventConfig?: EventConfig;
88
79
  baseFormState?: EventState;
89
80
  };
90
81
  export declare function isFieldVisible(field: FieldConfig, form: Partial<ActionUpdate | EventState>, context: ValidatorContext): boolean;
@@ -1,6 +1,5 @@
1
1
  import * as z from 'zod/v4';
2
2
  import { FieldValue, FieldUpdateValue } from './FieldValue';
3
- export { ActionStatus } from './ActionStatus';
4
3
  /**
5
4
  * ActionUpdate is a record of a specific action that updated data fields.
6
5
  */
@@ -11,6 +10,12 @@ export type ActionUpdate = z.infer<typeof ActionUpdate>;
11
10
  */
12
11
  export declare const EventState: z.ZodRecord<z.ZodString, z.ZodType<FieldValue, unknown, z.core.$ZodTypeInternals<FieldValue, unknown>>>;
13
12
  export type EventState = z.infer<typeof EventState>;
13
+ export declare const ActionStatus: {
14
+ readonly Requested: 'Requested';
15
+ readonly Accepted: 'Accepted';
16
+ readonly Rejected: 'Rejected';
17
+ };
18
+ export type ActionStatus = keyof typeof ActionStatus;
14
19
  export declare const ActionBase: z.ZodObject<{
15
20
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
16
21
  transactionId: z.ZodString;
@@ -1168,4 +1173,5 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
1168
1173
  export type Action = z.infer<typeof Action>;
1169
1174
  export type CreatedAction = z.infer<typeof CreatedAction>;
1170
1175
  export type AssignedAction = z.infer<typeof AssignedAction>;
1176
+ export {};
1171
1177
  //# sourceMappingURL=ActionDocument.d.ts.map
@@ -103,7 +103,6 @@ export declare const FieldConfigSchema: z.ZodObject<{
103
103
  "config.update-all": "config.update-all";
104
104
  "dashboard.view": "dashboard.view";
105
105
  "integration.create": "integration.create";
106
- "location.edit": "location.edit";
107
106
  "organisation.read-locations": "organisation.read-locations";
108
107
  "performance.read": "performance.read";
109
108
  "performance.read-dashboards": "performance.read-dashboards";
@@ -142,7 +141,6 @@ export declare const FieldConfigSchema: z.ZodObject<{
142
141
  declaredBy: "declaredBy";
143
142
  declaredIn: "declaredIn";
144
143
  event: "event";
145
- flags: "flags";
146
144
  ids: "ids";
147
145
  notifiedBy: "notifiedBy";
148
146
  notifiedIn: "notifiedIn";
@@ -285,7 +283,6 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
285
283
  "config.update-all": "config.update-all";
286
284
  "dashboard.view": "dashboard.view";
287
285
  "integration.create": "integration.create";
288
- "location.edit": "location.edit";
289
286
  "organisation.read-locations": "organisation.read-locations";
290
287
  "performance.read": "performance.read";
291
288
  "performance.read-dashboards": "performance.read-dashboards";
@@ -324,7 +321,6 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
324
321
  declaredBy: "declaredBy";
325
322
  declaredIn: "declaredIn";
326
323
  event: "event";
327
- flags: "flags";
328
324
  ids: "ids";
329
325
  notifiedBy: "notifiedBy";
330
326
  notifiedIn: "notifiedIn";
@@ -443,7 +439,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
443
439
  "config.update-all": "config.update-all";
444
440
  "dashboard.view": "dashboard.view";
445
441
  "integration.create": "integration.create";
446
- "location.edit": "location.edit";
447
442
  "organisation.read-locations": "organisation.read-locations";
448
443
  "performance.read": "performance.read";
449
444
  "performance.read-dashboards": "performance.read-dashboards";
@@ -482,7 +477,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
482
477
  declaredBy: "declaredBy";
483
478
  declaredIn: "declaredIn";
484
479
  event: "event";
485
- flags: "flags";
486
480
  ids: "ids";
487
481
  notifiedBy: "notifiedBy";
488
482
  notifiedIn: "notifiedIn";
@@ -593,7 +587,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
593
587
  "config.update-all": "config.update-all";
594
588
  "dashboard.view": "dashboard.view";
595
589
  "integration.create": "integration.create";
596
- "location.edit": "location.edit";
597
590
  "organisation.read-locations": "organisation.read-locations";
598
591
  "performance.read": "performance.read";
599
592
  "performance.read-dashboards": "performance.read-dashboards";
@@ -632,7 +625,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
632
625
  declaredBy: "declaredBy";
633
626
  declaredIn: "declaredIn";
634
627
  event: "event";
635
- flags: "flags";
636
628
  ids: "ids";
637
629
  notifiedBy: "notifiedBy";
638
630
  notifiedIn: "notifiedIn";
@@ -754,7 +746,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
754
746
  "config.update-all": "config.update-all";
755
747
  "dashboard.view": "dashboard.view";
756
748
  "integration.create": "integration.create";
757
- "location.edit": "location.edit";
758
749
  "organisation.read-locations": "organisation.read-locations";
759
750
  "performance.read": "performance.read";
760
751
  "performance.read-dashboards": "performance.read-dashboards";
@@ -793,7 +784,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
793
784
  declaredBy: "declaredBy";
794
785
  declaredIn: "declaredIn";
795
786
  event: "event";
796
- flags: "flags";
797
787
  ids: "ids";
798
788
  notifiedBy: "notifiedBy";
799
789
  notifiedIn: "notifiedIn";
@@ -904,7 +894,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
904
894
  "config.update-all": "config.update-all";
905
895
  "dashboard.view": "dashboard.view";
906
896
  "integration.create": "integration.create";
907
- "location.edit": "location.edit";
908
897
  "organisation.read-locations": "organisation.read-locations";
909
898
  "performance.read": "performance.read";
910
899
  "performance.read-dashboards": "performance.read-dashboards";
@@ -943,7 +932,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
943
932
  declaredBy: "declaredBy";
944
933
  declaredIn: "declaredIn";
945
934
  event: "event";
946
- flags: "flags";
947
935
  ids: "ids";
948
936
  notifiedBy: "notifiedBy";
949
937
  notifiedIn: "notifiedIn";
@@ -281,43 +281,6 @@ export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
281
281
  responseSummary: z.ZodObject<{
282
282
  clientId: z.ZodString;
283
283
  }, z.core.$strip>;
284
- }, z.core.$strip>, z.ZodObject<{
285
- id: z.ZodString;
286
- clientId: z.ZodString;
287
- clientType: z.ZodEnum<{
288
- system: "system";
289
- user: "user";
290
- }>;
291
- createdAt: z.ZodString;
292
- operation: z.ZodLiteral<"locations.create">;
293
- requestData: z.ZodObject<{
294
- id: z.ZodString;
295
- versionId: z.ZodString;
296
- name: z.ZodString;
297
- externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
298
- effectiveFrom: z.ZodString;
299
- status: z.ZodString;
300
- administrativeAreaId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
301
- locationType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
302
- }, z.core.$strip>;
303
- }, z.core.$strip>, z.ZodObject<{
304
- id: z.ZodString;
305
- clientId: z.ZodString;
306
- clientType: z.ZodEnum<{
307
- system: "system";
308
- user: "user";
309
- }>;
310
- createdAt: z.ZodString;
311
- operation: z.ZodLiteral<"administrativeAreas.create">;
312
- requestData: z.ZodObject<{
313
- id: z.ZodString;
314
- versionId: z.ZodString;
315
- name: z.ZodString;
316
- externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
- effectiveFrom: z.ZodString;
318
- status: z.ZodString;
319
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
320
- }, z.core.$strip>;
321
284
  }, z.core.$strip>, z.ZodObject<{
322
285
  id: z.ZodString;
323
286
  clientId: z.ZodString;
@@ -6,8 +6,6 @@ import { AdvancedSearchConfig } from './AdvancedSearchConfig';
6
6
  import { DeclarationFormConfig, DeclarationFormConfigInput } from './FormConfig';
7
7
  import { FieldReference } from './FieldConfig';
8
8
  import { FlagConfig } from './Flag';
9
- import type { JSONSchema } from '../conditionals/conditionals';
10
- import { AvailableIcons } from '../icons';
11
9
  export declare const EventFieldReference: z.ZodObject<{
12
10
  $$event: z.ZodEnum<{
13
11
  createdAt: "createdAt";
@@ -34,7 +32,6 @@ export type EventConfig = {
34
32
  advancedSearch: AdvancedSearchConfig[];
35
33
  flags: FlagConfig[];
36
34
  analytics: boolean;
37
- icon?: Partial<Record<AvailableIcons, JSONSchema>>;
38
35
  };
39
36
  export type EventConfigInput = Omit<EventConfig, 'advancedSearch' | 'flags' | 'declaration' | 'actions' | 'dateOfEvent' | 'placeOfEvent' | 'analytics'> & {
40
37
  dateOfEvent?: z.input<typeof FieldReference> | z.infer<typeof EventFieldReference>;
@@ -1,5 +1,4 @@
1
1
  import { z, ZodType } from 'zod/v4';
2
- export { ContainsFlags } from './Flag';
3
2
  export declare const EventIndex: z.ZodObject<{
4
3
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
5
4
  type: z.ZodString;
@@ -124,6 +123,29 @@ export declare const Range: z.ZodObject<{
124
123
  gte: z.ZodString;
125
124
  lte: z.ZodString;
126
125
  }, z.core.$strip>;
126
+ export declare const ContainsFlags: z.ZodObject<{
127
+ anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
128
+ readonly INCOMPLETE: 'incomplete';
129
+ readonly REJECTED: 'rejected';
130
+ readonly CORRECTION_REQUESTED: 'correction-requested';
131
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
132
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
133
+ }>]>, z.ZodString]>>>;
134
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
135
+ readonly INCOMPLETE: 'incomplete';
136
+ readonly REJECTED: 'rejected';
137
+ readonly CORRECTION_REQUESTED: 'correction-requested';
138
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
139
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
140
+ }>]>, z.ZodString]>>>;
141
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
142
+ readonly INCOMPLETE: 'incomplete';
143
+ readonly REJECTED: 'rejected';
144
+ readonly CORRECTION_REQUESTED: 'correction-requested';
145
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
146
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
147
+ }>]>, z.ZodString]>>>;
148
+ }, z.core.$strip>;
127
149
  export declare const Within: z.ZodObject<{
128
150
  type: z.ZodLiteral<"within">;
129
151
  location: z.ZodString;
@@ -332,4 +354,5 @@ export declare const SearchQuery: z.ZodObject<{
332
354
  export type SearchQuery = z.infer<typeof SearchQuery>;
333
355
  export type QueryType = z.infer<typeof QueryType>;
334
356
  export type QueryExpression = z.infer<typeof QueryExpression>;
357
+ export {};
335
358
  //# sourceMappingURL=EventIndex.d.ts.map
@@ -1883,7 +1883,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
1883
1883
  "config.update-all": "config.update-all";
1884
1884
  "dashboard.view": "dashboard.view";
1885
1885
  "integration.create": "integration.create";
1886
- "location.edit": "location.edit";
1887
1886
  "organisation.read-locations": "organisation.read-locations";
1888
1887
  "performance.read": "performance.read";
1889
1888
  "performance.read-dashboards": "performance.read-dashboards";
@@ -1922,7 +1921,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
1922
1921
  declaredBy: "declaredBy";
1923
1922
  declaredIn: "declaredIn";
1924
1923
  event: "event";
1925
- flags: "flags";
1926
1924
  ids: "ids";
1927
1925
  notifiedBy: "notifiedBy";
1928
1926
  notifiedIn: "notifiedIn";
@@ -2014,7 +2012,6 @@ declare const LocationInput: z.ZodObject<{
2014
2012
  "config.update-all": "config.update-all";
2015
2013
  "dashboard.view": "dashboard.view";
2016
2014
  "integration.create": "integration.create";
2017
- "location.edit": "location.edit";
2018
2015
  "organisation.read-locations": "organisation.read-locations";
2019
2016
  "performance.read": "performance.read";
2020
2017
  "performance.read-dashboards": "performance.read-dashboards";
@@ -2053,7 +2050,6 @@ declare const LocationInput: z.ZodObject<{
2053
2050
  declaredBy: "declaredBy";
2054
2051
  declaredIn: "declaredIn";
2055
2052
  event: "event";
2056
- flags: "flags";
2057
2053
  ids: "ids";
2058
2054
  notifiedBy: "notifiedBy";
2059
2055
  notifiedIn: "notifiedIn";
@@ -2216,7 +2212,6 @@ declare const Facility: z.ZodObject<{
2216
2212
  "config.update-all": "config.update-all";
2217
2213
  "dashboard.view": "dashboard.view";
2218
2214
  "integration.create": "integration.create";
2219
- "location.edit": "location.edit";
2220
2215
  "organisation.read-locations": "organisation.read-locations";
2221
2216
  "performance.read": "performance.read";
2222
2217
  "performance.read-dashboards": "performance.read-dashboards";
@@ -2255,7 +2250,6 @@ declare const Facility: z.ZodObject<{
2255
2250
  declaredBy: "declaredBy";
2256
2251
  declaredIn: "declaredIn";
2257
2252
  event: "event";
2258
- flags: "flags";
2259
2253
  ids: "ids";
2260
2254
  notifiedBy: "notifiedBy";
2261
2255
  notifiedIn: "notifiedIn";
@@ -2333,7 +2327,6 @@ declare const Office: z.ZodObject<{
2333
2327
  "config.update-all": "config.update-all";
2334
2328
  "dashboard.view": "dashboard.view";
2335
2329
  "integration.create": "integration.create";
2336
- "location.edit": "location.edit";
2337
2330
  "organisation.read-locations": "organisation.read-locations";
2338
2331
  "performance.read": "performance.read";
2339
2332
  "performance.read-dashboards": "performance.read-dashboards";
@@ -2372,7 +2365,6 @@ declare const Office: z.ZodObject<{
2372
2365
  declaredBy: "declaredBy";
2373
2366
  declaredIn: "declaredIn";
2374
2367
  event: "event";
2375
- flags: "flags";
2376
2368
  ids: "ids";
2377
2369
  notifiedBy: "notifiedBy";
2378
2370
  notifiedIn: "notifiedIn";
@@ -2536,7 +2528,6 @@ declare const Address: z.ZodObject<{
2536
2528
  "config.update-all": "config.update-all";
2537
2529
  "dashboard.view": "dashboard.view";
2538
2530
  "integration.create": "integration.create";
2539
- "location.edit": "location.edit";
2540
2531
  "organisation.read-locations": "organisation.read-locations";
2541
2532
  "performance.read": "performance.read";
2542
2533
  "performance.read-dashboards": "performance.read-dashboards";
@@ -2575,7 +2566,6 @@ declare const Address: z.ZodObject<{
2575
2566
  declaredBy: "declaredBy";
2576
2567
  declaredIn: "declaredIn";
2577
2568
  event: "event";
2578
- flags: "flags";
2579
2569
  ids: "ids";
2580
2570
  notifiedBy: "notifiedBy";
2581
2571
  notifiedIn: "notifiedIn";
@@ -29,20 +29,20 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
29
29
  }> | z.ZodNumber | z.ZodObject<Readonly<{
30
30
  [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
31
31
  }>, z.core.$strip> | z.ZodObject<{
32
+ age: z.ZodNumber;
33
+ asOfDateRef: z.ZodString;
34
+ }, z.core.$strip> | z.ZodObject<{
35
+ numericValue: z.ZodOptional<z.ZodNumber>;
36
+ unit: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip> | z.ZodObject<{
32
38
  path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
33
39
  originalFilename: z.ZodString;
34
40
  type: z.ZodString;
35
- }, z.core.$strip> | z.ZodObject<{
36
- numericValue: z.ZodNumber;
37
- unit: z.ZodString;
38
41
  }, z.core.$strip> | z.ZodObject<{
39
42
  data: z.ZodAny;
40
43
  }, z.core.$strip> | z.ZodObject<{
41
- age: z.ZodNumber;
42
- asOfDateRef: z.ZodString;
43
- }, z.core.$strip> | z.ZodObject<{
44
- numericValue: z.ZodOptional<z.ZodNumber>;
45
- unit: z.ZodOptional<z.ZodString>;
44
+ numericValue: z.ZodNumber;
45
+ unit: z.ZodString;
46
46
  }, z.core.$strip> | z.ZodObject<{
47
47
  label: z.ZodString;
48
48
  value: z.ZodString;
@@ -65,20 +65,20 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
65
65
  }>>> | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodObject<Readonly<{
66
66
  [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
67
67
  }>, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
68
+ age: z.ZodNumber;
69
+ asOfDateRef: z.ZodString;
70
+ }, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
71
+ numericValue: z.ZodOptional<z.ZodNumber>;
72
+ unit: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
68
74
  path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
69
75
  originalFilename: z.ZodString;
70
76
  type: z.ZodString;
71
- }, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
72
- numericValue: z.ZodNumber;
73
- unit: z.ZodString;
74
77
  }, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
75
78
  data: z.ZodAny;
76
79
  }, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
77
- age: z.ZodNumber;
78
- asOfDateRef: z.ZodString;
79
- }, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
80
- numericValue: z.ZodOptional<z.ZodNumber>;
81
- unit: z.ZodOptional<z.ZodString>;
80
+ numericValue: z.ZodNumber;
81
+ unit: z.ZodString;
82
82
  }, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
83
83
  label: z.ZodString;
84
84
  value: z.ZodString;
@@ -243,15 +243,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
243
243
  }, z.core.$strip>>>;
244
244
  data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
245
245
  }, z.core.$strip>, z.ZodNull]>, z.ZodUndefined]>>> | z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUnknown, "CustomFieldValue", "out">>> | z.ZodString | z.ZodType<{
246
- country: string;
247
- streetLevelDetails?: Record<string, string> | undefined;
248
- addressType: "DOMESTIC";
249
- administrativeArea: string;
250
- } | {
251
- country: string;
252
- streetLevelDetails?: Record<string, string> | undefined;
253
- addressType: "INTERNATIONAL";
254
- } | {
255
246
  country?: string | null | undefined;
256
247
  streetLevelDetails?: Record<string, string | null> | null | undefined;
257
248
  addressType: "DOMESTIC";
@@ -260,7 +251,7 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
260
251
  country?: string | null | undefined;
261
252
  streetLevelDetails?: Record<string, string | null> | null | undefined;
262
253
  addressType: "INTERNATIONAL";
263
- } | null | undefined, unknown, z.core.$ZodTypeInternals<{
254
+ } | {
264
255
  country: string;
265
256
  streetLevelDetails?: Record<string, string> | undefined;
266
257
  addressType: "DOMESTIC";
@@ -269,7 +260,7 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
269
260
  country: string;
270
261
  streetLevelDetails?: Record<string, string> | undefined;
271
262
  addressType: "INTERNATIONAL";
272
- } | {
263
+ } | null | undefined, unknown, z.core.$ZodTypeInternals<{
273
264
  country?: string | null | undefined;
274
265
  streetLevelDetails?: Record<string, string | null> | null | undefined;
275
266
  addressType: "DOMESTIC";
@@ -278,6 +269,15 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
278
269
  country?: string | null | undefined;
279
270
  streetLevelDetails?: Record<string, string | null> | null | undefined;
280
271
  addressType: "INTERNATIONAL";
272
+ } | {
273
+ country: string;
274
+ streetLevelDetails?: Record<string, string> | undefined;
275
+ addressType: "DOMESTIC";
276
+ administrativeArea: string;
277
+ } | {
278
+ country: string;
279
+ streetLevelDetails?: Record<string, string> | undefined;
280
+ addressType: "INTERNATIONAL";
281
281
  } | null | undefined, unknown>> | z.ZodUnion<[z.ZodObject<{
282
282
  start: z.core.$ZodBranded<z.ZodString, "PlainDate", "out">;
283
283
  end: z.core.$ZodBranded<z.ZodString, "PlainDate", "out">;