@opencrvs/toolkit 2.1.0-rc.b0003b1 → 2.1.0-rc.b89dfd1

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 (73) hide show
  1. package/build.sh +2 -2
  2. package/dist/application-config/index.js +12 -0
  3. package/dist/cli.js +165 -5106
  4. package/dist/commons/api/router.d.ts +3476 -2883
  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 +272 -70
  8. package/dist/commons/events/ActionDocument.d.ts +149 -105
  9. package/dist/commons/events/ActionInput.d.ts +26 -0
  10. package/dist/commons/events/ActionType.d.ts +63 -58
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -501
  12. package/dist/commons/events/AuditLog.d.ts +43 -41
  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 +64 -42
  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 +336 -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/locations.d.ts +4 -4
  34. package/dist/commons/events/mocks.test.utils.d.ts +2 -2
  35. package/dist/commons/events/scopes.d.ts +5 -4
  36. package/dist/commons/events/state/index.d.ts +17 -17
  37. package/dist/commons/events/state/utils.d.ts +7 -7
  38. package/dist/commons/events/test.utils.d.ts +40 -32
  39. package/dist/commons/events/utils.d.ts +119 -105
  40. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  41. package/dist/conditionals/index.js +2 -0
  42. package/dist/environment/derived-variables.d.ts +131 -131
  43. package/dist/environment/derived-variables.d.ts.map +1 -1
  44. package/dist/environment/logger.d.ts +3 -12
  45. package/dist/environment/logger.d.ts.map +1 -1
  46. package/dist/environment/manage-users.js +17 -7
  47. package/dist/environment/questions.d.ts +75 -74
  48. package/dist/environment/questions.d.ts.map +1 -1
  49. package/dist/environment/setup-environment.js +8 -14
  50. package/dist/environment/swarm-to-k8s.js +17 -7
  51. package/dist/environment/update-workflows.js +17 -7
  52. package/dist/environment/users.js +17 -7
  53. package/dist/environment/utils.d.ts +1 -1
  54. package/dist/environment/utils.js +17 -7
  55. package/dist/events/deduplication.d.ts +1 -1
  56. package/dist/events/index.js +166 -18
  57. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  58. package/dist/migrations/v2.0/index.js +88 -5144
  59. package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
  60. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  61. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +3 -0
  62. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +1 -0
  63. package/dist/migrations/v2.1/add-explicit-correction-flags.js +234 -0
  64. package/dist/migrations/v2.1/index.d.ts +6 -0
  65. package/dist/migrations/v2.1/index.d.ts.map +1 -0
  66. package/dist/migrations/v2.1/index.js +218 -0
  67. package/dist/notification/index.js +131 -11
  68. package/dist/scopes/index.d.ts +146 -140
  69. package/dist/scopes/index.js +2 -0
  70. package/opencrvs-toolkit-2.1.0-rc.b89dfd1.tgz +0 -0
  71. package/package.json +2 -3
  72. package/tsconfig.tsbuildinfo +1 -1
  73. package/opencrvs-toolkit-2.1.0-rc.b0003b1.tgz +0 -0
@@ -21,8 +21,8 @@ export declare function getDeclarationPages(configuration: EventConfig): {
21
21
  };
22
22
  requireCompletionToContinue: boolean;
23
23
  fields: FieldConfig[];
24
- type: "FORM";
25
24
  conditional?: any;
25
+ type: "FORM";
26
26
  }[];
27
27
  export declare function getDeclaration(configuration: EventConfig): {
28
28
  label: {
@@ -39,8 +39,8 @@ export declare function getDeclaration(configuration: EventConfig): {
39
39
  };
40
40
  requireCompletionToContinue: boolean;
41
41
  fields: FieldConfig[];
42
- type: "FORM";
43
42
  conditional?: any;
43
+ type: "FORM";
44
44
  }[];
45
45
  };
46
46
  export declare function isActionConfigType(type: ActionType): type is ActionConfigTypes;
@@ -59,8 +59,8 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
59
59
  };
60
60
  requireCompletionToContinue: boolean;
61
61
  fields: FieldConfig[];
62
- type: "FORM";
63
62
  conditional?: any;
63
+ type: "FORM";
64
64
  } | {
65
65
  id: string;
66
66
  title: {
@@ -70,6 +70,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
70
70
  };
71
71
  requireCompletionToContinue: boolean;
72
72
  fields: FieldConfig[];
73
+ conditional?: any;
73
74
  type: "VERIFICATION";
74
75
  actions: {
75
76
  verify: {
@@ -99,7 +100,6 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
99
100
  };
100
101
  };
101
102
  };
102
- conditional?: any;
103
103
  })[];
104
104
  export declare const getActionAnnotationFields: (actionConfig: ActionConfig) => FieldConfig[];
105
105
  export declare function getAllUniqueFields(eventConfig: EventConfig): FieldConfig[];
@@ -154,26 +154,47 @@ export declare function deepMerge<T extends Record<string, unknown>, K extends R
154
154
  export declare function findLastAssignmentAction(actions: Action[]): {
155
155
  id: string & import("zod").$brand<"UUID">;
156
156
  transactionId: string;
157
- createdByUserType: "user" | "system";
157
+ createdByUserType: "system" | "user";
158
158
  createdAt: string;
159
159
  createdBy: string;
160
+ createdByRole?: string | undefined;
161
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
162
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
160
163
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
161
- status: "Requested" | "Accepted" | "Rejected";
162
- type: "REGISTER";
164
+ annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
165
+ status: "Accepted" | "Rejected" | "Requested";
166
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
167
+ type: "CREATE";
168
+ } | {
169
+ id: string & import("zod").$brand<"UUID">;
170
+ transactionId: string;
171
+ createdByUserType: "system" | "user";
172
+ createdAt: string;
173
+ createdBy: string;
163
174
  createdByRole?: string | undefined;
164
175
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
165
176
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
177
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
166
178
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
179
+ status: "Accepted" | "Rejected" | "Requested";
167
180
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
168
- registrationNumber?: string | undefined;
181
+ type: "REJECT";
182
+ content: {
183
+ reason: string;
184
+ };
169
185
  } | {
170
186
  id: string & import("zod").$brand<"UUID">;
171
187
  transactionId: string;
172
- createdByUserType: "user" | "system";
188
+ createdByUserType: "system" | "user";
173
189
  createdAt: string;
174
190
  createdBy: string;
191
+ createdByRole?: string | undefined;
192
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
193
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
175
194
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
176
- status: "Requested" | "Accepted" | "Rejected";
195
+ annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
196
+ status: "Accepted" | "Rejected" | "Requested";
197
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
177
198
  type: "DUPLICATE_DETECTED";
178
199
  content: {
179
200
  duplicates: {
@@ -181,272 +202,265 @@ export declare function findLastAssignmentAction(actions: Action[]): {
181
202
  trackingId: string;
182
203
  }[];
183
204
  };
184
- createdByRole?: string | undefined;
185
- createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
186
- createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
187
- annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
188
- originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
189
205
  } | {
190
206
  id: string & import("zod").$brand<"UUID">;
191
207
  transactionId: string;
192
- createdByUserType: "user" | "system";
208
+ createdByUserType: "system" | "user";
193
209
  createdAt: string;
194
210
  createdBy: string;
195
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
196
- status: "Requested" | "Accepted" | "Rejected";
197
- type: "EDIT";
198
- content: {
199
- comment?: string | undefined;
200
- };
201
211
  createdByRole?: string | undefined;
202
212
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
203
213
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
214
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
204
215
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
216
+ status: "Accepted" | "Rejected" | "Requested";
205
217
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
218
+ type: "MARK_AS_NOT_DUPLICATE";
206
219
  } | {
207
220
  id: string & import("zod").$brand<"UUID">;
208
221
  transactionId: string;
209
- createdByUserType: "user" | "system";
222
+ createdByUserType: "system" | "user";
210
223
  createdAt: string;
211
224
  createdBy: string;
212
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
213
- status: "Requested" | "Accepted" | "Rejected";
214
- type: "PRINT_CERTIFICATE";
215
225
  createdByRole?: string | undefined;
216
226
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
217
227
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
228
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
218
229
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
230
+ status: "Accepted" | "Rejected" | "Requested";
219
231
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
232
+ type: "MARK_AS_DUPLICATE";
220
233
  content?: {
221
- templateId?: string | undefined;
222
- } | null | undefined;
234
+ duplicateOf: string & import("zod").$brand<"UUID">;
235
+ } | undefined;
223
236
  } | {
224
237
  id: string & import("zod").$brand<"UUID">;
225
238
  transactionId: string;
226
- createdByUserType: "user" | "system";
239
+ createdByUserType: "system" | "user";
227
240
  createdAt: string;
228
241
  createdBy: string;
229
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
230
- status: "Requested" | "Accepted" | "Rejected";
231
- type: "REQUEST_CORRECTION";
232
242
  createdByRole?: string | undefined;
233
243
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
234
244
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
245
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
235
246
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
247
+ status: "Accepted" | "Rejected" | "Requested";
236
248
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
249
+ type: "ARCHIVE";
250
+ content: {
251
+ reason: string;
252
+ };
237
253
  } | {
238
254
  id: string & import("zod").$brand<"UUID">;
239
255
  transactionId: string;
240
- createdByUserType: "user" | "system";
256
+ createdByUserType: "system" | "user";
241
257
  createdAt: string;
242
258
  createdBy: string;
243
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
244
- status: "Requested" | "Accepted" | "Rejected";
245
- type: "CUSTOM";
246
- customActionType: string;
247
259
  createdByRole?: string | undefined;
248
260
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
249
261
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
262
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
250
263
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
264
+ status: "Accepted" | "Rejected" | "Requested";
251
265
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
266
+ type: "UNARCHIVE";
252
267
  } | {
253
268
  id: string & import("zod").$brand<"UUID">;
254
269
  transactionId: string;
255
- createdByUserType: "user" | "system";
270
+ createdByUserType: "system" | "user";
256
271
  createdAt: string;
257
272
  createdBy: string;
258
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
259
- status: "Requested" | "Accepted" | "Rejected";
260
- type: "CREATE";
261
273
  createdByRole?: string | undefined;
262
274
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
263
275
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
276
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
264
277
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
278
+ status: "Accepted" | "Rejected" | "Requested";
265
279
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
280
+ type: "NOTIFY";
266
281
  } | {
267
282
  id: string & import("zod").$brand<"UUID">;
268
283
  transactionId: string;
269
- createdByUserType: "user" | "system";
284
+ createdByUserType: "system" | "user";
270
285
  createdAt: string;
271
286
  createdBy: string;
272
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
273
- status: "Requested" | "Accepted" | "Rejected";
274
- type: "REJECT";
275
- content: {
276
- reason: string;
277
- };
278
287
  createdByRole?: string | undefined;
279
288
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
280
289
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
290
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
281
291
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
292
+ status: "Accepted" | "Rejected" | "Requested";
282
293
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
294
+ type: "REGISTER";
295
+ registrationNumber?: string | undefined;
283
296
  } | {
284
297
  id: string & import("zod").$brand<"UUID">;
285
298
  transactionId: string;
286
- createdByUserType: "user" | "system";
299
+ createdByUserType: "system" | "user";
287
300
  createdAt: string;
288
301
  createdBy: string;
289
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
290
- status: "Requested" | "Accepted" | "Rejected";
291
- type: "MARK_AS_NOT_DUPLICATE";
292
302
  createdByRole?: string | undefined;
293
303
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
294
304
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
305
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
295
306
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
307
+ status: "Accepted" | "Rejected" | "Requested";
296
308
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
309
+ type: "DECLARE";
297
310
  } | {
298
311
  id: string & import("zod").$brand<"UUID">;
299
312
  transactionId: string;
300
- createdByUserType: "user" | "system";
313
+ createdByUserType: "system" | "user";
301
314
  createdAt: string;
302
315
  createdBy: string;
303
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
304
- status: "Requested" | "Accepted" | "Rejected";
305
- type: "MARK_AS_DUPLICATE";
306
316
  createdByRole?: string | undefined;
307
317
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
308
318
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
319
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
309
320
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
321
+ status: "Accepted" | "Rejected" | "Requested";
310
322
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
311
- content?: {
312
- duplicateOf: string & import("zod").$brand<"UUID">;
313
- } | undefined;
323
+ type: "ASSIGN";
324
+ assignedTo: string;
314
325
  } | {
315
326
  id: string & import("zod").$brand<"UUID">;
316
327
  transactionId: string;
317
- createdByUserType: "user" | "system";
328
+ createdByUserType: "system" | "user";
318
329
  createdAt: string;
319
330
  createdBy: string;
320
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
321
- status: "Requested" | "Accepted" | "Rejected";
322
- type: "ARCHIVE";
323
- content: {
324
- reason: string;
325
- };
326
331
  createdByRole?: string | undefined;
327
332
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
328
333
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
334
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
329
335
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
336
+ status: "Accepted" | "Rejected" | "Requested";
330
337
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
338
+ type: "REQUEST_CORRECTION";
331
339
  } | {
332
340
  id: string & import("zod").$brand<"UUID">;
333
341
  transactionId: string;
334
- createdByUserType: "user" | "system";
342
+ createdByUserType: "system" | "user";
335
343
  createdAt: string;
336
344
  createdBy: string;
337
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
338
- status: "Requested" | "Accepted" | "Rejected";
339
- type: "NOTIFY";
340
345
  createdByRole?: string | undefined;
341
346
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
342
347
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
348
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
343
349
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
350
+ status: "Accepted" | "Rejected" | "Requested";
344
351
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
352
+ type: "APPROVE_CORRECTION";
353
+ requestId: string;
354
+ content?: {
355
+ immediateCorrection?: boolean | undefined;
356
+ } | undefined;
345
357
  } | {
346
358
  id: string & import("zod").$brand<"UUID">;
347
359
  transactionId: string;
348
- createdByUserType: "user" | "system";
360
+ createdByUserType: "system" | "user";
349
361
  createdAt: string;
350
362
  createdBy: string;
351
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
352
- status: "Requested" | "Accepted" | "Rejected";
353
- type: "DECLARE";
354
363
  createdByRole?: string | undefined;
355
364
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
356
365
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
366
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
357
367
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
368
+ status: "Accepted" | "Rejected" | "Requested";
358
369
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
370
+ type: "REJECT_CORRECTION";
371
+ requestId: string;
372
+ content: {
373
+ reason: string;
374
+ };
359
375
  } | {
360
376
  id: string & import("zod").$brand<"UUID">;
361
377
  transactionId: string;
362
- createdByUserType: "user" | "system";
378
+ createdByUserType: "system" | "user";
363
379
  createdAt: string;
364
380
  createdBy: string;
365
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
366
- status: "Requested" | "Accepted" | "Rejected";
367
- type: "ASSIGN";
368
- assignedTo: string;
369
381
  createdByRole?: string | undefined;
370
382
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
371
383
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
384
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
372
385
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
386
+ status: "Accepted" | "Rejected" | "Requested";
373
387
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
388
+ type: "UNASSIGN";
374
389
  } | {
375
390
  id: string & import("zod").$brand<"UUID">;
376
391
  transactionId: string;
377
- createdByUserType: "user" | "system";
392
+ createdByUserType: "system" | "user";
378
393
  createdAt: string;
379
394
  createdBy: string;
380
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
381
- status: "Requested" | "Accepted" | "Rejected";
382
- type: "APPROVE_CORRECTION";
383
- requestId: string;
384
395
  createdByRole?: string | undefined;
385
396
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
386
397
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
398
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
387
399
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
400
+ status: "Accepted" | "Rejected" | "Requested";
388
401
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
402
+ type: "PRINT_CERTIFICATE";
389
403
  content?: {
390
- immediateCorrection?: boolean | undefined;
391
- } | undefined;
404
+ templateId?: string | undefined;
405
+ } | null | undefined;
392
406
  } | {
393
407
  id: string & import("zod").$brand<"UUID">;
394
408
  transactionId: string;
395
- createdByUserType: "user" | "system";
409
+ createdByUserType: "system" | "user";
396
410
  createdAt: string;
397
411
  createdBy: string;
398
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
399
- status: "Requested" | "Accepted" | "Rejected";
400
- type: "REJECT_CORRECTION";
401
- requestId: string;
402
- content: {
403
- reason: string;
404
- };
405
412
  createdByRole?: string | undefined;
406
413
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
407
414
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
415
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
408
416
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
417
+ status: "Accepted" | "Rejected" | "Requested";
409
418
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
419
+ type: "READ";
410
420
  } | {
411
421
  id: string & import("zod").$brand<"UUID">;
412
422
  transactionId: string;
413
- createdByUserType: "user" | "system";
423
+ createdByUserType: "system" | "user";
414
424
  createdAt: string;
415
425
  createdBy: string;
416
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
417
- status: "Requested" | "Accepted" | "Rejected";
418
- type: "UNASSIGN";
419
426
  createdByRole?: string | undefined;
420
427
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
421
428
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
429
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
422
430
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
431
+ status: "Accepted" | "Rejected" | "Requested";
423
432
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
433
+ type: "EDIT";
434
+ content: {
435
+ comment?: string | undefined;
436
+ };
424
437
  } | {
425
438
  id: string & import("zod").$brand<"UUID">;
426
439
  transactionId: string;
427
- createdByUserType: "user" | "system";
440
+ createdByUserType: "system" | "user";
428
441
  createdAt: string;
429
442
  createdBy: string;
430
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
431
- status: "Requested" | "Accepted" | "Rejected";
432
- type: "READ";
433
443
  createdByRole?: string | undefined;
434
444
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
435
445
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
446
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
436
447
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
448
+ status: "Accepted" | "Rejected" | "Requested";
437
449
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
450
+ type: "CUSTOM";
451
+ customActionType: string;
438
452
  } | {
439
453
  id: string & import("zod").$brand<"UUID">;
440
454
  transactionId: string;
441
- createdByUserType: "user" | "system";
455
+ createdByUserType: "system" | "user";
442
456
  createdAt: string;
443
457
  createdBy: string;
444
- type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
445
- status: "Rejected";
446
458
  createdByRole?: string | undefined;
447
459
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
448
460
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
449
461
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
462
+ type: "APPROVE_CORRECTION" | "ARCHIVE" | "CUSTOM" | "DECLARE" | "EDIT" | "NOTIFY" | "PRINT_CERTIFICATE" | "REGISTER" | "REJECT" | "REJECT_CORRECTION" | "REQUEST_CORRECTION" | "UNARCHIVE";
463
+ status: "Rejected";
450
464
  } | undefined;
451
465
  /**
452
466
  * Tell compiler that accessing record with arbitrary key might result to undefined
@@ -1,15 +1,15 @@
1
1
  import * as z from 'zod/v4';
2
2
  export declare const TriggerEvent: {
3
- readonly USER_CREATED: "user-created";
4
- readonly USER_UPDATED: "user-updated";
5
- readonly USERNAME_REMINDER: "username-reminder";
6
- readonly RESET_PASSWORD: "reset-password";
7
- readonly RESET_PASSWORD_BY_ADMIN: "reset-password-by-admin";
8
- readonly RESEND_INVITE: "resend-invite";
9
- readonly TWO_FA: "2fa";
10
- readonly ALL_USER_NOTIFICATION: "all-user-notification";
11
- readonly CHANGE_PHONE_NUMBER: "change-phone-number";
12
- readonly CHANGE_EMAIL_ADDRESS: "change-email-address";
3
+ readonly USER_CREATED: 'user-created';
4
+ readonly USER_UPDATED: 'user-updated';
5
+ readonly USERNAME_REMINDER: 'username-reminder';
6
+ readonly RESET_PASSWORD: 'reset-password';
7
+ readonly RESET_PASSWORD_BY_ADMIN: 'reset-password-by-admin';
8
+ readonly RESEND_INVITE: 'resend-invite';
9
+ readonly TWO_FA: '2fa';
10
+ readonly ALL_USER_NOTIFICATION: 'all-user-notification';
11
+ readonly CHANGE_PHONE_NUMBER: 'change-phone-number';
12
+ readonly CHANGE_EMAIL_ADDRESS: 'change-email-address';
13
13
  };
14
14
  export type TriggerEvent = (typeof TriggerEvent)[keyof typeof TriggerEvent];
15
15
  export declare const Recipient: z.ZodObject<{
@@ -152,6 +152,7 @@ var RecordScopeTypeV2 = z6.enum([
152
152
  "record.edit",
153
153
  "record.reject",
154
154
  "record.archive",
155
+ "record.unarchive",
155
156
  "record.review-duplicates",
156
157
  "record.register",
157
158
  "record.print-certified-copies",
@@ -257,6 +258,7 @@ var ScopesWithDeclaredOptions = RecordScopeTypeV2.extract([
257
258
  "record.edit",
258
259
  "record.reject",
259
260
  "record.archive",
261
+ "record.unarchive",
260
262
  "record.review-duplicates",
261
263
  "record.register"
262
264
  ]);