@opencrvs/toolkit 2.1.0-rc.4bddaf2 → 2.1.0-rc.4ebadf9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/build.sh +2 -2
  2. package/dist/application-config/index.js +15 -1
  3. package/dist/cli.js +165 -5154
  4. package/dist/commons/api/router.d.ts +3667 -2887
  5. package/dist/commons/application-config/index.d.ts +6 -6
  6. package/dist/commons/conditionals/conditionals.d.ts +32 -323
  7. package/dist/commons/events/ActionConfig.d.ts +279 -70
  8. package/dist/commons/events/ActionDocument.d.ts +155 -111
  9. package/dist/commons/events/ActionInput.d.ts +26 -6
  10. package/dist/commons/events/ActionType.d.ts +63 -58
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +513 -501
  12. package/dist/commons/events/AuditLog.d.ts +151 -40
  13. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  14. package/dist/commons/events/Conditional.d.ts +3 -3
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
  16. package/dist/commons/events/Draft.d.ts +37 -35
  17. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  18. package/dist/commons/events/EventConfig.d.ts +5 -5
  19. package/dist/commons/events/EventDocument.d.ts +66 -44
  20. package/dist/commons/events/EventIndex.d.ts +62 -62
  21. package/dist/commons/events/EventMetadata.d.ts +40 -40
  22. package/dist/commons/events/FieldConfig.d.ts +341 -331
  23. package/dist/commons/events/FieldType.d.ts +51 -51
  24. package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
  25. package/dist/commons/events/FieldValue.d.ts +12 -12
  26. package/dist/commons/events/Flag.d.ts +15 -15
  27. package/dist/commons/events/TemplateConfig.d.ts +1 -1
  28. package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
  29. package/dist/commons/events/WorkqueueConfig.d.ts +827 -824
  30. package/dist/commons/events/deduplication.d.ts +1 -1
  31. package/dist/commons/events/event.d.ts +2 -2
  32. package/dist/commons/events/field.d.ts +69 -198
  33. package/dist/commons/events/index.d.ts +1 -0
  34. package/dist/commons/events/locationPayloads.d.ts +95 -0
  35. package/dist/commons/events/locations.d.ts +103 -6
  36. package/dist/commons/events/mocks.test.utils.d.ts +18 -4
  37. package/dist/commons/events/scopes.d.ts +5 -4
  38. package/dist/commons/events/state/index.d.ts +17 -17
  39. package/dist/commons/events/state/utils.d.ts +7 -7
  40. package/dist/commons/events/test.utils.d.ts +44 -39
  41. package/dist/commons/events/utils.d.ts +127 -105
  42. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  43. package/dist/conditionals/index.js +3 -0
  44. package/dist/environment/derived-variables.d.ts +119 -131
  45. package/dist/environment/derived-variables.d.ts.map +1 -1
  46. package/dist/environment/derived-variables.js +0 -14
  47. package/dist/environment/logger.d.ts +3 -12
  48. package/dist/environment/logger.d.ts.map +1 -1
  49. package/dist/environment/manage-users.js +17 -7
  50. package/dist/environment/questions.d.ts +75 -74
  51. package/dist/environment/questions.d.ts.map +1 -1
  52. package/dist/environment/setup-environment.js +8 -28
  53. package/dist/environment/swarm-to-k8s.js +17 -7
  54. package/dist/environment/update-workflows.js +17 -7
  55. package/dist/environment/users.js +17 -7
  56. package/dist/environment/utils.d.ts +1 -1
  57. package/dist/environment/utils.js +17 -7
  58. package/dist/events/deduplication.d.ts +1 -1
  59. package/dist/events/index.js +380 -88
  60. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  61. package/dist/migrations/v2.0/index.js +88 -5144
  62. package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
  63. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  64. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +3 -0
  65. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +1 -0
  66. package/dist/migrations/v2.1/add-explicit-correction-flags.js +234 -0
  67. package/dist/migrations/v2.1/index.d.ts +6 -0
  68. package/dist/migrations/v2.1/index.d.ts.map +1 -0
  69. package/dist/migrations/v2.1/index.js +218 -0
  70. package/dist/notification/index.js +328 -104
  71. package/dist/scopes/index.d.ts +148 -140
  72. package/dist/scopes/index.js +3 -0
  73. package/dist/templates/charts-values/dependencies/values.yaml +0 -3
  74. package/dist/templates/charts-values/opencrvs-services/values.yaml +0 -4
  75. package/opencrvs-toolkit-2.1.0-rc.4ebadf9.tgz +0 -0
  76. package/package.json +5 -5
  77. package/tsconfig.tsbuildinfo +1 -1
  78. package/opencrvs-toolkit-2.1.0-rc.4bddaf2.tgz +0 -0
@@ -2,8 +2,8 @@ import * as z from 'zod/v4';
2
2
  import { Role } from './roles';
3
3
  export declare const JurisdictionFilter: z.ZodEnum<{
4
4
  administrativeArea: "administrativeArea";
5
- location: "location";
6
5
  all: "all";
6
+ location: "location";
7
7
  }>;
8
8
  export type JurisdictionFilter = z.infer<typeof JurisdictionFilter>;
9
9
  export declare const UserFilter: z.ZodEnum<{
@@ -17,75 +17,76 @@ export type UserFilter = z.infer<typeof UserFilter>;
17
17
  * @see scopeOptionsPlaceEvent @see scopeOptionsDeclaredOrNotified @see scopeOptionsFull
18
18
  */
19
19
  export declare const RecordScopeTypeV2: z.ZodEnum<{
20
- "record.search": "record.search";
20
+ "record.archive": "record.archive";
21
+ "record.correct": "record.correct";
21
22
  "record.create": "record.create";
22
- "record.read": "record.read";
23
+ "record.custom-action": "record.custom-action";
23
24
  "record.declare": "record.declare";
24
- "record.notify": "record.notify";
25
25
  "record.edit": "record.edit";
26
- "record.reject": "record.reject";
27
- "record.archive": "record.archive";
28
- "record.review-duplicates": "record.review-duplicates";
29
- "record.register": "record.register";
26
+ "record.notify": "record.notify";
30
27
  "record.print-certified-copies": "record.print-certified-copies";
28
+ "record.read": "record.read";
29
+ "record.register": "record.register";
30
+ "record.reject": "record.reject";
31
31
  "record.request-correction": "record.request-correction";
32
- "record.correct": "record.correct";
32
+ "record.review-duplicates": "record.review-duplicates";
33
+ "record.search": "record.search";
34
+ "record.unarchive": "record.unarchive";
33
35
  "record.unassign-others": "record.unassign-others";
34
- "record.custom-action": "record.custom-action";
35
36
  }>;
36
37
  export type RecordScopeTypeV2 = z.infer<typeof RecordScopeTypeV2>;
37
38
  declare const AllScopeOptions: z.ZodObject<{
38
- ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
39
- accessLevel: z.ZodOptional<z.ZodEnum<{
40
- administrativeArea: "administrativeArea";
41
- location: "location";
42
- all: "all";
43
- }>>;
44
- role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
45
39
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
46
40
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
47
41
  administrativeArea: "administrativeArea";
48
- location: "location";
49
42
  all: "all";
43
+ location: "location";
50
44
  }>>;
51
45
  notifiedIn: z.ZodOptional<z.ZodEnum<{
52
46
  administrativeArea: "administrativeArea";
53
- location: "location";
54
47
  all: "all";
48
+ location: "location";
55
49
  }>>;
56
50
  notifiedBy: z.ZodOptional<z.ZodEnum<{
57
51
  user: "user";
58
52
  }>>;
59
53
  declaredIn: z.ZodOptional<z.ZodEnum<{
60
54
  administrativeArea: "administrativeArea";
61
- location: "location";
62
55
  all: "all";
56
+ location: "location";
63
57
  }>>;
64
58
  declaredBy: z.ZodOptional<z.ZodEnum<{
65
59
  user: "user";
66
60
  }>>;
67
61
  registeredIn: z.ZodOptional<z.ZodEnum<{
68
62
  administrativeArea: "administrativeArea";
69
- location: "location";
70
63
  all: "all";
64
+ location: "location";
71
65
  }>>;
72
66
  registeredBy: z.ZodOptional<z.ZodEnum<{
73
67
  user: "user";
74
68
  }>>;
69
+ accessLevel: z.ZodOptional<z.ZodEnum<{
70
+ administrativeArea: "administrativeArea";
71
+ all: "all";
72
+ location: "location";
73
+ }>>;
74
+ role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
75
+ ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
75
76
  }, z.core.$strip>;
76
77
  type AllScopeOptions = z.infer<typeof AllScopeOptions>;
77
78
  export declare const ScopeOptionKey: z.ZodEnum<{
78
- role: "role";
79
+ accessLevel: "accessLevel";
80
+ declaredBy: "declaredBy";
81
+ declaredIn: "declaredIn";
79
82
  event: "event";
80
- placeOfEvent: "placeOfEvent";
81
- notifiedIn: "notifiedIn";
83
+ ids: "ids";
82
84
  notifiedBy: "notifiedBy";
83
- declaredIn: "declaredIn";
84
- declaredBy: "declaredBy";
85
- registeredIn: "registeredIn";
85
+ notifiedIn: "notifiedIn";
86
+ placeOfEvent: "placeOfEvent";
86
87
  registeredBy: "registeredBy";
87
- accessLevel: "accessLevel";
88
- ids: "ids";
88
+ registeredIn: "registeredIn";
89
+ role: "role";
89
90
  }>;
90
91
  export type ScopeOptionKey = z.infer<typeof ScopeOptionKey>;
91
92
  export declare const ScopesWithPlaceEventOptions: z.ZodEnum<{
@@ -94,17 +95,18 @@ export declare const ScopesWithPlaceEventOptions: z.ZodEnum<{
94
95
  "record.notify": "record.notify";
95
96
  }>;
96
97
  export declare const ScopesWithDeclaredOptions: z.ZodEnum<{
98
+ "record.archive": "record.archive";
97
99
  "record.edit": "record.edit";
100
+ "record.register": "record.register";
98
101
  "record.reject": "record.reject";
99
- "record.archive": "record.archive";
100
102
  "record.review-duplicates": "record.review-duplicates";
101
- "record.register": "record.register";
103
+ "record.unarchive": "record.unarchive";
102
104
  }>;
103
105
  export declare const ScopesWithFullOptions: z.ZodEnum<{
104
- "record.search": "record.search";
106
+ "record.correct": "record.correct";
105
107
  "record.read": "record.read";
106
108
  "record.request-correction": "record.request-correction";
107
- "record.correct": "record.correct";
109
+ "record.search": "record.search";
108
110
  "record.unassign-others": "record.unassign-others";
109
111
  }>;
110
112
  export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -117,37 +119,38 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
117
119
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
118
120
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
119
121
  administrativeArea: "administrativeArea";
120
- location: "location";
121
122
  all: "all";
123
+ location: "location";
122
124
  }>>;
123
125
  }, z.core.$strip>>;
124
126
  }, z.core.$strip>, z.ZodObject<{
125
127
  type: z.ZodEnum<{
128
+ "record.archive": "record.archive";
126
129
  "record.edit": "record.edit";
130
+ "record.register": "record.register";
127
131
  "record.reject": "record.reject";
128
- "record.archive": "record.archive";
129
132
  "record.review-duplicates": "record.review-duplicates";
130
- "record.register": "record.register";
133
+ "record.unarchive": "record.unarchive";
131
134
  }>;
132
135
  options: z.ZodOptional<z.ZodObject<{
133
136
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
134
137
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
135
138
  administrativeArea: "administrativeArea";
136
- location: "location";
137
139
  all: "all";
140
+ location: "location";
138
141
  }>>;
139
142
  notifiedIn: z.ZodOptional<z.ZodEnum<{
140
143
  administrativeArea: "administrativeArea";
141
- location: "location";
142
144
  all: "all";
145
+ location: "location";
143
146
  }>>;
144
147
  notifiedBy: z.ZodOptional<z.ZodEnum<{
145
148
  user: "user";
146
149
  }>>;
147
150
  declaredIn: z.ZodOptional<z.ZodEnum<{
148
151
  administrativeArea: "administrativeArea";
149
- location: "location";
150
152
  all: "all";
153
+ location: "location";
151
154
  }>>;
152
155
  declaredBy: z.ZodOptional<z.ZodEnum<{
153
156
  user: "user";
@@ -155,39 +158,39 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
155
158
  }, z.core.$strip>>;
156
159
  }, z.core.$strip>, z.ZodObject<{
157
160
  type: z.ZodEnum<{
158
- "record.search": "record.search";
161
+ "record.correct": "record.correct";
159
162
  "record.read": "record.read";
160
163
  "record.request-correction": "record.request-correction";
161
- "record.correct": "record.correct";
164
+ "record.search": "record.search";
162
165
  "record.unassign-others": "record.unassign-others";
163
166
  }>;
164
167
  options: z.ZodOptional<z.ZodObject<{
165
168
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
166
169
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
167
170
  administrativeArea: "administrativeArea";
168
- location: "location";
169
171
  all: "all";
172
+ location: "location";
170
173
  }>>;
171
174
  notifiedIn: z.ZodOptional<z.ZodEnum<{
172
175
  administrativeArea: "administrativeArea";
173
- location: "location";
174
176
  all: "all";
177
+ location: "location";
175
178
  }>>;
176
179
  notifiedBy: z.ZodOptional<z.ZodEnum<{
177
180
  user: "user";
178
181
  }>>;
179
182
  declaredIn: z.ZodOptional<z.ZodEnum<{
180
183
  administrativeArea: "administrativeArea";
181
- location: "location";
182
184
  all: "all";
185
+ location: "location";
183
186
  }>>;
184
187
  declaredBy: z.ZodOptional<z.ZodEnum<{
185
188
  user: "user";
186
189
  }>>;
187
190
  registeredIn: z.ZodOptional<z.ZodEnum<{
188
191
  administrativeArea: "administrativeArea";
189
- location: "location";
190
192
  all: "all";
193
+ location: "location";
191
194
  }>>;
192
195
  registeredBy: z.ZodOptional<z.ZodEnum<{
193
196
  user: "user";
@@ -199,29 +202,29 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
199
202
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
200
203
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
201
204
  administrativeArea: "administrativeArea";
202
- location: "location";
203
205
  all: "all";
206
+ location: "location";
204
207
  }>>;
205
208
  notifiedIn: z.ZodOptional<z.ZodEnum<{
206
209
  administrativeArea: "administrativeArea";
207
- location: "location";
208
210
  all: "all";
211
+ location: "location";
209
212
  }>>;
210
213
  notifiedBy: z.ZodOptional<z.ZodEnum<{
211
214
  user: "user";
212
215
  }>>;
213
216
  declaredIn: z.ZodOptional<z.ZodEnum<{
214
217
  administrativeArea: "administrativeArea";
215
- location: "location";
216
218
  all: "all";
219
+ location: "location";
217
220
  }>>;
218
221
  declaredBy: z.ZodOptional<z.ZodEnum<{
219
222
  user: "user";
220
223
  }>>;
221
224
  registeredIn: z.ZodOptional<z.ZodEnum<{
222
225
  administrativeArea: "administrativeArea";
223
- location: "location";
224
226
  all: "all";
227
+ location: "location";
225
228
  }>>;
226
229
  registeredBy: z.ZodOptional<z.ZodEnum<{
227
230
  user: "user";
@@ -234,29 +237,29 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
234
237
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
235
238
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
236
239
  administrativeArea: "administrativeArea";
237
- location: "location";
238
240
  all: "all";
241
+ location: "location";
239
242
  }>>;
240
243
  notifiedIn: z.ZodOptional<z.ZodEnum<{
241
244
  administrativeArea: "administrativeArea";
242
- location: "location";
243
245
  all: "all";
246
+ location: "location";
244
247
  }>>;
245
248
  notifiedBy: z.ZodOptional<z.ZodEnum<{
246
249
  user: "user";
247
250
  }>>;
248
251
  declaredIn: z.ZodOptional<z.ZodEnum<{
249
252
  administrativeArea: "administrativeArea";
250
- location: "location";
251
253
  all: "all";
254
+ location: "location";
252
255
  }>>;
253
256
  declaredBy: z.ZodOptional<z.ZodEnum<{
254
257
  user: "user";
255
258
  }>>;
256
259
  registeredIn: z.ZodOptional<z.ZodEnum<{
257
260
  administrativeArea: "administrativeArea";
258
- location: "location";
259
261
  all: "all";
262
+ location: "location";
260
263
  }>>;
261
264
  registeredBy: z.ZodOptional<z.ZodEnum<{
262
265
  user: "user";
@@ -266,16 +269,16 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
266
269
  }, z.core.$strip>], "type">;
267
270
  declare const SystemScopeType: z.ZodEnum<{
268
271
  "organisation.read-locations": "organisation.read-locations";
269
- "user.read": "user.read";
270
272
  "user.create": "user.create";
271
273
  "user.edit": "user.edit";
274
+ "user.read": "user.read";
272
275
  "user.search": "user.search";
273
276
  }>;
274
277
  export type SystemScopeType = z.infer<typeof SystemScopeType>;
275
278
  declare const UserScopeType: z.ZodEnum<{
276
- "user.read": "user.read";
277
279
  "user.create": "user.create";
278
280
  "user.edit": "user.edit";
281
+ "user.read": "user.read";
279
282
  "user.search": "user.search";
280
283
  }>;
281
284
  export type UserScopeType = z.infer<typeof UserScopeType>;
@@ -292,8 +295,8 @@ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
292
295
  options: z.ZodOptional<z.ZodObject<{
293
296
  accessLevel: z.ZodOptional<z.ZodEnum<{
294
297
  administrativeArea: "administrativeArea";
295
- location: "location";
296
298
  all: "all";
299
+ location: "location";
297
300
  }>>;
298
301
  role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
299
302
  }, z.core.$strip>>;
@@ -305,8 +308,8 @@ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
305
308
  options: z.ZodOptional<z.ZodObject<{
306
309
  accessLevel: z.ZodOptional<z.ZodEnum<{
307
310
  administrativeArea: "administrativeArea";
308
- location: "location";
309
311
  all: "all";
312
+ location: "location";
310
313
  }>>;
311
314
  }, z.core.$strip>>;
312
315
  }, z.core.$strip>], "type">;
@@ -338,11 +341,12 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
338
341
  }, z.core.$strip>>;
339
342
  }, z.core.$strip>, z.ZodObject<{
340
343
  type: z.ZodEnum<{
344
+ "record.archive": "record.archive";
341
345
  "record.edit": "record.edit";
346
+ "record.register": "record.register";
342
347
  "record.reject": "record.reject";
343
- "record.archive": "record.archive";
344
348
  "record.review-duplicates": "record.review-duplicates";
345
- "record.register": "record.register";
349
+ "record.unarchive": "record.unarchive";
346
350
  }>;
347
351
  options: z.ZodOptional<z.ZodObject<{
348
352
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
@@ -354,10 +358,10 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
354
358
  }, z.core.$strip>>;
355
359
  }, z.core.$strip>, z.ZodObject<{
356
360
  type: z.ZodEnum<{
357
- "record.search": "record.search";
361
+ "record.correct": "record.correct";
358
362
  "record.read": "record.read";
359
363
  "record.request-correction": "record.request-correction";
360
- "record.correct": "record.correct";
364
+ "record.search": "record.search";
361
365
  "record.unassign-others": "record.unassign-others";
362
366
  }>;
363
367
  options: z.ZodOptional<z.ZodObject<{
@@ -389,20 +393,21 @@ export type ResolvedRecordScopeV2 = z.infer<typeof ResolvedRecordScopeV2>;
389
393
  /** The primary scope schema which gathers all scope types together. All scopes are discriminated by type and options are determined according to the type. */
390
394
  export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
391
395
  type: z.ZodEnum<{
396
+ "attachment.upload": "attachment.upload";
392
397
  bypassratelimit: "bypassratelimit";
393
- "record.reindex": "record.reindex";
394
- "user.data-seeding": "user.data-seeding";
395
- "integration.create": "integration.create";
396
- "record.import": "record.import";
397
398
  "config.update-all": "config.update-all";
398
- "attachment.upload": "attachment.upload";
399
- "profile.electronic-signature": "profile.electronic-signature";
400
- "user.read-only-my-audit": "user.read-only-my-audit";
399
+ "integration.create": "integration.create";
400
+ "location.edit": "location.edit";
401
401
  "performance.read": "performance.read";
402
402
  "performance.read-dashboards": "performance.read-dashboards";
403
403
  "performance.vital-statistics-export": "performance.vital-statistics-export";
404
+ "profile.electronic-signature": "profile.electronic-signature";
404
405
  "record.confirm-registration": "record.confirm-registration";
406
+ "record.import": "record.import";
407
+ "record.reindex": "record.reindex";
405
408
  "record.reject-registration": "record.reject-registration";
409
+ "user.data-seeding": "user.data-seeding";
410
+ "user.read-only-my-audit": "user.read-only-my-audit";
406
411
  }>;
407
412
  }, z.core.$strip>, z.ZodObject<{
408
413
  type: z.ZodEnum<{
@@ -414,37 +419,38 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
414
419
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
415
420
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
416
421
  administrativeArea: "administrativeArea";
417
- location: "location";
418
422
  all: "all";
423
+ location: "location";
419
424
  }>>;
420
425
  }, z.core.$strip>>;
421
426
  }, z.core.$strip>, z.ZodObject<{
422
427
  type: z.ZodEnum<{
428
+ "record.archive": "record.archive";
423
429
  "record.edit": "record.edit";
430
+ "record.register": "record.register";
424
431
  "record.reject": "record.reject";
425
- "record.archive": "record.archive";
426
432
  "record.review-duplicates": "record.review-duplicates";
427
- "record.register": "record.register";
433
+ "record.unarchive": "record.unarchive";
428
434
  }>;
429
435
  options: z.ZodOptional<z.ZodObject<{
430
436
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
431
437
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
432
438
  administrativeArea: "administrativeArea";
433
- location: "location";
434
439
  all: "all";
440
+ location: "location";
435
441
  }>>;
436
442
  notifiedIn: z.ZodOptional<z.ZodEnum<{
437
443
  administrativeArea: "administrativeArea";
438
- location: "location";
439
444
  all: "all";
445
+ location: "location";
440
446
  }>>;
441
447
  notifiedBy: z.ZodOptional<z.ZodEnum<{
442
448
  user: "user";
443
449
  }>>;
444
450
  declaredIn: z.ZodOptional<z.ZodEnum<{
445
451
  administrativeArea: "administrativeArea";
446
- location: "location";
447
452
  all: "all";
453
+ location: "location";
448
454
  }>>;
449
455
  declaredBy: z.ZodOptional<z.ZodEnum<{
450
456
  user: "user";
@@ -452,39 +458,39 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
452
458
  }, z.core.$strip>>;
453
459
  }, z.core.$strip>, z.ZodObject<{
454
460
  type: z.ZodEnum<{
455
- "record.search": "record.search";
461
+ "record.correct": "record.correct";
456
462
  "record.read": "record.read";
457
463
  "record.request-correction": "record.request-correction";
458
- "record.correct": "record.correct";
464
+ "record.search": "record.search";
459
465
  "record.unassign-others": "record.unassign-others";
460
466
  }>;
461
467
  options: z.ZodOptional<z.ZodObject<{
462
468
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
463
469
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
464
470
  administrativeArea: "administrativeArea";
465
- location: "location";
466
471
  all: "all";
472
+ location: "location";
467
473
  }>>;
468
474
  notifiedIn: z.ZodOptional<z.ZodEnum<{
469
475
  administrativeArea: "administrativeArea";
470
- location: "location";
471
476
  all: "all";
477
+ location: "location";
472
478
  }>>;
473
479
  notifiedBy: z.ZodOptional<z.ZodEnum<{
474
480
  user: "user";
475
481
  }>>;
476
482
  declaredIn: z.ZodOptional<z.ZodEnum<{
477
483
  administrativeArea: "administrativeArea";
478
- location: "location";
479
484
  all: "all";
485
+ location: "location";
480
486
  }>>;
481
487
  declaredBy: z.ZodOptional<z.ZodEnum<{
482
488
  user: "user";
483
489
  }>>;
484
490
  registeredIn: z.ZodOptional<z.ZodEnum<{
485
491
  administrativeArea: "administrativeArea";
486
- location: "location";
487
492
  all: "all";
493
+ location: "location";
488
494
  }>>;
489
495
  registeredBy: z.ZodOptional<z.ZodEnum<{
490
496
  user: "user";
@@ -496,29 +502,29 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
496
502
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
497
503
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
498
504
  administrativeArea: "administrativeArea";
499
- location: "location";
500
505
  all: "all";
506
+ location: "location";
501
507
  }>>;
502
508
  notifiedIn: z.ZodOptional<z.ZodEnum<{
503
509
  administrativeArea: "administrativeArea";
504
- location: "location";
505
510
  all: "all";
511
+ location: "location";
506
512
  }>>;
507
513
  notifiedBy: z.ZodOptional<z.ZodEnum<{
508
514
  user: "user";
509
515
  }>>;
510
516
  declaredIn: z.ZodOptional<z.ZodEnum<{
511
517
  administrativeArea: "administrativeArea";
512
- location: "location";
513
518
  all: "all";
519
+ location: "location";
514
520
  }>>;
515
521
  declaredBy: z.ZodOptional<z.ZodEnum<{
516
522
  user: "user";
517
523
  }>>;
518
524
  registeredIn: z.ZodOptional<z.ZodEnum<{
519
525
  administrativeArea: "administrativeArea";
520
- location: "location";
521
526
  all: "all";
527
+ location: "location";
522
528
  }>>;
523
529
  registeredBy: z.ZodOptional<z.ZodEnum<{
524
530
  user: "user";
@@ -531,29 +537,29 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
531
537
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
532
538
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
533
539
  administrativeArea: "administrativeArea";
534
- location: "location";
535
540
  all: "all";
541
+ location: "location";
536
542
  }>>;
537
543
  notifiedIn: z.ZodOptional<z.ZodEnum<{
538
544
  administrativeArea: "administrativeArea";
539
- location: "location";
540
545
  all: "all";
546
+ location: "location";
541
547
  }>>;
542
548
  notifiedBy: z.ZodOptional<z.ZodEnum<{
543
549
  user: "user";
544
550
  }>>;
545
551
  declaredIn: z.ZodOptional<z.ZodEnum<{
546
552
  administrativeArea: "administrativeArea";
547
- location: "location";
548
553
  all: "all";
554
+ location: "location";
549
555
  }>>;
550
556
  declaredBy: z.ZodOptional<z.ZodEnum<{
551
557
  user: "user";
552
558
  }>>;
553
559
  registeredIn: z.ZodOptional<z.ZodEnum<{
554
560
  administrativeArea: "administrativeArea";
555
- location: "location";
556
561
  all: "all";
562
+ location: "location";
557
563
  }>>;
558
564
  registeredBy: z.ZodOptional<z.ZodEnum<{
559
565
  user: "user";
@@ -568,8 +574,8 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
568
574
  options: z.ZodOptional<z.ZodObject<{
569
575
  accessLevel: z.ZodOptional<z.ZodEnum<{
570
576
  administrativeArea: "administrativeArea";
571
- location: "location";
572
577
  all: "all";
578
+ location: "location";
573
579
  }>>;
574
580
  role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
575
581
  }, z.core.$strip>>;
@@ -581,8 +587,8 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
581
587
  options: z.ZodOptional<z.ZodObject<{
582
588
  accessLevel: z.ZodOptional<z.ZodEnum<{
583
589
  administrativeArea: "administrativeArea";
584
- location: "location";
585
590
  all: "all";
591
+ location: "location";
586
592
  }>>;
587
593
  }, z.core.$strip>>;
588
594
  }, z.core.$strip>, z.ZodObject<{
@@ -590,8 +596,8 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
590
596
  options: z.ZodOptional<z.ZodObject<{
591
597
  accessLevel: z.ZodOptional<z.ZodEnum<{
592
598
  administrativeArea: "administrativeArea";
593
- location: "location";
594
599
  all: "all";
600
+ location: "location";
595
601
  }>>;
596
602
  }, z.core.$strip>>;
597
603
  }, z.core.$strip>, z.ZodObject<{
@@ -607,42 +613,44 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
607
613
  }, z.core.$strip>], "type">;
608
614
  export type Scope = z.infer<typeof Scope>;
609
615
  export declare const ScopeType: z.ZodEnum<{
610
- "record.search": "record.search";
611
- "record.create": "record.create";
612
- "record.read": "record.read";
613
- "record.declare": "record.declare";
614
- "record.notify": "record.notify";
615
- "record.edit": "record.edit";
616
- "record.reject": "record.reject";
617
- "record.archive": "record.archive";
618
- "record.review-duplicates": "record.review-duplicates";
619
- "record.register": "record.register";
620
- "record.print-certified-copies": "record.print-certified-copies";
621
- "record.request-correction": "record.request-correction";
622
- "record.correct": "record.correct";
623
- "record.unassign-others": "record.unassign-others";
624
- "record.custom-action": "record.custom-action";
616
+ "attachment.upload": "attachment.upload";
625
617
  bypassratelimit: "bypassratelimit";
626
- "record.reindex": "record.reindex";
627
- "user.data-seeding": "user.data-seeding";
628
- "integration.create": "integration.create";
629
- "record.import": "record.import";
630
618
  "config.update-all": "config.update-all";
631
- "attachment.upload": "attachment.upload";
632
- "profile.electronic-signature": "profile.electronic-signature";
633
- "user.read-only-my-audit": "user.read-only-my-audit";
619
+ "dashboard.view": "dashboard.view";
620
+ "integration.create": "integration.create";
621
+ "location.edit": "location.edit";
622
+ "organisation.read-locations": "organisation.read-locations";
634
623
  "performance.read": "performance.read";
635
624
  "performance.read-dashboards": "performance.read-dashboards";
636
625
  "performance.vital-statistics-export": "performance.vital-statistics-export";
626
+ "profile.electronic-signature": "profile.electronic-signature";
627
+ "record.archive": "record.archive";
637
628
  "record.confirm-registration": "record.confirm-registration";
629
+ "record.correct": "record.correct";
630
+ "record.create": "record.create";
631
+ "record.custom-action": "record.custom-action";
632
+ "record.declare": "record.declare";
633
+ "record.edit": "record.edit";
634
+ "record.import": "record.import";
635
+ "record.notify": "record.notify";
636
+ "record.print-certified-copies": "record.print-certified-copies";
637
+ "record.read": "record.read";
638
+ "record.register": "record.register";
639
+ "record.reindex": "record.reindex";
640
+ "record.reject": "record.reject";
638
641
  "record.reject-registration": "record.reject-registration";
639
- "organisation.read-locations": "organisation.read-locations";
640
- "user.read": "user.read";
642
+ "record.request-correction": "record.request-correction";
643
+ "record.review-duplicates": "record.review-duplicates";
644
+ "record.search": "record.search";
645
+ "record.unarchive": "record.unarchive";
646
+ "record.unassign-others": "record.unassign-others";
641
647
  "user.create": "user.create";
648
+ "user.data-seeding": "user.data-seeding";
642
649
  "user.edit": "user.edit";
650
+ "user.read": "user.read";
651
+ "user.read-only-my-audit": "user.read-only-my-audit";
643
652
  "user.search": "user.search";
644
653
  workqueue: "workqueue";
645
- "dashboard.view": "dashboard.view";
646
654
  }>;
647
655
  export type ScopeType = z.infer<typeof ScopeType>;
648
656
  /**
@@ -669,40 +677,40 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
669
677
  type: "record.create" | "record.declare" | "record.notify";
670
678
  options?: {
671
679
  event?: string[] | undefined;
672
- placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
680
+ placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
673
681
  } | undefined;
674
682
  } | {
675
- type: "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register";
683
+ type: "record.archive" | "record.edit" | "record.register" | "record.reject" | "record.review-duplicates" | "record.unarchive";
676
684
  options?: {
677
685
  event?: string[] | undefined;
678
- placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
679
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
686
+ placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
687
+ notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
680
688
  notifiedBy?: "user" | undefined;
681
- declaredIn?: "administrativeArea" | "location" | "all" | undefined;
689
+ declaredIn?: "administrativeArea" | "all" | "location" | undefined;
682
690
  declaredBy?: "user" | undefined;
683
691
  } | undefined;
684
692
  } | {
685
- type: "record.search" | "record.read" | "record.request-correction" | "record.correct" | "record.unassign-others";
693
+ type: "record.correct" | "record.read" | "record.request-correction" | "record.search" | "record.unassign-others";
686
694
  options?: {
687
695
  event?: string[] | undefined;
688
- placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
689
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
696
+ placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
697
+ notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
690
698
  notifiedBy?: "user" | undefined;
691
- declaredIn?: "administrativeArea" | "location" | "all" | undefined;
699
+ declaredIn?: "administrativeArea" | "all" | "location" | undefined;
692
700
  declaredBy?: "user" | undefined;
693
- registeredIn?: "administrativeArea" | "location" | "all" | undefined;
701
+ registeredIn?: "administrativeArea" | "all" | "location" | undefined;
694
702
  registeredBy?: "user" | undefined;
695
703
  } | undefined;
696
704
  } | {
697
705
  type: "record.custom-action";
698
706
  options?: {
699
707
  event?: string[] | undefined;
700
- placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
701
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
708
+ placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
709
+ notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
702
710
  notifiedBy?: "user" | undefined;
703
- declaredIn?: "administrativeArea" | "location" | "all" | undefined;
711
+ declaredIn?: "administrativeArea" | "all" | "location" | undefined;
704
712
  declaredBy?: "user" | undefined;
705
- registeredIn?: "administrativeArea" | "location" | "all" | undefined;
713
+ registeredIn?: "administrativeArea" | "all" | "location" | undefined;
706
714
  registeredBy?: "user" | undefined;
707
715
  customActionTypes?: string[] | undefined;
708
716
  } | undefined;
@@ -710,32 +718,32 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
710
718
  type: "record.print-certified-copies";
711
719
  options?: {
712
720
  event?: string[] | undefined;
713
- placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
714
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
721
+ placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
722
+ notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
715
723
  notifiedBy?: "user" | undefined;
716
- declaredIn?: "administrativeArea" | "location" | "all" | undefined;
724
+ declaredIn?: "administrativeArea" | "all" | "location" | undefined;
717
725
  declaredBy?: "user" | undefined;
718
- registeredIn?: "administrativeArea" | "location" | "all" | undefined;
726
+ registeredIn?: "administrativeArea" | "all" | "location" | undefined;
719
727
  registeredBy?: "user" | undefined;
720
728
  templates?: string[] | undefined;
721
729
  } | undefined;
722
730
  } | {
723
731
  type: "user.create" | "user.edit";
724
732
  options?: {
725
- accessLevel?: "administrativeArea" | "location" | "all" | undefined;
733
+ accessLevel?: "administrativeArea" | "all" | "location" | undefined;
726
734
  role?: string[] | undefined;
727
735
  } | undefined;
728
736
  } | {
729
737
  type: "user.read" | "user.search";
730
738
  options?: {
731
- accessLevel?: "administrativeArea" | "location" | "all" | undefined;
739
+ accessLevel?: "administrativeArea" | "all" | "location" | undefined;
732
740
  } | undefined;
733
741
  } | {
734
- type: "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration";
742
+ type: "attachment.upload" | "bypassratelimit" | "config.update-all" | "integration.create" | "location.edit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.confirm-registration" | "record.import" | "record.reindex" | "record.reject-registration" | "user.data-seeding" | "user.read-only-my-audit";
735
743
  } | {
736
744
  type: "organisation.read-locations";
737
745
  options?: {
738
- accessLevel?: "administrativeArea" | "location" | "all" | undefined;
746
+ accessLevel?: "administrativeArea" | "all" | "location" | undefined;
739
747
  } | undefined;
740
748
  } | {
741
749
  type: "workqueue";
@@ -821,7 +829,7 @@ export declare function canUserCreateEvent(userScopes: EncodedScope[], eventType
821
829
  * @param scopes Array of scopes in object format.
822
830
  * @returns Array of scopes in string format, encoded for use in JWT tokens.
823
831
  */
824
- export declare function defineScopes(scopes: Scope[]): (string & z.core.$brand<"EncodedScope">)[];
832
+ export declare function defineScopes(scopes: Scope[]): (string & z.$brand<"EncodedScope">)[];
825
833
  /**
826
834
  * Helper for defining user roles. Should be used in country config.
827
835
  *
@@ -829,7 +837,7 @@ export declare function defineScopes(scopes: Scope[]): (string & z.core.$brand<"
829
837
  */
830
838
  export declare function defineRoles(roles: Role[]): {
831
839
  id: string;
832
- scopes: (string & z.core.$brand<"EncodedScope">)[];
840
+ scopes: (string & z.$brand<"EncodedScope">)[];
833
841
  }[];
834
842
  export {};
835
843
  //# sourceMappingURL=scopes.d.ts.map