@opencrvs/toolkit 2.1.0-rc.93572dd → 2.1.0-rc.954dd73

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.
@@ -32,6 +32,48 @@ export declare const Flag: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
32
32
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
33
33
  }>]>, z.ZodString]>;
34
34
  export type Flag = z.infer<typeof Flag>;
35
+ export declare const ContainsFlags: z.ZodObject<{
36
+ anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
37
+ readonly INCOMPLETE: 'incomplete';
38
+ readonly REJECTED: 'rejected';
39
+ readonly CORRECTION_REQUESTED: 'correction-requested';
40
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
41
+ /**
42
+ * This flag is set by the Edit-action and removed after the declaration or registration.
43
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
44
+ *
45
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
46
+ */
47
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
48
+ }>]>, z.ZodString]>>>;
49
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
50
+ readonly INCOMPLETE: 'incomplete';
51
+ readonly REJECTED: 'rejected';
52
+ readonly CORRECTION_REQUESTED: 'correction-requested';
53
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
54
+ /**
55
+ * This flag is set by the Edit-action and removed after the declaration or registration.
56
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
57
+ *
58
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
59
+ */
60
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
61
+ }>]>, z.ZodString]>>>;
62
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
63
+ readonly INCOMPLETE: 'incomplete';
64
+ readonly REJECTED: 'rejected';
65
+ readonly CORRECTION_REQUESTED: 'correction-requested';
66
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
67
+ /**
68
+ * This flag is set by the Edit-action and removed after the declaration or registration.
69
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
70
+ *
71
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
72
+ */
73
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
74
+ }>]>, z.ZodString]>>>;
75
+ }, z.core.$strip>;
76
+ export type ContainsFlags = z.infer<typeof ContainsFlags>;
35
77
  /**
36
78
  * Configuration of a custom flag that can be associated with a certain event type.
37
79
  */
@@ -737,6 +737,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
737
737
  File: "File";
738
738
  FileArrowUp: "FileArrowUp";
739
739
  FileDotted: "FileDotted";
740
+ FileLock: "FileLock";
740
741
  FileMinus: "FileMinus";
741
742
  FilePlus: "FilePlus";
742
743
  FileSearch: "FileSearch";
@@ -862,6 +863,7 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
862
863
  File: "File";
863
864
  FileArrowUp: "FileArrowUp";
864
865
  FileDotted: "FileDotted";
866
+ FileLock: "FileLock";
865
867
  FileMinus: "FileMinus";
866
868
  FilePlus: "FilePlus";
867
869
  FileSearch: "FileSearch";
@@ -1013,6 +1015,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1013
1015
  File: "File";
1014
1016
  FileArrowUp: "FileArrowUp";
1015
1017
  FileDotted: "FileDotted";
1018
+ FileLock: "FileLock";
1016
1019
  FileMinus: "FileMinus";
1017
1020
  FilePlus: "FilePlus";
1018
1021
  FileSearch: "FileSearch";
@@ -2038,11 +2041,11 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2038
2041
  clauses: {
2039
2042
  eventType?: string | undefined;
2040
2043
  status?: {
2041
- type: "anyOf";
2042
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2043
- } | {
2044
2044
  type: "exact";
2045
2045
  term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2046
+ } | {
2047
+ type: "anyOf";
2048
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2046
2049
  } | undefined;
2047
2050
  createdAt?: {
2048
2051
  type: "range";
@@ -2177,11 +2180,11 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2177
2180
  clauses: {
2178
2181
  eventType?: string | undefined;
2179
2182
  status?: {
2180
- type: "anyOf";
2181
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2182
- } | {
2183
2183
  type: "exact";
2184
2184
  term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2185
+ } | {
2186
+ type: "anyOf";
2187
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2185
2188
  } | undefined;
2186
2189
  createdAt?: {
2187
2190
  type: "range";
@@ -2325,7 +2328,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2325
2328
  $event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
2326
2329
  };
2327
2330
  }[];
2328
- 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";
2331
+ 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";
2329
2332
  emptyMessage?: {
2330
2333
  id: string;
2331
2334
  defaultMessage: string;
@@ -2349,11 +2352,11 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2349
2352
  clauses: {
2350
2353
  eventType?: string | undefined;
2351
2354
  status?: {
2352
- type: "anyOf";
2353
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2354
- } | {
2355
2355
  type: "exact";
2356
2356
  term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2357
+ } | {
2358
+ type: "anyOf";
2359
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2357
2360
  } | undefined;
2358
2361
  createdAt?: {
2359
2362
  type: "range";
@@ -2488,11 +2491,11 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2488
2491
  clauses: {
2489
2492
  eventType?: string | undefined;
2490
2493
  status?: {
2491
- type: "anyOf";
2492
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2493
- } | {
2494
2494
  type: "exact";
2495
2495
  term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2496
+ } | {
2497
+ type: "anyOf";
2498
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2496
2499
  } | undefined;
2497
2500
  createdAt?: {
2498
2501
  type: "range";
@@ -2636,7 +2639,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2636
2639
  $event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
2637
2640
  };
2638
2641
  }[];
2639
- 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";
2642
+ 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";
2640
2643
  emptyMessage?: {
2641
2644
  id: string;
2642
2645
  defaultMessage: string;
@@ -1,6 +1,8 @@
1
1
  import { NonSearchableEventMetadataTimeFieldIdInput, AdvancedSearchConfig } from '../event-config/event-configuration';
2
2
  import { ActionType } from './ActionType';
3
3
  import { EventFieldIdInput } from './AdvancedSearchConfig';
4
+ import { EventStatus } from './EventMetadata';
5
+ import { Flag } from './Flag';
4
6
  import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConfig';
5
7
  /**
6
8
  * Creates a function that acts like a callable + static method container.
@@ -75,6 +77,16 @@ declare const event: typeof eventFn & {
75
77
  };
76
78
  };
77
79
  field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
80
+ /**
81
+ * Checks if the event currently has the given status.
82
+ * @param eventStatus - The status to check for.
83
+ */
84
+ hasStatus: (eventStatus: EventStatus) => import("../conditionals/conditionals").JSONSchema;
85
+ /**
86
+ * Checks if the event currently carries the given flag.
87
+ * @param flagValue - The flag to check for.
88
+ */
89
+ hasFlag: (flagValue: Flag) => import("../conditionals/conditionals").JSONSchema;
78
90
  };
79
91
  export { event };
80
92
  //# sourceMappingURL=event.d.ts.map
@@ -45,6 +45,7 @@ export * from './field';
45
45
  export * from './Flag';
46
46
  export * from './event';
47
47
  export * from './locations';
48
+ export * from './locationPayloads';
48
49
  export { UUID } from '../uuid';
49
50
  export { DocumentPath } from '../documents';
50
51
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,95 @@
1
+ import * as z from 'zod/v4';
2
+ /**
3
+ * Input payload for creating a location: the identity fields (parent and
4
+ * locationType are set once, immutable thereafter) plus the first version.
5
+ * `id` and `versionId` may be supplied by the caller for idempotent retries.
6
+ * `effectiveFrom` defaults to the beginning-of-time sentinel on the server.
7
+ */
8
+ export declare const CreateLocationPayload: z.ZodObject<{
9
+ id: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
10
+ versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
11
+ name: z.ZodString;
12
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
14
+ locationType: z.ZodNullable<z.ZodString>;
15
+ effectiveFrom: z.ZodOptional<z.ZodISODate>;
16
+ status: z.ZodDefault<z.ZodEnum<{
17
+ active: "active";
18
+ inactive: "inactive";
19
+ }>>;
20
+ }, z.core.$strip>;
21
+ export type CreateLocationPayload = z.infer<typeof CreateLocationPayload>;
22
+ /**
23
+ * Input payload for appending a new version to a location. A full snapshot of
24
+ * every versioned field is required — omitted does not mean unchanged. The
25
+ * schema is strict: identity fields (`administrativeAreaId`, `locationType`)
26
+ * are rejected rather than ignored, as they cannot change. `lastVersionId`
27
+ * is the optimistic-concurrency check: it must be the id of the last element
28
+ * the caller observed. `effectiveFrom` defaults to today on the server;
29
+ * supply it explicitly for idempotent retries.
30
+ */
31
+ export declare const UpdateLocationPayload: z.ZodObject<{
32
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
33
+ versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
34
+ name: z.ZodString;
35
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ status: z.ZodEnum<{
37
+ active: "active";
38
+ inactive: "inactive";
39
+ }>;
40
+ effectiveFrom: z.ZodOptional<z.ZodISODate>;
41
+ lastVersionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
42
+ }, z.core.$strict>;
43
+ export type UpdateLocationPayload = z.infer<typeof UpdateLocationPayload>;
44
+ /**
45
+ * Input payload for withdrawing a pending (future-dated) version element.
46
+ * Only elements whose `effectiveFrom` has not yet passed can be withdrawn.
47
+ */
48
+ export declare const WithdrawLocationVersionPayload: z.ZodObject<{
49
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
50
+ versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
51
+ }, z.core.$strip>;
52
+ export type WithdrawLocationVersionPayload = z.infer<typeof WithdrawLocationVersionPayload>;
53
+ /**
54
+ * Administrative-area twin of {@link CreateLocationPayload}: `parentId`
55
+ * instead of `administrativeAreaId`, no `locationType`.
56
+ */
57
+ export declare const CreateAdministrativeAreaPayload: z.ZodObject<{
58
+ id: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
59
+ versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
60
+ name: z.ZodString;
61
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
63
+ effectiveFrom: z.ZodOptional<z.ZodISODate>;
64
+ status: z.ZodDefault<z.ZodEnum<{
65
+ active: "active";
66
+ inactive: "inactive";
67
+ }>>;
68
+ }, z.core.$strip>;
69
+ export type CreateAdministrativeAreaPayload = z.infer<typeof CreateAdministrativeAreaPayload>;
70
+ /**
71
+ * Administrative-area twin of {@link UpdateLocationPayload} — strict for the
72
+ * same reason: the identity field (`parentId`) is rejected, not ignored.
73
+ */
74
+ export declare const UpdateAdministrativeAreaPayload: z.ZodObject<{
75
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
76
+ versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
77
+ name: z.ZodString;
78
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ status: z.ZodEnum<{
80
+ active: "active";
81
+ inactive: "inactive";
82
+ }>;
83
+ effectiveFrom: z.ZodOptional<z.ZodISODate>;
84
+ lastVersionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
85
+ }, z.core.$strict>;
86
+ export type UpdateAdministrativeAreaPayload = z.infer<typeof UpdateAdministrativeAreaPayload>;
87
+ /**
88
+ * Administrative-area twin of {@link WithdrawLocationVersionPayload}.
89
+ */
90
+ export declare const WithdrawAdministrativeAreaVersionPayload: z.ZodObject<{
91
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
92
+ versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
93
+ }, z.core.$strip>;
94
+ export type WithdrawAdministrativeAreaVersionPayload = z.infer<typeof WithdrawAdministrativeAreaVersionPayload>;
95
+ //# sourceMappingURL=locationPayloads.d.ts.map
@@ -111,6 +111,13 @@ export type SetAdministrativeAreaPayload = z.infer<typeof SetAdministrativeAreaP
111
111
  export declare function resolveVersion<T extends {
112
112
  effectiveFrom: string;
113
113
  }>(versions: T[], anchor: string): T;
114
+ /**
115
+ * Whether the entity holds the given externalId with active status at the
116
+ * anchor date or at any point after it. Used for point-in-time uniqueness of
117
+ * external codes: a new holder starting at `anchor` collides when an existing
118
+ * holder is (or is scheduled to be) active with the code from then on.
119
+ */
120
+ export declare function hasActiveExternalIdOnOrAfter(versions: LocationVersion[], externalId: string, anchor: string): boolean;
114
121
  type WrapArrayPreserveNullish<V> = V extends readonly any[] ? V : NonNullable<V>[] | Extract<V, null | undefined>;
115
122
  /**
116
123
  * For type T, convert fields K to arrays. If field is string, convert to string[].