@opencrvs/toolkit 2.2.0-rc.ab91cce → 2.2.0-rc.e6591c5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.sh +17 -14
- package/dist/application-config/index.js +57 -14
- package/dist/authentication/index.d.ts +2 -1
- package/dist/authentication/index.js +34 -14
- package/dist/cli.js +2631 -377
- package/dist/commons/api/router.d.ts +1564 -248
- package/dist/commons/application-config/index.d.ts +3 -3
- package/dist/commons/conditionals/conditionals.d.ts +7 -7
- package/dist/commons/conditionals/index.d.ts +1 -0
- package/dist/commons/conditionals/validate.d.ts +6 -1
- package/dist/commons/events/ActionConfig.d.ts +68 -21
- package/dist/commons/events/ActionDocument.d.ts +89 -0
- package/dist/commons/events/ActionInput.d.ts +56 -4
- package/dist/commons/events/ActionStatus.d.ts +2 -2
- package/dist/commons/events/ActionType.d.ts +13 -1
- package/dist/commons/events/AdvancedSearchConfig.d.ts +15 -0
- package/dist/commons/events/AuditLog.d.ts +4 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +5 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +192 -18
- package/dist/commons/events/Draft.d.ts +36 -1
- package/dist/commons/events/EventConfig.d.ts +448 -1
- package/dist/commons/events/EventDocument.d.ts +90 -0
- package/dist/commons/events/EventIndex.d.ts +44 -6
- package/dist/commons/events/EventInput.d.ts +1 -0
- package/dist/commons/events/EventMetadata.d.ts +24 -1
- package/dist/commons/events/EventStatus.d.ts +1 -0
- package/dist/commons/events/FieldConfig.d.ts +11 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +17 -17
- package/dist/commons/events/Flag.d.ts +1 -7
- package/dist/commons/events/PlainDate.d.ts +6 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +224 -33
- package/dist/commons/events/defineConfig.d.ts +7 -2
- package/dist/commons/events/event.d.ts +4 -1
- package/dist/commons/events/eventConfigValidation.d.ts +9 -0
- package/dist/commons/events/field.d.ts +5 -0
- package/dist/commons/events/index.d.ts +3 -0
- package/dist/commons/events/locations.d.ts +1 -1
- package/dist/commons/events/scopes.d.ts +4 -1
- package/dist/commons/events/state/flags.d.ts +1 -1
- package/dist/commons/events/state/index.d.ts +11 -2
- package/dist/commons/events/state/utils.d.ts +11 -1
- package/dist/commons/events/test.utils.d.ts +85 -8
- package/dist/commons/events/toNotificationForm.d.ts +17 -0
- package/dist/commons/events/utils.d.ts +88 -8
- package/dist/commons/users/Role.d.ts +23 -0
- package/dist/commons/users/User.d.ts +263 -0
- package/dist/commons/users/authentication.d.ts +67 -0
- package/dist/commons/users/index.d.ts +5 -0
- package/dist/commons/users/roleValidations.d.ts +15 -0
- package/dist/commons/users/scopes.d.ts +1402 -0
- package/dist/commons/users/userReferences.d.ts +176 -0
- package/dist/conditionals/index.js +19 -7
- package/dist/configurator/index.d.ts +24 -0
- package/dist/configurator/index.d.ts.map +1 -0
- package/dist/configurator/index.js +161 -0
- package/dist/configurator/layout.d.ts +29 -0
- package/dist/configurator/layout.d.ts.map +1 -0
- package/dist/configurator/layout.js +78 -0
- package/dist/configurator/paths.d.ts +13 -0
- package/dist/configurator/paths.d.ts.map +1 -0
- package/dist/configurator/paths.js +48 -0
- package/dist/configurator/server/environments.d.ts +20 -0
- package/dist/configurator/server/environments.d.ts.map +1 -0
- package/dist/configurator/server/environments.js +143 -0
- package/dist/configurator/server/files.d.ts +11 -0
- package/dist/configurator/server/files.d.ts.map +1 -0
- package/dist/configurator/server/files.js +67 -0
- package/dist/configurator/server/github.d.ts +56 -0
- package/dist/configurator/server/github.d.ts.map +1 -0
- package/dist/configurator/server/github.js +239 -0
- package/dist/configurator/server/plugin.d.ts +39 -0
- package/dist/configurator/server/plugin.d.ts.map +1 -0
- package/dist/configurator/server/plugin.js +298 -0
- package/dist/configurator/server/seal.d.ts +2 -0
- package/dist/configurator/server/seal.d.ts.map +1 -0
- package/dist/configurator/server/seal.js +36 -0
- package/dist/configurator/server/sshKeys.d.ts +5 -0
- package/dist/configurator/server/sshKeys.d.ts.map +1 -0
- package/dist/configurator/server/sshKeys.js +28 -0
- package/dist/configurator/server/start.d.ts +12 -0
- package/dist/configurator/server/start.d.ts.map +1 -0
- package/dist/configurator/server/start.js +91 -0
- package/dist/configurator/testing.d.ts +11 -0
- package/dist/configurator/testing.d.ts.map +1 -0
- package/dist/configurator/testing.js +74 -0
- package/dist/configurator/ui/bindings/bindings.d.ts +35 -0
- package/dist/configurator/ui/bindings/bindings.d.ts.map +1 -0
- package/dist/configurator/ui/bindings/bindings.js +5 -0
- package/dist/configurator/ui/bindings/parsers.d.ts +7 -0
- package/dist/configurator/ui/bindings/parsers.d.ts.map +1 -0
- package/dist/configurator/ui/bindings/parsers.js +85 -0
- package/dist/configurator/ui/form/users.d.ts +11 -0
- package/dist/configurator/ui/form/users.d.ts.map +1 -0
- package/dist/configurator/ui/form/users.js +33 -0
- package/dist/configurator/ui/plan/dependencyHosts.d.ts +2 -0
- package/dist/configurator/ui/plan/dependencyHosts.d.ts.map +1 -0
- package/dist/configurator/ui/plan/dependencyHosts.js +36 -0
- package/dist/configurator/ui/plan/templateValues.d.ts +11 -0
- package/dist/configurator/ui/plan/templateValues.d.ts.map +1 -0
- package/dist/configurator/ui/plan/templateValues.js +70 -0
- package/dist/configurator/workflows.d.ts +54 -0
- package/dist/configurator/workflows.d.ts.map +1 -0
- package/dist/configurator/workflows.js +161 -0
- package/dist/configurator-assets/forms/bindings.yml +265 -0
- package/dist/configurator-assets/templates/README.md +18 -0
- package/dist/configurator-assets/templates/charts-values/dependencies/values.override.yaml +4 -0
- package/dist/configurator-assets/templates/charts-values/dependencies/values.yaml +96 -0
- package/dist/configurator-assets/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
- package/dist/configurator-assets/templates/charts-values/opencrvs-services/values.yaml +83 -0
- package/dist/configurator-assets/templates/charts-values/opentelemetry/values.yaml +102 -0
- package/dist/configurator-assets/templates/charts-values/traefik/values.override.yaml +4 -0
- package/dist/configurator-assets/templates/charts-values/traefik/values.yaml +130 -0
- package/dist/configurator-assets/templates/inventory/inventory.template.yml +98 -0
- package/dist/configurator-assets/ui/apple-touch-icon.png +0 -0
- package/dist/configurator-assets/ui/assets/index-CaqYFJUk.css +6 -0
- package/dist/configurator-assets/ui/assets/index-DU1Y6E0b.js +169 -0
- package/dist/configurator-assets/ui/assets/opencrvs-logo-sIjz08HT.svg +1 -0
- package/dist/configurator-assets/ui/assets/poppins-400-BwTUGeWf.woff2 +0 -0
- package/dist/configurator-assets/ui/assets/poppins-500-CWICHMj6.woff2 +0 -0
- package/dist/configurator-assets/ui/assets/poppins-600-DJVo7c07.woff2 +0 -0
- package/dist/configurator-assets/ui/assets/poppins-700-g9MkRaG0.woff2 +0 -0
- package/dist/configurator-assets/ui/favicon-32x32.png +0 -0
- package/dist/configurator-assets/ui/index.html +25 -0
- package/dist/environment/custom-types.d.ts +1 -0
- package/dist/environment/custom-types.d.ts.map +1 -1
- package/dist/environment/derived-variables.d.ts +18 -4
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +20 -4
- package/dist/environment/questions.d.ts +42 -9
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/questions.js +71 -48
- package/dist/environment/registry.d.ts +15 -0
- package/dist/environment/registry.d.ts.map +1 -0
- package/dist/environment/registry.js +112 -0
- package/dist/environment/setup-environment.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +145 -25
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/events/index.js +957 -215
- package/dist/migrations/add-notify-config.d.ts +40 -0
- package/dist/migrations/add-notify-config.d.ts.map +1 -0
- package/dist/migrations/add-notify-config.js +249 -0
- package/dist/migrations/index.d.ts +9 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +1306 -0
- package/dist/migrations/move-declaration-to-declare-action.d.ts +38 -0
- package/dist/migrations/move-declaration-to-declare-action.d.ts.map +1 -0
- package/dist/migrations/move-declaration-to-declare-action.js +260 -0
- package/dist/migrations/{add-translations.d.ts → persistent/add-translations.d.ts} +1 -1
- package/dist/migrations/persistent/add-translations.d.ts.map +1 -0
- package/dist/migrations/{add-translations.js → persistent/add-translations.js} +2 -2
- package/dist/migrations/persistent/check-upgrade-path.d.ts +36 -0
- package/dist/migrations/persistent/check-upgrade-path.d.ts.map +1 -0
- package/dist/migrations/persistent/check-upgrade-path.js +105 -0
- package/dist/migrations/persistent/update-toolkit-dependency.d.ts +7 -0
- package/dist/migrations/persistent/update-toolkit-dependency.d.ts.map +1 -0
- package/dist/migrations/persistent/update-toolkit-dependency.js +77 -0
- package/dist/migrations/{v2.2/read-declaration-through-helper.d.ts → read-declaration-through-helper.d.ts} +1 -1
- package/dist/migrations/read-declaration-through-helper.d.ts.map +1 -0
- package/dist/migrations/{v2.2/read-declaration-through-helper.js → read-declaration-through-helper.js} +4 -62
- package/dist/migrations/replace-incomplete-flag.d.ts +26 -0
- package/dist/migrations/replace-incomplete-flag.d.ts.map +1 -0
- package/dist/migrations/replace-incomplete-flag.js +126 -0
- package/dist/migrations/resolve-versioned-event-config.d.ts +56 -0
- package/dist/migrations/resolve-versioned-event-config.d.ts.map +1 -0
- package/dist/migrations/resolve-versioned-event-config.js +353 -0
- package/dist/migrations/utils.d.ts +61 -0
- package/dist/migrations/utils.d.ts.map +1 -0
- package/dist/migrations/utils.js +218 -0
- package/dist/notification/index.js +810 -84
- package/dist/roles/index.d.ts +2 -0
- package/dist/roles/index.d.ts.map +1 -0
- package/dist/roles/index.js +730 -0
- package/dist/scopes/index.d.ts +83 -100
- package/dist/scopes/index.js +29 -13
- package/dist/templates/charts-values/dependencies/values.yaml +5 -2
- package/dist/templates/charts-values/opencrvs-services/values.yaml +5 -7
- package/dist/templates/charts-values/traefik/values.yaml +2 -0
- package/dist/verify/endpoints.d.ts +11 -0
- package/dist/verify/endpoints.d.ts.map +1 -1
- package/dist/verify/endpoints.js +21 -27
- package/opencrvs-toolkit-2.2.0-rc.e6591c5.tgz +0 -0
- package/package.json +17 -4
- package/tsconfig.build.json +11 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.json +15 -6
- package/dist/migrations/add-translations.d.ts.map +0 -1
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +0 -3
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +0 -1
- package/dist/migrations/v2.1/add-explicit-correction-flags.js +0 -234
- package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +0 -3
- package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +0 -1
- package/dist/migrations/v2.1/add-recovery-link-notifications.js +0 -511
- package/dist/migrations/v2.1/enable-telemetry.d.ts +0 -3
- package/dist/migrations/v2.1/enable-telemetry.d.ts.map +0 -1
- package/dist/migrations/v2.1/enable-telemetry.js +0 -455
- package/dist/migrations/v2.1/index.d.ts +0 -6
- package/dist/migrations/v2.1/index.d.ts.map +0 -1
- package/dist/migrations/v2.1/index.js +0 -50
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +0 -17
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +0 -1
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.js +0 -348
- package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts +0 -2
- package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts.map +0 -1
- package/dist/migrations/v2.1/remove-metabase-package-installs.js +0 -161
- package/dist/migrations/v2.1/remove-sentry.d.ts +0 -3
- package/dist/migrations/v2.1/remove-sentry.d.ts.map +0 -1
- package/dist/migrations/v2.1/remove-sentry.js +0 -354
- package/dist/migrations/v2.1/rename-trigger-paths.d.ts +0 -3
- package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +0 -1
- package/dist/migrations/v2.1/rename-trigger-paths.js +0 -216
- package/dist/migrations/v2.1/template-files.d.ts +0 -8
- package/dist/migrations/v2.1/template-files.d.ts.map +0 -1
- package/dist/migrations/v2.1/template-files.js +0 -49
- package/dist/migrations/v2.1/upgrade-tilt.d.ts +0 -11
- package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +0 -1
- package/dist/migrations/v2.1/upgrade-tilt.js +0 -139
- package/dist/migrations/v2.2/index.d.ts +0 -6
- package/dist/migrations/v2.2/index.d.ts.map +0 -1
- package/dist/migrations/v2.2/index.js +0 -456
- package/dist/migrations/v2.2/read-declaration-through-helper.d.ts.map +0 -1
- package/dist/templates/countryconfig-template/.tiltignore +0 -1
- package/dist/templates/countryconfig-template/Dockerfile.assets +0 -7
- package/dist/templates/countryconfig-template/Tiltfile +0 -112
- package/dist/templates/countryconfig-template/assets/README.md +0 -1
- package/dist/templates/countryconfig-template/assets/clear-all-data-dev.sh +0 -61
- package/dist/templates/countryconfig-template/assets/deployment/deploy.sh +0 -455
- package/dist/templates/countryconfig-template/assets/deployment/reindex.sh +0 -168
- package/dist/templates/countryconfig-template/assets/deployment/validate-required-variables-in-compose-files.ts +0 -67
- package/dist/templates/countryconfig-template/assets/elasticsearch/reindex.sh +0 -168
- package/dist/templates/countryconfig-template/assets/metabase/README.md +0 -34
- package/dist/templates/countryconfig-template/assets/metabase/environment-configuration.sql +0 -36
- package/dist/templates/countryconfig-template/assets/metabase/initialize-database.sh +0 -46
- package/dist/templates/countryconfig-template/assets/metabase/metabase.init.db.sql +0 -27737
- package/dist/templates/countryconfig-template/assets/metabase/open-shell.sh +0 -21
- package/dist/templates/countryconfig-template/assets/metabase/package.json +0 -13
- package/dist/templates/countryconfig-template/assets/metabase/run-dev.sh +0 -108
- package/dist/templates/countryconfig-template/assets/metabase/run.sh +0 -120
- package/dist/templates/countryconfig-template/assets/metabase/update-database.sh +0 -40
- package/dist/templates/countryconfig-template/assets/postgres/setup-analytics.sh +0 -135
- package/dist/templates/countryconfig-template/assets/postgres/setup-reference-data.sh +0 -108
- package/dist/templates/countryconfig-template/tilt/clear-all-data.ps1 +0 -50
- package/dist/templates/countryconfig-template/tilt/clear-all-data.sh +0 -35
- package/dist/templates/countryconfig-template/tilt/common.tilt +0 -145
- package/dist/templates/countryconfig-template/tilt/examples/dependencies/values.yaml +0 -15
- package/dist/templates/countryconfig-template/tilt/examples/opencrvs-services/values.yaml +0 -56
- package/dist/templates/countryconfig-template/tilt/examples/traefik/values-minikube.yaml +0 -21
- package/dist/templates/countryconfig-template/tilt/examples/traefik/values.yaml +0 -38
- package/dist/templates/countryconfig-template/tilt/helm/dependencies/values.yaml +0 -17
- package/dist/templates/countryconfig-template/tilt/helm/opencrvs-services/values.yaml +0 -16
- package/dist/templates/countryconfig-template/tilt/lib.tilt +0 -95
- package/dist/templates/countryconfig-template/tilt/opencrvs.tilt +0 -136
- package/opencrvs-toolkit-2.2.0-rc.ab91cce.tgz +0 -0
|
@@ -0,0 +1,1402 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const JurisdictionFilter: z.ZodEnum<{
|
|
3
|
+
administrativeArea: "administrativeArea";
|
|
4
|
+
all: "all";
|
|
5
|
+
location: "location";
|
|
6
|
+
}>;
|
|
7
|
+
export type JurisdictionFilter = z.infer<typeof JurisdictionFilter>;
|
|
8
|
+
export declare const UserFilter: z.ZodEnum<{
|
|
9
|
+
user: "user";
|
|
10
|
+
}>;
|
|
11
|
+
export type UserFilter = z.infer<typeof UserFilter>;
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
* When adding new scope types, they should be added to the appropriate section based on the options they require.
|
|
15
|
+
*
|
|
16
|
+
* @see scopeOptionsPlaceEvent @see scopeOptionsDeclaredOrNotified @see scopeOptionsFull
|
|
17
|
+
*/
|
|
18
|
+
export declare const RecordScopeTypeV2: z.ZodEnum<{
|
|
19
|
+
"record.action.accept": "record.action.accept";
|
|
20
|
+
"record.action.reject": "record.action.reject";
|
|
21
|
+
"record.archive": "record.archive";
|
|
22
|
+
"record.correct": "record.correct";
|
|
23
|
+
"record.create": "record.create";
|
|
24
|
+
"record.custom-action": "record.custom-action";
|
|
25
|
+
"record.declare": "record.declare";
|
|
26
|
+
"record.edit": "record.edit";
|
|
27
|
+
"record.notify": "record.notify";
|
|
28
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
29
|
+
"record.read": "record.read";
|
|
30
|
+
"record.register": "record.register";
|
|
31
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
32
|
+
"record.reject": "record.reject";
|
|
33
|
+
"record.request-correction": "record.request-correction";
|
|
34
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
35
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
36
|
+
"record.search": "record.search";
|
|
37
|
+
"record.unarchive": "record.unarchive";
|
|
38
|
+
"record.unassign-others": "record.unassign-others";
|
|
39
|
+
}>;
|
|
40
|
+
export type RecordScopeTypeV2 = z.infer<typeof RecordScopeTypeV2>;
|
|
41
|
+
declare const AllScopeOptions: z.ZodObject<{
|
|
42
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
43
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
administrativeArea: "administrativeArea";
|
|
45
|
+
all: "all";
|
|
46
|
+
location: "location";
|
|
47
|
+
}>>;
|
|
48
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
user: "user";
|
|
50
|
+
}>>;
|
|
51
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
administrativeArea: "administrativeArea";
|
|
53
|
+
all: "all";
|
|
54
|
+
location: "location";
|
|
55
|
+
}>>;
|
|
56
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
administrativeArea: "administrativeArea";
|
|
58
|
+
all: "all";
|
|
59
|
+
location: "location";
|
|
60
|
+
}>>;
|
|
61
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
user: "user";
|
|
63
|
+
}>>;
|
|
64
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
administrativeArea: "administrativeArea";
|
|
66
|
+
all: "all";
|
|
67
|
+
location: "location";
|
|
68
|
+
}>>;
|
|
69
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
user: "user";
|
|
71
|
+
}>>;
|
|
72
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
73
|
+
ARCHIVED: "ARCHIVED";
|
|
74
|
+
CREATED: "CREATED";
|
|
75
|
+
DECLARED: "DECLARED";
|
|
76
|
+
NOTIFIED: "NOTIFIED";
|
|
77
|
+
REGISTERED: "REGISTERED";
|
|
78
|
+
REVOKED: "REVOKED";
|
|
79
|
+
}>>>, unknown>;
|
|
80
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
administrativeArea: "administrativeArea";
|
|
82
|
+
all: "all";
|
|
83
|
+
location: "location";
|
|
84
|
+
}>>;
|
|
85
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
user: "user";
|
|
87
|
+
}>>;
|
|
88
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
90
|
+
readonly REJECTED: 'rejected';
|
|
91
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
92
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
93
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
94
|
+
}>]>, z.ZodString]>>>;
|
|
95
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
96
|
+
readonly REJECTED: 'rejected';
|
|
97
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
98
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
99
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
100
|
+
}>]>, z.ZodString]>>>;
|
|
101
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
102
|
+
readonly REJECTED: 'rejected';
|
|
103
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
104
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
105
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
106
|
+
}>]>, z.ZodString]>>>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
administrativeArea: "administrativeArea";
|
|
110
|
+
all: "all";
|
|
111
|
+
location: "location";
|
|
112
|
+
}>>;
|
|
113
|
+
role: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>>;
|
|
114
|
+
ids: z.ZodPreprocess<z.ZodArray<z.ZodString>, unknown>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
type AllScopeOptions = z.infer<typeof AllScopeOptions>;
|
|
117
|
+
export declare const ScopeOptionKey: z.ZodEnum<{
|
|
118
|
+
accessLevel: "accessLevel";
|
|
119
|
+
createdBy: "createdBy";
|
|
120
|
+
createdIn: "createdIn";
|
|
121
|
+
declaredBy: "declaredBy";
|
|
122
|
+
declaredIn: "declaredIn";
|
|
123
|
+
event: "event";
|
|
124
|
+
flags: "flags";
|
|
125
|
+
ids: "ids";
|
|
126
|
+
notifiedBy: "notifiedBy";
|
|
127
|
+
notifiedIn: "notifiedIn";
|
|
128
|
+
placeOfEvent: "placeOfEvent";
|
|
129
|
+
registeredBy: "registeredBy";
|
|
130
|
+
registeredIn: "registeredIn";
|
|
131
|
+
role: "role";
|
|
132
|
+
status: "status";
|
|
133
|
+
}>;
|
|
134
|
+
export type ScopeOptionKey = z.infer<typeof ScopeOptionKey>;
|
|
135
|
+
export declare const ScopesWithPlaceEventOptions: z.ZodEnum<{
|
|
136
|
+
"record.create": "record.create";
|
|
137
|
+
"record.declare": "record.declare";
|
|
138
|
+
"record.notify": "record.notify";
|
|
139
|
+
}>;
|
|
140
|
+
export declare const ScopesWithDeclaredOptions: z.ZodEnum<{
|
|
141
|
+
"record.archive": "record.archive";
|
|
142
|
+
"record.edit": "record.edit";
|
|
143
|
+
"record.register": "record.register";
|
|
144
|
+
"record.reject": "record.reject";
|
|
145
|
+
"record.unarchive": "record.unarchive";
|
|
146
|
+
}>;
|
|
147
|
+
export declare const ScopesWithFullOptions: z.ZodEnum<{
|
|
148
|
+
"record.correct": "record.correct";
|
|
149
|
+
"record.read": "record.read";
|
|
150
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
151
|
+
"record.request-correction": "record.request-correction";
|
|
152
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
153
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
154
|
+
"record.search": "record.search";
|
|
155
|
+
"record.unassign-others": "record.unassign-others";
|
|
156
|
+
}>;
|
|
157
|
+
export declare const ActionConfirmationScopeType: z.ZodEnum<{
|
|
158
|
+
"record.action.accept": "record.action.accept";
|
|
159
|
+
"record.action.reject": "record.action.reject";
|
|
160
|
+
}>;
|
|
161
|
+
export type ActionConfirmationScopeType = z.infer<typeof ActionConfirmationScopeType>;
|
|
162
|
+
export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
163
|
+
type: z.ZodEnum<{
|
|
164
|
+
"record.create": "record.create";
|
|
165
|
+
"record.declare": "record.declare";
|
|
166
|
+
"record.notify": "record.notify";
|
|
167
|
+
}>;
|
|
168
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
170
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
administrativeArea: "administrativeArea";
|
|
172
|
+
all: "all";
|
|
173
|
+
location: "location";
|
|
174
|
+
}>>;
|
|
175
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
176
|
+
user: "user";
|
|
177
|
+
}>>;
|
|
178
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
179
|
+
administrativeArea: "administrativeArea";
|
|
180
|
+
all: "all";
|
|
181
|
+
location: "location";
|
|
182
|
+
}>>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
type: z.ZodEnum<{
|
|
186
|
+
"record.archive": "record.archive";
|
|
187
|
+
"record.edit": "record.edit";
|
|
188
|
+
"record.register": "record.register";
|
|
189
|
+
"record.reject": "record.reject";
|
|
190
|
+
"record.unarchive": "record.unarchive";
|
|
191
|
+
}>;
|
|
192
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
194
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
administrativeArea: "administrativeArea";
|
|
196
|
+
all: "all";
|
|
197
|
+
location: "location";
|
|
198
|
+
}>>;
|
|
199
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
200
|
+
user: "user";
|
|
201
|
+
}>>;
|
|
202
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
203
|
+
administrativeArea: "administrativeArea";
|
|
204
|
+
all: "all";
|
|
205
|
+
location: "location";
|
|
206
|
+
}>>;
|
|
207
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
208
|
+
administrativeArea: "administrativeArea";
|
|
209
|
+
all: "all";
|
|
210
|
+
location: "location";
|
|
211
|
+
}>>;
|
|
212
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
user: "user";
|
|
214
|
+
}>>;
|
|
215
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
216
|
+
administrativeArea: "administrativeArea";
|
|
217
|
+
all: "all";
|
|
218
|
+
location: "location";
|
|
219
|
+
}>>;
|
|
220
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
221
|
+
user: "user";
|
|
222
|
+
}>>;
|
|
223
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
224
|
+
ARCHIVED: "ARCHIVED";
|
|
225
|
+
CREATED: "CREATED";
|
|
226
|
+
DECLARED: "DECLARED";
|
|
227
|
+
NOTIFIED: "NOTIFIED";
|
|
228
|
+
REGISTERED: "REGISTERED";
|
|
229
|
+
REVOKED: "REVOKED";
|
|
230
|
+
}>>>, unknown>;
|
|
231
|
+
}, z.core.$strip>>;
|
|
232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
+
type: z.ZodEnum<{
|
|
234
|
+
"record.correct": "record.correct";
|
|
235
|
+
"record.read": "record.read";
|
|
236
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
237
|
+
"record.request-correction": "record.request-correction";
|
|
238
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
239
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
240
|
+
"record.search": "record.search";
|
|
241
|
+
"record.unassign-others": "record.unassign-others";
|
|
242
|
+
}>;
|
|
243
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
245
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
246
|
+
administrativeArea: "administrativeArea";
|
|
247
|
+
all: "all";
|
|
248
|
+
location: "location";
|
|
249
|
+
}>>;
|
|
250
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
user: "user";
|
|
252
|
+
}>>;
|
|
253
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
254
|
+
administrativeArea: "administrativeArea";
|
|
255
|
+
all: "all";
|
|
256
|
+
location: "location";
|
|
257
|
+
}>>;
|
|
258
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
259
|
+
administrativeArea: "administrativeArea";
|
|
260
|
+
all: "all";
|
|
261
|
+
location: "location";
|
|
262
|
+
}>>;
|
|
263
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
264
|
+
user: "user";
|
|
265
|
+
}>>;
|
|
266
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
administrativeArea: "administrativeArea";
|
|
268
|
+
all: "all";
|
|
269
|
+
location: "location";
|
|
270
|
+
}>>;
|
|
271
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
272
|
+
user: "user";
|
|
273
|
+
}>>;
|
|
274
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
275
|
+
ARCHIVED: "ARCHIVED";
|
|
276
|
+
CREATED: "CREATED";
|
|
277
|
+
DECLARED: "DECLARED";
|
|
278
|
+
NOTIFIED: "NOTIFIED";
|
|
279
|
+
REGISTERED: "REGISTERED";
|
|
280
|
+
REVOKED: "REVOKED";
|
|
281
|
+
}>>>, unknown>;
|
|
282
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
283
|
+
administrativeArea: "administrativeArea";
|
|
284
|
+
all: "all";
|
|
285
|
+
location: "location";
|
|
286
|
+
}>>;
|
|
287
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
288
|
+
user: "user";
|
|
289
|
+
}>>;
|
|
290
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
292
|
+
readonly REJECTED: 'rejected';
|
|
293
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
294
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
295
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
296
|
+
}>]>, z.ZodString]>>>;
|
|
297
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
298
|
+
readonly REJECTED: 'rejected';
|
|
299
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
300
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
301
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
302
|
+
}>]>, z.ZodString]>>>;
|
|
303
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
304
|
+
readonly REJECTED: 'rejected';
|
|
305
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
306
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
307
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
308
|
+
}>]>, z.ZodString]>>>;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
}, z.core.$strip>>;
|
|
311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
313
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
314
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
315
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
316
|
+
administrativeArea: "administrativeArea";
|
|
317
|
+
all: "all";
|
|
318
|
+
location: "location";
|
|
319
|
+
}>>;
|
|
320
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
321
|
+
user: "user";
|
|
322
|
+
}>>;
|
|
323
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
324
|
+
administrativeArea: "administrativeArea";
|
|
325
|
+
all: "all";
|
|
326
|
+
location: "location";
|
|
327
|
+
}>>;
|
|
328
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
administrativeArea: "administrativeArea";
|
|
330
|
+
all: "all";
|
|
331
|
+
location: "location";
|
|
332
|
+
}>>;
|
|
333
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
334
|
+
user: "user";
|
|
335
|
+
}>>;
|
|
336
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
administrativeArea: "administrativeArea";
|
|
338
|
+
all: "all";
|
|
339
|
+
location: "location";
|
|
340
|
+
}>>;
|
|
341
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
342
|
+
user: "user";
|
|
343
|
+
}>>;
|
|
344
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
345
|
+
ARCHIVED: "ARCHIVED";
|
|
346
|
+
CREATED: "CREATED";
|
|
347
|
+
DECLARED: "DECLARED";
|
|
348
|
+
NOTIFIED: "NOTIFIED";
|
|
349
|
+
REGISTERED: "REGISTERED";
|
|
350
|
+
REVOKED: "REVOKED";
|
|
351
|
+
}>>>, unknown>;
|
|
352
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
353
|
+
administrativeArea: "administrativeArea";
|
|
354
|
+
all: "all";
|
|
355
|
+
location: "location";
|
|
356
|
+
}>>;
|
|
357
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
358
|
+
user: "user";
|
|
359
|
+
}>>;
|
|
360
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
361
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
362
|
+
readonly REJECTED: 'rejected';
|
|
363
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
364
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
365
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
366
|
+
}>]>, z.ZodString]>>>;
|
|
367
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
368
|
+
readonly REJECTED: 'rejected';
|
|
369
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
370
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
371
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
372
|
+
}>]>, z.ZodString]>>>;
|
|
373
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
374
|
+
readonly REJECTED: 'rejected';
|
|
375
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
376
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
377
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
378
|
+
}>]>, z.ZodString]>>>;
|
|
379
|
+
}, z.core.$strip>>;
|
|
380
|
+
customActionTypes: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
381
|
+
}, z.core.$strip>>;
|
|
382
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
383
|
+
type: z.ZodLiteral<"record.print-certified-copies">;
|
|
384
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
385
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
386
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
387
|
+
administrativeArea: "administrativeArea";
|
|
388
|
+
all: "all";
|
|
389
|
+
location: "location";
|
|
390
|
+
}>>;
|
|
391
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
392
|
+
user: "user";
|
|
393
|
+
}>>;
|
|
394
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
395
|
+
administrativeArea: "administrativeArea";
|
|
396
|
+
all: "all";
|
|
397
|
+
location: "location";
|
|
398
|
+
}>>;
|
|
399
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
400
|
+
administrativeArea: "administrativeArea";
|
|
401
|
+
all: "all";
|
|
402
|
+
location: "location";
|
|
403
|
+
}>>;
|
|
404
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
405
|
+
user: "user";
|
|
406
|
+
}>>;
|
|
407
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
408
|
+
administrativeArea: "administrativeArea";
|
|
409
|
+
all: "all";
|
|
410
|
+
location: "location";
|
|
411
|
+
}>>;
|
|
412
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
413
|
+
user: "user";
|
|
414
|
+
}>>;
|
|
415
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
416
|
+
ARCHIVED: "ARCHIVED";
|
|
417
|
+
CREATED: "CREATED";
|
|
418
|
+
DECLARED: "DECLARED";
|
|
419
|
+
NOTIFIED: "NOTIFIED";
|
|
420
|
+
REGISTERED: "REGISTERED";
|
|
421
|
+
REVOKED: "REVOKED";
|
|
422
|
+
}>>>, unknown>;
|
|
423
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
424
|
+
administrativeArea: "administrativeArea";
|
|
425
|
+
all: "all";
|
|
426
|
+
location: "location";
|
|
427
|
+
}>>;
|
|
428
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
429
|
+
user: "user";
|
|
430
|
+
}>>;
|
|
431
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
432
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
433
|
+
readonly REJECTED: 'rejected';
|
|
434
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
435
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
436
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
437
|
+
}>]>, z.ZodString]>>>;
|
|
438
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
439
|
+
readonly REJECTED: 'rejected';
|
|
440
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
441
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
442
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
443
|
+
}>]>, z.ZodString]>>>;
|
|
444
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
445
|
+
readonly REJECTED: 'rejected';
|
|
446
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
447
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
448
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
449
|
+
}>]>, z.ZodString]>>>;
|
|
450
|
+
}, z.core.$strip>>;
|
|
451
|
+
templates: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
452
|
+
}, z.core.$strip>>;
|
|
453
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
454
|
+
type: z.ZodEnum<{
|
|
455
|
+
"record.action.accept": "record.action.accept";
|
|
456
|
+
"record.action.reject": "record.action.reject";
|
|
457
|
+
}>;
|
|
458
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
459
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
460
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
461
|
+
administrativeArea: "administrativeArea";
|
|
462
|
+
all: "all";
|
|
463
|
+
location: "location";
|
|
464
|
+
}>>;
|
|
465
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
466
|
+
user: "user";
|
|
467
|
+
}>>;
|
|
468
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
469
|
+
administrativeArea: "administrativeArea";
|
|
470
|
+
all: "all";
|
|
471
|
+
location: "location";
|
|
472
|
+
}>>;
|
|
473
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
administrativeArea: "administrativeArea";
|
|
475
|
+
all: "all";
|
|
476
|
+
location: "location";
|
|
477
|
+
}>>;
|
|
478
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
479
|
+
user: "user";
|
|
480
|
+
}>>;
|
|
481
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
482
|
+
administrativeArea: "administrativeArea";
|
|
483
|
+
all: "all";
|
|
484
|
+
location: "location";
|
|
485
|
+
}>>;
|
|
486
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
487
|
+
user: "user";
|
|
488
|
+
}>>;
|
|
489
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
490
|
+
ARCHIVED: "ARCHIVED";
|
|
491
|
+
CREATED: "CREATED";
|
|
492
|
+
DECLARED: "DECLARED";
|
|
493
|
+
NOTIFIED: "NOTIFIED";
|
|
494
|
+
REGISTERED: "REGISTERED";
|
|
495
|
+
REVOKED: "REVOKED";
|
|
496
|
+
}>>>, unknown>;
|
|
497
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
498
|
+
administrativeArea: "administrativeArea";
|
|
499
|
+
all: "all";
|
|
500
|
+
location: "location";
|
|
501
|
+
}>>;
|
|
502
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
503
|
+
user: "user";
|
|
504
|
+
}>>;
|
|
505
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
506
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
507
|
+
readonly REJECTED: 'rejected';
|
|
508
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
509
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
510
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
511
|
+
}>]>, z.ZodString]>>>;
|
|
512
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
513
|
+
readonly REJECTED: 'rejected';
|
|
514
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
515
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
516
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
517
|
+
}>]>, z.ZodString]>>>;
|
|
518
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
519
|
+
readonly REJECTED: 'rejected';
|
|
520
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
521
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
522
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
523
|
+
}>]>, z.ZodString]>>>;
|
|
524
|
+
}, z.core.$strip>>;
|
|
525
|
+
}, z.core.$strip>>;
|
|
526
|
+
}, z.core.$strip>], "type">;
|
|
527
|
+
declare const SystemScopeType: z.ZodEnum<{
|
|
528
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
529
|
+
"user.create": "user.create";
|
|
530
|
+
"user.edit": "user.edit";
|
|
531
|
+
"user.read": "user.read";
|
|
532
|
+
"user.search": "user.search";
|
|
533
|
+
}>;
|
|
534
|
+
export type SystemScopeType = z.infer<typeof SystemScopeType>;
|
|
535
|
+
declare const UserScopeType: z.ZodEnum<{
|
|
536
|
+
"user.create": "user.create";
|
|
537
|
+
"user.edit": "user.edit";
|
|
538
|
+
"user.read": "user.read";
|
|
539
|
+
"user.search": "user.search";
|
|
540
|
+
}>;
|
|
541
|
+
export type UserScopeType = z.infer<typeof UserScopeType>;
|
|
542
|
+
declare const ScopesWithRoleOption: z.ZodEnum<{
|
|
543
|
+
"user.create": "user.create";
|
|
544
|
+
"user.edit": "user.edit";
|
|
545
|
+
}>;
|
|
546
|
+
export type ScopesWithRoleOption = z.infer<typeof ScopesWithRoleOption>;
|
|
547
|
+
export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
548
|
+
type: z.ZodEnum<{
|
|
549
|
+
"user.create": "user.create";
|
|
550
|
+
"user.edit": "user.edit";
|
|
551
|
+
}>;
|
|
552
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
553
|
+
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
554
|
+
administrativeArea: "administrativeArea";
|
|
555
|
+
all: "all";
|
|
556
|
+
location: "location";
|
|
557
|
+
}>>;
|
|
558
|
+
role: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>>;
|
|
559
|
+
}, z.core.$strip>>;
|
|
560
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
561
|
+
type: z.ZodEnum<{
|
|
562
|
+
"user.read": "user.read";
|
|
563
|
+
"user.search": "user.search";
|
|
564
|
+
}>;
|
|
565
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
566
|
+
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
567
|
+
administrativeArea: "administrativeArea";
|
|
568
|
+
all: "all";
|
|
569
|
+
location: "location";
|
|
570
|
+
}>>;
|
|
571
|
+
}, z.core.$strip>>;
|
|
572
|
+
}, z.core.$strip>], "type">;
|
|
573
|
+
export type UserScopeV2 = z.infer<typeof UserScopeV2>;
|
|
574
|
+
export declare function scopeUsesRoleOptions(scope: UserScopeV2): scope is Extract<UserScopeV2, {
|
|
575
|
+
type: ScopesWithRoleOption;
|
|
576
|
+
}>;
|
|
577
|
+
export declare function scopeUsesDeclaredOptions(scope: Scope): scope is Extract<Scope, {
|
|
578
|
+
type: z.infer<typeof ScopesWithDeclaredOptions>;
|
|
579
|
+
}>;
|
|
580
|
+
export declare function scopeUsesFullOptions(scope: Scope): scope is Extract<Scope, {
|
|
581
|
+
type: z.infer<typeof ScopesWithFullOptions>;
|
|
582
|
+
}>;
|
|
583
|
+
export declare function scopeUsesPrintCertifiedCopiesOptions(scope: Scope): scope is Extract<Scope, {
|
|
584
|
+
type: 'record.print-certified-copies';
|
|
585
|
+
}>;
|
|
586
|
+
export declare function isCustomActionScope(scope: Scope): scope is Extract<Scope, {
|
|
587
|
+
type: 'record.custom-action';
|
|
588
|
+
}>;
|
|
589
|
+
export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
590
|
+
type: z.ZodEnum<{
|
|
591
|
+
"record.create": "record.create";
|
|
592
|
+
"record.declare": "record.declare";
|
|
593
|
+
"record.notify": "record.notify";
|
|
594
|
+
}>;
|
|
595
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
596
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
597
|
+
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
598
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
599
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
600
|
+
}, z.core.$strip>>;
|
|
601
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
602
|
+
type: z.ZodEnum<{
|
|
603
|
+
"record.archive": "record.archive";
|
|
604
|
+
"record.edit": "record.edit";
|
|
605
|
+
"record.register": "record.register";
|
|
606
|
+
"record.reject": "record.reject";
|
|
607
|
+
"record.unarchive": "record.unarchive";
|
|
608
|
+
}>;
|
|
609
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
610
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
611
|
+
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
612
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
613
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
614
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
615
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
616
|
+
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
617
|
+
declaredBy: z.ZodOptional<z.ZodString>;
|
|
618
|
+
}, z.core.$strip>>;
|
|
619
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
620
|
+
type: z.ZodEnum<{
|
|
621
|
+
"record.correct": "record.correct";
|
|
622
|
+
"record.read": "record.read";
|
|
623
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
624
|
+
"record.request-correction": "record.request-correction";
|
|
625
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
626
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
627
|
+
"record.search": "record.search";
|
|
628
|
+
"record.unassign-others": "record.unassign-others";
|
|
629
|
+
}>;
|
|
630
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
631
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
632
|
+
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
633
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
634
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
635
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
636
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
637
|
+
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
638
|
+
declaredBy: z.ZodOptional<z.ZodString>;
|
|
639
|
+
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
640
|
+
registeredBy: z.ZodOptional<z.ZodString>;
|
|
641
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
642
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
643
|
+
readonly REJECTED: 'rejected';
|
|
644
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
645
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
646
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
647
|
+
}>]>, z.ZodString]>>>;
|
|
648
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
649
|
+
readonly REJECTED: 'rejected';
|
|
650
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
651
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
652
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
653
|
+
}>]>, z.ZodString]>>>;
|
|
654
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
655
|
+
readonly REJECTED: 'rejected';
|
|
656
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
657
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
658
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
659
|
+
}>]>, z.ZodString]>>>;
|
|
660
|
+
}, z.core.$strip>>;
|
|
661
|
+
}, z.core.$strip>>;
|
|
662
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
663
|
+
type: z.ZodLiteral<"record.print-certified-copies">;
|
|
664
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
665
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
666
|
+
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
667
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
668
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
669
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
670
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
671
|
+
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
672
|
+
declaredBy: z.ZodOptional<z.ZodString>;
|
|
673
|
+
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
674
|
+
registeredBy: z.ZodOptional<z.ZodString>;
|
|
675
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
676
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
677
|
+
readonly REJECTED: 'rejected';
|
|
678
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
679
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
680
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
681
|
+
}>]>, z.ZodString]>>>;
|
|
682
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
683
|
+
readonly REJECTED: 'rejected';
|
|
684
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
685
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
686
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
687
|
+
}>]>, z.ZodString]>>>;
|
|
688
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
689
|
+
readonly REJECTED: 'rejected';
|
|
690
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
691
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
692
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
693
|
+
}>]>, z.ZodString]>>>;
|
|
694
|
+
}, z.core.$strip>>;
|
|
695
|
+
templates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
696
|
+
}, z.core.$strip>>;
|
|
697
|
+
}, z.core.$strip>], "type">;
|
|
698
|
+
export type RecordScopeV2 = z.infer<typeof RecordScopeV2>;
|
|
699
|
+
export type ResolvedRecordScopeV2 = z.infer<typeof ResolvedRecordScopeV2>;
|
|
700
|
+
/** The primary scope schema which gathers all scope types together. All scopes are discriminated by type and options are determined according to the type. */
|
|
701
|
+
export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
702
|
+
type: z.ZodEnum<{
|
|
703
|
+
"attachment.upload": "attachment.upload";
|
|
704
|
+
bypassratelimit: "bypassratelimit";
|
|
705
|
+
"config.update-all": "config.update-all";
|
|
706
|
+
"integration.audit.read": "integration.audit.read";
|
|
707
|
+
"integration.create": "integration.create";
|
|
708
|
+
"location.edit": "location.edit";
|
|
709
|
+
"performance.read": "performance.read";
|
|
710
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
711
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
712
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
713
|
+
"record.import": "record.import";
|
|
714
|
+
"record.reindex": "record.reindex";
|
|
715
|
+
"user.data-seeding": "user.data-seeding";
|
|
716
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
717
|
+
}>;
|
|
718
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
719
|
+
type: z.ZodEnum<{
|
|
720
|
+
"record.create": "record.create";
|
|
721
|
+
"record.declare": "record.declare";
|
|
722
|
+
"record.notify": "record.notify";
|
|
723
|
+
}>;
|
|
724
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
725
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
726
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
727
|
+
administrativeArea: "administrativeArea";
|
|
728
|
+
all: "all";
|
|
729
|
+
location: "location";
|
|
730
|
+
}>>;
|
|
731
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
732
|
+
user: "user";
|
|
733
|
+
}>>;
|
|
734
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
735
|
+
administrativeArea: "administrativeArea";
|
|
736
|
+
all: "all";
|
|
737
|
+
location: "location";
|
|
738
|
+
}>>;
|
|
739
|
+
}, z.core.$strip>>;
|
|
740
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
741
|
+
type: z.ZodEnum<{
|
|
742
|
+
"record.archive": "record.archive";
|
|
743
|
+
"record.edit": "record.edit";
|
|
744
|
+
"record.register": "record.register";
|
|
745
|
+
"record.reject": "record.reject";
|
|
746
|
+
"record.unarchive": "record.unarchive";
|
|
747
|
+
}>;
|
|
748
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
749
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
750
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
751
|
+
administrativeArea: "administrativeArea";
|
|
752
|
+
all: "all";
|
|
753
|
+
location: "location";
|
|
754
|
+
}>>;
|
|
755
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
756
|
+
user: "user";
|
|
757
|
+
}>>;
|
|
758
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
759
|
+
administrativeArea: "administrativeArea";
|
|
760
|
+
all: "all";
|
|
761
|
+
location: "location";
|
|
762
|
+
}>>;
|
|
763
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
764
|
+
administrativeArea: "administrativeArea";
|
|
765
|
+
all: "all";
|
|
766
|
+
location: "location";
|
|
767
|
+
}>>;
|
|
768
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
769
|
+
user: "user";
|
|
770
|
+
}>>;
|
|
771
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
772
|
+
administrativeArea: "administrativeArea";
|
|
773
|
+
all: "all";
|
|
774
|
+
location: "location";
|
|
775
|
+
}>>;
|
|
776
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
777
|
+
user: "user";
|
|
778
|
+
}>>;
|
|
779
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
780
|
+
ARCHIVED: "ARCHIVED";
|
|
781
|
+
CREATED: "CREATED";
|
|
782
|
+
DECLARED: "DECLARED";
|
|
783
|
+
NOTIFIED: "NOTIFIED";
|
|
784
|
+
REGISTERED: "REGISTERED";
|
|
785
|
+
REVOKED: "REVOKED";
|
|
786
|
+
}>>>, unknown>;
|
|
787
|
+
}, z.core.$strip>>;
|
|
788
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
789
|
+
type: z.ZodEnum<{
|
|
790
|
+
"record.correct": "record.correct";
|
|
791
|
+
"record.read": "record.read";
|
|
792
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
793
|
+
"record.request-correction": "record.request-correction";
|
|
794
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
795
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
796
|
+
"record.search": "record.search";
|
|
797
|
+
"record.unassign-others": "record.unassign-others";
|
|
798
|
+
}>;
|
|
799
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
800
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
801
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
802
|
+
administrativeArea: "administrativeArea";
|
|
803
|
+
all: "all";
|
|
804
|
+
location: "location";
|
|
805
|
+
}>>;
|
|
806
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
807
|
+
user: "user";
|
|
808
|
+
}>>;
|
|
809
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
810
|
+
administrativeArea: "administrativeArea";
|
|
811
|
+
all: "all";
|
|
812
|
+
location: "location";
|
|
813
|
+
}>>;
|
|
814
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
815
|
+
administrativeArea: "administrativeArea";
|
|
816
|
+
all: "all";
|
|
817
|
+
location: "location";
|
|
818
|
+
}>>;
|
|
819
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
820
|
+
user: "user";
|
|
821
|
+
}>>;
|
|
822
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
823
|
+
administrativeArea: "administrativeArea";
|
|
824
|
+
all: "all";
|
|
825
|
+
location: "location";
|
|
826
|
+
}>>;
|
|
827
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
828
|
+
user: "user";
|
|
829
|
+
}>>;
|
|
830
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
831
|
+
ARCHIVED: "ARCHIVED";
|
|
832
|
+
CREATED: "CREATED";
|
|
833
|
+
DECLARED: "DECLARED";
|
|
834
|
+
NOTIFIED: "NOTIFIED";
|
|
835
|
+
REGISTERED: "REGISTERED";
|
|
836
|
+
REVOKED: "REVOKED";
|
|
837
|
+
}>>>, unknown>;
|
|
838
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
839
|
+
administrativeArea: "administrativeArea";
|
|
840
|
+
all: "all";
|
|
841
|
+
location: "location";
|
|
842
|
+
}>>;
|
|
843
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
844
|
+
user: "user";
|
|
845
|
+
}>>;
|
|
846
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
847
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
848
|
+
readonly REJECTED: 'rejected';
|
|
849
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
850
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
851
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
852
|
+
}>]>, z.ZodString]>>>;
|
|
853
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
854
|
+
readonly REJECTED: 'rejected';
|
|
855
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
856
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
857
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
858
|
+
}>]>, z.ZodString]>>>;
|
|
859
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
860
|
+
readonly REJECTED: 'rejected';
|
|
861
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
862
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
863
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
864
|
+
}>]>, z.ZodString]>>>;
|
|
865
|
+
}, z.core.$strip>>;
|
|
866
|
+
}, z.core.$strip>>;
|
|
867
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
868
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
869
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
870
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
871
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
872
|
+
administrativeArea: "administrativeArea";
|
|
873
|
+
all: "all";
|
|
874
|
+
location: "location";
|
|
875
|
+
}>>;
|
|
876
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
877
|
+
user: "user";
|
|
878
|
+
}>>;
|
|
879
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
880
|
+
administrativeArea: "administrativeArea";
|
|
881
|
+
all: "all";
|
|
882
|
+
location: "location";
|
|
883
|
+
}>>;
|
|
884
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
885
|
+
administrativeArea: "administrativeArea";
|
|
886
|
+
all: "all";
|
|
887
|
+
location: "location";
|
|
888
|
+
}>>;
|
|
889
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
890
|
+
user: "user";
|
|
891
|
+
}>>;
|
|
892
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
893
|
+
administrativeArea: "administrativeArea";
|
|
894
|
+
all: "all";
|
|
895
|
+
location: "location";
|
|
896
|
+
}>>;
|
|
897
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
898
|
+
user: "user";
|
|
899
|
+
}>>;
|
|
900
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
901
|
+
ARCHIVED: "ARCHIVED";
|
|
902
|
+
CREATED: "CREATED";
|
|
903
|
+
DECLARED: "DECLARED";
|
|
904
|
+
NOTIFIED: "NOTIFIED";
|
|
905
|
+
REGISTERED: "REGISTERED";
|
|
906
|
+
REVOKED: "REVOKED";
|
|
907
|
+
}>>>, unknown>;
|
|
908
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
909
|
+
administrativeArea: "administrativeArea";
|
|
910
|
+
all: "all";
|
|
911
|
+
location: "location";
|
|
912
|
+
}>>;
|
|
913
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
914
|
+
user: "user";
|
|
915
|
+
}>>;
|
|
916
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
917
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
918
|
+
readonly REJECTED: 'rejected';
|
|
919
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
920
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
921
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
922
|
+
}>]>, z.ZodString]>>>;
|
|
923
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
924
|
+
readonly REJECTED: 'rejected';
|
|
925
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
926
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
927
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
928
|
+
}>]>, z.ZodString]>>>;
|
|
929
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
930
|
+
readonly REJECTED: 'rejected';
|
|
931
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
932
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
933
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
934
|
+
}>]>, z.ZodString]>>>;
|
|
935
|
+
}, z.core.$strip>>;
|
|
936
|
+
customActionTypes: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
937
|
+
}, z.core.$strip>>;
|
|
938
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
939
|
+
type: z.ZodLiteral<"record.print-certified-copies">;
|
|
940
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
941
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
942
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
943
|
+
administrativeArea: "administrativeArea";
|
|
944
|
+
all: "all";
|
|
945
|
+
location: "location";
|
|
946
|
+
}>>;
|
|
947
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
948
|
+
user: "user";
|
|
949
|
+
}>>;
|
|
950
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
951
|
+
administrativeArea: "administrativeArea";
|
|
952
|
+
all: "all";
|
|
953
|
+
location: "location";
|
|
954
|
+
}>>;
|
|
955
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
956
|
+
administrativeArea: "administrativeArea";
|
|
957
|
+
all: "all";
|
|
958
|
+
location: "location";
|
|
959
|
+
}>>;
|
|
960
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
961
|
+
user: "user";
|
|
962
|
+
}>>;
|
|
963
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
964
|
+
administrativeArea: "administrativeArea";
|
|
965
|
+
all: "all";
|
|
966
|
+
location: "location";
|
|
967
|
+
}>>;
|
|
968
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
969
|
+
user: "user";
|
|
970
|
+
}>>;
|
|
971
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
972
|
+
ARCHIVED: "ARCHIVED";
|
|
973
|
+
CREATED: "CREATED";
|
|
974
|
+
DECLARED: "DECLARED";
|
|
975
|
+
NOTIFIED: "NOTIFIED";
|
|
976
|
+
REGISTERED: "REGISTERED";
|
|
977
|
+
REVOKED: "REVOKED";
|
|
978
|
+
}>>>, unknown>;
|
|
979
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
980
|
+
administrativeArea: "administrativeArea";
|
|
981
|
+
all: "all";
|
|
982
|
+
location: "location";
|
|
983
|
+
}>>;
|
|
984
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
985
|
+
user: "user";
|
|
986
|
+
}>>;
|
|
987
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
988
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
989
|
+
readonly REJECTED: 'rejected';
|
|
990
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
991
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
992
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
993
|
+
}>]>, z.ZodString]>>>;
|
|
994
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
995
|
+
readonly REJECTED: 'rejected';
|
|
996
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
997
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
998
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
999
|
+
}>]>, z.ZodString]>>>;
|
|
1000
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1001
|
+
readonly REJECTED: 'rejected';
|
|
1002
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1003
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1004
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1005
|
+
}>]>, z.ZodString]>>>;
|
|
1006
|
+
}, z.core.$strip>>;
|
|
1007
|
+
templates: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
1008
|
+
}, z.core.$strip>>;
|
|
1009
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1010
|
+
type: z.ZodEnum<{
|
|
1011
|
+
"record.action.accept": "record.action.accept";
|
|
1012
|
+
"record.action.reject": "record.action.reject";
|
|
1013
|
+
}>;
|
|
1014
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1015
|
+
event: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
|
|
1016
|
+
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
1017
|
+
administrativeArea: "administrativeArea";
|
|
1018
|
+
all: "all";
|
|
1019
|
+
location: "location";
|
|
1020
|
+
}>>;
|
|
1021
|
+
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
1022
|
+
user: "user";
|
|
1023
|
+
}>>;
|
|
1024
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
1025
|
+
administrativeArea: "administrativeArea";
|
|
1026
|
+
all: "all";
|
|
1027
|
+
location: "location";
|
|
1028
|
+
}>>;
|
|
1029
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
1030
|
+
administrativeArea: "administrativeArea";
|
|
1031
|
+
all: "all";
|
|
1032
|
+
location: "location";
|
|
1033
|
+
}>>;
|
|
1034
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
1035
|
+
user: "user";
|
|
1036
|
+
}>>;
|
|
1037
|
+
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
1038
|
+
administrativeArea: "administrativeArea";
|
|
1039
|
+
all: "all";
|
|
1040
|
+
location: "location";
|
|
1041
|
+
}>>;
|
|
1042
|
+
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
1043
|
+
user: "user";
|
|
1044
|
+
}>>;
|
|
1045
|
+
status: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1046
|
+
ARCHIVED: "ARCHIVED";
|
|
1047
|
+
CREATED: "CREATED";
|
|
1048
|
+
DECLARED: "DECLARED";
|
|
1049
|
+
NOTIFIED: "NOTIFIED";
|
|
1050
|
+
REGISTERED: "REGISTERED";
|
|
1051
|
+
REVOKED: "REVOKED";
|
|
1052
|
+
}>>>, unknown>;
|
|
1053
|
+
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
1054
|
+
administrativeArea: "administrativeArea";
|
|
1055
|
+
all: "all";
|
|
1056
|
+
location: "location";
|
|
1057
|
+
}>>;
|
|
1058
|
+
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
1059
|
+
user: "user";
|
|
1060
|
+
}>>;
|
|
1061
|
+
flags: z.ZodOptional<z.ZodObject<{
|
|
1062
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1063
|
+
readonly REJECTED: 'rejected';
|
|
1064
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1065
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1066
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1067
|
+
}>]>, z.ZodString]>>>;
|
|
1068
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1069
|
+
readonly REJECTED: 'rejected';
|
|
1070
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1071
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1072
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1073
|
+
}>]>, z.ZodString]>>>;
|
|
1074
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1075
|
+
readonly REJECTED: 'rejected';
|
|
1076
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1077
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1078
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1079
|
+
}>]>, z.ZodString]>>>;
|
|
1080
|
+
}, z.core.$strip>>;
|
|
1081
|
+
}, z.core.$strip>>;
|
|
1082
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1083
|
+
type: z.ZodEnum<{
|
|
1084
|
+
"user.create": "user.create";
|
|
1085
|
+
"user.edit": "user.edit";
|
|
1086
|
+
}>;
|
|
1087
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1088
|
+
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
1089
|
+
administrativeArea: "administrativeArea";
|
|
1090
|
+
all: "all";
|
|
1091
|
+
location: "location";
|
|
1092
|
+
}>>;
|
|
1093
|
+
role: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>>;
|
|
1094
|
+
}, z.core.$strip>>;
|
|
1095
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1096
|
+
type: z.ZodEnum<{
|
|
1097
|
+
"user.read": "user.read";
|
|
1098
|
+
"user.search": "user.search";
|
|
1099
|
+
}>;
|
|
1100
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1101
|
+
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
1102
|
+
administrativeArea: "administrativeArea";
|
|
1103
|
+
all: "all";
|
|
1104
|
+
location: "location";
|
|
1105
|
+
}>>;
|
|
1106
|
+
}, z.core.$strip>>;
|
|
1107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1108
|
+
type: z.ZodLiteral<"organisation.read-locations">;
|
|
1109
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1110
|
+
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
1111
|
+
administrativeArea: "administrativeArea";
|
|
1112
|
+
all: "all";
|
|
1113
|
+
location: "location";
|
|
1114
|
+
}>>;
|
|
1115
|
+
}, z.core.$strip>>;
|
|
1116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1117
|
+
type: z.ZodLiteral<"workqueue">;
|
|
1118
|
+
options: z.ZodObject<{
|
|
1119
|
+
ids: z.ZodPreprocess<z.ZodArray<z.ZodString>, unknown>;
|
|
1120
|
+
}, z.core.$strip>;
|
|
1121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1122
|
+
type: z.ZodLiteral<"dashboard.view">;
|
|
1123
|
+
options: z.ZodObject<{
|
|
1124
|
+
ids: z.ZodPreprocess<z.ZodArray<z.ZodString>, unknown>;
|
|
1125
|
+
}, z.core.$strip>;
|
|
1126
|
+
}, z.core.$strip>], "type">;
|
|
1127
|
+
export type Scope = z.infer<typeof Scope>;
|
|
1128
|
+
export declare const ScopeType: z.ZodEnum<{
|
|
1129
|
+
"attachment.upload": "attachment.upload";
|
|
1130
|
+
bypassratelimit: "bypassratelimit";
|
|
1131
|
+
"config.update-all": "config.update-all";
|
|
1132
|
+
"dashboard.view": "dashboard.view";
|
|
1133
|
+
"integration.audit.read": "integration.audit.read";
|
|
1134
|
+
"integration.create": "integration.create";
|
|
1135
|
+
"location.edit": "location.edit";
|
|
1136
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
1137
|
+
"performance.read": "performance.read";
|
|
1138
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
1139
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
1140
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
1141
|
+
"record.action.accept": "record.action.accept";
|
|
1142
|
+
"record.action.reject": "record.action.reject";
|
|
1143
|
+
"record.archive": "record.archive";
|
|
1144
|
+
"record.correct": "record.correct";
|
|
1145
|
+
"record.create": "record.create";
|
|
1146
|
+
"record.custom-action": "record.custom-action";
|
|
1147
|
+
"record.declare": "record.declare";
|
|
1148
|
+
"record.edit": "record.edit";
|
|
1149
|
+
"record.import": "record.import";
|
|
1150
|
+
"record.notify": "record.notify";
|
|
1151
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
1152
|
+
"record.read": "record.read";
|
|
1153
|
+
"record.register": "record.register";
|
|
1154
|
+
"record.reindex": "record.reindex";
|
|
1155
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
1156
|
+
"record.reject": "record.reject";
|
|
1157
|
+
"record.request-correction": "record.request-correction";
|
|
1158
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
1159
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
1160
|
+
"record.search": "record.search";
|
|
1161
|
+
"record.unarchive": "record.unarchive";
|
|
1162
|
+
"record.unassign-others": "record.unassign-others";
|
|
1163
|
+
"user.create": "user.create";
|
|
1164
|
+
"user.data-seeding": "user.data-seeding";
|
|
1165
|
+
"user.edit": "user.edit";
|
|
1166
|
+
"user.read": "user.read";
|
|
1167
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
1168
|
+
"user.search": "user.search";
|
|
1169
|
+
workqueue: "workqueue";
|
|
1170
|
+
}>;
|
|
1171
|
+
export type ScopeType = z.infer<typeof ScopeType>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Branded encoded scope string, in query string format.
|
|
1174
|
+
*
|
|
1175
|
+
*/
|
|
1176
|
+
export declare const EncodedScope: z.core.$ZodBranded<z.ZodString, "EncodedScope", "out">;
|
|
1177
|
+
export type EncodedScope = z.infer<typeof EncodedScope>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Encodes a scope object into an EncodedScope branded query string.
|
|
1180
|
+
*
|
|
1181
|
+
*
|
|
1182
|
+
* @param scope - The scope object to encode.
|
|
1183
|
+
* @returns The encoded scope as a branded string (`EncodedScope`).
|
|
1184
|
+
*/
|
|
1185
|
+
export declare const encodeScope: (scope: Scope) => EncodedScope;
|
|
1186
|
+
/**
|
|
1187
|
+
* Converts an encoded scope string into a scope object.
|
|
1188
|
+
*
|
|
1189
|
+
* @param scope - The encoded scope string to decode.
|
|
1190
|
+
* @returns The decoded scope object.
|
|
1191
|
+
*/
|
|
1192
|
+
export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
1193
|
+
type: "user.create" | "user.edit";
|
|
1194
|
+
options?: {
|
|
1195
|
+
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
1196
|
+
role?: string[] | undefined;
|
|
1197
|
+
} | undefined;
|
|
1198
|
+
} | {
|
|
1199
|
+
type: "user.read" | "user.search";
|
|
1200
|
+
options?: {
|
|
1201
|
+
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
1202
|
+
} | undefined;
|
|
1203
|
+
} | {
|
|
1204
|
+
type: "record.create" | "record.declare" | "record.notify";
|
|
1205
|
+
options?: {
|
|
1206
|
+
event?: string[] | undefined;
|
|
1207
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
1208
|
+
createdBy?: "user" | undefined;
|
|
1209
|
+
createdIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1210
|
+
} | undefined;
|
|
1211
|
+
} | {
|
|
1212
|
+
type: "record.archive" | "record.edit" | "record.register" | "record.reject" | "record.unarchive";
|
|
1213
|
+
options?: {
|
|
1214
|
+
event?: string[] | undefined;
|
|
1215
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
1216
|
+
createdBy?: "user" | undefined;
|
|
1217
|
+
createdIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1218
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1219
|
+
notifiedBy?: "user" | undefined;
|
|
1220
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1221
|
+
declaredBy?: "user" | undefined;
|
|
1222
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1223
|
+
} | undefined;
|
|
1224
|
+
} | {
|
|
1225
|
+
type: "record.correct" | "record.read" | "record.reinstate-registration" | "record.request-correction" | "record.review-duplicates" | "record.revoke-registration" | "record.search" | "record.unassign-others";
|
|
1226
|
+
options?: {
|
|
1227
|
+
event?: string[] | undefined;
|
|
1228
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
1229
|
+
createdBy?: "user" | undefined;
|
|
1230
|
+
createdIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1231
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1232
|
+
notifiedBy?: "user" | undefined;
|
|
1233
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1234
|
+
declaredBy?: "user" | undefined;
|
|
1235
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1236
|
+
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1237
|
+
registeredBy?: "user" | undefined;
|
|
1238
|
+
flags?: {
|
|
1239
|
+
anyOf?: string[] | undefined;
|
|
1240
|
+
noneOf?: string[] | undefined;
|
|
1241
|
+
allOf?: string[] | undefined;
|
|
1242
|
+
} | undefined;
|
|
1243
|
+
} | undefined;
|
|
1244
|
+
} | {
|
|
1245
|
+
type: "record.custom-action";
|
|
1246
|
+
options?: {
|
|
1247
|
+
event?: string[] | undefined;
|
|
1248
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
1249
|
+
createdBy?: "user" | undefined;
|
|
1250
|
+
createdIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1251
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1252
|
+
notifiedBy?: "user" | undefined;
|
|
1253
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1254
|
+
declaredBy?: "user" | undefined;
|
|
1255
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1256
|
+
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1257
|
+
registeredBy?: "user" | undefined;
|
|
1258
|
+
flags?: {
|
|
1259
|
+
anyOf?: string[] | undefined;
|
|
1260
|
+
noneOf?: string[] | undefined;
|
|
1261
|
+
allOf?: string[] | undefined;
|
|
1262
|
+
} | undefined;
|
|
1263
|
+
customActionTypes?: string[] | undefined;
|
|
1264
|
+
} | undefined;
|
|
1265
|
+
} | {
|
|
1266
|
+
type: "record.print-certified-copies";
|
|
1267
|
+
options?: {
|
|
1268
|
+
event?: string[] | undefined;
|
|
1269
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
1270
|
+
createdBy?: "user" | undefined;
|
|
1271
|
+
createdIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1272
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1273
|
+
notifiedBy?: "user" | undefined;
|
|
1274
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1275
|
+
declaredBy?: "user" | undefined;
|
|
1276
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1277
|
+
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1278
|
+
registeredBy?: "user" | undefined;
|
|
1279
|
+
flags?: {
|
|
1280
|
+
anyOf?: string[] | undefined;
|
|
1281
|
+
noneOf?: string[] | undefined;
|
|
1282
|
+
allOf?: string[] | undefined;
|
|
1283
|
+
} | undefined;
|
|
1284
|
+
templates?: string[] | undefined;
|
|
1285
|
+
} | undefined;
|
|
1286
|
+
} | {
|
|
1287
|
+
type: "record.action.accept" | "record.action.reject";
|
|
1288
|
+
options?: {
|
|
1289
|
+
event?: string[] | undefined;
|
|
1290
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
1291
|
+
createdBy?: "user" | undefined;
|
|
1292
|
+
createdIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1293
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1294
|
+
notifiedBy?: "user" | undefined;
|
|
1295
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1296
|
+
declaredBy?: "user" | undefined;
|
|
1297
|
+
status?: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[] | undefined;
|
|
1298
|
+
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
1299
|
+
registeredBy?: "user" | undefined;
|
|
1300
|
+
flags?: {
|
|
1301
|
+
anyOf?: string[] | undefined;
|
|
1302
|
+
noneOf?: string[] | undefined;
|
|
1303
|
+
allOf?: string[] | undefined;
|
|
1304
|
+
} | undefined;
|
|
1305
|
+
} | undefined;
|
|
1306
|
+
} | {
|
|
1307
|
+
type: "attachment.upload" | "bypassratelimit" | "config.update-all" | "integration.audit.read" | "integration.create" | "location.edit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.import" | "record.reindex" | "user.data-seeding" | "user.read-only-my-audit";
|
|
1308
|
+
} | {
|
|
1309
|
+
type: "organisation.read-locations";
|
|
1310
|
+
options?: {
|
|
1311
|
+
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
1312
|
+
} | undefined;
|
|
1313
|
+
} | {
|
|
1314
|
+
type: "workqueue";
|
|
1315
|
+
options: {
|
|
1316
|
+
ids: string[];
|
|
1317
|
+
};
|
|
1318
|
+
} | {
|
|
1319
|
+
type: "dashboard.view";
|
|
1320
|
+
options: {
|
|
1321
|
+
ids: string[];
|
|
1322
|
+
};
|
|
1323
|
+
} | undefined;
|
|
1324
|
+
/**
|
|
1325
|
+
* Function to get the value of a scope option (aka. scope attribute)
|
|
1326
|
+
*
|
|
1327
|
+
* @param scope - The scope to get the value of the option from.
|
|
1328
|
+
* @param option - The option to get the value of.
|
|
1329
|
+
* @returns The value of the scope option. Will return the default value if the option is not set.
|
|
1330
|
+
*/
|
|
1331
|
+
export declare function getScopeOptionValue<T extends ScopeOptionKey>(scope: Scope, option: T): AllScopeOptions[T] | undefined;
|
|
1332
|
+
export declare function getAcceptedScopesByType({ acceptedScopes, scopes }: {
|
|
1333
|
+
acceptedScopes: ScopeType[];
|
|
1334
|
+
scopes: EncodedScope[];
|
|
1335
|
+
}): Scope[];
|
|
1336
|
+
/**
|
|
1337
|
+
* Checks if the provided scopes or token contain any of the accepted scopes.
|
|
1338
|
+
*
|
|
1339
|
+
* Overloads:
|
|
1340
|
+
* - `hasAnyScope(token, scopes)` → extracts scopes from a token
|
|
1341
|
+
* - `hasAnyScope(scopes, scopes)` → checks directly from a scope array
|
|
1342
|
+
*/
|
|
1343
|
+
/**
|
|
1344
|
+
* Checks if the provided token contains any of the accepted scopes.
|
|
1345
|
+
*
|
|
1346
|
+
* @param {string} token - The authentication JWT token.
|
|
1347
|
+
* @param {ScopeType[]} scopes - An array of scope types to check for.
|
|
1348
|
+
* @returns {boolean} True if the token contains at least one of the accepted scopes, false otherwise.
|
|
1349
|
+
*/
|
|
1350
|
+
export declare function hasAnyScope(token: string, scopes: ScopeType[]): boolean;
|
|
1351
|
+
/**
|
|
1352
|
+
* Checks if the provided array of scopes contains any of the accepted scopes.
|
|
1353
|
+
*
|
|
1354
|
+
* @param {EncodedScope[]} userScopes - Array of scopes to check.
|
|
1355
|
+
* @param {ScopeType[]} scopes - An array of scope types to check for.
|
|
1356
|
+
* @returns {boolean} True if the scope list contains at least one of the accepted scopes.
|
|
1357
|
+
*/
|
|
1358
|
+
export declare function hasAnyScope(userScopes: EncodedScope[], scopes: ScopeType[]): boolean;
|
|
1359
|
+
/**
|
|
1360
|
+
* Checks whether a scope exists either inside a JWT token or
|
|
1361
|
+
* within a provided list of scopes.
|
|
1362
|
+
*
|
|
1363
|
+
* Overloads:
|
|
1364
|
+
* - `hasScope(token, scope)` → extracts scopes from a token
|
|
1365
|
+
* - `hasScope(scopes, scope)` → checks directly from a scope array
|
|
1366
|
+
*/
|
|
1367
|
+
/**
|
|
1368
|
+
* Checks if the provided token contains the given scope.
|
|
1369
|
+
*
|
|
1370
|
+
* @param token - The authentication JWT token.
|
|
1371
|
+
* @param scope - The scope type to check for.
|
|
1372
|
+
* @returns True if the token contains the specified scope.
|
|
1373
|
+
*/
|
|
1374
|
+
export declare function hasScope(token: string, scope: ScopeType): boolean;
|
|
1375
|
+
/**
|
|
1376
|
+
* Checks if the provided list of scopes contains the given scope.
|
|
1377
|
+
*
|
|
1378
|
+
* @param scopes - Array of scopes to check.
|
|
1379
|
+
* @param scope - The scope type to check for.
|
|
1380
|
+
* @returns True if the scope list contains the specified scope.
|
|
1381
|
+
*/
|
|
1382
|
+
export declare function hasScope(scopes: EncodedScope[], scope: ScopeType): boolean;
|
|
1383
|
+
/**
|
|
1384
|
+
* Checks if the user has the scope to perform an action on an event of a certain type.
|
|
1385
|
+
*
|
|
1386
|
+
* @param {Scope[]} userScopes - The scopes of the user.
|
|
1387
|
+
* @param {string} eventType - The event type to check for permission.
|
|
1388
|
+
* @param {ScopeType[]} acceptedScopes - The scopes to check for permission.
|
|
1389
|
+
* @returns {boolean} Returns true if the user has the scope to perform an action on an event of a certain type.
|
|
1390
|
+
*/
|
|
1391
|
+
export declare function hasScopeForEventType(userScopes: EncodedScope[], eventType: string, acceptedScope: ScopeType): boolean;
|
|
1392
|
+
export declare function canUserCreateEvent(userScopes: EncodedScope[], eventType: string): boolean;
|
|
1393
|
+
export declare function canUserNotifyEvent(userScopes: EncodedScope[], eventType: string): boolean;
|
|
1394
|
+
/**
|
|
1395
|
+
* Helper for defining scopes for user roles. Should be used in country config.
|
|
1396
|
+
*
|
|
1397
|
+
* @param scopes Array of scopes in object format.
|
|
1398
|
+
* @returns Array of scopes in string format, encoded for use in JWT tokens.
|
|
1399
|
+
*/
|
|
1400
|
+
export declare function defineScopes(scopes: Scope[]): (string & z.$brand<"EncodedScope">)[];
|
|
1401
|
+
export {};
|
|
1402
|
+
//# sourceMappingURL=scopes.d.ts.map
|