@opencrvs/toolkit 1.9.7-rc.d44d88a → 1.9.7-rc.d83a5b8
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 -231
- package/dist/commons/events/ActionDocument.d.ts +47 -47
- package/dist/commons/events/Draft.d.ts +1 -1
- 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/state/index.d.ts +3 -3
- package/dist/commons/events/state/utils.d.ts +21 -21
- package/dist/commons/events/utils.d.ts +19 -19
- package/dist/events/index.js +5 -7
- package/dist/notification/index.js +4 -6
- package/dist/scopes/index.d.ts +2 -3
- package/dist/scopes/index.js +1 -3
- package/package.json +1 -1
|
@@ -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."
|
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),
|