@opencrvs/toolkit 1.9.12-rc.f5ca5e6 → 1.9.12-rc.f5d99e1
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 +2037 -41
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +3633 -0
- package/dist/commons/api/router.d.ts +482 -244
- 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 +149 -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 +10 -9
- package/dist/commons/events/DynamicFieldValue.d.ts +37 -19
- package/dist/commons/events/EventConfig.d.ts +3 -1
- 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 +287 -71
- 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 +4 -3
- 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 +1190 -1251
- 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/checkout-upstream-files.d.ts +3 -0
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
- package/dist/migrations/v2.0/checkout-upstream-files.js +143 -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 +829 -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/create-events-index.d.ts +3 -0
- package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
- package/dist/migrations/v2.0/create-events-index.js +326 -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 +3572 -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 +282 -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/migrate-workqueue-configs.d.ts +3 -0
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
- package/dist/migrations/v2.0/migrate-workqueue-configs.js +237 -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-demo-scope.d.ts +3 -0
- package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-demo-scope.js +75 -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-hearth-migrations.d.ts +3 -0
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-hearth-migrations.js +78 -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/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
- package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
- package/dist/migrations/v2.0/simplify-analytics-precalculations.js +196 -0
- package/dist/notification/index.js +1020 -1155
- package/dist/scopes/index.d.ts +389 -152
- package/dist/scopes/index.js +128 -322
- package/opencrvs-toolkit-1.9.12-rc.f5d99e1.tgz +0 -0
- package/package.json +11 -7
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-1.9.12-rc.f5ca5e6.tgz +0 -0
|
@@ -27,6 +27,7 @@ export type ActionType = (typeof ActionType)[keyof typeof ActionType];
|
|
|
27
27
|
export declare const ConfirmableActions: readonly ["NOTIFY", "DECLARE", "EDIT", "REGISTER", "REJECT", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "APPROVE_CORRECTION", "REJECT_CORRECTION", "CUSTOM"];
|
|
28
28
|
/** Testing building types from enums as an alternative */
|
|
29
29
|
export declare const ActionTypes: z.ZodEnum<{
|
|
30
|
+
CUSTOM: "CUSTOM";
|
|
30
31
|
DELETE: "DELETE";
|
|
31
32
|
CREATE: "CREATE";
|
|
32
33
|
NOTIFY: "NOTIFY";
|
|
@@ -45,7 +46,6 @@ export declare const ActionTypes: z.ZodEnum<{
|
|
|
45
46
|
READ: "READ";
|
|
46
47
|
ASSIGN: "ASSIGN";
|
|
47
48
|
UNASSIGN: "UNASSIGN";
|
|
48
|
-
CUSTOM: "CUSTOM";
|
|
49
49
|
}>;
|
|
50
50
|
export type ActionTypes = z.infer<typeof ActionTypes>;
|
|
51
51
|
/**
|
|
@@ -76,6 +76,7 @@ export declare const DeclarationUpdateActions: z.ZodEnum<{
|
|
|
76
76
|
export type DeclarationUpdateActionType = z.infer<typeof DeclarationUpdateActions>;
|
|
77
77
|
/** Actions which only update annotation or status of an event. */
|
|
78
78
|
export declare const annotationActions: z.ZodEnum<{
|
|
79
|
+
CUSTOM: "CUSTOM";
|
|
79
80
|
DELETE: "DELETE";
|
|
80
81
|
CREATE: "CREATE";
|
|
81
82
|
REJECT: "REJECT";
|
|
@@ -89,11 +90,11 @@ export declare const annotationActions: z.ZodEnum<{
|
|
|
89
90
|
READ: "READ";
|
|
90
91
|
ASSIGN: "ASSIGN";
|
|
91
92
|
UNASSIGN: "UNASSIGN";
|
|
92
|
-
CUSTOM: "CUSTOM";
|
|
93
93
|
}>;
|
|
94
94
|
export type AnnotationActionType = z.infer<typeof annotationActions>;
|
|
95
95
|
/** Actions which requires the user to be assigned */
|
|
96
96
|
export declare const writeActions: z.ZodEnum<{
|
|
97
|
+
CUSTOM: "CUSTOM";
|
|
97
98
|
DELETE: "DELETE";
|
|
98
99
|
NOTIFY: "NOTIFY";
|
|
99
100
|
DECLARE: "DECLARE";
|
|
@@ -108,7 +109,6 @@ export declare const writeActions: z.ZodEnum<{
|
|
|
108
109
|
REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
|
109
110
|
REJECT_CORRECTION: "REJECT_CORRECTION";
|
|
110
111
|
APPROVE_CORRECTION: "APPROVE_CORRECTION";
|
|
111
|
-
CUSTOM: "CUSTOM";
|
|
112
112
|
}>;
|
|
113
113
|
/** Actions which are availabe for Workqueue CTA menu and workqueue */
|
|
114
114
|
export declare const WorkqueueActionType: z.ZodEnum<{
|
|
@@ -50,6 +50,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
50
50
|
readonly SIGNATURE: "SIGNATURE";
|
|
51
51
|
readonly DATA: "DATA";
|
|
52
52
|
readonly BUTTON: "BUTTON";
|
|
53
|
+
readonly AUTOCOMPLETE: "AUTOCOMPLETE";
|
|
53
54
|
readonly SEARCH: "SEARCH";
|
|
54
55
|
readonly ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON";
|
|
55
56
|
readonly HTTP: "HTTP";
|
|
@@ -169,6 +170,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
169
170
|
readonly SIGNATURE: "SIGNATURE";
|
|
170
171
|
readonly DATA: "DATA";
|
|
171
172
|
readonly BUTTON: "BUTTON";
|
|
173
|
+
readonly AUTOCOMPLETE: "AUTOCOMPLETE";
|
|
172
174
|
readonly SEARCH: "SEARCH";
|
|
173
175
|
readonly ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON";
|
|
174
176
|
readonly HTTP: "HTTP";
|
|
@@ -264,6 +266,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
264
266
|
readonly SIGNATURE: "SIGNATURE";
|
|
265
267
|
readonly DATA: "DATA";
|
|
266
268
|
readonly BUTTON: "BUTTON";
|
|
269
|
+
readonly AUTOCOMPLETE: "AUTOCOMPLETE";
|
|
267
270
|
readonly SEARCH: "SEARCH";
|
|
268
271
|
readonly ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON";
|
|
269
272
|
readonly HTTP: "HTTP";
|
|
@@ -351,6 +354,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
351
354
|
readonly SIGNATURE: "SIGNATURE";
|
|
352
355
|
readonly DATA: "DATA";
|
|
353
356
|
readonly BUTTON: "BUTTON";
|
|
357
|
+
readonly AUTOCOMPLETE: "AUTOCOMPLETE";
|
|
354
358
|
readonly SEARCH: "SEARCH";
|
|
355
359
|
readonly ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON";
|
|
356
360
|
readonly HTTP: "HTTP";
|
|
@@ -449,6 +453,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
449
453
|
readonly SIGNATURE: "SIGNATURE";
|
|
450
454
|
readonly DATA: "DATA";
|
|
451
455
|
readonly BUTTON: "BUTTON";
|
|
456
|
+
readonly AUTOCOMPLETE: "AUTOCOMPLETE";
|
|
452
457
|
readonly SEARCH: "SEARCH";
|
|
453
458
|
readonly ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON";
|
|
454
459
|
readonly HTTP: "HTTP";
|
|
@@ -536,6 +541,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
536
541
|
readonly SIGNATURE: "SIGNATURE";
|
|
537
542
|
readonly DATA: "DATA";
|
|
538
543
|
readonly BUTTON: "BUTTON";
|
|
544
|
+
readonly AUTOCOMPLETE: "AUTOCOMPLETE";
|
|
539
545
|
readonly SEARCH: "SEARCH";
|
|
540
546
|
readonly ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON";
|
|
541
547
|
readonly HTTP: "HTTP";
|
|
@@ -1,119 +1,40 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
requestData: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
type ActionAuditLogRequestData = {
|
|
40
|
-
eventId: string;
|
|
41
|
-
actionType: string;
|
|
42
|
-
transactionId: string;
|
|
43
|
-
};
|
|
44
|
-
export type EventActionAuditLog = {
|
|
45
|
-
operation: 'event.actions.notify.request' | 'event.actions.declare.request' | 'event.actions.register.request' | 'event.actions.reject.request' | 'event.actions.validate.request' | 'event.actions.edit.request' | 'event.actions.assign.request' | 'event.actions.unassign.request' | 'event.actions.read.request' | 'event.actions.archive.request' | 'event.actions.reinstate.request' | 'event.actions.print_certificate.request' | 'event.actions.correction.request.request' | 'event.actions.correction.approve.request' | 'event.actions.correction.reject.request' | 'event.actions.mark_as_duplicate.request' | 'event.actions.mark_as_not_duplicate.request';
|
|
46
|
-
requestData: ActionAuditLogRequestData;
|
|
47
|
-
responseSummary: EventResponseSummary;
|
|
48
|
-
};
|
|
49
|
-
export type IntegrationCreateAuditLog = {
|
|
50
|
-
operation: 'integrations.create';
|
|
51
|
-
requestData: {
|
|
52
|
-
name: string;
|
|
53
|
-
scopes: string[];
|
|
54
|
-
};
|
|
55
|
-
responseSummary: {
|
|
56
|
-
clientId: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export type IntegrationRefreshTokenAuditLog = {
|
|
60
|
-
operation: 'integrations.refreshToken';
|
|
61
|
-
requestData: {
|
|
62
|
-
clientId: string;
|
|
63
|
-
};
|
|
64
|
-
responseSummary: {
|
|
65
|
-
clientId: string;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
export type IntegrationDeactivateAuditLog = {
|
|
69
|
-
operation: 'integrations.deactivate';
|
|
70
|
-
requestData: {
|
|
71
|
-
id: string;
|
|
72
|
-
};
|
|
73
|
-
responseSummary: {
|
|
74
|
-
id: string;
|
|
75
|
-
status: string;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export type IntegrationActivateAuditLog = {
|
|
79
|
-
operation: 'integrations.activate';
|
|
80
|
-
requestData: {
|
|
81
|
-
id: string;
|
|
82
|
-
};
|
|
83
|
-
responseSummary: {
|
|
84
|
-
id: string;
|
|
85
|
-
status: string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
export type IntegrationDeleteAuditLog = {
|
|
89
|
-
operation: 'integrations.delete';
|
|
90
|
-
requestData: {
|
|
91
|
-
id: string;
|
|
92
|
-
};
|
|
93
|
-
responseSummary: {
|
|
94
|
-
id: string;
|
|
95
|
-
name: string;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
export type IntegrationRefreshSecretAuditLog = {
|
|
99
|
-
operation: 'integrations.refreshSecret';
|
|
100
|
-
requestData: {
|
|
101
|
-
id: string;
|
|
102
|
-
};
|
|
103
|
-
responseSummary: {
|
|
104
|
-
clientId: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
export type AttachmentUploadAuditLog = {
|
|
108
|
-
operation: 'attachments.upload';
|
|
109
|
-
requestData: {
|
|
110
|
-
transactionId: string;
|
|
111
|
-
path: string | null;
|
|
112
|
-
};
|
|
113
|
-
responseSummary: {
|
|
114
|
-
fileUrl: string;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
2
|
+
declare const EventActionEntrySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
clientId: z.ZodString;
|
|
5
|
+
clientType: z.ZodEnum<{
|
|
6
|
+
user: "user";
|
|
7
|
+
system: "system";
|
|
8
|
+
}>;
|
|
9
|
+
createdAt: z.ZodString;
|
|
10
|
+
operation: z.ZodEnum<{
|
|
11
|
+
"event.actions.notify.request": "event.actions.notify.request";
|
|
12
|
+
"event.actions.declare.request": "event.actions.declare.request";
|
|
13
|
+
"event.actions.register.request": "event.actions.register.request";
|
|
14
|
+
"event.actions.reject.request": "event.actions.reject.request";
|
|
15
|
+
"event.actions.validate.request": "event.actions.validate.request";
|
|
16
|
+
"event.actions.edit.request": "event.actions.edit.request";
|
|
17
|
+
"event.actions.assign.request": "event.actions.assign.request";
|
|
18
|
+
"event.actions.unassign.request": "event.actions.unassign.request";
|
|
19
|
+
"event.actions.read.request": "event.actions.read.request";
|
|
20
|
+
"event.actions.archive.request": "event.actions.archive.request";
|
|
21
|
+
"event.actions.reinstate.request": "event.actions.reinstate.request";
|
|
22
|
+
"event.actions.print_certificate.request": "event.actions.print_certificate.request";
|
|
23
|
+
"event.actions.correction.request.request": "event.actions.correction.request.request";
|
|
24
|
+
"event.actions.correction.approve.request": "event.actions.correction.approve.request";
|
|
25
|
+
"event.actions.correction.reject.request": "event.actions.correction.reject.request";
|
|
26
|
+
"event.actions.mark_as_duplicate.request": "event.actions.mark_as_duplicate.request";
|
|
27
|
+
"event.actions.mark_as_not_duplicate.request": "event.actions.mark_as_not_duplicate.request";
|
|
28
|
+
}>;
|
|
29
|
+
requestData: z.ZodObject<{
|
|
30
|
+
eventId: z.ZodString;
|
|
31
|
+
actionType: z.ZodString;
|
|
32
|
+
eventType: z.ZodString;
|
|
33
|
+
trackingId: z.ZodString;
|
|
34
|
+
transactionId: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
/** Write-side schema for the user audit record mutation (no DB-generated fields). */
|
|
117
38
|
export declare const UserAuditRecordInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
118
39
|
operation: z.ZodLiteral<"user.create_user">;
|
|
119
40
|
requestData: z.ZodObject<{
|
|
@@ -121,103 +42,364 @@ export declare const UserAuditRecordInput: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
121
42
|
role: z.ZodString;
|
|
122
43
|
primaryOfficeId: z.ZodString;
|
|
123
44
|
}, z.core.$strip>;
|
|
124
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
125
45
|
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
-
operation: z.
|
|
46
|
+
operation: z.ZodEnum<{
|
|
47
|
+
"user.deactivate": "user.deactivate";
|
|
48
|
+
"user.reactivate": "user.reactivate";
|
|
49
|
+
}>;
|
|
127
50
|
requestData: z.ZodObject<{
|
|
128
51
|
subjectId: z.ZodString;
|
|
129
52
|
reason: z.ZodString;
|
|
130
53
|
comment: z.ZodOptional<z.ZodString>;
|
|
131
54
|
}, z.core.$strip>;
|
|
132
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
133
55
|
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
-
operation: z.
|
|
56
|
+
operation: z.ZodEnum<{
|
|
57
|
+
"user.edit_user": "user.edit_user";
|
|
58
|
+
"user.logged_in": "user.logged_in";
|
|
59
|
+
"user.logged_out": "user.logged_out";
|
|
60
|
+
"user.password_changed": "user.password_changed";
|
|
61
|
+
"user.password_reset": "user.password_reset";
|
|
62
|
+
"user.password_reset_by_admin": "user.password_reset_by_admin";
|
|
63
|
+
"user.username_reminder": "user.username_reminder";
|
|
64
|
+
"user.username_reminder_by_admin": "user.username_reminder_by_admin";
|
|
65
|
+
}>;
|
|
135
66
|
requestData: z.ZodObject<{
|
|
136
67
|
subjectId: z.ZodString;
|
|
137
|
-
reason: z.ZodString;
|
|
138
|
-
comment: z.ZodOptional<z.ZodString>;
|
|
139
68
|
}, z.core.$strip>;
|
|
140
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
141
69
|
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
-
operation: z.ZodLiteral<"user.
|
|
70
|
+
operation: z.ZodLiteral<"user.email_address_changed">;
|
|
143
71
|
requestData: z.ZodObject<{
|
|
144
72
|
subjectId: z.ZodString;
|
|
145
73
|
}, z.core.$strip>;
|
|
146
|
-
responseSummary: z.ZodObject<{
|
|
74
|
+
responseSummary: z.ZodObject<{
|
|
75
|
+
email: z.ZodString;
|
|
76
|
+
}, z.core.$strip>;
|
|
147
77
|
}, z.core.$strip>, z.ZodObject<{
|
|
148
|
-
operation: z.ZodLiteral<"user.
|
|
78
|
+
operation: z.ZodLiteral<"user.phone_number_changed">;
|
|
149
79
|
requestData: z.ZodObject<{
|
|
150
80
|
subjectId: z.ZodString;
|
|
151
81
|
}, z.core.$strip>;
|
|
152
82
|
responseSummary: z.ZodObject<{
|
|
153
|
-
|
|
83
|
+
phoneNumber: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
}, z.core.$strip>], "operation">;
|
|
86
|
+
export type UserAuditLog = z.infer<typeof UserAuditRecordInput>;
|
|
87
|
+
export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
clientId: z.ZodString;
|
|
90
|
+
clientType: z.ZodEnum<{
|
|
91
|
+
user: "user";
|
|
92
|
+
system: "system";
|
|
93
|
+
}>;
|
|
94
|
+
createdAt: z.ZodString;
|
|
95
|
+
operation: z.ZodLiteral<"event.create">;
|
|
96
|
+
requestData: z.ZodObject<{
|
|
97
|
+
transactionId: z.ZodString;
|
|
98
|
+
type: z.ZodString;
|
|
99
|
+
createdAtLocation: z.ZodNullable<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
responseSummary: z.ZodObject<{
|
|
102
|
+
eventId: z.ZodString;
|
|
103
|
+
trackingId: z.ZodString;
|
|
154
104
|
}, z.core.$strip>;
|
|
155
105
|
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
-
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
clientId: z.ZodString;
|
|
108
|
+
clientType: z.ZodEnum<{
|
|
109
|
+
user: "user";
|
|
110
|
+
system: "system";
|
|
111
|
+
}>;
|
|
112
|
+
createdAt: z.ZodString;
|
|
113
|
+
operation: z.ZodLiteral<"event.get">;
|
|
157
114
|
requestData: z.ZodObject<{
|
|
158
|
-
|
|
115
|
+
eventId: z.ZodString;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
responseSummary: z.ZodObject<{
|
|
118
|
+
eventType: z.ZodString;
|
|
119
|
+
trackingId: z.ZodString;
|
|
159
120
|
}, z.core.$strip>;
|
|
160
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
161
121
|
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
-
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
clientId: z.ZodString;
|
|
124
|
+
createdAt: z.ZodString;
|
|
125
|
+
operation: z.ZodLiteral<"event.search">;
|
|
126
|
+
clientType: z.ZodLiteral<"system">;
|
|
163
127
|
requestData: z.ZodObject<{
|
|
164
|
-
|
|
128
|
+
query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
129
|
+
limit: z.ZodNullable<z.ZodNumber>;
|
|
130
|
+
offset: z.ZodNullable<z.ZodNumber>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
responseSummary: z.ZodObject<{
|
|
133
|
+
total: z.ZodNumber;
|
|
134
|
+
eventIds: z.ZodArray<z.ZodString>;
|
|
165
135
|
}, z.core.$strip>;
|
|
166
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
167
136
|
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
-
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
clientId: z.ZodString;
|
|
139
|
+
clientType: z.ZodEnum<{
|
|
140
|
+
user: "user";
|
|
141
|
+
system: "system";
|
|
142
|
+
}>;
|
|
143
|
+
createdAt: z.ZodString;
|
|
144
|
+
operation: z.ZodEnum<{
|
|
145
|
+
"event.actions.notify.request": "event.actions.notify.request";
|
|
146
|
+
"event.actions.declare.request": "event.actions.declare.request";
|
|
147
|
+
"event.actions.register.request": "event.actions.register.request";
|
|
148
|
+
"event.actions.reject.request": "event.actions.reject.request";
|
|
149
|
+
"event.actions.validate.request": "event.actions.validate.request";
|
|
150
|
+
"event.actions.edit.request": "event.actions.edit.request";
|
|
151
|
+
"event.actions.assign.request": "event.actions.assign.request";
|
|
152
|
+
"event.actions.unassign.request": "event.actions.unassign.request";
|
|
153
|
+
"event.actions.read.request": "event.actions.read.request";
|
|
154
|
+
"event.actions.archive.request": "event.actions.archive.request";
|
|
155
|
+
"event.actions.reinstate.request": "event.actions.reinstate.request";
|
|
156
|
+
"event.actions.print_certificate.request": "event.actions.print_certificate.request";
|
|
157
|
+
"event.actions.correction.request.request": "event.actions.correction.request.request";
|
|
158
|
+
"event.actions.correction.approve.request": "event.actions.correction.approve.request";
|
|
159
|
+
"event.actions.correction.reject.request": "event.actions.correction.reject.request";
|
|
160
|
+
"event.actions.mark_as_duplicate.request": "event.actions.mark_as_duplicate.request";
|
|
161
|
+
"event.actions.mark_as_not_duplicate.request": "event.actions.mark_as_not_duplicate.request";
|
|
162
|
+
}>;
|
|
169
163
|
requestData: z.ZodObject<{
|
|
170
|
-
|
|
164
|
+
eventId: z.ZodString;
|
|
165
|
+
actionType: z.ZodString;
|
|
166
|
+
eventType: z.ZodString;
|
|
167
|
+
trackingId: z.ZodString;
|
|
168
|
+
transactionId: z.ZodString;
|
|
171
169
|
}, z.core.$strip>;
|
|
172
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
173
170
|
}, z.core.$strip>, z.ZodObject<{
|
|
174
|
-
|
|
171
|
+
id: z.ZodString;
|
|
172
|
+
clientId: z.ZodString;
|
|
173
|
+
clientType: z.ZodEnum<{
|
|
174
|
+
user: "user";
|
|
175
|
+
system: "system";
|
|
176
|
+
}>;
|
|
177
|
+
createdAt: z.ZodString;
|
|
178
|
+
operation: z.ZodLiteral<"event.actions.custom.request">;
|
|
175
179
|
requestData: z.ZodObject<{
|
|
176
|
-
|
|
180
|
+
eventId: z.ZodString;
|
|
181
|
+
actionType: z.ZodLiteral<"CUSTOM">;
|
|
182
|
+
customAction: z.ZodString;
|
|
183
|
+
eventType: z.ZodString;
|
|
184
|
+
trackingId: z.ZodString;
|
|
185
|
+
transactionId: z.ZodString;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
+
id: z.ZodString;
|
|
189
|
+
clientId: z.ZodString;
|
|
190
|
+
clientType: z.ZodEnum<{
|
|
191
|
+
user: "user";
|
|
192
|
+
system: "system";
|
|
193
|
+
}>;
|
|
194
|
+
createdAt: z.ZodString;
|
|
195
|
+
operation: z.ZodLiteral<"integrations.create">;
|
|
196
|
+
requestData: z.ZodObject<{
|
|
197
|
+
name: z.ZodString;
|
|
198
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
responseSummary: z.ZodObject<{
|
|
201
|
+
clientId: z.ZodString;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
clientId: z.ZodString;
|
|
206
|
+
clientType: z.ZodEnum<{
|
|
207
|
+
user: "user";
|
|
208
|
+
system: "system";
|
|
209
|
+
}>;
|
|
210
|
+
createdAt: z.ZodString;
|
|
211
|
+
operation: z.ZodLiteral<"integrations.refreshToken">;
|
|
212
|
+
requestData: z.ZodObject<{
|
|
213
|
+
clientId: z.ZodString;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
responseSummary: z.ZodObject<{
|
|
216
|
+
clientId: z.ZodString;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
id: z.ZodString;
|
|
220
|
+
clientId: z.ZodString;
|
|
221
|
+
clientType: z.ZodEnum<{
|
|
222
|
+
user: "user";
|
|
223
|
+
system: "system";
|
|
224
|
+
}>;
|
|
225
|
+
createdAt: z.ZodString;
|
|
226
|
+
operation: z.ZodLiteral<"integrations.deactivate">;
|
|
227
|
+
requestData: z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
responseSummary: z.ZodObject<{
|
|
231
|
+
id: z.ZodString;
|
|
232
|
+
status: z.ZodString;
|
|
177
233
|
}, z.core.$strip>;
|
|
178
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
179
234
|
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
-
|
|
235
|
+
id: z.ZodString;
|
|
236
|
+
clientId: z.ZodString;
|
|
237
|
+
clientType: z.ZodEnum<{
|
|
238
|
+
user: "user";
|
|
239
|
+
system: "system";
|
|
240
|
+
}>;
|
|
241
|
+
createdAt: z.ZodString;
|
|
242
|
+
operation: z.ZodLiteral<"integrations.activate">;
|
|
243
|
+
requestData: z.ZodObject<{
|
|
244
|
+
id: z.ZodString;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
responseSummary: z.ZodObject<{
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
status: z.ZodString;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
251
|
+
id: z.ZodString;
|
|
252
|
+
clientId: z.ZodString;
|
|
253
|
+
clientType: z.ZodEnum<{
|
|
254
|
+
user: "user";
|
|
255
|
+
system: "system";
|
|
256
|
+
}>;
|
|
257
|
+
createdAt: z.ZodString;
|
|
258
|
+
operation: z.ZodLiteral<"integrations.delete">;
|
|
259
|
+
requestData: z.ZodObject<{
|
|
260
|
+
id: z.ZodString;
|
|
261
|
+
}, z.core.$strip>;
|
|
262
|
+
responseSummary: z.ZodObject<{
|
|
263
|
+
id: z.ZodString;
|
|
264
|
+
name: z.ZodString;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
id: z.ZodString;
|
|
268
|
+
clientId: z.ZodString;
|
|
269
|
+
clientType: z.ZodEnum<{
|
|
270
|
+
user: "user";
|
|
271
|
+
system: "system";
|
|
272
|
+
}>;
|
|
273
|
+
createdAt: z.ZodString;
|
|
274
|
+
operation: z.ZodLiteral<"integrations.refreshSecret">;
|
|
275
|
+
requestData: z.ZodObject<{
|
|
276
|
+
id: z.ZodString;
|
|
277
|
+
}, z.core.$strip>;
|
|
278
|
+
responseSummary: z.ZodObject<{
|
|
279
|
+
clientId: z.ZodString;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
282
|
+
id: z.ZodString;
|
|
283
|
+
clientId: z.ZodString;
|
|
284
|
+
clientType: z.ZodEnum<{
|
|
285
|
+
user: "user";
|
|
286
|
+
system: "system";
|
|
287
|
+
}>;
|
|
288
|
+
createdAt: z.ZodString;
|
|
289
|
+
operation: z.ZodLiteral<"attachments.upload">;
|
|
290
|
+
requestData: z.ZodObject<{
|
|
291
|
+
transactionId: z.ZodString;
|
|
292
|
+
path: z.ZodNullable<z.ZodString>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
responseSummary: z.ZodObject<{
|
|
295
|
+
fileUrl: z.ZodString;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
298
|
+
id: z.ZodString;
|
|
299
|
+
clientId: z.ZodString;
|
|
300
|
+
clientType: z.ZodEnum<{
|
|
301
|
+
user: "user";
|
|
302
|
+
system: "system";
|
|
303
|
+
}>;
|
|
304
|
+
createdAt: z.ZodString;
|
|
305
|
+
operation: z.ZodLiteral<"user.create_user">;
|
|
181
306
|
requestData: z.ZodObject<{
|
|
182
307
|
subjectId: z.ZodString;
|
|
308
|
+
role: z.ZodString;
|
|
309
|
+
primaryOfficeId: z.ZodString;
|
|
183
310
|
}, z.core.$strip>;
|
|
184
|
-
responseSummary: z.ZodObject<{}, z.core.$strip>;
|
|
185
311
|
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
-
|
|
312
|
+
id: z.ZodString;
|
|
313
|
+
clientId: z.ZodString;
|
|
314
|
+
clientType: z.ZodEnum<{
|
|
315
|
+
user: "user";
|
|
316
|
+
system: "system";
|
|
317
|
+
}>;
|
|
318
|
+
createdAt: z.ZodString;
|
|
319
|
+
operation: z.ZodEnum<{
|
|
320
|
+
"user.deactivate": "user.deactivate";
|
|
321
|
+
"user.reactivate": "user.reactivate";
|
|
322
|
+
}>;
|
|
187
323
|
requestData: z.ZodObject<{
|
|
188
324
|
subjectId: z.ZodString;
|
|
325
|
+
reason: z.ZodString;
|
|
326
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
189
327
|
}, z.core.$strip>;
|
|
190
|
-
|
|
191
|
-
|
|
328
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
329
|
+
id: z.ZodString;
|
|
330
|
+
clientId: z.ZodString;
|
|
331
|
+
clientType: z.ZodEnum<{
|
|
332
|
+
user: "user";
|
|
333
|
+
system: "system";
|
|
334
|
+
}>;
|
|
335
|
+
createdAt: z.ZodString;
|
|
336
|
+
operation: z.ZodEnum<{
|
|
337
|
+
"user.edit_user": "user.edit_user";
|
|
338
|
+
"user.logged_in": "user.logged_in";
|
|
339
|
+
"user.logged_out": "user.logged_out";
|
|
340
|
+
"user.password_changed": "user.password_changed";
|
|
341
|
+
"user.password_reset": "user.password_reset";
|
|
342
|
+
"user.password_reset_by_admin": "user.password_reset_by_admin";
|
|
343
|
+
"user.username_reminder": "user.username_reminder";
|
|
344
|
+
"user.username_reminder_by_admin": "user.username_reminder_by_admin";
|
|
345
|
+
}>;
|
|
346
|
+
requestData: z.ZodObject<{
|
|
347
|
+
subjectId: z.ZodString;
|
|
192
348
|
}, z.core.$strip>;
|
|
193
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
194
|
-
|
|
350
|
+
id: z.ZodString;
|
|
351
|
+
clientId: z.ZodString;
|
|
352
|
+
clientType: z.ZodEnum<{
|
|
353
|
+
user: "user";
|
|
354
|
+
system: "system";
|
|
355
|
+
}>;
|
|
356
|
+
createdAt: z.ZodString;
|
|
357
|
+
operation: z.ZodLiteral<"user.email_address_changed">;
|
|
195
358
|
requestData: z.ZodObject<{
|
|
196
359
|
subjectId: z.ZodString;
|
|
197
360
|
}, z.core.$strip>;
|
|
198
|
-
responseSummary: z.ZodObject<{
|
|
361
|
+
responseSummary: z.ZodObject<{
|
|
362
|
+
email: z.ZodString;
|
|
363
|
+
}, z.core.$strip>;
|
|
199
364
|
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
-
|
|
365
|
+
id: z.ZodString;
|
|
366
|
+
clientId: z.ZodString;
|
|
367
|
+
clientType: z.ZodEnum<{
|
|
368
|
+
user: "user";
|
|
369
|
+
system: "system";
|
|
370
|
+
}>;
|
|
371
|
+
createdAt: z.ZodString;
|
|
372
|
+
operation: z.ZodLiteral<"user.phone_number_changed">;
|
|
201
373
|
requestData: z.ZodObject<{
|
|
202
374
|
subjectId: z.ZodString;
|
|
203
375
|
}, z.core.$strip>;
|
|
204
|
-
responseSummary: z.ZodObject<{
|
|
376
|
+
responseSummary: z.ZodObject<{
|
|
377
|
+
phoneNumber: z.ZodString;
|
|
378
|
+
}, z.core.$strip>;
|
|
205
379
|
}, z.core.$strip>], "operation">;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
*
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
*/
|
|
218
|
-
export type
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
380
|
+
/** A persisted audit log entry as returned from the database. */
|
|
381
|
+
export type AuditLogEntry = z.infer<typeof AuditLogEntrySchema>;
|
|
382
|
+
/** Distributes Omit over a union so each variant is narrowed correctly. */
|
|
383
|
+
type DistributiveOmit<T, K extends string> = T extends unknown ? Omit<T, K> : never;
|
|
384
|
+
/** Parameters for writing an audit log entry. All fields must be supplied
|
|
385
|
+
* explicitly by the caller — do not pass JWT or context objects. */
|
|
386
|
+
export type AuditLogParams = DistributiveOmit<AuditLogEntry, 'id' | 'createdAt'>;
|
|
387
|
+
/** Union of all operation shapes (without auth or meta fields). */
|
|
388
|
+
export type AuditLogOperation = DistributiveOmit<AuditLogParams, 'clientId' | 'clientType'>;
|
|
389
|
+
/** Event action entries that carry a full event response summary. */
|
|
390
|
+
export type EventActionAuditLog = z.infer<typeof EventActionEntrySchema>;
|
|
391
|
+
/** Custom action entry — operation carries a `customAction` identifier. */
|
|
392
|
+
export type EventCustomActionAuditLog = Extract<AuditLogEntry, {
|
|
393
|
+
operation: 'event.actions.custom.request';
|
|
394
|
+
}>;
|
|
395
|
+
export type EventCreateAuditLog = Extract<AuditLogEntry, {
|
|
396
|
+
operation: 'event.create';
|
|
397
|
+
}>;
|
|
398
|
+
export type EventGetAuditLog = Extract<AuditLogEntry, {
|
|
399
|
+
operation: 'event.get';
|
|
400
|
+
}>;
|
|
401
|
+
export type EventSearchAuditLog = Extract<AuditLogEntry, {
|
|
402
|
+
operation: 'event.search';
|
|
403
|
+
}>;
|
|
222
404
|
export {};
|
|
223
405
|
//# sourceMappingURL=AuditLog.d.ts.map
|