@opencrvs/toolkit 1.9.6-rc.9d5857c → 1.9.6-rc.9e4e1dc
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/dist/commons/api/router.d.ts +29384 -2317
- package/dist/commons/conditionals/conditionals.d.ts +10 -1
- package/dist/commons/conditionals/validate.d.ts +11 -4
- package/dist/commons/events/ActionConfig.d.ts +24973 -1552
- package/dist/commons/events/ActionDocument.d.ts +803 -1856
- package/dist/commons/events/ActionInput.d.ts +277 -1073
- package/dist/commons/events/ActionType.d.ts +86 -9
- package/dist/commons/events/AdvancedSearchConfig.d.ts +228 -1238
- package/dist/commons/events/CompositeFieldValue.d.ts +29 -190
- package/dist/commons/events/Conditional.d.ts +26 -38
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +1195 -4223
- package/dist/commons/events/CreatedAtLocation.d.ts +1 -1
- package/dist/commons/events/DeduplicationConfig.d.ts +15 -150
- package/dist/commons/events/Draft.d.ts +70 -105
- package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
- package/dist/commons/events/EventConfig.d.ts +19932 -2120
- package/dist/commons/events/EventConfigInput.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +320 -1332
- package/dist/commons/events/EventIndex.d.ts +193 -980
- package/dist/commons/events/EventInput.d.ts +2 -8
- package/dist/commons/events/EventMetadata.d.ts +106 -347
- package/dist/commons/events/FieldConfig.d.ts +4522 -12301
- package/dist/commons/events/FieldType.d.ts +20 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +193 -897
- package/dist/commons/events/FieldValue.d.ts +87 -396
- package/dist/commons/events/Flag.d.ts +67 -0
- package/dist/commons/events/FormConfig.d.ts +13980 -721
- package/dist/commons/events/PageConfig.d.ts +9340 -319
- package/dist/commons/events/SummaryConfig.d.ts +14 -161
- package/dist/commons/events/TemplateConfig.d.ts +2 -3
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
- package/dist/commons/events/WorkqueueConfig.d.ts +1867 -7176
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +26563 -147
- package/dist/commons/events/eventConfigValidation.d.ts +8 -0
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locations.d.ts +26 -19
- package/dist/commons/events/scopes.d.ts +5 -4
- package/dist/commons/events/state/availableActions.d.ts +0 -2
- package/dist/commons/events/state/flags.d.ts +21 -3
- package/dist/commons/events/state/index.d.ts +23 -19
- package/dist/commons/events/state/utils.d.ts +130 -112
- package/dist/commons/events/test.utils.d.ts +17 -8
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +53164 -367
- package/dist/commons/notification/UserNotifications.d.ts +55 -636
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +45 -11
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +1985 -1706
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1650 -1566
- package/dist/scopes/index.d.ts +193 -129
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +141 -95
- package/package.json +5 -5
package/dist/scopes/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
2
|
import { SearchScopeAccessLevels } from './events';
|
|
3
3
|
export declare const SCOPES: {
|
|
4
4
|
readonly BYPASSRATELIMIT: "bypassratelimit";
|
|
@@ -62,168 +62,206 @@ export declare const SCOPES: {
|
|
|
62
62
|
readonly CONFIG_UPDATE_ALL: "config.update:all";
|
|
63
63
|
readonly USER_DATA_SEEDING: "user.data-seeding";
|
|
64
64
|
};
|
|
65
|
-
|
|
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">]>]>;
|
|
65
|
+
declare const LiteralScopes: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<readonly [z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<readonly [z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<readonly [z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<readonly [z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<readonly [z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>, z.ZodLiteral<"record.read">, z.ZodLiteral<"profile.electronic-signature">, z.ZodUnion<readonly [z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<readonly [z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<readonly [z.ZodLiteral<"user.read:all">, z.ZodLiteral<"user.read:my-office">, z.ZodLiteral<"user.read:my-jurisdiction">, z.ZodLiteral<"user.read:only-my-audit">, z.ZodLiteral<"user.create:all">, z.ZodLiteral<"user.create:my-jurisdiction">, z.ZodLiteral<"user.update:all">, z.ZodLiteral<"user.update:my-jurisdiction">]>, z.ZodLiteral<"config.update:all">, z.ZodLiteral<"user.data-seeding">, z.ZodUnion<readonly [z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>]>;
|
|
67
66
|
declare const SearchScope: z.ZodObject<{
|
|
68
67
|
type: z.ZodLiteral<"search">;
|
|
69
68
|
options: z.ZodObject<{
|
|
70
|
-
event: z.ZodArray<z.ZodString
|
|
71
|
-
access: z.ZodArray<z.ZodEnum<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
access: ("my-jurisdiction" | "all")[];
|
|
84
|
-
};
|
|
85
|
-
}, {
|
|
86
|
-
type: "search";
|
|
87
|
-
options: {
|
|
88
|
-
event: string[];
|
|
89
|
-
access: ("my-jurisdiction" | "all")[];
|
|
90
|
-
};
|
|
91
|
-
}>;
|
|
69
|
+
event: z.ZodArray<z.ZodString>;
|
|
70
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
71
|
+
"my-jurisdiction": "my-jurisdiction";
|
|
72
|
+
all: "all";
|
|
73
|
+
}>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export declare const DashboardScope: z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"dashboard.view">;
|
|
78
|
+
options: z.ZodObject<{
|
|
79
|
+
id: z.ZodArray<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>;
|
|
92
82
|
export type SearchScope = z.infer<typeof SearchScope>;
|
|
93
|
-
export declare const RecordScopeType: z.ZodEnum<
|
|
83
|
+
export declare const RecordScopeType: z.ZodEnum<{
|
|
84
|
+
"record.unassign-others": "record.unassign-others";
|
|
85
|
+
"record.register": "record.register";
|
|
86
|
+
"record.read": "record.read";
|
|
87
|
+
"record.create": "record.create";
|
|
88
|
+
"record.declare": "record.declare";
|
|
89
|
+
"record.notify": "record.notify";
|
|
90
|
+
"record.declared.edit": "record.declared.edit";
|
|
91
|
+
"record.declared.reject": "record.declared.reject";
|
|
92
|
+
"record.declared.archive": "record.declared.archive";
|
|
93
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
94
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
95
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
96
|
+
"record.registered.correct": "record.registered.correct";
|
|
97
|
+
}>;
|
|
94
98
|
export type RecordScopeType = z.infer<typeof RecordScopeType>;
|
|
95
99
|
export declare const RecordScope: z.ZodObject<{
|
|
96
|
-
type: z.ZodEnum<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
type: z.ZodEnum<{
|
|
101
|
+
"record.unassign-others": "record.unassign-others";
|
|
102
|
+
"record.register": "record.register";
|
|
103
|
+
"record.read": "record.read";
|
|
104
|
+
"record.create": "record.create";
|
|
105
|
+
"record.declare": "record.declare";
|
|
106
|
+
"record.notify": "record.notify";
|
|
107
|
+
"record.declared.edit": "record.declared.edit";
|
|
108
|
+
"record.declared.reject": "record.declared.reject";
|
|
109
|
+
"record.declared.archive": "record.declared.archive";
|
|
110
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
111
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
112
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
113
|
+
"record.registered.correct": "record.registered.correct";
|
|
103
114
|
}>;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
};
|
|
109
|
-
}, {
|
|
110
|
-
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.print-certified-copies" | "record.registered.request-correction" | "record.registered.correct";
|
|
111
|
-
options: {
|
|
112
|
-
event: string[];
|
|
113
|
-
};
|
|
114
|
-
}>;
|
|
115
|
+
options: z.ZodObject<{
|
|
116
|
+
event: z.ZodArray<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
}, z.core.$strip>;
|
|
115
119
|
export type RecordScope = z.infer<typeof RecordScope>;
|
|
116
|
-
declare const
|
|
120
|
+
export declare const CustomActionScope: z.ZodObject<{
|
|
121
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
122
|
+
options: z.ZodObject<{
|
|
123
|
+
event: z.ZodArray<z.ZodString>;
|
|
124
|
+
customActionType: z.ZodArray<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
export type CustomActionScope = z.infer<typeof CustomActionScope>;
|
|
128
|
+
declare const ConfigurableRawScopes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
117
129
|
type: z.ZodLiteral<"search">;
|
|
118
130
|
options: z.ZodObject<{
|
|
119
|
-
event: z.ZodArray<z.ZodString
|
|
120
|
-
access: z.ZodArray<z.ZodEnum<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
access: ("my-jurisdiction" | "all")[];
|
|
127
|
-
}>;
|
|
128
|
-
}, "strip", z.ZodTypeAny, {
|
|
129
|
-
type: "search";
|
|
130
|
-
options: {
|
|
131
|
-
event: string[];
|
|
132
|
-
access: ("my-jurisdiction" | "all")[];
|
|
133
|
-
};
|
|
134
|
-
}, {
|
|
135
|
-
type: "search";
|
|
136
|
-
options: {
|
|
137
|
-
event: string[];
|
|
138
|
-
access: ("my-jurisdiction" | "all")[];
|
|
139
|
-
};
|
|
140
|
-
}>, z.ZodObject<{
|
|
131
|
+
event: z.ZodArray<z.ZodString>;
|
|
132
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
133
|
+
"my-jurisdiction": "my-jurisdiction";
|
|
134
|
+
all: "all";
|
|
135
|
+
}>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
138
|
type: z.ZodLiteral<"user.create">;
|
|
142
139
|
options: z.ZodObject<{
|
|
143
|
-
role: z.ZodArray<z.ZodString
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
}, {
|
|
147
|
-
role: string[];
|
|
148
|
-
}>;
|
|
149
|
-
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
type: "user.create";
|
|
151
|
-
options: {
|
|
152
|
-
role: string[];
|
|
153
|
-
};
|
|
154
|
-
}, {
|
|
155
|
-
type: "user.create";
|
|
156
|
-
options: {
|
|
157
|
-
role: string[];
|
|
158
|
-
};
|
|
159
|
-
}>, z.ZodObject<{
|
|
140
|
+
role: z.ZodArray<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
143
|
type: z.ZodLiteral<"user.edit">;
|
|
161
144
|
options: z.ZodObject<{
|
|
162
|
-
role: z.ZodArray<z.ZodString
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
145
|
+
role: z.ZodArray<z.ZodString>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
148
|
+
type: z.ZodLiteral<"workqueue">;
|
|
149
|
+
options: z.ZodObject<{
|
|
150
|
+
id: z.ZodArray<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
153
|
+
type: z.ZodLiteral<"dashboard.view">;
|
|
154
|
+
options: z.ZodObject<{
|
|
155
|
+
id: z.ZodArray<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
+
type: z.ZodEnum<{
|
|
159
|
+
"record.unassign-others": "record.unassign-others";
|
|
160
|
+
"record.register": "record.register";
|
|
161
|
+
"record.read": "record.read";
|
|
162
|
+
"record.create": "record.create";
|
|
163
|
+
"record.declare": "record.declare";
|
|
164
|
+
"record.notify": "record.notify";
|
|
165
|
+
"record.declared.edit": "record.declared.edit";
|
|
166
|
+
"record.declared.reject": "record.declared.reject";
|
|
167
|
+
"record.declared.archive": "record.declared.archive";
|
|
168
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
169
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
170
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
171
|
+
"record.registered.correct": "record.registered.correct";
|
|
167
172
|
}>;
|
|
168
|
-
|
|
169
|
-
|
|
173
|
+
options: z.ZodObject<{
|
|
174
|
+
event: z.ZodArray<z.ZodString>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
178
|
+
options: z.ZodObject<{
|
|
179
|
+
event: z.ZodArray<z.ZodString>;
|
|
180
|
+
customActionType: z.ZodArray<z.ZodString>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
}, z.core.$strip>], "type">;
|
|
183
|
+
export declare const ConfigurableActionScopes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
184
|
+
type: z.ZodEnum<{
|
|
185
|
+
"record.unassign-others": "record.unassign-others";
|
|
186
|
+
"record.register": "record.register";
|
|
187
|
+
"record.read": "record.read";
|
|
188
|
+
"record.create": "record.create";
|
|
189
|
+
"record.declare": "record.declare";
|
|
190
|
+
"record.notify": "record.notify";
|
|
191
|
+
"record.declared.edit": "record.declared.edit";
|
|
192
|
+
"record.declared.reject": "record.declared.reject";
|
|
193
|
+
"record.declared.archive": "record.declared.archive";
|
|
194
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
195
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
196
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
197
|
+
"record.registered.correct": "record.registered.correct";
|
|
198
|
+
}>;
|
|
199
|
+
options: z.ZodObject<{
|
|
200
|
+
event: z.ZodArray<z.ZodString>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
203
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
204
|
+
options: z.ZodObject<{
|
|
205
|
+
event: z.ZodArray<z.ZodString>;
|
|
206
|
+
customActionType: z.ZodArray<z.ZodString>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
}, z.core.$strip>], "type">;
|
|
209
|
+
export type ConfigurableRawScopes = z.infer<typeof ConfigurableRawScopes>;
|
|
210
|
+
export type ConfigurableScopeType = ConfigurableRawScopes['type'];
|
|
211
|
+
type FlattenedSearchScope = {
|
|
212
|
+
type: 'search';
|
|
213
|
+
options: Record<string, SearchScopeAccessLevels>;
|
|
214
|
+
};
|
|
215
|
+
export type ConfigurableScopes = Exclude<ConfigurableRawScopes, {
|
|
216
|
+
type: 'search';
|
|
217
|
+
}> | FlattenedSearchScope;
|
|
218
|
+
export declare function findScope<T extends ConfigurableScopeType>(scopes: string[], scopeType: T): Extract<{
|
|
219
|
+
type: "user.create";
|
|
170
220
|
options: {
|
|
171
221
|
role: string[];
|
|
172
222
|
};
|
|
173
223
|
}, {
|
|
224
|
+
type: T;
|
|
225
|
+
}> | Extract<{
|
|
174
226
|
type: "user.edit";
|
|
175
227
|
options: {
|
|
176
228
|
role: string[];
|
|
177
229
|
};
|
|
178
|
-
}
|
|
179
|
-
type:
|
|
180
|
-
|
|
181
|
-
id: z.ZodArray<z.ZodString, "many">;
|
|
182
|
-
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
id: string[];
|
|
184
|
-
}, {
|
|
185
|
-
id: string[];
|
|
186
|
-
}>;
|
|
187
|
-
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
}, {
|
|
231
|
+
type: T;
|
|
232
|
+
}> | Extract<{
|
|
188
233
|
type: "workqueue";
|
|
189
234
|
options: {
|
|
190
235
|
id: string[];
|
|
191
236
|
};
|
|
192
237
|
}, {
|
|
193
|
-
type:
|
|
238
|
+
type: T;
|
|
239
|
+
}> | Extract<{
|
|
240
|
+
type: "dashboard.view";
|
|
194
241
|
options: {
|
|
195
242
|
id: string[];
|
|
196
243
|
};
|
|
197
|
-
}
|
|
198
|
-
type:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}, "strip", z.ZodTypeAny, {
|
|
202
|
-
event: string[];
|
|
203
|
-
}, {
|
|
204
|
-
event: string[];
|
|
205
|
-
}>;
|
|
206
|
-
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
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.print-certified-copies" | "record.registered.request-correction" | "record.registered.correct";
|
|
244
|
+
}, {
|
|
245
|
+
type: T;
|
|
246
|
+
}> | Extract<{
|
|
247
|
+
type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.edit" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.print-certified-copies" | "record.registered.request-correction" | "record.registered.correct";
|
|
208
248
|
options: {
|
|
209
249
|
event: string[];
|
|
210
250
|
};
|
|
211
251
|
}, {
|
|
212
|
-
type:
|
|
252
|
+
type: T;
|
|
253
|
+
}> | Extract<{
|
|
254
|
+
type: "record.custom-action";
|
|
213
255
|
options: {
|
|
214
256
|
event: string[];
|
|
257
|
+
customActionType: string[];
|
|
215
258
|
};
|
|
216
|
-
}
|
|
217
|
-
type
|
|
218
|
-
|
|
219
|
-
type
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
};
|
|
223
|
-
export type ConfigurableScopes = Exclude<ConfigurableRawScopes, {
|
|
224
|
-
type: 'search';
|
|
225
|
-
}> | FlattenedSearchScope;
|
|
226
|
-
export declare function findScope<T extends ConfigurableScopeType>(scopes: string[], scopeType: T): Extract<{
|
|
259
|
+
}, {
|
|
260
|
+
type: T;
|
|
261
|
+
}> | Extract<FlattenedSearchScope, {
|
|
262
|
+
type: T;
|
|
263
|
+
}> | undefined;
|
|
264
|
+
export declare function findScopes<T extends ConfigurableScopeType>(scopes: string[], scopeType: T): (Extract<{
|
|
227
265
|
type: "user.create";
|
|
228
266
|
options: {
|
|
229
267
|
role: string[];
|
|
@@ -245,15 +283,30 @@ export declare function findScope<T extends ConfigurableScopeType>(scopes: strin
|
|
|
245
283
|
}, {
|
|
246
284
|
type: T;
|
|
247
285
|
}> | Extract<{
|
|
248
|
-
type: "
|
|
286
|
+
type: "dashboard.view";
|
|
287
|
+
options: {
|
|
288
|
+
id: string[];
|
|
289
|
+
};
|
|
290
|
+
}, {
|
|
291
|
+
type: T;
|
|
292
|
+
}> | Extract<{
|
|
293
|
+
type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.edit" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.print-certified-copies" | "record.registered.request-correction" | "record.registered.correct";
|
|
249
294
|
options: {
|
|
250
295
|
event: string[];
|
|
251
296
|
};
|
|
252
297
|
}, {
|
|
253
298
|
type: T;
|
|
299
|
+
}> | Extract<{
|
|
300
|
+
type: "record.custom-action";
|
|
301
|
+
options: {
|
|
302
|
+
event: string[];
|
|
303
|
+
customActionType: string[];
|
|
304
|
+
};
|
|
305
|
+
}, {
|
|
306
|
+
type: T;
|
|
254
307
|
}> | Extract<FlattenedSearchScope, {
|
|
255
308
|
type: T;
|
|
256
|
-
}>
|
|
309
|
+
}>)[];
|
|
257
310
|
/**
|
|
258
311
|
* Parses a configurable scope string into a ConfigurableRawScopes object.
|
|
259
312
|
* @param {string} scope - The scope string to parse
|
|
@@ -284,9 +337,20 @@ export declare function parseConfigurableScope(scope: string): {
|
|
|
284
337
|
id: string[];
|
|
285
338
|
};
|
|
286
339
|
} | {
|
|
287
|
-
type: "
|
|
340
|
+
type: "dashboard.view";
|
|
341
|
+
options: {
|
|
342
|
+
id: string[];
|
|
343
|
+
};
|
|
344
|
+
} | {
|
|
345
|
+
type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.edit" | "record.declared.reject" | "record.declared.archive" | "record.declared.review-duplicates" | "record.registered.print-certified-copies" | "record.registered.request-correction" | "record.registered.correct";
|
|
346
|
+
options: {
|
|
347
|
+
event: string[];
|
|
348
|
+
};
|
|
349
|
+
} | {
|
|
350
|
+
type: "record.custom-action";
|
|
288
351
|
options: {
|
|
289
352
|
event: string[];
|
|
353
|
+
customActionType: string[];
|
|
290
354
|
};
|
|
291
355
|
} | undefined;
|
|
292
356
|
export declare function parseLiteralScope(scope: string): {
|
|
@@ -315,7 +379,7 @@ export declare const scopes: Scope[];
|
|
|
315
379
|
export type ParsedScopes = NonNullable<ReturnType<typeof parseConfigurableScope>>;
|
|
316
380
|
export type RawScopes = z.infer<typeof LiteralScopes> | (string & {});
|
|
317
381
|
export type Scope = RawScopes;
|
|
318
|
-
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">]>]>;
|
|
382
|
+
export declare const ActionScopes: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<readonly [z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<readonly [z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>]>;
|
|
319
383
|
export type ActionScopes = z.infer<typeof ActionScopes>;
|
|
320
384
|
export {};
|
|
321
385
|
//# sourceMappingURL=scopes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAaA,cAAc,0BAA0B,CAAA"}
|