@opencrvs/toolkit 2.1.0-rc.f383722 → 2.1.0-rc.f5f3da9
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/README.md +1 -0
- package/dist/application-config/index.js +0 -1
- package/dist/cli.js +217 -77
- package/dist/commons/api/router.d.ts +0 -85
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/AdvancedSearchConfig.d.ts +0 -6
- package/dist/commons/events/AuditLog.d.ts +0 -37
- package/dist/commons/events/EventIndex.d.ts +2 -2
- package/dist/commons/events/FieldConfig.d.ts +1 -6
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/locations.d.ts +0 -7
- package/dist/conditionals/index.js +0 -1
- package/dist/environment/index.d.ts +1 -0
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +10 -0
- package/dist/environment/logger.d.ts +3 -12
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/paths.d.ts +13 -0
- package/dist/environment/paths.d.ts.map +1 -0
- package/dist/environment/paths.js +94 -0
- package/dist/environment/setup-environment.js +2 -1
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +2 -1
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +4 -3
- package/dist/environment/upgrade.d.ts +2 -0
- package/dist/environment/upgrade.d.ts.map +1 -0
- package/dist/environment/upgrade.js +100 -0
- package/dist/environment/users.js +11 -13
- package/dist/events/index.js +0 -88
- package/dist/notification/index.js +25 -99
- package/dist/scopes/index.d.ts +26 -28
- package/dist/scopes/index.js +0 -1
- package/opencrvs-toolkit-2.1.0-rc.f5f3da9.tgz +0 -0
- package/package.json +3 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/.nx/cache/file-map.json +0 -360
- package/.nx/cache/project-graph.json +0 -6
- package/dist/commons/events/locationPayloads.d.ts +0 -95
- package/opencrvs-toolkit-2.1.0-rc.f383722.tgz +0 -0
package/dist/events/index.js
CHANGED
|
@@ -80,8 +80,6 @@ __export(events_exports, {
|
|
|
80
80
|
ConditionalType: () => ConditionalType,
|
|
81
81
|
ConfirmableActions: () => ConfirmableActions,
|
|
82
82
|
ContainsFlags: () => ContainsFlags,
|
|
83
|
-
CreateAdministrativeAreaPayload: () => CreateAdministrativeAreaPayload,
|
|
84
|
-
CreateLocationPayload: () => CreateLocationPayload,
|
|
85
83
|
CustomActionInput: () => CustomActionInput,
|
|
86
84
|
CustomFieldValue: () => CustomFieldValue,
|
|
87
85
|
CustomFlag: () => CustomFlag,
|
|
@@ -222,8 +220,6 @@ __export(events_exports, {
|
|
|
222
220
|
UUID: () => UUID,
|
|
223
221
|
UnarchiveActionInput: () => UnarchiveActionInput,
|
|
224
222
|
UnassignActionInput: () => UnassignActionInput,
|
|
225
|
-
UpdateAdministrativeAreaPayload: () => UpdateAdministrativeAreaPayload,
|
|
226
|
-
UpdateLocationPayload: () => UpdateLocationPayload,
|
|
227
223
|
UserAuditRecordInput: () => UserAuditRecordInput,
|
|
228
224
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS,
|
|
229
225
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP,
|
|
@@ -233,8 +229,6 @@ __export(events_exports, {
|
|
|
233
229
|
VerificationActionConfig: () => VerificationActionConfig,
|
|
234
230
|
VerificationPageConfig: () => VerificationPageConfig,
|
|
235
231
|
VerificationStatusValue: () => VerificationStatusValue,
|
|
236
|
-
WithdrawAdministrativeAreaVersionPayload: () => WithdrawAdministrativeAreaVersionPayload,
|
|
237
|
-
WithdrawLocationVersionPayload: () => WithdrawLocationVersionPayload,
|
|
238
232
|
Within: () => Within,
|
|
239
233
|
WorkqueueActionType: () => WorkqueueActionType,
|
|
240
234
|
WorkqueueColumn: () => WorkqueueColumn,
|
|
@@ -353,7 +347,6 @@ __export(events_exports, {
|
|
|
353
347
|
getStatusFromActions: () => getStatusFromActions,
|
|
354
348
|
getValidatorsForField: () => getValidatorsForField,
|
|
355
349
|
getVisibleVerificationPageIds: () => getVisibleVerificationPageIds,
|
|
356
|
-
hasActiveExternalIdOnOrAfter: () => hasActiveExternalIdOnOrAfter,
|
|
357
350
|
hasAnyOfScopes: () => hasAnyOfScopes,
|
|
358
351
|
isActionAvailable: () => isActionAvailable,
|
|
359
352
|
isActionConfigType: () => isActionConfigType,
|
|
@@ -512,7 +505,6 @@ var PlainScopeType = z2.enum([
|
|
|
512
505
|
"integration.create",
|
|
513
506
|
"record.import",
|
|
514
507
|
"config.update-all",
|
|
515
|
-
"location.edit",
|
|
516
508
|
"attachment.upload",
|
|
517
509
|
"profile.electronic-signature",
|
|
518
510
|
"user.read-only-my-audit",
|
|
@@ -995,29 +987,6 @@ var IntegrationRefreshSecretEntrySchema = AuditLogEntryBase.extend({
|
|
|
995
987
|
requestData: z5.object({ id: z5.string() }),
|
|
996
988
|
responseSummary: z5.object({ clientId: z5.string() })
|
|
997
989
|
});
|
|
998
|
-
var createdVersionFields = {
|
|
999
|
-
id: z5.string(),
|
|
1000
|
-
versionId: z5.string(),
|
|
1001
|
-
name: z5.string(),
|
|
1002
|
-
externalId: z5.string().nullish(),
|
|
1003
|
-
effectiveFrom: z5.string(),
|
|
1004
|
-
status: z5.string()
|
|
1005
|
-
};
|
|
1006
|
-
var LocationCreateEntrySchema = AuditLogEntryBase.extend({
|
|
1007
|
-
operation: z5.literal("locations.create"),
|
|
1008
|
-
requestData: z5.object({
|
|
1009
|
-
...createdVersionFields,
|
|
1010
|
-
administrativeAreaId: z5.string().nullish(),
|
|
1011
|
-
locationType: z5.string().nullish()
|
|
1012
|
-
})
|
|
1013
|
-
});
|
|
1014
|
-
var AdministrativeAreaCreateEntrySchema = AuditLogEntryBase.extend({
|
|
1015
|
-
operation: z5.literal("administrativeAreas.create"),
|
|
1016
|
-
requestData: z5.object({
|
|
1017
|
-
...createdVersionFields,
|
|
1018
|
-
parentId: z5.string().nullish()
|
|
1019
|
-
})
|
|
1020
|
-
});
|
|
1021
990
|
var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
|
|
1022
991
|
operation: z5.literal("attachments.upload"),
|
|
1023
992
|
requestData: z5.object({
|
|
@@ -1093,8 +1062,6 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
|
|
|
1093
1062
|
IntegrationActivateEntrySchema,
|
|
1094
1063
|
IntegrationDeleteEntrySchema,
|
|
1095
1064
|
IntegrationRefreshSecretEntrySchema,
|
|
1096
|
-
LocationCreateEntrySchema,
|
|
1097
|
-
AdministrativeAreaCreateEntrySchema,
|
|
1098
1065
|
AttachmentUploadEntrySchema,
|
|
1099
1066
|
UserCreateEntrySchema,
|
|
1100
1067
|
UserReasonEntrySchema,
|
|
@@ -10551,13 +10518,6 @@ function resolveVersion(versions, anchor) {
|
|
|
10551
10518
|
}
|
|
10552
10519
|
return resolved;
|
|
10553
10520
|
}
|
|
10554
|
-
function hasActiveExternalIdOnOrAfter(versions, externalId, anchor) {
|
|
10555
|
-
const inEffectAtAnchor = resolveVersion(versions, anchor);
|
|
10556
|
-
const laterVersions = versions.filter((v) => v.effectiveFrom > anchor);
|
|
10557
|
-
return [inEffectAtAnchor, ...laterVersions].some(
|
|
10558
|
-
(v) => v.externalId === externalId && v.status === "active"
|
|
10559
|
-
);
|
|
10560
|
-
}
|
|
10561
10521
|
function matchesJurisdictionFilter(locationIds, filter, user2) {
|
|
10562
10522
|
if (!locationIds) {
|
|
10563
10523
|
return false;
|
|
@@ -11368,51 +11328,3 @@ var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
|
11368
11328
|
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
11369
11329
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
11370
11330
|
);
|
|
11371
|
-
|
|
11372
|
-
// ../commons/src/events/locationPayloads.ts
|
|
11373
|
-
var z44 = __toESM(require("zod/v4"));
|
|
11374
|
-
var CreateLocationPayload = z44.object({
|
|
11375
|
-
id: UUID.optional(),
|
|
11376
|
-
versionId: UUID.optional(),
|
|
11377
|
-
name: z44.string(),
|
|
11378
|
-
externalId: z44.string().nullish(),
|
|
11379
|
-
administrativeAreaId: UUID.nullable(),
|
|
11380
|
-
locationType: z44.string().nullable(),
|
|
11381
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11382
|
-
status: LocationStatus.default("active")
|
|
11383
|
-
});
|
|
11384
|
-
var UpdateLocationPayload = z44.strictObject({
|
|
11385
|
-
id: UUID,
|
|
11386
|
-
versionId: UUID.optional(),
|
|
11387
|
-
name: z44.string(),
|
|
11388
|
-
externalId: z44.string().nullish(),
|
|
11389
|
-
status: LocationStatus,
|
|
11390
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11391
|
-
lastVersionId: UUID
|
|
11392
|
-
});
|
|
11393
|
-
var WithdrawLocationVersionPayload = z44.object({
|
|
11394
|
-
id: UUID,
|
|
11395
|
-
versionId: UUID
|
|
11396
|
-
});
|
|
11397
|
-
var CreateAdministrativeAreaPayload = z44.object({
|
|
11398
|
-
id: UUID.optional(),
|
|
11399
|
-
versionId: UUID.optional(),
|
|
11400
|
-
name: z44.string(),
|
|
11401
|
-
externalId: z44.string().nullish(),
|
|
11402
|
-
parentId: UUID.nullable(),
|
|
11403
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11404
|
-
status: LocationStatus.default("active")
|
|
11405
|
-
});
|
|
11406
|
-
var UpdateAdministrativeAreaPayload = z44.strictObject({
|
|
11407
|
-
id: UUID,
|
|
11408
|
-
versionId: UUID.optional(),
|
|
11409
|
-
name: z44.string(),
|
|
11410
|
-
externalId: z44.string().nullish(),
|
|
11411
|
-
status: LocationStatus,
|
|
11412
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11413
|
-
lastVersionId: UUID
|
|
11414
|
-
});
|
|
11415
|
-
var WithdrawAdministrativeAreaVersionPayload = z44.object({
|
|
11416
|
-
id: UUID,
|
|
11417
|
-
versionId: UUID
|
|
11418
|
-
});
|
|
@@ -38,7 +38,7 @@ __export(notification_exports, {
|
|
|
38
38
|
triggerUserEventNotification: () => triggerUserEventNotification
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(notification_exports);
|
|
41
|
-
var
|
|
41
|
+
var z45 = __toESM(require("zod/v4"));
|
|
42
42
|
|
|
43
43
|
// ../commons/src/url.ts
|
|
44
44
|
function joinUrl(base, path) {
|
|
@@ -96,7 +96,6 @@ var PlainScopeType = z2.enum([
|
|
|
96
96
|
"integration.create",
|
|
97
97
|
"record.import",
|
|
98
98
|
"config.update-all",
|
|
99
|
-
"location.edit",
|
|
100
99
|
"attachment.upload",
|
|
101
100
|
"profile.electronic-signature",
|
|
102
101
|
"user.read-only-my-audit",
|
|
@@ -531,29 +530,6 @@ var IntegrationRefreshSecretEntrySchema = AuditLogEntryBase.extend({
|
|
|
531
530
|
requestData: z5.object({ id: z5.string() }),
|
|
532
531
|
responseSummary: z5.object({ clientId: z5.string() })
|
|
533
532
|
});
|
|
534
|
-
var createdVersionFields = {
|
|
535
|
-
id: z5.string(),
|
|
536
|
-
versionId: z5.string(),
|
|
537
|
-
name: z5.string(),
|
|
538
|
-
externalId: z5.string().nullish(),
|
|
539
|
-
effectiveFrom: z5.string(),
|
|
540
|
-
status: z5.string()
|
|
541
|
-
};
|
|
542
|
-
var LocationCreateEntrySchema = AuditLogEntryBase.extend({
|
|
543
|
-
operation: z5.literal("locations.create"),
|
|
544
|
-
requestData: z5.object({
|
|
545
|
-
...createdVersionFields,
|
|
546
|
-
administrativeAreaId: z5.string().nullish(),
|
|
547
|
-
locationType: z5.string().nullish()
|
|
548
|
-
})
|
|
549
|
-
});
|
|
550
|
-
var AdministrativeAreaCreateEntrySchema = AuditLogEntryBase.extend({
|
|
551
|
-
operation: z5.literal("administrativeAreas.create"),
|
|
552
|
-
requestData: z5.object({
|
|
553
|
-
...createdVersionFields,
|
|
554
|
-
parentId: z5.string().nullish()
|
|
555
|
-
})
|
|
556
|
-
});
|
|
557
533
|
var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
|
|
558
534
|
operation: z5.literal("attachments.upload"),
|
|
559
535
|
requestData: z5.object({
|
|
@@ -629,8 +605,6 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
|
|
|
629
605
|
IntegrationActivateEntrySchema,
|
|
630
606
|
IntegrationDeleteEntrySchema,
|
|
631
607
|
IntegrationRefreshSecretEntrySchema,
|
|
632
|
-
LocationCreateEntrySchema,
|
|
633
|
-
AdministrativeAreaCreateEntrySchema,
|
|
634
608
|
AttachmentUploadEntrySchema,
|
|
635
609
|
UserCreateEntrySchema,
|
|
636
610
|
UserReasonEntrySchema,
|
|
@@ -7853,56 +7827,8 @@ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
|
7853
7827
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
7854
7828
|
);
|
|
7855
7829
|
|
|
7856
|
-
// ../commons/src/events/locationPayloads.ts
|
|
7857
|
-
var z44 = __toESM(require("zod/v4"));
|
|
7858
|
-
var CreateLocationPayload = z44.object({
|
|
7859
|
-
id: UUID.optional(),
|
|
7860
|
-
versionId: UUID.optional(),
|
|
7861
|
-
name: z44.string(),
|
|
7862
|
-
externalId: z44.string().nullish(),
|
|
7863
|
-
administrativeAreaId: UUID.nullable(),
|
|
7864
|
-
locationType: z44.string().nullable(),
|
|
7865
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7866
|
-
status: LocationStatus.default("active")
|
|
7867
|
-
});
|
|
7868
|
-
var UpdateLocationPayload = z44.strictObject({
|
|
7869
|
-
id: UUID,
|
|
7870
|
-
versionId: UUID.optional(),
|
|
7871
|
-
name: z44.string(),
|
|
7872
|
-
externalId: z44.string().nullish(),
|
|
7873
|
-
status: LocationStatus,
|
|
7874
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7875
|
-
lastVersionId: UUID
|
|
7876
|
-
});
|
|
7877
|
-
var WithdrawLocationVersionPayload = z44.object({
|
|
7878
|
-
id: UUID,
|
|
7879
|
-
versionId: UUID
|
|
7880
|
-
});
|
|
7881
|
-
var CreateAdministrativeAreaPayload = z44.object({
|
|
7882
|
-
id: UUID.optional(),
|
|
7883
|
-
versionId: UUID.optional(),
|
|
7884
|
-
name: z44.string(),
|
|
7885
|
-
externalId: z44.string().nullish(),
|
|
7886
|
-
parentId: UUID.nullable(),
|
|
7887
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7888
|
-
status: LocationStatus.default("active")
|
|
7889
|
-
});
|
|
7890
|
-
var UpdateAdministrativeAreaPayload = z44.strictObject({
|
|
7891
|
-
id: UUID,
|
|
7892
|
-
versionId: UUID.optional(),
|
|
7893
|
-
name: z44.string(),
|
|
7894
|
-
externalId: z44.string().nullish(),
|
|
7895
|
-
status: LocationStatus,
|
|
7896
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7897
|
-
lastVersionId: UUID
|
|
7898
|
-
});
|
|
7899
|
-
var WithdrawAdministrativeAreaVersionPayload = z44.object({
|
|
7900
|
-
id: UUID,
|
|
7901
|
-
versionId: UUID
|
|
7902
|
-
});
|
|
7903
|
-
|
|
7904
7830
|
// ../commons/src/notification/UserNotifications.ts
|
|
7905
|
-
var
|
|
7831
|
+
var z44 = __toESM(require("zod/v4"));
|
|
7906
7832
|
var TriggerEvent = {
|
|
7907
7833
|
USER_CREATED: "user-created",
|
|
7908
7834
|
USER_UPDATED: "user-updated",
|
|
@@ -7915,54 +7841,54 @@ var TriggerEvent = {
|
|
|
7915
7841
|
CHANGE_PHONE_NUMBER: "change-phone-number",
|
|
7916
7842
|
CHANGE_EMAIL_ADDRESS: "change-email-address"
|
|
7917
7843
|
};
|
|
7918
|
-
var Recipient =
|
|
7844
|
+
var Recipient = z44.object({
|
|
7919
7845
|
name: NameFieldValue.optional(),
|
|
7920
|
-
mobile:
|
|
7921
|
-
email:
|
|
7922
|
-
bcc:
|
|
7846
|
+
mobile: z44.string().optional(),
|
|
7847
|
+
email: z44.string().optional(),
|
|
7848
|
+
bcc: z44.array(z44.string()).optional()
|
|
7923
7849
|
});
|
|
7924
|
-
var BasePayload =
|
|
7850
|
+
var BasePayload = z44.object({
|
|
7925
7851
|
recipient: Recipient
|
|
7926
7852
|
});
|
|
7927
7853
|
var TriggerPayload = {
|
|
7928
7854
|
[TriggerEvent.USER_CREATED]: BasePayload.extend({
|
|
7929
|
-
username:
|
|
7930
|
-
temporaryPassword:
|
|
7855
|
+
username: z44.string(),
|
|
7856
|
+
temporaryPassword: z44.string()
|
|
7931
7857
|
}),
|
|
7932
7858
|
[TriggerEvent.USER_UPDATED]: BasePayload.extend({
|
|
7933
|
-
oldUsername:
|
|
7934
|
-
newUsername:
|
|
7859
|
+
oldUsername: z44.string(),
|
|
7860
|
+
newUsername: z44.string()
|
|
7935
7861
|
}),
|
|
7936
7862
|
[TriggerEvent.USERNAME_REMINDER]: BasePayload.extend({
|
|
7937
|
-
username:
|
|
7863
|
+
username: z44.string()
|
|
7938
7864
|
}),
|
|
7939
7865
|
[TriggerEvent.RESET_PASSWORD]: BasePayload.extend({
|
|
7940
|
-
code:
|
|
7866
|
+
code: z44.string()
|
|
7941
7867
|
}),
|
|
7942
7868
|
[TriggerEvent.RESET_PASSWORD_BY_ADMIN]: BasePayload.extend({
|
|
7943
|
-
temporaryPassword:
|
|
7944
|
-
admin:
|
|
7945
|
-
id:
|
|
7869
|
+
temporaryPassword: z44.string(),
|
|
7870
|
+
admin: z44.object({
|
|
7871
|
+
id: z44.string(),
|
|
7946
7872
|
name: NameFieldValue,
|
|
7947
|
-
role:
|
|
7873
|
+
role: z44.string()
|
|
7948
7874
|
})
|
|
7949
7875
|
}),
|
|
7950
7876
|
[TriggerEvent.RESEND_INVITE]: BasePayload.extend({
|
|
7951
|
-
username:
|
|
7952
|
-
temporaryPassword:
|
|
7877
|
+
username: z44.string(),
|
|
7878
|
+
temporaryPassword: z44.string()
|
|
7953
7879
|
}),
|
|
7954
7880
|
[TriggerEvent.TWO_FA]: BasePayload.extend({
|
|
7955
|
-
code:
|
|
7881
|
+
code: z44.string()
|
|
7956
7882
|
}),
|
|
7957
7883
|
[TriggerEvent.ALL_USER_NOTIFICATION]: BasePayload.extend({
|
|
7958
|
-
subject:
|
|
7959
|
-
body:
|
|
7884
|
+
subject: z44.string(),
|
|
7885
|
+
body: z44.string()
|
|
7960
7886
|
}),
|
|
7961
7887
|
[TriggerEvent.CHANGE_PHONE_NUMBER]: BasePayload.extend({
|
|
7962
|
-
code:
|
|
7888
|
+
code: z44.string()
|
|
7963
7889
|
}),
|
|
7964
7890
|
[TriggerEvent.CHANGE_EMAIL_ADDRESS]: BasePayload.extend({
|
|
7965
|
-
code:
|
|
7891
|
+
code: z44.string()
|
|
7966
7892
|
})
|
|
7967
7893
|
};
|
|
7968
7894
|
async function triggerUserEventNotification({
|
|
@@ -7986,4 +7912,4 @@ function parseUserEventTrigger(event2, body) {
|
|
|
7986
7912
|
}
|
|
7987
7913
|
|
|
7988
7914
|
// src/notification/index.ts
|
|
7989
|
-
|
|
7915
|
+
z45.globalRegistry.clear();
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const RecordScopeTypeV2: z.ZodEnum<{
|
|
|
36
36
|
}>;
|
|
37
37
|
export type RecordScopeTypeV2 = z.infer<typeof RecordScopeTypeV2>;
|
|
38
38
|
declare const AllScopeOptions: z.ZodObject<{
|
|
39
|
-
event: z.
|
|
39
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
40
40
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
41
41
|
administrativeArea: "administrativeArea";
|
|
42
42
|
all: "all";
|
|
@@ -71,8 +71,8 @@ declare const AllScopeOptions: z.ZodObject<{
|
|
|
71
71
|
all: "all";
|
|
72
72
|
location: "location";
|
|
73
73
|
}>>;
|
|
74
|
-
role: z.ZodOptional<z.
|
|
75
|
-
ids: z.
|
|
74
|
+
role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
75
|
+
ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
|
|
76
76
|
}, z.core.$strip>;
|
|
77
77
|
type AllScopeOptions = z.infer<typeof AllScopeOptions>;
|
|
78
78
|
export declare const ScopeOptionKey: z.ZodEnum<{
|
|
@@ -116,7 +116,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
116
116
|
"record.notify": "record.notify";
|
|
117
117
|
}>;
|
|
118
118
|
options: z.ZodOptional<z.ZodObject<{
|
|
119
|
-
event: z.
|
|
119
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
120
120
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
121
121
|
administrativeArea: "administrativeArea";
|
|
122
122
|
all: "all";
|
|
@@ -133,7 +133,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
133
133
|
"record.unarchive": "record.unarchive";
|
|
134
134
|
}>;
|
|
135
135
|
options: z.ZodOptional<z.ZodObject<{
|
|
136
|
-
event: z.
|
|
136
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
137
137
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
138
138
|
administrativeArea: "administrativeArea";
|
|
139
139
|
all: "all";
|
|
@@ -165,7 +165,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
165
165
|
"record.unassign-others": "record.unassign-others";
|
|
166
166
|
}>;
|
|
167
167
|
options: z.ZodOptional<z.ZodObject<{
|
|
168
|
-
event: z.
|
|
168
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
169
169
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
170
170
|
administrativeArea: "administrativeArea";
|
|
171
171
|
all: "all";
|
|
@@ -199,7 +199,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
199
199
|
}, z.core.$strip>, z.ZodObject<{
|
|
200
200
|
type: z.ZodLiteral<"record.custom-action">;
|
|
201
201
|
options: z.ZodOptional<z.ZodObject<{
|
|
202
|
-
event: z.
|
|
202
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
203
203
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
204
204
|
administrativeArea: "administrativeArea";
|
|
205
205
|
all: "all";
|
|
@@ -229,12 +229,12 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
229
229
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
230
230
|
user: "user";
|
|
231
231
|
}>>;
|
|
232
|
-
customActionTypes: z.
|
|
232
|
+
customActionTypes: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
233
233
|
}, z.core.$strip>>;
|
|
234
234
|
}, z.core.$strip>, z.ZodObject<{
|
|
235
235
|
type: z.ZodLiteral<"record.print-certified-copies">;
|
|
236
236
|
options: z.ZodOptional<z.ZodObject<{
|
|
237
|
-
event: z.
|
|
237
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
238
238
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
239
239
|
administrativeArea: "administrativeArea";
|
|
240
240
|
all: "all";
|
|
@@ -264,7 +264,7 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
264
264
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
265
265
|
user: "user";
|
|
266
266
|
}>>;
|
|
267
|
-
templates: z.
|
|
267
|
+
templates: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
268
268
|
}, z.core.$strip>>;
|
|
269
269
|
}, z.core.$strip>], "type">;
|
|
270
270
|
declare const SystemScopeType: z.ZodEnum<{
|
|
@@ -298,7 +298,7 @@ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
298
298
|
all: "all";
|
|
299
299
|
location: "location";
|
|
300
300
|
}>>;
|
|
301
|
-
role: z.ZodOptional<z.
|
|
301
|
+
role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
302
302
|
}, z.core.$strip>>;
|
|
303
303
|
}, z.core.$strip>, z.ZodObject<{
|
|
304
304
|
type: z.ZodEnum<{
|
|
@@ -336,7 +336,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
336
336
|
"record.notify": "record.notify";
|
|
337
337
|
}>;
|
|
338
338
|
options: z.ZodOptional<z.ZodObject<{
|
|
339
|
-
event: z.
|
|
339
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
340
340
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
341
341
|
}, z.core.$strip>>;
|
|
342
342
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -349,7 +349,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
349
349
|
"record.unarchive": "record.unarchive";
|
|
350
350
|
}>;
|
|
351
351
|
options: z.ZodOptional<z.ZodObject<{
|
|
352
|
-
event: z.
|
|
352
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
353
353
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
354
354
|
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
355
355
|
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
@@ -365,7 +365,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
365
365
|
"record.unassign-others": "record.unassign-others";
|
|
366
366
|
}>;
|
|
367
367
|
options: z.ZodOptional<z.ZodObject<{
|
|
368
|
-
event: z.
|
|
368
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
369
369
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
370
370
|
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
371
371
|
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
@@ -377,7 +377,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
377
377
|
}, z.core.$strip>, z.ZodObject<{
|
|
378
378
|
type: z.ZodLiteral<"record.print-certified-copies">;
|
|
379
379
|
options: z.ZodOptional<z.ZodObject<{
|
|
380
|
-
event: z.
|
|
380
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
381
381
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
382
382
|
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
383
383
|
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
@@ -397,7 +397,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
397
397
|
bypassratelimit: "bypassratelimit";
|
|
398
398
|
"config.update-all": "config.update-all";
|
|
399
399
|
"integration.create": "integration.create";
|
|
400
|
-
"location.edit": "location.edit";
|
|
401
400
|
"performance.read": "performance.read";
|
|
402
401
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
403
402
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
@@ -416,7 +415,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
416
415
|
"record.notify": "record.notify";
|
|
417
416
|
}>;
|
|
418
417
|
options: z.ZodOptional<z.ZodObject<{
|
|
419
|
-
event: z.
|
|
418
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
420
419
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
421
420
|
administrativeArea: "administrativeArea";
|
|
422
421
|
all: "all";
|
|
@@ -433,7 +432,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
433
432
|
"record.unarchive": "record.unarchive";
|
|
434
433
|
}>;
|
|
435
434
|
options: z.ZodOptional<z.ZodObject<{
|
|
436
|
-
event: z.
|
|
435
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
437
436
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
438
437
|
administrativeArea: "administrativeArea";
|
|
439
438
|
all: "all";
|
|
@@ -465,7 +464,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
465
464
|
"record.unassign-others": "record.unassign-others";
|
|
466
465
|
}>;
|
|
467
466
|
options: z.ZodOptional<z.ZodObject<{
|
|
468
|
-
event: z.
|
|
467
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
469
468
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
470
469
|
administrativeArea: "administrativeArea";
|
|
471
470
|
all: "all";
|
|
@@ -499,7 +498,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
499
498
|
}, z.core.$strip>, z.ZodObject<{
|
|
500
499
|
type: z.ZodLiteral<"record.custom-action">;
|
|
501
500
|
options: z.ZodOptional<z.ZodObject<{
|
|
502
|
-
event: z.
|
|
501
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
503
502
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
504
503
|
administrativeArea: "administrativeArea";
|
|
505
504
|
all: "all";
|
|
@@ -529,12 +528,12 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
529
528
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
530
529
|
user: "user";
|
|
531
530
|
}>>;
|
|
532
|
-
customActionTypes: z.
|
|
531
|
+
customActionTypes: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
533
532
|
}, z.core.$strip>>;
|
|
534
533
|
}, z.core.$strip>, z.ZodObject<{
|
|
535
534
|
type: z.ZodLiteral<"record.print-certified-copies">;
|
|
536
535
|
options: z.ZodOptional<z.ZodObject<{
|
|
537
|
-
event: z.
|
|
536
|
+
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
538
537
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
539
538
|
administrativeArea: "administrativeArea";
|
|
540
539
|
all: "all";
|
|
@@ -564,7 +563,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
564
563
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
565
564
|
user: "user";
|
|
566
565
|
}>>;
|
|
567
|
-
templates: z.
|
|
566
|
+
templates: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
568
567
|
}, z.core.$strip>>;
|
|
569
568
|
}, z.core.$strip>, z.ZodObject<{
|
|
570
569
|
type: z.ZodEnum<{
|
|
@@ -577,7 +576,7 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
577
576
|
all: "all";
|
|
578
577
|
location: "location";
|
|
579
578
|
}>>;
|
|
580
|
-
role: z.ZodOptional<z.
|
|
579
|
+
role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
581
580
|
}, z.core.$strip>>;
|
|
582
581
|
}, z.core.$strip>, z.ZodObject<{
|
|
583
582
|
type: z.ZodEnum<{
|
|
@@ -603,12 +602,12 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
603
602
|
}, z.core.$strip>, z.ZodObject<{
|
|
604
603
|
type: z.ZodLiteral<"workqueue">;
|
|
605
604
|
options: z.ZodObject<{
|
|
606
|
-
ids: z.
|
|
605
|
+
ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
|
|
607
606
|
}, z.core.$strip>;
|
|
608
607
|
}, z.core.$strip>, z.ZodObject<{
|
|
609
608
|
type: z.ZodLiteral<"dashboard.view">;
|
|
610
609
|
options: z.ZodObject<{
|
|
611
|
-
ids: z.
|
|
610
|
+
ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
|
|
612
611
|
}, z.core.$strip>;
|
|
613
612
|
}, z.core.$strip>], "type">;
|
|
614
613
|
export type Scope = z.infer<typeof Scope>;
|
|
@@ -618,7 +617,6 @@ export declare const ScopeType: z.ZodEnum<{
|
|
|
618
617
|
"config.update-all": "config.update-all";
|
|
619
618
|
"dashboard.view": "dashboard.view";
|
|
620
619
|
"integration.create": "integration.create";
|
|
621
|
-
"location.edit": "location.edit";
|
|
622
620
|
"organisation.read-locations": "organisation.read-locations";
|
|
623
621
|
"performance.read": "performance.read";
|
|
624
622
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -739,7 +737,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
739
737
|
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
740
738
|
} | undefined;
|
|
741
739
|
} | {
|
|
742
|
-
type: "attachment.upload" | "bypassratelimit" | "config.update-all" | "integration.create" | "
|
|
740
|
+
type: "attachment.upload" | "bypassratelimit" | "config.update-all" | "integration.create" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.confirm-registration" | "record.import" | "record.reindex" | "record.reject-registration" | "user.data-seeding" | "user.read-only-my-audit";
|
|
743
741
|
} | {
|
|
744
742
|
type: "organisation.read-locations";
|
|
745
743
|
options?: {
|
package/dist/scopes/index.js
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencrvs/toolkit",
|
|
3
|
-
"version": "2.1.0-rc.
|
|
3
|
+
"version": "2.1.0-rc.f5f3da9",
|
|
4
4
|
"description": "OpenCRVS toolkit for building country configurations",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "./build.sh",
|
|
21
|
-
"build:all": "
|
|
21
|
+
"build:all": "lerna run build --include-dependencies --scope @opencrvs/toolkit && ./build.sh"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
"zod-openapi": "^5.4.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@opencrvs/
|
|
55
|
-
"@opencrvs/events": "workspace:*",
|
|
54
|
+
"@opencrvs/events": "^2.0.0",
|
|
56
55
|
"@types/js-yaml": "4.0.9",
|
|
57
56
|
"@types/libsodium-wrappers": "^0.7.10",
|
|
58
57
|
"@types/object-hash": "^3.0.6",
|