@opencrvs/toolkit 2.1.0-rc.30bcbde → 2.1.0-rc.343362d
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/build.sh +9 -1
- package/create-countryconfig/index.js +412 -59
- package/create-countryconfig/node_modules/.bin/degit +21 -0
- package/create-countryconfig/package.json +4 -1
- package/dist/application-config/index.js +341 -274
- package/dist/authentication/index.d.ts +67 -0
- package/dist/authentication/index.d.ts.map +1 -0
- package/dist/authentication/index.js +750 -0
- package/dist/cli.js +1782 -113
- package/dist/commons/api/router.d.ts +3897 -3263
- 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 +16 -5
- package/dist/commons/events/ActionConfig.d.ts +105 -105
- package/dist/commons/events/ActionDocument.d.ts +115 -121
- package/dist/commons/events/ActionInput.d.ts +4 -4
- package/dist/commons/events/ActionStatus.d.ts +14 -0
- package/dist/commons/events/ActionType.d.ts +62 -62
- package/dist/commons/events/AdvancedSearchConfig.d.ts +531 -507
- 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 -590
- 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 +516 -48
- package/dist/commons/events/EventIndex.d.ts +49 -72
- package/dist/commons/events/EventMetadata.d.ts +39 -49
- package/dist/commons/events/EventStatus.d.ts +19 -0
- package/dist/commons/events/FieldConfig.d.ts +424 -389
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +86 -86
- package/dist/commons/events/FieldValue.d.ts +14 -14
- package/dist/commons/events/Flag.d.ts +57 -15
- 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 -814
- 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 +247 -14
- 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 +64 -43
- package/dist/commons/events/utils.d.ts +125 -114
- package/dist/commons/notification/UserNotifications.d.ts +38 -23
- package/dist/commons/notification/dispatch.d.ts +10 -0
- package/dist/commons/notification/index.d.ts +1 -0
- package/dist/conditionals/index.js +328 -58
- package/dist/csv.d.ts +25 -0
- package/dist/csv.d.ts.map +1 -0
- package/dist/csv.js +120 -0
- 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 +15 -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/questions.js +20 -14
- package/dist/environment/setup-environment.js +36 -21
- 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 +7590 -7099
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +2 -2
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +2 -2
- package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
- package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +3 -0
- package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +1 -0
- package/dist/migrations/v2.1/add-recovery-link-notifications.js +511 -0
- package/dist/migrations/v2.1/add-translations.d.ts +9 -0
- package/dist/migrations/v2.1/add-translations.d.ts.map +1 -0
- package/dist/migrations/v2.1/add-translations.js +213 -0
- package/dist/migrations/v2.1/enable-telemetry.d.ts +3 -0
- package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -0
- package/dist/migrations/v2.1/enable-telemetry.js +438 -0
- package/dist/migrations/v2.1/index.d.ts.map +1 -1
- package/dist/migrations/v2.1/index.js +1058 -0
- package/dist/notification/index.js +1859 -1459
- package/dist/scopes/index.d.ts +464 -169
- package/dist/scopes/index.js +329 -58
- package/dist/telemetry/index.d.ts +45 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +39 -0
- package/dist/templates/charts-values/dependencies/values.yaml +2 -0
- package/dist/templates/charts-values/opencrvs-services/values.yaml +4 -3
- package/dist/templates/charts-values/opentelemetry/values.yaml +95 -0
- package/dist/templates/charts-values/traefik/values.yaml +23 -9
- package/dist/templates/inventory/inventory.template.yml +1 -3
- package/dist/translations/check.d.ts +21 -0
- package/dist/translations/check.d.ts.map +1 -0
- package/dist/translations/check.js +132 -0
- package/dist/verify/endpoints.d.ts +2 -0
- package/dist/verify/endpoints.d.ts.map +1 -0
- package/dist/verify/endpoints.js +345 -0
- package/opencrvs-toolkit-2.1.0-rc.343362d.tgz +0 -0
- package/package.json +12 -7
- package/tsconfig.build.json +11 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +3 -0
- package/dist/templates/inventory/production.example.yml +0 -77
- package/dist/templates/inventory/qa.example.yml +0 -48
- package/opencrvs-toolkit-2.1.0-rc.30bcbde.tgz +0 -0
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UUID } from '../uuid';
|
|
2
2
|
import { ActionDocument, ActionUpdate } from './ActionDocument';
|
|
3
|
+
import { ValidatorContext } from '../conditionals/validate';
|
|
3
4
|
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnarchiveActionInput, UnassignActionInput } from './ActionInput';
|
|
4
5
|
import { ActionType } from './ActionType';
|
|
5
6
|
import { Draft } from './Draft';
|
|
@@ -9,7 +10,7 @@ import { EventIndex } from './EventIndex';
|
|
|
9
10
|
import { EventInput } from './EventInput';
|
|
10
11
|
import { TranslationConfig } from './TranslationConfig';
|
|
11
12
|
import { FieldConfig } from './FieldConfig';
|
|
12
|
-
import {
|
|
13
|
+
import { LocationVersion, SetLocationPayload, SetAdministrativeAreaPayload, ClientAdministrativeArea } from './locations';
|
|
13
14
|
import { WorkqueueConfig } from './WorkqueueConfig';
|
|
14
15
|
import * as z from 'zod/v4';
|
|
15
16
|
import { DocumentPath } from '../documents';
|
|
@@ -23,15 +24,15 @@ export declare const TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
|
|
|
23
24
|
* These are just for testing purposes to generate realistic mock data.
|
|
24
25
|
*/
|
|
25
26
|
export declare const TestUserRole: z.ZodEnum<{
|
|
27
|
+
COMMUNITY_LEADER: "COMMUNITY_LEADER";
|
|
26
28
|
FIELD_AGENT: "FIELD_AGENT";
|
|
27
29
|
LOCAL_REGISTRAR: "LOCAL_REGISTRAR";
|
|
28
30
|
LOCAL_SYSTEM_ADMIN: "LOCAL_SYSTEM_ADMIN";
|
|
29
31
|
NATIONAL_REGISTRAR: "NATIONAL_REGISTRAR";
|
|
30
|
-
REGISTRATION_AGENT: "REGISTRATION_AGENT";
|
|
31
32
|
NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
|
|
32
|
-
SOCIAL_WORKER: "SOCIAL_WORKER";
|
|
33
|
-
COMMUNITY_LEADER: "COMMUNITY_LEADER";
|
|
34
33
|
PROVINCIAL_REGISTRAR: "PROVINCIAL_REGISTRAR";
|
|
34
|
+
REGISTRATION_AGENT: "REGISTRATION_AGENT";
|
|
35
|
+
SOCIAL_WORKER: "SOCIAL_WORKER";
|
|
35
36
|
}>;
|
|
36
37
|
export type TestUserRole = z.infer<typeof TestUserRole>;
|
|
37
38
|
export declare function pickRandom<T>(rng: () => number, items: T[]): T;
|
|
@@ -43,21 +44,28 @@ export declare function generateUuid(rng?: () => number): UUID;
|
|
|
43
44
|
export declare function generateTrackingId(rng: () => number): string;
|
|
44
45
|
export declare function generateRegistrationNumber(rng: () => number): string;
|
|
45
46
|
export declare function generateRandomSignature(rng: () => number): DocumentPath;
|
|
47
|
+
/**
|
|
48
|
+
* Builds one element of a location / administrative area `versions` history.
|
|
49
|
+
* Every field is defaulted so a call names only what its assertion is about —
|
|
50
|
+
* an `effectiveFrom`, a `name`, or an explicit `versionId` when the test needs
|
|
51
|
+
* to control version identity.
|
|
52
|
+
*/
|
|
53
|
+
export declare function locationVersion(overrides?: Partial<LocationVersion>, rng?: () => number): LocationVersion;
|
|
46
54
|
export declare function fieldConfigsToActionPayload(fields: FieldConfig[], rng: () => number,
|
|
47
55
|
/**
|
|
48
56
|
* Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
|
|
49
57
|
*/
|
|
50
58
|
administrativeHierarchy?: {
|
|
51
|
-
administrativeAreas:
|
|
52
|
-
locations:
|
|
59
|
+
administrativeAreas: SetAdministrativeAreaPayload[];
|
|
60
|
+
locations: SetLocationPayload[];
|
|
53
61
|
}): ActionUpdate;
|
|
54
62
|
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number, overrides?: ActionUpdate,
|
|
55
63
|
/**
|
|
56
64
|
* Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
|
|
57
65
|
*/
|
|
58
66
|
administrativeHierarchy?: {
|
|
59
|
-
administrativeAreas:
|
|
60
|
-
locations:
|
|
67
|
+
administrativeAreas: SetAdministrativeAreaPayload[];
|
|
68
|
+
locations: SetLocationPayload[];
|
|
61
69
|
}): ActionUpdate;
|
|
62
70
|
export declare function generateActionDuplicateDeclarationInput(...args: Parameters<typeof generateActionDeclarationInput>): ReturnType<typeof generateActionDeclarationInput>;
|
|
63
71
|
export declare function eventPayloadGenerator(rng: () => number, configuration?: EventConfig): {
|
|
@@ -72,108 +80,105 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
72
80
|
};
|
|
73
81
|
draft: ({ eventId, actionType, annotation, omitFields }: {
|
|
74
82
|
eventId: UUID;
|
|
75
|
-
actionType: Draft[
|
|
83
|
+
actionType: Draft['action']['type'];
|
|
76
84
|
annotation?: Record<string, any>;
|
|
77
85
|
omitFields?: string[];
|
|
78
86
|
}, input?: Partial<Draft>) => Draft;
|
|
79
87
|
actions: {
|
|
80
|
-
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput,
|
|
88
|
+
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
89
|
+
keepAssignment?: boolean | undefined;
|
|
90
|
+
type: "DECLARE";
|
|
81
91
|
transactionId: string;
|
|
82
92
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
83
93
|
annotation: {};
|
|
84
|
-
keepAssignment?: boolean | undefined;
|
|
85
|
-
type: "DECLARE";
|
|
86
94
|
eventId: string;
|
|
87
95
|
};
|
|
88
96
|
/**
|
|
89
97
|
* Notify allows sending incomplete data. Think it as 'partial declare' for now.
|
|
90
98
|
*/
|
|
91
|
-
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput,
|
|
99
|
+
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
92
100
|
type: "NOTIFY";
|
|
93
101
|
transactionId: string;
|
|
94
102
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
95
103
|
eventId: string;
|
|
96
104
|
keepAssignment: boolean | undefined;
|
|
97
105
|
};
|
|
98
|
-
edit: (eventId: string, input?: Partial<Pick<EditActionInput,
|
|
106
|
+
edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
107
|
+
keepAssignment?: boolean | undefined;
|
|
108
|
+
type: "EDIT";
|
|
99
109
|
transactionId: string;
|
|
100
110
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
101
111
|
annotation: {};
|
|
102
|
-
keepAssignment?: boolean | undefined;
|
|
103
|
-
type: "EDIT";
|
|
104
112
|
eventId: string;
|
|
105
113
|
};
|
|
106
|
-
assign: (eventId: string, input?: Partial<Pick<AssignActionInput,
|
|
114
|
+
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo'>>) => {
|
|
107
115
|
type: "ASSIGN";
|
|
108
116
|
transactionId: string;
|
|
109
117
|
declaration: {};
|
|
110
118
|
assignedTo: string;
|
|
111
119
|
eventId: string;
|
|
112
120
|
};
|
|
113
|
-
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput,
|
|
121
|
+
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId'>>) => {
|
|
114
122
|
type: "UNASSIGN";
|
|
115
123
|
transactionId: string;
|
|
116
124
|
declaration: {};
|
|
117
125
|
assignedTo: null;
|
|
118
126
|
eventId: string;
|
|
119
127
|
};
|
|
120
|
-
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput,
|
|
121
|
-
transactionId: string;
|
|
122
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
128
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
123
129
|
keepAssignment?: boolean | undefined;
|
|
124
130
|
type: "ARCHIVE";
|
|
131
|
+
transactionId: string;
|
|
132
|
+
declaration: {};
|
|
125
133
|
annotation: {};
|
|
126
134
|
eventId: string;
|
|
127
|
-
content: {
|
|
128
|
-
reason: string;
|
|
129
|
-
};
|
|
130
135
|
};
|
|
131
|
-
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput,
|
|
132
|
-
transactionId: string;
|
|
133
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
136
|
+
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
134
137
|
keepAssignment?: boolean | undefined;
|
|
135
138
|
type: "UNARCHIVE";
|
|
139
|
+
transactionId: string;
|
|
140
|
+
declaration: {};
|
|
136
141
|
annotation: {};
|
|
137
142
|
eventId: string;
|
|
138
143
|
};
|
|
139
|
-
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput,
|
|
140
|
-
transactionId: string;
|
|
141
|
-
annotation: {};
|
|
144
|
+
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
142
145
|
keepAssignment?: boolean | undefined;
|
|
143
146
|
type: "REJECT";
|
|
147
|
+
transactionId: string;
|
|
144
148
|
declaration: {};
|
|
149
|
+
annotation: {};
|
|
145
150
|
eventId: string;
|
|
146
151
|
content: {
|
|
147
152
|
reason: string;
|
|
148
153
|
};
|
|
149
154
|
};
|
|
150
|
-
register: (eventId: string, input?: Partial<Pick<RegisterActionInput,
|
|
155
|
+
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber'>>) => {
|
|
156
|
+
keepAssignment?: boolean | undefined;
|
|
157
|
+
registrationNumber?: string | undefined;
|
|
158
|
+
type: "REGISTER";
|
|
151
159
|
transactionId: string;
|
|
152
160
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
153
161
|
annotation: {};
|
|
154
|
-
registrationNumber?: string | undefined;
|
|
155
|
-
keepAssignment?: boolean | undefined;
|
|
156
|
-
type: "REGISTER";
|
|
157
162
|
eventId: string;
|
|
158
163
|
};
|
|
159
|
-
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput,
|
|
160
|
-
transactionId: string;
|
|
161
|
-
annotation: {};
|
|
164
|
+
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
162
165
|
keepAssignment?: boolean | undefined;
|
|
163
166
|
type: "PRINT_CERTIFICATE";
|
|
167
|
+
transactionId: string;
|
|
164
168
|
declaration: {};
|
|
169
|
+
annotation: {};
|
|
165
170
|
eventId: string;
|
|
166
171
|
};
|
|
167
172
|
correction: {
|
|
168
|
-
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput,
|
|
173
|
+
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
169
174
|
type: "REQUEST_CORRECTION";
|
|
170
175
|
transactionId: string;
|
|
171
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
176
|
+
declaration: import("lodash").Omit<Record<string, import("./FieldValue").FieldUpdateValue>, "applicant.email" | "applicant.image">;
|
|
172
177
|
annotation: {};
|
|
173
178
|
eventId: string;
|
|
174
179
|
keepAssignment: boolean | undefined;
|
|
175
180
|
};
|
|
176
|
-
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput,
|
|
181
|
+
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
177
182
|
type: "APPROVE_CORRECTION";
|
|
178
183
|
transactionId: string;
|
|
179
184
|
declaration: {};
|
|
@@ -182,7 +187,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
182
187
|
requestId: string;
|
|
183
188
|
keepAssignment: boolean | undefined;
|
|
184
189
|
};
|
|
185
|
-
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput,
|
|
190
|
+
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'content'>>) => {
|
|
186
191
|
type: "REJECT_CORRECTION";
|
|
187
192
|
transactionId: string;
|
|
188
193
|
declaration: {};
|
|
@@ -196,7 +201,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
196
201
|
};
|
|
197
202
|
};
|
|
198
203
|
duplicate: {
|
|
199
|
-
markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput,
|
|
204
|
+
markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
200
205
|
type: "MARK_AS_DUPLICATE";
|
|
201
206
|
transactionId: string;
|
|
202
207
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
@@ -204,7 +209,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
204
209
|
eventId: string;
|
|
205
210
|
keepAssignment: boolean | undefined;
|
|
206
211
|
};
|
|
207
|
-
markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput,
|
|
212
|
+
markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
208
213
|
type: "MARK_AS_NOT_DUPLICATE";
|
|
209
214
|
transactionId: string;
|
|
210
215
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
@@ -291,4 +296,20 @@ export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfE
|
|
|
291
296
|
placeOfEventId?: string;
|
|
292
297
|
dateOfEventId?: string;
|
|
293
298
|
}) => EventConfig;
|
|
299
|
+
/**
|
|
300
|
+
* Get the leaf administrative area IDs from a list of administrative areas.
|
|
301
|
+
*
|
|
302
|
+
* A leaf administrative area is defined as an administrative area that does not have any children in the provided list.
|
|
303
|
+
* AdministrativeArea might have a CRVS_OFFICE as children, but is still considered to be a leaf administrative area.
|
|
304
|
+
*
|
|
305
|
+
* @param administrativeAreas - The list of administrative areas to search.
|
|
306
|
+
* @returns The list of leaf administrative area IDs.
|
|
307
|
+
*/
|
|
308
|
+
export declare function getLeafAdministrativeAreaIds(administrativeAreas: Map<UUID, ClientAdministrativeArea>): Array<{
|
|
309
|
+
id: UUID;
|
|
310
|
+
}>;
|
|
311
|
+
export declare function generateTestValidatorContext(userRole?: TestUserRole, eventWithConfig?: {
|
|
312
|
+
event: EventDocument;
|
|
313
|
+
eventConfig: EventConfig;
|
|
314
|
+
}): ValidatorContext;
|
|
294
315
|
//# sourceMappingURL=test.utils.d.ts.map
|