@opencrvs/toolkit 2.1.0-rc.97151f8 → 2.1.0-rc.976ee09

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.
@@ -989,9 +989,10 @@ var NotifiedAction = ActionBase.extend(
989
989
  var EditAction = ActionBase.extend(
990
990
  z13.object({
991
991
  type: z13.literal(ActionType.EDIT),
992
+ /** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
992
993
  content: z13.object({
993
994
  comment: z13.string().describe("Comment for the edit action.").optional()
994
- })
995
+ }).optional()
995
996
  }).shape
996
997
  );
997
998
  var PrintContent = z13.object({
@@ -407,9 +407,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
407
407
  status: "Accepted" | "Rejected" | "Requested";
408
408
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
409
409
  type: "EDIT";
410
- content: {
410
+ content?: {
411
411
  comment?: string | undefined;
412
- };
412
+ } | undefined;
413
413
  } | {
414
414
  id: string & import("zod").$brand<"UUID">;
415
415
  transactionId: string;
@@ -733,9 +733,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
733
733
  status: "Accepted" | "Rejected" | "Requested";
734
734
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
735
735
  type: "EDIT";
736
- content: {
736
+ content?: {
737
737
  comment?: string | undefined;
738
- };
738
+ } | undefined;
739
739
  } | {
740
740
  id: string & import("zod").$brand<"UUID">;
741
741
  transactionId: string;
@@ -1058,9 +1058,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1058
1058
  status: "Accepted" | "Rejected" | "Requested";
1059
1059
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1060
1060
  type: "EDIT";
1061
- content: {
1061
+ content?: {
1062
1062
  comment?: string | undefined;
1063
- };
1063
+ } | undefined;
1064
1064
  } | {
1065
1065
  id: string & import("zod").$brand<"UUID">;
1066
1066
  transactionId: string;
@@ -1491,9 +1491,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1491
1491
  waitFor?: boolean | undefined;
1492
1492
  createdAtLocation?: string | null | undefined;
1493
1493
  type?: "EDIT" | undefined;
1494
- content: {
1495
- comment?: string | undefined;
1496
- };
1497
1494
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
1498
1495
  actionId: string;
1499
1496
  };
@@ -1832,9 +1829,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1832
1829
  status: "Accepted" | "Rejected" | "Requested";
1833
1830
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1834
1831
  type: "EDIT";
1835
- content: {
1832
+ content?: {
1836
1833
  comment?: string | undefined;
1837
- };
1834
+ } | undefined;
1838
1835
  } | {
1839
1836
  id: string & import("zod").$brand<"UUID">;
1840
1837
  transactionId: string;
@@ -2149,9 +2146,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2149
2146
  waitFor?: boolean | undefined;
2150
2147
  createdAtLocation?: string | null | undefined;
2151
2148
  type?: "EDIT" | undefined;
2152
- content: {
2153
- comment?: string | undefined;
2154
- };
2155
2149
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2156
2150
  actionId: string;
2157
2151
  };
@@ -2468,9 +2462,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2468
2462
  status: "Accepted" | "Rejected" | "Requested";
2469
2463
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
2470
2464
  type: "EDIT";
2471
- content: {
2465
+ content?: {
2472
2466
  comment?: string | undefined;
2473
- };
2467
+ } | undefined;
2474
2468
  } | {
2475
2469
  id: string & import("zod").$brand<"UUID">;
2476
2470
  transactionId: string;
@@ -2790,9 +2784,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2790
2784
  waitFor?: boolean | undefined;
2791
2785
  createdAtLocation?: string | null | undefined;
2792
2786
  type?: "EDIT" | undefined;
2793
- content: {
2794
- comment?: string | undefined;
2795
- };
2796
2787
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2797
2788
  actionId: string;
2798
2789
  };
@@ -3097,9 +3088,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3097
3088
  waitFor?: boolean | undefined;
3098
3089
  createdAtLocation?: string | null | undefined;
3099
3090
  type?: "EDIT" | undefined;
3100
- content: {
3101
- comment?: string | undefined;
3102
- };
3103
3091
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
3104
3092
  actionId: string;
3105
3093
  };
@@ -3404,9 +3392,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3404
3392
  waitFor?: boolean | undefined;
3405
3393
  createdAtLocation?: string | null | undefined;
3406
3394
  type?: "EDIT" | undefined;
3407
- content: {
3408
- comment?: string | undefined;
3409
- };
3410
3395
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
3411
3396
  actionId: string;
3412
3397
  };
@@ -3711,9 +3696,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3711
3696
  waitFor?: boolean | undefined;
3712
3697
  createdAtLocation?: string | null | undefined;
3713
3698
  type?: "EDIT" | undefined;
3714
- content: {
3715
- comment?: string | undefined;
3716
- };
3717
3699
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
3718
3700
  actionId: string;
3719
3701
  };
@@ -4018,9 +4000,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4018
4000
  waitFor?: boolean | undefined;
4019
4001
  createdAtLocation?: string | null | undefined;
4020
4002
  type?: "EDIT" | undefined;
4021
- content: {
4022
- comment?: string | undefined;
4023
- };
4024
4003
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
4025
4004
  actionId: string;
4026
4005
  };
@@ -4325,9 +4304,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4325
4304
  waitFor?: boolean | undefined;
4326
4305
  createdAtLocation?: string | null | undefined;
4327
4306
  type?: "EDIT" | undefined;
4328
- content: {
4329
- comment?: string | undefined;
4330
- };
4331
4307
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
4332
4308
  actionId: string;
4333
4309
  };
@@ -4627,9 +4603,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4627
4603
  waitFor?: boolean | undefined;
4628
4604
  createdAtLocation?: string | null | undefined;
4629
4605
  type?: "EDIT" | undefined;
4630
- content: {
4631
- comment?: string | undefined;
4632
- };
4633
4606
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
4634
4607
  actionId: string;
4635
4608
  };
@@ -4947,9 +4920,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4947
4920
  status: "Accepted" | "Rejected" | "Requested";
4948
4921
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
4949
4922
  type: "EDIT";
4950
- content: {
4923
+ content?: {
4951
4924
  comment?: string | undefined;
4952
- };
4925
+ } | undefined;
4953
4926
  } | {
4954
4927
  id: string & import("zod").$brand<"UUID">;
4955
4928
  transactionId: string;
@@ -5305,9 +5278,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5305
5278
  status: "Accepted" | "Rejected" | "Requested";
5306
5279
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5307
5280
  type: "EDIT";
5308
- content: {
5281
+ content?: {
5309
5282
  comment?: string | undefined;
5310
- };
5283
+ } | undefined;
5311
5284
  } | {
5312
5285
  id: string & import("zod").$brand<"UUID">;
5313
5286
  transactionId: string;
@@ -5640,9 +5613,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5640
5613
  status: "Accepted" | "Rejected" | "Requested";
5641
5614
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5642
5615
  type: "EDIT";
5643
- content: {
5616
+ content?: {
5644
5617
  comment?: string | undefined;
5645
- };
5618
+ } | undefined;
5646
5619
  } | {
5647
5620
  id: string & import("zod").$brand<"UUID">;
5648
5621
  transactionId: string;
@@ -5984,9 +5957,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5984
5957
  waitFor?: boolean | undefined;
5985
5958
  createdAtLocation?: string | null | undefined;
5986
5959
  type?: "EDIT" | undefined;
5987
- content: {
5988
- comment?: string | undefined;
5989
- };
5990
5960
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
5991
5961
  actionId: string;
5992
5962
  };
@@ -6291,9 +6261,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6291
6261
  waitFor?: boolean | undefined;
6292
6262
  createdAtLocation?: string | null | undefined;
6293
6263
  type?: "EDIT" | undefined;
6294
- content: {
6295
- comment?: string | undefined;
6296
- };
6297
6264
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
6298
6265
  actionId: string;
6299
6266
  };
@@ -6598,9 +6565,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6598
6565
  waitFor?: boolean | undefined;
6599
6566
  createdAtLocation?: string | null | undefined;
6600
6567
  type?: "EDIT" | undefined;
6601
- content: {
6602
- comment?: string | undefined;
6603
- };
6604
6568
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
6605
6569
  actionId: string;
6606
6570
  };
@@ -6944,9 +6908,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6944
6908
  status: "Accepted" | "Rejected" | "Requested";
6945
6909
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
6946
6910
  type: "EDIT";
6947
- content: {
6911
+ content?: {
6948
6912
  comment?: string | undefined;
6949
- };
6913
+ } | undefined;
6950
6914
  } | {
6951
6915
  id: string & import("zod").$brand<"UUID">;
6952
6916
  transactionId: string;
@@ -7278,9 +7242,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7278
7242
  status: "Accepted" | "Rejected" | "Requested";
7279
7243
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
7280
7244
  type: "EDIT";
7281
- content: {
7245
+ content?: {
7282
7246
  comment?: string | undefined;
7283
- };
7247
+ } | undefined;
7284
7248
  } | {
7285
7249
  id: string & import("zod").$brand<"UUID">;
7286
7250
  transactionId: string;
@@ -7663,9 +7627,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7663
7627
  status: "Accepted" | "Rejected" | "Requested";
7664
7628
  originalActionId?: string | null | undefined;
7665
7629
  type: "EDIT";
7666
- content: {
7630
+ content?: {
7667
7631
  comment?: string | undefined;
7668
- };
7632
+ } | undefined;
7669
7633
  } | {
7670
7634
  id: string;
7671
7635
  transactionId: string;
@@ -8387,8 +8351,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8387
8351
  name: string;
8388
8352
  externalId?: string | null | undefined;
8389
8353
  administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8390
- validUntil: string | null;
8391
8354
  locationType: string | null;
8355
+ status: "active" | "inactive";
8356
+ versions: {
8357
+ versionId: string & import("zod").$brand<"UUID">;
8358
+ effectiveFrom: string;
8359
+ name: string;
8360
+ externalId?: string | null | undefined;
8361
+ status: "active" | "inactive";
8362
+ }[];
8392
8363
  }[];
8393
8364
  meta: object;
8394
8365
  }>;
@@ -8398,7 +8369,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8398
8369
  name: string;
8399
8370
  externalId?: string | null | undefined;
8400
8371
  administrativeAreaId: string | null;
8401
- validUntil: string | null;
8402
8372
  locationType: string | null;
8403
8373
  }[];
8404
8374
  output: void;
@@ -8413,8 +8383,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8413
8383
  name: string;
8414
8384
  externalId?: string | null | undefined;
8415
8385
  administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8416
- validUntil: string | null;
8417
8386
  locationType: string | null;
8387
+ status: "active" | "inactive";
8388
+ versions: {
8389
+ versionId: string & import("zod").$brand<"UUID">;
8390
+ effectiveFrom: string;
8391
+ name: string;
8392
+ externalId?: string | null | undefined;
8393
+ status: "active" | "inactive";
8394
+ }[];
8418
8395
  };
8419
8396
  meta: import("trpc-to-openapi").OpenApiMeta;
8420
8397
  }>;
@@ -8822,7 +8799,14 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8822
8799
  name: string;
8823
8800
  externalId?: string | null | undefined;
8824
8801
  parentId: (string & import("zod").$brand<"UUID">) | null;
8825
- validUntil: string | null;
8802
+ status: "active" | "inactive";
8803
+ versions: {
8804
+ versionId: string & import("zod").$brand<"UUID">;
8805
+ effectiveFrom: string;
8806
+ name: string;
8807
+ externalId?: string | null | undefined;
8808
+ status: "active" | "inactive";
8809
+ }[];
8826
8810
  }[];
8827
8811
  meta: import("trpc-to-openapi").OpenApiMeta;
8828
8812
  }>;
@@ -8832,7 +8816,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8832
8816
  name: string;
8833
8817
  externalId?: string | null | undefined;
8834
8818
  parentId: string | null;
8835
- validUntil: string | null;
8836
8819
  }[];
8837
8820
  output: void;
8838
8821
  meta: object;
@@ -165,9 +165,9 @@ declare const EditAction: z.ZodObject<{
165
165
  }>;
166
166
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
167
167
  type: z.ZodLiteral<"EDIT">;
168
- content: z.ZodObject<{
168
+ content: z.ZodOptional<z.ZodObject<{
169
169
  comment: z.ZodOptional<z.ZodString>;
170
- }, z.core.$strip>;
170
+ }, z.core.$strip>>;
171
171
  }, z.core.$strip>;
172
172
  export type EditAction = z.infer<typeof EditAction>;
173
173
  export declare const PrintContent: z.ZodObject<{
@@ -653,9 +653,9 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
653
653
  }>;
654
654
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
655
655
  type: z.ZodLiteral<"EDIT">;
656
- content: z.ZodObject<{
656
+ content: z.ZodOptional<z.ZodObject<{
657
657
  comment: z.ZodOptional<z.ZodString>;
658
- }, z.core.$strip>;
658
+ }, z.core.$strip>>;
659
659
  }, z.core.$strip>, z.ZodObject<{
660
660
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
661
661
  transactionId: z.ZodString;
@@ -1116,9 +1116,9 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
1116
1116
  }>;
1117
1117
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
1118
1118
  type: z.ZodLiteral<"EDIT">;
1119
- content: z.ZodObject<{
1119
+ content: z.ZodOptional<z.ZodObject<{
1120
1120
  comment: z.ZodOptional<z.ZodString>;
1121
- }, z.core.$strip>;
1121
+ }, z.core.$strip>>;
1122
1122
  }, z.core.$strip>, z.ZodObject<{
1123
1123
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
1124
1124
  transactionId: z.ZodString;
@@ -65,9 +65,6 @@ export declare const EditActionInput: z.ZodObject<{
65
65
  waitFor: z.ZodDefault<z.ZodBoolean>;
66
66
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
67
67
  type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
68
- content: z.ZodObject<{
69
- comment: z.ZodOptional<z.ZodString>;
70
- }, z.core.$strip>;
71
68
  }, z.core.$strip>;
72
69
  export type EditActionInput = z.infer<typeof EditActionInput>;
73
70
  export declare const PrintCertificateActionInput: z.ZodObject<{
@@ -564,9 +561,6 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
564
561
  waitFor: z.ZodDefault<z.ZodBoolean>;
565
562
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
566
563
  type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
567
- content: z.ZodObject<{
568
- comment: z.ZodOptional<z.ZodString>;
569
- }, z.core.$strip>;
570
564
  }, z.core.$strip>], "type">;
571
565
  export type ActionInput = z.input<typeof ActionInput>;
572
566
  export type ActionInputWithType = z.infer<typeof ActionInput>;
@@ -410,9 +410,9 @@ export declare const EventDocument: z.ZodObject<{
410
410
  }>;
411
411
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
412
412
  type: z.ZodLiteral<"EDIT">;
413
- content: z.ZodObject<{
413
+ content: z.ZodOptional<z.ZodObject<{
414
414
  comment: z.ZodOptional<z.ZodString>;
415
- }, z.core.$strip>;
415
+ }, z.core.$strip>>;
416
416
  }, z.core.$strip>, z.ZodObject<{
417
417
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
418
418
  transactionId: z.ZodString;
@@ -11,12 +11,46 @@ export declare const LocationTypeV1: z.ZodEnum<{
11
11
  HEALTH_FACILITY: "HEALTH_FACILITY";
12
12
  }>;
13
13
  export type LocationTypeV1 = z.infer<typeof LocationTypeV1>;
14
+ export declare const LocationStatus: z.ZodEnum<{
15
+ active: "active";
16
+ inactive: "inactive";
17
+ }>;
18
+ export type LocationStatus = z.infer<typeof LocationStatus>;
19
+ /**
20
+ * A single element of the append-only `versions` history of a location or
21
+ * administrative area. Versions are sorted ascending by `effectiveFrom`
22
+ * ('0001-01-01' is used as the beginning-of-time sentinel).
23
+ */
24
+ export declare const LocationVersion: z.ZodObject<{
25
+ versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
26
+ effectiveFrom: z.ZodISODate;
27
+ name: z.ZodString;
28
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ status: z.ZodEnum<{
30
+ active: "active";
31
+ inactive: "inactive";
32
+ }>;
33
+ }, z.core.$strip>;
34
+ export type LocationVersion = z.infer<typeof LocationVersion>;
14
35
  export declare const AdministrativeArea: z.ZodObject<{
15
36
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
16
37
  name: z.ZodString;
17
38
  externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
39
  parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
19
- validUntil: z.ZodNullable<z.ZodISODateTime>;
40
+ status: z.ZodEnum<{
41
+ active: "active";
42
+ inactive: "inactive";
43
+ }>;
44
+ versions: z.ZodArray<z.ZodObject<{
45
+ versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
46
+ effectiveFrom: z.ZodISODate;
47
+ name: z.ZodString;
48
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
+ status: z.ZodEnum<{
50
+ active: "active";
51
+ inactive: "inactive";
52
+ }>;
53
+ }, z.core.$strip>>;
20
54
  }, z.core.$strip>;
21
55
  export type AdministrativeArea = z.infer<typeof AdministrativeArea>;
22
56
  export declare const Location: z.ZodObject<{
@@ -24,10 +58,59 @@ export declare const Location: z.ZodObject<{
24
58
  name: z.ZodString;
25
59
  externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
60
  administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
27
- validUntil: z.ZodNullable<z.ZodISODateTime>;
28
61
  locationType: z.ZodNullable<z.ZodString>;
62
+ status: z.ZodEnum<{
63
+ active: "active";
64
+ inactive: "inactive";
65
+ }>;
66
+ versions: z.ZodArray<z.ZodObject<{
67
+ versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
68
+ effectiveFrom: z.ZodISODate;
69
+ name: z.ZodString;
70
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ status: z.ZodEnum<{
72
+ active: "active";
73
+ inactive: "inactive";
74
+ }>;
75
+ }, z.core.$strip>>;
29
76
  }, z.core.$strip>;
30
77
  export type Location = z.infer<typeof Location>;
78
+ /**
79
+ * Input payload for the locations `set` mutation. Carries only the seedable
80
+ * identity and hierarchy fields — version history is managed by the server.
81
+ */
82
+ export declare const SetLocationPayload: z.ZodObject<{
83
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
84
+ name: z.ZodString;
85
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
+ administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
87
+ locationType: z.ZodNullable<z.ZodString>;
88
+ }, z.core.$strip>;
89
+ export type SetLocationPayload = z.infer<typeof SetLocationPayload>;
90
+ /**
91
+ * Input payload for the administrative areas `set` mutation. Carries only the
92
+ * seedable identity and hierarchy fields — version history is managed by the
93
+ * server.
94
+ */
95
+ export declare const SetAdministrativeAreaPayload: z.ZodObject<{
96
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
97
+ name: z.ZodString;
98
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
100
+ }, z.core.$strip>;
101
+ export type SetAdministrativeAreaPayload = z.infer<typeof SetAdministrativeAreaPayload>;
102
+ /**
103
+ * Resolves the version in effect at the given anchor date.
104
+ *
105
+ * Returns the element with the greatest `effectiveFrom` that is less than or
106
+ * equal to `anchor`, falling back to the earliest element when the anchor
107
+ * precedes all versions. Assumes `versions` is sorted ascending by
108
+ * `effectiveFrom`. Both `effectiveFrom` and `anchor` are 'YYYY-MM-DD' strings,
109
+ * so plain string comparison is correct.
110
+ */
111
+ export declare function resolveVersion<T extends {
112
+ effectiveFrom: string;
113
+ }>(versions: T[], anchor: string): T;
31
114
  type WrapArrayPreserveNullish<V> = V extends readonly any[] ? V : NonNullable<V>[] | Extract<V, null | undefined>;
32
115
  /**
33
116
  * For type T, convert fields K to arrays. If field is string, convert to string[].
@@ -79,7 +162,14 @@ export declare function getAdministrativeAreaHierarchy(administrativeAreaId: str
79
162
  name: string;
80
163
  externalId?: string | null | undefined;
81
164
  parentId: (string & z.$brand<"UUID">) | null;
82
- validUntil: string | null;
165
+ status: "active" | "inactive";
166
+ versions: {
167
+ versionId: string & z.$brand<"UUID">;
168
+ effectiveFrom: string;
169
+ name: string;
170
+ externalId?: string | null | undefined;
171
+ status: "active" | "inactive";
172
+ }[];
83
173
  }[];
84
174
  /**
85
175
  * Resolves a location or administrative area UUID into a root-first hierarchy of UUIDs.
@@ -6,14 +6,28 @@ export declare const V2_DEFAULT_MOCK_LOCATIONS_MAP: Map<string & import("zod").$
6
6
  name: string;
7
7
  externalId?: string | null | undefined;
8
8
  administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
9
- validUntil: string | null;
10
9
  locationType: string | null;
10
+ status: "active" | "inactive";
11
+ versions: {
12
+ versionId: string & import("zod").$brand<"UUID">;
13
+ effectiveFrom: string;
14
+ name: string;
15
+ externalId?: string | null | undefined;
16
+ status: "active" | "inactive";
17
+ }[];
11
18
  }>;
12
19
  export declare const V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP: Map<string & import("zod").$brand<"UUID">, {
13
20
  id: string & import("zod").$brand<"UUID">;
14
21
  name: string;
15
22
  externalId?: string | null | undefined;
16
23
  parentId: (string & import("zod").$brand<"UUID">) | null;
17
- validUntil: string | null;
24
+ status: "active" | "inactive";
25
+ versions: {
26
+ versionId: string & import("zod").$brand<"UUID">;
27
+ effectiveFrom: string;
28
+ name: string;
29
+ externalId?: string | null | undefined;
30
+ status: "active" | "inactive";
31
+ }[];
18
32
  }>;
19
33
  //# sourceMappingURL=mocks.test.utils.d.ts.map
@@ -9,7 +9,7 @@ import { EventIndex } from './EventIndex';
9
9
  import { EventInput } from './EventInput';
10
10
  import { TranslationConfig } from './TranslationConfig';
11
11
  import { FieldConfig } from './FieldConfig';
12
- import { Location, AdministrativeArea } from './locations';
12
+ import { SetLocationPayload, SetAdministrativeAreaPayload } from './locations';
13
13
  import { WorkqueueConfig } from './WorkqueueConfig';
14
14
  import * as z from 'zod/v4';
15
15
  import { DocumentPath } from '../documents';
@@ -48,16 +48,16 @@ export declare function fieldConfigsToActionPayload(fields: FieldConfig[], rng:
48
48
  * Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
49
49
  */
50
50
  administrativeHierarchy?: {
51
- administrativeAreas: AdministrativeArea[];
52
- locations: Location[];
51
+ administrativeAreas: SetAdministrativeAreaPayload[];
52
+ locations: SetLocationPayload[];
53
53
  }): ActionUpdate;
54
54
  export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number, overrides?: ActionUpdate,
55
55
  /**
56
56
  * Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
57
57
  */
58
58
  administrativeHierarchy?: {
59
- administrativeAreas: AdministrativeArea[];
60
- locations: Location[];
59
+ administrativeAreas: SetAdministrativeAreaPayload[];
60
+ locations: SetLocationPayload[];
61
61
  }): ActionUpdate;
62
62
  export declare function generateActionDuplicateDeclarationInput(...args: Parameters<typeof generateActionDeclarationInput>): ReturnType<typeof generateActionDeclarationInput>;
63
63
  export declare function eventPayloadGenerator(rng: () => number, configuration?: EventConfig): {
@@ -98,9 +98,6 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
98
98
  edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
99
99
  keepAssignment?: boolean | undefined;
100
100
  type: "EDIT";
101
- content: {
102
- comment: string;
103
- };
104
101
  transactionId: string;
105
102
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
106
103
  annotation: {};
@@ -439,9 +439,9 @@ export declare function findLastAssignmentAction(actions: Action[]): {
439
439
  status: "Accepted" | "Rejected" | "Requested";
440
440
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
441
441
  type: "EDIT";
442
- content: {
442
+ content?: {
443
443
  comment?: string | undefined;
444
- };
444
+ } | undefined;
445
445
  } | {
446
446
  id: string & import("zod").$brand<"UUID">;
447
447
  transactionId: string;