@opencrvs/toolkit 1.9.12-rc.eae3bc3 → 1.9.12-rc.efbd898
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.
- package/build.sh +8 -0
- package/dist/application-config/index.js +2045 -41
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2422 -0
- package/dist/commons/api/router.d.ts +337 -118
- package/dist/commons/application-config/index.d.ts +13 -16
- package/dist/commons/conditionals/conditionals.d.ts +8 -8
- package/dist/commons/events/ActionDocument.d.ts +196 -196
- package/dist/commons/events/ActionInput.d.ts +113 -113
- package/dist/commons/events/ActionType.d.ts +3 -3
- package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
- package/dist/commons/events/AuditLog.d.ts +345 -163
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/CountryConfigQueryInput.d.ts +461 -190
- package/dist/commons/events/Draft.d.ts +9 -9
- package/dist/commons/events/DynamicFieldValue.d.ts +37 -19
- package/dist/commons/events/EventDocument.d.ts +80 -80
- package/dist/commons/events/EventIndex.d.ts +35 -27
- package/dist/commons/events/EventInput.d.ts +1 -1
- package/dist/commons/events/EventMetadata.d.ts +19 -19
- package/dist/commons/events/FieldConfig.d.ts +285 -69
- package/dist/commons/events/FieldType.d.ts +2 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +98 -72
- package/dist/commons/events/FieldValue.d.ts +54 -26
- package/dist/commons/events/PlainDate.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +7 -7
- package/dist/commons/events/WorkqueueConfig.d.ts +443 -199
- package/dist/commons/events/defineConfig.d.ts +0 -4
- package/dist/commons/events/locations.d.ts +4 -4
- package/dist/commons/events/scopes.d.ts +3 -2
- package/dist/commons/events/state/index.d.ts +2 -2
- package/dist/commons/events/state/utils.d.ts +1 -1
- package/dist/commons/events/test.utils.d.ts +2 -2
- package/dist/commons/events/utils.d.ts +3 -175
- package/dist/commons/notification/UserNotifications.d.ts +6 -1
- package/dist/conditionals/index.js +74 -359
- package/dist/events/index.js +1194 -1261
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +405 -0
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +753 -0
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
- package/dist/migrations/v2.0/convert-paragraph-to-heading.js +159 -0
- package/dist/migrations/v2.0/index.d.ts +7 -0
- package/dist/migrations/v2.0/index.d.ts.map +1 -0
- package/dist/migrations/v2.0/index.js +2361 -0
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +344 -0
- package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
- package/dist/migrations/v2.0/migrate-scopes.js +281 -0
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +268 -0
- package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
- package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-delete-actions.js +157 -0
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-deprecated-imports.js +97 -0
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-pending-certification-flag.js +110 -0
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-review-from-register-action.js +164 -0
- package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
- package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
- package/dist/migrations/v2.0/rename-api-paths.js +188 -0
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
- package/dist/migrations/v2.0/rename-location-parent-id.js +181 -0
- package/dist/notification/index.js +1002 -1133
- package/dist/scopes/index.d.ts +389 -152
- package/dist/scopes/index.js +128 -322
- package/opencrvs-toolkit-1.9.12-rc.efbd898.tgz +0 -0
- package/package.json +11 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-1.9.12-rc.eae3bc3.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';
|
|
@@ -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 {
|
|
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:
|
|
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>): "
|
|
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: "
|
|
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"
|
|
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"
|
|
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;
|
|
@@ -169,7 +169,12 @@ export declare const TriggerPayload: {
|
|
|
169
169
|
export type TriggerPayload = {
|
|
170
170
|
[K in TriggerEvent]: z.infer<(typeof TriggerPayload)[K]>;
|
|
171
171
|
};
|
|
172
|
-
export declare function triggerUserEventNotification
|
|
172
|
+
export declare function triggerUserEventNotification(args: {
|
|
173
|
+
event: typeof TriggerEvent.ALL_USER_NOTIFICATION;
|
|
174
|
+
payload: TriggerPayload[typeof TriggerEvent.ALL_USER_NOTIFICATION];
|
|
175
|
+
countryConfigUrl: string;
|
|
176
|
+
}): Promise<Response>;
|
|
177
|
+
export declare function triggerUserEventNotification<T extends Exclude<TriggerEvent, typeof TriggerEvent.ALL_USER_NOTIFICATION>>(args: {
|
|
173
178
|
event: T;
|
|
174
179
|
payload: TriggerPayload[T];
|
|
175
180
|
countryConfigUrl: string;
|