@opencrvs/toolkit 1.9.7-rc.d83a5b8 → 1.9.7-rc.d9e4fe7

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.
@@ -629,6 +629,7 @@ 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",
632
633
  // declare
633
634
  RECORD_DECLARE_BIRTH: "record.declare-birth",
634
635
  RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction",
@@ -703,7 +704,8 @@ var IntegrationScopes = z10.union([
703
704
  z10.literal(SCOPES.WEBHOOK),
704
705
  z10.literal(SCOPES.NATIONALID),
705
706
  z10.literal(SCOPES.NOTIFICATION_API),
706
- z10.literal(SCOPES.RECORDSEARCH)
707
+ z10.literal(SCOPES.RECORDSEARCH),
708
+ z10.literal(SCOPES.INTEGRATION_CREATE)
707
709
  ]);
708
710
  var InternalOperationsScopes = z10.union([
709
711
  z10.literal(SCOPES.RECORD_REINDEX),
@@ -1017,7 +1019,7 @@ var ActionBase = z12.object({
1017
1019
  ),
1018
1020
  createdAt: z12.string().datetime().describe("Timestamp indicating when the action was created."),
1019
1021
  createdBy: z12.string().describe("Identifier of the user who created the action."),
1020
- createdByRole: z12.string().describe("Role of the user who created the action."),
1022
+ createdByRole: z12.string().optional().describe("Role of the user who created the action."),
1021
1023
  createdBySignature: z12.string().nullish().describe("Reference to the signature of the user who created the action."),
1022
1024
  // @TODO: createdAtLocation should be non-nullable in the future once all actions have this field populated.
1023
1025
  createdAtLocation: UUID.nullish().describe(
@@ -1261,7 +1263,7 @@ var ActionCreationMetadata = z14.object({
1261
1263
  ),
1262
1264
  createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1263
1265
  acceptedAt: z14.iso.datetime().describe("Timestamp when the action request was accepted."),
1264
- createdByRole: z14.string().describe("Role of the user at the time of action request creation."),
1266
+ createdByRole: z14.string().optional().describe("Role of the user at the time of action request creation."),
1265
1267
  createdBySignature: z14.string().nullish().describe("Signature of the user who created the action request.")
1266
1268
  });
1267
1269
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
@@ -1285,7 +1287,7 @@ var EventMetadata = z14.object({
1285
1287
  placeOfEvent: UUID.nullish(),
1286
1288
  createdBy: z14.string().describe("ID of the user who created the event."),
1287
1289
  createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1288
- updatedByUserRole: z14.string().describe("Role of the user who last changed the status."),
1290
+ updatedByUserRole: z14.string().nullish().describe("Role of the user who last changed the status."),
1289
1291
  // @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
1290
1292
  createdAtLocation: UUID.nullish().describe(
1291
1293
  "Location of the user who created the event."
@@ -12,6 +12,7 @@ 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";
15
16
  readonly RECORD_DECLARE_BIRTH: "record.declare-birth";
16
17
  readonly RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction";
17
18
  readonly RECORD_DECLARE_DEATH: "record.declare-death";
@@ -63,7 +64,7 @@ export declare const SCOPES: {
63
64
  readonly USER_DATA_SEEDING: "user.data-seeding";
64
65
  };
65
66
  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">]>;
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">]>]>;
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">, z.ZodLiteral<"integration.create">]>, 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">]>]>;
67
68
  declare const SearchScope: z.ZodObject<{
68
69
  type: z.ZodLiteral<"search">;
69
70
  options: z.ZodObject<{
@@ -325,7 +326,7 @@ export declare function parseConfigurableScope(scope: string): {
325
326
  };
326
327
  } | undefined;
327
328
  export declare function parseLiteralScope(scope: string): {
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";
329
+ type: "bypassratelimit" | "register" | "demo" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.import" | "record.reindex" | "integration.create" | "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";
329
330
  } | undefined;
330
331
  /**
331
332
  * Stringifies a ConfigurableScopes object into a scope string.
@@ -64,6 +64,7 @@ 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",
67
68
  // declare
68
69
  RECORD_DECLARE_BIRTH: "record.declare-birth",
69
70
  RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction",
@@ -138,7 +139,8 @@ var IntegrationScopes = z.union([
138
139
  z.literal(SCOPES.WEBHOOK),
139
140
  z.literal(SCOPES.NATIONALID),
140
141
  z.literal(SCOPES.NOTIFICATION_API),
141
- z.literal(SCOPES.RECORDSEARCH)
142
+ z.literal(SCOPES.RECORDSEARCH),
143
+ z.literal(SCOPES.INTEGRATION_CREATE)
142
144
  ]);
143
145
  var InternalOperationsScopes = z.union([
144
146
  z.literal(SCOPES.RECORD_REINDEX),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.9.7-rc.d83a5b8",
3
+ "version": "1.9.7-rc.d9e4fe7",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {