@opencrvs/toolkit 1.9.13-rc.72233cd → 1.9.13-rc.797da9b
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 +0 -13
- package/dist/api/index.d.ts.map +1 -1
- package/dist/commons/api/router.d.ts +4561 -3370
- package/dist/commons/conditionals/conditionals.d.ts +295 -28
- package/dist/commons/conditionals/validate.d.ts +9 -11
- package/dist/commons/events/ActionConfig.d.ts +1555 -415
- package/dist/commons/events/ActionDocument.d.ts +1941 -888
- package/dist/commons/events/ActionInput.d.ts +1277 -277
- package/dist/commons/events/ActionType.d.ts +11 -91
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1496 -294
- package/dist/commons/events/CompositeFieldValue.d.ts +190 -30
- package/dist/commons/events/Conditional.d.ts +38 -26
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4471 -1592
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +171 -15
- package/dist/commons/events/Draft.d.ts +113 -72
- package/dist/commons/events/DynamicFieldValue.d.ts +78 -12
- package/dist/commons/events/EventConfig.d.ts +2420 -35
- package/dist/commons/events/EventConfigInput.d.ts +3 -0
- package/dist/commons/events/EventDocument.d.ts +1366 -354
- package/dist/commons/events/EventIndex.d.ts +1010 -212
- package/dist/commons/events/EventInput.d.ts +8 -3
- package/dist/commons/events/EventMetadata.d.ts +357 -130
- package/dist/commons/events/FieldConfig.d.ts +16025 -2936
- package/dist/commons/events/FieldType.d.ts +4 -26
- package/dist/commons/events/FieldTypeMapping.d.ts +906 -314
- package/dist/commons/events/FieldValue.d.ts +527 -149
- package/dist/commons/events/FileUtils.d.ts +2 -2
- package/dist/commons/events/FormConfig.d.ts +721 -54
- package/dist/commons/events/PageConfig.d.ts +320 -58
- package/dist/commons/events/PlainDate.d.ts +1 -1
- package/dist/commons/events/SummaryConfig.d.ts +161 -14
- package/dist/commons/events/TemplateConfig.d.ts +3 -2
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +37 -74
- package/dist/commons/events/WorkqueueConfig.d.ts +7480 -2135
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +247 -2
- package/dist/commons/events/field.d.ts +22 -0
- package/dist/commons/events/index.d.ts +0 -3
- package/dist/commons/events/locations.d.ts +20 -57
- package/dist/commons/events/scopes.d.ts +34 -35
- package/dist/commons/events/state/availableActions.d.ts +2 -7
- package/dist/commons/events/state/flags.d.ts +3 -21
- package/dist/commons/events/state/index.d.ts +27 -30
- package/dist/commons/events/state/utils.d.ts +172 -190
- package/dist/commons/events/test.utils.d.ts +11 -52
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +273 -373
- package/dist/commons/notification/UserNotifications.d.ts +637 -61
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +2006 -270
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +2203 -2847
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1844 -2076
- package/dist/scopes/index.d.ts +353 -640
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +300 -340
- package/package.json +3 -13
- package/tsconfig.json +2 -12
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/application-config/index.d.ts +0 -2
- package/dist/application-config/index.d.ts.map +0 -1
- package/dist/application-config/index.js +0 -2128
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -3237
- package/dist/commons/application-config/index.d.ts +0 -84
- package/dist/commons/events/AuditLog.d.ts +0 -405
- package/dist/commons/events/Flag.d.ts +0 -67
- package/dist/commons/events/eventConfigValidation.d.ts +0 -8
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +0 -3
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +0 -405
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +0 -2
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +0 -1
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +0 -829
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +0 -3
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +0 -1
- package/dist/migrations/v2.0/convert-paragraph-to-heading.js +0 -159
- package/dist/migrations/v2.0/index.d.ts +0 -7
- package/dist/migrations/v2.0/index.d.ts.map +0 -1
- package/dist/migrations/v2.0/index.js +0 -3176
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +0 -3
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +0 -1
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +0 -344
- package/dist/migrations/v2.0/migrate-scopes.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-scopes.js +0 -282
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +0 -268
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-workqueue-configs.js +0 -237
- package/dist/migrations/v2.0/remove-delete-actions.d.ts +0 -3
- package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-delete-actions.js +0 -157
- package/dist/migrations/v2.0/remove-demo-scope.d.ts +0 -3
- package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-demo-scope.js +0 -75
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +0 -3
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-deprecated-imports.js +0 -97
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +0 -3
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-hearth-migrations.js +0 -78
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +0 -3
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-pending-certification-flag.js +0 -110
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +0 -3
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-review-from-register-action.js +0 -164
- package/dist/migrations/v2.0/rename-api-paths.d.ts +0 -3
- package/dist/migrations/v2.0/rename-api-paths.d.ts.map +0 -1
- package/dist/migrations/v2.0/rename-api-paths.js +0 -188
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts +0 -3
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +0 -1
- package/dist/migrations/v2.0/rename-location-parent-id.js +0 -181
- package/opencrvs-toolkit-1.9.13-rc.72233cd.tgz +0 -0
|
@@ -6,13 +6,13 @@ import { EventStatus } from '../EventMetadata';
|
|
|
6
6
|
import { Draft } from '../Draft';
|
|
7
7
|
import { EventConfig } from '../EventConfig';
|
|
8
8
|
import { UUID } from '../../uuid';
|
|
9
|
-
import { DocumentPath } from '../../documents';
|
|
10
|
-
export declare function getStatusFromActions(actions: Array<Action>): "
|
|
9
|
+
import { DocumentPath, FullDocumentPath, FullDocumentUrl } from '../../documents';
|
|
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[]] ? {
|
|
14
14
|
[K in keyof T]: NonNullableDeep<NonNullable<T[K]>>;
|
|
15
|
-
} : T extends UUID ? T : T extends DocumentPath ? T : T extends
|
|
15
|
+
} : T extends UUID ? T : T extends FullDocumentPath ? T : T extends DocumentPath ? T : T extends FullDocumentUrl ? T : T extends (infer U)[] ? NonNullableDeep<U>[] : T extends object ? {
|
|
16
16
|
[K in keyof T]: NonNullableDeep<NonNullable<T[K]>>;
|
|
17
17
|
} : NonNullable<T>;
|
|
18
18
|
/**
|
|
@@ -26,10 +26,6 @@ export declare function deepDropNulls<T>(obj: T): NonNullableDeep<T>;
|
|
|
26
26
|
export declare function isUndeclaredDraft(status: EventStatus): boolean;
|
|
27
27
|
export declare const DEFAULT_DATE_OF_EVENT_PROPERTY = "createdAt";
|
|
28
28
|
export declare function resolveDateOfEvent(eventIndex: EventIndex, declaration: EventState, config: EventConfig): string | undefined;
|
|
29
|
-
export declare const DEFAULT_PLACE_OF_EVENT_PROPERTY = "createdAtLocation";
|
|
30
|
-
export declare function resolvePlaceOfEvent(eventMetadata: {
|
|
31
|
-
createdAtLocation?: UUID | undefined | null;
|
|
32
|
-
}, declaration: EventState, config: EventConfig): UUID | undefined | null;
|
|
33
29
|
export declare function extractPotentialDuplicatesFromActions(actions: Action[]): PotentialDuplicate[];
|
|
34
30
|
/**
|
|
35
31
|
* NOTE: This function should not run field validations. It should return the state based on the actions, without considering context (users, roles, permissions, etc).
|
|
@@ -40,7 +36,9 @@ export declare function extractPotentialDuplicatesFromActions(actions: Action[])
|
|
|
40
36
|
* @returns Calculates a snapshot summary of the event based on the actions taken on it.
|
|
41
37
|
* @see EventIndex for the description of the returned object.
|
|
42
38
|
*/
|
|
43
|
-
export declare function getCurrentEventState(event: EventDocument,
|
|
39
|
+
export declare function getCurrentEventState(event: EventDocument,
|
|
40
|
+
/** @TODO: remove config parameter, it is only used by resolveDateOfEvent. See if it can be achieved in some other way. */
|
|
41
|
+
config: EventConfig): EventIndex;
|
|
44
42
|
/**
|
|
45
43
|
* @returns the future state of the event with drafts applied to all fields.
|
|
46
44
|
*
|
|
@@ -62,48 +60,47 @@ export declare function applyDeclarationToEventIndex(eventIndex: EventIndex, dec
|
|
|
62
60
|
*
|
|
63
61
|
*/
|
|
64
62
|
export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Draft, eventConfiguration: EventConfig): {
|
|
65
|
-
id: string & import("zod").$brand<"UUID">;
|
|
66
63
|
type: string;
|
|
67
|
-
|
|
64
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
65
|
+
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
|
66
|
+
createdAt: string;
|
|
67
|
+
createdBy: string;
|
|
68
|
+
declaration: Record<string, import("..").FieldValue>;
|
|
69
|
+
trackingId: string;
|
|
70
|
+
updatedAt: string;
|
|
68
71
|
legalStatuses: {
|
|
69
72
|
DECLARED?: {
|
|
70
73
|
createdAt: string;
|
|
71
74
|
createdBy: string;
|
|
75
|
+
createdByRole: string;
|
|
72
76
|
acceptedAt: string;
|
|
73
|
-
|
|
74
|
-
createdByUserType?: "user" | "system" | null | undefined;
|
|
75
|
-
createdByRole?: string | undefined;
|
|
77
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
|
76
78
|
createdBySignature?: string | null | undefined;
|
|
79
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
77
80
|
} | null | undefined;
|
|
78
81
|
REGISTERED?: {
|
|
79
82
|
createdAt: string;
|
|
80
83
|
createdBy: string;
|
|
81
|
-
|
|
84
|
+
createdByRole: string;
|
|
82
85
|
registrationNumber: string;
|
|
83
|
-
|
|
84
|
-
createdByUserType?: "
|
|
85
|
-
createdByRole?: string | undefined;
|
|
86
|
+
acceptedAt: string;
|
|
87
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
|
86
88
|
createdBySignature?: string | null | undefined;
|
|
89
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
87
90
|
} | null | undefined;
|
|
88
91
|
};
|
|
89
|
-
|
|
90
|
-
createdBy: string;
|
|
91
|
-
updatedAt: string;
|
|
92
|
-
trackingId: string;
|
|
92
|
+
updatedByUserRole: string;
|
|
93
93
|
potentialDuplicates: {
|
|
94
|
-
id: string & import("zod")
|
|
94
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
95
95
|
trackingId: string;
|
|
96
96
|
}[];
|
|
97
97
|
flags: string[];
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
createdByUserType?: "user" | "system" | null | undefined;
|
|
102
|
-
updatedByUserRole?: string | null | undefined;
|
|
103
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
104
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
105
|
-
updatedAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
98
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
|
99
|
+
createdBySignature?: string | null | undefined;
|
|
100
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
106
101
|
assignedTo?: string | null | undefined;
|
|
102
|
+
dateOfEvent?: string | null | undefined;
|
|
103
|
+
updatedAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
107
104
|
updatedBy?: string | null | undefined;
|
|
108
105
|
};
|
|
109
106
|
/**
|
|
@@ -7,298 +7,280 @@ import { Action } from '../ActionDocument';
|
|
|
7
7
|
*
|
|
8
8
|
* */
|
|
9
9
|
export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
|
|
10
|
-
|
|
10
|
+
type: "ASSIGN";
|
|
11
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
12
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
11
13
|
transactionId: string;
|
|
12
|
-
createdByUserType: "
|
|
14
|
+
createdByUserType: "system" | "user";
|
|
13
15
|
createdAt: string;
|
|
14
16
|
createdBy: string;
|
|
17
|
+
createdByRole: string;
|
|
15
18
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
20
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
19
|
+
assignedTo: string;
|
|
20
|
+
createdBySignature?: string | 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")
|
|
23
|
-
registrationNumber?: string | undefined;
|
|
23
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
24
24
|
} | {
|
|
25
|
-
|
|
25
|
+
type: "UNASSIGN";
|
|
26
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
27
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
26
28
|
transactionId: string;
|
|
27
|
-
createdByUserType: "
|
|
29
|
+
createdByUserType: "system" | "user";
|
|
28
30
|
createdAt: string;
|
|
29
31
|
createdBy: string;
|
|
32
|
+
createdByRole: string;
|
|
30
33
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
content: {
|
|
34
|
-
duplicates: {
|
|
35
|
-
id: string & import("zod").$brand<"UUID">;
|
|
36
|
-
trackingId: string;
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
createdByRole?: string | undefined;
|
|
40
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
41
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
34
|
+
createdBySignature?: string | 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")
|
|
37
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
44
38
|
} | {
|
|
45
|
-
|
|
39
|
+
type: "REGISTER";
|
|
40
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
41
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
46
42
|
transactionId: string;
|
|
47
|
-
createdByUserType: "
|
|
43
|
+
createdByUserType: "system" | "user";
|
|
48
44
|
createdAt: string;
|
|
49
45
|
createdBy: string;
|
|
46
|
+
createdByRole: string;
|
|
50
47
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
content: {
|
|
54
|
-
comment?: string | undefined;
|
|
55
|
-
};
|
|
56
|
-
createdByRole?: string | undefined;
|
|
57
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
58
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
48
|
+
createdBySignature?: string | null | undefined;
|
|
49
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
59
50
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
60
|
-
originalActionId?: (string & import("zod")
|
|
51
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
52
|
+
registrationNumber?: string | undefined;
|
|
61
53
|
} | {
|
|
62
|
-
|
|
54
|
+
type: "DECLARE";
|
|
55
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
56
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
63
57
|
transactionId: string;
|
|
64
|
-
createdByUserType: "
|
|
58
|
+
createdByUserType: "system" | "user";
|
|
65
59
|
createdAt: string;
|
|
66
60
|
createdBy: string;
|
|
61
|
+
createdByRole: string;
|
|
67
62
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
createdByRole?: string | undefined;
|
|
71
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
72
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
63
|
+
createdBySignature?: string | 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")
|
|
75
|
-
content?: {
|
|
76
|
-
templateId?: string | undefined;
|
|
77
|
-
} | null | undefined;
|
|
66
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
78
67
|
} | {
|
|
79
|
-
|
|
68
|
+
type: "VALIDATE";
|
|
69
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
70
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
80
71
|
transactionId: string;
|
|
81
|
-
createdByUserType: "
|
|
72
|
+
createdByUserType: "system" | "user";
|
|
82
73
|
createdAt: string;
|
|
83
74
|
createdBy: string;
|
|
75
|
+
createdByRole: string;
|
|
84
76
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
createdByRole?: string | undefined;
|
|
88
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
89
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
77
|
+
createdBySignature?: string | null | undefined;
|
|
78
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
90
79
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
91
|
-
originalActionId?: (string & import("zod")
|
|
80
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
92
81
|
} | {
|
|
93
|
-
|
|
82
|
+
type: "REJECT";
|
|
83
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
84
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
85
|
+
content: {
|
|
86
|
+
reason: string;
|
|
87
|
+
};
|
|
94
88
|
transactionId: string;
|
|
95
|
-
createdByUserType: "
|
|
89
|
+
createdByUserType: "system" | "user";
|
|
96
90
|
createdAt: string;
|
|
97
91
|
createdBy: string;
|
|
92
|
+
createdByRole: string;
|
|
98
93
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
customActionType: string;
|
|
102
|
-
createdByRole?: string | undefined;
|
|
103
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
104
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
94
|
+
createdBySignature?: string | null | undefined;
|
|
95
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
105
96
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
106
|
-
originalActionId?: (string & import("zod")
|
|
97
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
107
98
|
} | {
|
|
108
|
-
|
|
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
|
+
};
|
|
109
108
|
transactionId: string;
|
|
110
|
-
createdByUserType: "
|
|
109
|
+
createdByUserType: "system" | "user";
|
|
111
110
|
createdAt: string;
|
|
112
111
|
createdBy: string;
|
|
112
|
+
createdByRole: string;
|
|
113
113
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
createdByRole?: string | undefined;
|
|
117
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
118
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
114
|
+
createdBySignature?: string | null | undefined;
|
|
115
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
119
116
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
120
|
-
originalActionId?: (string & import("zod")
|
|
117
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
121
118
|
} | {
|
|
122
|
-
|
|
119
|
+
type: "MARK_AS_NOT_DUPLICATE";
|
|
120
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
121
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
123
122
|
transactionId: string;
|
|
124
|
-
createdByUserType: "
|
|
123
|
+
createdByUserType: "system" | "user";
|
|
125
124
|
createdAt: string;
|
|
126
125
|
createdBy: string;
|
|
126
|
+
createdByRole: string;
|
|
127
127
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
content: {
|
|
131
|
-
reason: string;
|
|
132
|
-
};
|
|
133
|
-
createdByRole?: string | undefined;
|
|
134
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
135
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
128
|
+
createdBySignature?: string | null | undefined;
|
|
129
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
136
130
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
137
|
-
originalActionId?: (string & import("zod")
|
|
131
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
138
132
|
} | {
|
|
139
|
-
|
|
133
|
+
type: "MARK_AS_DUPLICATE";
|
|
134
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
135
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
140
136
|
transactionId: string;
|
|
141
|
-
createdByUserType: "
|
|
137
|
+
createdByUserType: "system" | "user";
|
|
142
138
|
createdAt: string;
|
|
143
139
|
createdBy: string;
|
|
140
|
+
createdByRole: string;
|
|
144
141
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
createdBySignature?:
|
|
149
|
-
createdAtLocation?: (string & import("zod")
|
|
142
|
+
content?: {
|
|
143
|
+
duplicateOf: string & import("zod").BRAND<"UUID">;
|
|
144
|
+
} | undefined;
|
|
145
|
+
createdBySignature?: string | null | undefined;
|
|
146
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
150
147
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
151
|
-
originalActionId?: (string & import("zod")
|
|
148
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
152
149
|
} | {
|
|
153
|
-
|
|
150
|
+
type: "ARCHIVE";
|
|
151
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
152
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
153
|
+
content: {
|
|
154
|
+
reason: string;
|
|
155
|
+
};
|
|
154
156
|
transactionId: string;
|
|
155
|
-
createdByUserType: "
|
|
157
|
+
createdByUserType: "system" | "user";
|
|
156
158
|
createdAt: string;
|
|
157
159
|
createdBy: string;
|
|
160
|
+
createdByRole: string;
|
|
158
161
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
createdByRole?: string | undefined;
|
|
162
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
163
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
162
|
+
createdBySignature?: string | null | undefined;
|
|
163
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
164
164
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
165
|
-
originalActionId?: (string & import("zod")
|
|
166
|
-
content?: {
|
|
167
|
-
duplicateOf: string & import("zod").$brand<"UUID">;
|
|
168
|
-
} | undefined;
|
|
165
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
169
166
|
} | {
|
|
170
|
-
|
|
167
|
+
type: "CREATE";
|
|
168
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
169
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
171
170
|
transactionId: string;
|
|
172
|
-
createdByUserType: "
|
|
171
|
+
createdByUserType: "system" | "user";
|
|
173
172
|
createdAt: string;
|
|
174
173
|
createdBy: string;
|
|
174
|
+
createdByRole: string;
|
|
175
175
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
content: {
|
|
179
|
-
reason: string;
|
|
180
|
-
};
|
|
181
|
-
createdByRole?: string | undefined;
|
|
182
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
183
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
176
|
+
createdBySignature?: string | null | undefined;
|
|
177
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
184
178
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
185
|
-
originalActionId?: (string & import("zod")
|
|
179
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
186
180
|
} | {
|
|
187
|
-
|
|
181
|
+
type: "NOTIFY";
|
|
182
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
183
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
188
184
|
transactionId: string;
|
|
189
|
-
createdByUserType: "
|
|
185
|
+
createdByUserType: "system" | "user";
|
|
190
186
|
createdAt: string;
|
|
191
187
|
createdBy: string;
|
|
188
|
+
createdByRole: string;
|
|
192
189
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
createdByRole?: string | undefined;
|
|
196
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
197
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
190
|
+
createdBySignature?: string | null | undefined;
|
|
191
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
198
192
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
199
|
-
originalActionId?: (string & import("zod")
|
|
193
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
200
194
|
} | {
|
|
201
|
-
|
|
195
|
+
type: "PRINT_CERTIFICATE";
|
|
196
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
197
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
202
198
|
transactionId: string;
|
|
203
|
-
createdByUserType: "
|
|
199
|
+
createdByUserType: "system" | "user";
|
|
204
200
|
createdAt: string;
|
|
205
201
|
createdBy: string;
|
|
202
|
+
createdByRole: string;
|
|
206
203
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
createdBySignature?:
|
|
211
|
-
createdAtLocation?: (string & import("zod")
|
|
204
|
+
content?: {
|
|
205
|
+
templateId?: string | undefined;
|
|
206
|
+
} | null | undefined;
|
|
207
|
+
createdBySignature?: string | null | undefined;
|
|
208
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
212
209
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
213
|
-
originalActionId?: (string & import("zod")
|
|
210
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
214
211
|
} | {
|
|
215
|
-
|
|
212
|
+
type: "REQUEST_CORRECTION";
|
|
213
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
214
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
216
215
|
transactionId: string;
|
|
217
|
-
createdByUserType: "
|
|
216
|
+
createdByUserType: "system" | "user";
|
|
218
217
|
createdAt: string;
|
|
219
218
|
createdBy: string;
|
|
219
|
+
createdByRole: string;
|
|
220
220
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
assignedTo: string;
|
|
224
|
-
createdByRole?: string | undefined;
|
|
225
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
226
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
221
|
+
createdBySignature?: string | null | undefined;
|
|
222
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
227
223
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
228
|
-
originalActionId?: (string & import("zod")
|
|
224
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
229
225
|
} | {
|
|
230
|
-
|
|
226
|
+
type: "APPROVE_CORRECTION";
|
|
227
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
228
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
231
229
|
transactionId: string;
|
|
232
|
-
createdByUserType: "
|
|
230
|
+
createdByUserType: "system" | "user";
|
|
233
231
|
createdAt: string;
|
|
234
232
|
createdBy: string;
|
|
233
|
+
createdByRole: string;
|
|
235
234
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
236
|
-
status: "Requested" | "Accepted" | "Rejected";
|
|
237
|
-
type: "APPROVE_CORRECTION";
|
|
238
235
|
requestId: string;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
236
|
+
createdBySignature?: string | null | undefined;
|
|
237
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
242
238
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
243
|
-
originalActionId?: (string & import("zod")
|
|
239
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
244
240
|
} | {
|
|
245
|
-
id: string & import("zod").$brand<"UUID">;
|
|
246
|
-
transactionId: string;
|
|
247
|
-
createdByUserType: "user" | "system";
|
|
248
|
-
createdAt: string;
|
|
249
|
-
createdBy: string;
|
|
250
|
-
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
251
|
-
status: "Requested" | "Accepted" | "Rejected";
|
|
252
241
|
type: "REJECT_CORRECTION";
|
|
253
|
-
|
|
242
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
243
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
254
244
|
content: {
|
|
255
245
|
reason: string;
|
|
256
246
|
};
|
|
257
|
-
createdByRole?: string | undefined;
|
|
258
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
259
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
260
|
-
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
261
|
-
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
262
|
-
} | {
|
|
263
|
-
id: string & import("zod").$brand<"UUID">;
|
|
264
247
|
transactionId: string;
|
|
265
|
-
createdByUserType: "
|
|
248
|
+
createdByUserType: "system" | "user";
|
|
266
249
|
createdAt: string;
|
|
267
250
|
createdBy: string;
|
|
251
|
+
createdByRole: string;
|
|
268
252
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
273
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
253
|
+
requestId: string;
|
|
254
|
+
createdBySignature?: string | null | undefined;
|
|
255
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
274
256
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
275
|
-
originalActionId?: (string & import("zod")
|
|
257
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
276
258
|
} | {
|
|
277
|
-
|
|
259
|
+
type: "READ";
|
|
260
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
261
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
278
262
|
transactionId: string;
|
|
279
|
-
createdByUserType: "
|
|
263
|
+
createdByUserType: "system" | "user";
|
|
280
264
|
createdAt: string;
|
|
281
265
|
createdBy: string;
|
|
266
|
+
createdByRole: string;
|
|
282
267
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
createdByRole?: string | undefined;
|
|
286
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
287
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
268
|
+
createdBySignature?: string | null | undefined;
|
|
269
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
288
270
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
289
|
-
originalActionId?: (string & import("zod")
|
|
271
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
290
272
|
} | {
|
|
291
|
-
|
|
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";
|
|
292
276
|
transactionId: string;
|
|
293
|
-
createdByUserType: "
|
|
277
|
+
createdByUserType: "system" | "user";
|
|
294
278
|
createdAt: string;
|
|
295
279
|
createdBy: string;
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
301
|
-
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
280
|
+
createdByRole: string;
|
|
281
|
+
createdBySignature?: string | null | undefined;
|
|
282
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
283
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
302
284
|
}>;
|
|
303
285
|
/**
|
|
304
286
|
* @returns the legal statuses of the event. Event is considered legal if it has been accepted.
|
|
@@ -308,21 +290,21 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
308
290
|
DECLARED: {
|
|
309
291
|
createdAt: string;
|
|
310
292
|
createdBy: string;
|
|
311
|
-
createdByUserType: "
|
|
312
|
-
createdAtLocation: (string & import("zod")
|
|
293
|
+
createdByUserType: "system" | "user";
|
|
294
|
+
createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
313
295
|
acceptedAt: string;
|
|
314
|
-
createdByRole: string
|
|
315
|
-
createdBySignature:
|
|
296
|
+
createdByRole: string;
|
|
297
|
+
createdBySignature: string | null | undefined;
|
|
316
298
|
registrationNumber: string | null | undefined;
|
|
317
299
|
} | null;
|
|
318
300
|
REGISTERED: {
|
|
319
301
|
createdAt: string;
|
|
320
302
|
createdBy: string;
|
|
321
|
-
createdByUserType: "
|
|
322
|
-
createdAtLocation: (string & import("zod")
|
|
303
|
+
createdByUserType: "system" | "user";
|
|
304
|
+
createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
323
305
|
acceptedAt: string;
|
|
324
|
-
createdByRole: string
|
|
325
|
-
createdBySignature:
|
|
306
|
+
createdByRole: string;
|
|
307
|
+
createdBySignature: string | null | undefined;
|
|
326
308
|
registrationNumber: string | null | undefined;
|
|
327
309
|
} | null;
|
|
328
310
|
};
|