@opencrvs/toolkit 1.9.3-rc.c5b6285 → 1.9.3-rc.da977ad
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 +28089 -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 +23121 -1547
- package/dist/commons/events/ActionDocument.d.ts +840 -1849
- package/dist/commons/events/ActionInput.d.ts +290 -1066
- package/dist/commons/events/ActionType.d.ts +91 -8
- package/dist/commons/events/AdvancedSearchConfig.d.ts +222 -1238
- package/dist/commons/events/CompositeFieldValue.d.ts +25 -176
- 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 +931 -4169
- 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 +72 -105
- package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
- package/dist/commons/events/EventConfig.d.ts +18321 -2120
- package/dist/commons/events/EventConfigInput.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +336 -1326
- package/dist/commons/events/EventIndex.d.ts +197 -967
- package/dist/commons/events/EventInput.d.ts +2 -8
- package/dist/commons/events/EventMetadata.d.ts +106 -346
- package/dist/commons/events/FieldConfig.d.ts +4173 -11778
- package/dist/commons/events/FieldType.d.ts +9 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +172 -811
- package/dist/commons/events/FieldValue.d.ts +82 -355
- package/dist/commons/events/Flag.d.ts +70 -0
- package/dist/commons/events/FormConfig.d.ts +12876 -721
- package/dist/commons/events/PageConfig.d.ts +8604 -319
- package/dist/commons/events/SummaryConfig.d.ts +14 -161
- package/dist/commons/events/TemplateConfig.d.ts +3 -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 +1695 -7156
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +25160 -152
- package/dist/commons/events/event.d.ts +4 -4
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locations.d.ts +15 -19
- package/dist/commons/events/scopes.d.ts +3 -1
- package/dist/commons/events/state/availableActions.d.ts +2 -1
- 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 +142 -110
- package/dist/commons/events/test.utils.d.ts +23 -6
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +50372 -361
- package/dist/commons/notification/UserNotifications.d.ts +55 -636
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +38 -5
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +1813 -1709
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1462 -1602
- package/dist/scopes/index.d.ts +138 -138
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +123 -93
- 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,159 +62,145 @@ 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
|
-
export declare const SearchScopes: z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>;
|
|
66
|
-
declare const LiteralScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<[z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<[z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<[z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>, z.ZodLiteral<"record.read">, z.ZodLiteral<"profile.electronic-signature">, z.ZodUnion<[z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<[z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<[z.ZodLiteral<"user.read:all">, z.ZodLiteral<"user.read:my-office">, z.ZodLiteral<"user.read:my-jurisdiction">, z.ZodLiteral<"user.read:only-my-audit">, z.ZodLiteral<"user.create:all">, z.ZodLiteral<"user.create:my-jurisdiction">, z.ZodLiteral<"user.update:all">, z.ZodLiteral<"user.update:my-jurisdiction">]>, z.ZodLiteral<"config.update:all">, z.ZodLiteral<"user.data-seeding">, z.ZodUnion<[z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>]>;
|
|
65
|
+
export declare const SearchScopes: 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">]>;
|
|
66
|
+
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
67
|
declare const SearchScope: z.ZodObject<{
|
|
68
68
|
type: z.ZodLiteral<"search">;
|
|
69
69
|
options: z.ZodObject<{
|
|
70
|
-
event: z.ZodArray<z.ZodString
|
|
71
|
-
access: z.ZodArray<z.ZodEnum<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
access: ("my-jurisdiction" | "all")[];
|
|
78
|
-
}>;
|
|
79
|
-
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
type: "search";
|
|
81
|
-
options: {
|
|
82
|
-
event: string[];
|
|
83
|
-
access: ("my-jurisdiction" | "all")[];
|
|
84
|
-
};
|
|
85
|
-
}, {
|
|
86
|
-
type: "search";
|
|
87
|
-
options: {
|
|
88
|
-
event: string[];
|
|
89
|
-
access: ("my-jurisdiction" | "all")[];
|
|
90
|
-
};
|
|
91
|
-
}>;
|
|
70
|
+
event: z.ZodArray<z.ZodString>;
|
|
71
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
72
|
+
"my-jurisdiction": "my-jurisdiction";
|
|
73
|
+
all: "all";
|
|
74
|
+
}>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strip>;
|
|
92
77
|
export type SearchScope = z.infer<typeof SearchScope>;
|
|
93
|
-
export declare const RecordScopeType: z.ZodEnum<
|
|
78
|
+
export declare const RecordScopeType: z.ZodEnum<{
|
|
79
|
+
"record.unassign-others": "record.unassign-others";
|
|
80
|
+
"record.register": "record.register";
|
|
81
|
+
"record.read": "record.read";
|
|
82
|
+
"record.create": "record.create";
|
|
83
|
+
"record.declare": "record.declare";
|
|
84
|
+
"record.notify": "record.notify";
|
|
85
|
+
"record.declared.edit": "record.declared.edit";
|
|
86
|
+
"record.declared.validate": "record.declared.validate";
|
|
87
|
+
"record.declared.reject": "record.declared.reject";
|
|
88
|
+
"record.declared.archive": "record.declared.archive";
|
|
89
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
90
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
91
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
92
|
+
"record.registered.correct": "record.registered.correct";
|
|
93
|
+
}>;
|
|
94
94
|
export type RecordScopeType = z.infer<typeof RecordScopeType>;
|
|
95
95
|
export declare const RecordScope: z.ZodObject<{
|
|
96
|
-
type: z.ZodEnum<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
type: z.ZodEnum<{
|
|
97
|
+
"record.unassign-others": "record.unassign-others";
|
|
98
|
+
"record.register": "record.register";
|
|
99
|
+
"record.read": "record.read";
|
|
100
|
+
"record.create": "record.create";
|
|
101
|
+
"record.declare": "record.declare";
|
|
102
|
+
"record.notify": "record.notify";
|
|
103
|
+
"record.declared.edit": "record.declared.edit";
|
|
104
|
+
"record.declared.validate": "record.declared.validate";
|
|
105
|
+
"record.declared.reject": "record.declared.reject";
|
|
106
|
+
"record.declared.archive": "record.declared.archive";
|
|
107
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
108
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
109
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
110
|
+
"record.registered.correct": "record.registered.correct";
|
|
103
111
|
}>;
|
|
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
|
-
}>;
|
|
112
|
+
options: z.ZodObject<{
|
|
113
|
+
event: z.ZodArray<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
}, z.core.$strip>;
|
|
115
116
|
export type RecordScope = z.infer<typeof RecordScope>;
|
|
116
|
-
declare const
|
|
117
|
+
export declare const CustomActionScope: z.ZodObject<{
|
|
118
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
119
|
+
options: z.ZodObject<{
|
|
120
|
+
event: z.ZodArray<z.ZodString>;
|
|
121
|
+
customActionType: z.ZodArray<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type CustomActionScope = z.infer<typeof CustomActionScope>;
|
|
125
|
+
declare const ConfigurableRawScopes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
117
126
|
type: z.ZodLiteral<"search">;
|
|
118
127
|
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<{
|
|
128
|
+
event: z.ZodArray<z.ZodString>;
|
|
129
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
130
|
+
"my-jurisdiction": "my-jurisdiction";
|
|
131
|
+
all: "all";
|
|
132
|
+
}>>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
135
|
type: z.ZodLiteral<"user.create">;
|
|
142
136
|
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<{
|
|
137
|
+
role: z.ZodArray<z.ZodString>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
140
|
type: z.ZodLiteral<"user.edit">;
|
|
161
141
|
options: z.ZodObject<{
|
|
162
|
-
role: z.ZodArray<z.ZodString
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
}, {
|
|
166
|
-
role: string[];
|
|
167
|
-
}>;
|
|
168
|
-
}, "strip", z.ZodTypeAny, {
|
|
169
|
-
type: "user.edit";
|
|
170
|
-
options: {
|
|
171
|
-
role: string[];
|
|
172
|
-
};
|
|
173
|
-
}, {
|
|
174
|
-
type: "user.edit";
|
|
175
|
-
options: {
|
|
176
|
-
role: string[];
|
|
177
|
-
};
|
|
178
|
-
}>, z.ZodObject<{
|
|
142
|
+
role: z.ZodArray<z.ZodString>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
179
145
|
type: z.ZodLiteral<"workqueue">;
|
|
180
146
|
options: z.ZodObject<{
|
|
181
|
-
id: z.ZodArray<z.ZodString
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
147
|
+
id: z.ZodArray<z.ZodString>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
+
type: z.ZodEnum<{
|
|
151
|
+
"record.unassign-others": "record.unassign-others";
|
|
152
|
+
"record.register": "record.register";
|
|
153
|
+
"record.read": "record.read";
|
|
154
|
+
"record.create": "record.create";
|
|
155
|
+
"record.declare": "record.declare";
|
|
156
|
+
"record.notify": "record.notify";
|
|
157
|
+
"record.declared.edit": "record.declared.edit";
|
|
158
|
+
"record.declared.validate": "record.declared.validate";
|
|
159
|
+
"record.declared.reject": "record.declared.reject";
|
|
160
|
+
"record.declared.archive": "record.declared.archive";
|
|
161
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
162
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
163
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
164
|
+
"record.registered.correct": "record.registered.correct";
|
|
186
165
|
}>;
|
|
187
|
-
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
type: "workqueue";
|
|
189
|
-
options: {
|
|
190
|
-
id: string[];
|
|
191
|
-
};
|
|
192
|
-
}, {
|
|
193
|
-
type: "workqueue";
|
|
194
|
-
options: {
|
|
195
|
-
id: string[];
|
|
196
|
-
};
|
|
197
|
-
}>, z.ZodObject<{
|
|
198
|
-
type: z.ZodEnum<["record.create", "record.read", "record.declare", "record.notify", "record.declared.validate", "record.declared.reject", "record.declared.archive", "record.declared.review-duplicates", "record.register", "record.registered.print-certified-copies", "record.registered.request-correction", "record.registered.correct", "record.unassign-others"]>;
|
|
199
166
|
options: z.ZodObject<{
|
|
200
|
-
event: z.ZodArray<z.ZodString
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
167
|
+
event: z.ZodArray<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
171
|
+
options: z.ZodObject<{
|
|
172
|
+
event: z.ZodArray<z.ZodString>;
|
|
173
|
+
customActionType: z.ZodArray<z.ZodString>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
}, z.core.$strip>], "type">;
|
|
176
|
+
export declare const ConfigurableActionScopes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
177
|
+
type: z.ZodEnum<{
|
|
178
|
+
"record.unassign-others": "record.unassign-others";
|
|
179
|
+
"record.register": "record.register";
|
|
180
|
+
"record.read": "record.read";
|
|
181
|
+
"record.create": "record.create";
|
|
182
|
+
"record.declare": "record.declare";
|
|
183
|
+
"record.notify": "record.notify";
|
|
184
|
+
"record.declared.edit": "record.declared.edit";
|
|
185
|
+
"record.declared.validate": "record.declared.validate";
|
|
186
|
+
"record.declared.reject": "record.declared.reject";
|
|
187
|
+
"record.declared.archive": "record.declared.archive";
|
|
188
|
+
"record.declared.review-duplicates": "record.declared.review-duplicates";
|
|
189
|
+
"record.registered.print-certified-copies": "record.registered.print-certified-copies";
|
|
190
|
+
"record.registered.request-correction": "record.registered.request-correction";
|
|
191
|
+
"record.registered.correct": "record.registered.correct";
|
|
205
192
|
}>;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
type ConfigurableRawScopes = z.infer<typeof ConfigurableRawScopes>;
|
|
193
|
+
options: z.ZodObject<{
|
|
194
|
+
event: z.ZodArray<z.ZodString>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"record.custom-action">;
|
|
198
|
+
options: z.ZodObject<{
|
|
199
|
+
event: z.ZodArray<z.ZodString>;
|
|
200
|
+
customActionType: z.ZodArray<z.ZodString>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
}, z.core.$strip>], "type">;
|
|
203
|
+
export type ConfigurableRawScopes = z.infer<typeof ConfigurableRawScopes>;
|
|
218
204
|
export type ConfigurableScopeType = ConfigurableRawScopes['type'];
|
|
219
205
|
type FlattenedSearchScope = {
|
|
220
206
|
type: 'search';
|
|
@@ -245,12 +231,20 @@ export declare function findScope<T extends ConfigurableScopeType>(scopes: strin
|
|
|
245
231
|
}, {
|
|
246
232
|
type: T;
|
|
247
233
|
}> | Extract<{
|
|
248
|
-
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";
|
|
234
|
+
type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.edit" | "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";
|
|
249
235
|
options: {
|
|
250
236
|
event: string[];
|
|
251
237
|
};
|
|
252
238
|
}, {
|
|
253
239
|
type: T;
|
|
240
|
+
}> | Extract<{
|
|
241
|
+
type: "record.custom-action";
|
|
242
|
+
options: {
|
|
243
|
+
event: string[];
|
|
244
|
+
customActionType: string[];
|
|
245
|
+
};
|
|
246
|
+
}, {
|
|
247
|
+
type: T;
|
|
254
248
|
}> | Extract<FlattenedSearchScope, {
|
|
255
249
|
type: T;
|
|
256
250
|
}> | undefined;
|
|
@@ -284,9 +278,15 @@ export declare function parseConfigurableScope(scope: string): {
|
|
|
284
278
|
id: string[];
|
|
285
279
|
};
|
|
286
280
|
} | {
|
|
287
|
-
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";
|
|
281
|
+
type: "record.unassign-others" | "record.register" | "record.read" | "record.create" | "record.declare" | "record.notify" | "record.declared.edit" | "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";
|
|
282
|
+
options: {
|
|
283
|
+
event: string[];
|
|
284
|
+
};
|
|
285
|
+
} | {
|
|
286
|
+
type: "record.custom-action";
|
|
288
287
|
options: {
|
|
289
288
|
event: string[];
|
|
289
|
+
customActionType: string[];
|
|
290
290
|
};
|
|
291
291
|
} | undefined;
|
|
292
292
|
export declare function parseLiteralScope(scope: string): {
|
|
@@ -315,7 +315,7 @@ export declare const scopes: Scope[];
|
|
|
315
315
|
export type ParsedScopes = NonNullable<ReturnType<typeof parseConfigurableScope>>;
|
|
316
316
|
export type RawScopes = z.infer<typeof LiteralScopes> | (string & {});
|
|
317
317
|
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">]>]>;
|
|
318
|
+
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
319
|
export type ActionScopes = z.infer<typeof ActionScopes>;
|
|
320
320
|
export {};
|
|
321
321
|
//# 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"}
|