@opencrvs/toolkit 2.1.0-rc.05eb1de → 2.1.0-rc.06c6f7a
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 +343 -275
- 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 +1890 -271
- package/dist/commons/api/router.d.ts +3925 -3327
- 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 +112 -105
- package/dist/commons/events/ActionDocument.d.ts +121 -127
- package/dist/commons/events/ActionInput.d.ts +4 -10
- 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 +518 -50
- 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 -46
- package/dist/commons/events/utils.d.ts +133 -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 -131
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +0 -14
- 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 -35
- 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 +7617 -7112
- 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 +1867 -1465
- 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 -3
- package/dist/templates/charts-values/opencrvs-services/values.yaml +4 -7
- 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 +19 -0
- package/dist/translations/check.d.ts.map +1 -0
- package/dist/translations/check.js +127 -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.06c6f7a.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.05eb1de.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,111 +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
|
-
content: {
|
|
105
|
-
comment: string;
|
|
106
|
-
};
|
|
107
112
|
eventId: string;
|
|
108
113
|
};
|
|
109
|
-
assign: (eventId: string, input?: Partial<Pick<AssignActionInput,
|
|
114
|
+
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo'>>) => {
|
|
110
115
|
type: "ASSIGN";
|
|
111
116
|
transactionId: string;
|
|
112
117
|
declaration: {};
|
|
113
118
|
assignedTo: string;
|
|
114
119
|
eventId: string;
|
|
115
120
|
};
|
|
116
|
-
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput,
|
|
121
|
+
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId'>>) => {
|
|
117
122
|
type: "UNASSIGN";
|
|
118
123
|
transactionId: string;
|
|
119
124
|
declaration: {};
|
|
120
125
|
assignedTo: null;
|
|
121
126
|
eventId: string;
|
|
122
127
|
};
|
|
123
|
-
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput,
|
|
124
|
-
transactionId: string;
|
|
125
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
128
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
126
129
|
keepAssignment?: boolean | undefined;
|
|
127
130
|
type: "ARCHIVE";
|
|
131
|
+
transactionId: string;
|
|
132
|
+
declaration: {};
|
|
128
133
|
annotation: {};
|
|
129
134
|
eventId: string;
|
|
130
|
-
content: {
|
|
131
|
-
reason: string;
|
|
132
|
-
};
|
|
133
135
|
};
|
|
134
|
-
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput,
|
|
135
|
-
transactionId: string;
|
|
136
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
136
|
+
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
137
137
|
keepAssignment?: boolean | undefined;
|
|
138
138
|
type: "UNARCHIVE";
|
|
139
|
+
transactionId: string;
|
|
140
|
+
declaration: {};
|
|
139
141
|
annotation: {};
|
|
140
142
|
eventId: string;
|
|
141
143
|
};
|
|
142
|
-
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput,
|
|
143
|
-
transactionId: string;
|
|
144
|
-
annotation: {};
|
|
144
|
+
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
145
145
|
keepAssignment?: boolean | undefined;
|
|
146
146
|
type: "REJECT";
|
|
147
|
+
transactionId: string;
|
|
147
148
|
declaration: {};
|
|
149
|
+
annotation: {};
|
|
148
150
|
eventId: string;
|
|
149
151
|
content: {
|
|
150
152
|
reason: string;
|
|
151
153
|
};
|
|
152
154
|
};
|
|
153
|
-
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";
|
|
154
159
|
transactionId: string;
|
|
155
160
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
156
161
|
annotation: {};
|
|
157
|
-
registrationNumber?: string | undefined;
|
|
158
|
-
keepAssignment?: boolean | undefined;
|
|
159
|
-
type: "REGISTER";
|
|
160
162
|
eventId: string;
|
|
161
163
|
};
|
|
162
|
-
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput,
|
|
163
|
-
transactionId: string;
|
|
164
|
-
annotation: {};
|
|
164
|
+
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
165
165
|
keepAssignment?: boolean | undefined;
|
|
166
166
|
type: "PRINT_CERTIFICATE";
|
|
167
|
+
transactionId: string;
|
|
167
168
|
declaration: {};
|
|
169
|
+
annotation: {};
|
|
168
170
|
eventId: string;
|
|
169
171
|
};
|
|
170
172
|
correction: {
|
|
171
|
-
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput,
|
|
173
|
+
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
172
174
|
type: "REQUEST_CORRECTION";
|
|
173
175
|
transactionId: string;
|
|
174
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
176
|
+
declaration: import("lodash").Omit<Record<string, import("./FieldValue").FieldUpdateValue>, "applicant.email" | "applicant.image">;
|
|
175
177
|
annotation: {};
|
|
176
178
|
eventId: string;
|
|
177
179
|
keepAssignment: boolean | undefined;
|
|
178
180
|
};
|
|
179
|
-
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput,
|
|
181
|
+
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
180
182
|
type: "APPROVE_CORRECTION";
|
|
181
183
|
transactionId: string;
|
|
182
184
|
declaration: {};
|
|
@@ -185,7 +187,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
185
187
|
requestId: string;
|
|
186
188
|
keepAssignment: boolean | undefined;
|
|
187
189
|
};
|
|
188
|
-
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput,
|
|
190
|
+
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'content'>>) => {
|
|
189
191
|
type: "REJECT_CORRECTION";
|
|
190
192
|
transactionId: string;
|
|
191
193
|
declaration: {};
|
|
@@ -199,7 +201,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
199
201
|
};
|
|
200
202
|
};
|
|
201
203
|
duplicate: {
|
|
202
|
-
markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput,
|
|
204
|
+
markAsDuplicate: (eventId: string, input?: Partial<Pick<MarkAsDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
203
205
|
type: "MARK_AS_DUPLICATE";
|
|
204
206
|
transactionId: string;
|
|
205
207
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
@@ -207,7 +209,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
207
209
|
eventId: string;
|
|
208
210
|
keepAssignment: boolean | undefined;
|
|
209
211
|
};
|
|
210
|
-
markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput,
|
|
212
|
+
markNotDuplicate: (eventId: string, input?: Partial<Pick<MarkNotDuplicateActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
211
213
|
type: "MARK_AS_NOT_DUPLICATE";
|
|
212
214
|
transactionId: string;
|
|
213
215
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
@@ -294,4 +296,20 @@ export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfE
|
|
|
294
296
|
placeOfEventId?: string;
|
|
295
297
|
dateOfEventId?: string;
|
|
296
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;
|
|
297
315
|
//# sourceMappingURL=test.utils.d.ts.map
|