@opencrvs/toolkit 2.0.0-rc.0f51ec5 → 2.0.0-rc.0f578b8
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 +2 -1
- package/dist/cli.js +9 -3
- package/dist/commons/api/router.d.ts +81 -15
- package/dist/commons/events/ActionDocument.d.ts +6 -0
- package/dist/commons/events/ActionInput.d.ts +6 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
- package/dist/commons/events/EventDocument.d.ts +3 -0
- package/dist/commons/events/field.d.ts +6 -0
- package/dist/commons/events/state/utils.d.ts +3 -0
- package/dist/commons/events/utils.d.ts +11 -0
- package/dist/events/index.js +37 -7
- package/dist/migrations/v2.0/index.js +9 -3
- package/dist/notification/index.js +7 -2
- package/dist/scopes/index.d.ts +4 -6
- package/dist/scopes/index.js +9 -3
- package/opencrvs-toolkit-2.0.0-rc.0f578b8.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.0f51ec5.tgz +0 -0
|
@@ -990,8 +990,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
990
990
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
991
991
|
z13.object({
|
|
992
992
|
type: z13.literal(ActionType.APPROVE_CORRECTION),
|
|
993
|
-
requestId: z13.string()
|
|
993
|
+
requestId: z13.string(),
|
|
994
994
|
// TODO move into 'content' property
|
|
995
|
+
content: z13.object({ immediateCorrection: z13.boolean().optional() }).optional()
|
|
995
996
|
}).shape
|
|
996
997
|
);
|
|
997
998
|
var RejectedCorrectionAction = ActionBase.extend(
|
package/dist/cli.js
CHANGED
|
@@ -2382,14 +2382,20 @@ var encodeScope = (scope) => {
|
|
|
2382
2382
|
encode: false
|
|
2383
2383
|
});
|
|
2384
2384
|
};
|
|
2385
|
-
var
|
|
2386
|
-
|
|
2385
|
+
var decodedScopeCache = /* @__PURE__ */ new Map();
|
|
2386
|
+
var decodeScope = (encodedScope) => {
|
|
2387
|
+
if (decodedScopeCache.has(encodedScope)) {
|
|
2388
|
+
return decodedScopeCache.get(encodedScope);
|
|
2389
|
+
}
|
|
2390
|
+
const scope = qs.parse(encodedScope, {
|
|
2387
2391
|
ignoreQueryPrefix: true,
|
|
2388
2392
|
comma: true,
|
|
2389
2393
|
allowDots: true
|
|
2390
2394
|
});
|
|
2391
2395
|
const unflattenedScope = unflattenScope(scope);
|
|
2392
|
-
|
|
2396
|
+
const result = Scope2.safeParse(unflattenedScope)?.data;
|
|
2397
|
+
decodedScopeCache.set(encodedScope, result);
|
|
2398
|
+
return result;
|
|
2393
2399
|
};
|
|
2394
2400
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2395
2401
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
@@ -313,6 +313,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
313
313
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
314
314
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
315
315
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
316
|
+
content?: {
|
|
317
|
+
immediateCorrection?: boolean | undefined;
|
|
318
|
+
} | undefined;
|
|
316
319
|
} | {
|
|
317
320
|
id: string & import("zod").$brand<"UUID">;
|
|
318
321
|
transactionId: string;
|
|
@@ -414,7 +417,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
414
417
|
createdByUserType: "system" | "user";
|
|
415
418
|
createdAt: string;
|
|
416
419
|
createdBy: string;
|
|
417
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
420
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
418
421
|
status: "Rejected";
|
|
419
422
|
createdByRole?: string | undefined;
|
|
420
423
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -622,6 +625,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
622
625
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
623
626
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
624
627
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
628
|
+
content?: {
|
|
629
|
+
immediateCorrection?: boolean | undefined;
|
|
630
|
+
} | undefined;
|
|
625
631
|
} | {
|
|
626
632
|
id: string & import("zod").$brand<"UUID">;
|
|
627
633
|
transactionId: string;
|
|
@@ -723,7 +729,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
723
729
|
createdByUserType: "system" | "user";
|
|
724
730
|
createdAt: string;
|
|
725
731
|
createdBy: string;
|
|
726
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
732
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
727
733
|
status: "Rejected";
|
|
728
734
|
createdByRole?: string | undefined;
|
|
729
735
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -930,6 +936,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
930
936
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
931
937
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
932
938
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
939
|
+
content?: {
|
|
940
|
+
immediateCorrection?: boolean | undefined;
|
|
941
|
+
} | undefined;
|
|
933
942
|
} | {
|
|
934
943
|
id: string & import("zod").$brand<"UUID">;
|
|
935
944
|
transactionId: string;
|
|
@@ -1031,7 +1040,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1031
1040
|
createdByUserType: "system" | "user";
|
|
1032
1041
|
createdAt: string;
|
|
1033
1042
|
createdBy: string;
|
|
1034
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
1043
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
1035
1044
|
status: "Rejected";
|
|
1036
1045
|
createdByRole?: string | undefined;
|
|
1037
1046
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -1081,7 +1090,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1081
1090
|
transactionId: string;
|
|
1082
1091
|
createdAt: string;
|
|
1083
1092
|
action: {
|
|
1084
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "
|
|
1093
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "NOTIFY" | "DUPLICATE_DETECTED" | "MARK_AS_NOT_DUPLICATE" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "ASSIGN" | "UNASSIGN";
|
|
1085
1094
|
transactionId: string;
|
|
1086
1095
|
createdByUserType: "system" | "user";
|
|
1087
1096
|
createdAt: string;
|
|
@@ -1100,7 +1109,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1100
1109
|
input: {
|
|
1101
1110
|
transactionId: string;
|
|
1102
1111
|
eventId: string;
|
|
1103
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "
|
|
1112
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "NOTIFY" | "DUPLICATE_DETECTED" | "MARK_AS_NOT_DUPLICATE" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "ASSIGN" | "UNASSIGN";
|
|
1104
1113
|
status: "Requested" | "Accepted" | "Rejected";
|
|
1105
1114
|
createdAtLocation?: string | null | undefined;
|
|
1106
1115
|
declaration?: Record<string, unknown> | undefined;
|
|
@@ -1116,7 +1125,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1116
1125
|
transactionId: string;
|
|
1117
1126
|
createdAt: string;
|
|
1118
1127
|
action: {
|
|
1119
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "
|
|
1128
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "NOTIFY" | "DUPLICATE_DETECTED" | "MARK_AS_NOT_DUPLICATE" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "ASSIGN" | "UNASSIGN";
|
|
1120
1129
|
transactionId: string;
|
|
1121
1130
|
createdByUserType: "system" | "user";
|
|
1122
1131
|
createdAt: string;
|
|
@@ -1388,6 +1397,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1388
1397
|
waitFor?: boolean | undefined;
|
|
1389
1398
|
createdAtLocation?: string | null | undefined;
|
|
1390
1399
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
1400
|
+
content?: {
|
|
1401
|
+
immediateCorrection?: boolean | undefined;
|
|
1402
|
+
} | undefined;
|
|
1391
1403
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
1392
1404
|
eventId: string;
|
|
1393
1405
|
transactionId: string;
|
|
@@ -1672,6 +1684,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1672
1684
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1673
1685
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1674
1686
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1687
|
+
content?: {
|
|
1688
|
+
immediateCorrection?: boolean | undefined;
|
|
1689
|
+
} | undefined;
|
|
1675
1690
|
} | {
|
|
1676
1691
|
id: string & import("zod").$brand<"UUID">;
|
|
1677
1692
|
transactionId: string;
|
|
@@ -1773,7 +1788,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1773
1788
|
createdByUserType: "system" | "user";
|
|
1774
1789
|
createdAt: string;
|
|
1775
1790
|
createdBy: string;
|
|
1776
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
1791
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
1777
1792
|
status: "Rejected";
|
|
1778
1793
|
createdByRole?: string | undefined;
|
|
1779
1794
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -2012,6 +2027,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2012
2027
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
2013
2028
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
2014
2029
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
2030
|
+
content?: {
|
|
2031
|
+
immediateCorrection?: boolean | undefined;
|
|
2032
|
+
} | undefined;
|
|
2015
2033
|
} | {
|
|
2016
2034
|
id: string & import("zod").$brand<"UUID">;
|
|
2017
2035
|
transactionId: string;
|
|
@@ -2113,7 +2131,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2113
2131
|
createdByUserType: "system" | "user";
|
|
2114
2132
|
createdAt: string;
|
|
2115
2133
|
createdBy: string;
|
|
2116
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
2134
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
2117
2135
|
status: "Rejected";
|
|
2118
2136
|
createdByRole?: string | undefined;
|
|
2119
2137
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -2331,6 +2349,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2331
2349
|
waitFor?: boolean | undefined;
|
|
2332
2350
|
createdAtLocation?: string | null | undefined;
|
|
2333
2351
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
2352
|
+
content?: {
|
|
2353
|
+
immediateCorrection?: boolean | undefined;
|
|
2354
|
+
} | undefined;
|
|
2334
2355
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
2335
2356
|
eventId: string;
|
|
2336
2357
|
transactionId: string;
|
|
@@ -2623,6 +2644,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2623
2644
|
waitFor?: boolean | undefined;
|
|
2624
2645
|
createdAtLocation?: string | null | undefined;
|
|
2625
2646
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
2647
|
+
content?: {
|
|
2648
|
+
immediateCorrection?: boolean | undefined;
|
|
2649
|
+
} | undefined;
|
|
2626
2650
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
2627
2651
|
eventId: string;
|
|
2628
2652
|
transactionId: string;
|
|
@@ -2915,6 +2939,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2915
2939
|
waitFor?: boolean | undefined;
|
|
2916
2940
|
createdAtLocation?: string | null | undefined;
|
|
2917
2941
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
2942
|
+
content?: {
|
|
2943
|
+
immediateCorrection?: boolean | undefined;
|
|
2944
|
+
} | undefined;
|
|
2918
2945
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
2919
2946
|
eventId: string;
|
|
2920
2947
|
transactionId: string;
|
|
@@ -3207,6 +3234,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3207
3234
|
waitFor?: boolean | undefined;
|
|
3208
3235
|
createdAtLocation?: string | null | undefined;
|
|
3209
3236
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
3237
|
+
content?: {
|
|
3238
|
+
immediateCorrection?: boolean | undefined;
|
|
3239
|
+
} | undefined;
|
|
3210
3240
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
3211
3241
|
eventId: string;
|
|
3212
3242
|
transactionId: string;
|
|
@@ -3499,6 +3529,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3499
3529
|
waitFor?: boolean | undefined;
|
|
3500
3530
|
createdAtLocation?: string | null | undefined;
|
|
3501
3531
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
3532
|
+
content?: {
|
|
3533
|
+
immediateCorrection?: boolean | undefined;
|
|
3534
|
+
} | undefined;
|
|
3502
3535
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
3503
3536
|
eventId: string;
|
|
3504
3537
|
transactionId: string;
|
|
@@ -3791,6 +3824,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3791
3824
|
waitFor?: boolean | undefined;
|
|
3792
3825
|
createdAtLocation?: string | null | undefined;
|
|
3793
3826
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
3827
|
+
content?: {
|
|
3828
|
+
immediateCorrection?: boolean | undefined;
|
|
3829
|
+
} | undefined;
|
|
3794
3830
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
3795
3831
|
eventId: string;
|
|
3796
3832
|
transactionId: string;
|
|
@@ -4077,6 +4113,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4077
4113
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4078
4114
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
4079
4115
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4116
|
+
content?: {
|
|
4117
|
+
immediateCorrection?: boolean | undefined;
|
|
4118
|
+
} | undefined;
|
|
4080
4119
|
} | {
|
|
4081
4120
|
id: string & import("zod").$brand<"UUID">;
|
|
4082
4121
|
transactionId: string;
|
|
@@ -4178,7 +4217,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4178
4217
|
createdByUserType: "system" | "user";
|
|
4179
4218
|
createdAt: string;
|
|
4180
4219
|
createdBy: string;
|
|
4181
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
4220
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
4182
4221
|
status: "Rejected";
|
|
4183
4222
|
createdByRole?: string | undefined;
|
|
4184
4223
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -4396,6 +4435,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4396
4435
|
waitFor?: boolean | undefined;
|
|
4397
4436
|
createdAtLocation?: string | null | undefined;
|
|
4398
4437
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
4438
|
+
content?: {
|
|
4439
|
+
immediateCorrection?: boolean | undefined;
|
|
4440
|
+
} | undefined;
|
|
4399
4441
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
4400
4442
|
eventId: string;
|
|
4401
4443
|
transactionId: string;
|
|
@@ -4682,6 +4724,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4682
4724
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4683
4725
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
4684
4726
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4727
|
+
content?: {
|
|
4728
|
+
immediateCorrection?: boolean | undefined;
|
|
4729
|
+
} | undefined;
|
|
4685
4730
|
} | {
|
|
4686
4731
|
id: string & import("zod").$brand<"UUID">;
|
|
4687
4732
|
transactionId: string;
|
|
@@ -4783,7 +4828,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4783
4828
|
createdByUserType: "system" | "user";
|
|
4784
4829
|
createdAt: string;
|
|
4785
4830
|
createdBy: string;
|
|
4786
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
4831
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
4787
4832
|
status: "Rejected";
|
|
4788
4833
|
createdByRole?: string | undefined;
|
|
4789
4834
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -5000,6 +5045,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5000
5045
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
5001
5046
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
5002
5047
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
5048
|
+
content?: {
|
|
5049
|
+
immediateCorrection?: boolean | undefined;
|
|
5050
|
+
} | undefined;
|
|
5003
5051
|
} | {
|
|
5004
5052
|
id: string & import("zod").$brand<"UUID">;
|
|
5005
5053
|
transactionId: string;
|
|
@@ -5101,7 +5149,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5101
5149
|
createdByUserType: "system" | "user";
|
|
5102
5150
|
createdAt: string;
|
|
5103
5151
|
createdBy: string;
|
|
5104
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
5152
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
5105
5153
|
status: "Rejected";
|
|
5106
5154
|
createdByRole?: string | undefined;
|
|
5107
5155
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -5369,6 +5417,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5369
5417
|
waitFor?: boolean | undefined;
|
|
5370
5418
|
createdAtLocation?: string | null | undefined;
|
|
5371
5419
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
5420
|
+
content?: {
|
|
5421
|
+
immediateCorrection?: boolean | undefined;
|
|
5422
|
+
} | undefined;
|
|
5372
5423
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
5373
5424
|
eventId: string;
|
|
5374
5425
|
transactionId: string;
|
|
@@ -5661,6 +5712,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5661
5712
|
waitFor?: boolean | undefined;
|
|
5662
5713
|
createdAtLocation?: string | null | undefined;
|
|
5663
5714
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
5715
|
+
content?: {
|
|
5716
|
+
immediateCorrection?: boolean | undefined;
|
|
5717
|
+
} | undefined;
|
|
5664
5718
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
5665
5719
|
eventId: string;
|
|
5666
5720
|
transactionId: string;
|
|
@@ -5953,6 +6007,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5953
6007
|
waitFor?: boolean | undefined;
|
|
5954
6008
|
createdAtLocation?: string | null | undefined;
|
|
5955
6009
|
type?: "APPROVE_CORRECTION" | undefined;
|
|
6010
|
+
content?: {
|
|
6011
|
+
immediateCorrection?: boolean | undefined;
|
|
6012
|
+
} | undefined;
|
|
5956
6013
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
|
|
5957
6014
|
eventId: string;
|
|
5958
6015
|
transactionId: string;
|
|
@@ -6242,6 +6299,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6242
6299
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6243
6300
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
6244
6301
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6302
|
+
content?: {
|
|
6303
|
+
immediateCorrection?: boolean | undefined;
|
|
6304
|
+
} | undefined;
|
|
6245
6305
|
} | {
|
|
6246
6306
|
id: string & import("zod").$brand<"UUID">;
|
|
6247
6307
|
transactionId: string;
|
|
@@ -6343,7 +6403,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6343
6403
|
createdByUserType: "system" | "user";
|
|
6344
6404
|
createdAt: string;
|
|
6345
6405
|
createdBy: string;
|
|
6346
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
6406
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
6347
6407
|
status: "Rejected";
|
|
6348
6408
|
createdByRole?: string | undefined;
|
|
6349
6409
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -6559,6 +6619,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6559
6619
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6560
6620
|
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
6561
6621
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6622
|
+
content?: {
|
|
6623
|
+
immediateCorrection?: boolean | undefined;
|
|
6624
|
+
} | undefined;
|
|
6562
6625
|
} | {
|
|
6563
6626
|
id: string & import("zod").$brand<"UUID">;
|
|
6564
6627
|
transactionId: string;
|
|
@@ -6660,7 +6723,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6660
6723
|
createdByUserType: "system" | "user";
|
|
6661
6724
|
createdAt: string;
|
|
6662
6725
|
createdBy: string;
|
|
6663
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
6726
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
6664
6727
|
status: "Rejected";
|
|
6665
6728
|
createdByRole?: string | undefined;
|
|
6666
6729
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -6919,6 +6982,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6919
6982
|
createdAtLocation?: string | null | undefined;
|
|
6920
6983
|
annotation?: Record<string, unknown> | null | undefined;
|
|
6921
6984
|
originalActionId?: string | null | undefined;
|
|
6985
|
+
content?: {
|
|
6986
|
+
immediateCorrection?: boolean | undefined;
|
|
6987
|
+
} | undefined;
|
|
6922
6988
|
} | {
|
|
6923
6989
|
id: string;
|
|
6924
6990
|
transactionId: string;
|
|
@@ -7020,7 +7086,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7020
7086
|
createdByUserType: "system" | "user";
|
|
7021
7087
|
createdAt: string;
|
|
7022
7088
|
createdBy: string;
|
|
7023
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "
|
|
7089
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
7024
7090
|
status: "Rejected";
|
|
7025
7091
|
createdByRole?: string | undefined;
|
|
7026
7092
|
createdBySignature?: string | null | undefined;
|
|
@@ -7238,7 +7304,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7238
7304
|
count?: number | undefined;
|
|
7239
7305
|
timeStart?: string | undefined;
|
|
7240
7306
|
timeEnd?: string | undefined;
|
|
7241
|
-
actionTypes?: ("DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "
|
|
7307
|
+
actionTypes?: ("DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "NOTIFY" | "DUPLICATE_DETECTED" | "MARK_AS_NOT_DUPLICATE" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "ASSIGN" | "UNASSIGN")[] | undefined;
|
|
7242
7308
|
};
|
|
7243
7309
|
output: {
|
|
7244
7310
|
results: {
|
|
@@ -517,6 +517,9 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
517
517
|
originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
518
518
|
type: z.ZodLiteral<"APPROVE_CORRECTION">;
|
|
519
519
|
requestId: z.ZodString;
|
|
520
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
immediateCorrection: z.ZodOptional<z.ZodBoolean>;
|
|
522
|
+
}, z.core.$strip>>;
|
|
520
523
|
}, z.core.$strip>, z.ZodObject<{
|
|
521
524
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
522
525
|
transactionId: z.ZodString;
|
|
@@ -955,6 +958,9 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
|
|
|
955
958
|
originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
956
959
|
type: z.ZodLiteral<"APPROVE_CORRECTION">;
|
|
957
960
|
requestId: z.ZodString;
|
|
961
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
962
|
+
immediateCorrection: z.ZodOptional<z.ZodBoolean>;
|
|
963
|
+
}, z.core.$strip>>;
|
|
958
964
|
}, z.core.$strip>, z.ZodObject<{
|
|
959
965
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
960
966
|
transactionId: z.ZodString;
|
|
@@ -246,6 +246,9 @@ export declare const ApproveCorrectionActionInput: z.ZodObject<{
|
|
|
246
246
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
247
247
|
requestId: z.ZodString;
|
|
248
248
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
249
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
250
|
+
immediateCorrection: z.ZodOptional<z.ZodBoolean>;
|
|
251
|
+
}, z.core.$strip>>;
|
|
249
252
|
}, z.core.$strip>;
|
|
250
253
|
export type ApproveCorrectionActionInput = z.infer<typeof ApproveCorrectionActionInput>;
|
|
251
254
|
export declare const ReadActionInput: z.ZodObject<{
|
|
@@ -495,6 +498,9 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
495
498
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
496
499
|
requestId: z.ZodString;
|
|
497
500
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
501
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
502
|
+
immediateCorrection: z.ZodOptional<z.ZodBoolean>;
|
|
503
|
+
}, z.core.$strip>>;
|
|
498
504
|
}, z.core.$strip>, z.ZodObject<{
|
|
499
505
|
eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
500
506
|
transactionId: z.ZodString;
|
|
@@ -91,6 +91,63 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
91
91
|
validator: z.ZodAny;
|
|
92
92
|
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
93
93
|
}, z.core.$strip>>>;
|
|
94
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
96
|
+
administrativeArea: "administrativeArea";
|
|
97
|
+
location: "location";
|
|
98
|
+
all: "all";
|
|
99
|
+
}>, z.ZodObject<{
|
|
100
|
+
$scope: z.ZodEnum<{
|
|
101
|
+
"record.search": "record.search";
|
|
102
|
+
"record.create": "record.create";
|
|
103
|
+
"record.read": "record.read";
|
|
104
|
+
"record.declare": "record.declare";
|
|
105
|
+
"record.notify": "record.notify";
|
|
106
|
+
"record.edit": "record.edit";
|
|
107
|
+
"record.reject": "record.reject";
|
|
108
|
+
"record.archive": "record.archive";
|
|
109
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
110
|
+
"record.register": "record.register";
|
|
111
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
112
|
+
"record.request-correction": "record.request-correction";
|
|
113
|
+
"record.correct": "record.correct";
|
|
114
|
+
"record.unassign-others": "record.unassign-others";
|
|
115
|
+
"record.custom-action": "record.custom-action";
|
|
116
|
+
bypassratelimit: "bypassratelimit";
|
|
117
|
+
"record.reindex": "record.reindex";
|
|
118
|
+
"user.data-seeding": "user.data-seeding";
|
|
119
|
+
"integration.create": "integration.create";
|
|
120
|
+
"record.import": "record.import";
|
|
121
|
+
"config.update-all": "config.update-all";
|
|
122
|
+
"attachment.upload": "attachment.upload";
|
|
123
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
124
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
125
|
+
"performance.read": "performance.read";
|
|
126
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
127
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
128
|
+
"record.confirm-registration": "record.confirm-registration";
|
|
129
|
+
"record.reject-registration": "record.reject-registration";
|
|
130
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
131
|
+
"user.read": "user.read";
|
|
132
|
+
"user.create": "user.create";
|
|
133
|
+
"user.edit": "user.edit";
|
|
134
|
+
"user.search": "user.search";
|
|
135
|
+
workqueue: "workqueue";
|
|
136
|
+
"dashboard.view": "dashboard.view";
|
|
137
|
+
}>;
|
|
138
|
+
$option: z.ZodEnum<{
|
|
139
|
+
role: "role";
|
|
140
|
+
event: "event";
|
|
141
|
+
placeOfEvent: "placeOfEvent";
|
|
142
|
+
declaredIn: "declaredIn";
|
|
143
|
+
declaredBy: "declaredBy";
|
|
144
|
+
registeredIn: "registeredIn";
|
|
145
|
+
registeredBy: "registeredBy";
|
|
146
|
+
accessLevel: "accessLevel";
|
|
147
|
+
ids: "ids";
|
|
148
|
+
}>;
|
|
149
|
+
}, z.core.$strip>]>;
|
|
150
|
+
}, z.core.$strip>>;
|
|
94
151
|
fieldId: z.ZodString;
|
|
95
152
|
fieldType: z.ZodLiteral<"field">;
|
|
96
153
|
}, z.core.$strip>;
|
|
@@ -211,6 +268,63 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
211
268
|
validator: z.ZodAny;
|
|
212
269
|
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
213
270
|
}, z.core.$strip>>>;
|
|
271
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
272
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
273
|
+
administrativeArea: "administrativeArea";
|
|
274
|
+
location: "location";
|
|
275
|
+
all: "all";
|
|
276
|
+
}>, z.ZodObject<{
|
|
277
|
+
$scope: z.ZodEnum<{
|
|
278
|
+
"record.search": "record.search";
|
|
279
|
+
"record.create": "record.create";
|
|
280
|
+
"record.read": "record.read";
|
|
281
|
+
"record.declare": "record.declare";
|
|
282
|
+
"record.notify": "record.notify";
|
|
283
|
+
"record.edit": "record.edit";
|
|
284
|
+
"record.reject": "record.reject";
|
|
285
|
+
"record.archive": "record.archive";
|
|
286
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
287
|
+
"record.register": "record.register";
|
|
288
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
289
|
+
"record.request-correction": "record.request-correction";
|
|
290
|
+
"record.correct": "record.correct";
|
|
291
|
+
"record.unassign-others": "record.unassign-others";
|
|
292
|
+
"record.custom-action": "record.custom-action";
|
|
293
|
+
bypassratelimit: "bypassratelimit";
|
|
294
|
+
"record.reindex": "record.reindex";
|
|
295
|
+
"user.data-seeding": "user.data-seeding";
|
|
296
|
+
"integration.create": "integration.create";
|
|
297
|
+
"record.import": "record.import";
|
|
298
|
+
"config.update-all": "config.update-all";
|
|
299
|
+
"attachment.upload": "attachment.upload";
|
|
300
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
301
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
302
|
+
"performance.read": "performance.read";
|
|
303
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
304
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
305
|
+
"record.confirm-registration": "record.confirm-registration";
|
|
306
|
+
"record.reject-registration": "record.reject-registration";
|
|
307
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
308
|
+
"user.read": "user.read";
|
|
309
|
+
"user.create": "user.create";
|
|
310
|
+
"user.edit": "user.edit";
|
|
311
|
+
"user.search": "user.search";
|
|
312
|
+
workqueue: "workqueue";
|
|
313
|
+
"dashboard.view": "dashboard.view";
|
|
314
|
+
}>;
|
|
315
|
+
$option: z.ZodEnum<{
|
|
316
|
+
role: "role";
|
|
317
|
+
event: "event";
|
|
318
|
+
placeOfEvent: "placeOfEvent";
|
|
319
|
+
declaredIn: "declaredIn";
|
|
320
|
+
declaredBy: "declaredBy";
|
|
321
|
+
registeredIn: "registeredIn";
|
|
322
|
+
registeredBy: "registeredBy";
|
|
323
|
+
accessLevel: "accessLevel";
|
|
324
|
+
ids: "ids";
|
|
325
|
+
}>;
|
|
326
|
+
}, z.core.$strip>]>;
|
|
327
|
+
}, z.core.$strip>>;
|
|
214
328
|
fieldId: z.ZodEnum<{
|
|
215
329
|
"event.updatedAt": "event.updatedAt";
|
|
216
330
|
"event.status": "event.status";
|
|
@@ -307,6 +421,63 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
307
421
|
validator: z.ZodAny;
|
|
308
422
|
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
309
423
|
}, z.core.$strip>>>;
|
|
424
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
425
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
426
|
+
administrativeArea: "administrativeArea";
|
|
427
|
+
location: "location";
|
|
428
|
+
all: "all";
|
|
429
|
+
}>, z.ZodObject<{
|
|
430
|
+
$scope: z.ZodEnum<{
|
|
431
|
+
"record.search": "record.search";
|
|
432
|
+
"record.create": "record.create";
|
|
433
|
+
"record.read": "record.read";
|
|
434
|
+
"record.declare": "record.declare";
|
|
435
|
+
"record.notify": "record.notify";
|
|
436
|
+
"record.edit": "record.edit";
|
|
437
|
+
"record.reject": "record.reject";
|
|
438
|
+
"record.archive": "record.archive";
|
|
439
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
440
|
+
"record.register": "record.register";
|
|
441
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
442
|
+
"record.request-correction": "record.request-correction";
|
|
443
|
+
"record.correct": "record.correct";
|
|
444
|
+
"record.unassign-others": "record.unassign-others";
|
|
445
|
+
"record.custom-action": "record.custom-action";
|
|
446
|
+
bypassratelimit: "bypassratelimit";
|
|
447
|
+
"record.reindex": "record.reindex";
|
|
448
|
+
"user.data-seeding": "user.data-seeding";
|
|
449
|
+
"integration.create": "integration.create";
|
|
450
|
+
"record.import": "record.import";
|
|
451
|
+
"config.update-all": "config.update-all";
|
|
452
|
+
"attachment.upload": "attachment.upload";
|
|
453
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
454
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
455
|
+
"performance.read": "performance.read";
|
|
456
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
457
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
458
|
+
"record.confirm-registration": "record.confirm-registration";
|
|
459
|
+
"record.reject-registration": "record.reject-registration";
|
|
460
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
461
|
+
"user.read": "user.read";
|
|
462
|
+
"user.create": "user.create";
|
|
463
|
+
"user.edit": "user.edit";
|
|
464
|
+
"user.search": "user.search";
|
|
465
|
+
workqueue: "workqueue";
|
|
466
|
+
"dashboard.view": "dashboard.view";
|
|
467
|
+
}>;
|
|
468
|
+
$option: z.ZodEnum<{
|
|
469
|
+
role: "role";
|
|
470
|
+
event: "event";
|
|
471
|
+
placeOfEvent: "placeOfEvent";
|
|
472
|
+
declaredIn: "declaredIn";
|
|
473
|
+
declaredBy: "declaredBy";
|
|
474
|
+
registeredIn: "registeredIn";
|
|
475
|
+
registeredBy: "registeredBy";
|
|
476
|
+
accessLevel: "accessLevel";
|
|
477
|
+
ids: "ids";
|
|
478
|
+
}>;
|
|
479
|
+
}, z.core.$strip>]>;
|
|
480
|
+
}, z.core.$strip>>;
|
|
310
481
|
fieldId: z.ZodString;
|
|
311
482
|
fieldType: z.ZodLiteral<"field">;
|
|
312
483
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -395,6 +566,63 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
395
566
|
validator: z.ZodAny;
|
|
396
567
|
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
397
568
|
}, z.core.$strip>>>;
|
|
569
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
570
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
571
|
+
administrativeArea: "administrativeArea";
|
|
572
|
+
location: "location";
|
|
573
|
+
all: "all";
|
|
574
|
+
}>, z.ZodObject<{
|
|
575
|
+
$scope: z.ZodEnum<{
|
|
576
|
+
"record.search": "record.search";
|
|
577
|
+
"record.create": "record.create";
|
|
578
|
+
"record.read": "record.read";
|
|
579
|
+
"record.declare": "record.declare";
|
|
580
|
+
"record.notify": "record.notify";
|
|
581
|
+
"record.edit": "record.edit";
|
|
582
|
+
"record.reject": "record.reject";
|
|
583
|
+
"record.archive": "record.archive";
|
|
584
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
585
|
+
"record.register": "record.register";
|
|
586
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
587
|
+
"record.request-correction": "record.request-correction";
|
|
588
|
+
"record.correct": "record.correct";
|
|
589
|
+
"record.unassign-others": "record.unassign-others";
|
|
590
|
+
"record.custom-action": "record.custom-action";
|
|
591
|
+
bypassratelimit: "bypassratelimit";
|
|
592
|
+
"record.reindex": "record.reindex";
|
|
593
|
+
"user.data-seeding": "user.data-seeding";
|
|
594
|
+
"integration.create": "integration.create";
|
|
595
|
+
"record.import": "record.import";
|
|
596
|
+
"config.update-all": "config.update-all";
|
|
597
|
+
"attachment.upload": "attachment.upload";
|
|
598
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
599
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
600
|
+
"performance.read": "performance.read";
|
|
601
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
602
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
603
|
+
"record.confirm-registration": "record.confirm-registration";
|
|
604
|
+
"record.reject-registration": "record.reject-registration";
|
|
605
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
606
|
+
"user.read": "user.read";
|
|
607
|
+
"user.create": "user.create";
|
|
608
|
+
"user.edit": "user.edit";
|
|
609
|
+
"user.search": "user.search";
|
|
610
|
+
workqueue: "workqueue";
|
|
611
|
+
"dashboard.view": "dashboard.view";
|
|
612
|
+
}>;
|
|
613
|
+
$option: z.ZodEnum<{
|
|
614
|
+
role: "role";
|
|
615
|
+
event: "event";
|
|
616
|
+
placeOfEvent: "placeOfEvent";
|
|
617
|
+
declaredIn: "declaredIn";
|
|
618
|
+
declaredBy: "declaredBy";
|
|
619
|
+
registeredIn: "registeredIn";
|
|
620
|
+
registeredBy: "registeredBy";
|
|
621
|
+
accessLevel: "accessLevel";
|
|
622
|
+
ids: "ids";
|
|
623
|
+
}>;
|
|
624
|
+
}, z.core.$strip>]>;
|
|
625
|
+
}, z.core.$strip>>;
|
|
398
626
|
fieldId: z.ZodEnum<{
|
|
399
627
|
"event.updatedAt": "event.updatedAt";
|
|
400
628
|
"event.status": "event.status";
|
|
@@ -494,6 +722,63 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
494
722
|
validator: z.ZodAny;
|
|
495
723
|
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
496
724
|
}, z.core.$strip>>>;
|
|
725
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
726
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
727
|
+
administrativeArea: "administrativeArea";
|
|
728
|
+
location: "location";
|
|
729
|
+
all: "all";
|
|
730
|
+
}>, z.ZodObject<{
|
|
731
|
+
$scope: z.ZodEnum<{
|
|
732
|
+
"record.search": "record.search";
|
|
733
|
+
"record.create": "record.create";
|
|
734
|
+
"record.read": "record.read";
|
|
735
|
+
"record.declare": "record.declare";
|
|
736
|
+
"record.notify": "record.notify";
|
|
737
|
+
"record.edit": "record.edit";
|
|
738
|
+
"record.reject": "record.reject";
|
|
739
|
+
"record.archive": "record.archive";
|
|
740
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
741
|
+
"record.register": "record.register";
|
|
742
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
743
|
+
"record.request-correction": "record.request-correction";
|
|
744
|
+
"record.correct": "record.correct";
|
|
745
|
+
"record.unassign-others": "record.unassign-others";
|
|
746
|
+
"record.custom-action": "record.custom-action";
|
|
747
|
+
bypassratelimit: "bypassratelimit";
|
|
748
|
+
"record.reindex": "record.reindex";
|
|
749
|
+
"user.data-seeding": "user.data-seeding";
|
|
750
|
+
"integration.create": "integration.create";
|
|
751
|
+
"record.import": "record.import";
|
|
752
|
+
"config.update-all": "config.update-all";
|
|
753
|
+
"attachment.upload": "attachment.upload";
|
|
754
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
755
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
756
|
+
"performance.read": "performance.read";
|
|
757
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
758
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
759
|
+
"record.confirm-registration": "record.confirm-registration";
|
|
760
|
+
"record.reject-registration": "record.reject-registration";
|
|
761
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
762
|
+
"user.read": "user.read";
|
|
763
|
+
"user.create": "user.create";
|
|
764
|
+
"user.edit": "user.edit";
|
|
765
|
+
"user.search": "user.search";
|
|
766
|
+
workqueue: "workqueue";
|
|
767
|
+
"dashboard.view": "dashboard.view";
|
|
768
|
+
}>;
|
|
769
|
+
$option: z.ZodEnum<{
|
|
770
|
+
role: "role";
|
|
771
|
+
event: "event";
|
|
772
|
+
placeOfEvent: "placeOfEvent";
|
|
773
|
+
declaredIn: "declaredIn";
|
|
774
|
+
declaredBy: "declaredBy";
|
|
775
|
+
registeredIn: "registeredIn";
|
|
776
|
+
registeredBy: "registeredBy";
|
|
777
|
+
accessLevel: "accessLevel";
|
|
778
|
+
ids: "ids";
|
|
779
|
+
}>;
|
|
780
|
+
}, z.core.$strip>]>;
|
|
781
|
+
}, z.core.$strip>>;
|
|
497
782
|
fieldId: z.ZodString;
|
|
498
783
|
fieldType: z.ZodLiteral<"field">;
|
|
499
784
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -582,6 +867,63 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
582
867
|
validator: z.ZodAny;
|
|
583
868
|
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
584
869
|
}, z.core.$strip>>>;
|
|
870
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
871
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
872
|
+
administrativeArea: "administrativeArea";
|
|
873
|
+
location: "location";
|
|
874
|
+
all: "all";
|
|
875
|
+
}>, z.ZodObject<{
|
|
876
|
+
$scope: z.ZodEnum<{
|
|
877
|
+
"record.search": "record.search";
|
|
878
|
+
"record.create": "record.create";
|
|
879
|
+
"record.read": "record.read";
|
|
880
|
+
"record.declare": "record.declare";
|
|
881
|
+
"record.notify": "record.notify";
|
|
882
|
+
"record.edit": "record.edit";
|
|
883
|
+
"record.reject": "record.reject";
|
|
884
|
+
"record.archive": "record.archive";
|
|
885
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
886
|
+
"record.register": "record.register";
|
|
887
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
888
|
+
"record.request-correction": "record.request-correction";
|
|
889
|
+
"record.correct": "record.correct";
|
|
890
|
+
"record.unassign-others": "record.unassign-others";
|
|
891
|
+
"record.custom-action": "record.custom-action";
|
|
892
|
+
bypassratelimit: "bypassratelimit";
|
|
893
|
+
"record.reindex": "record.reindex";
|
|
894
|
+
"user.data-seeding": "user.data-seeding";
|
|
895
|
+
"integration.create": "integration.create";
|
|
896
|
+
"record.import": "record.import";
|
|
897
|
+
"config.update-all": "config.update-all";
|
|
898
|
+
"attachment.upload": "attachment.upload";
|
|
899
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
900
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
901
|
+
"performance.read": "performance.read";
|
|
902
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
903
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
904
|
+
"record.confirm-registration": "record.confirm-registration";
|
|
905
|
+
"record.reject-registration": "record.reject-registration";
|
|
906
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
907
|
+
"user.read": "user.read";
|
|
908
|
+
"user.create": "user.create";
|
|
909
|
+
"user.edit": "user.edit";
|
|
910
|
+
"user.search": "user.search";
|
|
911
|
+
workqueue: "workqueue";
|
|
912
|
+
"dashboard.view": "dashboard.view";
|
|
913
|
+
}>;
|
|
914
|
+
$option: z.ZodEnum<{
|
|
915
|
+
role: "role";
|
|
916
|
+
event: "event";
|
|
917
|
+
placeOfEvent: "placeOfEvent";
|
|
918
|
+
declaredIn: "declaredIn";
|
|
919
|
+
declaredBy: "declaredBy";
|
|
920
|
+
registeredIn: "registeredIn";
|
|
921
|
+
registeredBy: "registeredBy";
|
|
922
|
+
accessLevel: "accessLevel";
|
|
923
|
+
ids: "ids";
|
|
924
|
+
}>;
|
|
925
|
+
}, z.core.$strip>]>;
|
|
926
|
+
}, z.core.$strip>>;
|
|
585
927
|
fieldId: z.ZodEnum<{
|
|
586
928
|
"event.updatedAt": "event.updatedAt";
|
|
587
929
|
"event.status": "event.status";
|
|
@@ -274,6 +274,9 @@ export declare const EventDocument: z.ZodObject<{
|
|
|
274
274
|
originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
275
275
|
type: z.ZodLiteral<"APPROVE_CORRECTION">;
|
|
276
276
|
requestId: z.ZodString;
|
|
277
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
278
|
+
immediateCorrection: z.ZodOptional<z.ZodBoolean>;
|
|
279
|
+
}, z.core.$strip>>;
|
|
277
280
|
}, z.core.$strip>, z.ZodObject<{
|
|
278
281
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
279
282
|
transactionId: z.ZodString;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormConditionalParameters } from '../conditionals/conditionals';
|
|
2
2
|
import { FieldConditional } from './Conditional';
|
|
3
3
|
import { TranslationConfig } from './TranslationConfig';
|
|
4
|
+
import { JurisdictionReference } from '../users/userReferences';
|
|
4
5
|
import { ComputedDefaultValue, SelectOption, ValidationConfig } from './FieldConfig';
|
|
5
6
|
/**
|
|
6
7
|
* Creates a {@link ComputedDefaultValue} descriptor for use in a field's `defaultValue`.
|
|
@@ -35,12 +36,14 @@ export declare function field(fieldId: string, options?: {
|
|
|
35
36
|
conditionals?: FieldConditional[];
|
|
36
37
|
validations?: ValidationConfig[];
|
|
37
38
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
39
|
+
allowedLocations?: JurisdictionReference;
|
|
38
40
|
}): {
|
|
39
41
|
range: () => {
|
|
40
42
|
options?: SelectOption[];
|
|
41
43
|
conditionals?: FieldConditional[];
|
|
42
44
|
validations?: ValidationConfig[];
|
|
43
45
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
46
|
+
allowedLocations?: JurisdictionReference;
|
|
44
47
|
fieldId: string;
|
|
45
48
|
fieldType: "field";
|
|
46
49
|
} & {
|
|
@@ -53,6 +56,7 @@ export declare function field(fieldId: string, options?: {
|
|
|
53
56
|
conditionals?: FieldConditional[];
|
|
54
57
|
validations?: ValidationConfig[];
|
|
55
58
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
59
|
+
allowedLocations?: JurisdictionReference;
|
|
56
60
|
fieldId: string;
|
|
57
61
|
fieldType: "field";
|
|
58
62
|
} & {
|
|
@@ -65,6 +69,7 @@ export declare function field(fieldId: string, options?: {
|
|
|
65
69
|
conditionals?: FieldConditional[];
|
|
66
70
|
validations?: ValidationConfig[];
|
|
67
71
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
72
|
+
allowedLocations?: JurisdictionReference;
|
|
68
73
|
fieldId: string;
|
|
69
74
|
fieldType: "field";
|
|
70
75
|
} & {
|
|
@@ -77,6 +82,7 @@ export declare function field(fieldId: string, options?: {
|
|
|
77
82
|
conditionals?: FieldConditional[];
|
|
78
83
|
validations?: ValidationConfig[];
|
|
79
84
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
85
|
+
allowedLocations?: JurisdictionReference;
|
|
80
86
|
fieldId: string;
|
|
81
87
|
fieldType: "field";
|
|
82
88
|
} & {
|
|
@@ -241,6 +241,9 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
|
|
|
241
241
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
242
242
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
243
243
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
244
|
+
content?: {
|
|
245
|
+
immediateCorrection?: boolean | undefined;
|
|
246
|
+
} | undefined;
|
|
244
247
|
} | {
|
|
245
248
|
id: string & import("zod").$brand<"UUID">;
|
|
246
249
|
transactionId: string;
|
|
@@ -386,6 +386,9 @@ export declare function findLastAssignmentAction(actions: Action[]): {
|
|
|
386
386
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
387
387
|
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
|
|
388
388
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
389
|
+
content?: {
|
|
390
|
+
immediateCorrection?: boolean | undefined;
|
|
391
|
+
} | undefined;
|
|
389
392
|
} | {
|
|
390
393
|
id: string & import("zod").$brand<"UUID">;
|
|
391
394
|
transactionId: string;
|
|
@@ -560,6 +563,14 @@ export declare function timePeriodToDateRange(value: SelectDateRangeValue): {
|
|
|
560
563
|
export declare function mergeDrafts(currentDraft: Draft, incomingDraft: Draft): Draft;
|
|
561
564
|
export declare function getPendingAction(actions: Action[]): ActionDocument;
|
|
562
565
|
export declare function getCompleteActionAnnotation(event: EventDocument, action: ActionDocument): ActionUpdate;
|
|
566
|
+
/**
|
|
567
|
+
* Resolves the complete content for an action, inheriting from its original
|
|
568
|
+
* Requested action when the Accepted action carries no content of its own.
|
|
569
|
+
*
|
|
570
|
+
* Mirrors the same "originalActionId → merge from Requested" pattern used by
|
|
571
|
+
* getCompleteActionAnnotation and getCompleteActionDeclaration.
|
|
572
|
+
*/
|
|
573
|
+
export declare function getCompleteActionContent(event: EventDocument, action: ActionDocument): Record<string, unknown> | null | undefined;
|
|
563
574
|
export declare function getCompleteActionDeclaration<T extends EventState | ActionUpdate>(declaration: T, event: EventDocument, action: ActionDocument): T;
|
|
564
575
|
export declare function getAcceptedActions(event: EventDocument): ActionDocument[];
|
|
565
576
|
export declare function aggregateActionDeclarations(event: EventDocument): EventState;
|
package/dist/events/index.js
CHANGED
|
@@ -321,6 +321,7 @@ __export(events_exports, {
|
|
|
321
321
|
getAvailableActionsForEvent: () => getAvailableActionsForEvent,
|
|
322
322
|
getAvailableRolesForUserUpdatePayload: () => getAvailableRolesForUserUpdatePayload,
|
|
323
323
|
getCompleteActionAnnotation: () => getCompleteActionAnnotation,
|
|
324
|
+
getCompleteActionContent: () => getCompleteActionContent,
|
|
324
325
|
getCompleteActionDeclaration: () => getCompleteActionDeclaration,
|
|
325
326
|
getCurrentEventState: () => getCurrentEventState,
|
|
326
327
|
getCustomActionFields: () => getCustomActionFields,
|
|
@@ -710,14 +711,20 @@ var unflattenScope = (input) => {
|
|
|
710
711
|
return { type, options };
|
|
711
712
|
};
|
|
712
713
|
var EncodedScope = z2.string().brand("EncodedScope");
|
|
713
|
-
var
|
|
714
|
-
|
|
714
|
+
var decodedScopeCache = /* @__PURE__ */ new Map();
|
|
715
|
+
var decodeScope = (encodedScope) => {
|
|
716
|
+
if (decodedScopeCache.has(encodedScope)) {
|
|
717
|
+
return decodedScopeCache.get(encodedScope);
|
|
718
|
+
}
|
|
719
|
+
const scope = qs.parse(encodedScope, {
|
|
715
720
|
ignoreQueryPrefix: true,
|
|
716
721
|
comma: true,
|
|
717
722
|
allowDots: true
|
|
718
723
|
});
|
|
719
724
|
const unflattenedScope = unflattenScope(scope);
|
|
720
|
-
|
|
725
|
+
const result = Scope.safeParse(unflattenedScope)?.data;
|
|
726
|
+
decodedScopeCache.set(encodedScope, result);
|
|
727
|
+
return result;
|
|
721
728
|
};
|
|
722
729
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
723
730
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
@@ -1666,8 +1673,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
1666
1673
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
1667
1674
|
z14.object({
|
|
1668
1675
|
type: z14.literal(ActionType.APPROVE_CORRECTION),
|
|
1669
|
-
requestId: z14.string()
|
|
1676
|
+
requestId: z14.string(),
|
|
1670
1677
|
// TODO move into 'content' property
|
|
1678
|
+
content: z14.object({ immediateCorrection: z14.boolean().optional() }).optional()
|
|
1671
1679
|
}).shape
|
|
1672
1680
|
);
|
|
1673
1681
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
@@ -3472,6 +3480,9 @@ var BaseField3 = z28.object({
|
|
|
3472
3480
|
),
|
|
3473
3481
|
validations: z28.array(ValidationConfig).optional().describe(
|
|
3474
3482
|
`Option for overriding the field validations specifically for advanced search form.`
|
|
3483
|
+
),
|
|
3484
|
+
allowedLocations: JurisdictionReference.optional().describe(
|
|
3485
|
+
`Override the allowedLocations for a location field in advanced search. Use this when the declaration form's allowedLocations references a scope (e.g. record.create) that search-only users don't have \u2014 specify record.search scope instead.`
|
|
3475
3486
|
)
|
|
3476
3487
|
});
|
|
3477
3488
|
var SearchQueryParams = z28.object({
|
|
@@ -3546,9 +3557,11 @@ var z30 = __toESM(require("zod/v4"));
|
|
|
3546
3557
|
var z29 = __toESM(require("zod/v4"));
|
|
3547
3558
|
function getDynamicNameValue(field3) {
|
|
3548
3559
|
const nameConfiguration = field3.configuration?.name;
|
|
3560
|
+
const firstnameRequired = nameConfiguration?.firstname?.required ?? field3.required;
|
|
3561
|
+
const surnameRequired = nameConfiguration?.surname?.required ?? field3.required;
|
|
3549
3562
|
return z29.object({
|
|
3550
|
-
firstname:
|
|
3551
|
-
surname:
|
|
3563
|
+
firstname: firstnameRequired ? NonEmptyTextValue : TextValue,
|
|
3564
|
+
surname: surnameRequired ? NonEmptyTextValue : TextValue,
|
|
3552
3565
|
middlename: nameConfiguration?.middlename?.required ? NonEmptyTextValue : TextValue.optional()
|
|
3553
3566
|
});
|
|
3554
3567
|
}
|
|
@@ -4813,6 +4826,22 @@ function getCompleteActionAnnotation(event2, action) {
|
|
|
4813
4826
|
}
|
|
4814
4827
|
return action.annotation ?? {};
|
|
4815
4828
|
}
|
|
4829
|
+
function getCompleteActionContent(event2, action) {
|
|
4830
|
+
const currentContent = "content" in action ? action.content : void 0;
|
|
4831
|
+
if (!action.originalActionId) {
|
|
4832
|
+
return currentContent;
|
|
4833
|
+
}
|
|
4834
|
+
const originalAction = event2.actions.find(
|
|
4835
|
+
({ id }) => id === action.originalActionId
|
|
4836
|
+
);
|
|
4837
|
+
if (originalAction && "content" in originalAction && originalAction.content) {
|
|
4838
|
+
return {
|
|
4839
|
+
...originalAction.content,
|
|
4840
|
+
...currentContent ?? {}
|
|
4841
|
+
};
|
|
4842
|
+
}
|
|
4843
|
+
return currentContent;
|
|
4844
|
+
}
|
|
4816
4845
|
function getCompleteActionDeclaration(declaration, event2, action) {
|
|
4817
4846
|
if (action.originalActionId) {
|
|
4818
4847
|
const originalAction = event2.actions.find(
|
|
@@ -6306,7 +6335,8 @@ var RejectCorrectionActionInput = BaseActionInput.extend(
|
|
|
6306
6335
|
var ApproveCorrectionActionInput = BaseActionInput.extend(
|
|
6307
6336
|
z38.object({
|
|
6308
6337
|
requestId: z38.string(),
|
|
6309
|
-
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION)
|
|
6338
|
+
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION),
|
|
6339
|
+
content: z38.object({ immediateCorrection: z38.boolean().optional() }).optional()
|
|
6310
6340
|
}).shape
|
|
6311
6341
|
);
|
|
6312
6342
|
var ReadActionInput = BaseActionInput.extend(
|
|
@@ -2394,14 +2394,20 @@ var encodeScope = (scope) => {
|
|
|
2394
2394
|
encode: false
|
|
2395
2395
|
});
|
|
2396
2396
|
};
|
|
2397
|
-
var
|
|
2398
|
-
|
|
2397
|
+
var decodedScopeCache = /* @__PURE__ */ new Map();
|
|
2398
|
+
var decodeScope = (encodedScope) => {
|
|
2399
|
+
if (decodedScopeCache.has(encodedScope)) {
|
|
2400
|
+
return decodedScopeCache.get(encodedScope);
|
|
2401
|
+
}
|
|
2402
|
+
const scope = qs.parse(encodedScope, {
|
|
2399
2403
|
ignoreQueryPrefix: true,
|
|
2400
2404
|
comma: true,
|
|
2401
2405
|
allowDots: true
|
|
2402
2406
|
});
|
|
2403
2407
|
const unflattenedScope = unflattenScope(scope);
|
|
2404
|
-
|
|
2408
|
+
const result = Scope2.safeParse(unflattenedScope)?.data;
|
|
2409
|
+
decodedScopeCache.set(encodedScope, result);
|
|
2410
|
+
return result;
|
|
2405
2411
|
};
|
|
2406
2412
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2407
2413
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
@@ -1216,8 +1216,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
1216
1216
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
1217
1217
|
z14.object({
|
|
1218
1218
|
type: z14.literal(ActionType.APPROVE_CORRECTION),
|
|
1219
|
-
requestId: z14.string()
|
|
1219
|
+
requestId: z14.string(),
|
|
1220
1220
|
// TODO move into 'content' property
|
|
1221
|
+
content: z14.object({ immediateCorrection: z14.boolean().optional() }).optional()
|
|
1221
1222
|
}).shape
|
|
1222
1223
|
);
|
|
1223
1224
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
@@ -2937,6 +2938,9 @@ var BaseField3 = z28.object({
|
|
|
2937
2938
|
),
|
|
2938
2939
|
validations: z28.array(ValidationConfig).optional().describe(
|
|
2939
2940
|
`Option for overriding the field validations specifically for advanced search form.`
|
|
2941
|
+
),
|
|
2942
|
+
allowedLocations: JurisdictionReference.optional().describe(
|
|
2943
|
+
`Override the allowedLocations for a location field in advanced search. Use this when the declaration form's allowedLocations references a scope (e.g. record.create) that search-only users don't have \u2014 specify record.search scope instead.`
|
|
2940
2944
|
)
|
|
2941
2945
|
});
|
|
2942
2946
|
var SearchQueryParams = z28.object({
|
|
@@ -4580,7 +4584,8 @@ var RejectCorrectionActionInput = BaseActionInput.extend(
|
|
|
4580
4584
|
var ApproveCorrectionActionInput = BaseActionInput.extend(
|
|
4581
4585
|
z38.object({
|
|
4582
4586
|
requestId: z38.string(),
|
|
4583
|
-
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION)
|
|
4587
|
+
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION),
|
|
4588
|
+
content: z38.object({ immediateCorrection: z38.boolean().optional() }).optional()
|
|
4584
4589
|
}).shape
|
|
4585
4590
|
);
|
|
4586
4591
|
var ReadActionInput = BaseActionInput.extend(
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -580,14 +580,12 @@ export type EncodedScope = z.infer<typeof EncodedScope>;
|
|
|
580
580
|
*/
|
|
581
581
|
export declare const encodeScope: (scope: Scope) => EncodedScope;
|
|
582
582
|
/**
|
|
583
|
-
* Converts
|
|
583
|
+
* Converts an encoded scope string into a scope object.
|
|
584
584
|
*
|
|
585
|
-
* @
|
|
586
|
-
*
|
|
587
|
-
* @param scope - The scope object to encode.
|
|
588
|
-
* @returns The encoded scope as a branded string (`EncodedScope`).
|
|
585
|
+
* @param scope - The encoded scope string to decode.
|
|
586
|
+
* @returns The decoded scope object.
|
|
589
587
|
*/
|
|
590
|
-
export declare const decodeScope: (
|
|
588
|
+
export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
591
589
|
type: "record.create" | "record.declare" | "record.notify";
|
|
592
590
|
options?: {
|
|
593
591
|
event?: string[] | undefined;
|
package/dist/scopes/index.js
CHANGED
|
@@ -354,14 +354,20 @@ var encodeScope = (scope) => {
|
|
|
354
354
|
encode: false
|
|
355
355
|
});
|
|
356
356
|
};
|
|
357
|
-
var
|
|
358
|
-
|
|
357
|
+
var decodedScopeCache = /* @__PURE__ */ new Map();
|
|
358
|
+
var decodeScope = (encodedScope) => {
|
|
359
|
+
if (decodedScopeCache.has(encodedScope)) {
|
|
360
|
+
return decodedScopeCache.get(encodedScope);
|
|
361
|
+
}
|
|
362
|
+
const scope = qs.parse(encodedScope, {
|
|
359
363
|
ignoreQueryPrefix: true,
|
|
360
364
|
comma: true,
|
|
361
365
|
allowDots: true
|
|
362
366
|
});
|
|
363
367
|
const unflattenedScope = unflattenScope(scope);
|
|
364
|
-
|
|
368
|
+
const result = Scope2.safeParse(unflattenedScope)?.data;
|
|
369
|
+
decodedScopeCache.set(encodedScope, result);
|
|
370
|
+
return result;
|
|
365
371
|
};
|
|
366
372
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
367
373
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|