@opencrvs/toolkit 1.9.13-rc.f1fdcea → 2.0.0-beta

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 (157) hide show
  1. package/build.sh +13 -0
  2. package/create-countryconfig/index.js +73 -0
  3. package/create-countryconfig/package.json +11 -0
  4. package/dist/api/index.d.ts.map +1 -1
  5. package/dist/application-config/index.d.ts +2 -0
  6. package/dist/application-config/index.d.ts.map +1 -0
  7. package/dist/application-config/index.js +2158 -0
  8. package/dist/cli.d.ts +2 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +4974 -0
  11. package/dist/commons/api/router.d.ts +3497 -2348
  12. package/dist/commons/application-config/index.d.ts +96 -0
  13. package/dist/commons/conditionals/conditionals.d.ts +27 -3
  14. package/dist/commons/conditionals/validate.d.ts +13 -2
  15. package/dist/commons/events/ActionConfig.d.ts +415 -1555
  16. package/dist/commons/events/ActionDocument.d.ts +888 -1941
  17. package/dist/commons/events/ActionInput.d.ts +277 -1073
  18. package/dist/commons/events/ActionType.d.ts +91 -11
  19. package/dist/commons/events/AdvancedSearchConfig.d.ts +294 -1496
  20. package/dist/commons/events/AuditLog.d.ts +407 -0
  21. package/dist/commons/events/CompositeFieldValue.d.ts +30 -190
  22. package/dist/commons/events/Conditional.d.ts +26 -38
  23. package/dist/commons/events/Constants.d.ts +1 -1
  24. package/dist/commons/events/CountryConfigQueryInput.d.ts +1592 -4471
  25. package/dist/commons/events/DeduplicationConfig.d.ts +15 -171
  26. package/dist/commons/events/Draft.d.ts +72 -107
  27. package/dist/commons/events/DynamicFieldValue.d.ts +12 -78
  28. package/dist/commons/events/EventConfig.d.ts +37 -2420
  29. package/dist/commons/events/EventConfigInput.d.ts +0 -3
  30. package/dist/commons/events/EventDocument.d.ts +354 -1366
  31. package/dist/commons/events/EventIndex.d.ts +212 -1010
  32. package/dist/commons/events/EventInput.d.ts +3 -8
  33. package/dist/commons/events/EventMetadata.d.ts +130 -357
  34. package/dist/commons/events/FieldConfig.d.ts +2902 -12901
  35. package/dist/commons/events/FieldType.d.ts +26 -4
  36. package/dist/commons/events/FieldTypeMapping.d.ts +314 -906
  37. package/dist/commons/events/FieldValue.d.ts +149 -527
  38. package/dist/commons/events/FileUtils.d.ts +2 -2
  39. package/dist/commons/events/Flag.d.ts +67 -0
  40. package/dist/commons/events/FormConfig.d.ts +54 -721
  41. package/dist/commons/events/PageConfig.d.ts +58 -320
  42. package/dist/commons/events/PlainDate.d.ts +1 -1
  43. package/dist/commons/events/SummaryConfig.d.ts +14 -161
  44. package/dist/commons/events/TemplateConfig.d.ts +2 -3
  45. package/dist/commons/events/TranslationConfig.d.ts +2 -2
  46. package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
  47. package/dist/commons/events/WorkqueueConfig.d.ts +2208 -7553
  48. package/dist/commons/events/deduplication.d.ts +3 -3
  49. package/dist/commons/events/defineConfig.d.ts +2 -247
  50. package/dist/commons/events/eventConfigValidation.d.ts +8 -0
  51. package/dist/commons/events/index.d.ts +3 -0
  52. package/dist/commons/events/locations.d.ts +93 -19
  53. package/dist/commons/events/mocks.test.utils.d.ts +19 -0
  54. package/dist/commons/events/scopes.d.ts +56 -32
  55. package/dist/commons/events/state/availableActions.d.ts +7 -2
  56. package/dist/commons/events/state/flags.d.ts +21 -3
  57. package/dist/commons/events/state/index.d.ts +30 -27
  58. package/dist/commons/events/state/utils.d.ts +190 -172
  59. package/dist/commons/events/test.utils.d.ts +52 -11
  60. package/dist/commons/events/transactions.d.ts +1 -1
  61. package/dist/commons/events/utils.d.ts +374 -443
  62. package/dist/commons/notification/UserNotifications.d.ts +76 -637
  63. package/dist/conditionals/index.d.ts.map +1 -1
  64. package/dist/conditionals/index.js +332 -14
  65. package/dist/events/deduplication.d.ts +3 -3
  66. package/dist/events/index.js +2989 -2121
  67. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  68. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  69. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +429 -0
  70. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  71. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/add-resend-invite-notification.js +373 -0
  73. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +22 -0
  74. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  75. package/dist/migrations/v2.0/checkout-upstream-files.js +147 -0
  76. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  77. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  78. package/dist/migrations/v2.0/convert-config-files-to-ts.js +828 -0
  79. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  80. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  81. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +158 -0
  82. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  83. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  84. package/dist/migrations/v2.0/create-events-index.js +325 -0
  85. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +3 -0
  86. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  87. package/dist/migrations/v2.0/delete-infrastructure-directory.js +77 -0
  88. package/dist/migrations/v2.0/index.d.ts +11 -0
  89. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  90. package/dist/migrations/v2.0/index.js +4884 -0
  91. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  92. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  93. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +432 -0
  94. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +3 -0
  95. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  96. package/dist/migrations/v2.0/merge-infrastructure-directory.js +221 -0
  97. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  98. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  99. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  100. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  101. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  102. package/dist/migrations/v2.0/migrate-scopes.js +281 -0
  103. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  104. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  105. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  106. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  107. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  108. package/dist/migrations/v2.0/migrate-workqueue-configs.js +236 -0
  109. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  110. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  111. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  112. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  113. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  114. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  115. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  116. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  117. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  118. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  119. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  120. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  121. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  122. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  123. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  124. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  125. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  126. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  127. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  128. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  129. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  130. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  131. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  132. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  133. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  134. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  135. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  136. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  137. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  138. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  139. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  140. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  141. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  142. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  143. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  144. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  145. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  146. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  147. package/dist/migrations/v2.0/update-package-json.js +105 -0
  148. package/dist/notification/index.d.ts.map +1 -1
  149. package/dist/notification/index.js +2112 -1770
  150. package/dist/scopes/index.d.ts +716 -352
  151. package/dist/scopes/index.d.ts.map +1 -1
  152. package/dist/scopes/index.js +374 -299
  153. package/opencrvs-toolkit-2.0.0-beta.tgz +0 -0
  154. package/package.json +18 -8
  155. package/tsconfig.json +12 -2
  156. package/tsconfig.tsbuildinfo +1 -1
  157. package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
@@ -1,385 +1,749 @@
1
- import { z } from 'zod';
2
- import { SearchScopeAccessLevels } from './events';
3
- export declare const SCOPES: {
4
- readonly BYPASSRATELIMIT: "bypassratelimit";
5
- readonly REGISTER: "register";
6
- readonly DEMO: "demo";
7
- readonly CONFIG: "config";
8
- readonly WEBHOOK: "webhook";
9
- readonly NATIONALID: "nationalId";
10
- readonly NOTIFICATION_API: "notification-api";
11
- readonly RECORDSEARCH: "recordsearch";
12
- readonly RECORD_IMPORT: "record.import";
13
- readonly RECORD_EXPORT: "record.export";
14
- readonly RECORD_REINDEX: "record.reindex";
15
- readonly RECORD_DECLARE_BIRTH: "record.declare-birth";
16
- readonly RECORD_DECLARE_BIRTH_MY_JURISDICTION: "record.declare-birth:my-jurisdiction";
17
- readonly RECORD_DECLARE_DEATH: "record.declare-death";
18
- readonly RECORD_DECLARE_DEATH_MY_JURISDICTION: "record.declare-death:my-jurisdiction";
19
- readonly RECORD_DECLARE_MARRIAGE: "record.declare-marriage";
20
- readonly RECORD_DECLARE_MARRIAGE_MY_JURISDICTION: "record.declare-marriage:my-jurisdiction";
21
- readonly RECORD_SUBMIT_INCOMPLETE: "record.declaration-submit-incomplete";
22
- readonly RECORD_SUBMIT_FOR_REVIEW: "record.declaration-submit-for-review";
23
- readonly RECORD_UNASSIGN_OTHERS: "record.unassign-others";
24
- readonly RECORD_SUBMIT_FOR_APPROVAL: "record.declaration-submit-for-approval";
25
- readonly RECORD_SUBMIT_FOR_UPDATES: "record.declaration-submit-for-updates";
26
- readonly RECORD_DECLARATION_EDIT: "record.declaration-edit";
27
- readonly RECORD_REVIEW_DUPLICATES: "record.review-duplicates";
28
- readonly RECORD_DECLARATION_ARCHIVE: "record.declaration-archive";
29
- readonly RECORD_DECLARATION_REINSTATE: "record.declaration-reinstate";
30
- readonly RECORD_REGISTER: "record.register";
31
- /**
32
- * This scope is used to **print and **issue certified copies of a record
33
- * after it has been registered. Previously Registrars had this permission.
34
- */
35
- readonly RECORD_PRINT_ISSUE_CERTIFIED_COPIES: "record.registration-print&issue-certified-copies";
36
- readonly RECORD_REGISTRATION_REQUEST_CORRECTION: "record.registration-request-correction";
37
- readonly RECORD_REGISTRATION_CORRECT: "record.registration-correct";
38
- readonly RECORD_CONFIRM_REGISTRATION: "record.confirm-registration";
39
- readonly RECORD_REJECT_REGISTRATION: "record.reject-registration";
40
- readonly SEARCH_BIRTH_MY_JURISDICTION: "search.birth:my-jurisdiction";
41
- readonly SEARCH_BIRTH: "search.birth";
42
- readonly SEARCH_DEATH_MY_JURISDICTION: "search.death:my-jurisdiction";
43
- readonly SEARCH_DEATH: "search.death";
44
- readonly SEARCH_MARRIAGE_MY_JURISDICTION: "search.marriage:my-jurisdiction";
45
- readonly SEARCH_MARRIAGE: "search.marriage";
46
- readonly RECORD_READ: "record.read";
47
- readonly PROFILE_ELECTRONIC_SIGNATURE: "profile.electronic-signature";
48
- readonly PERFORMANCE_READ: "performance.read";
49
- readonly PERFORMANCE_READ_DASHBOARDS: "performance.read-dashboards";
50
- readonly PERFORMANCE_EXPORT_VITAL_STATISTICS: "performance.vital-statistics-export";
51
- readonly ORGANISATION_READ_LOCATIONS: "organisation.read-locations:all";
52
- readonly ORGANISATION_READ_LOCATIONS_MY_OFFICE: "organisation.read-locations:my-office";
53
- readonly ORGANISATION_READ_LOCATIONS_MY_JURISDICTION: "organisation.read-locations:my-jurisdiction";
54
- readonly USER_READ: "user.read:all";
55
- readonly USER_READ_MY_OFFICE: "user.read:my-office";
56
- readonly USER_READ_MY_JURISDICTION: "user.read:my-jurisdiction";
57
- readonly USER_READ_ONLY_MY_AUDIT: "user.read:only-my-audit";
58
- readonly USER_CREATE: "user.create:all";
59
- readonly USER_CREATE_MY_JURISDICTION: "user.create:my-jurisdiction";
60
- readonly USER_UPDATE: "user.update:all";
61
- readonly USER_UPDATE_MY_JURISDICTION: "user.update:my-jurisdiction";
62
- readonly CONFIG_UPDATE_ALL: "config.update:all";
63
- readonly USER_DATA_SEEDING: "user.data-seeding";
64
- };
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">]>;
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">]>]>;
67
- declare const SearchScope: z.ZodObject<{
68
- type: z.ZodLiteral<"search">;
69
- options: z.ZodObject<{
70
- event: z.ZodArray<z.ZodString, "many">;
71
- access: z.ZodArray<z.ZodEnum<["my-jurisdiction", "all"]>, "many">;
72
- }, "strip", z.ZodTypeAny, {
73
- event: string[];
74
- access: ("my-jurisdiction" | "all")[];
75
- }, {
76
- event: string[];
77
- access: ("my-jurisdiction" | "all")[];
78
- }>;
79
- }, "strip", z.ZodTypeAny, {
80
- type: "search";
81
- options: {
82
- event: string[];
83
- access: ("my-jurisdiction" | "all")[];
84
- };
85
- }, {
86
- type: "search";
87
- options: {
88
- event: string[];
89
- access: ("my-jurisdiction" | "all")[];
90
- };
1
+ import * as z from 'zod/v4';
2
+ import { Role } from './roles';
3
+ export declare const JurisdictionFilter: z.ZodEnum<{
4
+ administrativeArea: "administrativeArea";
5
+ location: "location";
6
+ all: "all";
91
7
  }>;
92
- declare const PrintCertifiedCopiesScope: z.ZodObject<{
93
- type: z.ZodLiteral<"record.registered.print-certified-copies">;
94
- options: z.ZodObject<{
95
- event: z.ZodArray<z.ZodString, "many">;
96
- templates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
97
- }, "strip", z.ZodTypeAny, {
98
- event: string[];
99
- templates?: string[] | undefined;
100
- }, {
101
- event: string[];
102
- templates?: string[] | undefined;
8
+ export type JurisdictionFilter = z.infer<typeof JurisdictionFilter>;
9
+ export declare const UserFilter: z.ZodEnum<{
10
+ user: "user";
11
+ }>;
12
+ export type UserFilter = z.infer<typeof UserFilter>;
13
+ /**
14
+ * The different types of scopes that can be used to control access to records. Each type has different options that can be used to further filter the records that the scope applies to.
15
+ * When adding new scope types, they should be added to the appropriate section based on the options they require.
16
+ *
17
+ * @see scopeOptionsPlaceEvent @see scopeOptionsDeclared @see scopeOptionsFull
18
+ */
19
+ export declare const RecordScopeTypeV2: z.ZodEnum<{
20
+ "record.search": "record.search";
21
+ "record.create": "record.create";
22
+ "record.read": "record.read";
23
+ "record.declare": "record.declare";
24
+ "record.notify": "record.notify";
25
+ "record.edit": "record.edit";
26
+ "record.reject": "record.reject";
27
+ "record.archive": "record.archive";
28
+ "record.review-duplicates": "record.review-duplicates";
29
+ "record.register": "record.register";
30
+ "record.print-certified-copies": "record.print-certified-copies";
31
+ "record.request-correction": "record.request-correction";
32
+ "record.correct": "record.correct";
33
+ "record.unassign-others": "record.unassign-others";
34
+ "record.custom-action": "record.custom-action";
35
+ }>;
36
+ export type RecordScopeTypeV2 = z.infer<typeof RecordScopeTypeV2>;
37
+ declare const AllScopeOptions: z.ZodObject<{
38
+ ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
39
+ accessLevel: z.ZodOptional<z.ZodEnum<{
40
+ administrativeArea: "administrativeArea";
41
+ location: "location";
42
+ all: "all";
43
+ }>>;
44
+ role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
45
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
46
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
47
+ administrativeArea: "administrativeArea";
48
+ location: "location";
49
+ all: "all";
50
+ }>>;
51
+ declaredIn: z.ZodOptional<z.ZodEnum<{
52
+ administrativeArea: "administrativeArea";
53
+ location: "location";
54
+ all: "all";
55
+ }>>;
56
+ declaredBy: z.ZodOptional<z.ZodEnum<{
57
+ user: "user";
58
+ }>>;
59
+ registeredIn: z.ZodOptional<z.ZodEnum<{
60
+ administrativeArea: "administrativeArea";
61
+ location: "location";
62
+ all: "all";
63
+ }>>;
64
+ registeredBy: z.ZodOptional<z.ZodEnum<{
65
+ user: "user";
66
+ }>>;
67
+ }, z.core.$strip>;
68
+ type AllScopeOptions = z.infer<typeof AllScopeOptions>;
69
+ export declare const ScopeOptionKey: z.ZodEnum<{
70
+ role: "role";
71
+ event: "event";
72
+ placeOfEvent: "placeOfEvent";
73
+ declaredIn: "declaredIn";
74
+ declaredBy: "declaredBy";
75
+ registeredIn: "registeredIn";
76
+ registeredBy: "registeredBy";
77
+ accessLevel: "accessLevel";
78
+ ids: "ids";
79
+ }>;
80
+ export type ScopeOptionKey = z.infer<typeof ScopeOptionKey>;
81
+ export declare const ScopesWithPlaceEventOptions: z.ZodEnum<{
82
+ "record.create": "record.create";
83
+ "record.declare": "record.declare";
84
+ "record.notify": "record.notify";
85
+ }>;
86
+ export declare const ScopesWithDeclaredOptions: z.ZodEnum<{
87
+ "record.edit": "record.edit";
88
+ "record.reject": "record.reject";
89
+ "record.archive": "record.archive";
90
+ "record.review-duplicates": "record.review-duplicates";
91
+ "record.register": "record.register";
92
+ }>;
93
+ export declare const ScopesWithFullOptions: z.ZodEnum<{
94
+ "record.search": "record.search";
95
+ "record.read": "record.read";
96
+ "record.request-correction": "record.request-correction";
97
+ "record.correct": "record.correct";
98
+ "record.unassign-others": "record.unassign-others";
99
+ }>;
100
+ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
101
+ type: z.ZodEnum<{
102
+ "record.create": "record.create";
103
+ "record.declare": "record.declare";
104
+ "record.notify": "record.notify";
103
105
  }>;
104
- }, "strip", z.ZodTypeAny, {
105
- type: "record.registered.print-certified-copies";
106
- options: {
107
- event: string[];
108
- templates?: string[] | undefined;
109
- };
110
- }, {
111
- type: "record.registered.print-certified-copies";
112
- options: {
113
- event: string[];
114
- templates?: string[] | undefined;
115
- };
106
+ options: z.ZodOptional<z.ZodObject<{
107
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
108
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
109
+ administrativeArea: "administrativeArea";
110
+ location: "location";
111
+ all: "all";
112
+ }>>;
113
+ }, z.core.$strip>>;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ type: z.ZodEnum<{
116
+ "record.edit": "record.edit";
117
+ "record.reject": "record.reject";
118
+ "record.archive": "record.archive";
119
+ "record.review-duplicates": "record.review-duplicates";
120
+ "record.register": "record.register";
121
+ }>;
122
+ options: z.ZodOptional<z.ZodObject<{
123
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
124
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
125
+ administrativeArea: "administrativeArea";
126
+ location: "location";
127
+ all: "all";
128
+ }>>;
129
+ declaredIn: z.ZodOptional<z.ZodEnum<{
130
+ administrativeArea: "administrativeArea";
131
+ location: "location";
132
+ all: "all";
133
+ }>>;
134
+ declaredBy: z.ZodOptional<z.ZodEnum<{
135
+ user: "user";
136
+ }>>;
137
+ }, z.core.$strip>>;
138
+ }, z.core.$strip>, z.ZodObject<{
139
+ type: z.ZodEnum<{
140
+ "record.search": "record.search";
141
+ "record.read": "record.read";
142
+ "record.request-correction": "record.request-correction";
143
+ "record.correct": "record.correct";
144
+ "record.unassign-others": "record.unassign-others";
145
+ }>;
146
+ options: z.ZodOptional<z.ZodObject<{
147
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
148
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
149
+ administrativeArea: "administrativeArea";
150
+ location: "location";
151
+ all: "all";
152
+ }>>;
153
+ declaredIn: z.ZodOptional<z.ZodEnum<{
154
+ administrativeArea: "administrativeArea";
155
+ location: "location";
156
+ all: "all";
157
+ }>>;
158
+ declaredBy: z.ZodOptional<z.ZodEnum<{
159
+ user: "user";
160
+ }>>;
161
+ registeredIn: z.ZodOptional<z.ZodEnum<{
162
+ administrativeArea: "administrativeArea";
163
+ location: "location";
164
+ all: "all";
165
+ }>>;
166
+ registeredBy: z.ZodOptional<z.ZodEnum<{
167
+ user: "user";
168
+ }>>;
169
+ }, z.core.$strip>>;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ type: z.ZodLiteral<"record.custom-action">;
172
+ options: z.ZodOptional<z.ZodObject<{
173
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
174
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
175
+ administrativeArea: "administrativeArea";
176
+ location: "location";
177
+ all: "all";
178
+ }>>;
179
+ declaredIn: z.ZodOptional<z.ZodEnum<{
180
+ administrativeArea: "administrativeArea";
181
+ location: "location";
182
+ all: "all";
183
+ }>>;
184
+ declaredBy: z.ZodOptional<z.ZodEnum<{
185
+ user: "user";
186
+ }>>;
187
+ registeredIn: z.ZodOptional<z.ZodEnum<{
188
+ administrativeArea: "administrativeArea";
189
+ location: "location";
190
+ all: "all";
191
+ }>>;
192
+ registeredBy: z.ZodOptional<z.ZodEnum<{
193
+ user: "user";
194
+ }>>;
195
+ customActionTypes: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
196
+ }, z.core.$strip>>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ type: z.ZodLiteral<"record.print-certified-copies">;
199
+ options: z.ZodOptional<z.ZodObject<{
200
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
201
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
202
+ administrativeArea: "administrativeArea";
203
+ location: "location";
204
+ all: "all";
205
+ }>>;
206
+ declaredIn: z.ZodOptional<z.ZodEnum<{
207
+ administrativeArea: "administrativeArea";
208
+ location: "location";
209
+ all: "all";
210
+ }>>;
211
+ declaredBy: z.ZodOptional<z.ZodEnum<{
212
+ user: "user";
213
+ }>>;
214
+ registeredIn: z.ZodOptional<z.ZodEnum<{
215
+ administrativeArea: "administrativeArea";
216
+ location: "location";
217
+ all: "all";
218
+ }>>;
219
+ registeredBy: z.ZodOptional<z.ZodEnum<{
220
+ user: "user";
221
+ }>>;
222
+ templates: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
223
+ }, z.core.$strip>>;
224
+ }, z.core.$strip>], "type">;
225
+ declare const SystemScopeType: z.ZodEnum<{
226
+ "organisation.read-locations": "organisation.read-locations";
227
+ "user.read": "user.read";
228
+ "user.create": "user.create";
229
+ "user.edit": "user.edit";
230
+ "user.search": "user.search";
116
231
  }>;
117
- export type SearchScope = z.infer<typeof SearchScope>;
118
- export type PrintCertifiedCopiesScope = z.infer<typeof PrintCertifiedCopiesScope>;
119
- export declare const RecordScopeType: z.ZodEnum<["record.create", "record.read", "record.declare", "record.notify", "record.declared.validate", "record.declared.reject", "record.declared.archive", "record.declared.review-duplicates", "record.register", "record.registered.request-correction", "record.registered.correct", "record.unassign-others"]>;
120
- export type RecordScopeType = z.infer<typeof RecordScopeType>;
121
- export declare const RecordScope: z.ZodObject<{
122
- type: z.ZodEnum<["record.create", "record.read", "record.declare", "record.notify", "record.declared.validate", "record.declared.reject", "record.declared.archive", "record.declared.review-duplicates", "record.register", "record.registered.request-correction", "record.registered.correct", "record.unassign-others"]>;
123
- options: z.ZodObject<{
124
- event: z.ZodArray<z.ZodString, "many">;
125
- }, "strip", z.ZodTypeAny, {
126
- event: string[];
127
- }, {
128
- event: string[];
232
+ export type SystemScopeType = z.infer<typeof SystemScopeType>;
233
+ declare const UserScopeType: z.ZodEnum<{
234
+ "user.read": "user.read";
235
+ "user.create": "user.create";
236
+ "user.edit": "user.edit";
237
+ "user.search": "user.search";
238
+ }>;
239
+ export type UserScopeType = z.infer<typeof UserScopeType>;
240
+ declare const ScopesWithRoleOption: z.ZodEnum<{
241
+ "user.create": "user.create";
242
+ "user.edit": "user.edit";
243
+ }>;
244
+ export type ScopesWithRoleOption = z.infer<typeof ScopesWithRoleOption>;
245
+ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
246
+ type: z.ZodEnum<{
247
+ "user.create": "user.create";
248
+ "user.edit": "user.edit";
129
249
  }>;
130
- }, "strip", z.ZodTypeAny, {
131
- type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.validate" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.request-correction" | "record.registered.correct";
132
- options: {
133
- event: string[];
134
- };
135
- }, {
136
- type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.validate" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.request-correction" | "record.registered.correct";
137
- options: {
138
- event: string[];
139
- };
250
+ options: z.ZodOptional<z.ZodObject<{
251
+ accessLevel: z.ZodOptional<z.ZodEnum<{
252
+ administrativeArea: "administrativeArea";
253
+ location: "location";
254
+ all: "all";
255
+ }>>;
256
+ role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
257
+ }, z.core.$strip>>;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ type: z.ZodEnum<{
260
+ "user.read": "user.read";
261
+ "user.search": "user.search";
262
+ }>;
263
+ options: z.ZodOptional<z.ZodObject<{
264
+ accessLevel: z.ZodOptional<z.ZodEnum<{
265
+ administrativeArea: "administrativeArea";
266
+ location: "location";
267
+ all: "all";
268
+ }>>;
269
+ }, z.core.$strip>>;
270
+ }, z.core.$strip>], "type">;
271
+ export type UserScopeV2 = z.infer<typeof UserScopeV2>;
272
+ export declare function scopeUsesRoleOptions(scope: UserScopeV2): scope is Extract<UserScopeV2, {
273
+ type: ScopesWithRoleOption;
140
274
  }>;
141
- export type RecordScope = z.infer<typeof RecordScope>;
142
- declare const ConfigurableRawScopes: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
143
- type: z.ZodLiteral<"search">;
144
- options: z.ZodObject<{
145
- event: z.ZodArray<z.ZodString, "many">;
146
- access: z.ZodArray<z.ZodEnum<["my-jurisdiction", "all"]>, "many">;
147
- }, "strip", z.ZodTypeAny, {
148
- event: string[];
149
- access: ("my-jurisdiction" | "all")[];
150
- }, {
151
- event: string[];
152
- access: ("my-jurisdiction" | "all")[];
275
+ export declare function scopeUsesDeclaredOptions(scope: Scope): scope is Extract<Scope, {
276
+ type: z.infer<typeof ScopesWithDeclaredOptions>;
277
+ }>;
278
+ export declare function scopeUsesFullOptions(scope: Scope): scope is Extract<Scope, {
279
+ type: z.infer<typeof ScopesWithFullOptions>;
280
+ }>;
281
+ export declare function scopeUsesPrintCertifiedCopiesOptions(scope: Scope): scope is Extract<Scope, {
282
+ type: 'record.print-certified-copies';
283
+ }>;
284
+ export declare function isCustomActionScope(scope: Scope): scope is Extract<Scope, {
285
+ type: 'record.custom-action';
286
+ }>;
287
+ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
288
+ type: z.ZodEnum<{
289
+ "record.create": "record.create";
290
+ "record.declare": "record.declare";
291
+ "record.notify": "record.notify";
153
292
  }>;
154
- }, "strip", z.ZodTypeAny, {
155
- type: "search";
156
- options: {
157
- event: string[];
158
- access: ("my-jurisdiction" | "all")[];
159
- };
160
- }, {
161
- type: "search";
162
- options: {
163
- event: string[];
164
- access: ("my-jurisdiction" | "all")[];
165
- };
166
- }>, z.ZodObject<{
167
- type: z.ZodLiteral<"record.registered.print-certified-copies">;
168
- options: z.ZodObject<{
169
- event: z.ZodArray<z.ZodString, "many">;
170
- templates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
171
- }, "strip", z.ZodTypeAny, {
172
- event: string[];
173
- templates?: string[] | undefined;
174
- }, {
175
- event: string[];
176
- templates?: string[] | undefined;
293
+ options: z.ZodOptional<z.ZodObject<{
294
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
295
+ placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
296
+ }, z.core.$strip>>;
297
+ }, z.core.$strip>, z.ZodObject<{
298
+ type: z.ZodEnum<{
299
+ "record.edit": "record.edit";
300
+ "record.reject": "record.reject";
301
+ "record.archive": "record.archive";
302
+ "record.review-duplicates": "record.review-duplicates";
303
+ "record.register": "record.register";
177
304
  }>;
178
- }, "strip", z.ZodTypeAny, {
179
- type: "record.registered.print-certified-copies";
180
- options: {
181
- event: string[];
182
- templates?: string[] | undefined;
183
- };
184
- }, {
185
- type: "record.registered.print-certified-copies";
186
- options: {
187
- event: string[];
188
- templates?: string[] | undefined;
189
- };
190
- }>, z.ZodObject<{
191
- type: z.ZodLiteral<"user.create">;
192
- options: z.ZodObject<{
193
- role: z.ZodArray<z.ZodString, "many">;
194
- }, "strip", z.ZodTypeAny, {
195
- role: string[];
196
- }, {
197
- role: string[];
305
+ options: z.ZodOptional<z.ZodObject<{
306
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
307
+ placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
308
+ declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
309
+ declaredBy: z.ZodOptional<z.ZodString>;
310
+ }, z.core.$strip>>;
311
+ }, z.core.$strip>, z.ZodObject<{
312
+ type: z.ZodEnum<{
313
+ "record.search": "record.search";
314
+ "record.read": "record.read";
315
+ "record.request-correction": "record.request-correction";
316
+ "record.correct": "record.correct";
317
+ "record.unassign-others": "record.unassign-others";
198
318
  }>;
199
- }, "strip", z.ZodTypeAny, {
200
- type: "user.create";
201
- options: {
202
- role: string[];
203
- };
204
- }, {
205
- type: "user.create";
206
- options: {
207
- role: string[];
208
- };
209
- }>, z.ZodObject<{
210
- type: z.ZodLiteral<"user.edit">;
211
- options: z.ZodObject<{
212
- role: z.ZodArray<z.ZodString, "many">;
213
- }, "strip", z.ZodTypeAny, {
214
- role: string[];
215
- }, {
216
- role: string[];
319
+ options: z.ZodOptional<z.ZodObject<{
320
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
321
+ placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
322
+ declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
323
+ declaredBy: z.ZodOptional<z.ZodString>;
324
+ registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
325
+ registeredBy: z.ZodOptional<z.ZodString>;
326
+ }, z.core.$strip>>;
327
+ }, z.core.$strip>, z.ZodObject<{
328
+ type: z.ZodLiteral<"record.print-certified-copies">;
329
+ options: z.ZodOptional<z.ZodObject<{
330
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
331
+ placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
332
+ declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
333
+ declaredBy: z.ZodOptional<z.ZodString>;
334
+ registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
335
+ registeredBy: z.ZodOptional<z.ZodString>;
336
+ templates: z.ZodOptional<z.ZodArray<z.ZodString>>;
337
+ }, z.core.$strip>>;
338
+ }, z.core.$strip>], "type">;
339
+ export type RecordScopeV2 = z.infer<typeof RecordScopeV2>;
340
+ export type ResolvedRecordScopeV2 = z.infer<typeof ResolvedRecordScopeV2>;
341
+ /** The primary scope schema which gathers all scope types together. All scopes are discriminated by type and options are determined according to the type. */
342
+ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
343
+ type: z.ZodEnum<{
344
+ bypassratelimit: "bypassratelimit";
345
+ "record.reindex": "record.reindex";
346
+ "user.data-seeding": "user.data-seeding";
347
+ "integration.create": "integration.create";
348
+ "record.import": "record.import";
349
+ "config.update-all": "config.update-all";
350
+ "attachment.upload": "attachment.upload";
351
+ "profile.electronic-signature": "profile.electronic-signature";
352
+ "user.read-only-my-audit": "user.read-only-my-audit";
353
+ "performance.read": "performance.read";
354
+ "performance.read-dashboards": "performance.read-dashboards";
355
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
356
+ "record.confirm-registration": "record.confirm-registration";
357
+ "record.reject-registration": "record.reject-registration";
217
358
  }>;
218
- }, "strip", z.ZodTypeAny, {
219
- type: "user.edit";
220
- options: {
221
- role: string[];
222
- };
223
- }, {
224
- type: "user.edit";
225
- options: {
226
- role: string[];
227
- };
228
- }>, z.ZodObject<{
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ type: z.ZodEnum<{
361
+ "record.create": "record.create";
362
+ "record.declare": "record.declare";
363
+ "record.notify": "record.notify";
364
+ }>;
365
+ options: z.ZodOptional<z.ZodObject<{
366
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
367
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
368
+ administrativeArea: "administrativeArea";
369
+ location: "location";
370
+ all: "all";
371
+ }>>;
372
+ }, z.core.$strip>>;
373
+ }, z.core.$strip>, z.ZodObject<{
374
+ type: z.ZodEnum<{
375
+ "record.edit": "record.edit";
376
+ "record.reject": "record.reject";
377
+ "record.archive": "record.archive";
378
+ "record.review-duplicates": "record.review-duplicates";
379
+ "record.register": "record.register";
380
+ }>;
381
+ options: z.ZodOptional<z.ZodObject<{
382
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
383
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
384
+ administrativeArea: "administrativeArea";
385
+ location: "location";
386
+ all: "all";
387
+ }>>;
388
+ declaredIn: z.ZodOptional<z.ZodEnum<{
389
+ administrativeArea: "administrativeArea";
390
+ location: "location";
391
+ all: "all";
392
+ }>>;
393
+ declaredBy: z.ZodOptional<z.ZodEnum<{
394
+ user: "user";
395
+ }>>;
396
+ }, z.core.$strip>>;
397
+ }, z.core.$strip>, z.ZodObject<{
398
+ type: z.ZodEnum<{
399
+ "record.search": "record.search";
400
+ "record.read": "record.read";
401
+ "record.request-correction": "record.request-correction";
402
+ "record.correct": "record.correct";
403
+ "record.unassign-others": "record.unassign-others";
404
+ }>;
405
+ options: z.ZodOptional<z.ZodObject<{
406
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
407
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
408
+ administrativeArea: "administrativeArea";
409
+ location: "location";
410
+ all: "all";
411
+ }>>;
412
+ declaredIn: z.ZodOptional<z.ZodEnum<{
413
+ administrativeArea: "administrativeArea";
414
+ location: "location";
415
+ all: "all";
416
+ }>>;
417
+ declaredBy: z.ZodOptional<z.ZodEnum<{
418
+ user: "user";
419
+ }>>;
420
+ registeredIn: z.ZodOptional<z.ZodEnum<{
421
+ administrativeArea: "administrativeArea";
422
+ location: "location";
423
+ all: "all";
424
+ }>>;
425
+ registeredBy: z.ZodOptional<z.ZodEnum<{
426
+ user: "user";
427
+ }>>;
428
+ }, z.core.$strip>>;
429
+ }, z.core.$strip>, z.ZodObject<{
430
+ type: z.ZodLiteral<"record.custom-action">;
431
+ options: z.ZodOptional<z.ZodObject<{
432
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
433
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
434
+ administrativeArea: "administrativeArea";
435
+ location: "location";
436
+ all: "all";
437
+ }>>;
438
+ declaredIn: z.ZodOptional<z.ZodEnum<{
439
+ administrativeArea: "administrativeArea";
440
+ location: "location";
441
+ all: "all";
442
+ }>>;
443
+ declaredBy: z.ZodOptional<z.ZodEnum<{
444
+ user: "user";
445
+ }>>;
446
+ registeredIn: z.ZodOptional<z.ZodEnum<{
447
+ administrativeArea: "administrativeArea";
448
+ location: "location";
449
+ all: "all";
450
+ }>>;
451
+ registeredBy: z.ZodOptional<z.ZodEnum<{
452
+ user: "user";
453
+ }>>;
454
+ customActionTypes: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
455
+ }, z.core.$strip>>;
456
+ }, z.core.$strip>, z.ZodObject<{
457
+ type: z.ZodLiteral<"record.print-certified-copies">;
458
+ options: z.ZodOptional<z.ZodObject<{
459
+ event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
460
+ placeOfEvent: z.ZodOptional<z.ZodEnum<{
461
+ administrativeArea: "administrativeArea";
462
+ location: "location";
463
+ all: "all";
464
+ }>>;
465
+ declaredIn: z.ZodOptional<z.ZodEnum<{
466
+ administrativeArea: "administrativeArea";
467
+ location: "location";
468
+ all: "all";
469
+ }>>;
470
+ declaredBy: z.ZodOptional<z.ZodEnum<{
471
+ user: "user";
472
+ }>>;
473
+ registeredIn: z.ZodOptional<z.ZodEnum<{
474
+ administrativeArea: "administrativeArea";
475
+ location: "location";
476
+ all: "all";
477
+ }>>;
478
+ registeredBy: z.ZodOptional<z.ZodEnum<{
479
+ user: "user";
480
+ }>>;
481
+ templates: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
482
+ }, z.core.$strip>>;
483
+ }, z.core.$strip>, z.ZodObject<{
484
+ type: z.ZodEnum<{
485
+ "user.create": "user.create";
486
+ "user.edit": "user.edit";
487
+ }>;
488
+ options: z.ZodOptional<z.ZodObject<{
489
+ accessLevel: z.ZodOptional<z.ZodEnum<{
490
+ administrativeArea: "administrativeArea";
491
+ location: "location";
492
+ all: "all";
493
+ }>>;
494
+ role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
495
+ }, z.core.$strip>>;
496
+ }, z.core.$strip>, z.ZodObject<{
497
+ type: z.ZodEnum<{
498
+ "user.read": "user.read";
499
+ "user.search": "user.search";
500
+ }>;
501
+ options: z.ZodOptional<z.ZodObject<{
502
+ accessLevel: z.ZodOptional<z.ZodEnum<{
503
+ administrativeArea: "administrativeArea";
504
+ location: "location";
505
+ all: "all";
506
+ }>>;
507
+ }, z.core.$strip>>;
508
+ }, z.core.$strip>, z.ZodObject<{
509
+ type: z.ZodLiteral<"organisation.read-locations">;
510
+ options: z.ZodOptional<z.ZodObject<{
511
+ accessLevel: z.ZodOptional<z.ZodEnum<{
512
+ administrativeArea: "administrativeArea";
513
+ location: "location";
514
+ all: "all";
515
+ }>>;
516
+ }, z.core.$strip>>;
517
+ }, z.core.$strip>, z.ZodObject<{
229
518
  type: z.ZodLiteral<"workqueue">;
230
519
  options: z.ZodObject<{
231
- id: z.ZodArray<z.ZodString, "many">;
232
- }, "strip", z.ZodTypeAny, {
233
- id: string[];
234
- }, {
235
- id: string[];
236
- }>;
237
- }, "strip", z.ZodTypeAny, {
238
- type: "workqueue";
239
- options: {
240
- id: string[];
241
- };
242
- }, {
243
- type: "workqueue";
244
- options: {
245
- id: string[];
246
- };
247
- }>, z.ZodObject<{
248
- type: z.ZodEnum<["record.create", "record.read", "record.declare", "record.notify", "record.declared.validate", "record.declared.reject", "record.declared.archive", "record.declared.review-duplicates", "record.register", "record.registered.request-correction", "record.registered.correct", "record.unassign-others"]>;
520
+ ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
521
+ }, z.core.$strip>;
522
+ }, z.core.$strip>, z.ZodObject<{
523
+ type: z.ZodLiteral<"dashboard.view">;
249
524
  options: z.ZodObject<{
250
- event: z.ZodArray<z.ZodString, "many">;
251
- }, "strip", z.ZodTypeAny, {
252
- event: string[];
253
- }, {
254
- event: string[];
255
- }>;
256
- }, "strip", z.ZodTypeAny, {
257
- type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.validate" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.request-correction" | "record.registered.correct";
258
- options: {
259
- event: string[];
260
- };
261
- }, {
262
- type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.validate" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.request-correction" | "record.registered.correct";
263
- options: {
264
- event: string[];
265
- };
266
- }>]>;
267
- type ConfigurableRawScopes = z.infer<typeof ConfigurableRawScopes>;
268
- export type ConfigurableScopeType = ConfigurableRawScopes['type'];
269
- type FlattenedSearchScope = {
270
- type: 'search';
271
- options: Record<string, SearchScopeAccessLevels>;
272
- };
273
- export type ConfigurableScopes = Exclude<ConfigurableRawScopes, {
274
- type: 'search';
275
- }> | FlattenedSearchScope;
276
- export declare function findScope<T extends ConfigurableScopeType>(scopes: string[], scopeType: T): Extract<{
277
- type: "record.registered.print-certified-copies";
278
- options: {
279
- event: string[];
280
- templates?: string[] | undefined;
281
- };
282
- }, {
283
- type: T;
284
- }> | Extract<{
285
- type: "user.create";
286
- options: {
287
- role: string[];
288
- };
289
- }, {
290
- type: T;
291
- }> | Extract<{
292
- type: "user.edit";
293
- options: {
294
- role: string[];
295
- };
296
- }, {
297
- type: T;
298
- }> | Extract<{
299
- type: "workqueue";
300
- options: {
301
- id: string[];
302
- };
303
- }, {
304
- type: T;
305
- }> | Extract<{
306
- type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.validate" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.request-correction" | "record.registered.correct";
307
- options: {
308
- event: string[];
309
- };
310
- }, {
311
- type: T;
312
- }> | Extract<FlattenedSearchScope, {
313
- type: T;
314
- }> | undefined;
525
+ ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
526
+ }, z.core.$strip>;
527
+ }, z.core.$strip>], "type">;
528
+ export type Scope = z.infer<typeof Scope>;
529
+ export declare const ScopeType: z.ZodEnum<{
530
+ "record.search": "record.search";
531
+ "record.create": "record.create";
532
+ "record.read": "record.read";
533
+ "record.declare": "record.declare";
534
+ "record.notify": "record.notify";
535
+ "record.edit": "record.edit";
536
+ "record.reject": "record.reject";
537
+ "record.archive": "record.archive";
538
+ "record.review-duplicates": "record.review-duplicates";
539
+ "record.register": "record.register";
540
+ "record.print-certified-copies": "record.print-certified-copies";
541
+ "record.request-correction": "record.request-correction";
542
+ "record.correct": "record.correct";
543
+ "record.unassign-others": "record.unassign-others";
544
+ "record.custom-action": "record.custom-action";
545
+ bypassratelimit: "bypassratelimit";
546
+ "record.reindex": "record.reindex";
547
+ "user.data-seeding": "user.data-seeding";
548
+ "integration.create": "integration.create";
549
+ "record.import": "record.import";
550
+ "config.update-all": "config.update-all";
551
+ "attachment.upload": "attachment.upload";
552
+ "profile.electronic-signature": "profile.electronic-signature";
553
+ "user.read-only-my-audit": "user.read-only-my-audit";
554
+ "performance.read": "performance.read";
555
+ "performance.read-dashboards": "performance.read-dashboards";
556
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
557
+ "record.confirm-registration": "record.confirm-registration";
558
+ "record.reject-registration": "record.reject-registration";
559
+ "organisation.read-locations": "organisation.read-locations";
560
+ "user.read": "user.read";
561
+ "user.create": "user.create";
562
+ "user.edit": "user.edit";
563
+ "user.search": "user.search";
564
+ workqueue: "workqueue";
565
+ "dashboard.view": "dashboard.view";
566
+ }>;
567
+ export type ScopeType = z.infer<typeof ScopeType>;
315
568
  /**
316
- * Parses a configurable scope string into a ConfigurableRawScopes object.
317
- * @param {string} scope - The scope string to parse
318
- * @returns {ConfigurableRawScopes | undefined} The parsed scope object if valid, undefined otherwise
319
- * @example
320
- * parseScope("user.create[role=field-agent|registration-agent]")
321
- * // Returns: { type: "user.create", options: { role: ["field-agent", "registration-agent"] } }
569
+ * Branded encoded scope string, in query string format.
570
+ *
322
571
  */
323
- export declare function parseConfigurableScope(scope: string): {
324
- type: "record.registered.print-certified-copies";
325
- options: {
326
- event: string[];
572
+ export declare const EncodedScope: z.core.$ZodBranded<z.ZodString, "EncodedScope", "out">;
573
+ export type EncodedScope = z.infer<typeof EncodedScope>;
574
+ /**
575
+ * Encodes a scope object into an EncodedScope branded query string.
576
+ *
577
+ *
578
+ * @param scope - The scope object to encode.
579
+ * @returns The encoded scope as a branded string (`EncodedScope`).
580
+ */
581
+ export declare const encodeScope: (scope: Scope) => EncodedScope;
582
+ /**
583
+ * Converts a scope object into an encoded query string representation.
584
+ *
585
+ * @TODO scope param could be defined as EncodedScope instead of string.
586
+ *
587
+ * @param scope - The scope object to encode.
588
+ * @returns The encoded scope as a branded string (`EncodedScope`).
589
+ */
590
+ export declare const decodeScope: (query: EncodedScope) => {
591
+ type: "record.create" | "record.declare" | "record.notify";
592
+ options?: {
593
+ event?: string[] | undefined;
594
+ placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
595
+ } | undefined;
596
+ } | {
597
+ type: "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register";
598
+ options?: {
599
+ event?: string[] | undefined;
600
+ placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
601
+ declaredIn?: "administrativeArea" | "location" | "all" | undefined;
602
+ declaredBy?: "user" | undefined;
603
+ } | undefined;
604
+ } | {
605
+ type: "record.search" | "record.read" | "record.request-correction" | "record.correct" | "record.unassign-others";
606
+ options?: {
607
+ event?: string[] | undefined;
608
+ placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
609
+ declaredIn?: "administrativeArea" | "location" | "all" | undefined;
610
+ declaredBy?: "user" | undefined;
611
+ registeredIn?: "administrativeArea" | "location" | "all" | undefined;
612
+ registeredBy?: "user" | undefined;
613
+ } | undefined;
614
+ } | {
615
+ type: "record.custom-action";
616
+ options?: {
617
+ event?: string[] | undefined;
618
+ placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
619
+ declaredIn?: "administrativeArea" | "location" | "all" | undefined;
620
+ declaredBy?: "user" | undefined;
621
+ registeredIn?: "administrativeArea" | "location" | "all" | undefined;
622
+ registeredBy?: "user" | undefined;
623
+ customActionTypes?: string[] | undefined;
624
+ } | undefined;
625
+ } | {
626
+ type: "record.print-certified-copies";
627
+ options?: {
628
+ event?: string[] | undefined;
629
+ placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
630
+ declaredIn?: "administrativeArea" | "location" | "all" | undefined;
631
+ declaredBy?: "user" | undefined;
632
+ registeredIn?: "administrativeArea" | "location" | "all" | undefined;
633
+ registeredBy?: "user" | undefined;
327
634
  templates?: string[] | undefined;
328
- };
635
+ } | undefined;
329
636
  } | {
330
- type: "search";
331
- options: {
332
- event: string[];
333
- access: ("my-jurisdiction" | "all")[];
334
- };
637
+ type: "user.create" | "user.edit";
638
+ options?: {
639
+ accessLevel?: "administrativeArea" | "location" | "all" | undefined;
640
+ role?: string[] | undefined;
641
+ } | undefined;
335
642
  } | {
336
- type: "user.create";
337
- options: {
338
- role: string[];
339
- };
643
+ type: "user.read" | "user.search";
644
+ options?: {
645
+ accessLevel?: "administrativeArea" | "location" | "all" | undefined;
646
+ } | undefined;
340
647
  } | {
341
- type: "user.edit";
342
- options: {
343
- role: string[];
344
- };
648
+ type: "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration";
649
+ } | {
650
+ type: "organisation.read-locations";
651
+ options?: {
652
+ accessLevel?: "administrativeArea" | "location" | "all" | undefined;
653
+ } | undefined;
345
654
  } | {
346
655
  type: "workqueue";
347
656
  options: {
348
- id: string[];
657
+ ids: string[];
349
658
  };
350
659
  } | {
351
- type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.validate" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.request-correction" | "record.registered.correct";
660
+ type: "dashboard.view";
352
661
  options: {
353
- event: string[];
662
+ ids: string[];
354
663
  };
355
664
  } | undefined;
356
- export declare function parseLiteralScope(scope: string): {
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";
358
- } | undefined;
359
665
  /**
360
- * Stringifies a ConfigurableScopes object into a scope string.
361
- * @param {ConfigurableScopes} scope - The scope object to stringify
362
- * @returns {string} The stringified scope in format "type[key1=value1|value2,key2=value3|value4]"
363
- * @example
364
- * stringifyScope({
365
- * type: "record.notify",
366
- * options: { event: ["birth", "tennis-club-membership"] }
367
- * })
368
- * // Returns: "record.notify[event=birth|tennis-club-membership]"
666
+ * Function to get the value of a scope option (aka. scope attribute)
667
+ *
668
+ * @param scope - The scope to get the value of the option from.
669
+ * @param option - The option to get the value of.
670
+ * @returns The value of the scope option. Will return the default value if the option is not set.
671
+ */
672
+ export declare function getScopeOptionValue<T extends ScopeOptionKey>(scope: Scope, option: T): AllScopeOptions[T] | undefined;
673
+ export declare function getAcceptedScopesByType({ acceptedScopes, scopes }: {
674
+ acceptedScopes: ScopeType[];
675
+ scopes: EncodedScope[];
676
+ }): Scope[];
677
+ /**
678
+ * Checks if the provided scopes or token contain any of the accepted scopes.
679
+ *
680
+ * Overloads:
681
+ * - `hasAnyScope(token, scopes)` → extracts scopes from a token
682
+ * - `hasAnyScope(scopes, scopes)` → checks directly from a scope array
683
+ */
684
+ /**
685
+ * Checks if the provided token contains any of the accepted scopes.
686
+ *
687
+ * @param {string} token - The authentication JWT token.
688
+ * @param {ScopeType[]} scopes - An array of scope types to check for.
689
+ * @returns {boolean} True if the token contains at least one of the accepted scopes, false otherwise.
690
+ */
691
+ export declare function hasAnyScope(token: string, scopes: ScopeType[]): boolean;
692
+ /**
693
+ * Checks if the provided array of scopes contains any of the accepted scopes.
694
+ *
695
+ * @param {EncodedScope[]} userScopes - Array of scopes to check.
696
+ * @param {ScopeType[]} scopes - An array of scope types to check for.
697
+ * @returns {boolean} True if the scope list contains at least one of the accepted scopes.
698
+ */
699
+ export declare function hasAnyScope(userScopes: EncodedScope[], scopes: ScopeType[]): boolean;
700
+ /**
701
+ * Checks whether a scope exists either inside a JWT token or
702
+ * within a provided list of scopes.
703
+ *
704
+ * Overloads:
705
+ * - `hasScope(token, scope)` → extracts scopes from a token
706
+ * - `hasScope(scopes, scope)` → checks directly from a scope array
707
+ */
708
+ /**
709
+ * Checks if the provided token contains the given scope.
710
+ *
711
+ * @param token - The authentication JWT token.
712
+ * @param scope - The scope type to check for.
713
+ * @returns True if the token contains the specified scope.
714
+ */
715
+ export declare function hasScope(token: string, scope: ScopeType): boolean;
716
+ /**
717
+ * Checks if the provided list of scopes contains the given scope.
718
+ *
719
+ * @param scopes - Array of scopes to check.
720
+ * @param scope - The scope type to check for.
721
+ * @returns True if the scope list contains the specified scope.
722
+ */
723
+ export declare function hasScope(scopes: EncodedScope[], scope: ScopeType): boolean;
724
+ /**
725
+ * Checks if the given event type is allowed by the accepted scopes. If no specific event types are defined, it returns true.
726
+ *
727
+ * @param {Scope[]} userScopes - The scopes of the user.
728
+ * @param {string} eventType - The event type to check for permission.
729
+ * @returns {boolean} Returns true if the event type is allowed by the scope.
730
+ */
731
+ export declare function canUserCreateEvent(userScopes: EncodedScope[], eventType: string): boolean;
732
+ /**
733
+ * Helper for defining scopes for user roles. Should be used in country config.
734
+ *
735
+ * @param scopes Array of scopes in object format.
736
+ * @returns Array of scopes in string format, encoded for use in JWT tokens.
369
737
  */
370
- export declare function stringifyScope(scope: z.infer<typeof ConfigurableRawScopes>): string;
738
+ export declare function defineScopes(scopes: Scope[]): (string & z.core.$brand<"EncodedScope">)[];
371
739
  /**
372
- * Extracts authorized event identifiers (e.g. birth, death) from the provided configurable scopes.
740
+ * Helper for defining user roles. Should be used in country config.
373
741
  *
374
- * @param scopes - Array of configurable scopes with options
375
- * @returns Array of authorized event identifiers
742
+ * @param roles Array of roles in object format.
376
743
  */
377
- export declare function getAuthorizedEventsFromScopes(scopes: ConfigurableScopes[]): string[];
378
- export declare const scopes: Scope[];
379
- export type ParsedScopes = NonNullable<ReturnType<typeof parseConfigurableScope>>;
380
- export type RawScopes = z.infer<typeof LiteralScopes> | (string & {});
381
- export type Scope = RawScopes;
382
- export declare const ActionScopes: z.ZodUnion<[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">]>]>;
383
- export type ActionScopes = z.infer<typeof ActionScopes>;
744
+ export declare function defineRoles(roles: Role[]): {
745
+ id: string;
746
+ scopes: (string & z.core.$brand<"EncodedScope">)[];
747
+ }[];
384
748
  export {};
385
749
  //# sourceMappingURL=scopes.d.ts.map