@opencrvs/toolkit 2.1.0-rc.b89dfd1 → 2.1.0-rc.bb6887b
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 +0 -48
- package/dist/commons/api/router.d.ts +48 -65
- package/dist/commons/events/ActionConfig.d.ts +7 -0
- package/dist/commons/events/ActionDocument.d.ts +6 -6
- package/dist/commons/events/ActionInput.d.ts +0 -6
- package/dist/commons/events/EventDocument.d.ts +2 -2
- package/dist/commons/events/locations.d.ts +93 -3
- package/dist/commons/events/mocks.test.utils.d.ts +16 -2
- package/dist/commons/events/test.utils.d.ts +5 -8
- package/dist/commons/events/utils.d.ts +10 -2
- package/dist/environment/derived-variables.d.ts +0 -12
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +0 -14
- package/dist/environment/setup-environment.js +0 -14
- package/dist/events/index.js +91 -70
- package/dist/notification/index.js +63 -68
- package/dist/templates/charts-values/dependencies/values.yaml +0 -3
- package/dist/templates/charts-values/opencrvs-services/values.yaml +0 -4
- package/opencrvs-toolkit-2.1.0-rc.bb6887b.tgz +0 -0
- package/package.json +4 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.b89dfd1.tgz +0 -0
|
@@ -989,9 +989,10 @@ var NotifiedAction = ActionBase.extend(
|
|
|
989
989
|
var EditAction = ActionBase.extend(
|
|
990
990
|
z13.object({
|
|
991
991
|
type: z13.literal(ActionType.EDIT),
|
|
992
|
+
/** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
|
|
992
993
|
content: z13.object({
|
|
993
994
|
comment: z13.string().describe("Comment for the edit action.").optional()
|
|
994
|
-
})
|
|
995
|
+
}).optional()
|
|
995
996
|
}).shape
|
|
996
997
|
);
|
|
997
998
|
var PrintContent = z13.object({
|
package/dist/cli.js
CHANGED
|
@@ -380,20 +380,6 @@ var init_derived_variables = __esm({
|
|
|
380
380
|
type: "disabled",
|
|
381
381
|
scope: "ENVIRONMENT"
|
|
382
382
|
},
|
|
383
|
-
{
|
|
384
|
-
name: "MONGODB_ADMIN_USER",
|
|
385
|
-
valueLabel: "MONGODB_ADMIN_USER",
|
|
386
|
-
valueType: "SECRET",
|
|
387
|
-
type: "disabled",
|
|
388
|
-
scope: "ENVIRONMENT"
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
name: "MONGODB_ADMIN_PASSWORD",
|
|
392
|
-
valueLabel: "MONGODB_ADMIN_PASSWORD",
|
|
393
|
-
valueType: "SECRET",
|
|
394
|
-
type: "disabled",
|
|
395
|
-
scope: "ENVIRONMENT"
|
|
396
|
-
},
|
|
397
383
|
{
|
|
398
384
|
name: "POSTGRES_USER",
|
|
399
385
|
valueLabel: "POSTGRES_USER",
|
|
@@ -2290,40 +2276,6 @@ var init_setup_environment = __esm({
|
|
|
2290
2276
|
),
|
|
2291
2277
|
scope: "ENVIRONMENT"
|
|
2292
2278
|
},
|
|
2293
|
-
{
|
|
2294
|
-
name: "MONGODB_ADMIN_USER",
|
|
2295
|
-
type: "SECRET",
|
|
2296
|
-
didExist: findExistingValue(
|
|
2297
|
-
"MONGODB_ADMIN_USER",
|
|
2298
|
-
"SECRET",
|
|
2299
|
-
"ENVIRONMENT",
|
|
2300
|
-
existingValues
|
|
2301
|
-
),
|
|
2302
|
-
value: findExistingOrDefine(
|
|
2303
|
-
"MONGODB_ADMIN_USER",
|
|
2304
|
-
"SECRET",
|
|
2305
|
-
"ENVIRONMENT",
|
|
2306
|
-
generateLongPassword()
|
|
2307
|
-
),
|
|
2308
|
-
scope: "ENVIRONMENT"
|
|
2309
|
-
},
|
|
2310
|
-
{
|
|
2311
|
-
name: "MONGODB_ADMIN_PASSWORD",
|
|
2312
|
-
type: "SECRET",
|
|
2313
|
-
didExist: findExistingValue(
|
|
2314
|
-
"MONGODB_ADMIN_PASSWORD",
|
|
2315
|
-
"SECRET",
|
|
2316
|
-
"ENVIRONMENT",
|
|
2317
|
-
existingValues
|
|
2318
|
-
),
|
|
2319
|
-
value: findExistingOrDefine(
|
|
2320
|
-
"MONGODB_ADMIN_PASSWORD",
|
|
2321
|
-
"SECRET",
|
|
2322
|
-
"ENVIRONMENT",
|
|
2323
|
-
generateLongPassword()
|
|
2324
|
-
),
|
|
2325
|
-
scope: "ENVIRONMENT"
|
|
2326
|
-
},
|
|
2327
2279
|
{
|
|
2328
2280
|
name: "POSTGRES_USER",
|
|
2329
2281
|
type: "SECRET",
|
|
@@ -407,9 +407,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
407
407
|
status: "Accepted" | "Rejected" | "Requested";
|
|
408
408
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
409
409
|
type: "EDIT";
|
|
410
|
-
content
|
|
410
|
+
content?: {
|
|
411
411
|
comment?: string | undefined;
|
|
412
|
-
};
|
|
412
|
+
} | undefined;
|
|
413
413
|
} | {
|
|
414
414
|
id: string & import("zod").$brand<"UUID">;
|
|
415
415
|
transactionId: string;
|
|
@@ -733,9 +733,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
733
733
|
status: "Accepted" | "Rejected" | "Requested";
|
|
734
734
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
735
735
|
type: "EDIT";
|
|
736
|
-
content
|
|
736
|
+
content?: {
|
|
737
737
|
comment?: string | undefined;
|
|
738
|
-
};
|
|
738
|
+
} | undefined;
|
|
739
739
|
} | {
|
|
740
740
|
id: string & import("zod").$brand<"UUID">;
|
|
741
741
|
transactionId: string;
|
|
@@ -1058,9 +1058,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1058
1058
|
status: "Accepted" | "Rejected" | "Requested";
|
|
1059
1059
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1060
1060
|
type: "EDIT";
|
|
1061
|
-
content
|
|
1061
|
+
content?: {
|
|
1062
1062
|
comment?: string | undefined;
|
|
1063
|
-
};
|
|
1063
|
+
} | undefined;
|
|
1064
1064
|
} | {
|
|
1065
1065
|
id: string & import("zod").$brand<"UUID">;
|
|
1066
1066
|
transactionId: string;
|
|
@@ -1491,9 +1491,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1491
1491
|
waitFor?: boolean | undefined;
|
|
1492
1492
|
createdAtLocation?: string | null | undefined;
|
|
1493
1493
|
type?: "EDIT" | undefined;
|
|
1494
|
-
content: {
|
|
1495
|
-
comment?: string | undefined;
|
|
1496
|
-
};
|
|
1497
1494
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
1498
1495
|
actionId: string;
|
|
1499
1496
|
};
|
|
@@ -1832,9 +1829,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1832
1829
|
status: "Accepted" | "Rejected" | "Requested";
|
|
1833
1830
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1834
1831
|
type: "EDIT";
|
|
1835
|
-
content
|
|
1832
|
+
content?: {
|
|
1836
1833
|
comment?: string | undefined;
|
|
1837
|
-
};
|
|
1834
|
+
} | undefined;
|
|
1838
1835
|
} | {
|
|
1839
1836
|
id: string & import("zod").$brand<"UUID">;
|
|
1840
1837
|
transactionId: string;
|
|
@@ -2149,9 +2146,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2149
2146
|
waitFor?: boolean | undefined;
|
|
2150
2147
|
createdAtLocation?: string | null | undefined;
|
|
2151
2148
|
type?: "EDIT" | undefined;
|
|
2152
|
-
content: {
|
|
2153
|
-
comment?: string | undefined;
|
|
2154
|
-
};
|
|
2155
2149
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
2156
2150
|
actionId: string;
|
|
2157
2151
|
};
|
|
@@ -2468,9 +2462,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2468
2462
|
status: "Accepted" | "Rejected" | "Requested";
|
|
2469
2463
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
2470
2464
|
type: "EDIT";
|
|
2471
|
-
content
|
|
2465
|
+
content?: {
|
|
2472
2466
|
comment?: string | undefined;
|
|
2473
|
-
};
|
|
2467
|
+
} | undefined;
|
|
2474
2468
|
} | {
|
|
2475
2469
|
id: string & import("zod").$brand<"UUID">;
|
|
2476
2470
|
transactionId: string;
|
|
@@ -2790,9 +2784,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2790
2784
|
waitFor?: boolean | undefined;
|
|
2791
2785
|
createdAtLocation?: string | null | undefined;
|
|
2792
2786
|
type?: "EDIT" | undefined;
|
|
2793
|
-
content: {
|
|
2794
|
-
comment?: string | undefined;
|
|
2795
|
-
};
|
|
2796
2787
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
2797
2788
|
actionId: string;
|
|
2798
2789
|
};
|
|
@@ -3097,9 +3088,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3097
3088
|
waitFor?: boolean | undefined;
|
|
3098
3089
|
createdAtLocation?: string | null | undefined;
|
|
3099
3090
|
type?: "EDIT" | undefined;
|
|
3100
|
-
content: {
|
|
3101
|
-
comment?: string | undefined;
|
|
3102
|
-
};
|
|
3103
3091
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
3104
3092
|
actionId: string;
|
|
3105
3093
|
};
|
|
@@ -3404,9 +3392,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3404
3392
|
waitFor?: boolean | undefined;
|
|
3405
3393
|
createdAtLocation?: string | null | undefined;
|
|
3406
3394
|
type?: "EDIT" | undefined;
|
|
3407
|
-
content: {
|
|
3408
|
-
comment?: string | undefined;
|
|
3409
|
-
};
|
|
3410
3395
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
3411
3396
|
actionId: string;
|
|
3412
3397
|
};
|
|
@@ -3711,9 +3696,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3711
3696
|
waitFor?: boolean | undefined;
|
|
3712
3697
|
createdAtLocation?: string | null | undefined;
|
|
3713
3698
|
type?: "EDIT" | undefined;
|
|
3714
|
-
content: {
|
|
3715
|
-
comment?: string | undefined;
|
|
3716
|
-
};
|
|
3717
3699
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
3718
3700
|
actionId: string;
|
|
3719
3701
|
};
|
|
@@ -4018,9 +4000,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4018
4000
|
waitFor?: boolean | undefined;
|
|
4019
4001
|
createdAtLocation?: string | null | undefined;
|
|
4020
4002
|
type?: "EDIT" | undefined;
|
|
4021
|
-
content: {
|
|
4022
|
-
comment?: string | undefined;
|
|
4023
|
-
};
|
|
4024
4003
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
4025
4004
|
actionId: string;
|
|
4026
4005
|
};
|
|
@@ -4325,9 +4304,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4325
4304
|
waitFor?: boolean | undefined;
|
|
4326
4305
|
createdAtLocation?: string | null | undefined;
|
|
4327
4306
|
type?: "EDIT" | undefined;
|
|
4328
|
-
content: {
|
|
4329
|
-
comment?: string | undefined;
|
|
4330
|
-
};
|
|
4331
4307
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
4332
4308
|
actionId: string;
|
|
4333
4309
|
};
|
|
@@ -4627,9 +4603,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4627
4603
|
waitFor?: boolean | undefined;
|
|
4628
4604
|
createdAtLocation?: string | null | undefined;
|
|
4629
4605
|
type?: "EDIT" | undefined;
|
|
4630
|
-
content: {
|
|
4631
|
-
comment?: string | undefined;
|
|
4632
|
-
};
|
|
4633
4606
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
4634
4607
|
actionId: string;
|
|
4635
4608
|
};
|
|
@@ -4947,9 +4920,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4947
4920
|
status: "Accepted" | "Rejected" | "Requested";
|
|
4948
4921
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4949
4922
|
type: "EDIT";
|
|
4950
|
-
content
|
|
4923
|
+
content?: {
|
|
4951
4924
|
comment?: string | undefined;
|
|
4952
|
-
};
|
|
4925
|
+
} | undefined;
|
|
4953
4926
|
} | {
|
|
4954
4927
|
id: string & import("zod").$brand<"UUID">;
|
|
4955
4928
|
transactionId: string;
|
|
@@ -5305,9 +5278,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5305
5278
|
status: "Accepted" | "Rejected" | "Requested";
|
|
5306
5279
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
5307
5280
|
type: "EDIT";
|
|
5308
|
-
content
|
|
5281
|
+
content?: {
|
|
5309
5282
|
comment?: string | undefined;
|
|
5310
|
-
};
|
|
5283
|
+
} | undefined;
|
|
5311
5284
|
} | {
|
|
5312
5285
|
id: string & import("zod").$brand<"UUID">;
|
|
5313
5286
|
transactionId: string;
|
|
@@ -5640,9 +5613,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5640
5613
|
status: "Accepted" | "Rejected" | "Requested";
|
|
5641
5614
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
5642
5615
|
type: "EDIT";
|
|
5643
|
-
content
|
|
5616
|
+
content?: {
|
|
5644
5617
|
comment?: string | undefined;
|
|
5645
|
-
};
|
|
5618
|
+
} | undefined;
|
|
5646
5619
|
} | {
|
|
5647
5620
|
id: string & import("zod").$brand<"UUID">;
|
|
5648
5621
|
transactionId: string;
|
|
@@ -5984,9 +5957,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5984
5957
|
waitFor?: boolean | undefined;
|
|
5985
5958
|
createdAtLocation?: string | null | undefined;
|
|
5986
5959
|
type?: "EDIT" | undefined;
|
|
5987
|
-
content: {
|
|
5988
|
-
comment?: string | undefined;
|
|
5989
|
-
};
|
|
5990
5960
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
5991
5961
|
actionId: string;
|
|
5992
5962
|
};
|
|
@@ -6291,9 +6261,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6291
6261
|
waitFor?: boolean | undefined;
|
|
6292
6262
|
createdAtLocation?: string | null | undefined;
|
|
6293
6263
|
type?: "EDIT" | undefined;
|
|
6294
|
-
content: {
|
|
6295
|
-
comment?: string | undefined;
|
|
6296
|
-
};
|
|
6297
6264
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
6298
6265
|
actionId: string;
|
|
6299
6266
|
};
|
|
@@ -6598,9 +6565,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6598
6565
|
waitFor?: boolean | undefined;
|
|
6599
6566
|
createdAtLocation?: string | null | undefined;
|
|
6600
6567
|
type?: "EDIT" | undefined;
|
|
6601
|
-
content: {
|
|
6602
|
-
comment?: string | undefined;
|
|
6603
|
-
};
|
|
6604
6568
|
}, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
|
|
6605
6569
|
actionId: string;
|
|
6606
6570
|
};
|
|
@@ -6944,9 +6908,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6944
6908
|
status: "Accepted" | "Rejected" | "Requested";
|
|
6945
6909
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6946
6910
|
type: "EDIT";
|
|
6947
|
-
content
|
|
6911
|
+
content?: {
|
|
6948
6912
|
comment?: string | undefined;
|
|
6949
|
-
};
|
|
6913
|
+
} | undefined;
|
|
6950
6914
|
} | {
|
|
6951
6915
|
id: string & import("zod").$brand<"UUID">;
|
|
6952
6916
|
transactionId: string;
|
|
@@ -7278,9 +7242,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7278
7242
|
status: "Accepted" | "Rejected" | "Requested";
|
|
7279
7243
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
7280
7244
|
type: "EDIT";
|
|
7281
|
-
content
|
|
7245
|
+
content?: {
|
|
7282
7246
|
comment?: string | undefined;
|
|
7283
|
-
};
|
|
7247
|
+
} | undefined;
|
|
7284
7248
|
} | {
|
|
7285
7249
|
id: string & import("zod").$brand<"UUID">;
|
|
7286
7250
|
transactionId: string;
|
|
@@ -7663,9 +7627,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7663
7627
|
status: "Accepted" | "Rejected" | "Requested";
|
|
7664
7628
|
originalActionId?: string | null | undefined;
|
|
7665
7629
|
type: "EDIT";
|
|
7666
|
-
content
|
|
7630
|
+
content?: {
|
|
7667
7631
|
comment?: string | undefined;
|
|
7668
|
-
};
|
|
7632
|
+
} | undefined;
|
|
7669
7633
|
} | {
|
|
7670
7634
|
id: string;
|
|
7671
7635
|
transactionId: string;
|
|
@@ -7870,8 +7834,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7870
7834
|
email?: string | undefined;
|
|
7871
7835
|
status?: string | undefined;
|
|
7872
7836
|
primaryOfficeId?: string | undefined;
|
|
7873
|
-
count
|
|
7874
|
-
skip
|
|
7837
|
+
count?: number | undefined;
|
|
7838
|
+
skip?: number | undefined;
|
|
7875
7839
|
sortBy?: "createdAt" | "email" | "firstname" | "role" | "status" | "surname" | "username" | undefined;
|
|
7876
7840
|
sortOrder: "asc" | "desc";
|
|
7877
7841
|
};
|
|
@@ -8387,8 +8351,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8387
8351
|
name: string;
|
|
8388
8352
|
externalId?: string | null | undefined;
|
|
8389
8353
|
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8390
|
-
validUntil: string | null;
|
|
8391
8354
|
locationType: string | null;
|
|
8355
|
+
status: "active" | "inactive";
|
|
8356
|
+
versions: {
|
|
8357
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8358
|
+
effectiveFrom: string;
|
|
8359
|
+
name: string;
|
|
8360
|
+
externalId?: string | null | undefined;
|
|
8361
|
+
status: "active" | "inactive";
|
|
8362
|
+
}[];
|
|
8392
8363
|
}[];
|
|
8393
8364
|
meta: object;
|
|
8394
8365
|
}>;
|
|
@@ -8398,7 +8369,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8398
8369
|
name: string;
|
|
8399
8370
|
externalId?: string | null | undefined;
|
|
8400
8371
|
administrativeAreaId: string | null;
|
|
8401
|
-
validUntil: string | null;
|
|
8402
8372
|
locationType: string | null;
|
|
8403
8373
|
}[];
|
|
8404
8374
|
output: void;
|
|
@@ -8413,8 +8383,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8413
8383
|
name: string;
|
|
8414
8384
|
externalId?: string | null | undefined;
|
|
8415
8385
|
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8416
|
-
validUntil: string | null;
|
|
8417
8386
|
locationType: string | null;
|
|
8387
|
+
status: "active" | "inactive";
|
|
8388
|
+
versions: {
|
|
8389
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8390
|
+
effectiveFrom: string;
|
|
8391
|
+
name: string;
|
|
8392
|
+
externalId?: string | null | undefined;
|
|
8393
|
+
status: "active" | "inactive";
|
|
8394
|
+
}[];
|
|
8418
8395
|
};
|
|
8419
8396
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8420
8397
|
}>;
|
|
@@ -8822,7 +8799,14 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8822
8799
|
name: string;
|
|
8823
8800
|
externalId?: string | null | undefined;
|
|
8824
8801
|
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
8825
|
-
|
|
8802
|
+
status: "active" | "inactive";
|
|
8803
|
+
versions: {
|
|
8804
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8805
|
+
effectiveFrom: string;
|
|
8806
|
+
name: string;
|
|
8807
|
+
externalId?: string | null | undefined;
|
|
8808
|
+
status: "active" | "inactive";
|
|
8809
|
+
}[];
|
|
8826
8810
|
}[];
|
|
8827
8811
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8828
8812
|
}>;
|
|
@@ -8832,7 +8816,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8832
8816
|
name: string;
|
|
8833
8817
|
externalId?: string | null | undefined;
|
|
8834
8818
|
parentId: string | null;
|
|
8835
|
-
validUntil: string | null;
|
|
8836
8819
|
}[];
|
|
8837
8820
|
output: void;
|
|
8838
8821
|
meta: object;
|
|
@@ -163,6 +163,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
163
163
|
conditional: z.ZodAny;
|
|
164
164
|
}, z.core.$strip>], "type">>>;
|
|
165
165
|
type: z.ZodLiteral<"NOTIFY">;
|
|
166
|
+
form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
|
|
166
167
|
}, z.core.$strip>, z.ZodObject<{
|
|
167
168
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
168
169
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -198,6 +199,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
198
199
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
199
200
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
200
201
|
}, z.core.$strip>;
|
|
202
|
+
form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
|
|
201
203
|
dialogCopy: z.ZodOptional<z.ZodObject<{
|
|
202
204
|
notify: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
203
205
|
declare: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
@@ -301,6 +303,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
301
303
|
conditional: z.ZodAny;
|
|
302
304
|
}, z.core.$strip>], "type">>>;
|
|
303
305
|
type: z.ZodLiteral<"REJECT">;
|
|
306
|
+
form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
|
|
304
307
|
}, z.core.$strip>, z.ZodObject<{
|
|
305
308
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
306
309
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -332,6 +335,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
332
335
|
query: z.ZodType<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput, z.core.$ZodTypeInternals<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput>>;
|
|
333
336
|
}, z.core.$strip>>;
|
|
334
337
|
type: z.ZodLiteral<"REGISTER">;
|
|
338
|
+
form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
|
|
335
339
|
}, z.core.$strip>, z.ZodObject<{
|
|
336
340
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
337
341
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -553,6 +557,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
553
557
|
conditional: z.ZodAny;
|
|
554
558
|
}, z.core.$strip>], "type">>>;
|
|
555
559
|
type: z.ZodLiteral<"ARCHIVE">;
|
|
560
|
+
form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
|
|
556
561
|
}, z.core.$strip>, z.ZodObject<{
|
|
557
562
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
558
563
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -655,6 +660,7 @@ export declare const DeclarationActionConfig: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
655
660
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
656
661
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
657
662
|
}, z.core.$strip>;
|
|
663
|
+
form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
|
|
658
664
|
dialogCopy: z.ZodOptional<z.ZodObject<{
|
|
659
665
|
notify: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
660
666
|
declare: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
@@ -691,6 +697,7 @@ export declare const DeclarationActionConfig: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
691
697
|
query: z.ZodType<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput, z.core.$ZodTypeInternals<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput>>;
|
|
692
698
|
}, z.core.$strip>>;
|
|
693
699
|
type: z.ZodLiteral<"REGISTER">;
|
|
700
|
+
form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
|
|
694
701
|
}, z.core.$strip>], "type">;
|
|
695
702
|
export type DeclarationActionConfig = z.infer<typeof DeclarationActionConfig>;
|
|
696
703
|
export {};
|
|
@@ -165,9 +165,9 @@ declare const EditAction: z.ZodObject<{
|
|
|
165
165
|
}>;
|
|
166
166
|
originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
167
167
|
type: z.ZodLiteral<"EDIT">;
|
|
168
|
-
content: z.ZodObject<{
|
|
168
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
169
169
|
comment: z.ZodOptional<z.ZodString>;
|
|
170
|
-
}, z.core.$strip
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
171
|
}, z.core.$strip>;
|
|
172
172
|
export type EditAction = z.infer<typeof EditAction>;
|
|
173
173
|
export declare const PrintContent: z.ZodObject<{
|
|
@@ -653,9 +653,9 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
653
653
|
}>;
|
|
654
654
|
originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
655
655
|
type: z.ZodLiteral<"EDIT">;
|
|
656
|
-
content: z.ZodObject<{
|
|
656
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
657
657
|
comment: z.ZodOptional<z.ZodString>;
|
|
658
|
-
}, z.core.$strip
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
659
|
}, z.core.$strip>, z.ZodObject<{
|
|
660
660
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
661
661
|
transactionId: z.ZodString;
|
|
@@ -1116,9 +1116,9 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1116
1116
|
}>;
|
|
1117
1117
|
originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
1118
1118
|
type: z.ZodLiteral<"EDIT">;
|
|
1119
|
-
content: z.ZodObject<{
|
|
1119
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
1120
1120
|
comment: z.ZodOptional<z.ZodString>;
|
|
1121
|
-
}, z.core.$strip
|
|
1121
|
+
}, z.core.$strip>>;
|
|
1122
1122
|
}, z.core.$strip>, z.ZodObject<{
|
|
1123
1123
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
1124
1124
|
transactionId: z.ZodString;
|
|
@@ -65,9 +65,6 @@ export declare const EditActionInput: z.ZodObject<{
|
|
|
65
65
|
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
66
66
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
67
67
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
68
|
-
content: z.ZodObject<{
|
|
69
|
-
comment: z.ZodOptional<z.ZodString>;
|
|
70
|
-
}, z.core.$strip>;
|
|
71
68
|
}, z.core.$strip>;
|
|
72
69
|
export type EditActionInput = z.infer<typeof EditActionInput>;
|
|
73
70
|
export declare const PrintCertificateActionInput: z.ZodObject<{
|
|
@@ -564,9 +561,6 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
564
561
|
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
565
562
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
566
563
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
567
|
-
content: z.ZodObject<{
|
|
568
|
-
comment: z.ZodOptional<z.ZodString>;
|
|
569
|
-
}, z.core.$strip>;
|
|
570
564
|
}, z.core.$strip>], "type">;
|
|
571
565
|
export type ActionInput = z.input<typeof ActionInput>;
|
|
572
566
|
export type ActionInputWithType = z.infer<typeof ActionInput>;
|
|
@@ -410,9 +410,9 @@ export declare const EventDocument: z.ZodObject<{
|
|
|
410
410
|
}>;
|
|
411
411
|
originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
412
412
|
type: z.ZodLiteral<"EDIT">;
|
|
413
|
-
content: z.ZodObject<{
|
|
413
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
414
414
|
comment: z.ZodOptional<z.ZodString>;
|
|
415
|
-
}, z.core.$strip
|
|
415
|
+
}, z.core.$strip>>;
|
|
416
416
|
}, z.core.$strip>, z.ZodObject<{
|
|
417
417
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
418
418
|
transactionId: z.ZodString;
|
|
@@ -11,12 +11,46 @@ export declare const LocationTypeV1: z.ZodEnum<{
|
|
|
11
11
|
HEALTH_FACILITY: "HEALTH_FACILITY";
|
|
12
12
|
}>;
|
|
13
13
|
export type LocationTypeV1 = z.infer<typeof LocationTypeV1>;
|
|
14
|
+
export declare const LocationStatus: z.ZodEnum<{
|
|
15
|
+
active: "active";
|
|
16
|
+
inactive: "inactive";
|
|
17
|
+
}>;
|
|
18
|
+
export type LocationStatus = z.infer<typeof LocationStatus>;
|
|
19
|
+
/**
|
|
20
|
+
* A single element of the append-only `versions` history of a location or
|
|
21
|
+
* administrative area. Versions are sorted ascending by `effectiveFrom`
|
|
22
|
+
* ('0001-01-01' is used as the beginning-of-time sentinel).
|
|
23
|
+
*/
|
|
24
|
+
export declare const LocationVersion: z.ZodObject<{
|
|
25
|
+
versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
26
|
+
effectiveFrom: z.ZodISODate;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
status: z.ZodEnum<{
|
|
30
|
+
active: "active";
|
|
31
|
+
inactive: "inactive";
|
|
32
|
+
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type LocationVersion = z.infer<typeof LocationVersion>;
|
|
14
35
|
export declare const AdministrativeArea: z.ZodObject<{
|
|
15
36
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
16
37
|
name: z.ZodString;
|
|
17
38
|
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
39
|
parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
19
|
-
|
|
40
|
+
status: z.ZodEnum<{
|
|
41
|
+
active: "active";
|
|
42
|
+
inactive: "inactive";
|
|
43
|
+
}>;
|
|
44
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
45
|
+
versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
46
|
+
effectiveFrom: z.ZodISODate;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
status: z.ZodEnum<{
|
|
50
|
+
active: "active";
|
|
51
|
+
inactive: "inactive";
|
|
52
|
+
}>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
20
54
|
}, z.core.$strip>;
|
|
21
55
|
export type AdministrativeArea = z.infer<typeof AdministrativeArea>;
|
|
22
56
|
export declare const Location: z.ZodObject<{
|
|
@@ -24,10 +58,59 @@ export declare const Location: z.ZodObject<{
|
|
|
24
58
|
name: z.ZodString;
|
|
25
59
|
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
60
|
administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
27
|
-
validUntil: z.ZodNullable<z.ZodISODateTime>;
|
|
28
61
|
locationType: z.ZodNullable<z.ZodString>;
|
|
62
|
+
status: z.ZodEnum<{
|
|
63
|
+
active: "active";
|
|
64
|
+
inactive: "inactive";
|
|
65
|
+
}>;
|
|
66
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
67
|
+
versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
68
|
+
effectiveFrom: z.ZodISODate;
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
status: z.ZodEnum<{
|
|
72
|
+
active: "active";
|
|
73
|
+
inactive: "inactive";
|
|
74
|
+
}>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
29
76
|
}, z.core.$strip>;
|
|
30
77
|
export type Location = z.infer<typeof Location>;
|
|
78
|
+
/**
|
|
79
|
+
* Input payload for the locations `set` mutation. Carries only the seedable
|
|
80
|
+
* identity and hierarchy fields — version history is managed by the server.
|
|
81
|
+
*/
|
|
82
|
+
export declare const SetLocationPayload: z.ZodObject<{
|
|
83
|
+
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
87
|
+
locationType: z.ZodNullable<z.ZodString>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export type SetLocationPayload = z.infer<typeof SetLocationPayload>;
|
|
90
|
+
/**
|
|
91
|
+
* Input payload for the administrative areas `set` mutation. Carries only the
|
|
92
|
+
* seedable identity and hierarchy fields — version history is managed by the
|
|
93
|
+
* server.
|
|
94
|
+
*/
|
|
95
|
+
export declare const SetAdministrativeAreaPayload: z.ZodObject<{
|
|
96
|
+
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
|
+
parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export type SetAdministrativeAreaPayload = z.infer<typeof SetAdministrativeAreaPayload>;
|
|
102
|
+
/**
|
|
103
|
+
* Resolves the version in effect at the given anchor date.
|
|
104
|
+
*
|
|
105
|
+
* Returns the element with the greatest `effectiveFrom` that is less than or
|
|
106
|
+
* equal to `anchor`, falling back to the earliest element when the anchor
|
|
107
|
+
* precedes all versions. Assumes `versions` is sorted ascending by
|
|
108
|
+
* `effectiveFrom`. Both `effectiveFrom` and `anchor` are 'YYYY-MM-DD' strings,
|
|
109
|
+
* so plain string comparison is correct.
|
|
110
|
+
*/
|
|
111
|
+
export declare function resolveVersion<T extends {
|
|
112
|
+
effectiveFrom: string;
|
|
113
|
+
}>(versions: T[], anchor: string): T;
|
|
31
114
|
type WrapArrayPreserveNullish<V> = V extends readonly any[] ? V : NonNullable<V>[] | Extract<V, null | undefined>;
|
|
32
115
|
/**
|
|
33
116
|
* For type T, convert fields K to arrays. If field is string, convert to string[].
|
|
@@ -79,7 +162,14 @@ export declare function getAdministrativeAreaHierarchy(administrativeAreaId: str
|
|
|
79
162
|
name: string;
|
|
80
163
|
externalId?: string | null | undefined;
|
|
81
164
|
parentId: (string & z.$brand<"UUID">) | null;
|
|
82
|
-
|
|
165
|
+
status: "active" | "inactive";
|
|
166
|
+
versions: {
|
|
167
|
+
versionId: string & z.$brand<"UUID">;
|
|
168
|
+
effectiveFrom: string;
|
|
169
|
+
name: string;
|
|
170
|
+
externalId?: string | null | undefined;
|
|
171
|
+
status: "active" | "inactive";
|
|
172
|
+
}[];
|
|
83
173
|
}[];
|
|
84
174
|
/**
|
|
85
175
|
* Resolves a location or administrative area UUID into a root-first hierarchy of UUIDs.
|