@opencrvs/toolkit 1.9.12-rc.f5ca5e6 → 1.9.12-rc.f687751

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 (128) hide show
  1. package/build.sh +8 -0
  2. package/dist/application-config/index.js +2045 -41
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +4841 -0
  6. package/dist/commons/api/router.d.ts +475 -244
  7. package/dist/commons/application-config/index.d.ts +13 -16
  8. package/dist/commons/conditionals/conditionals.d.ts +8 -8
  9. package/dist/commons/events/ActionDocument.d.ts +196 -196
  10. package/dist/commons/events/ActionInput.d.ts +113 -113
  11. package/dist/commons/events/ActionType.d.ts +3 -3
  12. package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
  13. package/dist/commons/events/AuditLog.d.ts +347 -163
  14. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +461 -190
  16. package/dist/commons/events/Draft.d.ts +9 -9
  17. package/dist/commons/events/DynamicFieldValue.d.ts +37 -19
  18. package/dist/commons/events/EventConfig.d.ts +3 -1
  19. package/dist/commons/events/EventDocument.d.ts +80 -80
  20. package/dist/commons/events/EventIndex.d.ts +35 -27
  21. package/dist/commons/events/EventInput.d.ts +1 -1
  22. package/dist/commons/events/EventMetadata.d.ts +19 -19
  23. package/dist/commons/events/FieldConfig.d.ts +287 -71
  24. package/dist/commons/events/FieldType.d.ts +2 -1
  25. package/dist/commons/events/FieldTypeMapping.d.ts +98 -72
  26. package/dist/commons/events/FieldValue.d.ts +54 -26
  27. package/dist/commons/events/PlainDate.d.ts +1 -1
  28. package/dist/commons/events/WorkqueueColumnConfig.d.ts +7 -7
  29. package/dist/commons/events/WorkqueueConfig.d.ts +443 -199
  30. package/dist/commons/events/defineConfig.d.ts +0 -4
  31. package/dist/commons/events/locations.d.ts +4 -4
  32. package/dist/commons/events/scopes.d.ts +4 -3
  33. package/dist/commons/events/state/index.d.ts +2 -2
  34. package/dist/commons/events/state/utils.d.ts +1 -1
  35. package/dist/commons/events/test.utils.d.ts +2 -2
  36. package/dist/commons/events/utils.d.ts +3 -175
  37. package/dist/commons/notification/UserNotifications.d.ts +21 -1
  38. package/dist/conditionals/index.js +74 -359
  39. package/dist/events/index.js +1207 -1260
  40. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  41. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  42. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +404 -0
  43. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  44. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  45. package/dist/migrations/v2.0/add-resend-invite-notification.js +345 -0
  46. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +22 -0
  47. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  48. package/dist/migrations/v2.0/checkout-upstream-files.js +147 -0
  49. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  50. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  51. package/dist/migrations/v2.0/convert-config-files-to-ts.js +828 -0
  52. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  53. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  54. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +158 -0
  55. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  56. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  57. package/dist/migrations/v2.0/create-events-index.js +325 -0
  58. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +3 -0
  59. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  60. package/dist/migrations/v2.0/delete-infrastructure-directory.js +77 -0
  61. package/dist/migrations/v2.0/index.d.ts +11 -0
  62. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  63. package/dist/migrations/v2.0/index.js +4751 -0
  64. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  65. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  66. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +343 -0
  67. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +3 -0
  68. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  69. package/dist/migrations/v2.0/merge-infrastructure-directory.js +221 -0
  70. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  71. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  73. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  74. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  75. package/dist/migrations/v2.0/migrate-scopes.js +281 -0
  76. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  77. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  78. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  79. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  80. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  81. package/dist/migrations/v2.0/migrate-workqueue-configs.js +236 -0
  82. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  83. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  84. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  85. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  86. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  87. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  88. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  89. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  90. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  91. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  92. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  93. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  94. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  95. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  96. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  97. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  98. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  99. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  100. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  101. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  102. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  103. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  104. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  105. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  106. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  107. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  108. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  109. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  110. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  111. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  112. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  113. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  114. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  115. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  116. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  117. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  118. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  119. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  120. package/dist/migrations/v2.0/update-package-json.js +105 -0
  121. package/dist/notification/index.js +1013 -1135
  122. package/dist/scopes/index.d.ts +389 -152
  123. package/dist/scopes/index.js +128 -322
  124. package/opencrvs-toolkit-1.9.12-rc.f687751.tgz +0 -0
  125. package/package.json +11 -7
  126. package/tsconfig.json +3 -0
  127. package/tsconfig.tsbuildinfo +1 -1
  128. package/opencrvs-toolkit-1.9.12-rc.f5ca5e6.tgz +0 -0
@@ -1,7 +1,3 @@
1
1
  import { EventConfig, EventConfigInput } from './EventConfig';
2
- /**
3
- * Builds a validated configuration for an event
4
- * @param config - Event specific configuration
5
- */
6
2
  export declare const defineConfig: (config: EventConfigInput) => EventConfig;
7
3
  //# sourceMappingURL=defineConfig.d.ts.map
@@ -11,18 +11,18 @@ export declare const LocationTypeV1: z.ZodEnum<{
11
11
  }>;
12
12
  export type LocationTypeV1 = z.infer<typeof LocationTypeV1>;
13
13
  export declare const AdministrativeArea: z.ZodObject<{
14
- id: z.core.$ZodBranded<z.ZodUUID, "UUID">;
14
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
15
15
  name: z.ZodString;
16
16
  externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
- parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID">>;
17
+ parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
18
18
  validUntil: z.ZodNullable<z.ZodISODateTime>;
19
19
  }, z.core.$strip>;
20
20
  export type AdministrativeArea = z.infer<typeof AdministrativeArea>;
21
21
  export declare const Location: z.ZodObject<{
22
- id: z.core.$ZodBranded<z.ZodUUID, "UUID">;
22
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
23
23
  name: z.ZodString;
24
24
  externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
- administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID">>;
25
+ administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
26
26
  validUntil: z.ZodNullable<z.ZodISODateTime>;
27
27
  locationType: z.ZodNullable<z.ZodString>;
28
28
  }, z.core.$strip>;
@@ -1,4 +1,5 @@
1
1
  import { DisplayableAction } from './ActionType';
2
+ import { EncodedScope } from '../scopes';
2
3
  import { EventIndexWithAdministrativeHierarchy } from './locations';
3
4
  import { UserContext } from '../users/User';
4
5
  import { EventIndex } from './EventIndex';
@@ -8,7 +9,7 @@ export declare const ACTION_SCOPE_MAP: {
8
9
  NOTIFY: "record.notify"[];
9
10
  DECLARE: ("record.declare" | "record.register")[];
10
11
  EDIT: "record.edit"[];
11
- DELETE: "record.declare"[];
12
+ DELETE: ("record.declare" | "record.notify")[];
12
13
  REGISTER: "record.register"[];
13
14
  PRINT_CERTIFICATE: "record.print-certified-copies"[];
14
15
  REQUEST_CORRECTION: ("record.request-correction" | "record.correct")[];
@@ -40,14 +41,14 @@ export declare function getAssignmentStatus(eventState: EventIndex | EventIndexW
40
41
  * (hardcoded, non-configurable) and V2 scopes, which validate event type, jurisdiction,
41
42
  * and user context via {@link userCanAccessEventWithScopes}.
42
43
  *
43
- * @param {string[]} scopes - The raw encoded scope strings the user possesses (from JWT).
44
+ * @param {EncodedScope[]} scopes - The raw encoded scope strings the user possesses (from JWT).
44
45
  * @param {DisplayableAction} action - The action to check authorization for.
45
46
  * @param {EventIndexWithAdministrativeHierarchy} event - The event with resolved administrative hierarchy.
46
47
  * @param {UserContext} currentUser - The current user's context used for V2 scope validation.
47
48
  * @returns {boolean} True if the action is in scope for the user, otherwise false.
48
49
  */
49
50
  export declare function isActionInScope({ scopes, action, event, currentUser }: {
50
- scopes: string[];
51
+ scopes: EncodedScope[];
51
52
  action: DisplayableAction;
52
53
  event: EventIndexWithAdministrativeHierarchy;
53
54
  currentUser: UserContext;
@@ -7,7 +7,7 @@ import { Draft } from '../Draft';
7
7
  import { EventConfig } from '../EventConfig';
8
8
  import { UUID } from '../../uuid';
9
9
  import { DocumentPath } from '../../documents';
10
- export declare function getStatusFromActions(actions: Array<Action>): "ARCHIVED" | "DECLARED" | "REGISTERED" | "CREATED" | "NOTIFIED";
10
+ export declare function getStatusFromActions(actions: Array<Action>): "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
11
11
  export declare function getAssignedUserFromActions(actions: Array<ActionDocument>): string | null;
12
12
  export declare function getAssignedUserSignatureFromActions(actions: Array<ActionDocument>): string | null;
13
13
  type NonNullableDeep<T> = T extends [unknown, ...unknown[]] ? {
@@ -64,7 +64,7 @@ export declare function applyDeclarationToEventIndex(eventIndex: EventIndex, dec
64
64
  export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Draft, eventConfiguration: EventConfig): {
65
65
  id: string & import("zod").$brand<"UUID">;
66
66
  type: string;
67
- status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "CREATED" | "NOTIFIED";
67
+ status: "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
68
68
  legalStatuses: {
69
69
  DECLARED?: {
70
70
  createdAt: string;
@@ -293,7 +293,7 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
293
293
  createdByUserType: "user" | "system";
294
294
  createdAt: string;
295
295
  createdBy: string;
296
- type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
296
+ type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
297
297
  status: "Rejected";
298
298
  createdByRole?: string | undefined;
299
299
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
@@ -24,11 +24,11 @@ export declare const TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
24
24
  */
25
25
  export declare const TestUserRole: z.ZodEnum<{
26
26
  FIELD_AGENT: "FIELD_AGENT";
27
- REGISTRATION_AGENT: "REGISTRATION_AGENT";
28
27
  LOCAL_REGISTRAR: "LOCAL_REGISTRAR";
29
28
  LOCAL_SYSTEM_ADMIN: "LOCAL_SYSTEM_ADMIN";
30
- NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
31
29
  NATIONAL_REGISTRAR: "NATIONAL_REGISTRAR";
30
+ REGISTRATION_AGENT: "REGISTRATION_AGENT";
31
+ NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
32
32
  SOCIAL_WORKER: "SOCIAL_WORKER";
33
33
  COMMUNITY_LEADER: "COMMUNITY_LEADER";
34
34
  PROVINCIAL_REGISTRAR: "PROVINCIAL_REGISTRAR";
@@ -131,7 +131,7 @@ export declare function isPageVisible(page: PageConfig, formValues: ActionUpdate
131
131
  * * @param validatorContext - custom validation context
132
132
  * @returns {Partial<T>} A new object containing only the values for visible fields
133
133
  */
134
- export declare function omitHiddenFields<T extends EventState | ActionUpdate>(fields: FieldConfig[], formValues: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<T>;
134
+ export declare function omitHiddenFields<T extends EventState | ActionUpdate>(fields: FieldConfig[], formValues: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean, declarationContext?: EventState): Partial<T>;
135
135
  export declare function omitHiddenPaginatedFields<T extends EventState | ActionUpdate>(formConfig: FormConfig, values: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<Partial<T>>;
136
136
  /**
137
137
  *
@@ -141,179 +141,7 @@ export declare function findActiveDraftForEvent(event: EventDocument, draft: Dra
141
141
  export declare function createEmptyDraft(eventId: UUID, draftId: UUID, actionType: Exclude<ActionType, 'DELETE'>): Draft;
142
142
  export declare function isVerificationPage(page: PageConfig): page is VerificationPageConfig;
143
143
  export declare function getVisibleVerificationPageIds(pages: PageConfig[], annotation: ActionUpdate, context: ValidatorContext): string[];
144
- export declare function omitHiddenAnnotationFields(actionConfig: ActionConfig, declaration: EventState, annotation: ActionUpdate, context: ValidatorContext): Partial<{
145
- [x: string]: string | number | boolean | {
146
- path: string & import("zod").$brand<"DocumentPath">;
147
- originalFilename: string;
148
- type: string;
149
- } | {
150
- firstname: string;
151
- surname: string;
152
- middlename?: string | undefined;
153
- } | {
154
- firstname?: string | null | undefined;
155
- surname?: string | null | undefined;
156
- middlename?: string | null | undefined;
157
- } | {
158
- country: string;
159
- addressType: "DOMESTIC";
160
- administrativeArea: string;
161
- streetLevelDetails?: Record<string, string> | undefined;
162
- } | {
163
- country: string;
164
- addressType: "INTERNATIONAL";
165
- streetLevelDetails?: Record<string, string> | undefined;
166
- } | {
167
- addressType: "DOMESTIC";
168
- country?: string | null | undefined;
169
- streetLevelDetails?: Record<string, string | null> | null | undefined;
170
- administrativeArea?: string | null | undefined;
171
- } | {
172
- addressType: "INTERNATIONAL";
173
- country?: string | null | undefined;
174
- streetLevelDetails?: Record<string, string | null> | null | undefined;
175
- } | {
176
- path: string & import("zod").$brand<"DocumentPath">;
177
- originalFilename: string;
178
- type: string;
179
- option: string;
180
- }[] | {
181
- loading: boolean;
182
- data: any;
183
- error?: {
184
- statusCode: number;
185
- message: string;
186
- } | null | undefined;
187
- } | {
188
- data: Record<string, string>;
189
- updatedAt: string;
190
- } | {
191
- data: any;
192
- } | {
193
- numericValue: number;
194
- unit: string;
195
- } | {
196
- numericValue?: number | undefined;
197
- unit?: string | undefined;
198
- } | import("zod").$brand<"CustomFieldValue"> | (string & import("zod").$brand<"PlainDate">) | {
199
- age: number;
200
- asOfDateRef: string;
201
- } | {
202
- start: string & import("zod").$brand<"PlainDate">;
203
- end: string & import("zod").$brand<"PlainDate">;
204
- } | Record<string, string | number | boolean | {
205
- path: string & import("zod").$brand<"DocumentPath">;
206
- originalFilename: string;
207
- type: string;
208
- } | {
209
- firstname: string;
210
- surname: string;
211
- middlename?: string | undefined;
212
- } | {
213
- firstname?: string | null | undefined;
214
- surname?: string | null | undefined;
215
- middlename?: string | null | undefined;
216
- } | {
217
- country: string;
218
- addressType: "DOMESTIC";
219
- administrativeArea: string;
220
- streetLevelDetails?: Record<string, string> | undefined;
221
- } | {
222
- country: string;
223
- addressType: "INTERNATIONAL";
224
- streetLevelDetails?: Record<string, string> | undefined;
225
- } | {
226
- path: string & import("zod").$brand<"DocumentPath">;
227
- originalFilename: string;
228
- type: string;
229
- option: string;
230
- }[] | {
231
- loading: boolean;
232
- data: any;
233
- error?: {
234
- statusCode: number;
235
- message: string;
236
- } | null | undefined;
237
- } | {
238
- data: Record<string, string>;
239
- updatedAt: string;
240
- } | {
241
- data: any;
242
- } | {
243
- numericValue: number;
244
- unit: string;
245
- } | {
246
- numericValue?: number | undefined;
247
- unit?: string | undefined;
248
- } | import("zod").$brand<"CustomFieldValue"> | (string & import("zod").$brand<"PlainDate">) | {
249
- age: number;
250
- asOfDateRef: string;
251
- } | {
252
- start: string & import("zod").$brand<"PlainDate">;
253
- end: string & import("zod").$brand<"PlainDate">;
254
- } | null | undefined> | {
255
- data: Record<string, string | number | boolean | {
256
- path: string & import("zod").$brand<"DocumentPath">;
257
- originalFilename: string;
258
- type: string;
259
- } | {
260
- firstname: string;
261
- surname: string;
262
- middlename?: string | undefined;
263
- } | {
264
- firstname?: string | null | undefined;
265
- surname?: string | null | undefined;
266
- middlename?: string | null | undefined;
267
- } | {
268
- country: string;
269
- addressType: "DOMESTIC";
270
- administrativeArea: string;
271
- streetLevelDetails?: Record<string, string> | undefined;
272
- } | {
273
- country: string;
274
- addressType: "INTERNATIONAL";
275
- streetLevelDetails?: Record<string, string> | undefined;
276
- } | {
277
- path: string & import("zod").$brand<"DocumentPath">;
278
- originalFilename: string;
279
- type: string;
280
- option: string;
281
- }[] | {
282
- loading: boolean;
283
- data: any;
284
- error?: {
285
- statusCode: number;
286
- message: string;
287
- } | null | undefined;
288
- } | {
289
- data: Record<string, string>;
290
- updatedAt: string;
291
- } | {
292
- data: any;
293
- } | {
294
- numericValue: number;
295
- unit: string;
296
- } | {
297
- numericValue?: number | undefined;
298
- unit?: string | undefined;
299
- } | import("zod").$brand<"CustomFieldValue"> | (string & import("zod").$brand<"PlainDate">) | {
300
- age: number;
301
- asOfDateRef: string;
302
- } | {
303
- start: string & import("zod").$brand<"PlainDate">;
304
- end: string & import("zod").$brand<"PlainDate">;
305
- } | null | undefined>;
306
- } | {
307
- loading?: boolean | null | undefined;
308
- error?: {
309
- statusCode: number;
310
- message: string;
311
- } | null | undefined;
312
- data?: any;
313
- } | {
314
- data: Record<string, string>;
315
- } | null | undefined;
316
- }>;
144
+ export declare function omitHiddenAnnotationFields(actionConfig: ActionConfig, declaration: EventState, annotation: ActionUpdate, context: ValidatorContext): Partial<Record<string, import("./FieldValue").FieldUpdateValue>>;
317
145
  /**
318
146
  * Merges two documents together.
319
147
  *
@@ -610,7 +438,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
610
438
  createdByUserType: "user" | "system";
611
439
  createdAt: string;
612
440
  createdBy: string;
613
- type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
441
+ type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
614
442
  status: "Rejected";
615
443
  createdByRole?: string | undefined;
616
444
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
@@ -5,6 +5,7 @@ export declare const TriggerEvent: {
5
5
  readonly USERNAME_REMINDER: "username-reminder";
6
6
  readonly RESET_PASSWORD: "reset-password";
7
7
  readonly RESET_PASSWORD_BY_ADMIN: "reset-password-by-admin";
8
+ readonly RESEND_INVITE: "resend-invite";
8
9
  readonly TWO_FA: "2fa";
9
10
  readonly ALL_USER_NOTIFICATION: "all-user-notification";
10
11
  readonly CHANGE_PHONE_NUMBER: "change-phone-number";
@@ -112,6 +113,20 @@ export declare const TriggerPayload: {
112
113
  role: z.ZodString;
113
114
  }, z.core.$strip>;
114
115
  }, z.core.$strip>;
116
+ readonly "resend-invite": z.ZodObject<{
117
+ recipient: z.ZodObject<{
118
+ name: z.ZodOptional<z.ZodObject<{
119
+ firstname: z.ZodString;
120
+ surname: z.ZodString;
121
+ middlename: z.ZodOptional<z.ZodString>;
122
+ }, z.core.$strip>>;
123
+ mobile: z.ZodOptional<z.ZodString>;
124
+ email: z.ZodOptional<z.ZodString>;
125
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString>>;
126
+ }, z.core.$strip>;
127
+ username: z.ZodString;
128
+ temporaryPassword: z.ZodString;
129
+ }, z.core.$strip>;
115
130
  readonly "2fa": z.ZodObject<{
116
131
  recipient: z.ZodObject<{
117
132
  name: z.ZodOptional<z.ZodObject<{
@@ -169,7 +184,12 @@ export declare const TriggerPayload: {
169
184
  export type TriggerPayload = {
170
185
  [K in TriggerEvent]: z.infer<(typeof TriggerPayload)[K]>;
171
186
  };
172
- export declare function triggerUserEventNotification<T extends TriggerEvent>({ event, payload, countryConfigUrl, authHeader }: {
187
+ export declare function triggerUserEventNotification(args: {
188
+ event: typeof TriggerEvent.ALL_USER_NOTIFICATION;
189
+ payload: TriggerPayload[typeof TriggerEvent.ALL_USER_NOTIFICATION];
190
+ countryConfigUrl: string;
191
+ }): Promise<Response>;
192
+ export declare function triggerUserEventNotification<T extends Exclude<TriggerEvent, typeof TriggerEvent.ALL_USER_NOTIFICATION>>(args: {
173
193
  event: T;
174
194
  payload: TriggerPayload[T];
175
195
  countryConfigUrl: string;