@opencrvs/toolkit 2.1.0-rc.b061691 → 2.1.0-rc.b263ac1
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/README.md +1 -0
- package/dist/application-config/index.js +34 -11
- package/dist/cli.js +174 -58
- package/dist/commons/api/router.d.ts +3528 -3251
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +259 -2102
- package/dist/commons/conditionals/validate.d.ts +9 -3
- package/dist/commons/events/ActionConfig.d.ts +105 -126
- package/dist/commons/events/ActionDocument.d.ts +110 -110
- package/dist/commons/events/ActionStatus.d.ts +3 -3
- package/dist/commons/events/ActionType.d.ts +62 -62
- package/dist/commons/events/AdvancedSearchConfig.d.ts +525 -513
- package/dist/commons/events/AuditLog.d.ts +189 -42
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/Conditional.d.ts +3 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -608
- package/dist/commons/events/Draft.d.ts +37 -37
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +8 -5
- package/dist/commons/events/EventDocument.d.ts +46 -46
- package/dist/commons/events/EventIndex.d.ts +48 -52
- package/dist/commons/events/EventMetadata.d.ts +40 -41
- package/dist/commons/events/FieldConfig.d.ts +413 -396
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +90 -90
- package/dist/commons/events/FieldValue.d.ts +14 -14
- package/dist/commons/events/Flag.d.ts +30 -36
- package/dist/commons/events/PlainDate.d.ts +8 -0
- package/dist/commons/events/SummaryConfig.d.ts +249 -0
- package/dist/commons/events/TemplateConfig.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
- package/dist/commons/events/WorkqueueConfig.d.ts +817 -829
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +14 -2
- package/dist/commons/events/field.d.ts +78 -895
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locationPayloads.d.ts +95 -0
- package/dist/commons/events/locations.d.ts +192 -12
- package/dist/commons/events/mocks.test.utils.d.ts +48 -4
- package/dist/commons/events/scopes.d.ts +4 -4
- package/dist/commons/events/state/index.d.ts +17 -17
- package/dist/commons/events/state/utils.d.ts +7 -7
- package/dist/commons/events/test.utils.d.ts +40 -40
- package/dist/commons/events/utils.d.ts +114 -114
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/conditionals/index.js +6 -4
- package/dist/environment/derived-variables.d.ts +119 -119
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/index.d.ts +1 -0
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +10 -0
- package/dist/environment/logger.d.ts +12 -3
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/paths.d.ts +7 -0
- package/dist/environment/paths.d.ts.map +1 -0
- package/dist/environment/paths.js +72 -0
- package/dist/environment/questions.d.ts +75 -74
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +10 -15
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +2 -1
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +17 -5
- package/dist/environment/upgrade.d.ts +2 -0
- package/dist/environment/upgrade.d.ts.map +1 -0
- package/dist/environment/upgrade.js +82 -0
- package/dist/environment/users.js +11 -13
- package/dist/environment/utils.d.ts +1 -1
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +568 -265
- package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
- package/dist/notification/index.js +578 -316
- package/dist/scopes/index.d.ts +350 -332
- package/dist/scopes/index.js +6 -4
- package/dist/templates/charts-values/opencrvs-services/values.yaml +4 -3
- package/dist/templates/charts-values/opentelemetry/values.yaml +73 -0
- package/opencrvs-toolkit-2.1.0-rc.b263ac1.tgz +0 -0
- package/package.json +6 -6
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.b061691.tgz +0 -0
|
@@ -9,7 +9,7 @@ import { EventIndex } from './EventIndex';
|
|
|
9
9
|
import { EventInput } from './EventInput';
|
|
10
10
|
import { TranslationConfig } from './TranslationConfig';
|
|
11
11
|
import { FieldConfig } from './FieldConfig';
|
|
12
|
-
import {
|
|
12
|
+
import { SetLocationPayload, SetAdministrativeAreaPayload } from './locations';
|
|
13
13
|
import { WorkqueueConfig } from './WorkqueueConfig';
|
|
14
14
|
import * as z from 'zod/v4';
|
|
15
15
|
import { DocumentPath } from '../documents';
|
|
@@ -23,15 +23,15 @@ export declare const TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
|
|
|
23
23
|
* These are just for testing purposes to generate realistic mock data.
|
|
24
24
|
*/
|
|
25
25
|
export declare const TestUserRole: z.ZodEnum<{
|
|
26
|
+
COMMUNITY_LEADER: "COMMUNITY_LEADER";
|
|
26
27
|
FIELD_AGENT: "FIELD_AGENT";
|
|
27
28
|
LOCAL_REGISTRAR: "LOCAL_REGISTRAR";
|
|
28
29
|
LOCAL_SYSTEM_ADMIN: "LOCAL_SYSTEM_ADMIN";
|
|
29
30
|
NATIONAL_REGISTRAR: "NATIONAL_REGISTRAR";
|
|
30
|
-
REGISTRATION_AGENT: "REGISTRATION_AGENT";
|
|
31
31
|
NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
|
|
32
|
-
SOCIAL_WORKER: "SOCIAL_WORKER";
|
|
33
|
-
COMMUNITY_LEADER: "COMMUNITY_LEADER";
|
|
34
32
|
PROVINCIAL_REGISTRAR: "PROVINCIAL_REGISTRAR";
|
|
33
|
+
REGISTRATION_AGENT: "REGISTRATION_AGENT";
|
|
34
|
+
SOCIAL_WORKER: "SOCIAL_WORKER";
|
|
35
35
|
}>;
|
|
36
36
|
export type TestUserRole = z.infer<typeof TestUserRole>;
|
|
37
37
|
export declare function pickRandom<T>(rng: () => number, items: T[]): T;
|
|
@@ -48,16 +48,16 @@ export declare function fieldConfigsToActionPayload(fields: FieldConfig[], rng:
|
|
|
48
48
|
* Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
|
|
49
49
|
*/
|
|
50
50
|
administrativeHierarchy?: {
|
|
51
|
-
administrativeAreas:
|
|
52
|
-
locations:
|
|
51
|
+
administrativeAreas: SetAdministrativeAreaPayload[];
|
|
52
|
+
locations: SetLocationPayload[];
|
|
53
53
|
}): ActionUpdate;
|
|
54
54
|
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number, overrides?: ActionUpdate,
|
|
55
55
|
/**
|
|
56
56
|
* Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
|
|
57
57
|
*/
|
|
58
58
|
administrativeHierarchy?: {
|
|
59
|
-
administrativeAreas:
|
|
60
|
-
locations:
|
|
59
|
+
administrativeAreas: SetAdministrativeAreaPayload[];
|
|
60
|
+
locations: SetLocationPayload[];
|
|
61
61
|
}): ActionUpdate;
|
|
62
62
|
export declare function generateActionDuplicateDeclarationInput(...args: Parameters<typeof generateActionDeclarationInput>): ReturnType<typeof generateActionDeclarationInput>;
|
|
63
63
|
export declare function eventPayloadGenerator(rng: () => number, configuration?: EventConfig): {
|
|
@@ -72,108 +72,108 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
72
72
|
};
|
|
73
73
|
draft: ({ eventId, actionType, annotation, omitFields }: {
|
|
74
74
|
eventId: UUID;
|
|
75
|
-
actionType: Draft[
|
|
75
|
+
actionType: Draft['action']['type'];
|
|
76
76
|
annotation?: Record<string, any>;
|
|
77
77
|
omitFields?: string[];
|
|
78
78
|
}, input?: Partial<Draft>) => Draft;
|
|
79
79
|
actions: {
|
|
80
|
-
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput,
|
|
80
|
+
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
81
|
+
keepAssignment?: boolean | undefined;
|
|
82
|
+
type: "DECLARE";
|
|
81
83
|
transactionId: string;
|
|
82
84
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
83
85
|
annotation: {};
|
|
84
|
-
keepAssignment?: boolean | undefined;
|
|
85
|
-
type: "DECLARE";
|
|
86
86
|
eventId: string;
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
89
|
* Notify allows sending incomplete data. Think it as 'partial declare' for now.
|
|
90
90
|
*/
|
|
91
|
-
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput,
|
|
91
|
+
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
92
92
|
type: "NOTIFY";
|
|
93
93
|
transactionId: string;
|
|
94
94
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
95
95
|
eventId: string;
|
|
96
96
|
keepAssignment: boolean | undefined;
|
|
97
97
|
};
|
|
98
|
-
edit: (eventId: string, input?: Partial<Pick<EditActionInput,
|
|
98
|
+
edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
99
|
+
keepAssignment?: boolean | undefined;
|
|
100
|
+
type: "EDIT";
|
|
99
101
|
transactionId: string;
|
|
100
102
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
101
103
|
annotation: {};
|
|
102
|
-
keepAssignment?: boolean | undefined;
|
|
103
|
-
type: "EDIT";
|
|
104
104
|
eventId: string;
|
|
105
105
|
};
|
|
106
|
-
assign: (eventId: string, input?: Partial<Pick<AssignActionInput,
|
|
106
|
+
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo'>>) => {
|
|
107
107
|
type: "ASSIGN";
|
|
108
108
|
transactionId: string;
|
|
109
109
|
declaration: {};
|
|
110
110
|
assignedTo: string;
|
|
111
111
|
eventId: string;
|
|
112
112
|
};
|
|
113
|
-
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput,
|
|
113
|
+
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId'>>) => {
|
|
114
114
|
type: "UNASSIGN";
|
|
115
115
|
transactionId: string;
|
|
116
116
|
declaration: {};
|
|
117
117
|
assignedTo: null;
|
|
118
118
|
eventId: string;
|
|
119
119
|
};
|
|
120
|
-
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput,
|
|
121
|
-
transactionId: string;
|
|
122
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
120
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
123
121
|
keepAssignment?: boolean | undefined;
|
|
124
122
|
type: "ARCHIVE";
|
|
123
|
+
transactionId: string;
|
|
124
|
+
declaration: {};
|
|
125
125
|
annotation: {};
|
|
126
126
|
eventId: string;
|
|
127
127
|
content: {
|
|
128
128
|
reason: string;
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
|
-
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput,
|
|
132
|
-
transactionId: string;
|
|
133
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
131
|
+
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
134
132
|
keepAssignment?: boolean | undefined;
|
|
135
133
|
type: "UNARCHIVE";
|
|
134
|
+
transactionId: string;
|
|
135
|
+
declaration: {};
|
|
136
136
|
annotation: {};
|
|
137
137
|
eventId: string;
|
|
138
138
|
};
|
|
139
|
-
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput,
|
|
140
|
-
transactionId: string;
|
|
141
|
-
annotation: {};
|
|
139
|
+
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
142
140
|
keepAssignment?: boolean | undefined;
|
|
143
141
|
type: "REJECT";
|
|
142
|
+
transactionId: string;
|
|
144
143
|
declaration: {};
|
|
144
|
+
annotation: {};
|
|
145
145
|
eventId: string;
|
|
146
146
|
content: {
|
|
147
147
|
reason: string;
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
-
register: (eventId: string, input?: Partial<Pick<RegisterActionInput,
|
|
150
|
+
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber'>>) => {
|
|
151
|
+
keepAssignment?: boolean | undefined;
|
|
152
|
+
registrationNumber?: string | undefined;
|
|
153
|
+
type: "REGISTER";
|
|
151
154
|
transactionId: string;
|
|
152
155
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
153
156
|
annotation: {};
|
|
154
|
-
registrationNumber?: string | undefined;
|
|
155
|
-
keepAssignment?: boolean | undefined;
|
|
156
|
-
type: "REGISTER";
|
|
157
157
|
eventId: string;
|
|
158
158
|
};
|
|
159
|
-
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput,
|
|
160
|
-
transactionId: string;
|
|
161
|
-
annotation: {};
|
|
159
|
+
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
162
160
|
keepAssignment?: boolean | undefined;
|
|
163
161
|
type: "PRINT_CERTIFICATE";
|
|
162
|
+
transactionId: string;
|
|
164
163
|
declaration: {};
|
|
164
|
+
annotation: {};
|
|
165
165
|
eventId: string;
|
|
166
166
|
};
|
|
167
167
|
correction: {
|
|
168
|
-
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput,
|
|
168
|
+
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
169
169
|
type: "REQUEST_CORRECTION";
|
|
170
170
|
transactionId: string;
|
|
171
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
171
|
+
declaration: import("lodash").Omit<Record<string, import("./FieldValue").FieldUpdateValue>, "applicant.email" | "applicant.image">;
|
|
172
172
|
annotation: {};
|
|
173
173
|
eventId: string;
|
|
174
174
|
keepAssignment: boolean | undefined;
|
|
175
175
|
};
|
|
176
|
-
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput,
|
|
176
|
+
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
177
177
|
type: "APPROVE_CORRECTION";
|
|
178
178
|
transactionId: string;
|
|
179
179
|
declaration: {};
|
|
@@ -182,7 +182,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
182
182
|
requestId: string;
|
|
183
183
|
keepAssignment: boolean | undefined;
|
|
184
184
|
};
|
|
185
|
-
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput,
|
|
185
|
+
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'content'>>) => {
|
|
186
186
|
type: "REJECT_CORRECTION";
|
|
187
187
|
transactionId: string;
|
|
188
188
|
declaration: {};
|
|
@@ -196,7 +196,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
duplicate: {
|
|
199
|
-
markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput,
|
|
199
|
+
markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
200
200
|
type: "MARK_AS_DUPLICATE";
|
|
201
201
|
transactionId: string;
|
|
202
202
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
@@ -204,7 +204,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
204
204
|
eventId: string;
|
|
205
205
|
keepAssignment: boolean | undefined;
|
|
206
206
|
};
|
|
207
|
-
markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput,
|
|
207
|
+
markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
208
208
|
type: "MARK_AS_NOT_DUPLICATE";
|
|
209
209
|
transactionId: string;
|
|
210
210
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|