@opencrvs/toolkit 1.9.12-rc.d350fab → 1.9.12-rc.d89c437
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 +5 -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 +124 -0
- package/dist/commons/api/router.d.ts +3369 -2255
- package/dist/commons/application-config/index.d.ts +87 -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 +288 -1238
- 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 +1345 -4495
- 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 +7 -91
- package/dist/commons/events/EventConfig.d.ts +35 -2250
- 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 +208 -1014
- 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 +2779 -12310
- package/dist/commons/events/FieldType.d.ts +25 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +289 -907
- package/dist/commons/events/FieldValue.d.ts +121 -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 +2008 -7597
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +2 -229
- 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 +413 -296
- package/dist/commons/notification/UserNotifications.d.ts +61 -637
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +294 -14
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +2736 -2098
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +2031 -1762
- package/dist/scopes/index.d.ts +623 -357
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +329 -301
- package/opencrvs-toolkit-1.9.12-rc.d89c437.tgz +0 -0
- package/package.json +11 -5
- 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,11 @@ 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
|
+
|
|
48
53
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
49
54
|
sed -i '' 's|@opencrvs/events/build/types|../commons/api|g' dist/api/index.d.ts
|
|
50
55
|
find dist -type f -exec sed -i '' 's|@opencrvs/commons|../commons|g' {} +
|
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,124 @@
|
|
|
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 z = __toESM(require("zod/v4"));
|
|
46
|
+
var TranslationConfig = z.object({
|
|
47
|
+
id: z.string().describe(
|
|
48
|
+
"The identifier of the translation referred in translation CSV files"
|
|
49
|
+
),
|
|
50
|
+
defaultMessage: z.string().describe("Default translation message"),
|
|
51
|
+
description: z.string().describe(
|
|
52
|
+
"Describe the translation for a translator to be able to identify it."
|
|
53
|
+
)
|
|
54
|
+
});
|
|
55
|
+
var SearchCriteria = z.enum([
|
|
56
|
+
"TRACKING_ID",
|
|
57
|
+
"REGISTRATION_NUMBER",
|
|
58
|
+
"NATIONAL_ID",
|
|
59
|
+
"NAME",
|
|
60
|
+
"PHONE_NUMBER",
|
|
61
|
+
"EMAIL"
|
|
62
|
+
]);
|
|
63
|
+
var ApplicationConfig = z.object({
|
|
64
|
+
APPLICATION_NAME: z.string(),
|
|
65
|
+
COUNTRY_LOGO: z.object({
|
|
66
|
+
fileName: z.string(),
|
|
67
|
+
file: z.string()
|
|
68
|
+
}),
|
|
69
|
+
SYSTEM_IANA_TIMEZONE: z.string(),
|
|
70
|
+
CURRENCY: z.object({
|
|
71
|
+
languagesAndCountry: z.array(z.string()),
|
|
72
|
+
isoCode: z.string()
|
|
73
|
+
}),
|
|
74
|
+
ADMIN_STRUCTURE: z.array(
|
|
75
|
+
z.object({
|
|
76
|
+
id: z.string(),
|
|
77
|
+
label: TranslationConfig
|
|
78
|
+
})
|
|
79
|
+
),
|
|
80
|
+
PHONE_NUMBER_PATTERN: z.string().or(z.instanceof(RegExp)),
|
|
81
|
+
USER_NOTIFICATION_DELIVERY_METHOD: z.string(),
|
|
82
|
+
INFORMANT_NOTIFICATION_DELIVERY_METHOD: z.string(),
|
|
83
|
+
SEARCH_DEFAULT_CRITERIA: SearchCriteria.optional().default("TRACKING_ID")
|
|
84
|
+
});
|
|
85
|
+
var defineApplicationConfig = (config) => {
|
|
86
|
+
return ApplicationConfig.parse(config);
|
|
87
|
+
};
|
|
88
|
+
var BackgroundConfig = z.object({
|
|
89
|
+
backgroundColor: z.string().optional(),
|
|
90
|
+
backgroundImage: z.string().optional(),
|
|
91
|
+
imageFit: z.string().optional()
|
|
92
|
+
}).refine(
|
|
93
|
+
(data) => !!(data.backgroundColor || data.backgroundImage),
|
|
94
|
+
"backgroundColor and backgroundImage cannot be empty at the same time"
|
|
95
|
+
);
|
|
96
|
+
var LoginConfig = z.object({
|
|
97
|
+
COUNTRY: z.string(),
|
|
98
|
+
LANGUAGES: z.array(z.string()),
|
|
99
|
+
USER_NOTIFICATION_DELIVERY_METHOD: z.string(),
|
|
100
|
+
INFORMANT_NOTIFICATION_DELIVERY_METHOD: z.string(),
|
|
101
|
+
PHONE_NUMBER_PATTERN: z.string().or(z.instanceof(RegExp)),
|
|
102
|
+
LOGIN_BACKGROUND: BackgroundConfig,
|
|
103
|
+
SENTRY: z.string()
|
|
104
|
+
});
|
|
105
|
+
var defineLoginConfig = (config) => {
|
|
106
|
+
return LoginConfig.parse(config);
|
|
107
|
+
};
|
|
108
|
+
var ClientConfig = z.object({
|
|
109
|
+
COUNTRY: z.string(),
|
|
110
|
+
LANGUAGES: z.array(z.string()),
|
|
111
|
+
SENTRY: z.string(),
|
|
112
|
+
REGISTER_BACKGROUND: BackgroundConfig,
|
|
113
|
+
DASHBOARDS: z.array(
|
|
114
|
+
z.object({
|
|
115
|
+
id: z.string(),
|
|
116
|
+
title: TranslationConfig,
|
|
117
|
+
url: z.string()
|
|
118
|
+
})
|
|
119
|
+
),
|
|
120
|
+
FEATURES: z.object({ V2_EVENTS: z.boolean().optional().default(true) }).optional().default({ V2_EVENTS: true })
|
|
121
|
+
});
|
|
122
|
+
var defineClientConfig = (config) => {
|
|
123
|
+
return ClientConfig.parse(config);
|
|
124
|
+
};
|