@opencrvs/toolkit 2.1.0-rc.9e444d5 → 2.1.0-rc.a95b09c

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.
@@ -647,7 +647,6 @@ var PlainScopeType = z11.enum([
647
647
  "integration.create",
648
648
  "record.import",
649
649
  "config.update-all",
650
- "location.edit",
651
650
  "attachment.upload",
652
651
  "profile.electronic-signature",
653
652
  "user.read-only-my-audit",
@@ -7834,8 +7834,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7834
7834
  email?: string | undefined;
7835
7835
  status?: string | undefined;
7836
7836
  primaryOfficeId?: string | undefined;
7837
- count?: number | undefined;
7838
- skip?: number | undefined;
7837
+ count: number;
7838
+ skip: number;
7839
7839
  sortBy?: "createdAt" | "email" | "firstname" | "role" | "status" | "surname" | "username" | undefined;
7840
7840
  sortOrder: "asc" | "desc";
7841
7841
  };
@@ -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;
@@ -8382,15 +8351,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8382
8351
  name: string;
8383
8352
  externalId?: string | null | undefined;
8384
8353
  administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8354
+ validUntil: string | null;
8385
8355
  locationType: string | null;
8386
- status: "active" | "inactive";
8387
- versions: {
8388
- versionId: string & import("zod").$brand<"UUID">;
8389
- effectiveFrom: string;
8390
- name: string;
8391
- externalId?: string | null | undefined;
8392
- status: "active" | "inactive";
8393
- }[];
8394
8356
  }[];
8395
8357
  meta: object;
8396
8358
  }>;
@@ -8400,39 +8362,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8400
8362
  name: string;
8401
8363
  externalId?: string | null | undefined;
8402
8364
  administrativeAreaId: string | null;
8365
+ validUntil: string | null;
8403
8366
  locationType: string | null;
8404
8367
  }[];
8405
8368
  output: void;
8406
8369
  meta: object;
8407
8370
  }>;
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
8371
  get: import("@trpc/server").TRPCQueryProcedure<{
8437
8372
  input: {
8438
8373
  id: string;
@@ -8442,15 +8377,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8442
8377
  name: string;
8443
8378
  externalId?: string | null | undefined;
8444
8379
  administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8380
+ validUntil: string | null;
8445
8381
  locationType: string | null;
8446
- status: "active" | "inactive";
8447
- versions: {
8448
- versionId: string & import("zod").$brand<"UUID">;
8449
- effectiveFrom: string;
8450
- name: string;
8451
- externalId?: string | null | undefined;
8452
- status: "active" | "inactive";
8453
- }[];
8454
8382
  };
8455
8383
  meta: import("trpc-to-openapi").OpenApiMeta;
8456
8384
  }>;
@@ -8858,14 +8786,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8858
8786
  name: string;
8859
8787
  externalId?: string | null | undefined;
8860
8788
  parentId: (string & import("zod").$brand<"UUID">) | null;
8861
- status: "active" | "inactive";
8862
- versions: {
8863
- versionId: string & import("zod").$brand<"UUID">;
8864
- effectiveFrom: string;
8865
- name: string;
8866
- externalId?: string | null | undefined;
8867
- status: "active" | "inactive";
8868
- }[];
8789
+ validUntil: string | null;
8869
8790
  }[];
8870
8791
  meta: import("trpc-to-openapi").OpenApiMeta;
8871
8792
  }>;
@@ -8875,36 +8796,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8875
8796
  name: string;
8876
8797
  externalId?: string | null | undefined;
8877
8798
  parentId: string | null;
8799
+ validUntil: string | null;
8878
8800
  }[];
8879
8801
  output: void;
8880
8802
  meta: object;
8881
8803
  }>;
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
8804
  }>>;
8909
8805
  integrations: import("@trpc/server").TRPCBuiltRouter<{
8910
8806
  ctx: Partial<{
@@ -85,16 +85,16 @@ 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";
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
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";
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
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";
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
98
  $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
99
99
  };
100
100
  };
@@ -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";
@@ -284,7 +283,6 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
284
283
  "config.update-all": "config.update-all";
285
284
  "dashboard.view": "dashboard.view";
286
285
  "integration.create": "integration.create";
287
- "location.edit": "location.edit";
288
286
  "organisation.read-locations": "organisation.read-locations";
289
287
  "performance.read": "performance.read";
290
288
  "performance.read-dashboards": "performance.read-dashboards";
@@ -441,7 +439,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
441
439
  "config.update-all": "config.update-all";
442
440
  "dashboard.view": "dashboard.view";
443
441
  "integration.create": "integration.create";
444
- "location.edit": "location.edit";
445
442
  "organisation.read-locations": "organisation.read-locations";
446
443
  "performance.read": "performance.read";
447
444
  "performance.read-dashboards": "performance.read-dashboards";
@@ -590,7 +587,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
590
587
  "config.update-all": "config.update-all";
591
588
  "dashboard.view": "dashboard.view";
592
589
  "integration.create": "integration.create";
593
- "location.edit": "location.edit";
594
590
  "organisation.read-locations": "organisation.read-locations";
595
591
  "performance.read": "performance.read";
596
592
  "performance.read-dashboards": "performance.read-dashboards";
@@ -750,7 +746,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
750
746
  "config.update-all": "config.update-all";
751
747
  "dashboard.view": "dashboard.view";
752
748
  "integration.create": "integration.create";
753
- "location.edit": "location.edit";
754
749
  "organisation.read-locations": "organisation.read-locations";
755
750
  "performance.read": "performance.read";
756
751
  "performance.read-dashboards": "performance.read-dashboards";
@@ -899,7 +894,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
899
894
  "config.update-all": "config.update-all";
900
895
  "dashboard.view": "dashboard.view";
901
896
  "integration.create": "integration.create";
902
- "location.edit": "location.edit";
903
897
  "organisation.read-locations": "organisation.read-locations";
904
898
  "performance.read": "performance.read";
905
899
  "performance.read-dashboards": "performance.read-dashboards";
@@ -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;
@@ -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";
@@ -2013,7 +2012,6 @@ declare const LocationInput: z.ZodObject<{
2013
2012
  "config.update-all": "config.update-all";
2014
2013
  "dashboard.view": "dashboard.view";
2015
2014
  "integration.create": "integration.create";
2016
- "location.edit": "location.edit";
2017
2015
  "organisation.read-locations": "organisation.read-locations";
2018
2016
  "performance.read": "performance.read";
2019
2017
  "performance.read-dashboards": "performance.read-dashboards";
@@ -2214,7 +2212,6 @@ declare const Facility: z.ZodObject<{
2214
2212
  "config.update-all": "config.update-all";
2215
2213
  "dashboard.view": "dashboard.view";
2216
2214
  "integration.create": "integration.create";
2217
- "location.edit": "location.edit";
2218
2215
  "organisation.read-locations": "organisation.read-locations";
2219
2216
  "performance.read": "performance.read";
2220
2217
  "performance.read-dashboards": "performance.read-dashboards";
@@ -2330,7 +2327,6 @@ declare const Office: z.ZodObject<{
2330
2327
  "config.update-all": "config.update-all";
2331
2328
  "dashboard.view": "dashboard.view";
2332
2329
  "integration.create": "integration.create";
2333
- "location.edit": "location.edit";
2334
2330
  "organisation.read-locations": "organisation.read-locations";
2335
2331
  "performance.read": "performance.read";
2336
2332
  "performance.read-dashboards": "performance.read-dashboards";
@@ -2532,7 +2528,6 @@ declare const Address: z.ZodObject<{
2532
2528
  "config.update-all": "config.update-all";
2533
2529
  "dashboard.view": "dashboard.view";
2534
2530
  "integration.create": "integration.create";
2535
- "location.edit": "location.edit";
2536
2531
  "organisation.read-locations": "organisation.read-locations";
2537
2532
  "performance.read": "performance.read";
2538
2533
  "performance.read-dashboards": "performance.read-dashboards";
@@ -45,7 +45,6 @@ export * from './field';
45
45
  export * from './Flag';
46
46
  export * from './event';
47
47
  export * from './locations';
48
- export * from './locationPayloads';
49
48
  export { UUID } from '../uuid';
50
49
  export { DocumentPath } from '../documents';
51
50
  //# sourceMappingURL=index.d.ts.map
@@ -11,46 +11,12 @@ 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>;
35
14
  export declare const AdministrativeArea: z.ZodObject<{
36
15
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
37
16
  name: z.ZodString;
38
17
  externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
18
  parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
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>>;
19
+ validUntil: z.ZodNullable<z.ZodISODateTime>;
54
20
  }, z.core.$strip>;
55
21
  export type AdministrativeArea = z.infer<typeof AdministrativeArea>;
56
22
  export declare const Location: z.ZodObject<{
@@ -58,66 +24,10 @@ export declare const Location: z.ZodObject<{
58
24
  name: z.ZodString;
59
25
  externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
26
  administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
27
+ validUntil: z.ZodNullable<z.ZodISODateTime>;
61
28
  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>>;
76
29
  }, z.core.$strip>;
77
30
  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;
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;
121
31
  type WrapArrayPreserveNullish<V> = V extends readonly any[] ? V : NonNullable<V>[] | Extract<V, null | undefined>;
122
32
  /**
123
33
  * For type T, convert fields K to arrays. If field is string, convert to string[].
@@ -169,14 +79,7 @@ export declare function getAdministrativeAreaHierarchy(administrativeAreaId: str
169
79
  name: string;
170
80
  externalId?: string | null | undefined;
171
81
  parentId: (string & z.$brand<"UUID">) | null;
172
- status: "active" | "inactive";
173
- versions: {
174
- versionId: string & z.$brand<"UUID">;
175
- effectiveFrom: string;
176
- name: string;
177
- externalId?: string | null | undefined;
178
- status: "active" | "inactive";
179
- }[];
82
+ validUntil: string | null;
180
83
  }[];
181
84
  /**
182
85
  * Resolves a location or administrative area UUID into a root-first hierarchy of UUIDs.
@@ -6,28 +6,14 @@ 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;
9
10
  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
- }[];
18
11
  }>;
19
12
  export declare const V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP: Map<string & import("zod").$brand<"UUID">, {
20
13
  id: string & import("zod").$brand<"UUID">;
21
14
  name: string;
22
15
  externalId?: string | null | undefined;
23
16
  parentId: (string & import("zod").$brand<"UUID">) | 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
- }[];
17
+ validUntil: string | null;
32
18
  }>;
33
19
  //# 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 { SetLocationPayload, SetAdministrativeAreaPayload } from './locations';
12
+ import { Location, AdministrativeArea } 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: SetAdministrativeAreaPayload[];
52
- locations: SetLocationPayload[];
51
+ administrativeAreas: AdministrativeArea[];
52
+ locations: Location[];
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: SetAdministrativeAreaPayload[];
60
- locations: SetLocationPayload[];
59
+ administrativeAreas: AdministrativeArea[];
60
+ locations: Location[];
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): {
@@ -169,7 +169,6 @@ var PlainScopeType = z6.enum([
169
169
  "integration.create",
170
170
  "record.import",
171
171
  "config.update-all",
172
- "location.edit",
173
172
  "attachment.upload",
174
173
  "profile.electronic-signature",
175
174
  "user.read-only-my-audit",