@opencrvs/toolkit 1.9.7-rc.b719c87 → 1.9.7-rc.c2d5fba
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/commons/api/router.d.ts +223 -239
- package/dist/commons/events/ActionConfig.d.ts +0 -70
- package/dist/commons/events/ActionDocument.d.ts +47 -47
- package/dist/commons/events/Draft.d.ts +1 -1
- package/dist/commons/events/EventConfig.d.ts +0 -56
- package/dist/commons/events/EventDocument.d.ts +19 -19
- package/dist/commons/events/EventIndex.d.ts +3 -3
- package/dist/commons/events/EventMetadata.d.ts +7 -7
- package/dist/commons/events/FieldConfig.d.ts +0 -21
- package/dist/commons/events/FormConfig.d.ts +0 -42
- package/dist/commons/events/PageConfig.d.ts +0 -28
- package/dist/commons/events/defineConfig.d.ts +0 -8
- package/dist/commons/events/state/index.d.ts +3 -3
- package/dist/commons/events/state/utils.d.ts +21 -21
- package/dist/commons/events/utils.d.ts +19 -35
- package/dist/events/index.js +6 -12
- package/dist/notification/index.js +5 -11
- package/dist/scopes/index.d.ts +2 -3
- package/dist/scopes/index.js +1 -3
- package/package.json +1 -1
package/dist/events/index.js
CHANGED
|
@@ -993,7 +993,6 @@ var SCOPES = {
|
|
|
993
993
|
RECORD_IMPORT: "record.import",
|
|
994
994
|
RECORD_EXPORT: "record.export",
|
|
995
995
|
RECORD_REINDEX: "record.reindex",
|
|
996
|
-
INTEGRATION_CREATE: "integration.create",
|
|
997
996
|
// declare
|
|
998
997
|
RECORD_DECLARE_BIRTH: "record.declare-birth",
|
|
999
998
|
RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction",
|
|
@@ -1068,8 +1067,7 @@ var IntegrationScopes = z10.union([
|
|
|
1068
1067
|
z10.literal(SCOPES.WEBHOOK),
|
|
1069
1068
|
z10.literal(SCOPES.NATIONALID),
|
|
1070
1069
|
z10.literal(SCOPES.NOTIFICATION_API),
|
|
1071
|
-
z10.literal(SCOPES.RECORDSEARCH)
|
|
1072
|
-
z10.literal(SCOPES.INTEGRATION_CREATE)
|
|
1070
|
+
z10.literal(SCOPES.RECORDSEARCH)
|
|
1073
1071
|
]);
|
|
1074
1072
|
var InternalOperationsScopes = z10.union([
|
|
1075
1073
|
z10.literal(SCOPES.RECORD_REINDEX),
|
|
@@ -1437,7 +1435,7 @@ var ActionBase = z12.object({
|
|
|
1437
1435
|
),
|
|
1438
1436
|
createdAt: z12.string().datetime().describe("Timestamp indicating when the action was created."),
|
|
1439
1437
|
createdBy: z12.string().describe("Identifier of the user who created the action."),
|
|
1440
|
-
createdByRole: z12.string().
|
|
1438
|
+
createdByRole: z12.string().describe("Role of the user who created the action."),
|
|
1441
1439
|
createdBySignature: z12.string().nullish().describe("Reference to the signature of the user who created the action."),
|
|
1442
1440
|
// @TODO: createdAtLocation should be non-nullable in the future once all actions have this field populated.
|
|
1443
1441
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -1681,7 +1679,7 @@ var ActionCreationMetadata = z14.object({
|
|
|
1681
1679
|
),
|
|
1682
1680
|
createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1683
1681
|
acceptedAt: z14.iso.datetime().describe("Timestamp when the action request was accepted."),
|
|
1684
|
-
createdByRole: z14.string().
|
|
1682
|
+
createdByRole: z14.string().describe("Role of the user at the time of action request creation."),
|
|
1685
1683
|
createdBySignature: z14.string().nullish().describe("Signature of the user who created the action request.")
|
|
1686
1684
|
});
|
|
1687
1685
|
var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
@@ -1705,7 +1703,7 @@ var EventMetadata = z14.object({
|
|
|
1705
1703
|
placeOfEvent: UUID.nullish(),
|
|
1706
1704
|
createdBy: z14.string().describe("ID of the user who created the event."),
|
|
1707
1705
|
createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1708
|
-
updatedByUserRole: z14.string().
|
|
1706
|
+
updatedByUserRole: z14.string().describe("Role of the user who last changed the status."),
|
|
1709
1707
|
// @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
|
|
1710
1708
|
createdAtLocation: UUID.nullish().describe(
|
|
1711
1709
|
"Location of the user who created the event."
|
|
@@ -2193,16 +2191,12 @@ var HtmlFontVariant = z17.enum([
|
|
|
2193
2191
|
"h2",
|
|
2194
2192
|
"h1"
|
|
2195
2193
|
]);
|
|
2196
|
-
var ParagraphTextAlign = z17.enum(["left", "center", "right", "start", "end"]);
|
|
2197
2194
|
var ParagraphConfiguration = z17.object({
|
|
2198
2195
|
styles: z17.object({
|
|
2199
2196
|
fontVariant: HtmlFontVariant.optional().describe(
|
|
2200
2197
|
"Font variant to use for the paragraph text"
|
|
2201
2198
|
),
|
|
2202
|
-
hint: z17.boolean().optional().describe("When true, paragraph is styled as a hint with grey color")
|
|
2203
|
-
textAlign: ParagraphTextAlign.optional().describe(
|
|
2204
|
-
"Text alignment for the paragraph"
|
|
2205
|
-
)
|
|
2199
|
+
hint: z17.boolean().optional().describe("When true, paragraph is styled as a hint with grey color")
|
|
2206
2200
|
}).optional()
|
|
2207
2201
|
}).default({});
|
|
2208
2202
|
var Paragraph = BaseField.extend({
|
|
@@ -5784,7 +5778,7 @@ function isFlagConditionMet(conditional, form, action) {
|
|
|
5784
5778
|
$user: {
|
|
5785
5779
|
sub: "",
|
|
5786
5780
|
exp: "",
|
|
5787
|
-
role: action.createdByRole
|
|
5781
|
+
role: action.createdByRole,
|
|
5788
5782
|
algorithm: "",
|
|
5789
5783
|
scope: [],
|
|
5790
5784
|
userType: action.createdByUserType
|
|
@@ -629,7 +629,6 @@ var SCOPES = {
|
|
|
629
629
|
RECORD_IMPORT: "record.import",
|
|
630
630
|
RECORD_EXPORT: "record.export",
|
|
631
631
|
RECORD_REINDEX: "record.reindex",
|
|
632
|
-
INTEGRATION_CREATE: "integration.create",
|
|
633
632
|
// declare
|
|
634
633
|
RECORD_DECLARE_BIRTH: "record.declare-birth",
|
|
635
634
|
RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction",
|
|
@@ -704,8 +703,7 @@ var IntegrationScopes = z10.union([
|
|
|
704
703
|
z10.literal(SCOPES.WEBHOOK),
|
|
705
704
|
z10.literal(SCOPES.NATIONALID),
|
|
706
705
|
z10.literal(SCOPES.NOTIFICATION_API),
|
|
707
|
-
z10.literal(SCOPES.RECORDSEARCH)
|
|
708
|
-
z10.literal(SCOPES.INTEGRATION_CREATE)
|
|
706
|
+
z10.literal(SCOPES.RECORDSEARCH)
|
|
709
707
|
]);
|
|
710
708
|
var InternalOperationsScopes = z10.union([
|
|
711
709
|
z10.literal(SCOPES.RECORD_REINDEX),
|
|
@@ -1019,7 +1017,7 @@ var ActionBase = z12.object({
|
|
|
1019
1017
|
),
|
|
1020
1018
|
createdAt: z12.string().datetime().describe("Timestamp indicating when the action was created."),
|
|
1021
1019
|
createdBy: z12.string().describe("Identifier of the user who created the action."),
|
|
1022
|
-
createdByRole: z12.string().
|
|
1020
|
+
createdByRole: z12.string().describe("Role of the user who created the action."),
|
|
1023
1021
|
createdBySignature: z12.string().nullish().describe("Reference to the signature of the user who created the action."),
|
|
1024
1022
|
// @TODO: createdAtLocation should be non-nullable in the future once all actions have this field populated.
|
|
1025
1023
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -1263,7 +1261,7 @@ var ActionCreationMetadata = z14.object({
|
|
|
1263
1261
|
),
|
|
1264
1262
|
createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1265
1263
|
acceptedAt: z14.iso.datetime().describe("Timestamp when the action request was accepted."),
|
|
1266
|
-
createdByRole: z14.string().
|
|
1264
|
+
createdByRole: z14.string().describe("Role of the user at the time of action request creation."),
|
|
1267
1265
|
createdBySignature: z14.string().nullish().describe("Signature of the user who created the action request.")
|
|
1268
1266
|
});
|
|
1269
1267
|
var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
@@ -1287,7 +1285,7 @@ var EventMetadata = z14.object({
|
|
|
1287
1285
|
placeOfEvent: UUID.nullish(),
|
|
1288
1286
|
createdBy: z14.string().describe("ID of the user who created the event."),
|
|
1289
1287
|
createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1290
|
-
updatedByUserRole: z14.string().
|
|
1288
|
+
updatedByUserRole: z14.string().describe("Role of the user who last changed the status."),
|
|
1291
1289
|
// @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
|
|
1292
1290
|
createdAtLocation: UUID.nullish().describe(
|
|
1293
1291
|
"Location of the user who created the event."
|
|
@@ -1689,16 +1687,12 @@ var HtmlFontVariant = z17.enum([
|
|
|
1689
1687
|
"h2",
|
|
1690
1688
|
"h1"
|
|
1691
1689
|
]);
|
|
1692
|
-
var ParagraphTextAlign = z17.enum(["left", "center", "right", "start", "end"]);
|
|
1693
1690
|
var ParagraphConfiguration = z17.object({
|
|
1694
1691
|
styles: z17.object({
|
|
1695
1692
|
fontVariant: HtmlFontVariant.optional().describe(
|
|
1696
1693
|
"Font variant to use for the paragraph text"
|
|
1697
1694
|
),
|
|
1698
|
-
hint: z17.boolean().optional().describe("When true, paragraph is styled as a hint with grey color")
|
|
1699
|
-
textAlign: ParagraphTextAlign.optional().describe(
|
|
1700
|
-
"Text alignment for the paragraph"
|
|
1701
|
-
)
|
|
1695
|
+
hint: z17.boolean().optional().describe("When true, paragraph is styled as a hint with grey color")
|
|
1702
1696
|
}).optional()
|
|
1703
1697
|
}).default({});
|
|
1704
1698
|
var Paragraph = BaseField.extend({
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export declare const SCOPES: {
|
|
|
12
12
|
readonly RECORD_IMPORT: "record.import";
|
|
13
13
|
readonly RECORD_EXPORT: "record.export";
|
|
14
14
|
readonly RECORD_REINDEX: "record.reindex";
|
|
15
|
-
readonly INTEGRATION_CREATE: "integration.create";
|
|
16
15
|
readonly RECORD_DECLARE_BIRTH: "record.declare-birth";
|
|
17
16
|
readonly RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction";
|
|
18
17
|
readonly RECORD_DECLARE_DEATH: "record.declare-death";
|
|
@@ -64,7 +63,7 @@ export declare const SCOPES: {
|
|
|
64
63
|
readonly USER_DATA_SEEDING: "user.data-seeding";
|
|
65
64
|
};
|
|
66
65
|
export declare const SearchScopes: z.ZodUnion<readonly [z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>;
|
|
67
|
-
declare const LiteralScopes: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<readonly [z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch"
|
|
66
|
+
declare const LiteralScopes: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<readonly [z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<readonly [z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<readonly [z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<readonly [z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<readonly [z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>, z.ZodLiteral<"record.read">, z.ZodLiteral<"profile.electronic-signature">, z.ZodUnion<readonly [z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<readonly [z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<readonly [z.ZodLiteral<"user.read:all">, z.ZodLiteral<"user.read:my-office">, z.ZodLiteral<"user.read:my-jurisdiction">, z.ZodLiteral<"user.read:only-my-audit">, z.ZodLiteral<"user.create:all">, z.ZodLiteral<"user.create:my-jurisdiction">, z.ZodLiteral<"user.update:all">, z.ZodLiteral<"user.update:my-jurisdiction">]>, z.ZodLiteral<"config.update:all">, z.ZodLiteral<"user.data-seeding">, z.ZodUnion<readonly [z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>]>;
|
|
68
67
|
declare const SearchScope: z.ZodObject<{
|
|
69
68
|
type: z.ZodLiteral<"search">;
|
|
70
69
|
options: z.ZodObject<{
|
|
@@ -326,7 +325,7 @@ export declare function parseConfigurableScope(scope: string): {
|
|
|
326
325
|
};
|
|
327
326
|
} | undefined;
|
|
328
327
|
export declare function parseLiteralScope(scope: string): {
|
|
329
|
-
type: "bypassratelimit" | "register" | "demo" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.import" | "record.reindex" | "
|
|
328
|
+
type: "bypassratelimit" | "register" | "demo" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.import" | "record.reindex" | "record.declare-birth" | "record.declare-birth:my-jurisdiction" | "record.declare-death" | "record.declare-death:my-jurisdiction" | "record.declare-marriage" | "record.declare-marriage:my-jurisdiction" | "record.declaration-submit-incomplete" | "record.declaration-submit-for-review" | "record.unassign-others" | "record.declaration-submit-for-approval" | "record.declaration-submit-for-updates" | "record.declaration-edit" | "record.review-duplicates" | "record.declaration-archive" | "record.declaration-reinstate" | "record.register" | "record.registration-print&issue-certified-copies" | "record.registration-request-correction" | "record.registration-correct" | "record.confirm-registration" | "record.reject-registration" | "search.birth:my-jurisdiction" | "search.birth" | "search.death:my-jurisdiction" | "search.death" | "search.marriage:my-jurisdiction" | "search.marriage" | "record.read" | "profile.electronic-signature" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "organisation.read-locations:all" | "organisation.read-locations:my-office" | "organisation.read-locations:my-jurisdiction" | "user.read:all" | "user.read:my-office" | "user.read:my-jurisdiction" | "user.read:only-my-audit" | "user.create:all" | "user.create:my-jurisdiction" | "user.update:all" | "user.update:my-jurisdiction" | "config.update:all" | "user.data-seeding";
|
|
330
329
|
} | undefined;
|
|
331
330
|
/**
|
|
332
331
|
* Stringifies a ConfigurableScopes object into a scope string.
|
package/dist/scopes/index.js
CHANGED
|
@@ -64,7 +64,6 @@ var SCOPES = {
|
|
|
64
64
|
RECORD_IMPORT: "record.import",
|
|
65
65
|
RECORD_EXPORT: "record.export",
|
|
66
66
|
RECORD_REINDEX: "record.reindex",
|
|
67
|
-
INTEGRATION_CREATE: "integration.create",
|
|
68
67
|
// declare
|
|
69
68
|
RECORD_DECLARE_BIRTH: "record.declare-birth",
|
|
70
69
|
RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction",
|
|
@@ -139,8 +138,7 @@ var IntegrationScopes = z.union([
|
|
|
139
138
|
z.literal(SCOPES.WEBHOOK),
|
|
140
139
|
z.literal(SCOPES.NATIONALID),
|
|
141
140
|
z.literal(SCOPES.NOTIFICATION_API),
|
|
142
|
-
z.literal(SCOPES.RECORDSEARCH)
|
|
143
|
-
z.literal(SCOPES.INTEGRATION_CREATE)
|
|
141
|
+
z.literal(SCOPES.RECORDSEARCH)
|
|
144
142
|
]);
|
|
145
143
|
var InternalOperationsScopes = z.union([
|
|
146
144
|
z.literal(SCOPES.RECORD_REINDEX),
|