@opencrvs/toolkit 1.9.13-rc.72233cd → 1.9.13-rc.797da9b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.sh +0 -13
- package/dist/api/index.d.ts.map +1 -1
- package/dist/commons/api/router.d.ts +4561 -3370
- package/dist/commons/conditionals/conditionals.d.ts +295 -28
- package/dist/commons/conditionals/validate.d.ts +9 -11
- package/dist/commons/events/ActionConfig.d.ts +1555 -415
- package/dist/commons/events/ActionDocument.d.ts +1941 -888
- package/dist/commons/events/ActionInput.d.ts +1277 -277
- package/dist/commons/events/ActionType.d.ts +11 -91
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1496 -294
- package/dist/commons/events/CompositeFieldValue.d.ts +190 -30
- package/dist/commons/events/Conditional.d.ts +38 -26
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4471 -1592
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +171 -15
- package/dist/commons/events/Draft.d.ts +113 -72
- package/dist/commons/events/DynamicFieldValue.d.ts +78 -12
- package/dist/commons/events/EventConfig.d.ts +2420 -35
- package/dist/commons/events/EventConfigInput.d.ts +3 -0
- package/dist/commons/events/EventDocument.d.ts +1366 -354
- package/dist/commons/events/EventIndex.d.ts +1010 -212
- package/dist/commons/events/EventInput.d.ts +8 -3
- package/dist/commons/events/EventMetadata.d.ts +357 -130
- package/dist/commons/events/FieldConfig.d.ts +16025 -2936
- package/dist/commons/events/FieldType.d.ts +4 -26
- package/dist/commons/events/FieldTypeMapping.d.ts +906 -314
- package/dist/commons/events/FieldValue.d.ts +527 -149
- package/dist/commons/events/FileUtils.d.ts +2 -2
- package/dist/commons/events/FormConfig.d.ts +721 -54
- package/dist/commons/events/PageConfig.d.ts +320 -58
- package/dist/commons/events/PlainDate.d.ts +1 -1
- package/dist/commons/events/SummaryConfig.d.ts +161 -14
- package/dist/commons/events/TemplateConfig.d.ts +3 -2
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +37 -74
- package/dist/commons/events/WorkqueueConfig.d.ts +7480 -2135
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +247 -2
- package/dist/commons/events/field.d.ts +22 -0
- package/dist/commons/events/index.d.ts +0 -3
- package/dist/commons/events/locations.d.ts +20 -57
- package/dist/commons/events/scopes.d.ts +34 -35
- package/dist/commons/events/state/availableActions.d.ts +2 -7
- package/dist/commons/events/state/flags.d.ts +3 -21
- package/dist/commons/events/state/index.d.ts +27 -30
- package/dist/commons/events/state/utils.d.ts +172 -190
- package/dist/commons/events/test.utils.d.ts +11 -52
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +273 -373
- package/dist/commons/notification/UserNotifications.d.ts +637 -61
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +2006 -270
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +2203 -2847
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1844 -2076
- package/dist/scopes/index.d.ts +353 -640
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +300 -340
- package/package.json +3 -13
- package/tsconfig.json +2 -12
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/application-config/index.d.ts +0 -2
- package/dist/application-config/index.d.ts.map +0 -1
- package/dist/application-config/index.js +0 -2128
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -3237
- package/dist/commons/application-config/index.d.ts +0 -84
- package/dist/commons/events/AuditLog.d.ts +0 -405
- package/dist/commons/events/Flag.d.ts +0 -67
- package/dist/commons/events/eventConfigValidation.d.ts +0 -8
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +0 -3
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +0 -405
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +0 -2
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +0 -1
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +0 -829
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +0 -3
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +0 -1
- package/dist/migrations/v2.0/convert-paragraph-to-heading.js +0 -159
- package/dist/migrations/v2.0/index.d.ts +0 -7
- package/dist/migrations/v2.0/index.d.ts.map +0 -1
- package/dist/migrations/v2.0/index.js +0 -3176
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +0 -3
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +0 -1
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +0 -344
- package/dist/migrations/v2.0/migrate-scopes.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-scopes.js +0 -282
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +0 -268
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-workqueue-configs.js +0 -237
- package/dist/migrations/v2.0/remove-delete-actions.d.ts +0 -3
- package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-delete-actions.js +0 -157
- package/dist/migrations/v2.0/remove-demo-scope.d.ts +0 -3
- package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-demo-scope.js +0 -75
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +0 -3
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-deprecated-imports.js +0 -97
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +0 -3
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-hearth-migrations.js +0 -78
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +0 -3
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-pending-certification-flag.js +0 -110
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +0 -3
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-review-from-register-action.js +0 -164
- package/dist/migrations/v2.0/rename-api-paths.d.ts +0 -3
- package/dist/migrations/v2.0/rename-api-paths.d.ts.map +0 -1
- package/dist/migrations/v2.0/rename-api-paths.js +0 -188
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts +0 -3
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +0 -1
- package/dist/migrations/v2.0/rename-location-parent-id.js +0 -181
- package/opencrvs-toolkit-1.9.13-rc.72233cd.tgz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UUID } from '../uuid';
|
|
2
2
|
import { ActionDocument, ActionUpdate } from './ActionDocument';
|
|
3
|
-
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput,
|
|
3
|
+
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } from './ActionInput';
|
|
4
4
|
import { ActionType } from './ActionType';
|
|
5
5
|
import { Draft } from './Draft';
|
|
6
6
|
import { EventConfig } from './EventConfig';
|
|
@@ -9,10 +9,8 @@ import { EventIndex } from './EventIndex';
|
|
|
9
9
|
import { EventInput } from './EventInput';
|
|
10
10
|
import { TranslationConfig } from './TranslationConfig';
|
|
11
11
|
import { FieldConfig } from './FieldConfig';
|
|
12
|
-
import { Location, AdministrativeArea } from './locations';
|
|
13
12
|
import { WorkqueueConfig } from './WorkqueueConfig';
|
|
14
|
-
import
|
|
15
|
-
import { DocumentPath } from '../documents';
|
|
13
|
+
import { z } from 'zod';
|
|
16
14
|
/**
|
|
17
15
|
* IANA timezone used in testing. Used for queries that expect similar results independent of the users location (e.g. when event was registered.)
|
|
18
16
|
* Since we query by range, providing UTC offset will result to different results when DST changes during the range.
|
|
@@ -22,19 +20,8 @@ export declare const TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
|
|
|
22
20
|
* In real application, the roles are defined in the countryconfig.
|
|
23
21
|
* These are just for testing purposes to generate realistic mock data.
|
|
24
22
|
*/
|
|
25
|
-
export declare const TestUserRole: z.ZodEnum<
|
|
26
|
-
FIELD_AGENT: "FIELD_AGENT";
|
|
27
|
-
LOCAL_REGISTRAR: "LOCAL_REGISTRAR";
|
|
28
|
-
LOCAL_SYSTEM_ADMIN: "LOCAL_SYSTEM_ADMIN";
|
|
29
|
-
NATIONAL_REGISTRAR: "NATIONAL_REGISTRAR";
|
|
30
|
-
REGISTRATION_AGENT: "REGISTRATION_AGENT";
|
|
31
|
-
NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
|
|
32
|
-
SOCIAL_WORKER: "SOCIAL_WORKER";
|
|
33
|
-
COMMUNITY_LEADER: "COMMUNITY_LEADER";
|
|
34
|
-
PROVINCIAL_REGISTRAR: "PROVINCIAL_REGISTRAR";
|
|
35
|
-
}>;
|
|
23
|
+
export declare const TestUserRole: z.ZodEnum<["FIELD_AGENT", "LOCAL_REGISTRAR", "LOCAL_SYSTEM_ADMIN", "NATIONAL_REGISTRAR", "REGISTRATION_AGENT", "NATIONAL_SYSTEM_ADMIN", "SOCIAL_WORKER"]>;
|
|
36
24
|
export type TestUserRole = z.infer<typeof TestUserRole>;
|
|
37
|
-
export declare function pickRandom<T>(rng: () => number, items: T[]): T;
|
|
38
25
|
export declare function generateRandomName(rng: () => number): {
|
|
39
26
|
firstname: string;
|
|
40
27
|
surname: string;
|
|
@@ -42,23 +29,9 @@ export declare function generateRandomName(rng: () => number): {
|
|
|
42
29
|
export declare function generateUuid(rng?: () => number): UUID;
|
|
43
30
|
export declare function generateTrackingId(rng: () => number): string;
|
|
44
31
|
export declare function generateRegistrationNumber(rng: () => number): string;
|
|
45
|
-
export declare function generateRandomSignature(rng: () => number):
|
|
46
|
-
export declare function fieldConfigsToActionPayload(fields: FieldConfig[], rng: () => number
|
|
47
|
-
|
|
48
|
-
* Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
|
|
49
|
-
*/
|
|
50
|
-
administrativeHierarchy?: {
|
|
51
|
-
administrativeAreas: AdministrativeArea[];
|
|
52
|
-
locations: Location[];
|
|
53
|
-
}): ActionUpdate;
|
|
54
|
-
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number, overrides?: ActionUpdate,
|
|
55
|
-
/**
|
|
56
|
-
* Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
|
|
57
|
-
*/
|
|
58
|
-
administrativeHierarchy?: {
|
|
59
|
-
administrativeAreas: AdministrativeArea[];
|
|
60
|
-
locations: Location[];
|
|
61
|
-
}): ActionUpdate;
|
|
32
|
+
export declare function generateRandomSignature(rng: () => number): string;
|
|
33
|
+
export declare function fieldConfigsToActionPayload(fields: FieldConfig[], rng: () => number): ActionUpdate;
|
|
34
|
+
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number, overrides?: ActionUpdate): ActionUpdate;
|
|
62
35
|
export declare function generateActionDuplicateDeclarationInput(...args: Parameters<typeof generateActionDeclarationInput>): ReturnType<typeof generateActionDeclarationInput>;
|
|
63
36
|
export declare function eventPayloadGenerator(rng: () => number, configuration?: EventConfig): {
|
|
64
37
|
create: (input?: Partial<EventInput>) => {
|
|
@@ -95,15 +68,13 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
95
68
|
eventId: string;
|
|
96
69
|
keepAssignment: boolean | undefined;
|
|
97
70
|
};
|
|
98
|
-
|
|
71
|
+
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
|
99
72
|
transactionId: string;
|
|
100
73
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
101
74
|
annotation: {};
|
|
102
75
|
keepAssignment?: boolean | undefined;
|
|
103
|
-
type: "
|
|
104
|
-
|
|
105
|
-
comment: string;
|
|
106
|
-
};
|
|
76
|
+
type: "VALIDATE";
|
|
77
|
+
duplicates: never[];
|
|
107
78
|
eventId: string;
|
|
108
79
|
};
|
|
109
80
|
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
|
|
@@ -126,6 +97,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
126
97
|
keepAssignment?: boolean | undefined;
|
|
127
98
|
type: "ARCHIVE";
|
|
128
99
|
annotation: {};
|
|
100
|
+
duplicates: never[];
|
|
129
101
|
eventId: string;
|
|
130
102
|
content: {
|
|
131
103
|
reason: string;
|
|
@@ -137,6 +109,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
137
109
|
keepAssignment?: boolean | undefined;
|
|
138
110
|
type: "REJECT";
|
|
139
111
|
declaration: {};
|
|
112
|
+
duplicates: never[];
|
|
140
113
|
eventId: string;
|
|
141
114
|
content: {
|
|
142
115
|
reason: string;
|
|
@@ -272,18 +245,4 @@ export declare const BearerTokenByUserType: {
|
|
|
272
245
|
localRegistrar: string;
|
|
273
246
|
};
|
|
274
247
|
export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
|
|
275
|
-
/**
|
|
276
|
-
* Backend focused event config generator for testing fields in a lightweight way.
|
|
277
|
-
*
|
|
278
|
-
* @param id - The unique identifier for the event.
|
|
279
|
-
* @param fields - Field configurations to include in the event declaration. Everything in a single page.
|
|
280
|
-
* @param placeOfEventId - Optional place of event field id.
|
|
281
|
-
* @param dateOfEventId - Optional date of event field id.
|
|
282
|
-
*/
|
|
283
|
-
export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfEventId }: {
|
|
284
|
-
id: string;
|
|
285
|
-
fields: FieldConfig[];
|
|
286
|
-
placeOfEventId?: string;
|
|
287
|
-
dateOfEventId?: string;
|
|
288
|
-
}) => EventConfig;
|
|
289
248
|
//# sourceMappingURL=test.utils.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function generateTransactionId(): string & import("zod")
|
|
1
|
+
export declare function generateTransactionId(): string & import("zod").BRAND<"UUID">;
|
|
2
2
|
//# sourceMappingURL=transactions.d.ts.map
|