@opencrvs/toolkit 1.9.2-rc.c3822a1 → 1.9.2-rc.f6dcfa6

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 (56) hide show
  1. package/dist/commons/api/router.d.ts +1620 -26666
  2. package/dist/commons/conditionals/conditionals.d.ts +1 -10
  3. package/dist/commons/conditionals/validate.d.ts +4 -11
  4. package/dist/commons/events/ActionConfig.d.ts +1525 -21293
  5. package/dist/commons/events/ActionDocument.d.ts +1849 -764
  6. package/dist/commons/events/ActionInput.d.ts +1066 -264
  7. package/dist/commons/events/ActionType.d.ts +8 -85
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +1238 -211
  9. package/dist/commons/events/CompositeFieldValue.d.ts +176 -25
  10. package/dist/commons/events/Conditional.d.ts +38 -26
  11. package/dist/commons/events/Constants.d.ts +1 -1
  12. package/dist/commons/events/CountryConfigQueryInput.d.ts +4169 -919
  13. package/dist/commons/events/CreatedAtLocation.d.ts +1 -1
  14. package/dist/commons/events/DeduplicationConfig.d.ts +150 -15
  15. package/dist/commons/events/Draft.d.ts +105 -70
  16. package/dist/commons/events/DynamicFieldValue.d.ts +91 -7
  17. package/dist/commons/events/EventConfig.d.ts +2096 -17110
  18. package/dist/commons/events/EventConfigInput.d.ts +1 -1
  19. package/dist/commons/events/EventDocument.d.ts +1326 -311
  20. package/dist/commons/events/EventIndex.d.ts +967 -191
  21. package/dist/commons/events/EventInput.d.ts +8 -2
  22. package/dist/commons/events/EventMetadata.d.ts +345 -102
  23. package/dist/commons/events/FieldConfig.d.ts +11775 -4088
  24. package/dist/commons/events/FieldType.d.ts +2 -6
  25. package/dist/commons/events/FieldTypeMapping.d.ts +810 -164
  26. package/dist/commons/events/FieldValue.d.ts +354 -80
  27. package/dist/commons/events/FormConfig.d.ts +697 -12636
  28. package/dist/commons/events/PageConfig.d.ts +314 -8441
  29. package/dist/commons/events/SummaryConfig.d.ts +161 -14
  30. package/dist/commons/events/TranslationConfig.d.ts +2 -2
  31. package/dist/commons/events/WorkqueueColumnConfig.d.ts +36 -70
  32. package/dist/commons/events/WorkqueueConfig.d.ts +7080 -1597
  33. package/dist/commons/events/deduplication.d.ts +3 -3
  34. package/dist/commons/events/defineConfig.d.ts +155 -24703
  35. package/dist/commons/events/index.d.ts +0 -1
  36. package/dist/commons/events/locations.d.ts +19 -15
  37. package/dist/commons/events/scopes.d.ts +0 -1
  38. package/dist/commons/events/state/availableActions.d.ts +1 -2
  39. package/dist/commons/events/state/flags.d.ts +3 -21
  40. package/dist/commons/events/state/index.d.ts +19 -17
  41. package/dist/commons/events/state/utils.d.ts +112 -127
  42. package/dist/commons/events/test.utils.d.ts +5 -11
  43. package/dist/commons/events/transactions.d.ts +1 -1
  44. package/dist/commons/events/utils.d.ts +359 -49444
  45. package/dist/commons/notification/UserNotifications.d.ts +636 -55
  46. package/dist/conditionals/index.d.ts.map +1 -1
  47. package/dist/conditionals/index.js +5 -38
  48. package/dist/events/deduplication.d.ts +3 -3
  49. package/dist/events/index.js +1360 -1502
  50. package/dist/notification/index.d.ts.map +1 -1
  51. package/dist/notification/index.js +1279 -1276
  52. package/dist/scopes/index.d.ts +136 -106
  53. package/dist/scopes/index.d.ts.map +1 -1
  54. package/dist/scopes/index.js +93 -116
  55. package/package.json +5 -5
  56. package/dist/commons/events/Flag.d.ts +0 -43
@@ -39,7 +39,6 @@ export * from './FileUtils';
39
39
  export * from '../conditionals/conditionals';
40
40
  export * from '../conditionals/validate';
41
41
  export * from './field';
42
- export * from './Flag';
43
42
  export * from './event';
44
43
  export * from './locations';
45
44
  export { UUID } from '../uuid';
@@ -1,20 +1,24 @@
1
- import * as z from 'zod/v4';
2
- export declare const LocationType: z.ZodEnum<{
3
- ADMIN_STRUCTURE: "ADMIN_STRUCTURE";
4
- HEALTH_FACILITY: "HEALTH_FACILITY";
5
- CRVS_OFFICE: "CRVS_OFFICE";
6
- }>;
1
+ import { z } from 'zod';
2
+ export declare const LocationType: z.ZodEnum<["ADMIN_STRUCTURE", "CRVS_OFFICE", "HEALTH_FACILITY"]>;
7
3
  export type LocationType = z.infer<typeof LocationType>;
8
4
  export declare const Location: z.ZodObject<{
9
- id: z.core.$ZodBranded<z.ZodUUID, "UUID">;
5
+ id: z.ZodBranded<z.ZodString, "UUID">;
10
6
  name: z.ZodString;
11
- parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID">>;
12
- validUntil: z.ZodNullable<z.ZodISODateTime>;
13
- locationType: z.ZodNullable<z.ZodEnum<{
14
- ADMIN_STRUCTURE: "ADMIN_STRUCTURE";
15
- HEALTH_FACILITY: "HEALTH_FACILITY";
16
- CRVS_OFFICE: "CRVS_OFFICE";
17
- }>>;
18
- }, z.core.$strip>;
7
+ parentId: z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>;
8
+ validUntil: z.ZodNullable<z.ZodString>;
9
+ locationType: z.ZodNullable<z.ZodEnum<["ADMIN_STRUCTURE", "CRVS_OFFICE", "HEALTH_FACILITY"]>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string & z.BRAND<"UUID">;
12
+ name: string;
13
+ parentId: (string & z.BRAND<"UUID">) | null;
14
+ validUntil: string | null;
15
+ locationType: "ADMIN_STRUCTURE" | "HEALTH_FACILITY" | "CRVS_OFFICE" | null;
16
+ }, {
17
+ id: string;
18
+ name: string;
19
+ parentId: string | null;
20
+ validUntil: string | null;
21
+ locationType: "ADMIN_STRUCTURE" | "HEALTH_FACILITY" | "CRVS_OFFICE" | null;
22
+ }>;
19
23
  export type Location = z.infer<typeof Location>;
20
24
  //# sourceMappingURL=locations.d.ts.map
@@ -21,7 +21,6 @@ export declare const ACTION_SCOPE_MAP: {
21
21
  ASSIGN: null;
22
22
  UNASSIGN: null;
23
23
  DUPLICATE_DETECTED: never[];
24
- CUSTOM: never[];
25
24
  };
26
25
  export declare function hasAnyOfScopes(a: Scope[], b: Scope[]): boolean;
27
26
  export declare function configurableEventScopeAllowed(scopes: Scope[], allowedConfigurableScopes: ConfigurableScopeType[], eventType: string): boolean;
@@ -1,7 +1,6 @@
1
1
  import { DisplayableAction } from '../ActionType';
2
2
  import { EventIndex } from '../EventIndex';
3
- import { EventStatus } from '../EventMetadata';
4
- import { Flag } from '../Flag';
3
+ import { EventStatus, Flag } from '../EventMetadata';
5
4
  export declare function getAvailableActions(status: EventStatus, flags: Flag[]): DisplayableAction[];
6
5
  export declare function getAvailableActionsForEvent(event: EventIndex): DisplayableAction[];
7
6
  //# sourceMappingURL=availableActions.d.ts.map
@@ -1,22 +1,4 @@
1
- import { Flag, CustomFlag } from '../Flag';
2
- import { EventConfig } from '../EventConfig';
3
- import { EventDocument } from '../EventDocument';
4
- /**
5
- * This function resolves custom flags for an event based on its actions.
6
- * Flags are not stored to the event state or any database directly, instead they are always computed/evaluated from the event actions.
7
- *
8
- * Processes accepted actions in chronological order, evaluating flag conditions
9
- * at each action step. Flags can be added or removed based on action configurations
10
- * and conditional logic. Duplicate flags are filtered out.
11
- *
12
- * @param event - The event document containing actions and metadata
13
- * @param eventConfiguration - The configuration object for the event type defining action rules and flag behaviors
14
- * @returns An array of unique custom flag IDs that apply to the event after processing all non-meta actions
15
- *
16
- * @example
17
- * const flags = resolveEventCustomFlags(eventDoc, config);
18
- * // Returns: ['flag-1', 'flag-3']
19
- */
20
- export declare function resolveEventCustomFlags(event: EventDocument, eventConfiguration: EventConfig): CustomFlag[];
21
- export declare function getEventFlags(event: EventDocument, config: EventConfig): Flag[];
1
+ import { Action } from '../ActionDocument';
2
+ import { Flag } from '../EventMetadata';
3
+ export declare function getFlagsFromActions(actions: Action[]): Flag[];
22
4
  //# sourceMappingURL=flags.d.ts.map
@@ -7,7 +7,7 @@ import { Draft } from '../Draft';
7
7
  import { EventConfig } from '../EventConfig';
8
8
  import { UUID } from '../../uuid';
9
9
  import { DocumentPath, FullDocumentPath, FullDocumentUrl } from '../../documents';
10
- export declare function getStatusFromActions(actions: Array<Action>): "ARCHIVED" | "DECLARED" | "REGISTERED" | "CREATED" | "NOTIFIED";
10
+ export declare function getStatusFromActions(actions: Array<Action>): "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
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[]] ? {
@@ -38,7 +38,9 @@ export declare function extractPotentialDuplicatesFromActions(actions: Action[])
38
38
  * @returns Calculates a snapshot summary of the event based on the actions taken on it.
39
39
  * @see EventIndex for the description of the returned object.
40
40
  */
41
- export declare function getCurrentEventState(event: EventDocument, config: EventConfig): EventIndex;
41
+ export declare function getCurrentEventState(event: EventDocument,
42
+ /** @TODO: remove config parameter, it is only used by resolveDateOfEvent. See if it can be achieved in some other way. */
43
+ config: EventConfig): EventIndex;
42
44
  /**
43
45
  * @returns the future state of the event with drafts applied to all fields.
44
46
  *
@@ -60,47 +62,47 @@ export declare function applyDeclarationToEventIndex(eventIndex: EventIndex, dec
60
62
  *
61
63
  */
62
64
  export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Draft, eventConfiguration: EventConfig): {
63
- id: string & import("zod/v4").$brand<"UUID">;
64
65
  type: string;
65
- status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "CREATED" | "NOTIFIED";
66
+ id: string & import("zod").BRAND<"UUID">;
67
+ status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
68
+ createdAt: string;
69
+ createdBy: string;
70
+ declaration: Record<string, import("..").FieldValue>;
71
+ trackingId: string;
72
+ updatedAt: string;
66
73
  legalStatuses: {
67
74
  DECLARED?: {
68
75
  createdAt: string;
69
76
  createdBy: string;
70
- acceptedAt: string;
71
77
  createdByRole: string;
72
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
78
+ acceptedAt: string;
73
79
  createdByUserType?: "system" | "user" | null | undefined;
74
80
  createdBySignature?: string | null | undefined;
81
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
75
82
  } | null | undefined;
76
83
  REGISTERED?: {
77
84
  createdAt: string;
78
85
  createdBy: string;
79
- acceptedAt: string;
80
86
  createdByRole: string;
81
87
  registrationNumber: string;
82
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
88
+ acceptedAt: string;
83
89
  createdByUserType?: "system" | "user" | null | undefined;
84
90
  createdBySignature?: string | null | undefined;
91
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
85
92
  } | null | undefined;
86
93
  };
87
- createdAt: string;
88
- createdBy: string;
89
94
  updatedByUserRole: string;
90
- updatedAt: string;
91
- trackingId: string;
92
95
  potentialDuplicates: {
93
- id: string & import("zod/v4").$brand<"UUID">;
96
+ id: string & import("zod").BRAND<"UUID">;
94
97
  trackingId: string;
95
98
  }[];
96
99
  flags: string[];
97
- declaration: Record<string, import("..").FieldValue>;
98
- dateOfEvent?: string | null | undefined;
99
100
  createdByUserType?: "system" | "user" | null | undefined;
100
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
101
101
  createdBySignature?: string | null | undefined;
102
- updatedAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
102
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
103
103
  assignedTo?: string | null | undefined;
104
+ dateOfEvent?: string | null | undefined;
105
+ updatedAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
104
106
  updatedBy?: string | null | undefined;
105
107
  };
106
108
  /**
@@ -7,295 +7,280 @@ import { Action } from '../ActionDocument';
7
7
  *
8
8
  * */
9
9
  export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
10
- id: string & import("zod/v4").$brand<"UUID">;
10
+ type: "ASSIGN";
11
+ id: string & import("zod").BRAND<"UUID">;
12
+ status: "Rejected" | "Requested" | "Accepted";
11
13
  transactionId: string;
12
14
  createdByUserType: "system" | "user";
13
15
  createdAt: string;
14
16
  createdBy: string;
15
17
  createdByRole: string;
16
18
  declaration: Record<string, import("..").FieldUpdateValue>;
17
- status: "Rejected" | "Requested" | "Accepted";
18
- type: "REGISTER";
19
+ assignedTo: string;
19
20
  createdBySignature?: string | null | undefined;
20
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
21
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
21
22
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
22
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
23
- registrationNumber?: string | undefined;
23
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
24
24
  } | {
25
- id: string & import("zod/v4").$brand<"UUID">;
25
+ type: "UNASSIGN";
26
+ id: string & import("zod").BRAND<"UUID">;
27
+ status: "Rejected" | "Requested" | "Accepted";
26
28
  transactionId: string;
27
29
  createdByUserType: "system" | "user";
28
30
  createdAt: string;
29
31
  createdBy: string;
30
32
  createdByRole: string;
31
33
  declaration: Record<string, import("..").FieldUpdateValue>;
32
- status: "Rejected" | "Requested" | "Accepted";
33
- type: "DUPLICATE_DETECTED";
34
- content: {
35
- duplicates: {
36
- id: string & import("zod/v4").$brand<"UUID">;
37
- trackingId: string;
38
- }[];
39
- };
40
34
  createdBySignature?: string | null | undefined;
41
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
35
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
42
36
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
43
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
37
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
44
38
  } | {
45
- id: string & import("zod/v4").$brand<"UUID">;
39
+ type: "REGISTER";
40
+ id: string & import("zod").BRAND<"UUID">;
41
+ status: "Rejected" | "Requested" | "Accepted";
46
42
  transactionId: string;
47
43
  createdByUserType: "system" | "user";
48
44
  createdAt: string;
49
45
  createdBy: string;
50
46
  createdByRole: string;
51
47
  declaration: Record<string, import("..").FieldUpdateValue>;
52
- status: "Rejected" | "Requested" | "Accepted";
53
- type: "PRINT_CERTIFICATE";
54
48
  createdBySignature?: string | null | undefined;
55
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
49
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
56
50
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
57
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
58
- content?: {
59
- templateId?: string | undefined;
60
- } | null | undefined;
51
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
52
+ registrationNumber?: string | undefined;
61
53
  } | {
62
- id: string & import("zod/v4").$brand<"UUID">;
54
+ type: "DECLARE";
55
+ id: string & import("zod").BRAND<"UUID">;
56
+ status: "Rejected" | "Requested" | "Accepted";
63
57
  transactionId: string;
64
58
  createdByUserType: "system" | "user";
65
59
  createdAt: string;
66
60
  createdBy: string;
67
61
  createdByRole: string;
68
62
  declaration: Record<string, import("..").FieldUpdateValue>;
69
- status: "Rejected" | "Requested" | "Accepted";
70
- type: "REQUEST_CORRECTION";
71
63
  createdBySignature?: string | null | undefined;
72
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
64
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
73
65
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
74
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
66
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
75
67
  } | {
76
- id: string & import("zod/v4").$brand<"UUID">;
68
+ type: "VALIDATE";
69
+ id: string & import("zod").BRAND<"UUID">;
70
+ status: "Rejected" | "Requested" | "Accepted";
77
71
  transactionId: string;
78
72
  createdByUserType: "system" | "user";
79
73
  createdAt: string;
80
74
  createdBy: string;
81
75
  createdByRole: string;
82
76
  declaration: Record<string, import("..").FieldUpdateValue>;
83
- status: "Rejected" | "Requested" | "Accepted";
84
- type: "CUSTOM";
85
- customActionType: string;
86
77
  createdBySignature?: string | null | undefined;
87
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
78
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
88
79
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
89
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
80
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
90
81
  } | {
91
- id: string & import("zod/v4").$brand<"UUID">;
82
+ type: "REJECT";
83
+ id: string & import("zod").BRAND<"UUID">;
84
+ status: "Rejected" | "Requested" | "Accepted";
85
+ content: {
86
+ reason: string;
87
+ };
92
88
  transactionId: string;
93
89
  createdByUserType: "system" | "user";
94
90
  createdAt: string;
95
91
  createdBy: string;
96
92
  createdByRole: string;
97
93
  declaration: Record<string, import("..").FieldUpdateValue>;
98
- status: "Rejected" | "Requested" | "Accepted";
99
- type: "CREATE";
100
94
  createdBySignature?: string | null | undefined;
101
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
95
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
102
96
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
103
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
97
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
104
98
  } | {
105
- id: string & import("zod/v4").$brand<"UUID">;
99
+ type: "DUPLICATE_DETECTED";
100
+ id: string & import("zod").BRAND<"UUID">;
101
+ status: "Rejected" | "Requested" | "Accepted";
102
+ content: {
103
+ duplicates: {
104
+ id: string & import("zod").BRAND<"UUID">;
105
+ trackingId: string;
106
+ }[];
107
+ };
106
108
  transactionId: string;
107
109
  createdByUserType: "system" | "user";
108
110
  createdAt: string;
109
111
  createdBy: string;
110
112
  createdByRole: string;
111
113
  declaration: Record<string, import("..").FieldUpdateValue>;
112
- status: "Rejected" | "Requested" | "Accepted";
113
- type: "VALIDATE";
114
114
  createdBySignature?: string | null | undefined;
115
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
115
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
116
116
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
117
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
117
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
118
118
  } | {
119
- id: string & import("zod/v4").$brand<"UUID">;
119
+ type: "MARK_AS_NOT_DUPLICATE";
120
+ id: string & import("zod").BRAND<"UUID">;
121
+ status: "Rejected" | "Requested" | "Accepted";
120
122
  transactionId: string;
121
123
  createdByUserType: "system" | "user";
122
124
  createdAt: string;
123
125
  createdBy: string;
124
126
  createdByRole: string;
125
127
  declaration: Record<string, import("..").FieldUpdateValue>;
126
- status: "Rejected" | "Requested" | "Accepted";
127
- type: "REJECT";
128
- content: {
129
- reason: string;
130
- };
131
128
  createdBySignature?: string | null | undefined;
132
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
129
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
133
130
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
134
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
131
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
135
132
  } | {
136
- id: string & import("zod/v4").$brand<"UUID">;
133
+ type: "MARK_AS_DUPLICATE";
134
+ id: string & import("zod").BRAND<"UUID">;
135
+ status: "Rejected" | "Requested" | "Accepted";
137
136
  transactionId: string;
138
137
  createdByUserType: "system" | "user";
139
138
  createdAt: string;
140
139
  createdBy: string;
141
140
  createdByRole: string;
142
141
  declaration: Record<string, import("..").FieldUpdateValue>;
143
- status: "Rejected" | "Requested" | "Accepted";
144
- type: "MARK_AS_NOT_DUPLICATE";
142
+ content?: {
143
+ duplicateOf: string & import("zod").BRAND<"UUID">;
144
+ } | undefined;
145
145
  createdBySignature?: string | null | undefined;
146
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
146
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
147
147
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
148
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
148
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
149
149
  } | {
150
- id: string & import("zod/v4").$brand<"UUID">;
150
+ type: "ARCHIVE";
151
+ id: string & import("zod").BRAND<"UUID">;
152
+ status: "Rejected" | "Requested" | "Accepted";
153
+ content: {
154
+ reason: string;
155
+ };
151
156
  transactionId: string;
152
157
  createdByUserType: "system" | "user";
153
158
  createdAt: string;
154
159
  createdBy: string;
155
160
  createdByRole: string;
156
161
  declaration: Record<string, import("..").FieldUpdateValue>;
157
- status: "Rejected" | "Requested" | "Accepted";
158
- type: "MARK_AS_DUPLICATE";
159
162
  createdBySignature?: string | null | undefined;
160
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
163
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
161
164
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
162
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
163
- content?: {
164
- duplicateOf: string & import("zod/v4").$brand<"UUID">;
165
- } | undefined;
165
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
166
166
  } | {
167
- id: string & import("zod/v4").$brand<"UUID">;
167
+ type: "CREATE";
168
+ id: string & import("zod").BRAND<"UUID">;
169
+ status: "Rejected" | "Requested" | "Accepted";
168
170
  transactionId: string;
169
171
  createdByUserType: "system" | "user";
170
172
  createdAt: string;
171
173
  createdBy: string;
172
174
  createdByRole: string;
173
175
  declaration: Record<string, import("..").FieldUpdateValue>;
174
- status: "Rejected" | "Requested" | "Accepted";
175
- type: "ARCHIVE";
176
- content: {
177
- reason: string;
178
- };
179
176
  createdBySignature?: string | null | undefined;
180
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
177
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
181
178
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
182
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
179
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
183
180
  } | {
184
- id: string & import("zod/v4").$brand<"UUID">;
181
+ type: "NOTIFY";
182
+ id: string & import("zod").BRAND<"UUID">;
183
+ status: "Rejected" | "Requested" | "Accepted";
185
184
  transactionId: string;
186
185
  createdByUserType: "system" | "user";
187
186
  createdAt: string;
188
187
  createdBy: string;
189
188
  createdByRole: string;
190
189
  declaration: Record<string, import("..").FieldUpdateValue>;
191
- status: "Rejected" | "Requested" | "Accepted";
192
- type: "NOTIFY";
193
190
  createdBySignature?: string | null | undefined;
194
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
191
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
195
192
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
196
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
193
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
197
194
  } | {
198
- id: string & import("zod/v4").$brand<"UUID">;
195
+ type: "PRINT_CERTIFICATE";
196
+ id: string & import("zod").BRAND<"UUID">;
197
+ status: "Rejected" | "Requested" | "Accepted";
199
198
  transactionId: string;
200
199
  createdByUserType: "system" | "user";
201
200
  createdAt: string;
202
201
  createdBy: string;
203
202
  createdByRole: string;
204
203
  declaration: Record<string, import("..").FieldUpdateValue>;
205
- status: "Rejected" | "Requested" | "Accepted";
206
- type: "DECLARE";
204
+ content?: {
205
+ templateId?: string | undefined;
206
+ } | null | undefined;
207
207
  createdBySignature?: string | null | undefined;
208
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
208
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
209
209
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
210
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
210
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
211
211
  } | {
212
- id: string & import("zod/v4").$brand<"UUID">;
212
+ type: "REQUEST_CORRECTION";
213
+ id: string & import("zod").BRAND<"UUID">;
214
+ status: "Rejected" | "Requested" | "Accepted";
213
215
  transactionId: string;
214
216
  createdByUserType: "system" | "user";
215
217
  createdAt: string;
216
218
  createdBy: string;
217
219
  createdByRole: string;
218
220
  declaration: Record<string, import("..").FieldUpdateValue>;
219
- status: "Rejected" | "Requested" | "Accepted";
220
- type: "ASSIGN";
221
- assignedTo: string;
222
221
  createdBySignature?: string | null | undefined;
223
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
222
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
224
223
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
225
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
224
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
226
225
  } | {
227
- id: string & import("zod/v4").$brand<"UUID">;
226
+ type: "APPROVE_CORRECTION";
227
+ id: string & import("zod").BRAND<"UUID">;
228
+ status: "Rejected" | "Requested" | "Accepted";
228
229
  transactionId: string;
229
230
  createdByUserType: "system" | "user";
230
231
  createdAt: string;
231
232
  createdBy: string;
232
233
  createdByRole: string;
233
234
  declaration: Record<string, import("..").FieldUpdateValue>;
234
- status: "Rejected" | "Requested" | "Accepted";
235
- type: "APPROVE_CORRECTION";
236
235
  requestId: string;
237
236
  createdBySignature?: string | null | undefined;
238
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
237
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
239
238
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
240
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
239
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
241
240
  } | {
242
- id: string & import("zod/v4").$brand<"UUID">;
243
- transactionId: string;
244
- createdByUserType: "system" | "user";
245
- createdAt: string;
246
- createdBy: string;
247
- createdByRole: string;
248
- declaration: Record<string, import("..").FieldUpdateValue>;
249
- status: "Rejected" | "Requested" | "Accepted";
250
241
  type: "REJECT_CORRECTION";
251
- requestId: string;
242
+ id: string & import("zod").BRAND<"UUID">;
243
+ status: "Rejected" | "Requested" | "Accepted";
252
244
  content: {
253
245
  reason: string;
254
246
  };
255
- createdBySignature?: string | null | undefined;
256
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
257
- annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
258
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
259
- } | {
260
- id: string & import("zod/v4").$brand<"UUID">;
261
247
  transactionId: string;
262
248
  createdByUserType: "system" | "user";
263
249
  createdAt: string;
264
250
  createdBy: string;
265
251
  createdByRole: string;
266
252
  declaration: Record<string, import("..").FieldUpdateValue>;
267
- status: "Rejected" | "Requested" | "Accepted";
268
- type: "UNASSIGN";
253
+ requestId: string;
269
254
  createdBySignature?: string | null | undefined;
270
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
255
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
271
256
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
272
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
257
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
273
258
  } | {
274
- id: string & import("zod/v4").$brand<"UUID">;
259
+ type: "READ";
260
+ id: string & import("zod").BRAND<"UUID">;
261
+ status: "Rejected" | "Requested" | "Accepted";
275
262
  transactionId: string;
276
263
  createdByUserType: "system" | "user";
277
264
  createdAt: string;
278
265
  createdBy: string;
279
266
  createdByRole: string;
280
267
  declaration: Record<string, import("..").FieldUpdateValue>;
281
- status: "Rejected" | "Requested" | "Accepted";
282
- type: "READ";
283
268
  createdBySignature?: string | null | undefined;
284
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
269
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
285
270
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
286
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
271
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
287
272
  } | {
288
- id: string & import("zod/v4").$brand<"UUID">;
273
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
274
+ id: string & import("zod").BRAND<"UUID">;
275
+ status: "Rejected";
289
276
  transactionId: string;
290
277
  createdByUserType: "system" | "user";
291
278
  createdAt: string;
292
279
  createdBy: string;
293
280
  createdByRole: string;
294
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
295
- status: "Rejected";
296
281
  createdBySignature?: string | null | undefined;
297
- createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
298
- originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
282
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
283
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
299
284
  }>;
300
285
  /**
301
286
  * @returns the legal statuses of the event. Event is considered legal if it has been accepted.
@@ -306,7 +291,7 @@ export declare function getLegalStatuses(actions: Action[]): {
306
291
  createdAt: string;
307
292
  createdBy: string;
308
293
  createdByUserType: "system" | "user";
309
- createdAtLocation: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
294
+ createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
310
295
  acceptedAt: string;
311
296
  createdByRole: string;
312
297
  createdBySignature: string | null | undefined;
@@ -316,7 +301,7 @@ export declare function getLegalStatuses(actions: Action[]): {
316
301
  createdAt: string;
317
302
  createdBy: string;
318
303
  createdByUserType: "system" | "user";
319
- createdAtLocation: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
304
+ createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
320
305
  acceptedAt: string;
321
306
  createdByRole: string;
322
307
  createdBySignature: string | null | undefined;