@opencrvs/toolkit 1.8.0-rc.f7a451a → 1.8.0-rc.f7aaf07

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.
Files changed (38) hide show
  1. package/dist/commons/api/router.d.ts +14932 -5124
  2. package/dist/commons/conditionals/conditionals.d.ts +6 -2
  3. package/dist/commons/conditionals/validate.d.ts +6 -0
  4. package/dist/commons/events/ActionConfig.d.ts +32976 -12647
  5. package/dist/commons/events/ActionDocument.d.ts +2005 -309
  6. package/dist/commons/events/ActionInput.d.ts +1455 -183
  7. package/dist/commons/events/ActionType.d.ts +6 -0
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +279 -3
  9. package/dist/commons/events/CompositeFieldValue.d.ts +28 -0
  10. package/dist/commons/events/Constants.d.ts +3 -0
  11. package/dist/commons/events/CountryConfigQueryInput.d.ts +314 -254
  12. package/dist/commons/events/CreatedAtLocation.d.ts +3 -0
  13. package/dist/commons/events/Draft.d.ts +127 -21
  14. package/dist/commons/events/EventConfig.d.ts +22415 -12245
  15. package/dist/commons/events/EventDocument.d.ts +1308 -232
  16. package/dist/commons/events/EventIndex.d.ts +616 -423
  17. package/dist/commons/events/EventMetadata.d.ts +104 -81
  18. package/dist/commons/events/FieldConfig.d.ts +2082 -1191
  19. package/dist/commons/events/FieldType.d.ts +4 -1
  20. package/dist/commons/events/FieldTypeMapping.d.ts +94 -52
  21. package/dist/commons/events/FieldValue.d.ts +43 -5
  22. package/dist/commons/events/FormConfig.d.ts +10259 -4769
  23. package/dist/commons/events/PageConfig.d.ts +3480 -2134
  24. package/dist/commons/events/SummaryConfig.d.ts +0 -5
  25. package/dist/commons/events/WorkqueueColumnConfig.d.ts +17 -6
  26. package/dist/commons/events/WorkqueueConfig.d.ts +2589 -1640
  27. package/dist/commons/events/defineConfig.d.ts +2439 -679
  28. package/dist/commons/events/event.d.ts +2 -2
  29. package/dist/commons/events/field.d.ts +10 -10
  30. package/dist/commons/events/index.d.ts +2 -0
  31. package/dist/commons/events/scopes.d.ts +1 -2
  32. package/dist/commons/events/test.utils.d.ts +158 -40
  33. package/dist/commons/events/utils.d.ts +10021 -326
  34. package/dist/conditionals/index.js +26 -6
  35. package/dist/events/index.js +2401 -1217
  36. package/dist/scopes/index.d.ts +6 -2
  37. package/dist/scopes/index.js +70 -17
  38. package/package.json +1 -1
@@ -19,6 +19,7 @@ export declare const SCOPES: {
19
19
  * @TODO This is a temporary scope to be used for V2 Events custom events declaration
20
20
  */
21
21
  readonly RECORD_DECLARE: "record.declare-birth";
22
+ readonly RECORD_IMPORT: "record.import";
22
23
  readonly RECORD_DECLARE_BIRTH: "record.declare-birth";
23
24
  readonly RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction";
24
25
  readonly RECORD_DECLARE_DEATH: "record.declare-death";
@@ -84,7 +85,8 @@ export declare const SCOPES: {
84
85
  readonly CONFIG_UPDATE_ALL: "config.update:all";
85
86
  readonly USER_DATA_SEEDING: "user.data-seeding";
86
87
  };
87
- declare const LiteralScopes: z.ZodUnion<[z.ZodLiteral<"natlsysadmin">, z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"declare">, z.ZodLiteral<"register">, z.ZodLiteral<"validate">, z.ZodLiteral<"demo">, z.ZodLiteral<"certify">, z.ZodLiteral<"performance">, z.ZodLiteral<"sysadmin">, z.ZodLiteral<"teams">, z.ZodLiteral<"config">, z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">, 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.ZodLiteral<"record.unassign-others">, 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.export-records">, z.ZodLiteral<"record.declaration-print">, z.ZodLiteral<"record.declaration-print-supporting-documents">, z.ZodLiteral<"record.registration-print">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodLiteral<"record.registration-print-certified-copies">, z.ZodLiteral<"record.registration-bulk-print-certified-copies">, z.ZodLiteral<"record.registration-verify-certified-copies">, z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.registration-request-revocation">, z.ZodLiteral<"record.registration-revoke">, z.ZodLiteral<"record.registration-request-reinstatement">, z.ZodLiteral<"record.registration-reinstate">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">, 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<"record.read-audit">, z.ZodLiteral<"record.read-comments">, z.ZodLiteral<"record.create-comments">, z.ZodLiteral<"profile.update">, z.ZodLiteral<"profile.electronic-signature">, z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">, z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">, 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">]>;
88
+ 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">]>;
89
+ declare const LiteralScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"natlsysadmin">, z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"declare">, z.ZodLiteral<"register">, z.ZodLiteral<"validate">, z.ZodLiteral<"demo">, z.ZodLiteral<"certify">, z.ZodLiteral<"performance">, z.ZodLiteral<"sysadmin">, z.ZodLiteral<"teams">, 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.import">, 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.ZodUnion<[z.ZodLiteral<"record.export-records">, z.ZodLiteral<"record.declaration-print">, z.ZodLiteral<"record.declaration-print-supporting-documents">, z.ZodLiteral<"record.registration-print">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodLiteral<"record.registration-print-certified-copies">, z.ZodLiteral<"record.registration-bulk-print-certified-copies">, z.ZodLiteral<"record.registration-verify-certified-copies">]>, z.ZodUnion<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.registration-request-revocation">, z.ZodLiteral<"record.registration-revoke">, z.ZodLiteral<"record.registration-request-reinstatement">, z.ZodLiteral<"record.registration-reinstate">, 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.ZodUnion<[z.ZodLiteral<"record.read">, z.ZodLiteral<"record.read-audit">, z.ZodLiteral<"record.read-comments">, z.ZodLiteral<"record.create-comments">]>, z.ZodUnion<[z.ZodLiteral<"profile.update">, 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">]>;
88
90
  declare const ConfigurableScopes: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
89
91
  type: z.ZodLiteral<"user.create">;
90
92
  options: z.ZodObject<{
@@ -222,7 +224,7 @@ export declare function parseScope(scope: string): {
222
224
  event: string[];
223
225
  };
224
226
  } | {
225
- type: "natlsysadmin" | "bypassratelimit" | "declare" | "register" | "validate" | "demo" | "certify" | "performance" | "sysadmin" | "teams" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "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.export-records" | "record.declaration-print" | "record.declaration-print-supporting-documents" | "record.registration-print" | "record.registration-print&issue-certified-copies" | "record.registration-print-certified-copies" | "record.registration-bulk-print-certified-copies" | "record.registration-verify-certified-copies" | "record.registration-request-correction" | "record.registration-correct" | "record.registration-request-revocation" | "record.registration-revoke" | "record.registration-request-reinstatement" | "record.registration-reinstate" | "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" | "record.read-audit" | "record.read-comments" | "record.create-comments" | "profile.update" | "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";
227
+ type: "natlsysadmin" | "bypassratelimit" | "declare" | "register" | "validate" | "demo" | "certify" | "performance" | "sysadmin" | "teams" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.declare-birth" | "record.import" | "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.export-records" | "record.declaration-print" | "record.declaration-print-supporting-documents" | "record.registration-print" | "record.registration-print&issue-certified-copies" | "record.registration-print-certified-copies" | "record.registration-bulk-print-certified-copies" | "record.registration-verify-certified-copies" | "record.registration-request-correction" | "record.registration-correct" | "record.registration-request-revocation" | "record.registration-revoke" | "record.registration-request-reinstatement" | "record.registration-reinstate" | "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" | "record.read-audit" | "record.read-comments" | "record.create-comments" | "profile.update" | "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";
226
228
  } | undefined;
227
229
  /**
228
230
  * Stringifies a ConfigurableScopes object into a scope string.
@@ -240,5 +242,7 @@ export declare const scopes: Scope[];
240
242
  export type ParsedScopes = NonNullable<ReturnType<typeof parseScope>>;
241
243
  export type RawScopes = z.infer<typeof LiteralScopes> | (string & {});
242
244
  export type Scope = RawScopes;
245
+ export declare const ActionScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.import">, 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.ZodUnion<[z.ZodLiteral<"record.export-records">, z.ZodLiteral<"record.declaration-print">, z.ZodLiteral<"record.declaration-print-supporting-documents">, z.ZodLiteral<"record.registration-print">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodLiteral<"record.registration-print-certified-copies">, z.ZodLiteral<"record.registration-bulk-print-certified-copies">, z.ZodLiteral<"record.registration-verify-certified-copies">]>, z.ZodUnion<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.registration-request-revocation">, z.ZodLiteral<"record.registration-revoke">, z.ZodLiteral<"record.registration-request-reinstatement">, z.ZodLiteral<"record.registration-reinstate">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>]>;
246
+ export type ActionScopes = z.infer<typeof ActionScopes>;
243
247
  export {};
244
248
  //# sourceMappingURL=scopes.d.ts.map
@@ -20,7 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/scopes/index.ts
21
21
  var scopes_exports = {};
22
22
  __export(scopes_exports, {
23
+ ActionScopes: () => ActionScopes,
23
24
  SCOPES: () => SCOPES,
25
+ SearchScopes: () => SearchScopes,
24
26
  findScope: () => findScope,
25
27
  parseScope: () => parseScope,
26
28
  scopes: () => scopes,
@@ -53,6 +55,8 @@ var SCOPES = {
53
55
  */
54
56
  RECORD_DECLARE: "record.declare-birth",
55
57
  // declare
58
+ RECORD_IMPORT: "record.import",
59
+ // declare
56
60
  RECORD_DECLARE_BIRTH: "record.declare-birth",
57
61
  RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction",
58
62
  RECORD_DECLARE_DEATH: "record.declare-death",
@@ -140,7 +144,7 @@ var SCOPES = {
140
144
  // data seeding
141
145
  USER_DATA_SEEDING: "user.data-seeding"
142
146
  };
143
- var LiteralScopes = import_zod.z.union([
147
+ var LegacyScopes = import_zod.z.union([
144
148
  import_zod.z.literal(SCOPES.NATLSYSADMIN),
145
149
  import_zod.z.literal(SCOPES.BYPASSRATELIMIT),
146
150
  import_zod.z.literal(SCOPES.DECLARE),
@@ -151,11 +155,17 @@ var LiteralScopes = import_zod.z.union([
151
155
  import_zod.z.literal(SCOPES.PERFORMANCE),
152
156
  import_zod.z.literal(SCOPES.SYSADMIN),
153
157
  import_zod.z.literal(SCOPES.TEAMS),
154
- import_zod.z.literal(SCOPES.CONFIG),
158
+ import_zod.z.literal(SCOPES.CONFIG)
159
+ ]);
160
+ var IntegrationScopes = import_zod.z.union([
155
161
  import_zod.z.literal(SCOPES.WEBHOOK),
156
162
  import_zod.z.literal(SCOPES.NATIONALID),
157
163
  import_zod.z.literal(SCOPES.NOTIFICATION_API),
158
- import_zod.z.literal(SCOPES.RECORDSEARCH),
164
+ import_zod.z.literal(SCOPES.RECORDSEARCH)
165
+ ]);
166
+ var DeclareScopes = import_zod.z.union([
167
+ import_zod.z.literal(SCOPES.RECORD_DECLARE),
168
+ import_zod.z.literal(SCOPES.RECORD_IMPORT),
159
169
  import_zod.z.literal(SCOPES.RECORD_DECLARE_BIRTH),
160
170
  import_zod.z.literal(SCOPES.RECORD_DECLARE_BIRTH_MY_JURISDICTION),
161
171
  import_zod.z.literal(SCOPES.RECORD_DECLARE_DEATH),
@@ -163,15 +173,19 @@ var LiteralScopes = import_zod.z.union([
163
173
  import_zod.z.literal(SCOPES.RECORD_DECLARE_MARRIAGE),
164
174
  import_zod.z.literal(SCOPES.RECORD_DECLARE_MARRIAGE_MY_JURISDICTION),
165
175
  import_zod.z.literal(SCOPES.RECORD_SUBMIT_INCOMPLETE),
166
- import_zod.z.literal(SCOPES.RECORD_SUBMIT_FOR_REVIEW),
167
- import_zod.z.literal(SCOPES.RECORD_UNASSIGN_OTHERS),
176
+ import_zod.z.literal(SCOPES.RECORD_SUBMIT_FOR_REVIEW)
177
+ ]);
178
+ var UnassignScope = import_zod.z.literal(SCOPES.RECORD_UNASSIGN_OTHERS);
179
+ var ValidateScopes = import_zod.z.union([
168
180
  import_zod.z.literal(SCOPES.RECORD_SUBMIT_FOR_APPROVAL),
169
181
  import_zod.z.literal(SCOPES.RECORD_SUBMIT_FOR_UPDATES),
170
182
  import_zod.z.literal(SCOPES.RECORD_DECLARATION_EDIT),
171
183
  import_zod.z.literal(SCOPES.RECORD_REVIEW_DUPLICATES),
172
184
  import_zod.z.literal(SCOPES.RECORD_DECLARATION_ARCHIVE),
173
- import_zod.z.literal(SCOPES.RECORD_DECLARATION_REINSTATE),
174
- import_zod.z.literal(SCOPES.RECORD_REGISTER),
185
+ import_zod.z.literal(SCOPES.RECORD_DECLARATION_REINSTATE)
186
+ ]);
187
+ var RegisterScope = import_zod.z.literal(SCOPES.RECORD_REGISTER);
188
+ var CertifyScopes = import_zod.z.union([
175
189
  import_zod.z.literal(SCOPES.RECORD_EXPORT_RECORDS),
176
190
  import_zod.z.literal(SCOPES.RECORD_DECLARATION_PRINT),
177
191
  import_zod.z.literal(SCOPES.RECORD_PRINT_RECORDS_SUPPORTING_DOCUMENTS),
@@ -179,7 +193,9 @@ var LiteralScopes = import_zod.z.union([
179
193
  import_zod.z.literal(SCOPES.RECORD_PRINT_ISSUE_CERTIFIED_COPIES),
180
194
  import_zod.z.literal(SCOPES.RECORD_PRINT_CERTIFIED_COPIES),
181
195
  import_zod.z.literal(SCOPES.RECORD_BULK_PRINT_CERTIFIED_COPIES),
182
- import_zod.z.literal(SCOPES.RECORD_REGISTRATION_VERIFY_CERTIFIED_COPIES),
196
+ import_zod.z.literal(SCOPES.RECORD_REGISTRATION_VERIFY_CERTIFIED_COPIES)
197
+ ]);
198
+ var CorrectionScopes = import_zod.z.union([
183
199
  import_zod.z.literal(SCOPES.RECORD_REGISTRATION_REQUEST_CORRECTION),
184
200
  import_zod.z.literal(SCOPES.RECORD_REGISTRATION_CORRECT),
185
201
  import_zod.z.literal(SCOPES.RECORD_REGISTRATION_REQUEST_REVOCATION),
@@ -187,25 +203,37 @@ var LiteralScopes = import_zod.z.union([
187
203
  import_zod.z.literal(SCOPES.RECORD_REGISTRATION_REQUEST_REINSTATEMENT),
188
204
  import_zod.z.literal(SCOPES.RECORD_REGISTRATION_REINSTATE),
189
205
  import_zod.z.literal(SCOPES.RECORD_CONFIRM_REGISTRATION),
190
- import_zod.z.literal(SCOPES.RECORD_REJECT_REGISTRATION),
206
+ import_zod.z.literal(SCOPES.RECORD_REJECT_REGISTRATION)
207
+ ]);
208
+ var SearchScopes = import_zod.z.union([
191
209
  import_zod.z.literal(SCOPES.SEARCH_BIRTH_MY_JURISDICTION),
192
210
  import_zod.z.literal(SCOPES.SEARCH_BIRTH),
193
211
  import_zod.z.literal(SCOPES.SEARCH_DEATH_MY_JURISDICTION),
194
212
  import_zod.z.literal(SCOPES.SEARCH_DEATH),
195
213
  import_zod.z.literal(SCOPES.SEARCH_MARRIAGE_MY_JURISDICTION),
196
- import_zod.z.literal(SCOPES.SEARCH_MARRIAGE),
214
+ import_zod.z.literal(SCOPES.SEARCH_MARRIAGE)
215
+ ]);
216
+ var AuditScopes = import_zod.z.union([
197
217
  import_zod.z.literal(SCOPES.RECORD_READ),
198
218
  import_zod.z.literal(SCOPES.RECORD_READ_AUDIT),
199
219
  import_zod.z.literal(SCOPES.RECORD_READ_COMMENTS),
200
- import_zod.z.literal(SCOPES.RECORD_CREATE_COMMENTS),
220
+ import_zod.z.literal(SCOPES.RECORD_CREATE_COMMENTS)
221
+ ]);
222
+ var ProfileScopes = import_zod.z.union([
201
223
  import_zod.z.literal(SCOPES.PROFILE_UPDATE),
202
- import_zod.z.literal(SCOPES.PROFILE_ELECTRONIC_SIGNATURE),
224
+ import_zod.z.literal(SCOPES.PROFILE_ELECTRONIC_SIGNATURE)
225
+ ]);
226
+ var PerformanceScopes = import_zod.z.union([
203
227
  import_zod.z.literal(SCOPES.PERFORMANCE_READ),
204
228
  import_zod.z.literal(SCOPES.PERFORMANCE_READ_DASHBOARDS),
205
- import_zod.z.literal(SCOPES.PERFORMANCE_EXPORT_VITAL_STATISTICS),
229
+ import_zod.z.literal(SCOPES.PERFORMANCE_EXPORT_VITAL_STATISTICS)
230
+ ]);
231
+ var OrganisationScopes = import_zod.z.union([
206
232
  import_zod.z.literal(SCOPES.ORGANISATION_READ_LOCATIONS),
207
233
  import_zod.z.literal(SCOPES.ORGANISATION_READ_LOCATIONS_MY_OFFICE),
208
- import_zod.z.literal(SCOPES.ORGANISATION_READ_LOCATIONS_MY_JURISDICTION),
234
+ import_zod.z.literal(SCOPES.ORGANISATION_READ_LOCATIONS_MY_JURISDICTION)
235
+ ]);
236
+ var UserScopes = import_zod.z.union([
209
237
  import_zod.z.literal(SCOPES.USER_READ),
210
238
  import_zod.z.literal(SCOPES.USER_READ_MY_OFFICE),
211
239
  import_zod.z.literal(SCOPES.USER_READ_MY_JURISDICTION),
@@ -213,9 +241,27 @@ var LiteralScopes = import_zod.z.union([
213
241
  import_zod.z.literal(SCOPES.USER_CREATE),
214
242
  import_zod.z.literal(SCOPES.USER_CREATE_MY_JURISDICTION),
215
243
  import_zod.z.literal(SCOPES.USER_UPDATE),
216
- import_zod.z.literal(SCOPES.USER_UPDATE_MY_JURISDICTION),
217
- import_zod.z.literal(SCOPES.CONFIG_UPDATE_ALL),
218
- import_zod.z.literal(SCOPES.USER_DATA_SEEDING)
244
+ import_zod.z.literal(SCOPES.USER_UPDATE_MY_JURISDICTION)
245
+ ]);
246
+ var ConfigScope = import_zod.z.literal(SCOPES.CONFIG_UPDATE_ALL);
247
+ var DataSeedingScope = import_zod.z.literal(SCOPES.USER_DATA_SEEDING);
248
+ var LiteralScopes = import_zod.z.union([
249
+ LegacyScopes,
250
+ IntegrationScopes,
251
+ UnassignScope,
252
+ DeclareScopes,
253
+ ValidateScopes,
254
+ RegisterScope,
255
+ CertifyScopes,
256
+ CorrectionScopes,
257
+ SearchScopes,
258
+ AuditScopes,
259
+ ProfileScopes,
260
+ PerformanceScopes,
261
+ OrganisationScopes,
262
+ UserScopes,
263
+ ConfigScope,
264
+ DataSeedingScope
219
265
  ]);
220
266
  var rawConfigurableScopeRegex = /^([a-zA-Z\.]+)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
221
267
  var rawConfigurableScope = import_zod.z.string().regex(rawConfigurableScopeRegex);
@@ -285,3 +331,10 @@ function stringifyScope(scope) {
285
331
  return `${scope.type}[${options}]`;
286
332
  }
287
333
  var scopes = Object.values(SCOPES);
334
+ var ActionScopes = import_zod.z.union([
335
+ DeclareScopes,
336
+ ValidateScopes,
337
+ RegisterScope,
338
+ CertifyScopes,
339
+ CorrectionScopes
340
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.8.0-rc.f7a451a",
3
+ "version": "1.8.0-rc.f7aaf07",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {