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

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 (117) hide show
  1. package/README.md +15 -0
  2. package/build.sh +3 -2
  3. package/dist/application-config/index.js +17 -6
  4. package/dist/cli.js +3253 -47
  5. package/dist/commons/api/router.d.ts +2964 -2949
  6. package/dist/commons/application-config/index.d.ts +6 -6
  7. package/dist/commons/conditionals/conditionals.d.ts +32 -323
  8. package/dist/commons/events/ActionConfig.d.ts +93 -67
  9. package/dist/commons/events/ActionDocument.d.ts +107 -107
  10. package/dist/commons/events/ActionType.d.ts +57 -57
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +501 -489
  12. package/dist/commons/events/AuditLog.d.ts +41 -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 +603 -561
  16. package/dist/commons/events/Draft.d.ts +35 -35
  17. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  18. package/dist/commons/events/EventConfig.d.ts +5 -3
  19. package/dist/commons/events/EventDocument.d.ts +43 -43
  20. package/dist/commons/events/EventIndex.d.ts +76 -51
  21. package/dist/commons/events/EventMetadata.d.ts +60 -34
  22. package/dist/commons/events/FieldConfig.d.ts +331 -321
  23. package/dist/commons/events/FieldType.d.ts +51 -51
  24. package/dist/commons/events/FieldTypeMapping.d.ts +101 -101
  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 +837 -798
  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 +5 -4
  34. package/dist/commons/events/mocks.test.utils.d.ts +2 -2
  35. package/dist/commons/events/scopes.d.ts +4 -4
  36. package/dist/commons/events/state/index.d.ts +23 -15
  37. package/dist/commons/events/state/utils.d.ts +15 -6
  38. package/dist/commons/events/test.utils.d.ts +33 -33
  39. package/dist/commons/events/utils.d.ts +110 -110
  40. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  41. package/dist/conditionals/index.js +10 -5
  42. package/dist/environment/custom-types.d.ts +33 -0
  43. package/dist/environment/custom-types.d.ts.map +1 -0
  44. package/dist/environment/custom-types.js +12 -0
  45. package/dist/environment/derived-variables.d.ts +134 -0
  46. package/dist/environment/derived-variables.d.ts.map +1 -0
  47. package/dist/environment/derived-variables.js +169 -0
  48. package/dist/environment/editor-questions.d.ts +4 -0
  49. package/dist/environment/editor-questions.d.ts.map +1 -0
  50. package/dist/environment/editor-questions.js +67 -0
  51. package/dist/environment/git.d.ts +5 -0
  52. package/dist/environment/git.d.ts.map +1 -0
  53. package/dist/environment/git.js +38 -0
  54. package/dist/environment/github.d.ts +26 -0
  55. package/dist/environment/github.d.ts.map +1 -0
  56. package/dist/environment/github.js +247 -0
  57. package/dist/environment/index.d.ts +5 -0
  58. package/dist/environment/index.d.ts.map +1 -0
  59. package/dist/environment/index.js +71 -0
  60. package/dist/environment/logger.d.ts +6 -0
  61. package/dist/environment/logger.d.ts.map +1 -0
  62. package/dist/environment/logger.js +25 -0
  63. package/dist/environment/manage-users.d.ts +11 -0
  64. package/dist/environment/manage-users.d.ts.map +1 -0
  65. package/dist/environment/manage-users.js +507 -0
  66. package/dist/environment/questions-helper.d.ts +15 -0
  67. package/dist/environment/questions-helper.d.ts.map +1 -0
  68. package/dist/environment/questions-helper.js +70 -0
  69. package/dist/environment/questions.d.ts +200 -0
  70. package/dist/environment/questions.d.ts.map +1 -0
  71. package/dist/environment/questions.js +412 -0
  72. package/dist/environment/setup-environment.d.ts +2 -0
  73. package/dist/environment/setup-environment.d.ts.map +1 -0
  74. package/dist/environment/setup-environment.js +788 -0
  75. package/dist/environment/ssh-keygen.d.ts +5 -0
  76. package/dist/environment/ssh-keygen.d.ts.map +1 -0
  77. package/dist/environment/ssh-keygen.js +21 -0
  78. package/dist/environment/swarm-to-k8s.d.ts +2 -0
  79. package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
  80. package/dist/environment/swarm-to-k8s.js +183 -0
  81. package/dist/environment/templates.d.ts +27 -0
  82. package/dist/environment/templates.d.ts.map +1 -0
  83. package/dist/environment/templates.js +163 -0
  84. package/dist/environment/update-workflows.d.ts +2 -0
  85. package/dist/environment/update-workflows.d.ts.map +1 -0
  86. package/dist/environment/update-workflows.js +179 -0
  87. package/dist/environment/users.d.ts +2 -0
  88. package/dist/environment/users.d.ts.map +1 -0
  89. package/dist/environment/users.js +122 -0
  90. package/dist/environment/utils.d.ts +18 -0
  91. package/dist/environment/utils.d.ts.map +1 -0
  92. package/dist/environment/utils.js +110 -0
  93. package/dist/events/deduplication.d.ts +1 -1
  94. package/dist/events/index.js +176 -59
  95. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  96. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  97. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
  98. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  99. package/dist/migrations/v2.0/index.js +11 -6
  100. package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
  101. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  102. package/dist/notification/index.js +99 -8
  103. package/dist/scopes/index.d.ts +205 -117
  104. package/dist/scopes/index.js +10 -5
  105. package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
  106. package/dist/templates/charts-values/dependencies/values.yaml +83 -0
  107. package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
  108. package/dist/templates/charts-values/opencrvs-services/values.yaml +81 -0
  109. package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
  110. package/dist/templates/charts-values/traefik/values.yaml +115 -0
  111. package/dist/templates/inventory/inventory.template.yml +100 -0
  112. package/dist/templates/inventory/production.example.yml +77 -0
  113. package/dist/templates/inventory/qa.example.yml +48 -0
  114. package/opencrvs-toolkit-2.0.0-rc.ecef004.tgz +0 -0
  115. package/package.json +16 -3
  116. package/tsconfig.tsbuildinfo +1 -1
  117. package/opencrvs-toolkit-2.0.0-rc.ec8335d.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";
26
27
  FIELD_AGENT: "FIELD_AGENT";
27
28
  LOCAL_REGISTRAR: "LOCAL_REGISTRAR";
28
29
  LOCAL_SYSTEM_ADMIN: "LOCAL_SYSTEM_ADMIN";
29
30
  NATIONAL_REGISTRAR: "NATIONAL_REGISTRAR";
30
- REGISTRATION_AGENT: "REGISTRATION_AGENT";
31
31
  NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
32
- SOCIAL_WORKER: "SOCIAL_WORKER";
33
- COMMUNITY_LEADER: "COMMUNITY_LEADER";
34
32
  PROVINCIAL_REGISTRAR: "PROVINCIAL_REGISTRAR";
33
+ REGISTRATION_AGENT: "REGISTRATION_AGENT";
34
+ SOCIAL_WORKER: "SOCIAL_WORKER";
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">>) => {
80
+ declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
81
+ keepAssignment?: boolean | undefined;
82
+ type: "DECLARE";
81
83
  transactionId: string;
82
84
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
83
85
  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">>) => {
99
- transactionId: string;
100
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
101
- annotation: {};
98
+ edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
102
99
  keepAssignment?: boolean | undefined;
103
100
  type: "EDIT";
104
101
  content: {
105
102
  comment: string;
106
103
  };
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">>) => {
124
- transactionId: string;
125
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
123
+ archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
126
124
  keepAssignment?: boolean | undefined;
127
125
  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">>) => {
135
- transactionId: string;
136
- annotation: {};
134
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
137
135
  keepAssignment?: boolean | undefined;
138
136
  type: "REJECT";
137
+ transactionId: string;
139
138
  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">>) => {
145
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber'>>) => {
146
+ keepAssignment?: boolean | undefined;
147
+ registrationNumber?: string | undefined;
148
+ type: "REGISTER";
146
149
  transactionId: string;
147
150
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
148
151
  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">>) => {
155
- transactionId: string;
156
- annotation: {};
154
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
157
155
  keepAssignment?: boolean | undefined;
158
156
  type: "PRINT_CERTIFICATE";
157
+ transactionId: string;
159
158
  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: Record<string, import("./FieldValue").FieldUpdateValue>;
166
+ declaration: import("lodash").Omit<Record<string, import("./FieldValue").FieldUpdateValue>, "applicant.email" | "applicant.image">;
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
- 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,299 +154,299 @@ 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
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
161
- status: "Requested" | "Accepted" | "Rejected";
162
- type: "REGISTER";
163
160
  createdByRole?: string | undefined;
164
161
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
165
162
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
163
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
166
164
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
165
+ status: "Accepted" | "Rejected" | "Requested";
167
166
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
168
- registrationNumber?: string | undefined;
167
+ type: "CREATE";
169
168
  } | {
170
169
  id: string & import("zod").$brand<"UUID">;
171
170
  transactionId: string;
172
- createdByUserType: "user" | "system";
171
+ createdByUserType: "system" | "user";
173
172
  createdAt: string;
174
173
  createdBy: string;
175
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
176
- status: "Requested" | "Accepted" | "Rejected";
177
- type: "DUPLICATE_DETECTED";
178
- content: {
179
- duplicates: {
180
- id: string & import("zod").$brand<"UUID">;
181
- trackingId: string;
182
- }[];
183
- };
184
174
  createdByRole?: string | undefined;
185
175
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
186
176
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
177
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
187
178
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
179
+ status: "Accepted" | "Rejected" | "Requested";
188
180
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
181
+ type: "REJECT";
182
+ content: {
183
+ reason: string;
184
+ };
189
185
  } | {
190
186
  id: string & import("zod").$brand<"UUID">;
191
187
  transactionId: string;
192
- createdByUserType: "user" | "system";
188
+ createdByUserType: "system" | "user";
193
189
  createdAt: string;
194
190
  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
191
  createdByRole?: string | undefined;
202
192
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
203
193
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
194
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
204
195
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
196
+ status: "Accepted" | "Rejected" | "Requested";
205
197
  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
+ };
206
205
  } | {
207
206
  id: string & import("zod").$brand<"UUID">;
208
207
  transactionId: string;
209
- createdByUserType: "user" | "system";
208
+ createdByUserType: "system" | "user";
210
209
  createdAt: string;
211
210
  createdBy: string;
212
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
213
- status: "Requested" | "Accepted" | "Rejected";
214
- type: "PRINT_CERTIFICATE";
215
211
  createdByRole?: string | undefined;
216
212
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
217
213
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
214
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
218
215
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
216
+ status: "Accepted" | "Rejected" | "Requested";
219
217
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
220
- content?: {
221
- templateId?: string | undefined;
222
- } | null | undefined;
218
+ type: "MARK_AS_NOT_DUPLICATE";
223
219
  } | {
224
220
  id: string & import("zod").$brand<"UUID">;
225
221
  transactionId: string;
226
- createdByUserType: "user" | "system";
222
+ createdByUserType: "system" | "user";
227
223
  createdAt: string;
228
224
  createdBy: string;
229
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
230
- status: "Requested" | "Accepted" | "Rejected";
231
- type: "REQUEST_CORRECTION";
232
225
  createdByRole?: string | undefined;
233
226
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
234
227
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
228
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
235
229
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
230
+ status: "Accepted" | "Rejected" | "Requested";
236
231
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
232
+ type: "MARK_AS_DUPLICATE";
233
+ content?: {
234
+ duplicateOf: string & import("zod").$brand<"UUID">;
235
+ } | undefined;
237
236
  } | {
238
237
  id: string & import("zod").$brand<"UUID">;
239
238
  transactionId: string;
240
- createdByUserType: "user" | "system";
239
+ createdByUserType: "system" | "user";
241
240
  createdAt: string;
242
241
  createdBy: string;
243
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
244
- status: "Requested" | "Accepted" | "Rejected";
245
- type: "CUSTOM";
246
- customActionType: string;
247
242
  createdByRole?: string | undefined;
248
243
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
249
244
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
245
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
250
246
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
247
+ status: "Accepted" | "Rejected" | "Requested";
251
248
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
249
+ type: "ARCHIVE";
250
+ content: {
251
+ reason: string;
252
+ };
252
253
  } | {
253
254
  id: string & import("zod").$brand<"UUID">;
254
255
  transactionId: string;
255
- createdByUserType: "user" | "system";
256
+ createdByUserType: "system" | "user";
256
257
  createdAt: string;
257
258
  createdBy: string;
258
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
259
- status: "Requested" | "Accepted" | "Rejected";
260
- type: "CREATE";
261
259
  createdByRole?: string | undefined;
262
260
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
263
261
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
262
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
264
263
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
264
+ status: "Accepted" | "Rejected" | "Requested";
265
265
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
266
+ type: "NOTIFY";
266
267
  } | {
267
268
  id: string & import("zod").$brand<"UUID">;
268
269
  transactionId: string;
269
- createdByUserType: "user" | "system";
270
+ createdByUserType: "system" | "user";
270
271
  createdAt: string;
271
272
  createdBy: string;
272
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
273
- status: "Requested" | "Accepted" | "Rejected";
274
- type: "REJECT";
275
- content: {
276
- reason: string;
277
- };
278
273
  createdByRole?: string | undefined;
279
274
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
280
275
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
276
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
281
277
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
278
+ status: "Accepted" | "Rejected" | "Requested";
282
279
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
280
+ type: "REGISTER";
281
+ registrationNumber?: string | undefined;
283
282
  } | {
284
283
  id: string & import("zod").$brand<"UUID">;
285
284
  transactionId: string;
286
- createdByUserType: "user" | "system";
285
+ createdByUserType: "system" | "user";
287
286
  createdAt: string;
288
287
  createdBy: string;
289
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
290
- status: "Requested" | "Accepted" | "Rejected";
291
- type: "MARK_AS_NOT_DUPLICATE";
292
288
  createdByRole?: string | undefined;
293
289
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
294
290
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
291
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
295
292
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
293
+ status: "Accepted" | "Rejected" | "Requested";
296
294
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
295
+ type: "DECLARE";
297
296
  } | {
298
297
  id: string & import("zod").$brand<"UUID">;
299
298
  transactionId: string;
300
- createdByUserType: "user" | "system";
299
+ createdByUserType: "system" | "user";
301
300
  createdAt: string;
302
301
  createdBy: string;
303
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
304
- status: "Requested" | "Accepted" | "Rejected";
305
- type: "MARK_AS_DUPLICATE";
306
302
  createdByRole?: string | undefined;
307
303
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
308
304
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
305
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
309
306
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
307
+ status: "Accepted" | "Rejected" | "Requested";
310
308
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
311
- content?: {
312
- duplicateOf: string & import("zod").$brand<"UUID">;
313
- } | undefined;
309
+ type: "ASSIGN";
310
+ assignedTo: string;
314
311
  } | {
315
312
  id: string & import("zod").$brand<"UUID">;
316
313
  transactionId: string;
317
- createdByUserType: "user" | "system";
314
+ createdByUserType: "system" | "user";
318
315
  createdAt: string;
319
316
  createdBy: string;
320
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
321
- status: "Requested" | "Accepted" | "Rejected";
322
- type: "ARCHIVE";
323
- content: {
324
- reason: string;
325
- };
326
317
  createdByRole?: string | undefined;
327
318
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
328
319
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
320
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
329
321
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
322
+ status: "Accepted" | "Rejected" | "Requested";
330
323
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
324
+ type: "REQUEST_CORRECTION";
331
325
  } | {
332
326
  id: string & import("zod").$brand<"UUID">;
333
327
  transactionId: string;
334
- createdByUserType: "user" | "system";
328
+ createdByUserType: "system" | "user";
335
329
  createdAt: string;
336
330
  createdBy: string;
337
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
338
- status: "Requested" | "Accepted" | "Rejected";
339
- type: "NOTIFY";
340
331
  createdByRole?: string | undefined;
341
332
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
342
333
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
334
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
343
335
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
336
+ status: "Accepted" | "Rejected" | "Requested";
344
337
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
338
+ type: "APPROVE_CORRECTION";
339
+ requestId: string;
340
+ content?: {
341
+ immediateCorrection?: boolean | undefined;
342
+ } | undefined;
345
343
  } | {
346
344
  id: string & import("zod").$brand<"UUID">;
347
345
  transactionId: string;
348
- createdByUserType: "user" | "system";
346
+ createdByUserType: "system" | "user";
349
347
  createdAt: string;
350
348
  createdBy: string;
351
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
352
- status: "Requested" | "Accepted" | "Rejected";
353
- type: "DECLARE";
354
349
  createdByRole?: string | undefined;
355
350
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
356
351
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
352
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
357
353
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
354
+ status: "Accepted" | "Rejected" | "Requested";
358
355
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
356
+ type: "REJECT_CORRECTION";
357
+ requestId: string;
358
+ content: {
359
+ reason: string;
360
+ };
359
361
  } | {
360
362
  id: string & import("zod").$brand<"UUID">;
361
363
  transactionId: string;
362
- createdByUserType: "user" | "system";
364
+ createdByUserType: "system" | "user";
363
365
  createdAt: string;
364
366
  createdBy: string;
365
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
366
- status: "Requested" | "Accepted" | "Rejected";
367
- type: "ASSIGN";
368
- assignedTo: string;
369
367
  createdByRole?: string | undefined;
370
368
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
371
369
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
370
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
372
371
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
372
+ status: "Accepted" | "Rejected" | "Requested";
373
373
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
374
+ type: "UNASSIGN";
374
375
  } | {
375
376
  id: string & import("zod").$brand<"UUID">;
376
377
  transactionId: string;
377
- createdByUserType: "user" | "system";
378
+ createdByUserType: "system" | "user";
378
379
  createdAt: string;
379
380
  createdBy: string;
380
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
381
- status: "Requested" | "Accepted" | "Rejected";
382
- type: "APPROVE_CORRECTION";
383
- requestId: string;
384
381
  createdByRole?: string | undefined;
385
382
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
386
383
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
384
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
387
385
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
386
+ status: "Accepted" | "Rejected" | "Requested";
388
387
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
388
+ type: "PRINT_CERTIFICATE";
389
389
  content?: {
390
- immediateCorrection?: boolean | undefined;
391
- } | undefined;
390
+ templateId?: string | undefined;
391
+ } | null | undefined;
392
392
  } | {
393
393
  id: string & import("zod").$brand<"UUID">;
394
394
  transactionId: string;
395
- createdByUserType: "user" | "system";
395
+ createdByUserType: "system" | "user";
396
396
  createdAt: string;
397
397
  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
398
  createdByRole?: string | undefined;
406
399
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
407
400
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
401
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
408
402
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
403
+ status: "Accepted" | "Rejected" | "Requested";
409
404
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
405
+ type: "READ";
410
406
  } | {
411
407
  id: string & import("zod").$brand<"UUID">;
412
408
  transactionId: string;
413
- createdByUserType: "user" | "system";
409
+ createdByUserType: "system" | "user";
414
410
  createdAt: string;
415
411
  createdBy: string;
416
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
417
- status: "Requested" | "Accepted" | "Rejected";
418
- type: "UNASSIGN";
419
412
  createdByRole?: string | undefined;
420
413
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
421
414
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
415
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
422
416
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
417
+ status: "Accepted" | "Rejected" | "Requested";
423
418
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
419
+ type: "EDIT";
420
+ content: {
421
+ comment?: string | undefined;
422
+ };
424
423
  } | {
425
424
  id: string & import("zod").$brand<"UUID">;
426
425
  transactionId: string;
427
- createdByUserType: "user" | "system";
426
+ createdByUserType: "system" | "user";
428
427
  createdAt: string;
429
428
  createdBy: string;
430
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
431
- status: "Requested" | "Accepted" | "Rejected";
432
- type: "READ";
433
429
  createdByRole?: string | undefined;
434
430
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
435
431
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
432
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
436
433
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
434
+ status: "Accepted" | "Rejected" | "Requested";
437
435
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
436
+ type: "CUSTOM";
437
+ customActionType: string;
438
438
  } | {
439
439
  id: string & import("zod").$brand<"UUID">;
440
440
  transactionId: string;
441
- createdByUserType: "user" | "system";
441
+ createdByUserType: "system" | "user";
442
442
  createdAt: string;
443
443
  createdBy: string;
444
- type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
445
- status: "Rejected";
446
444
  createdByRole?: string | undefined;
447
445
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
448
446
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
449
447
  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
450
  } | undefined;
451
451
  /**
452
452
  * Tell compiler that accessing record with arbitrary key might result to undefined