@opencrvs/toolkit 1.9.12-rc.ea32f28 → 1.9.12-rc.eec1bae
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 +13 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/application-config/index.d.ts +2 -0
- package/dist/application-config/index.d.ts.map +1 -0
- package/dist/application-config/index.js +135 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2422 -0
- package/dist/commons/api/router.d.ts +3386 -2262
- package/dist/commons/application-config/index.d.ts +82 -0
- package/dist/commons/conditionals/conditionals.d.ts +27 -3
- package/dist/commons/conditionals/validate.d.ts +13 -2
- package/dist/commons/events/ActionConfig.d.ts +415 -1555
- package/dist/commons/events/ActionDocument.d.ts +889 -1942
- package/dist/commons/events/ActionInput.d.ts +277 -1073
- package/dist/commons/events/ActionType.d.ts +91 -11
- package/dist/commons/events/AdvancedSearchConfig.d.ts +294 -1496
- package/dist/commons/events/AuditLog.d.ts +405 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +30 -190
- package/dist/commons/events/Conditional.d.ts +26 -38
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +1592 -4471
- package/dist/commons/events/DeduplicationConfig.d.ts +15 -171
- package/dist/commons/events/Draft.d.ts +73 -108
- package/dist/commons/events/DynamicFieldValue.d.ts +12 -78
- package/dist/commons/events/EventConfig.d.ts +35 -2420
- package/dist/commons/events/EventConfigInput.d.ts +0 -3
- package/dist/commons/events/EventDocument.d.ts +354 -1366
- package/dist/commons/events/EventIndex.d.ts +212 -1010
- package/dist/commons/events/EventInput.d.ts +3 -8
- package/dist/commons/events/EventMetadata.d.ts +130 -357
- package/dist/commons/events/FieldConfig.d.ts +2892 -12897
- package/dist/commons/events/FieldType.d.ts +26 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +314 -906
- package/dist/commons/events/FieldValue.d.ts +149 -527
- package/dist/commons/events/FileUtils.d.ts +2 -2
- package/dist/commons/events/Flag.d.ts +67 -0
- package/dist/commons/events/FormConfig.d.ts +54 -721
- package/dist/commons/events/PageConfig.d.ts +58 -320
- package/dist/commons/events/PlainDate.d.ts +1 -1
- package/dist/commons/events/SummaryConfig.d.ts +14 -161
- package/dist/commons/events/TemplateConfig.d.ts +2 -3
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
- package/dist/commons/events/WorkqueueConfig.d.ts +2208 -7553
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +2 -247
- package/dist/commons/events/eventConfigValidation.d.ts +8 -0
- package/dist/commons/events/index.d.ts +3 -0
- package/dist/commons/events/locations.d.ts +57 -20
- package/dist/commons/events/scopes.d.ts +35 -34
- package/dist/commons/events/state/availableActions.d.ts +7 -2
- package/dist/commons/events/state/flags.d.ts +21 -3
- package/dist/commons/events/state/index.d.ts +30 -27
- package/dist/commons/events/state/utils.d.ts +191 -173
- package/dist/commons/events/test.utils.d.ts +52 -11
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +374 -443
- package/dist/commons/notification/UserNotifications.d.ts +61 -637
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +302 -14
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +2839 -2104
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +405 -0
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +753 -0
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
- package/dist/migrations/v2.0/convert-paragraph-to-heading.js +159 -0
- package/dist/migrations/v2.0/index.d.ts +7 -0
- package/dist/migrations/v2.0/index.d.ts.map +1 -0
- package/dist/migrations/v2.0/index.js +2361 -0
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +344 -0
- package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
- package/dist/migrations/v2.0/migrate-scopes.js +281 -0
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +268 -0
- package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
- package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-delete-actions.js +157 -0
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-deprecated-imports.js +97 -0
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-pending-certification-flag.js +110 -0
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
- package/dist/migrations/v2.0/remove-review-from-register-action.js +164 -0
- package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
- package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
- package/dist/migrations/v2.0/rename-api-paths.js +188 -0
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
- package/dist/migrations/v2.0/rename-location-parent-id.js +181 -0
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +2074 -1767
- package/dist/scopes/index.d.ts +640 -353
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +340 -300
- package/opencrvs-toolkit-1.9.12-rc.eec1bae.tgz +0 -0
- package/package.json +18 -8
- package/tsconfig.json +9 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
package/build.sh
CHANGED
|
@@ -45,6 +45,15 @@ npx esbuild src/notification/index.ts --bundle --format=cjs --outdir=./dist/noti
|
|
|
45
45
|
mkdir -p ./dist/commons/notification
|
|
46
46
|
cp -r ../commons/build/dist/common/notification/*.d.ts ./dist/commons/notification
|
|
47
47
|
|
|
48
|
+
# Build application config
|
|
49
|
+
npx esbuild src/application-config/index.ts --bundle --format=cjs --outdir=./dist/application-config --allow-overwrite --packages=external
|
|
50
|
+
mkdir -p ./dist/commons/application-config
|
|
51
|
+
cp -r ../commons/build/dist/common/application-config.d.ts ./dist/commons/application-config/index.d.ts
|
|
52
|
+
|
|
53
|
+
# Build migration CLI
|
|
54
|
+
npx esbuild src/migrations/v2.0/index.ts --bundle --format=cjs --outdir=./dist/migrations/v2.0 --allow-overwrite --packages=external --banner:js="#!/usr/bin/env node"
|
|
55
|
+
chmod +x ./dist/migrations/v2.0/index.js
|
|
56
|
+
|
|
48
57
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
49
58
|
sed -i '' 's|@opencrvs/events/build/types|../commons/api|g' dist/api/index.d.ts
|
|
50
59
|
find dist -type f -exec sed -i '' 's|@opencrvs/commons|../commons|g' {} +
|
|
@@ -53,4 +62,8 @@ else
|
|
|
53
62
|
find dist -type f -exec sed -i 's|@opencrvs/commons|../commons|g' {} +
|
|
54
63
|
fi
|
|
55
64
|
|
|
65
|
+
# Build CLI
|
|
66
|
+
npx esbuild src/cli.ts --bundle --format=cjs --outdir=./dist --allow-overwrite --packages=external --banner:js="#!/usr/bin/env node"
|
|
67
|
+
chmod +x ./dist/cli.js
|
|
68
|
+
|
|
56
69
|
echo "Build completed successfully."
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAmC,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAmC,MAAM,cAAc,CAAA;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAE/D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,UAAU,MAAM,EAAE,GACxB,gBAAgB,CAAC,SAAS,CAAC,CAc7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/application-config/index.ts"],"names":[],"mappings":"AAUA,cAAc,sCAAsC,CAAA"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/application-config/index.ts
|
|
31
|
+
var application_config_exports = {};
|
|
32
|
+
__export(application_config_exports, {
|
|
33
|
+
ApplicationConfig: () => ApplicationConfig,
|
|
34
|
+
BackgroundConfig: () => BackgroundConfig,
|
|
35
|
+
ClientConfig: () => ClientConfig,
|
|
36
|
+
LoginConfig: () => LoginConfig,
|
|
37
|
+
SearchCriteria: () => SearchCriteria,
|
|
38
|
+
defineApplicationConfig: () => defineApplicationConfig,
|
|
39
|
+
defineClientConfig: () => defineClientConfig,
|
|
40
|
+
defineLoginConfig: () => defineLoginConfig
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(application_config_exports);
|
|
43
|
+
|
|
44
|
+
// ../commons/src/application-config.ts
|
|
45
|
+
var z2 = __toESM(require("zod/v4"));
|
|
46
|
+
|
|
47
|
+
// ../commons/src/events/TranslationConfig.ts
|
|
48
|
+
var z = __toESM(require("zod/v4"));
|
|
49
|
+
var TranslationConfig = z.object({
|
|
50
|
+
id: z.string().describe(
|
|
51
|
+
"The identifier of the translation referred in translation CSV files"
|
|
52
|
+
),
|
|
53
|
+
defaultMessage: z.string().describe("Default translation message"),
|
|
54
|
+
description: z.string().describe(
|
|
55
|
+
"Describe the translation for a translator to be able to identify it."
|
|
56
|
+
)
|
|
57
|
+
}).meta({
|
|
58
|
+
description: "Translation configuration",
|
|
59
|
+
id: "TranslationConfig"
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// ../commons/src/application-config.ts
|
|
63
|
+
var SearchCriteria = z2.enum([
|
|
64
|
+
"TRACKING_ID",
|
|
65
|
+
"REGISTRATION_NUMBER",
|
|
66
|
+
"NATIONAL_ID",
|
|
67
|
+
"NAME",
|
|
68
|
+
"PHONE_NUMBER",
|
|
69
|
+
"EMAIL"
|
|
70
|
+
]);
|
|
71
|
+
var ApplicationConfig = z2.object({
|
|
72
|
+
APPLICATION_NAME: z2.string(),
|
|
73
|
+
COUNTRY_LOGO: z2.object({
|
|
74
|
+
fileName: z2.string(),
|
|
75
|
+
file: z2.string()
|
|
76
|
+
}),
|
|
77
|
+
SYSTEM_IANA_TIMEZONE: z2.string(),
|
|
78
|
+
CURRENCY: z2.object({
|
|
79
|
+
languagesAndCountry: z2.array(z2.string()),
|
|
80
|
+
isoCode: z2.string()
|
|
81
|
+
}),
|
|
82
|
+
ADMIN_STRUCTURE: z2.array(
|
|
83
|
+
z2.object({
|
|
84
|
+
id: z2.string(),
|
|
85
|
+
label: TranslationConfig
|
|
86
|
+
})
|
|
87
|
+
),
|
|
88
|
+
PHONE_NUMBER_PATTERN: z2.string().or(z2.instanceof(RegExp)),
|
|
89
|
+
USER_NOTIFICATION_DELIVERY_METHOD: z2.string(),
|
|
90
|
+
INFORMANT_NOTIFICATION_DELIVERY_METHOD: z2.string(),
|
|
91
|
+
SEARCH_DEFAULT_CRITERIA: SearchCriteria.optional().default("TRACKING_ID")
|
|
92
|
+
});
|
|
93
|
+
var defineApplicationConfig = (config) => {
|
|
94
|
+
return ApplicationConfig.parse(config);
|
|
95
|
+
};
|
|
96
|
+
var BackgroundConfig = z2.object({
|
|
97
|
+
backgroundColor: z2.string().optional(),
|
|
98
|
+
backgroundImage: z2.string().optional(),
|
|
99
|
+
imageFit: z2.string().optional()
|
|
100
|
+
}).refine(
|
|
101
|
+
(data) => !!(data.backgroundColor || data.backgroundImage),
|
|
102
|
+
"backgroundColor and backgroundImage cannot be empty at the same time"
|
|
103
|
+
);
|
|
104
|
+
var LoginConfig = z2.object({
|
|
105
|
+
COUNTRY: z2.string(),
|
|
106
|
+
LANGUAGES: z2.array(z2.string()),
|
|
107
|
+
USER_NOTIFICATION_DELIVERY_METHOD: z2.string(),
|
|
108
|
+
INFORMANT_NOTIFICATION_DELIVERY_METHOD: z2.string(),
|
|
109
|
+
PHONE_NUMBER_PATTERN: z2.string().or(z2.instanceof(RegExp)),
|
|
110
|
+
LOGIN_BACKGROUND: BackgroundConfig,
|
|
111
|
+
SENTRY: z2.string().optional()
|
|
112
|
+
});
|
|
113
|
+
var defineLoginConfig = (config) => {
|
|
114
|
+
return LoginConfig.parse(config);
|
|
115
|
+
};
|
|
116
|
+
var ClientConfig = z2.object({
|
|
117
|
+
COUNTRY: z2.string(),
|
|
118
|
+
LANGUAGES: z2.array(z2.string()),
|
|
119
|
+
SENTRY: z2.string().optional(),
|
|
120
|
+
REGISTER_BACKGROUND: BackgroundConfig,
|
|
121
|
+
DASHBOARDS: z2.array(
|
|
122
|
+
z2.object({
|
|
123
|
+
id: z2.string(),
|
|
124
|
+
title: TranslationConfig,
|
|
125
|
+
url: z2.string(),
|
|
126
|
+
context: z2.object({
|
|
127
|
+
auth: z2.literal("REQUEST_AUTH_TOKEN")
|
|
128
|
+
}).optional()
|
|
129
|
+
})
|
|
130
|
+
),
|
|
131
|
+
FEATURES: z2.object({ V2_EVENTS: z2.boolean().optional().default(true) }).optional().default({ V2_EVENTS: true })
|
|
132
|
+
});
|
|
133
|
+
var defineClientConfig = (config) => {
|
|
134
|
+
return ClientConfig.parse(config);
|
|
135
|
+
};
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|