@opencrvs/toolkit 2.0.0-rc.ecef004 → 2.0.0-rc.ed0aa22

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 (60) hide show
  1. package/dist/commons/api/router.d.ts +1570 -1570
  2. package/dist/commons/application-config/index.d.ts +6 -6
  3. package/dist/commons/conditionals/conditionals.d.ts +323 -32
  4. package/dist/commons/events/ActionConfig.d.ts +77 -70
  5. package/dist/commons/events/ActionDocument.d.ts +107 -107
  6. package/dist/commons/events/ActionType.d.ts +57 -57
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +501 -501
  8. package/dist/commons/events/AuditLog.d.ts +41 -41
  9. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  10. package/dist/commons/events/Conditional.d.ts +3 -3
  11. package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
  12. package/dist/commons/events/Draft.d.ts +35 -35
  13. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  14. package/dist/commons/events/EventConfig.d.ts +5 -5
  15. package/dist/commons/events/EventDocument.d.ts +43 -43
  16. package/dist/commons/events/EventIndex.d.ts +62 -62
  17. package/dist/commons/events/EventMetadata.d.ts +40 -40
  18. package/dist/commons/events/FieldConfig.d.ts +331 -331
  19. package/dist/commons/events/FieldType.d.ts +51 -51
  20. package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
  21. package/dist/commons/events/FieldValue.d.ts +12 -12
  22. package/dist/commons/events/Flag.d.ts +15 -15
  23. package/dist/commons/events/TemplateConfig.d.ts +1 -1
  24. package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
  25. package/dist/commons/events/WorkqueueConfig.d.ts +817 -817
  26. package/dist/commons/events/deduplication.d.ts +1 -1
  27. package/dist/commons/events/event.d.ts +2 -2
  28. package/dist/commons/events/field.d.ts +198 -69
  29. package/dist/commons/events/locations.d.ts +4 -4
  30. package/dist/commons/events/mocks.test.utils.d.ts +2 -2
  31. package/dist/commons/events/scopes.d.ts +4 -4
  32. package/dist/commons/events/state/index.d.ts +17 -17
  33. package/dist/commons/events/state/utils.d.ts +7 -7
  34. package/dist/commons/events/test.utils.d.ts +33 -33
  35. package/dist/commons/events/utils.d.ts +118 -110
  36. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  37. package/dist/environment/derived-variables.d.ts +131 -131
  38. package/dist/environment/derived-variables.d.ts.map +1 -1
  39. package/dist/environment/logger.d.ts +12 -3
  40. package/dist/environment/logger.d.ts.map +1 -1
  41. package/dist/environment/manage-users.js +7 -17
  42. package/dist/environment/questions.d.ts +74 -75
  43. package/dist/environment/questions.d.ts.map +1 -1
  44. package/dist/environment/setup-environment.js +14 -8
  45. package/dist/environment/swarm-to-k8s.js +7 -17
  46. package/dist/environment/update-workflows.js +7 -17
  47. package/dist/environment/users.js +7 -17
  48. package/dist/environment/utils.d.ts +1 -1
  49. package/dist/environment/utils.js +7 -17
  50. package/dist/events/deduplication.d.ts +1 -1
  51. package/dist/events/index.js +36 -12
  52. package/dist/migrations/v2.0/convert-config-files-to-ts.js +7 -17
  53. package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
  54. package/dist/migrations/v2.0/remove-hearth-migrations.js +7 -17
  55. package/dist/notification/index.js +22 -11
  56. package/dist/scopes/index.d.ts +140 -140
  57. package/opencrvs-toolkit-2.0.0-rc.ed0aa22.tgz +0 -0
  58. package/package.json +3 -2
  59. package/tsconfig.tsbuildinfo +1 -1
  60. package/opencrvs-toolkit-2.0.0-rc.ecef004.tgz +0 -0
@@ -23,15 +23,15 @@ export declare const TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
23
23
  * These are just for testing purposes to generate realistic mock data.
24
24
  */
25
25
  export declare const TestUserRole: z.ZodEnum<{
26
- COMMUNITY_LEADER: "COMMUNITY_LEADER";
27
26
  FIELD_AGENT: "FIELD_AGENT";
28
27
  LOCAL_REGISTRAR: "LOCAL_REGISTRAR";
29
28
  LOCAL_SYSTEM_ADMIN: "LOCAL_SYSTEM_ADMIN";
30
29
  NATIONAL_REGISTRAR: "NATIONAL_REGISTRAR";
31
- NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
32
- PROVINCIAL_REGISTRAR: "PROVINCIAL_REGISTRAR";
33
30
  REGISTRATION_AGENT: "REGISTRATION_AGENT";
31
+ NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
34
32
  SOCIAL_WORKER: "SOCIAL_WORKER";
33
+ COMMUNITY_LEADER: "COMMUNITY_LEADER";
34
+ PROVINCIAL_REGISTRAR: "PROVINCIAL_REGISTRAR";
35
35
  }>;
36
36
  export type TestUserRole = z.infer<typeof TestUserRole>;
37
37
  export declare function pickRandom<T>(rng: () => number, items: T[]): T;
@@ -72,103 +72,103 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
72
72
  };
73
73
  draft: ({ eventId, actionType, annotation, omitFields }: {
74
74
  eventId: UUID;
75
- actionType: Draft['action']['type'];
75
+ actionType: Draft["action"]["type"];
76
76
  annotation?: Record<string, any>;
77
77
  omitFields?: string[];
78
78
  }, input?: Partial<Draft>) => Draft;
79
79
  actions: {
80
- declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
81
- keepAssignment?: boolean | undefined;
82
- type: "DECLARE";
80
+ declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
83
81
  transactionId: string;
84
82
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
85
83
  annotation: {};
84
+ keepAssignment?: boolean | undefined;
85
+ type: "DECLARE";
86
86
  eventId: string;
87
87
  };
88
88
  /**
89
89
  * Notify allows sending incomplete data. Think it as 'partial declare' for now.
90
90
  */
91
- notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
91
+ notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, "transactionId" | "declaration" | "keepAssignment">>) => {
92
92
  type: "NOTIFY";
93
93
  transactionId: string;
94
94
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
95
95
  eventId: string;
96
96
  keepAssignment: boolean | undefined;
97
97
  };
98
- edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
98
+ edit: (eventId: string, input?: Partial<Pick<EditActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
99
+ transactionId: string;
100
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
101
+ annotation: {};
99
102
  keepAssignment?: boolean | undefined;
100
103
  type: "EDIT";
101
104
  content: {
102
105
  comment: string;
103
106
  };
104
- transactionId: string;
105
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
106
- annotation: {};
107
107
  eventId: string;
108
108
  };
109
- assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo'>>) => {
109
+ assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
110
110
  type: "ASSIGN";
111
111
  transactionId: string;
112
112
  declaration: {};
113
113
  assignedTo: string;
114
114
  eventId: string;
115
115
  };
116
- unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId'>>) => {
116
+ unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, "transactionId">>) => {
117
117
  type: "UNASSIGN";
118
118
  transactionId: string;
119
119
  declaration: {};
120
120
  assignedTo: null;
121
121
  eventId: string;
122
122
  };
123
- archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
123
+ archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration" | "keepAssignment">>) => {
124
+ transactionId: string;
125
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
124
126
  keepAssignment?: boolean | undefined;
125
127
  type: "ARCHIVE";
126
- transactionId: string;
127
- declaration: {};
128
128
  annotation: {};
129
129
  eventId: string;
130
130
  content: {
131
131
  reason: string;
132
132
  };
133
133
  };
134
- reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
134
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
135
+ transactionId: string;
136
+ annotation: {};
135
137
  keepAssignment?: boolean | undefined;
136
138
  type: "REJECT";
137
- transactionId: string;
138
139
  declaration: {};
139
- annotation: {};
140
140
  eventId: string;
141
141
  content: {
142
142
  reason: string;
143
143
  };
144
144
  };
145
- register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber'>>) => {
146
- keepAssignment?: boolean | undefined;
147
- registrationNumber?: string | undefined;
148
- type: "REGISTER";
145
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment" | "registrationNumber">>) => {
149
146
  transactionId: string;
150
147
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
151
148
  annotation: {};
149
+ registrationNumber?: string | undefined;
150
+ keepAssignment?: boolean | undefined;
151
+ type: "REGISTER";
152
152
  eventId: string;
153
153
  };
154
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
154
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
155
+ transactionId: string;
156
+ annotation: {};
155
157
  keepAssignment?: boolean | undefined;
156
158
  type: "PRINT_CERTIFICATE";
157
- transactionId: string;
158
159
  declaration: {};
159
- annotation: {};
160
160
  eventId: string;
161
161
  };
162
162
  correction: {
163
- request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
163
+ request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
164
164
  type: "REQUEST_CORRECTION";
165
165
  transactionId: string;
166
- declaration: import("lodash").Omit<Record<string, import("./FieldValue").FieldUpdateValue>, "applicant.email" | "applicant.image">;
166
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
167
167
  annotation: {};
168
168
  eventId: string;
169
169
  keepAssignment: boolean | undefined;
170
170
  };
171
- approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
171
+ approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
172
172
  type: "APPROVE_CORRECTION";
173
173
  transactionId: string;
174
174
  declaration: {};
@@ -177,7 +177,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
177
177
  requestId: string;
178
178
  keepAssignment: boolean | undefined;
179
179
  };
180
- reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'content'>>) => {
180
+ reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment" | "content">>) => {
181
181
  type: "REJECT_CORRECTION";
182
182
  transactionId: string;
183
183
  declaration: {};
@@ -191,7 +191,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
191
191
  };
192
192
  };
193
193
  duplicate: {
194
- markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
194
+ markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
195
195
  type: "MARK_AS_DUPLICATE";
196
196
  transactionId: string;
197
197
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
@@ -199,7 +199,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
199
199
  eventId: string;
200
200
  keepAssignment: boolean | undefined;
201
201
  };
202
- markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
202
+ markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
203
203
  type: "MARK_AS_NOT_DUPLICATE";
204
204
  transactionId: string;
205
205
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
@@ -21,8 +21,8 @@ export declare function getDeclarationPages(configuration: EventConfig): {
21
21
  };
22
22
  requireCompletionToContinue: boolean;
23
23
  fields: FieldConfig[];
24
- conditional?: any;
25
24
  type: "FORM";
25
+ conditional?: any;
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
- conditional?: any;
43
42
  type: "FORM";
43
+ conditional?: any;
44
44
  }[];
45
45
  };
46
46
  export declare function isActionConfigType(type: ActionType): type is ActionConfigTypes;
@@ -50,6 +50,14 @@ export declare function getActionConfig({ eventConfiguration, actionType, custom
50
50
  customActionType?: string;
51
51
  }): ActionConfig | undefined;
52
52
  export declare function getCustomActionFields(eventConfiguration: EventConfig, customActionType: string): FieldConfig[];
53
+ /**
54
+ * Returns the fields configured for an action's confirmation dialog.
55
+ *
56
+ * Unlike review fields and supporting copy, NOTIFY does NOT fall back to the
57
+ * DECLARE config here: dialog fields always come from the action's own
58
+ * configuration entry.
59
+ */
60
+ export declare function getActionFormFields(eventConfiguration: EventConfig, actionType: ActionType, customActionType?: string): FieldConfig[];
53
61
  export declare function getPrintCertificatePages(configuration: EventConfig): ({
54
62
  id: string;
55
63
  title: {
@@ -59,8 +67,8 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
59
67
  };
60
68
  requireCompletionToContinue: boolean;
61
69
  fields: FieldConfig[];
62
- conditional?: any;
63
70
  type: "FORM";
71
+ conditional?: any;
64
72
  } | {
65
73
  id: string;
66
74
  title: {
@@ -70,7 +78,6 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
70
78
  };
71
79
  requireCompletionToContinue: boolean;
72
80
  fields: FieldConfig[];
73
- conditional?: any;
74
81
  type: "VERIFICATION";
75
82
  actions: {
76
83
  verify: {
@@ -100,6 +107,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
100
107
  };
101
108
  };
102
109
  };
110
+ conditional?: any;
103
111
  })[];
104
112
  export declare const getActionAnnotationFields: (actionConfig: ActionConfig) => FieldConfig[];
105
113
  export declare function getAllUniqueFields(eventConfig: EventConfig): FieldConfig[];
@@ -154,299 +162,299 @@ export declare function deepMerge<T extends Record<string, unknown>, K extends R
154
162
  export declare function findLastAssignmentAction(actions: Action[]): {
155
163
  id: string & import("zod").$brand<"UUID">;
156
164
  transactionId: string;
157
- createdByUserType: "system" | "user";
165
+ createdByUserType: "user" | "system";
158
166
  createdAt: string;
159
167
  createdBy: string;
168
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
169
+ status: "Requested" | "Accepted" | "Rejected";
170
+ type: "REGISTER";
160
171
  createdByRole?: string | undefined;
161
172
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
162
173
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
163
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
164
174
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
165
- status: "Accepted" | "Rejected" | "Requested";
166
175
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
167
- type: "CREATE";
176
+ registrationNumber?: string | undefined;
168
177
  } | {
169
178
  id: string & import("zod").$brand<"UUID">;
170
179
  transactionId: string;
171
- createdByUserType: "system" | "user";
180
+ createdByUserType: "user" | "system";
172
181
  createdAt: string;
173
182
  createdBy: string;
183
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
184
+ status: "Requested" | "Accepted" | "Rejected";
185
+ type: "DUPLICATE_DETECTED";
186
+ content: {
187
+ duplicates: {
188
+ id: string & import("zod").$brand<"UUID">;
189
+ trackingId: string;
190
+ }[];
191
+ };
174
192
  createdByRole?: string | undefined;
175
193
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
176
194
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
177
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
178
195
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
179
- status: "Accepted" | "Rejected" | "Requested";
180
196
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
181
- type: "REJECT";
182
- content: {
183
- reason: string;
184
- };
185
197
  } | {
186
198
  id: string & import("zod").$brand<"UUID">;
187
199
  transactionId: string;
188
- createdByUserType: "system" | "user";
200
+ createdByUserType: "user" | "system";
189
201
  createdAt: string;
190
202
  createdBy: string;
203
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
204
+ status: "Requested" | "Accepted" | "Rejected";
205
+ type: "EDIT";
206
+ content: {
207
+ comment?: string | undefined;
208
+ };
191
209
  createdByRole?: string | undefined;
192
210
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
193
211
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
194
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
195
212
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
196
- status: "Accepted" | "Rejected" | "Requested";
197
213
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
198
- type: "DUPLICATE_DETECTED";
199
- content: {
200
- duplicates: {
201
- id: string & import("zod").$brand<"UUID">;
202
- trackingId: string;
203
- }[];
204
- };
205
214
  } | {
206
215
  id: string & import("zod").$brand<"UUID">;
207
216
  transactionId: string;
208
- createdByUserType: "system" | "user";
217
+ createdByUserType: "user" | "system";
209
218
  createdAt: string;
210
219
  createdBy: string;
220
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
221
+ status: "Requested" | "Accepted" | "Rejected";
222
+ type: "PRINT_CERTIFICATE";
211
223
  createdByRole?: string | undefined;
212
224
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
213
225
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
214
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
215
226
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
216
- status: "Accepted" | "Rejected" | "Requested";
217
227
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
218
- type: "MARK_AS_NOT_DUPLICATE";
228
+ content?: {
229
+ templateId?: string | undefined;
230
+ } | null | undefined;
219
231
  } | {
220
232
  id: string & import("zod").$brand<"UUID">;
221
233
  transactionId: string;
222
- createdByUserType: "system" | "user";
234
+ createdByUserType: "user" | "system";
223
235
  createdAt: string;
224
236
  createdBy: string;
237
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
238
+ status: "Requested" | "Accepted" | "Rejected";
239
+ type: "REQUEST_CORRECTION";
225
240
  createdByRole?: string | undefined;
226
241
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
227
242
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
228
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
229
243
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
230
- status: "Accepted" | "Rejected" | "Requested";
231
244
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
232
- type: "MARK_AS_DUPLICATE";
233
- content?: {
234
- duplicateOf: string & import("zod").$brand<"UUID">;
235
- } | undefined;
236
245
  } | {
237
246
  id: string & import("zod").$brand<"UUID">;
238
247
  transactionId: string;
239
- createdByUserType: "system" | "user";
248
+ createdByUserType: "user" | "system";
240
249
  createdAt: string;
241
250
  createdBy: string;
251
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
252
+ status: "Requested" | "Accepted" | "Rejected";
253
+ type: "CUSTOM";
254
+ customActionType: string;
242
255
  createdByRole?: string | undefined;
243
256
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
244
257
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
245
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
246
258
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
247
- status: "Accepted" | "Rejected" | "Requested";
248
259
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
249
- type: "ARCHIVE";
250
- content: {
251
- reason: string;
252
- };
253
260
  } | {
254
261
  id: string & import("zod").$brand<"UUID">;
255
262
  transactionId: string;
256
- createdByUserType: "system" | "user";
263
+ createdByUserType: "user" | "system";
257
264
  createdAt: string;
258
265
  createdBy: string;
266
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
267
+ status: "Requested" | "Accepted" | "Rejected";
268
+ type: "CREATE";
259
269
  createdByRole?: string | undefined;
260
270
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
261
271
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
262
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
263
272
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
264
- status: "Accepted" | "Rejected" | "Requested";
265
273
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
266
- type: "NOTIFY";
267
274
  } | {
268
275
  id: string & import("zod").$brand<"UUID">;
269
276
  transactionId: string;
270
- createdByUserType: "system" | "user";
277
+ createdByUserType: "user" | "system";
271
278
  createdAt: string;
272
279
  createdBy: string;
280
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
281
+ status: "Requested" | "Accepted" | "Rejected";
282
+ type: "REJECT";
283
+ content: {
284
+ reason: string;
285
+ };
273
286
  createdByRole?: string | undefined;
274
287
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
275
288
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
276
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
277
289
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
278
- status: "Accepted" | "Rejected" | "Requested";
279
290
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
280
- type: "REGISTER";
281
- registrationNumber?: string | undefined;
282
291
  } | {
283
292
  id: string & import("zod").$brand<"UUID">;
284
293
  transactionId: string;
285
- createdByUserType: "system" | "user";
294
+ createdByUserType: "user" | "system";
286
295
  createdAt: string;
287
296
  createdBy: string;
297
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
298
+ status: "Requested" | "Accepted" | "Rejected";
299
+ type: "MARK_AS_NOT_DUPLICATE";
288
300
  createdByRole?: string | undefined;
289
301
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
290
302
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
291
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
292
303
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
293
- status: "Accepted" | "Rejected" | "Requested";
294
304
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
295
- type: "DECLARE";
296
305
  } | {
297
306
  id: string & import("zod").$brand<"UUID">;
298
307
  transactionId: string;
299
- createdByUserType: "system" | "user";
308
+ createdByUserType: "user" | "system";
300
309
  createdAt: string;
301
310
  createdBy: string;
311
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
312
+ status: "Requested" | "Accepted" | "Rejected";
313
+ type: "MARK_AS_DUPLICATE";
302
314
  createdByRole?: string | undefined;
303
315
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
304
316
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
305
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
306
317
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
307
- status: "Accepted" | "Rejected" | "Requested";
308
318
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
309
- type: "ASSIGN";
310
- assignedTo: string;
319
+ content?: {
320
+ duplicateOf: string & import("zod").$brand<"UUID">;
321
+ } | undefined;
311
322
  } | {
312
323
  id: string & import("zod").$brand<"UUID">;
313
324
  transactionId: string;
314
- createdByUserType: "system" | "user";
325
+ createdByUserType: "user" | "system";
315
326
  createdAt: string;
316
327
  createdBy: string;
328
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
329
+ status: "Requested" | "Accepted" | "Rejected";
330
+ type: "ARCHIVE";
331
+ content: {
332
+ reason: string;
333
+ };
317
334
  createdByRole?: string | undefined;
318
335
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
319
336
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
320
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
321
337
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
322
- status: "Accepted" | "Rejected" | "Requested";
323
338
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
324
- type: "REQUEST_CORRECTION";
325
339
  } | {
326
340
  id: string & import("zod").$brand<"UUID">;
327
341
  transactionId: string;
328
- createdByUserType: "system" | "user";
342
+ createdByUserType: "user" | "system";
329
343
  createdAt: string;
330
344
  createdBy: string;
345
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
346
+ status: "Requested" | "Accepted" | "Rejected";
347
+ type: "NOTIFY";
331
348
  createdByRole?: string | undefined;
332
349
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
333
350
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
334
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
335
351
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
336
- status: "Accepted" | "Rejected" | "Requested";
337
352
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
338
- type: "APPROVE_CORRECTION";
339
- requestId: string;
340
- content?: {
341
- immediateCorrection?: boolean | undefined;
342
- } | undefined;
343
353
  } | {
344
354
  id: string & import("zod").$brand<"UUID">;
345
355
  transactionId: string;
346
- createdByUserType: "system" | "user";
356
+ createdByUserType: "user" | "system";
347
357
  createdAt: string;
348
358
  createdBy: string;
359
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
360
+ status: "Requested" | "Accepted" | "Rejected";
361
+ type: "DECLARE";
349
362
  createdByRole?: string | undefined;
350
363
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
351
364
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
352
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
353
365
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
354
- status: "Accepted" | "Rejected" | "Requested";
355
366
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
356
- type: "REJECT_CORRECTION";
357
- requestId: string;
358
- content: {
359
- reason: string;
360
- };
361
367
  } | {
362
368
  id: string & import("zod").$brand<"UUID">;
363
369
  transactionId: string;
364
- createdByUserType: "system" | "user";
370
+ createdByUserType: "user" | "system";
365
371
  createdAt: string;
366
372
  createdBy: string;
373
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
374
+ status: "Requested" | "Accepted" | "Rejected";
375
+ type: "ASSIGN";
376
+ assignedTo: string;
367
377
  createdByRole?: string | undefined;
368
378
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
369
379
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
370
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
371
380
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
372
- status: "Accepted" | "Rejected" | "Requested";
373
381
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
374
- type: "UNASSIGN";
375
382
  } | {
376
383
  id: string & import("zod").$brand<"UUID">;
377
384
  transactionId: string;
378
- createdByUserType: "system" | "user";
385
+ createdByUserType: "user" | "system";
379
386
  createdAt: string;
380
387
  createdBy: string;
388
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
389
+ status: "Requested" | "Accepted" | "Rejected";
390
+ type: "APPROVE_CORRECTION";
391
+ requestId: string;
381
392
  createdByRole?: string | undefined;
382
393
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
383
394
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
384
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
385
395
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
386
- status: "Accepted" | "Rejected" | "Requested";
387
396
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
388
- type: "PRINT_CERTIFICATE";
389
397
  content?: {
390
- templateId?: string | undefined;
391
- } | null | undefined;
398
+ immediateCorrection?: boolean | undefined;
399
+ } | undefined;
392
400
  } | {
393
401
  id: string & import("zod").$brand<"UUID">;
394
402
  transactionId: string;
395
- createdByUserType: "system" | "user";
403
+ createdByUserType: "user" | "system";
396
404
  createdAt: string;
397
405
  createdBy: string;
406
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
407
+ status: "Requested" | "Accepted" | "Rejected";
408
+ type: "REJECT_CORRECTION";
409
+ requestId: string;
410
+ content: {
411
+ reason: string;
412
+ };
398
413
  createdByRole?: string | undefined;
399
414
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
400
415
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
401
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
402
416
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
403
- status: "Accepted" | "Rejected" | "Requested";
404
417
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
405
- type: "READ";
406
418
  } | {
407
419
  id: string & import("zod").$brand<"UUID">;
408
420
  transactionId: string;
409
- createdByUserType: "system" | "user";
421
+ createdByUserType: "user" | "system";
410
422
  createdAt: string;
411
423
  createdBy: string;
424
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
425
+ status: "Requested" | "Accepted" | "Rejected";
426
+ type: "UNASSIGN";
412
427
  createdByRole?: string | undefined;
413
428
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
414
429
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
415
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
416
430
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
417
- status: "Accepted" | "Rejected" | "Requested";
418
431
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
419
- type: "EDIT";
420
- content: {
421
- comment?: string | undefined;
422
- };
423
432
  } | {
424
433
  id: string & import("zod").$brand<"UUID">;
425
434
  transactionId: string;
426
- createdByUserType: "system" | "user";
435
+ createdByUserType: "user" | "system";
427
436
  createdAt: string;
428
437
  createdBy: string;
438
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
439
+ status: "Requested" | "Accepted" | "Rejected";
440
+ type: "READ";
429
441
  createdByRole?: string | undefined;
430
442
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
431
443
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
432
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
433
444
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
434
- status: "Accepted" | "Rejected" | "Requested";
435
445
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
436
- type: "CUSTOM";
437
- customActionType: string;
438
446
  } | {
439
447
  id: string & import("zod").$brand<"UUID">;
440
448
  transactionId: string;
441
- createdByUserType: "system" | "user";
449
+ createdByUserType: "user" | "system";
442
450
  createdAt: string;
443
451
  createdBy: string;
452
+ type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
453
+ status: "Rejected";
444
454
  createdByRole?: string | undefined;
445
455
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
446
456
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
447
457
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
448
- type: "APPROVE_CORRECTION" | "ARCHIVE" | "CUSTOM" | "DECLARE" | "EDIT" | "NOTIFY" | "PRINT_CERTIFICATE" | "REGISTER" | "REJECT" | "REJECT_CORRECTION" | "REQUEST_CORRECTION";
449
- status: "Rejected";
450
458
  } | undefined;
451
459
  /**
452
460
  * Tell compiler that accessing record with arbitrary key might result to undefined