@opencrvs/toolkit 1.9.16-rc.a6b5748 → 1.9.16-rc.c7acc1a

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.
@@ -1037,9 +1037,7 @@ var SCOPES = {
1037
1037
  // config
1038
1038
  CONFIG_UPDATE_ALL: "config.update:all",
1039
1039
  // data seeding
1040
- USER_DATA_SEEDING: "user.data-seeding",
1041
- // bootstrap: allows countryconfig to register integrations on startup
1042
- INTEGRATION_CREATE: "integration.create"
1040
+ USER_DATA_SEEDING: "user.data-seeding"
1043
1041
  };
1044
1042
  var LegacyScopes = import_zod11.z.union([
1045
1043
  import_zod11.z.literal(SCOPES.BYPASSRATELIMIT),
@@ -1114,7 +1112,6 @@ var UserScopes = import_zod11.z.union([
1114
1112
  ]);
1115
1113
  var ConfigScope = import_zod11.z.literal(SCOPES.CONFIG_UPDATE_ALL);
1116
1114
  var DataSeedingScope = import_zod11.z.literal(SCOPES.USER_DATA_SEEDING);
1117
- var IntegrationCreateScope = import_zod11.z.literal(SCOPES.INTEGRATION_CREATE);
1118
1115
  var LiteralScopes = import_zod11.z.union([
1119
1116
  LegacyScopes,
1120
1117
  IntegrationScopes,
@@ -1132,8 +1129,7 @@ var LiteralScopes = import_zod11.z.union([
1132
1129
  UserScopes,
1133
1130
  ConfigScope,
1134
1131
  DataSeedingScope,
1135
- InternalOperationsScopes,
1136
- IntegrationCreateScope
1132
+ InternalOperationsScopes
1137
1133
  ]);
1138
1134
  var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
1139
1135
  var rawConfigurableScope = import_zod11.z.string().regex(rawConfigurableScopeRegex);
@@ -1418,7 +1414,7 @@ var ActionBase = import_zod13.z.object({
1418
1414
  ),
1419
1415
  createdAt: import_zod13.z.string().datetime().describe("Timestamp indicating when the action was created."),
1420
1416
  createdBy: import_zod13.z.string().describe("Identifier of the user who created the action."),
1421
- createdByRole: import_zod13.z.string().optional().describe("Role of the user who created the action."),
1417
+ createdByRole: import_zod13.z.string().describe("Role of the user who created the action."),
1422
1418
  createdBySignature: import_zod13.z.string().nullish().describe("Reference to the signature of the user who created the action."),
1423
1419
  createdAtLocation: CreatedAtLocation.describe(
1424
1420
  "Reference to the location of the user who created the action."
@@ -1622,7 +1618,7 @@ var ActionCreationMetadata = import_zod14.z.object({
1622
1618
  ),
1623
1619
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1624
1620
  acceptedAt: import_zod14.z.string().datetime().describe("Timestamp when the action request was accepted."),
1625
- createdByRole: import_zod14.z.string().optional().describe("Role of the user at the time of action request creation."),
1621
+ createdByRole: import_zod14.z.string().describe("Role of the user at the time of action request creation."),
1626
1622
  createdBySignature: import_zod14.z.string().nullish().describe("Signature of the user who created the action request.")
1627
1623
  });
1628
1624
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
@@ -1645,7 +1641,7 @@ var EventMetadata = import_zod14.z.object({
1645
1641
  dateOfEvent: ZodDate.nullish(),
1646
1642
  createdBy: import_zod14.z.string().describe("ID of the user who created the event."),
1647
1643
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1648
- updatedByUserRole: import_zod14.z.string().optional().describe("Role of the user who last changed the status."),
1644
+ updatedByUserRole: import_zod14.z.string().describe("Role of the user who last changed the status."),
1649
1645
  createdAtLocation: CreatedAtLocation.describe(
1650
1646
  "Location of the user who created the event."
1651
1647
  ),
@@ -2594,6 +2590,9 @@ var PageConfigBase = import_zod18.z.object({
2594
2590
  requireCompletionToContinue: import_zod18.z.boolean().default(false).describe(
2595
2591
  "If true, all required fields must be filled before continuing to the next page"
2596
2592
  ),
2593
+ showClearButton: import_zod18.z.boolean().optional().describe(
2594
+ 'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
2595
+ ),
2597
2596
  fields: import_zod18.z.array(FieldConfig).describe("Fields to be rendered on the page"),
2598
2597
  conditional: Conditional.optional().describe(
2599
2598
  "Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
@@ -6751,6 +6750,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
6751
6750
  defaultMessage: "Who is applying for the membership?",
6752
6751
  description: "This is the title of the section"
6753
6752
  },
6753
+ showClearButton: true,
6754
6754
  fields: [
6755
6755
  {
6756
6756
  id: "applicant.name",
@@ -671,9 +671,7 @@ var SCOPES = {
671
671
  // config
672
672
  CONFIG_UPDATE_ALL: "config.update:all",
673
673
  // data seeding
674
- USER_DATA_SEEDING: "user.data-seeding",
675
- // bootstrap: allows countryconfig to register integrations on startup
676
- INTEGRATION_CREATE: "integration.create"
674
+ USER_DATA_SEEDING: "user.data-seeding"
677
675
  };
678
676
  var LegacyScopes = import_zod11.z.union([
679
677
  import_zod11.z.literal(SCOPES.BYPASSRATELIMIT),
@@ -748,7 +746,6 @@ var UserScopes = import_zod11.z.union([
748
746
  ]);
749
747
  var ConfigScope = import_zod11.z.literal(SCOPES.CONFIG_UPDATE_ALL);
750
748
  var DataSeedingScope = import_zod11.z.literal(SCOPES.USER_DATA_SEEDING);
751
- var IntegrationCreateScope = import_zod11.z.literal(SCOPES.INTEGRATION_CREATE);
752
749
  var LiteralScopes = import_zod11.z.union([
753
750
  LegacyScopes,
754
751
  IntegrationScopes,
@@ -766,8 +763,7 @@ var LiteralScopes = import_zod11.z.union([
766
763
  UserScopes,
767
764
  ConfigScope,
768
765
  DataSeedingScope,
769
- InternalOperationsScopes,
770
- IntegrationCreateScope
766
+ InternalOperationsScopes
771
767
  ]);
772
768
  var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
773
769
  var rawConfigurableScope = import_zod11.z.string().regex(rawConfigurableScopeRegex);
@@ -998,7 +994,7 @@ var ActionBase = import_zod13.z.object({
998
994
  ),
999
995
  createdAt: import_zod13.z.string().datetime().describe("Timestamp indicating when the action was created."),
1000
996
  createdBy: import_zod13.z.string().describe("Identifier of the user who created the action."),
1001
- createdByRole: import_zod13.z.string().optional().describe("Role of the user who created the action."),
997
+ createdByRole: import_zod13.z.string().describe("Role of the user who created the action."),
1002
998
  createdBySignature: import_zod13.z.string().nullish().describe("Reference to the signature of the user who created the action."),
1003
999
  createdAtLocation: CreatedAtLocation.describe(
1004
1000
  "Reference to the location of the user who created the action."
@@ -1202,7 +1198,7 @@ var ActionCreationMetadata = import_zod14.z.object({
1202
1198
  ),
1203
1199
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1204
1200
  acceptedAt: import_zod14.z.string().datetime().describe("Timestamp when the action request was accepted."),
1205
- createdByRole: import_zod14.z.string().optional().describe("Role of the user at the time of action request creation."),
1201
+ createdByRole: import_zod14.z.string().describe("Role of the user at the time of action request creation."),
1206
1202
  createdBySignature: import_zod14.z.string().nullish().describe("Signature of the user who created the action request.")
1207
1203
  });
1208
1204
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
@@ -1225,7 +1221,7 @@ var EventMetadata = import_zod14.z.object({
1225
1221
  dateOfEvent: ZodDate.nullish(),
1226
1222
  createdBy: import_zod14.z.string().describe("ID of the user who created the event."),
1227
1223
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1228
- updatedByUserRole: import_zod14.z.string().optional().describe("Role of the user who last changed the status."),
1224
+ updatedByUserRole: import_zod14.z.string().describe("Role of the user who last changed the status."),
1229
1225
  createdAtLocation: CreatedAtLocation.describe(
1230
1226
  "Location of the user who created the event."
1231
1227
  ),
@@ -2090,6 +2086,9 @@ var PageConfigBase = import_zod18.z.object({
2090
2086
  requireCompletionToContinue: import_zod18.z.boolean().default(false).describe(
2091
2087
  "If true, all required fields must be filled before continuing to the next page"
2092
2088
  ),
2089
+ showClearButton: import_zod18.z.boolean().optional().describe(
2090
+ 'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
2091
+ ),
2093
2092
  fields: import_zod18.z.array(FieldConfig).describe("Fields to be rendered on the page"),
2094
2093
  conditional: Conditional.optional().describe(
2095
2094
  "Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
@@ -4876,6 +4875,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
4876
4875
  defaultMessage: "Who is applying for the membership?",
4877
4876
  description: "This is the title of the section"
4878
4877
  },
4878
+ showClearButton: true,
4879
4879
  fields: [
4880
4880
  {
4881
4881
  id: "applicant.name",
@@ -61,10 +61,9 @@ export declare const SCOPES: {
61
61
  readonly USER_UPDATE_MY_JURISDICTION: "user.update:my-jurisdiction";
62
62
  readonly CONFIG_UPDATE_ALL: "config.update:all";
63
63
  readonly USER_DATA_SEEDING: "user.data-seeding";
64
- readonly INTEGRATION_CREATE: "integration.create";
65
64
  };
66
65
  export declare const SearchScopes: z.ZodUnion<[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<[z.ZodUnion<[z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<[z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<[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<[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<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<[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<[z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<[z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<[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<[z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>, z.ZodLiteral<"integration.create">]>;
66
+ declare const LiteralScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<[z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<[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<[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<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<[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<[z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<[z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<[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<[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<{
@@ -355,7 +354,7 @@ export declare function parseConfigurableScope(scope: string): {
355
354
  };
356
355
  } | undefined;
357
356
  export declare function parseLiteralScope(scope: string): {
358
- 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" | "integration.create";
357
+ 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";
359
358
  } | undefined;
360
359
  /**
361
360
  * Stringifies a ConfigurableScopes object into a scope string.
@@ -112,9 +112,7 @@ var SCOPES = {
112
112
  // config
113
113
  CONFIG_UPDATE_ALL: "config.update:all",
114
114
  // data seeding
115
- USER_DATA_SEEDING: "user.data-seeding",
116
- // bootstrap: allows countryconfig to register integrations on startup
117
- INTEGRATION_CREATE: "integration.create"
115
+ USER_DATA_SEEDING: "user.data-seeding"
118
116
  };
119
117
  var LegacyScopes = import_zod.z.union([
120
118
  import_zod.z.literal(SCOPES.BYPASSRATELIMIT),
@@ -189,7 +187,6 @@ var UserScopes = import_zod.z.union([
189
187
  ]);
190
188
  var ConfigScope = import_zod.z.literal(SCOPES.CONFIG_UPDATE_ALL);
191
189
  var DataSeedingScope = import_zod.z.literal(SCOPES.USER_DATA_SEEDING);
192
- var IntegrationCreateScope = import_zod.z.literal(SCOPES.INTEGRATION_CREATE);
193
190
  var LiteralScopes = import_zod.z.union([
194
191
  LegacyScopes,
195
192
  IntegrationScopes,
@@ -207,8 +204,7 @@ var LiteralScopes = import_zod.z.union([
207
204
  UserScopes,
208
205
  ConfigScope,
209
206
  DataSeedingScope,
210
- InternalOperationsScopes,
211
- IntegrationCreateScope
207
+ InternalOperationsScopes
212
208
  ]);
213
209
  var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
214
210
  var rawConfigurableScope = import_zod.z.string().regex(rawConfigurableScopeRegex);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.9.16-rc.a6b5748",
3
+ "version": "1.9.16-rc.c7acc1a",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {