@opencrvs/toolkit 2.1.0-rc.93572dd → 2.1.0-rc.97151f8
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.
- package/dist/application-config/index.js +1 -2
- package/dist/commons/api/router.d.ts +65 -48
- package/dist/commons/events/ActionDocument.d.ts +6 -6
- package/dist/commons/events/ActionInput.d.ts +6 -0
- package/dist/commons/events/EventDocument.d.ts +2 -2
- package/dist/commons/events/locations.d.ts +3 -93
- package/dist/commons/events/mocks.test.utils.d.ts +2 -16
- package/dist/commons/events/test.utils.d.ts +8 -5
- package/dist/commons/events/utils.d.ts +2 -2
- package/dist/events/index.js +58 -62
- package/dist/notification/index.js +57 -48
- package/opencrvs-toolkit-2.1.0-rc.97151f8.tgz +0 -0
- package/package.json +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.93572dd.tgz +0 -0
|
@@ -989,10 +989,9 @@ 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. */
|
|
993
992
|
content: z13.object({
|
|
994
993
|
comment: z13.string().describe("Comment for the edit action.").optional()
|
|
995
|
-
})
|
|
994
|
+
})
|
|
996
995
|
}).shape
|
|
997
996
|
);
|
|
998
997
|
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
|
+
};
|
|
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
|
+
};
|
|
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
|
+
};
|
|
1064
1064
|
} | {
|
|
1065
1065
|
id: string & import("zod").$brand<"UUID">;
|
|
1066
1066
|
transactionId: string;
|
|
@@ -1491,6 +1491,9 @@ 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
|
+
};
|
|
1494
1497
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
1495
1498
|
actionId: string;
|
|
1496
1499
|
};
|
|
@@ -1829,9 +1832,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1829
1832
|
status: "Accepted" | "Rejected" | "Requested";
|
|
1830
1833
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1831
1834
|
type: "EDIT";
|
|
1832
|
-
content
|
|
1835
|
+
content: {
|
|
1833
1836
|
comment?: string | undefined;
|
|
1834
|
-
}
|
|
1837
|
+
};
|
|
1835
1838
|
} | {
|
|
1836
1839
|
id: string & import("zod").$brand<"UUID">;
|
|
1837
1840
|
transactionId: string;
|
|
@@ -2146,6 +2149,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2146
2149
|
waitFor?: boolean | undefined;
|
|
2147
2150
|
createdAtLocation?: string | null | undefined;
|
|
2148
2151
|
type?: "EDIT" | undefined;
|
|
2152
|
+
content: {
|
|
2153
|
+
comment?: string | undefined;
|
|
2154
|
+
};
|
|
2149
2155
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
2150
2156
|
actionId: string;
|
|
2151
2157
|
};
|
|
@@ -2462,9 +2468,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2462
2468
|
status: "Accepted" | "Rejected" | "Requested";
|
|
2463
2469
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
2464
2470
|
type: "EDIT";
|
|
2465
|
-
content
|
|
2471
|
+
content: {
|
|
2466
2472
|
comment?: string | undefined;
|
|
2467
|
-
}
|
|
2473
|
+
};
|
|
2468
2474
|
} | {
|
|
2469
2475
|
id: string & import("zod").$brand<"UUID">;
|
|
2470
2476
|
transactionId: string;
|
|
@@ -2784,6 +2790,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2784
2790
|
waitFor?: boolean | undefined;
|
|
2785
2791
|
createdAtLocation?: string | null | undefined;
|
|
2786
2792
|
type?: "EDIT" | undefined;
|
|
2793
|
+
content: {
|
|
2794
|
+
comment?: string | undefined;
|
|
2795
|
+
};
|
|
2787
2796
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
2788
2797
|
actionId: string;
|
|
2789
2798
|
};
|
|
@@ -3088,6 +3097,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3088
3097
|
waitFor?: boolean | undefined;
|
|
3089
3098
|
createdAtLocation?: string | null | undefined;
|
|
3090
3099
|
type?: "EDIT" | undefined;
|
|
3100
|
+
content: {
|
|
3101
|
+
comment?: string | undefined;
|
|
3102
|
+
};
|
|
3091
3103
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
3092
3104
|
actionId: string;
|
|
3093
3105
|
};
|
|
@@ -3392,6 +3404,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3392
3404
|
waitFor?: boolean | undefined;
|
|
3393
3405
|
createdAtLocation?: string | null | undefined;
|
|
3394
3406
|
type?: "EDIT" | undefined;
|
|
3407
|
+
content: {
|
|
3408
|
+
comment?: string | undefined;
|
|
3409
|
+
};
|
|
3395
3410
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
3396
3411
|
actionId: string;
|
|
3397
3412
|
};
|
|
@@ -3696,6 +3711,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3696
3711
|
waitFor?: boolean | undefined;
|
|
3697
3712
|
createdAtLocation?: string | null | undefined;
|
|
3698
3713
|
type?: "EDIT" | undefined;
|
|
3714
|
+
content: {
|
|
3715
|
+
comment?: string | undefined;
|
|
3716
|
+
};
|
|
3699
3717
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
3700
3718
|
actionId: string;
|
|
3701
3719
|
};
|
|
@@ -4000,6 +4018,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4000
4018
|
waitFor?: boolean | undefined;
|
|
4001
4019
|
createdAtLocation?: string | null | undefined;
|
|
4002
4020
|
type?: "EDIT" | undefined;
|
|
4021
|
+
content: {
|
|
4022
|
+
comment?: string | undefined;
|
|
4023
|
+
};
|
|
4003
4024
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
4004
4025
|
actionId: string;
|
|
4005
4026
|
};
|
|
@@ -4304,6 +4325,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4304
4325
|
waitFor?: boolean | undefined;
|
|
4305
4326
|
createdAtLocation?: string | null | undefined;
|
|
4306
4327
|
type?: "EDIT" | undefined;
|
|
4328
|
+
content: {
|
|
4329
|
+
comment?: string | undefined;
|
|
4330
|
+
};
|
|
4307
4331
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
4308
4332
|
actionId: string;
|
|
4309
4333
|
};
|
|
@@ -4603,6 +4627,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4603
4627
|
waitFor?: boolean | undefined;
|
|
4604
4628
|
createdAtLocation?: string | null | undefined;
|
|
4605
4629
|
type?: "EDIT" | undefined;
|
|
4630
|
+
content: {
|
|
4631
|
+
comment?: string | undefined;
|
|
4632
|
+
};
|
|
4606
4633
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
4607
4634
|
actionId: string;
|
|
4608
4635
|
};
|
|
@@ -4920,9 +4947,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4920
4947
|
status: "Accepted" | "Rejected" | "Requested";
|
|
4921
4948
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4922
4949
|
type: "EDIT";
|
|
4923
|
-
content
|
|
4950
|
+
content: {
|
|
4924
4951
|
comment?: string | undefined;
|
|
4925
|
-
}
|
|
4952
|
+
};
|
|
4926
4953
|
} | {
|
|
4927
4954
|
id: string & import("zod").$brand<"UUID">;
|
|
4928
4955
|
transactionId: string;
|
|
@@ -5278,9 +5305,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5278
5305
|
status: "Accepted" | "Rejected" | "Requested";
|
|
5279
5306
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
5280
5307
|
type: "EDIT";
|
|
5281
|
-
content
|
|
5308
|
+
content: {
|
|
5282
5309
|
comment?: string | undefined;
|
|
5283
|
-
}
|
|
5310
|
+
};
|
|
5284
5311
|
} | {
|
|
5285
5312
|
id: string & import("zod").$brand<"UUID">;
|
|
5286
5313
|
transactionId: string;
|
|
@@ -5613,9 +5640,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5613
5640
|
status: "Accepted" | "Rejected" | "Requested";
|
|
5614
5641
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
5615
5642
|
type: "EDIT";
|
|
5616
|
-
content
|
|
5643
|
+
content: {
|
|
5617
5644
|
comment?: string | undefined;
|
|
5618
|
-
}
|
|
5645
|
+
};
|
|
5619
5646
|
} | {
|
|
5620
5647
|
id: string & import("zod").$brand<"UUID">;
|
|
5621
5648
|
transactionId: string;
|
|
@@ -5957,6 +5984,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5957
5984
|
waitFor?: boolean | undefined;
|
|
5958
5985
|
createdAtLocation?: string | null | undefined;
|
|
5959
5986
|
type?: "EDIT" | undefined;
|
|
5987
|
+
content: {
|
|
5988
|
+
comment?: string | undefined;
|
|
5989
|
+
};
|
|
5960
5990
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
5961
5991
|
actionId: string;
|
|
5962
5992
|
};
|
|
@@ -6261,6 +6291,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6261
6291
|
waitFor?: boolean | undefined;
|
|
6262
6292
|
createdAtLocation?: string | null | undefined;
|
|
6263
6293
|
type?: "EDIT" | undefined;
|
|
6294
|
+
content: {
|
|
6295
|
+
comment?: string | undefined;
|
|
6296
|
+
};
|
|
6264
6297
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
6265
6298
|
actionId: string;
|
|
6266
6299
|
};
|
|
@@ -6565,6 +6598,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6565
6598
|
waitFor?: boolean | undefined;
|
|
6566
6599
|
createdAtLocation?: string | null | undefined;
|
|
6567
6600
|
type?: "EDIT" | undefined;
|
|
6601
|
+
content: {
|
|
6602
|
+
comment?: string | undefined;
|
|
6603
|
+
};
|
|
6568
6604
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
6569
6605
|
actionId: string;
|
|
6570
6606
|
};
|
|
@@ -6908,9 +6944,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6908
6944
|
status: "Accepted" | "Rejected" | "Requested";
|
|
6909
6945
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6910
6946
|
type: "EDIT";
|
|
6911
|
-
content
|
|
6947
|
+
content: {
|
|
6912
6948
|
comment?: string | undefined;
|
|
6913
|
-
}
|
|
6949
|
+
};
|
|
6914
6950
|
} | {
|
|
6915
6951
|
id: string & import("zod").$brand<"UUID">;
|
|
6916
6952
|
transactionId: string;
|
|
@@ -7242,9 +7278,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7242
7278
|
status: "Accepted" | "Rejected" | "Requested";
|
|
7243
7279
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
7244
7280
|
type: "EDIT";
|
|
7245
|
-
content
|
|
7281
|
+
content: {
|
|
7246
7282
|
comment?: string | undefined;
|
|
7247
|
-
}
|
|
7283
|
+
};
|
|
7248
7284
|
} | {
|
|
7249
7285
|
id: string & import("zod").$brand<"UUID">;
|
|
7250
7286
|
transactionId: string;
|
|
@@ -7627,9 +7663,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7627
7663
|
status: "Accepted" | "Rejected" | "Requested";
|
|
7628
7664
|
originalActionId?: string | null | undefined;
|
|
7629
7665
|
type: "EDIT";
|
|
7630
|
-
content
|
|
7666
|
+
content: {
|
|
7631
7667
|
comment?: string | undefined;
|
|
7632
|
-
}
|
|
7668
|
+
};
|
|
7633
7669
|
} | {
|
|
7634
7670
|
id: string;
|
|
7635
7671
|
transactionId: string;
|
|
@@ -7834,8 +7870,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7834
7870
|
email?: string | undefined;
|
|
7835
7871
|
status?: string | undefined;
|
|
7836
7872
|
primaryOfficeId?: string | undefined;
|
|
7837
|
-
count
|
|
7838
|
-
skip
|
|
7873
|
+
count: number;
|
|
7874
|
+
skip: number;
|
|
7839
7875
|
sortBy?: "createdAt" | "email" | "firstname" | "role" | "status" | "surname" | "username" | undefined;
|
|
7840
7876
|
sortOrder: "asc" | "desc";
|
|
7841
7877
|
};
|
|
@@ -8351,15 +8387,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8351
8387
|
name: string;
|
|
8352
8388
|
externalId?: string | null | undefined;
|
|
8353
8389
|
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8390
|
+
validUntil: string | null;
|
|
8354
8391
|
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
|
-
}[];
|
|
8363
8392
|
}[];
|
|
8364
8393
|
meta: object;
|
|
8365
8394
|
}>;
|
|
@@ -8369,6 +8398,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8369
8398
|
name: string;
|
|
8370
8399
|
externalId?: string | null | undefined;
|
|
8371
8400
|
administrativeAreaId: string | null;
|
|
8401
|
+
validUntil: string | null;
|
|
8372
8402
|
locationType: string | null;
|
|
8373
8403
|
}[];
|
|
8374
8404
|
output: void;
|
|
@@ -8383,15 +8413,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8383
8413
|
name: string;
|
|
8384
8414
|
externalId?: string | null | undefined;
|
|
8385
8415
|
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8416
|
+
validUntil: string | null;
|
|
8386
8417
|
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
|
-
}[];
|
|
8395
8418
|
};
|
|
8396
8419
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8397
8420
|
}>;
|
|
@@ -8799,14 +8822,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8799
8822
|
name: string;
|
|
8800
8823
|
externalId?: string | null | undefined;
|
|
8801
8824
|
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
8802
|
-
|
|
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
|
-
}[];
|
|
8825
|
+
validUntil: string | null;
|
|
8810
8826
|
}[];
|
|
8811
8827
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8812
8828
|
}>;
|
|
@@ -8816,6 +8832,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8816
8832
|
name: string;
|
|
8817
8833
|
externalId?: string | null | undefined;
|
|
8818
8834
|
parentId: string | null;
|
|
8835
|
+
validUntil: string | null;
|
|
8819
8836
|
}[];
|
|
8820
8837
|
output: void;
|
|
8821
8838
|
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.
|
|
168
|
+
content: 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.
|
|
656
|
+
content: 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.
|
|
1119
|
+
content: 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,6 +65,9 @@ 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>;
|
|
68
71
|
}, z.core.$strip>;
|
|
69
72
|
export type EditActionInput = z.infer<typeof EditActionInput>;
|
|
70
73
|
export declare const PrintCertificateActionInput: z.ZodObject<{
|
|
@@ -561,6 +564,9 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
561
564
|
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
562
565
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
563
566
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
567
|
+
content: z.ZodObject<{
|
|
568
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, z.core.$strip>;
|
|
564
570
|
}, z.core.$strip>], "type">;
|
|
565
571
|
export type ActionInput = z.input<typeof ActionInput>;
|
|
566
572
|
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.
|
|
413
|
+
content: 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,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
|
-
|
|
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,59 +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
31
|
type WrapArrayPreserveNullish<V> = V extends readonly any[] ? V : NonNullable<V>[] | Extract<V, null | undefined>;
|
|
115
32
|
/**
|
|
116
33
|
* For type T, convert fields K to arrays. If field is string, convert to string[].
|
|
@@ -162,14 +79,7 @@ export declare function getAdministrativeAreaHierarchy(administrativeAreaId: str
|
|
|
162
79
|
name: string;
|
|
163
80
|
externalId?: string | null | undefined;
|
|
164
81
|
parentId: (string & z.$brand<"UUID">) | null;
|
|
165
|
-
|
|
166
|
-
versions: {
|
|
167
|
-
versionId: string & z.$brand<"UUID">;
|
|
168
|
-
effectiveFrom: string;
|
|
169
|
-
name: string;
|
|
170
|
-
externalId?: string | null | undefined;
|
|
171
|
-
status: "active" | "inactive";
|
|
172
|
-
}[];
|
|
82
|
+
validUntil: string | null;
|
|
173
83
|
}[];
|
|
174
84
|
/**
|
|
175
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
|
-
|
|
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 {
|
|
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:
|
|
52
|
-
locations:
|
|
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:
|
|
60
|
-
locations:
|
|
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): {
|
|
@@ -98,6 +98,9 @@ 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
|
+
};
|
|
101
104
|
transactionId: string;
|
|
102
105
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
103
106
|
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
|
+
};
|
|
445
445
|
} | {
|
|
446
446
|
id: string & import("zod").$brand<"UUID">;
|
|
447
447
|
transactionId: string;
|