@opencrvs/toolkit 1.9.12-rc.7c8c97f → 1.9.12-rc.8353a87
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 +8 -0
- package/dist/application-config/index.js +47 -36
- 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 +24 -0
- package/dist/commons/application-config/index.d.ts +7 -12
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionDocument.d.ts +194 -194
- package/dist/commons/events/ActionInput.d.ts +113 -113
- package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/CountryConfigQueryInput.d.ts +295 -24
- package/dist/commons/events/Draft.d.ts +7 -7
- package/dist/commons/events/DynamicFieldValue.d.ts +37 -19
- package/dist/commons/events/EventDocument.d.ts +79 -79
- package/dist/commons/events/EventIndex.d.ts +20 -12
- package/dist/commons/events/EventInput.d.ts +1 -1
- package/dist/commons/events/EventMetadata.d.ts +12 -12
- package/dist/commons/events/FieldConfig.d.ts +129 -18
- package/dist/commons/events/FieldType.d.ts +2 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +94 -68
- package/dist/commons/events/FieldValue.d.ts +54 -26
- package/dist/commons/events/PlainDate.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +4 -4
- package/dist/commons/events/WorkqueueConfig.d.ts +270 -26
- package/dist/commons/events/defineConfig.d.ts +0 -4
- package/dist/commons/events/locations.d.ts +4 -4
- package/dist/commons/events/utils.d.ts +2 -174
- package/dist/conditionals/index.js +13 -5
- package/dist/events/index.js +142 -33
- 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.js +73 -23
- package/dist/scopes/index.d.ts +31 -10
- package/dist/scopes/index.js +17 -5
- package/opencrvs-toolkit-1.9.12-rc.8353a87.tgz +0 -0
- package/package.json +11 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-1.9.12-rc.7c8c97f.tgz +0 -0
package/build.sh
CHANGED
|
@@ -50,6 +50,10 @@ npx esbuild src/application-config/index.ts --bundle --format=cjs --outdir=./dis
|
|
|
50
50
|
mkdir -p ./dist/commons/application-config
|
|
51
51
|
cp -r ../commons/build/dist/common/application-config.d.ts ./dist/commons/application-config/index.d.ts
|
|
52
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
|
+
|
|
53
57
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
54
58
|
sed -i '' 's|@opencrvs/events/build/types|../commons/api|g' dist/api/index.d.ts
|
|
55
59
|
find dist -type f -exec sed -i '' 's|@opencrvs/commons|../commons|g' {} +
|
|
@@ -58,4 +62,8 @@ else
|
|
|
58
62
|
find dist -type f -exec sed -i 's|@opencrvs/commons|../commons|g' {} +
|
|
59
63
|
fi
|
|
60
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
|
+
|
|
61
69
|
echo "Build completed successfully."
|
|
@@ -42,6 +42,9 @@ __export(application_config_exports, {
|
|
|
42
42
|
module.exports = __toCommonJS(application_config_exports);
|
|
43
43
|
|
|
44
44
|
// ../commons/src/application-config.ts
|
|
45
|
+
var z2 = __toESM(require("zod/v4"));
|
|
46
|
+
|
|
47
|
+
// ../commons/src/events/TranslationConfig.ts
|
|
45
48
|
var z = __toESM(require("zod/v4"));
|
|
46
49
|
var TranslationConfig = z.object({
|
|
47
50
|
id: z.string().describe(
|
|
@@ -51,8 +54,13 @@ var TranslationConfig = z.object({
|
|
|
51
54
|
description: z.string().describe(
|
|
52
55
|
"Describe the translation for a translator to be able to identify it."
|
|
53
56
|
)
|
|
57
|
+
}).meta({
|
|
58
|
+
description: "Translation configuration",
|
|
59
|
+
id: "TranslationConfig"
|
|
54
60
|
});
|
|
55
|
-
|
|
61
|
+
|
|
62
|
+
// ../commons/src/application-config.ts
|
|
63
|
+
var SearchCriteria = z2.enum([
|
|
56
64
|
"TRACKING_ID",
|
|
57
65
|
"REGISTRATION_NUMBER",
|
|
58
66
|
"NATIONAL_ID",
|
|
@@ -60,64 +68,67 @@ var SearchCriteria = z.enum([
|
|
|
60
68
|
"PHONE_NUMBER",
|
|
61
69
|
"EMAIL"
|
|
62
70
|
]);
|
|
63
|
-
var ApplicationConfig =
|
|
64
|
-
APPLICATION_NAME:
|
|
65
|
-
COUNTRY_LOGO:
|
|
66
|
-
fileName:
|
|
67
|
-
file:
|
|
71
|
+
var ApplicationConfig = z2.object({
|
|
72
|
+
APPLICATION_NAME: z2.string(),
|
|
73
|
+
COUNTRY_LOGO: z2.object({
|
|
74
|
+
fileName: z2.string(),
|
|
75
|
+
file: z2.string()
|
|
68
76
|
}),
|
|
69
|
-
SYSTEM_IANA_TIMEZONE:
|
|
70
|
-
CURRENCY:
|
|
71
|
-
languagesAndCountry:
|
|
72
|
-
isoCode:
|
|
77
|
+
SYSTEM_IANA_TIMEZONE: z2.string(),
|
|
78
|
+
CURRENCY: z2.object({
|
|
79
|
+
languagesAndCountry: z2.array(z2.string()),
|
|
80
|
+
isoCode: z2.string()
|
|
73
81
|
}),
|
|
74
|
-
ADMIN_STRUCTURE:
|
|
75
|
-
|
|
76
|
-
id:
|
|
82
|
+
ADMIN_STRUCTURE: z2.array(
|
|
83
|
+
z2.object({
|
|
84
|
+
id: z2.string(),
|
|
77
85
|
label: TranslationConfig
|
|
78
86
|
})
|
|
79
87
|
),
|
|
80
|
-
PHONE_NUMBER_PATTERN:
|
|
81
|
-
USER_NOTIFICATION_DELIVERY_METHOD:
|
|
82
|
-
INFORMANT_NOTIFICATION_DELIVERY_METHOD:
|
|
88
|
+
PHONE_NUMBER_PATTERN: z2.string().or(z2.instanceof(RegExp)),
|
|
89
|
+
USER_NOTIFICATION_DELIVERY_METHOD: z2.string(),
|
|
90
|
+
INFORMANT_NOTIFICATION_DELIVERY_METHOD: z2.string(),
|
|
83
91
|
SEARCH_DEFAULT_CRITERIA: SearchCriteria.optional().default("TRACKING_ID")
|
|
84
92
|
});
|
|
85
93
|
var defineApplicationConfig = (config) => {
|
|
86
94
|
return ApplicationConfig.parse(config);
|
|
87
95
|
};
|
|
88
|
-
var BackgroundConfig =
|
|
89
|
-
backgroundColor:
|
|
90
|
-
backgroundImage:
|
|
91
|
-
imageFit:
|
|
96
|
+
var BackgroundConfig = z2.object({
|
|
97
|
+
backgroundColor: z2.string().optional(),
|
|
98
|
+
backgroundImage: z2.string().optional(),
|
|
99
|
+
imageFit: z2.string().optional()
|
|
92
100
|
}).refine(
|
|
93
101
|
(data) => !!(data.backgroundColor || data.backgroundImage),
|
|
94
102
|
"backgroundColor and backgroundImage cannot be empty at the same time"
|
|
95
103
|
);
|
|
96
|
-
var LoginConfig =
|
|
97
|
-
COUNTRY:
|
|
98
|
-
LANGUAGES:
|
|
99
|
-
USER_NOTIFICATION_DELIVERY_METHOD:
|
|
100
|
-
INFORMANT_NOTIFICATION_DELIVERY_METHOD:
|
|
101
|
-
PHONE_NUMBER_PATTERN:
|
|
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)),
|
|
102
110
|
LOGIN_BACKGROUND: BackgroundConfig,
|
|
103
|
-
SENTRY:
|
|
111
|
+
SENTRY: z2.string().optional()
|
|
104
112
|
});
|
|
105
113
|
var defineLoginConfig = (config) => {
|
|
106
114
|
return LoginConfig.parse(config);
|
|
107
115
|
};
|
|
108
|
-
var ClientConfig =
|
|
109
|
-
COUNTRY:
|
|
110
|
-
LANGUAGES:
|
|
111
|
-
SENTRY:
|
|
116
|
+
var ClientConfig = z2.object({
|
|
117
|
+
COUNTRY: z2.string(),
|
|
118
|
+
LANGUAGES: z2.array(z2.string()),
|
|
119
|
+
SENTRY: z2.string().optional(),
|
|
112
120
|
REGISTER_BACKGROUND: BackgroundConfig,
|
|
113
|
-
DASHBOARDS:
|
|
114
|
-
|
|
115
|
-
id:
|
|
121
|
+
DASHBOARDS: z2.array(
|
|
122
|
+
z2.object({
|
|
123
|
+
id: z2.string(),
|
|
116
124
|
title: TranslationConfig,
|
|
117
|
-
url:
|
|
125
|
+
url: z2.string(),
|
|
126
|
+
context: z2.object({
|
|
127
|
+
auth: z2.literal("REQUEST_AUTH_TOKEN")
|
|
128
|
+
}).optional()
|
|
118
129
|
})
|
|
119
130
|
),
|
|
120
|
-
FEATURES:
|
|
131
|
+
FEATURES: z2.object({ V2_EVENTS: z2.boolean().optional().default(true) }).optional().default({ V2_EVENTS: true })
|
|
121
132
|
});
|
|
122
133
|
var defineClientConfig = (config) => {
|
|
123
134
|
return ClientConfig.parse(config);
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|