@opencrvs/toolkit 2.0.0-rc.871fe69 → 2.0.0-rc.87ceb55
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 +15 -11
- package/dist/cli.js +206 -36
- package/dist/commons/api/router.d.ts +3269 -203
- package/dist/commons/conditionals/validate.d.ts +1 -0
- package/dist/commons/events/ActionInput.d.ts +72 -0
- package/dist/commons/events/Draft.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +0 -4
- package/dist/commons/events/EventMetadata.d.ts +0 -8
- package/dist/commons/events/WorkqueueConfig.d.ts +146 -146
- package/dist/commons/events/state/index.d.ts +0 -5
- package/dist/commons/events/state/utils.d.ts +0 -2
- package/dist/commons/events/utils.d.ts +1 -1
- package/dist/conditionals/index.js +3 -1
- package/dist/events/index.js +41 -59
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
- package/dist/migrations/v2.0/index.d.ts.map +1 -1
- package/dist/migrations/v2.0/index.js +204 -34
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-scopes.js +54 -30
- package/dist/notification/index.js +28 -29
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.87ceb55.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.871fe69.tgz +0 -0
|
@@ -293,7 +293,9 @@ var ScopeType = z2.enum([
|
|
|
293
293
|
var EncodedScope = z2.string().brand("EncodedScope");
|
|
294
294
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
295
295
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
296
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
296
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
297
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
298
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
297
299
|
};
|
|
298
300
|
|
|
299
301
|
// ../commons/src/authentication.ts
|
|
@@ -652,7 +654,10 @@ var ActionConditional = z7.discriminatedUnion("type", [
|
|
|
652
654
|
ShowConditional,
|
|
653
655
|
// Action can be shown to the user in the list but as disabled
|
|
654
656
|
EnableConditional
|
|
655
|
-
])
|
|
657
|
+
]).meta({
|
|
658
|
+
description: "Action conditional configuration",
|
|
659
|
+
id: "ActionConditional"
|
|
660
|
+
});
|
|
656
661
|
var DisplayOnReviewConditional = z7.object({
|
|
657
662
|
type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
658
663
|
conditional: Conditional
|
|
@@ -1303,6 +1308,9 @@ var FlagConfig = z15.object({
|
|
|
1303
1308
|
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1304
1309
|
),
|
|
1305
1310
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1311
|
+
}).meta({
|
|
1312
|
+
description: "Flag configuration",
|
|
1313
|
+
id: "FlagConfig"
|
|
1306
1314
|
});
|
|
1307
1315
|
var ActionFlagConfig = z15.object({
|
|
1308
1316
|
id: Flag,
|
|
@@ -1310,6 +1318,9 @@ var ActionFlagConfig = z15.object({
|
|
|
1310
1318
|
conditional: Conditional.optional().describe(
|
|
1311
1319
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1312
1320
|
)
|
|
1321
|
+
}).meta({
|
|
1322
|
+
description: "Action flag configuration",
|
|
1323
|
+
id: "ActionFlagConfig"
|
|
1313
1324
|
});
|
|
1314
1325
|
|
|
1315
1326
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1331,8 +1342,7 @@ var ActionCreationMetadata = z16.object({
|
|
|
1331
1342
|
),
|
|
1332
1343
|
createdByUserType: z16.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1333
1344
|
acceptedAt: z16.iso.datetime().describe("Timestamp when the action request was accepted."),
|
|
1334
|
-
createdByRole: z16.string().optional().describe("Role of the user at the time of action request creation.")
|
|
1335
|
-
createdBySignature: z16.string().nullish().describe("Signature of the user who created the action request.")
|
|
1345
|
+
createdByRole: z16.string().optional().describe("Role of the user at the time of action request creation.")
|
|
1336
1346
|
});
|
|
1337
1347
|
var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
1338
1348
|
registrationNumber: z16.string().describe(
|
|
@@ -1360,9 +1370,6 @@ var EventMetadata = z16.object({
|
|
|
1360
1370
|
createdAtLocation: UUID.nullish().describe(
|
|
1361
1371
|
"Location of the user who created the event."
|
|
1362
1372
|
),
|
|
1363
|
-
createdBySignature: DocumentPath.nullish().describe(
|
|
1364
|
-
"Signature of the user who created the event."
|
|
1365
|
-
),
|
|
1366
1373
|
updatedAtLocation: UUID.nullish().describe(
|
|
1367
1374
|
"Location of the user who last changed the status."
|
|
1368
1375
|
),
|
|
@@ -1370,9 +1377,6 @@ var EventMetadata = z16.object({
|
|
|
1370
1377
|
"Timestamp of the most recent *accepted* status change. Possibly 3rd party update, if action is validation asynchronously."
|
|
1371
1378
|
),
|
|
1372
1379
|
assignedTo: z16.string().nullish().describe("ID of the user currently assigned to the event."),
|
|
1373
|
-
assignedToSignature: DocumentPath.nullish().describe(
|
|
1374
|
-
"Signature of the user who is currently assigned to the event."
|
|
1375
|
-
),
|
|
1376
1380
|
updatedBy: z16.string().nullish().describe("ID of the user who last changed the status."),
|
|
1377
1381
|
trackingId: z16.string().describe(
|
|
1378
1382
|
"System-generated tracking ID used by informants or registrars to look up the event."
|
|
@@ -1658,7 +1662,7 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
|
|
|
1658
1662
|
}
|
|
1659
1663
|
}).describe("Unique identifier for the field");
|
|
1660
1664
|
var FieldReference = import_v43.default.object({
|
|
1661
|
-
$$field: FieldId,
|
|
1665
|
+
$$field: FieldId.describe("Id of the field to reference"),
|
|
1662
1666
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
1663
1667
|
'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
|
|
1664
1668
|
)
|
|
@@ -2371,10 +2375,10 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2371
2375
|
type: z21.literal(PageTypes.enum.VERIFICATION),
|
|
2372
2376
|
actions: VerificationActionConfig
|
|
2373
2377
|
});
|
|
2374
|
-
var PageConfig = z21.discriminatedUnion("type", [
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
+
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
2379
|
+
description: "Page configuration",
|
|
2380
|
+
id: "PageConfig"
|
|
2381
|
+
});
|
|
2378
2382
|
|
|
2379
2383
|
// ../commons/src/events/FormConfig.ts
|
|
2380
2384
|
var DeclarationFormConfig = z22.object({
|
|
@@ -3674,7 +3678,7 @@ var _EventConfigBase = z33.object({
|
|
|
3674
3678
|
),
|
|
3675
3679
|
label: TranslationConfig.describe("Human-readable label for the event type."),
|
|
3676
3680
|
actions: z33.array(ActionConfig).describe(
|
|
3677
|
-
"Configuration of
|
|
3681
|
+
"Configuration of core and custom actions associated with the event."
|
|
3678
3682
|
),
|
|
3679
3683
|
actionOrder: z33.array(z33.string()).optional().describe(
|
|
3680
3684
|
"Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
|
|
@@ -3686,7 +3690,7 @@ var _EventConfigBase = z33.object({
|
|
|
3686
3690
|
"Configuration of fields available in the advanced search feature."
|
|
3687
3691
|
),
|
|
3688
3692
|
flags: z33.array(FlagConfig).optional().default([]).describe(
|
|
3689
|
-
"Configuration of flags associated with the actions of this event type."
|
|
3693
|
+
"Configuration of custom flags associated with the actions of this event type."
|
|
3690
3694
|
),
|
|
3691
3695
|
analytics: z33.boolean().optional().default(true).describe(
|
|
3692
3696
|
"Indicates whether the records of this event type are included in analytics"
|
|
@@ -4124,18 +4128,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4124
4128
|
query: true,
|
|
4125
4129
|
columns: true
|
|
4126
4130
|
});
|
|
4127
|
-
var WorkqueueConfigInput =
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
query: CountryConfigQueryInputType,
|
|
4133
|
-
action: z37.object({ type: WorkqueueActionType }).optional().describe(
|
|
4134
|
-
"Workqueue call-to-action button configuration. This determines the quick action button shown on each event card and the action taken when the button is clicked."
|
|
4135
|
-
),
|
|
4136
|
-
columns: z37.array(WorkqueueColumn).default(mandatoryColumns),
|
|
4137
|
-
icon: AvailableIcons,
|
|
4138
|
-
emptyMessage: TranslationConfig.optional()
|
|
4131
|
+
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4132
|
+
query: CountryConfigQueryInputType
|
|
4133
|
+
}).meta({
|
|
4134
|
+
description: "Workqueue configuration",
|
|
4135
|
+
id: "WorkqueueConfig"
|
|
4139
4136
|
});
|
|
4140
4137
|
var WorkqueueCountInput = z37.array(
|
|
4141
4138
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
@@ -4175,6 +4172,8 @@ var BaseActionInput = z38.object({
|
|
|
4175
4172
|
originalActionId: UUID.optional(),
|
|
4176
4173
|
// should not be part of base action.
|
|
4177
4174
|
keepAssignment: z38.boolean().optional(),
|
|
4175
|
+
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
4176
|
+
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
4178
4177
|
waitFor: z38.boolean().optional(),
|
|
4179
4178
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
4180
4179
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
package/dist/scopes/index.js
CHANGED
|
@@ -365,7 +365,9 @@ var decodeScope = (query) => {
|
|
|
365
365
|
};
|
|
366
366
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
367
367
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
368
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
368
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
369
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
370
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
369
371
|
};
|
|
370
372
|
function getScopeOptionValue(scope, option) {
|
|
371
373
|
const options = "options" in scope ? scope.options : void 0;
|
|
Binary file
|
package/package.json
CHANGED
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
|
|
1
|
+
{"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/fix-accept-requested-registration-function-type.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
|
|
Binary file
|