@opencrvs/toolkit 2.0.0-rc.f20384d → 2.0.0-rc.f2211be
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 +12 -2
- package/dist/cli.js +8 -3
- package/dist/commons/api/router.d.ts +17 -4
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +28 -2
- package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
- package/dist/commons/events/EventConfig.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +11 -0
- package/dist/commons/events/EventMetadata.d.ts +26 -0
- package/dist/commons/events/FieldConfig.d.ts +10 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
- package/dist/commons/events/locations.d.ts +1 -0
- package/dist/commons/events/state/index.d.ts +8 -0
- package/dist/commons/events/state/utils.d.ts +9 -0
- package/dist/conditionals/index.js +7 -2
- package/dist/events/index.js +171 -55
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
- package/dist/migrations/v2.0/index.js +8 -3
- package/dist/notification/index.js +94 -4
- package/dist/scopes/index.d.ts +88 -0
- package/dist/scopes/index.js +7 -2
- package/opencrvs-toolkit-2.0.0-rc.f2211be.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.f20384d.tgz +0 -0
package/dist/scopes/index.d.ts
CHANGED
|
@@ -48,6 +48,14 @@ declare const AllScopeOptions: z.ZodObject<{
|
|
|
48
48
|
location: "location";
|
|
49
49
|
all: "all";
|
|
50
50
|
}>>;
|
|
51
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
administrativeArea: "administrativeArea";
|
|
53
|
+
location: "location";
|
|
54
|
+
all: "all";
|
|
55
|
+
}>>;
|
|
56
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
user: "user";
|
|
58
|
+
}>>;
|
|
51
59
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
52
60
|
administrativeArea: "administrativeArea";
|
|
53
61
|
location: "location";
|
|
@@ -70,6 +78,8 @@ export declare const ScopeOptionKey: z.ZodEnum<{
|
|
|
70
78
|
role: "role";
|
|
71
79
|
event: "event";
|
|
72
80
|
placeOfEvent: "placeOfEvent";
|
|
81
|
+
notifiedIn: "notifiedIn";
|
|
82
|
+
notifiedBy: "notifiedBy";
|
|
73
83
|
declaredIn: "declaredIn";
|
|
74
84
|
declaredBy: "declaredBy";
|
|
75
85
|
registeredIn: "registeredIn";
|
|
@@ -126,6 +136,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
126
136
|
location: "location";
|
|
127
137
|
all: "all";
|
|
128
138
|
}>>;
|
|
139
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
140
|
+
administrativeArea: "administrativeArea";
|
|
141
|
+
location: "location";
|
|
142
|
+
all: "all";
|
|
143
|
+
}>>;
|
|
144
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
user: "user";
|
|
146
|
+
}>>;
|
|
129
147
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
130
148
|
administrativeArea: "administrativeArea";
|
|
131
149
|
location: "location";
|
|
@@ -150,6 +168,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
150
168
|
location: "location";
|
|
151
169
|
all: "all";
|
|
152
170
|
}>>;
|
|
171
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
administrativeArea: "administrativeArea";
|
|
173
|
+
location: "location";
|
|
174
|
+
all: "all";
|
|
175
|
+
}>>;
|
|
176
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
user: "user";
|
|
178
|
+
}>>;
|
|
153
179
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
154
180
|
administrativeArea: "administrativeArea";
|
|
155
181
|
location: "location";
|
|
@@ -176,6 +202,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
176
202
|
location: "location";
|
|
177
203
|
all: "all";
|
|
178
204
|
}>>;
|
|
205
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
administrativeArea: "administrativeArea";
|
|
207
|
+
location: "location";
|
|
208
|
+
all: "all";
|
|
209
|
+
}>>;
|
|
210
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
user: "user";
|
|
212
|
+
}>>;
|
|
179
213
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
180
214
|
administrativeArea: "administrativeArea";
|
|
181
215
|
location: "location";
|
|
@@ -203,6 +237,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
203
237
|
location: "location";
|
|
204
238
|
all: "all";
|
|
205
239
|
}>>;
|
|
240
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
241
|
+
administrativeArea: "administrativeArea";
|
|
242
|
+
location: "location";
|
|
243
|
+
all: "all";
|
|
244
|
+
}>>;
|
|
245
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
246
|
+
user: "user";
|
|
247
|
+
}>>;
|
|
206
248
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
207
249
|
administrativeArea: "administrativeArea";
|
|
208
250
|
location: "location";
|
|
@@ -305,6 +347,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
305
347
|
options: z.ZodOptional<z.ZodObject<{
|
|
306
348
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
307
349
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
350
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
351
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
308
352
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
309
353
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
310
354
|
}, z.core.$strip>>;
|
|
@@ -319,6 +363,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
319
363
|
options: z.ZodOptional<z.ZodObject<{
|
|
320
364
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
321
365
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
366
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
367
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
322
368
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
323
369
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
324
370
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -329,6 +375,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
329
375
|
options: z.ZodOptional<z.ZodObject<{
|
|
330
376
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
331
377
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
378
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
379
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
332
380
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
333
381
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
334
382
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -385,6 +433,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
385
433
|
location: "location";
|
|
386
434
|
all: "all";
|
|
387
435
|
}>>;
|
|
436
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
437
|
+
administrativeArea: "administrativeArea";
|
|
438
|
+
location: "location";
|
|
439
|
+
all: "all";
|
|
440
|
+
}>>;
|
|
441
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
user: "user";
|
|
443
|
+
}>>;
|
|
388
444
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
389
445
|
administrativeArea: "administrativeArea";
|
|
390
446
|
location: "location";
|
|
@@ -409,6 +465,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
409
465
|
location: "location";
|
|
410
466
|
all: "all";
|
|
411
467
|
}>>;
|
|
468
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
469
|
+
administrativeArea: "administrativeArea";
|
|
470
|
+
location: "location";
|
|
471
|
+
all: "all";
|
|
472
|
+
}>>;
|
|
473
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
user: "user";
|
|
475
|
+
}>>;
|
|
412
476
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
413
477
|
administrativeArea: "administrativeArea";
|
|
414
478
|
location: "location";
|
|
@@ -435,6 +499,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
435
499
|
location: "location";
|
|
436
500
|
all: "all";
|
|
437
501
|
}>>;
|
|
502
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
503
|
+
administrativeArea: "administrativeArea";
|
|
504
|
+
location: "location";
|
|
505
|
+
all: "all";
|
|
506
|
+
}>>;
|
|
507
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
user: "user";
|
|
509
|
+
}>>;
|
|
438
510
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
439
511
|
administrativeArea: "administrativeArea";
|
|
440
512
|
location: "location";
|
|
@@ -462,6 +534,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
462
534
|
location: "location";
|
|
463
535
|
all: "all";
|
|
464
536
|
}>>;
|
|
537
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
538
|
+
administrativeArea: "administrativeArea";
|
|
539
|
+
location: "location";
|
|
540
|
+
all: "all";
|
|
541
|
+
}>>;
|
|
542
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
543
|
+
user: "user";
|
|
544
|
+
}>>;
|
|
465
545
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
466
546
|
administrativeArea: "administrativeArea";
|
|
467
547
|
location: "location";
|
|
@@ -596,6 +676,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
596
676
|
options?: {
|
|
597
677
|
event?: string[] | undefined;
|
|
598
678
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
679
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
680
|
+
notifiedBy?: "user" | undefined;
|
|
599
681
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
600
682
|
declaredBy?: "user" | undefined;
|
|
601
683
|
} | undefined;
|
|
@@ -604,6 +686,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
604
686
|
options?: {
|
|
605
687
|
event?: string[] | undefined;
|
|
606
688
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
689
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
690
|
+
notifiedBy?: "user" | undefined;
|
|
607
691
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
608
692
|
declaredBy?: "user" | undefined;
|
|
609
693
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -614,6 +698,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
614
698
|
options?: {
|
|
615
699
|
event?: string[] | undefined;
|
|
616
700
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
701
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
702
|
+
notifiedBy?: "user" | undefined;
|
|
617
703
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
618
704
|
declaredBy?: "user" | undefined;
|
|
619
705
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -625,6 +711,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
625
711
|
options?: {
|
|
626
712
|
event?: string[] | undefined;
|
|
627
713
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
714
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
715
|
+
notifiedBy?: "user" | undefined;
|
|
628
716
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
629
717
|
declaredBy?: "user" | undefined;
|
|
630
718
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
package/dist/scopes/index.js
CHANGED
|
@@ -150,6 +150,8 @@ var scopeOptionsPlaceEvent = z3.object({
|
|
|
150
150
|
placeOfEvent: JurisdictionFilter.optional()
|
|
151
151
|
}).describe("Options applicable to all record scopes.");
|
|
152
152
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
153
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
154
|
+
notifiedBy: UserFilter.optional(),
|
|
153
155
|
declaredIn: JurisdictionFilter.optional(),
|
|
154
156
|
declaredBy: UserFilter.optional()
|
|
155
157
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
@@ -191,6 +193,8 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
|
191
193
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
192
194
|
);
|
|
193
195
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
196
|
+
notifiedIn: UUID.nullish(),
|
|
197
|
+
notifiedBy: z3.string().optional(),
|
|
194
198
|
declaredIn: UUID.nullish(),
|
|
195
199
|
declaredBy: z3.string().optional()
|
|
196
200
|
}).describe(
|
|
@@ -372,8 +376,9 @@ var decodeScope = (encodedScope) => {
|
|
|
372
376
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
373
377
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
374
378
|
accessLevel: JurisdictionFilter.enum.all,
|
|
375
|
-
|
|
376
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
379
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
380
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
381
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
377
382
|
};
|
|
378
383
|
function getScopeOptionValue(scope, option) {
|
|
379
384
|
const options = "options" in scope ? scope.options : void 0;
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|