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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/build.sh +8 -0
  2. package/dist/application-config/index.js +2045 -41
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +4841 -0
  6. package/dist/commons/api/router.d.ts +475 -244
  7. package/dist/commons/application-config/index.d.ts +13 -16
  8. package/dist/commons/conditionals/conditionals.d.ts +8 -8
  9. package/dist/commons/events/ActionDocument.d.ts +196 -196
  10. package/dist/commons/events/ActionInput.d.ts +113 -113
  11. package/dist/commons/events/ActionType.d.ts +3 -3
  12. package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
  13. package/dist/commons/events/AuditLog.d.ts +347 -163
  14. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +461 -190
  16. package/dist/commons/events/Draft.d.ts +9 -9
  17. package/dist/commons/events/DynamicFieldValue.d.ts +37 -19
  18. package/dist/commons/events/EventConfig.d.ts +3 -1
  19. package/dist/commons/events/EventDocument.d.ts +80 -80
  20. package/dist/commons/events/EventIndex.d.ts +35 -27
  21. package/dist/commons/events/EventInput.d.ts +1 -1
  22. package/dist/commons/events/EventMetadata.d.ts +19 -19
  23. package/dist/commons/events/FieldConfig.d.ts +287 -71
  24. package/dist/commons/events/FieldType.d.ts +2 -1
  25. package/dist/commons/events/FieldTypeMapping.d.ts +98 -72
  26. package/dist/commons/events/FieldValue.d.ts +54 -26
  27. package/dist/commons/events/PlainDate.d.ts +1 -1
  28. package/dist/commons/events/WorkqueueColumnConfig.d.ts +7 -7
  29. package/dist/commons/events/WorkqueueConfig.d.ts +443 -199
  30. package/dist/commons/events/defineConfig.d.ts +0 -4
  31. package/dist/commons/events/locations.d.ts +4 -4
  32. package/dist/commons/events/scopes.d.ts +4 -3
  33. package/dist/commons/events/state/index.d.ts +2 -2
  34. package/dist/commons/events/state/utils.d.ts +1 -1
  35. package/dist/commons/events/test.utils.d.ts +2 -2
  36. package/dist/commons/events/utils.d.ts +3 -175
  37. package/dist/commons/notification/UserNotifications.d.ts +21 -1
  38. package/dist/conditionals/index.js +74 -359
  39. package/dist/events/index.js +1207 -1260
  40. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  41. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  42. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +404 -0
  43. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  44. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  45. package/dist/migrations/v2.0/add-resend-invite-notification.js +345 -0
  46. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +22 -0
  47. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  48. package/dist/migrations/v2.0/checkout-upstream-files.js +147 -0
  49. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  50. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  51. package/dist/migrations/v2.0/convert-config-files-to-ts.js +828 -0
  52. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  53. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  54. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +158 -0
  55. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  56. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  57. package/dist/migrations/v2.0/create-events-index.js +325 -0
  58. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +3 -0
  59. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  60. package/dist/migrations/v2.0/delete-infrastructure-directory.js +77 -0
  61. package/dist/migrations/v2.0/index.d.ts +11 -0
  62. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  63. package/dist/migrations/v2.0/index.js +4751 -0
  64. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  65. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  66. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +343 -0
  67. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +3 -0
  68. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  69. package/dist/migrations/v2.0/merge-infrastructure-directory.js +221 -0
  70. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  71. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  73. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  74. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  75. package/dist/migrations/v2.0/migrate-scopes.js +281 -0
  76. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  77. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  78. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  79. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  80. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  81. package/dist/migrations/v2.0/migrate-workqueue-configs.js +236 -0
  82. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  83. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  84. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  85. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  86. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  87. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  88. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  89. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  90. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  91. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  92. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  93. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  94. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  95. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  96. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  97. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  98. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  99. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  100. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  101. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  102. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  103. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  104. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  105. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  106. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  107. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  108. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  109. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  110. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  111. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  112. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  113. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  114. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  115. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  116. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  117. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  118. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  119. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  120. package/dist/migrations/v2.0/update-package-json.js +105 -0
  121. package/dist/notification/index.js +1013 -1135
  122. package/dist/scopes/index.d.ts +389 -152
  123. package/dist/scopes/index.js +128 -322
  124. package/opencrvs-toolkit-1.9.12-rc.f687751.tgz +0 -0
  125. package/package.json +11 -7
  126. package/tsconfig.json +3 -0
  127. package/tsconfig.tsbuildinfo +1 -1
  128. package/opencrvs-toolkit-1.9.12-rc.f5ca5e6.tgz +0 -0
@@ -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
- import { TokenUserType } from '../authentication';
3
- /**
4
- * Shared response summary shape for operations that return an event document.
5
- */
6
- type EventResponseSummary = {
7
- eventId: string;
8
- eventType: string;
9
- trackingId: string;
10
- };
11
- export type EventCreateAuditLog = {
12
- operation: 'event.create';
13
- requestData: {
14
- transactionId: string;
15
- type: string;
16
- createdAtLocation: string | null;
17
- };
18
- responseSummary: EventResponseSummary;
19
- };
20
- export type EventGetAuditLog = {
21
- operation: 'event.get';
22
- requestData: {
23
- eventId: string;
24
- };
25
- responseSummary: EventResponseSummary;
26
- };
27
- export type EventSearchAuditLog = {
28
- operation: 'event.search';
29
- requestData: {
30
- query: Record<string, unknown> | null;
31
- limit: number | null;
32
- offset: number | null;
33
- };
34
- responseSummary: {
35
- total: number;
36
- eventIds: string[];
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,366 @@ 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.ZodLiteral<"user.deactivate">;
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.ZodLiteral<"user.reactivate">;
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.resend_invite": "user.resend_invite";
64
+ "user.username_reminder": "user.username_reminder";
65
+ "user.username_reminder_by_admin": "user.username_reminder_by_admin";
66
+ }>;
135
67
  requestData: z.ZodObject<{
136
68
  subjectId: z.ZodString;
137
- reason: z.ZodString;
138
- comment: z.ZodOptional<z.ZodString>;
139
69
  }, z.core.$strip>;
140
- responseSummary: z.ZodObject<{}, z.core.$strip>;
141
70
  }, z.core.$strip>, z.ZodObject<{
142
- operation: z.ZodLiteral<"user.edit_user">;
71
+ operation: z.ZodLiteral<"user.email_address_changed">;
143
72
  requestData: z.ZodObject<{
144
73
  subjectId: z.ZodString;
145
74
  }, z.core.$strip>;
146
- responseSummary: z.ZodObject<{}, z.core.$strip>;
75
+ responseSummary: z.ZodObject<{
76
+ email: z.ZodString;
77
+ }, z.core.$strip>;
147
78
  }, z.core.$strip>, z.ZodObject<{
148
- operation: z.ZodLiteral<"user.email_address_changed">;
79
+ operation: z.ZodLiteral<"user.phone_number_changed">;
149
80
  requestData: z.ZodObject<{
150
81
  subjectId: z.ZodString;
151
82
  }, z.core.$strip>;
152
83
  responseSummary: z.ZodObject<{
153
- email: z.ZodString;
84
+ phoneNumber: z.ZodString;
85
+ }, z.core.$strip>;
86
+ }, z.core.$strip>], "operation">;
87
+ export type UserAuditLog = z.infer<typeof UserAuditRecordInput>;
88
+ export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
89
+ id: z.ZodString;
90
+ clientId: z.ZodString;
91
+ clientType: z.ZodEnum<{
92
+ user: "user";
93
+ system: "system";
94
+ }>;
95
+ createdAt: z.ZodString;
96
+ operation: z.ZodLiteral<"event.create">;
97
+ requestData: z.ZodObject<{
98
+ transactionId: z.ZodString;
99
+ type: z.ZodString;
100
+ createdAtLocation: z.ZodNullable<z.ZodString>;
101
+ }, z.core.$strip>;
102
+ responseSummary: z.ZodObject<{
103
+ eventId: z.ZodString;
104
+ trackingId: z.ZodString;
154
105
  }, z.core.$strip>;
155
106
  }, z.core.$strip>, z.ZodObject<{
156
- operation: z.ZodLiteral<"user.logged_in">;
107
+ id: z.ZodString;
108
+ clientId: z.ZodString;
109
+ clientType: z.ZodEnum<{
110
+ user: "user";
111
+ system: "system";
112
+ }>;
113
+ createdAt: z.ZodString;
114
+ operation: z.ZodLiteral<"event.get">;
157
115
  requestData: z.ZodObject<{
158
- subjectId: z.ZodString;
116
+ eventId: z.ZodString;
117
+ }, z.core.$strip>;
118
+ responseSummary: z.ZodObject<{
119
+ eventType: z.ZodString;
120
+ trackingId: z.ZodString;
159
121
  }, z.core.$strip>;
160
- responseSummary: z.ZodObject<{}, z.core.$strip>;
161
122
  }, z.core.$strip>, z.ZodObject<{
162
- operation: z.ZodLiteral<"user.logged_out">;
123
+ id: z.ZodString;
124
+ clientId: z.ZodString;
125
+ createdAt: z.ZodString;
126
+ operation: z.ZodLiteral<"event.search">;
127
+ clientType: z.ZodLiteral<"system">;
163
128
  requestData: z.ZodObject<{
164
- subjectId: z.ZodString;
129
+ query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
130
+ limit: z.ZodNullable<z.ZodNumber>;
131
+ offset: z.ZodNullable<z.ZodNumber>;
132
+ }, z.core.$strip>;
133
+ responseSummary: z.ZodObject<{
134
+ total: z.ZodNumber;
135
+ eventIds: z.ZodArray<z.ZodString>;
165
136
  }, z.core.$strip>;
166
- responseSummary: z.ZodObject<{}, z.core.$strip>;
167
137
  }, z.core.$strip>, z.ZodObject<{
168
- operation: z.ZodLiteral<"user.password_changed">;
138
+ id: z.ZodString;
139
+ clientId: z.ZodString;
140
+ clientType: z.ZodEnum<{
141
+ user: "user";
142
+ system: "system";
143
+ }>;
144
+ createdAt: z.ZodString;
145
+ operation: z.ZodEnum<{
146
+ "event.actions.notify.request": "event.actions.notify.request";
147
+ "event.actions.declare.request": "event.actions.declare.request";
148
+ "event.actions.register.request": "event.actions.register.request";
149
+ "event.actions.reject.request": "event.actions.reject.request";
150
+ "event.actions.validate.request": "event.actions.validate.request";
151
+ "event.actions.edit.request": "event.actions.edit.request";
152
+ "event.actions.assign.request": "event.actions.assign.request";
153
+ "event.actions.unassign.request": "event.actions.unassign.request";
154
+ "event.actions.read.request": "event.actions.read.request";
155
+ "event.actions.archive.request": "event.actions.archive.request";
156
+ "event.actions.reinstate.request": "event.actions.reinstate.request";
157
+ "event.actions.print_certificate.request": "event.actions.print_certificate.request";
158
+ "event.actions.correction.request.request": "event.actions.correction.request.request";
159
+ "event.actions.correction.approve.request": "event.actions.correction.approve.request";
160
+ "event.actions.correction.reject.request": "event.actions.correction.reject.request";
161
+ "event.actions.mark_as_duplicate.request": "event.actions.mark_as_duplicate.request";
162
+ "event.actions.mark_as_not_duplicate.request": "event.actions.mark_as_not_duplicate.request";
163
+ }>;
169
164
  requestData: z.ZodObject<{
170
- subjectId: z.ZodString;
165
+ eventId: z.ZodString;
166
+ actionType: z.ZodString;
167
+ eventType: z.ZodString;
168
+ trackingId: z.ZodString;
169
+ transactionId: z.ZodString;
171
170
  }, z.core.$strip>;
172
- responseSummary: z.ZodObject<{}, z.core.$strip>;
173
171
  }, z.core.$strip>, z.ZodObject<{
174
- operation: z.ZodLiteral<"user.password_reset">;
172
+ id: z.ZodString;
173
+ clientId: z.ZodString;
174
+ clientType: z.ZodEnum<{
175
+ user: "user";
176
+ system: "system";
177
+ }>;
178
+ createdAt: z.ZodString;
179
+ operation: z.ZodLiteral<"event.actions.custom.request">;
175
180
  requestData: z.ZodObject<{
176
- subjectId: z.ZodString;
181
+ eventId: z.ZodString;
182
+ actionType: z.ZodLiteral<"CUSTOM">;
183
+ customAction: z.ZodString;
184
+ eventType: z.ZodString;
185
+ trackingId: z.ZodString;
186
+ transactionId: z.ZodString;
187
+ }, z.core.$strip>;
188
+ }, z.core.$strip>, z.ZodObject<{
189
+ id: z.ZodString;
190
+ clientId: z.ZodString;
191
+ clientType: z.ZodEnum<{
192
+ user: "user";
193
+ system: "system";
194
+ }>;
195
+ createdAt: z.ZodString;
196
+ operation: z.ZodLiteral<"integrations.create">;
197
+ requestData: z.ZodObject<{
198
+ name: z.ZodString;
199
+ scopes: z.ZodArray<z.ZodString>;
200
+ }, z.core.$strip>;
201
+ responseSummary: z.ZodObject<{
202
+ clientId: z.ZodString;
203
+ }, z.core.$strip>;
204
+ }, z.core.$strip>, z.ZodObject<{
205
+ id: z.ZodString;
206
+ clientId: z.ZodString;
207
+ clientType: z.ZodEnum<{
208
+ user: "user";
209
+ system: "system";
210
+ }>;
211
+ createdAt: z.ZodString;
212
+ operation: z.ZodLiteral<"integrations.refreshToken">;
213
+ requestData: z.ZodObject<{
214
+ clientId: z.ZodString;
215
+ }, z.core.$strip>;
216
+ responseSummary: z.ZodObject<{
217
+ clientId: z.ZodString;
218
+ }, z.core.$strip>;
219
+ }, z.core.$strip>, z.ZodObject<{
220
+ id: z.ZodString;
221
+ clientId: z.ZodString;
222
+ clientType: z.ZodEnum<{
223
+ user: "user";
224
+ system: "system";
225
+ }>;
226
+ createdAt: z.ZodString;
227
+ operation: z.ZodLiteral<"integrations.deactivate">;
228
+ requestData: z.ZodObject<{
229
+ id: z.ZodString;
230
+ }, z.core.$strip>;
231
+ responseSummary: z.ZodObject<{
232
+ id: z.ZodString;
233
+ status: z.ZodString;
177
234
  }, z.core.$strip>;
178
- responseSummary: z.ZodObject<{}, z.core.$strip>;
179
235
  }, z.core.$strip>, z.ZodObject<{
180
- operation: z.ZodLiteral<"user.password_reset_by_admin">;
236
+ id: z.ZodString;
237
+ clientId: z.ZodString;
238
+ clientType: z.ZodEnum<{
239
+ user: "user";
240
+ system: "system";
241
+ }>;
242
+ createdAt: z.ZodString;
243
+ operation: z.ZodLiteral<"integrations.activate">;
244
+ requestData: z.ZodObject<{
245
+ id: z.ZodString;
246
+ }, z.core.$strip>;
247
+ responseSummary: z.ZodObject<{
248
+ id: z.ZodString;
249
+ status: z.ZodString;
250
+ }, z.core.$strip>;
251
+ }, z.core.$strip>, z.ZodObject<{
252
+ id: z.ZodString;
253
+ clientId: z.ZodString;
254
+ clientType: z.ZodEnum<{
255
+ user: "user";
256
+ system: "system";
257
+ }>;
258
+ createdAt: z.ZodString;
259
+ operation: z.ZodLiteral<"integrations.delete">;
260
+ requestData: z.ZodObject<{
261
+ id: z.ZodString;
262
+ }, z.core.$strip>;
263
+ responseSummary: z.ZodObject<{
264
+ id: z.ZodString;
265
+ name: z.ZodString;
266
+ }, z.core.$strip>;
267
+ }, z.core.$strip>, z.ZodObject<{
268
+ id: z.ZodString;
269
+ clientId: z.ZodString;
270
+ clientType: z.ZodEnum<{
271
+ user: "user";
272
+ system: "system";
273
+ }>;
274
+ createdAt: z.ZodString;
275
+ operation: z.ZodLiteral<"integrations.refreshSecret">;
276
+ requestData: z.ZodObject<{
277
+ id: z.ZodString;
278
+ }, z.core.$strip>;
279
+ responseSummary: z.ZodObject<{
280
+ clientId: z.ZodString;
281
+ }, z.core.$strip>;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ id: z.ZodString;
284
+ clientId: z.ZodString;
285
+ clientType: z.ZodEnum<{
286
+ user: "user";
287
+ system: "system";
288
+ }>;
289
+ createdAt: z.ZodString;
290
+ operation: z.ZodLiteral<"attachments.upload">;
291
+ requestData: z.ZodObject<{
292
+ transactionId: z.ZodString;
293
+ path: z.ZodNullable<z.ZodString>;
294
+ }, z.core.$strip>;
295
+ responseSummary: z.ZodObject<{
296
+ fileUrl: z.ZodString;
297
+ }, z.core.$strip>;
298
+ }, z.core.$strip>, z.ZodObject<{
299
+ id: z.ZodString;
300
+ clientId: z.ZodString;
301
+ clientType: z.ZodEnum<{
302
+ user: "user";
303
+ system: "system";
304
+ }>;
305
+ createdAt: z.ZodString;
306
+ operation: z.ZodLiteral<"user.create_user">;
181
307
  requestData: z.ZodObject<{
182
308
  subjectId: z.ZodString;
309
+ role: z.ZodString;
310
+ primaryOfficeId: z.ZodString;
183
311
  }, z.core.$strip>;
184
- responseSummary: z.ZodObject<{}, z.core.$strip>;
185
312
  }, z.core.$strip>, z.ZodObject<{
186
- operation: z.ZodLiteral<"user.phone_number_changed">;
313
+ id: z.ZodString;
314
+ clientId: z.ZodString;
315
+ clientType: z.ZodEnum<{
316
+ user: "user";
317
+ system: "system";
318
+ }>;
319
+ createdAt: z.ZodString;
320
+ operation: z.ZodEnum<{
321
+ "user.deactivate": "user.deactivate";
322
+ "user.reactivate": "user.reactivate";
323
+ }>;
187
324
  requestData: z.ZodObject<{
188
325
  subjectId: z.ZodString;
326
+ reason: z.ZodString;
327
+ comment: z.ZodOptional<z.ZodString>;
189
328
  }, z.core.$strip>;
190
- responseSummary: z.ZodObject<{
191
- phoneNumber: z.ZodString;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ id: z.ZodString;
331
+ clientId: z.ZodString;
332
+ clientType: z.ZodEnum<{
333
+ user: "user";
334
+ system: "system";
335
+ }>;
336
+ createdAt: z.ZodString;
337
+ operation: z.ZodEnum<{
338
+ "user.edit_user": "user.edit_user";
339
+ "user.logged_in": "user.logged_in";
340
+ "user.logged_out": "user.logged_out";
341
+ "user.password_changed": "user.password_changed";
342
+ "user.password_reset": "user.password_reset";
343
+ "user.password_reset_by_admin": "user.password_reset_by_admin";
344
+ "user.resend_invite": "user.resend_invite";
345
+ "user.username_reminder": "user.username_reminder";
346
+ "user.username_reminder_by_admin": "user.username_reminder_by_admin";
347
+ }>;
348
+ requestData: z.ZodObject<{
349
+ subjectId: z.ZodString;
192
350
  }, z.core.$strip>;
193
351
  }, z.core.$strip>, z.ZodObject<{
194
- operation: z.ZodLiteral<"user.username_reminder">;
352
+ id: z.ZodString;
353
+ clientId: z.ZodString;
354
+ clientType: z.ZodEnum<{
355
+ user: "user";
356
+ system: "system";
357
+ }>;
358
+ createdAt: z.ZodString;
359
+ operation: z.ZodLiteral<"user.email_address_changed">;
195
360
  requestData: z.ZodObject<{
196
361
  subjectId: z.ZodString;
197
362
  }, z.core.$strip>;
198
- responseSummary: z.ZodObject<{}, z.core.$strip>;
363
+ responseSummary: z.ZodObject<{
364
+ email: z.ZodString;
365
+ }, z.core.$strip>;
199
366
  }, z.core.$strip>, z.ZodObject<{
200
- operation: z.ZodLiteral<"user.username_reminder_by_admin">;
367
+ id: z.ZodString;
368
+ clientId: z.ZodString;
369
+ clientType: z.ZodEnum<{
370
+ user: "user";
371
+ system: "system";
372
+ }>;
373
+ createdAt: z.ZodString;
374
+ operation: z.ZodLiteral<"user.phone_number_changed">;
201
375
  requestData: z.ZodObject<{
202
376
  subjectId: z.ZodString;
203
377
  }, z.core.$strip>;
204
- responseSummary: z.ZodObject<{}, z.core.$strip>;
378
+ responseSummary: z.ZodObject<{
379
+ phoneNumber: z.ZodString;
380
+ }, z.core.$strip>;
205
381
  }, z.core.$strip>], "operation">;
206
- export type UserAuditLog = z.infer<typeof UserAuditRecordInput>;
207
- /**
208
- * Union of all audit log entry variants.
209
- * Each variant narrows the `operation`, `requestData`, and `responseSummary` fields together.
210
- * Event action operations are grouped into a single `EventActionAuditLog` type since they
211
- * share identical requestData and responseSummary shapes.
212
- */
213
- export type AuditLogOperation = EventCreateAuditLog | EventGetAuditLog | EventSearchAuditLog | EventActionAuditLog | IntegrationCreateAuditLog | IntegrationDeactivateAuditLog | IntegrationActivateAuditLog | IntegrationDeleteAuditLog | IntegrationRefreshSecretAuditLog | AttachmentUploadAuditLog | UserAuditLog | IntegrationCreateAuditLog | IntegrationRefreshTokenAuditLog | IntegrationDeactivateAuditLog | IntegrationActivateAuditLog | IntegrationDeleteAuditLog;
214
- /**
215
- * Parameters for writing an audit log entry.
216
- * All fields must be supplied explicitly by the caller — do not pass JWT or context objects.
217
- */
218
- export type AuditLogParams = AuditLogOperation & {
219
- clientId: string;
220
- clientType: TokenUserType;
221
- };
382
+ /** A persisted audit log entry as returned from the database. */
383
+ export type AuditLogEntry = z.infer<typeof AuditLogEntrySchema>;
384
+ /** Distributes Omit over a union so each variant is narrowed correctly. */
385
+ type DistributiveOmit<T, K extends string> = T extends unknown ? Omit<T, K> : never;
386
+ /** Parameters for writing an audit log entry. All fields must be supplied
387
+ * explicitly by the caller — do not pass JWT or context objects. */
388
+ export type AuditLogParams = DistributiveOmit<AuditLogEntry, 'id' | 'createdAt'>;
389
+ /** Union of all operation shapes (without auth or meta fields). */
390
+ export type AuditLogOperation = DistributiveOmit<AuditLogParams, 'clientId' | 'clientType'>;
391
+ /** Event action entries that carry a full event response summary. */
392
+ export type EventActionAuditLog = z.infer<typeof EventActionEntrySchema>;
393
+ /** Custom action entry — operation carries a `customAction` identifier. */
394
+ export type EventCustomActionAuditLog = Extract<AuditLogEntry, {
395
+ operation: 'event.actions.custom.request';
396
+ }>;
397
+ export type EventCreateAuditLog = Extract<AuditLogEntry, {
398
+ operation: 'event.create';
399
+ }>;
400
+ export type EventGetAuditLog = Extract<AuditLogEntry, {
401
+ operation: 'event.get';
402
+ }>;
403
+ export type EventSearchAuditLog = Extract<AuditLogEntry, {
404
+ operation: 'event.search';
405
+ }>;
222
406
  export {};
223
407
  //# sourceMappingURL=AuditLog.d.ts.map
@@ -11,7 +11,7 @@ export declare const AddressType: {
11
11
  readonly INTERNATIONAL: "INTERNATIONAL";
12
12
  };
13
13
  export declare const FileFieldValue: z.ZodObject<{
14
- path: z.core.$ZodBranded<z.ZodString, "DocumentPath">;
14
+ path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
15
15
  originalFilename: z.ZodString;
16
16
  type: z.ZodString;
17
17
  }, z.core.$strip>;
@@ -59,14 +59,14 @@ export declare const AddressFieldUpdateValue: z.ZodOptional<z.ZodNullable<z.ZodD
59
59
  }, z.core.$strip>], "addressType">>>;
60
60
  export type AddressFieldUpdateValue = z.infer<typeof AddressFieldUpdateValue>;
61
61
  export declare const FileFieldValueWithOption: z.ZodObject<{
62
- path: z.core.$ZodBranded<z.ZodString, "DocumentPath">;
62
+ path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
63
63
  originalFilename: z.ZodString;
64
64
  type: z.ZodString;
65
65
  option: z.ZodString;
66
66
  }, z.core.$strip>;
67
67
  export type FileFieldValueWithOption = z.infer<typeof FileFieldValueWithOption>;
68
68
  export declare const FileFieldWithOptionValue: z.ZodArray<z.ZodObject<{
69
- path: z.core.$ZodBranded<z.ZodString, "DocumentPath">;
69
+ path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
70
70
  originalFilename: z.ZodString;
71
71
  type: z.ZodString;
72
72
  option: z.ZodString;
@@ -115,6 +115,6 @@ export declare const NumberWithUnitFieldUpdateValue: z.ZodObject<{
115
115
  }, z.core.$strip>;
116
116
  export type NumberWithUnitFieldValue = z.infer<typeof NumberWithUnitFieldValue>;
117
117
  export type NumberWithUnitFieldUpdateValue = z.infer<typeof NumberWithUnitFieldUpdateValue>;
118
- export declare const CustomFieldValue: z.core.$ZodBranded<z.ZodUnknown, "CustomFieldValue">;
118
+ export declare const CustomFieldValue: z.core.$ZodBranded<z.ZodUnknown, "CustomFieldValue", "out">;
119
119
  export type CustomFieldValue = z.infer<typeof CustomFieldValue>;
120
120
  //# sourceMappingURL=CompositeFieldValue.d.ts.map