@opencrvs/toolkit 2.2.0-rc.ab91cce → 2.2.0-rc.ac299dc
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 +36 -3
- package/dist/authentication/index.js +14 -1
- package/dist/commons/api/router.d.ts +1374 -71
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +54 -0
- package/dist/commons/events/ActionDocument.d.ts +88 -0
- package/dist/commons/events/ActionInput.d.ts +52 -0
- package/dist/commons/events/ActionType.d.ts +11 -1
- package/dist/commons/events/AdvancedSearchConfig.d.ts +18 -0
- package/dist/commons/events/AuditLog.d.ts +4 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +192 -0
- package/dist/commons/events/Draft.d.ts +2 -0
- package/dist/commons/events/EventDocument.d.ts +88 -0
- package/dist/commons/events/EventIndex.d.ts +41 -0
- package/dist/commons/events/EventMetadata.d.ts +23 -0
- package/dist/commons/events/EventStatus.d.ts +1 -0
- package/dist/commons/events/FieldConfig.d.ts +10 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +216 -10
- package/dist/commons/events/field.d.ts +5 -0
- package/dist/commons/events/scopes.d.ts +2 -0
- package/dist/commons/events/state/index.d.ts +10 -2
- package/dist/commons/events/state/utils.d.ts +11 -1
- package/dist/commons/events/test.utils.d.ts +23 -1
- package/dist/commons/events/utils.d.ts +29 -1
- package/dist/conditionals/index.js +14 -1
- package/dist/events/index.js +134 -8
- package/dist/notification/index.js +91 -5
- package/dist/scopes/index.d.ts +29 -6
- package/dist/scopes/index.js +14 -1
- package/opencrvs-toolkit-2.2.0-rc.ac299dc.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.2.0-rc.ab91cce.tgz +0 -0
|
@@ -83,6 +83,8 @@ var ActionType = {
|
|
|
83
83
|
REQUEST_CORRECTION: "REQUEST_CORRECTION",
|
|
84
84
|
REJECT_CORRECTION: "REJECT_CORRECTION",
|
|
85
85
|
APPROVE_CORRECTION: "APPROVE_CORRECTION",
|
|
86
|
+
REVOKE_REGISTRATION: "REVOKE_REGISTRATION",
|
|
87
|
+
REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION",
|
|
86
88
|
// General actions
|
|
87
89
|
READ: "READ",
|
|
88
90
|
ASSIGN: "ASSIGN",
|
|
@@ -102,6 +104,8 @@ var ConfirmableActions = [
|
|
|
102
104
|
ActionType.REQUEST_CORRECTION,
|
|
103
105
|
ActionType.APPROVE_CORRECTION,
|
|
104
106
|
ActionType.REJECT_CORRECTION,
|
|
107
|
+
ActionType.REVOKE_REGISTRATION,
|
|
108
|
+
ActionType.REINSTATE_REGISTRATION,
|
|
105
109
|
ActionType.CUSTOM
|
|
106
110
|
];
|
|
107
111
|
var ActionTypes = z2.enum([
|
|
@@ -121,6 +125,8 @@ var ActionTypes = z2.enum([
|
|
|
121
125
|
"REQUEST_CORRECTION",
|
|
122
126
|
"REJECT_CORRECTION",
|
|
123
127
|
"APPROVE_CORRECTION",
|
|
128
|
+
"REVOKE_REGISTRATION",
|
|
129
|
+
"REINSTATE_REGISTRATION",
|
|
124
130
|
"READ",
|
|
125
131
|
"ASSIGN",
|
|
126
132
|
"UNASSIGN",
|
|
@@ -162,7 +168,9 @@ var WorkqueueActionType = ActionTypes.extract([
|
|
|
162
168
|
ActionType.ARCHIVE,
|
|
163
169
|
ActionType.UNARCHIVE,
|
|
164
170
|
ActionType.PRINT_CERTIFICATE,
|
|
165
|
-
ActionType.REQUEST_CORRECTION
|
|
171
|
+
ActionType.REQUEST_CORRECTION,
|
|
172
|
+
ActionType.REVOKE_REGISTRATION,
|
|
173
|
+
ActionType.REINSTATE_REGISTRATION
|
|
166
174
|
]);
|
|
167
175
|
var META_ACTIONS = [
|
|
168
176
|
ActionType.ASSIGN,
|
|
@@ -314,6 +322,7 @@ var EventStatus = z6.enum([
|
|
|
314
322
|
"NOTIFIED",
|
|
315
323
|
"DECLARED",
|
|
316
324
|
"REGISTERED",
|
|
325
|
+
"REVOKED",
|
|
317
326
|
"ARCHIVED"
|
|
318
327
|
]);
|
|
319
328
|
|
|
@@ -337,6 +346,8 @@ var RecordScopeTypeV2 = z7.enum([
|
|
|
337
346
|
"record.print-certified-copies",
|
|
338
347
|
"record.request-correction",
|
|
339
348
|
"record.correct",
|
|
349
|
+
"record.revoke-registration",
|
|
350
|
+
"record.reinstate-registration",
|
|
340
351
|
"record.unassign-others",
|
|
341
352
|
"record.custom-action",
|
|
342
353
|
"record.action.accept",
|
|
@@ -463,6 +474,8 @@ var ScopesWithFullOptions = RecordScopeTypeV2.extract([
|
|
|
463
474
|
"record.read",
|
|
464
475
|
"record.request-correction",
|
|
465
476
|
"record.correct",
|
|
477
|
+
"record.revoke-registration",
|
|
478
|
+
"record.reinstate-registration",
|
|
466
479
|
"record.unassign-others",
|
|
467
480
|
"record.review-duplicates"
|
|
468
481
|
]);
|
|
@@ -648,6 +661,8 @@ var EventActionEntrySchema = AuditLogEntryBase.extend({
|
|
|
648
661
|
"event.actions.correction.request.request",
|
|
649
662
|
"event.actions.correction.approve.request",
|
|
650
663
|
"event.actions.correction.reject.request",
|
|
664
|
+
"event.actions.revoke_registration.request",
|
|
665
|
+
"event.actions.reinstate_registration.request",
|
|
651
666
|
"event.actions.mark_as_duplicate.request",
|
|
652
667
|
"event.actions.mark_as_not_duplicate.request"
|
|
653
668
|
]),
|
|
@@ -1391,6 +1406,16 @@ var UnarchiveAction = ActionBase.extend(
|
|
|
1391
1406
|
type: z16.literal(ActionType.UNARCHIVE)
|
|
1392
1407
|
}).shape
|
|
1393
1408
|
);
|
|
1409
|
+
var RevokeRegistrationAction = ActionBase.extend(
|
|
1410
|
+
z16.object({
|
|
1411
|
+
type: z16.literal(ActionType.REVOKE_REGISTRATION)
|
|
1412
|
+
}).shape
|
|
1413
|
+
);
|
|
1414
|
+
var ReinstateRegistrationAction = ActionBase.extend(
|
|
1415
|
+
z16.object({
|
|
1416
|
+
type: z16.literal(ActionType.REINSTATE_REGISTRATION)
|
|
1417
|
+
}).shape
|
|
1418
|
+
);
|
|
1394
1419
|
var CreatedAction = ActionBase.extend(
|
|
1395
1420
|
z16.object({
|
|
1396
1421
|
type: z16.literal(ActionType.CREATE)
|
|
@@ -1459,6 +1484,8 @@ var ActionDocument = z16.discriminatedUnion("type", [
|
|
|
1459
1484
|
MarkAsDuplicateAction.meta({ id: "MarkAsDuplicateAction" }),
|
|
1460
1485
|
ArchiveAction.meta({ id: "ArchiveAction" }),
|
|
1461
1486
|
UnarchiveAction.meta({ id: "UnarchiveAction" }),
|
|
1487
|
+
RevokeRegistrationAction.meta({ id: "RevokeRegistrationAction" }),
|
|
1488
|
+
ReinstateRegistrationAction.meta({ id: "ReinstateRegistrationAction" }),
|
|
1462
1489
|
NotifiedAction.meta({ id: "NotifiedAction" }),
|
|
1463
1490
|
RegisterAction.meta({ id: "RegisterAction" }),
|
|
1464
1491
|
DeclareAction.meta({ id: "DeclareAction" }),
|
|
@@ -1507,7 +1534,8 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
1507
1534
|
var LegalStatuses = z17.object({
|
|
1508
1535
|
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
1509
1536
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
1510
|
-
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
1537
|
+
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish(),
|
|
1538
|
+
[EventStatus.enum.REVOKED]: ActionCreationMetadata.nullish()
|
|
1511
1539
|
});
|
|
1512
1540
|
var EventMetadata = z17.object({
|
|
1513
1541
|
id: UUID,
|
|
@@ -1627,6 +1655,12 @@ var AnyOfStatus = import_v4.z.object({
|
|
|
1627
1655
|
}).meta({
|
|
1628
1656
|
id: "AnyOfStatus"
|
|
1629
1657
|
});
|
|
1658
|
+
var NoneOfStatus = import_v4.z.object({
|
|
1659
|
+
type: import_v4.z.literal("noneOf"),
|
|
1660
|
+
terms: import_v4.z.array(EventStatus)
|
|
1661
|
+
}).meta({
|
|
1662
|
+
id: "NoneOfStatus"
|
|
1663
|
+
});
|
|
1630
1664
|
var Range = import_v4.z.object({
|
|
1631
1665
|
type: import_v4.z.literal("range"),
|
|
1632
1666
|
gte: import_v4.z.string(),
|
|
@@ -1667,7 +1701,7 @@ var QueryInput = import_v4.z.lazy(
|
|
|
1667
1701
|
var QueryExpression = import_v4.z.object({
|
|
1668
1702
|
id: import_v4.z.optional(import_v4.z.string()),
|
|
1669
1703
|
eventType: import_v4.z.string(),
|
|
1670
|
-
status: import_v4.z.optional(import_v4.z.union([AnyOfStatus, ExactStatus])),
|
|
1704
|
+
status: import_v4.z.optional(import_v4.z.union([AnyOfStatus, NoneOfStatus, ExactStatus])),
|
|
1671
1705
|
createdAt: import_v4.z.optional(DateCondition),
|
|
1672
1706
|
updatedAt: import_v4.z.optional(DateCondition),
|
|
1673
1707
|
"legalStatuses.DECLARED.createdAtLocation": import_v4.z.optional(Within).nullable(),
|
|
@@ -1676,6 +1710,7 @@ var QueryExpression = import_v4.z.object({
|
|
|
1676
1710
|
"legalStatuses.REGISTERED.createdAtLocation": import_v4.z.optional(Within).nullable(),
|
|
1677
1711
|
"legalStatuses.REGISTERED.createdByRole": import_v4.z.optional(AnyOf),
|
|
1678
1712
|
"legalStatuses.REGISTERED.registrationNumber": import_v4.z.optional(Exact),
|
|
1713
|
+
"legalStatuses.REVOKED.createdAtLocation": import_v4.z.optional(Within).nullable(),
|
|
1679
1714
|
createdAtLocation: import_v4.z.optional(import_v4.z.union([Within, Exact])),
|
|
1680
1715
|
updatedAtLocation: import_v4.z.optional(import_v4.z.union([Within, Exact])),
|
|
1681
1716
|
assignedTo: import_v4.z.optional(Exact),
|
|
@@ -2956,6 +2991,18 @@ var UnarchiveConfig = ActionConfigBase.extend(
|
|
|
2956
2991
|
type: z25.literal(ActionType.UNARCHIVE)
|
|
2957
2992
|
}).shape
|
|
2958
2993
|
);
|
|
2994
|
+
var RevokeRegistrationConfig = ActionConfigBase.extend(
|
|
2995
|
+
z25.object({
|
|
2996
|
+
type: z25.literal(ActionType.REVOKE_REGISTRATION),
|
|
2997
|
+
form: actionConfirmationForm
|
|
2998
|
+
}).shape
|
|
2999
|
+
);
|
|
3000
|
+
var ReinstateRegistrationConfig = ActionConfigBase.extend(
|
|
3001
|
+
z25.object({
|
|
3002
|
+
type: z25.literal(ActionType.REINSTATE_REGISTRATION),
|
|
3003
|
+
form: actionConfirmationForm
|
|
3004
|
+
}).shape
|
|
3005
|
+
);
|
|
2959
3006
|
var EditActionConfig = ActionConfigBase.extend(
|
|
2960
3007
|
z25.object({
|
|
2961
3008
|
type: z25.literal(ActionType.EDIT),
|
|
@@ -3096,6 +3143,14 @@ var ActionConfig = z25.discriminatedUnion("type", [
|
|
|
3096
3143
|
id: "UnarchiveActionConfig",
|
|
3097
3144
|
description: "Configuration for unarchiving a record."
|
|
3098
3145
|
}),
|
|
3146
|
+
RevokeRegistrationConfig.meta({
|
|
3147
|
+
id: "RevokeRegistrationActionConfig",
|
|
3148
|
+
description: "Configuration for revoking a registered record."
|
|
3149
|
+
}),
|
|
3150
|
+
ReinstateRegistrationConfig.meta({
|
|
3151
|
+
id: "ReinstateRegistrationActionConfig",
|
|
3152
|
+
description: "Configuration for reinstating a revoked record back to registered."
|
|
3153
|
+
}),
|
|
3099
3154
|
CustomActionConfig.meta({
|
|
3100
3155
|
id: "CustomActionConfig",
|
|
3101
3156
|
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
@@ -3388,6 +3443,9 @@ var BaseField3 = z30.object({
|
|
|
3388
3443
|
),
|
|
3389
3444
|
allowedLocations: JurisdictionReference.optional().describe(
|
|
3390
3445
|
`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.`
|
|
3446
|
+
),
|
|
3447
|
+
useFormDefaultValue: z30.boolean().optional().describe(
|
|
3448
|
+
`Set to false to open the field empty in advanced search instead of pre-filled with the declaration form's defaultValue.`
|
|
3391
3449
|
)
|
|
3392
3450
|
});
|
|
3393
3451
|
var SearchQueryParams = z30.object({
|
|
@@ -3506,6 +3564,8 @@ var updateActions = new Set(
|
|
|
3506
3564
|
ActionType.REQUEST_CORRECTION,
|
|
3507
3565
|
ActionType.APPROVE_CORRECTION,
|
|
3508
3566
|
ActionType.REJECT_CORRECTION,
|
|
3567
|
+
ActionType.REVOKE_REGISTRATION,
|
|
3568
|
+
ActionType.REINSTATE_REGISTRATION,
|
|
3509
3569
|
ActionType.CUSTOM
|
|
3510
3570
|
]).options
|
|
3511
3571
|
);
|
|
@@ -4835,7 +4895,7 @@ var SerializableWithin = z37.object({
|
|
|
4835
4895
|
});
|
|
4836
4896
|
var SerializedQueryExpression = z37.object({
|
|
4837
4897
|
eventType: z37.string(),
|
|
4838
|
-
status: z37.optional(z37.union([AnyOfStatus, ExactStatus])),
|
|
4898
|
+
status: z37.optional(z37.union([AnyOfStatus, NoneOfStatus, ExactStatus])),
|
|
4839
4899
|
createdAt: z37.optional(DateCondition),
|
|
4840
4900
|
updatedAt: z37.optional(DateCondition),
|
|
4841
4901
|
"legalStatuses.DECLARED.createdAtLocation": z37.optional(SerializableWithin),
|
|
@@ -4844,6 +4904,7 @@ var SerializedQueryExpression = z37.object({
|
|
|
4844
4904
|
"legalStatuses.REGISTERED.createdAtLocation": z37.optional(SerializableWithin),
|
|
4845
4905
|
"legalStatuses.REGISTERED.createdByRole": z37.optional(AnyOf),
|
|
4846
4906
|
"legalStatuses.REGISTERED.registrationNumber": z37.optional(Exact),
|
|
4907
|
+
"legalStatuses.REVOKED.createdAtLocation": z37.optional(SerializableWithin),
|
|
4847
4908
|
createdAtLocation: z37.optional(
|
|
4848
4909
|
z37.union([SerializableWithin, SerializableExact])
|
|
4849
4910
|
),
|
|
@@ -5055,6 +5116,16 @@ var UnarchiveActionInput = BaseActionInput.extend(
|
|
|
5055
5116
|
type: z39.literal(ActionType.UNARCHIVE).default(ActionType.UNARCHIVE)
|
|
5056
5117
|
}).shape
|
|
5057
5118
|
);
|
|
5119
|
+
var RevokeRegistrationActionInput = BaseActionInput.extend(
|
|
5120
|
+
z39.object({
|
|
5121
|
+
type: z39.literal(ActionType.REVOKE_REGISTRATION).default(ActionType.REVOKE_REGISTRATION)
|
|
5122
|
+
}).shape
|
|
5123
|
+
);
|
|
5124
|
+
var ReinstateRegistrationActionInput = BaseActionInput.extend(
|
|
5125
|
+
z39.object({
|
|
5126
|
+
type: z39.literal(ActionType.REINSTATE_REGISTRATION).default(ActionType.REINSTATE_REGISTRATION)
|
|
5127
|
+
}).shape
|
|
5128
|
+
);
|
|
5058
5129
|
var AssignActionInput = BaseActionInput.extend(
|
|
5059
5130
|
z39.object({
|
|
5060
5131
|
type: z39.literal(ActionType.ASSIGN),
|
|
@@ -5117,6 +5188,12 @@ var ActionInput = z39.discriminatedUnion("type", [
|
|
|
5117
5188
|
}),
|
|
5118
5189
|
ArchiveActionInput.meta({ id: "ArchiveActionInput" }),
|
|
5119
5190
|
UnarchiveActionInput.meta({ id: "UnarchiveActionInput" }),
|
|
5191
|
+
RevokeRegistrationActionInput.meta({
|
|
5192
|
+
id: "RevokeRegistrationActionInput"
|
|
5193
|
+
}),
|
|
5194
|
+
ReinstateRegistrationActionInput.meta({
|
|
5195
|
+
id: "ReinstateRegistrationActionInput"
|
|
5196
|
+
}),
|
|
5120
5197
|
AssignActionInput.meta({ id: "AssignActionInput" }),
|
|
5121
5198
|
UnassignActionInput.meta({ id: "UnassignActionInput" }),
|
|
5122
5199
|
PrintCertificateActionInput.meta({ id: "PrintCertificateActionInput" }),
|
|
@@ -8159,6 +8236,8 @@ var ACTION_SCOPE_MAP = {
|
|
|
8159
8236
|
[ClientSpecificAction.REVIEW_CORRECTION_REQUEST]: ["record.correct"],
|
|
8160
8237
|
[ActionType.REJECT_CORRECTION]: ["record.correct"],
|
|
8161
8238
|
[ActionType.APPROVE_CORRECTION]: ["record.correct"],
|
|
8239
|
+
[ActionType.REVOKE_REGISTRATION]: ["record.revoke-registration"],
|
|
8240
|
+
[ActionType.REINSTATE_REGISTRATION]: ["record.reinstate-registration"],
|
|
8162
8241
|
[ActionType.MARK_AS_DUPLICATE]: ["record.review-duplicates"],
|
|
8163
8242
|
[ActionType.MARK_AS_NOT_DUPLICATE]: ["record.review-duplicates"],
|
|
8164
8243
|
[ActionType.ARCHIVE]: ["record.archive"],
|
|
@@ -8205,7 +8284,12 @@ var AVAILABLE_ACTIONS_BY_EVENT_STATUS = {
|
|
|
8205
8284
|
ActionType.APPROVE_CORRECTION,
|
|
8206
8285
|
ActionType.REJECT_CORRECTION,
|
|
8207
8286
|
ActionType.CUSTOM,
|
|
8208
|
-
ClientSpecificAction.REVIEW_CORRECTION_REQUEST
|
|
8287
|
+
ClientSpecificAction.REVIEW_CORRECTION_REQUEST,
|
|
8288
|
+
ActionType.REVOKE_REGISTRATION
|
|
8289
|
+
],
|
|
8290
|
+
[EventStatus.enum.REVOKED]: [
|
|
8291
|
+
ActionType.READ,
|
|
8292
|
+
ActionType.REINSTATE_REGISTRATION
|
|
8209
8293
|
],
|
|
8210
8294
|
[EventStatus.enum.ARCHIVED]: [
|
|
8211
8295
|
ActionType.READ,
|
|
@@ -8219,6 +8303,8 @@ var ACTION_FILTERS = {
|
|
|
8219
8303
|
[ClientSpecificAction.REVIEW_CORRECTION_REQUEST]: (flags) => flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
8220
8304
|
[ActionType.APPROVE_CORRECTION]: (flags) => flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
8221
8305
|
[ActionType.REJECT_CORRECTION]: (flags) => flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
8306
|
+
[ActionType.REVOKE_REGISTRATION]: (flags) => !flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
8307
|
+
[ActionType.REINSTATE_REGISTRATION]: (flags) => !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
8222
8308
|
[ActionType.MARK_AS_DUPLICATE]: (flags) => flags.includes(InherentFlags.POTENTIAL_DUPLICATE) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
8223
8309
|
[ActionType.EDIT]: (flags) => !flags.includes(InherentFlags.POTENTIAL_DUPLICATE) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
8224
8310
|
[ActionType.REGISTER]: (flags) => !flags.includes(InherentFlags.POTENTIAL_DUPLICATE) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -29,9 +29,11 @@ export declare const RecordScopeTypeV2: z.ZodEnum<{
|
|
|
29
29
|
"record.print-certified-copies": "record.print-certified-copies";
|
|
30
30
|
"record.read": "record.read";
|
|
31
31
|
"record.register": "record.register";
|
|
32
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
32
33
|
"record.reject": "record.reject";
|
|
33
34
|
"record.request-correction": "record.request-correction";
|
|
34
35
|
"record.review-duplicates": "record.review-duplicates";
|
|
36
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
35
37
|
"record.search": "record.search";
|
|
36
38
|
"record.unarchive": "record.unarchive";
|
|
37
39
|
"record.unassign-others": "record.unassign-others";
|
|
@@ -74,6 +76,7 @@ declare const AllScopeOptions: z.ZodObject<{
|
|
|
74
76
|
DECLARED: "DECLARED";
|
|
75
77
|
NOTIFIED: "NOTIFIED";
|
|
76
78
|
REGISTERED: "REGISTERED";
|
|
79
|
+
REVOKED: "REVOKED";
|
|
77
80
|
}>>>>;
|
|
78
81
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
79
82
|
administrativeArea: "administrativeArea";
|
|
@@ -148,8 +151,10 @@ export declare const ScopesWithDeclaredOptions: z.ZodEnum<{
|
|
|
148
151
|
export declare const ScopesWithFullOptions: z.ZodEnum<{
|
|
149
152
|
"record.correct": "record.correct";
|
|
150
153
|
"record.read": "record.read";
|
|
154
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
151
155
|
"record.request-correction": "record.request-correction";
|
|
152
156
|
"record.review-duplicates": "record.review-duplicates";
|
|
157
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
153
158
|
"record.search": "record.search";
|
|
154
159
|
"record.unassign-others": "record.unassign-others";
|
|
155
160
|
}>;
|
|
@@ -225,14 +230,17 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
225
230
|
DECLARED: "DECLARED";
|
|
226
231
|
NOTIFIED: "NOTIFIED";
|
|
227
232
|
REGISTERED: "REGISTERED";
|
|
233
|
+
REVOKED: "REVOKED";
|
|
228
234
|
}>>>>;
|
|
229
235
|
}, z.core.$strip>>;
|
|
230
236
|
}, z.core.$strip>, z.ZodObject<{
|
|
231
237
|
type: z.ZodEnum<{
|
|
232
238
|
"record.correct": "record.correct";
|
|
233
239
|
"record.read": "record.read";
|
|
240
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
234
241
|
"record.request-correction": "record.request-correction";
|
|
235
242
|
"record.review-duplicates": "record.review-duplicates";
|
|
243
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
236
244
|
"record.search": "record.search";
|
|
237
245
|
"record.unassign-others": "record.unassign-others";
|
|
238
246
|
}>;
|
|
@@ -273,6 +281,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
273
281
|
DECLARED: "DECLARED";
|
|
274
282
|
NOTIFIED: "NOTIFIED";
|
|
275
283
|
REGISTERED: "REGISTERED";
|
|
284
|
+
REVOKED: "REVOKED";
|
|
276
285
|
}>>>>;
|
|
277
286
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
278
287
|
administrativeArea: "administrativeArea";
|
|
@@ -345,6 +354,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
345
354
|
DECLARED: "DECLARED";
|
|
346
355
|
NOTIFIED: "NOTIFIED";
|
|
347
356
|
REGISTERED: "REGISTERED";
|
|
357
|
+
REVOKED: "REVOKED";
|
|
348
358
|
}>>>>;
|
|
349
359
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
350
360
|
administrativeArea: "administrativeArea";
|
|
@@ -418,6 +428,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
418
428
|
DECLARED: "DECLARED";
|
|
419
429
|
NOTIFIED: "NOTIFIED";
|
|
420
430
|
REGISTERED: "REGISTERED";
|
|
431
|
+
REVOKED: "REVOKED";
|
|
421
432
|
}>>>>;
|
|
422
433
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
423
434
|
administrativeArea: "administrativeArea";
|
|
@@ -494,6 +505,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
494
505
|
DECLARED: "DECLARED";
|
|
495
506
|
NOTIFIED: "NOTIFIED";
|
|
496
507
|
REGISTERED: "REGISTERED";
|
|
508
|
+
REVOKED: "REVOKED";
|
|
497
509
|
}>>>>;
|
|
498
510
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
499
511
|
administrativeArea: "administrativeArea";
|
|
@@ -624,8 +636,10 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
624
636
|
type: z.ZodEnum<{
|
|
625
637
|
"record.correct": "record.correct";
|
|
626
638
|
"record.read": "record.read";
|
|
639
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
627
640
|
"record.request-correction": "record.request-correction";
|
|
628
641
|
"record.review-duplicates": "record.review-duplicates";
|
|
642
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
629
643
|
"record.search": "record.search";
|
|
630
644
|
"record.unassign-others": "record.unassign-others";
|
|
631
645
|
}>;
|
|
@@ -790,14 +804,17 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
790
804
|
DECLARED: "DECLARED";
|
|
791
805
|
NOTIFIED: "NOTIFIED";
|
|
792
806
|
REGISTERED: "REGISTERED";
|
|
807
|
+
REVOKED: "REVOKED";
|
|
793
808
|
}>>>>;
|
|
794
809
|
}, z.core.$strip>>;
|
|
795
810
|
}, z.core.$strip>, z.ZodObject<{
|
|
796
811
|
type: z.ZodEnum<{
|
|
797
812
|
"record.correct": "record.correct";
|
|
798
813
|
"record.read": "record.read";
|
|
814
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
799
815
|
"record.request-correction": "record.request-correction";
|
|
800
816
|
"record.review-duplicates": "record.review-duplicates";
|
|
817
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
801
818
|
"record.search": "record.search";
|
|
802
819
|
"record.unassign-others": "record.unassign-others";
|
|
803
820
|
}>;
|
|
@@ -838,6 +855,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
838
855
|
DECLARED: "DECLARED";
|
|
839
856
|
NOTIFIED: "NOTIFIED";
|
|
840
857
|
REGISTERED: "REGISTERED";
|
|
858
|
+
REVOKED: "REVOKED";
|
|
841
859
|
}>>>>;
|
|
842
860
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
843
861
|
administrativeArea: "administrativeArea";
|
|
@@ -910,6 +928,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
910
928
|
DECLARED: "DECLARED";
|
|
911
929
|
NOTIFIED: "NOTIFIED";
|
|
912
930
|
REGISTERED: "REGISTERED";
|
|
931
|
+
REVOKED: "REVOKED";
|
|
913
932
|
}>>>>;
|
|
914
933
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
915
934
|
administrativeArea: "administrativeArea";
|
|
@@ -983,6 +1002,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
983
1002
|
DECLARED: "DECLARED";
|
|
984
1003
|
NOTIFIED: "NOTIFIED";
|
|
985
1004
|
REGISTERED: "REGISTERED";
|
|
1005
|
+
REVOKED: "REVOKED";
|
|
986
1006
|
}>>>>;
|
|
987
1007
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
988
1008
|
administrativeArea: "administrativeArea";
|
|
@@ -1059,6 +1079,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1059
1079
|
DECLARED: "DECLARED";
|
|
1060
1080
|
NOTIFIED: "NOTIFIED";
|
|
1061
1081
|
REGISTERED: "REGISTERED";
|
|
1082
|
+
REVOKED: "REVOKED";
|
|
1062
1083
|
}>>>>;
|
|
1063
1084
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
1064
1085
|
administrativeArea: "administrativeArea";
|
|
@@ -1165,9 +1186,11 @@ export declare const ScopeType: z.ZodEnum<{
|
|
|
1165
1186
|
"record.read": "record.read";
|
|
1166
1187
|
"record.register": "record.register";
|
|
1167
1188
|
"record.reindex": "record.reindex";
|
|
1189
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
1168
1190
|
"record.reject": "record.reject";
|
|
1169
1191
|
"record.request-correction": "record.request-correction";
|
|
1170
1192
|
"record.review-duplicates": "record.review-duplicates";
|
|
1193
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
1171
1194
|
"record.search": "record.search";
|
|
1172
1195
|
"record.unarchive": "record.unarchive";
|
|
1173
1196
|
"record.unassign-others": "record.unassign-others";
|
|
@@ -1219,10 +1242,10 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
1219
1242
|
notifiedBy?: "user" | undefined;
|
|
1220
1243
|
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1221
1244
|
declaredBy?: "user" | undefined;
|
|
1222
|
-
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[] | undefined;
|
|
1245
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1223
1246
|
} | undefined;
|
|
1224
1247
|
} | {
|
|
1225
|
-
type: "record.correct" | "record.read" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unassign-others";
|
|
1248
|
+
type: "record.correct" | "record.read" | "record.reinstate-registration" | "record.request-correction" | "record.review-duplicates" | "record.revoke-registration" | "record.search" | "record.unassign-others";
|
|
1226
1249
|
options?: {
|
|
1227
1250
|
event?: string[] | undefined;
|
|
1228
1251
|
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
@@ -1232,7 +1255,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
1232
1255
|
notifiedBy?: "user" | undefined;
|
|
1233
1256
|
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1234
1257
|
declaredBy?: "user" | undefined;
|
|
1235
|
-
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[] | undefined;
|
|
1258
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1236
1259
|
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1237
1260
|
registeredBy?: "user" | undefined;
|
|
1238
1261
|
flags?: {
|
|
@@ -1252,7 +1275,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
1252
1275
|
notifiedBy?: "user" | undefined;
|
|
1253
1276
|
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1254
1277
|
declaredBy?: "user" | undefined;
|
|
1255
|
-
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[] | undefined;
|
|
1278
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1256
1279
|
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1257
1280
|
registeredBy?: "user" | undefined;
|
|
1258
1281
|
flags?: {
|
|
@@ -1273,7 +1296,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
1273
1296
|
notifiedBy?: "user" | undefined;
|
|
1274
1297
|
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1275
1298
|
declaredBy?: "user" | undefined;
|
|
1276
|
-
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[] | undefined;
|
|
1299
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1277
1300
|
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1278
1301
|
registeredBy?: "user" | undefined;
|
|
1279
1302
|
flags?: {
|
|
@@ -1294,7 +1317,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
1294
1317
|
notifiedBy?: "user" | undefined;
|
|
1295
1318
|
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1296
1319
|
declaredBy?: "user" | undefined;
|
|
1297
|
-
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[] | undefined;
|
|
1320
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1298
1321
|
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1299
1322
|
registeredBy?: "user" | undefined;
|
|
1300
1323
|
flags?: {
|
package/dist/scopes/index.js
CHANGED
|
@@ -121,6 +121,8 @@ var ActionType = {
|
|
|
121
121
|
REQUEST_CORRECTION: "REQUEST_CORRECTION",
|
|
122
122
|
REJECT_CORRECTION: "REJECT_CORRECTION",
|
|
123
123
|
APPROVE_CORRECTION: "APPROVE_CORRECTION",
|
|
124
|
+
REVOKE_REGISTRATION: "REVOKE_REGISTRATION",
|
|
125
|
+
REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION",
|
|
124
126
|
// General actions
|
|
125
127
|
READ: "READ",
|
|
126
128
|
ASSIGN: "ASSIGN",
|
|
@@ -140,6 +142,8 @@ var ConfirmableActions = [
|
|
|
140
142
|
ActionType.REQUEST_CORRECTION,
|
|
141
143
|
ActionType.APPROVE_CORRECTION,
|
|
142
144
|
ActionType.REJECT_CORRECTION,
|
|
145
|
+
ActionType.REVOKE_REGISTRATION,
|
|
146
|
+
ActionType.REINSTATE_REGISTRATION,
|
|
143
147
|
ActionType.CUSTOM
|
|
144
148
|
];
|
|
145
149
|
var ActionTypes = z3.enum([
|
|
@@ -159,6 +163,8 @@ var ActionTypes = z3.enum([
|
|
|
159
163
|
"REQUEST_CORRECTION",
|
|
160
164
|
"REJECT_CORRECTION",
|
|
161
165
|
"APPROVE_CORRECTION",
|
|
166
|
+
"REVOKE_REGISTRATION",
|
|
167
|
+
"REINSTATE_REGISTRATION",
|
|
162
168
|
"READ",
|
|
163
169
|
"ASSIGN",
|
|
164
170
|
"UNASSIGN",
|
|
@@ -197,7 +203,9 @@ var WorkqueueActionType = ActionTypes.extract([
|
|
|
197
203
|
ActionType.ARCHIVE,
|
|
198
204
|
ActionType.UNARCHIVE,
|
|
199
205
|
ActionType.PRINT_CERTIFICATE,
|
|
200
|
-
ActionType.REQUEST_CORRECTION
|
|
206
|
+
ActionType.REQUEST_CORRECTION,
|
|
207
|
+
ActionType.REVOKE_REGISTRATION,
|
|
208
|
+
ActionType.REINSTATE_REGISTRATION
|
|
201
209
|
]);
|
|
202
210
|
var META_ACTIONS = [
|
|
203
211
|
ActionType.ASSIGN,
|
|
@@ -349,6 +357,7 @@ var EventStatus = z7.enum([
|
|
|
349
357
|
"NOTIFIED",
|
|
350
358
|
"DECLARED",
|
|
351
359
|
"REGISTERED",
|
|
360
|
+
"REVOKED",
|
|
352
361
|
"ARCHIVED"
|
|
353
362
|
]);
|
|
354
363
|
|
|
@@ -372,6 +381,8 @@ var RecordScopeTypeV2 = z8.enum([
|
|
|
372
381
|
"record.print-certified-copies",
|
|
373
382
|
"record.request-correction",
|
|
374
383
|
"record.correct",
|
|
384
|
+
"record.revoke-registration",
|
|
385
|
+
"record.reinstate-registration",
|
|
375
386
|
"record.unassign-others",
|
|
376
387
|
"record.custom-action",
|
|
377
388
|
"record.action.accept",
|
|
@@ -498,6 +509,8 @@ var ScopesWithFullOptions = RecordScopeTypeV2.extract([
|
|
|
498
509
|
"record.read",
|
|
499
510
|
"record.request-correction",
|
|
500
511
|
"record.correct",
|
|
512
|
+
"record.revoke-registration",
|
|
513
|
+
"record.reinstate-registration",
|
|
501
514
|
"record.unassign-others",
|
|
502
515
|
"record.review-duplicates"
|
|
503
516
|
]);
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|