@opencrvs/toolkit 2.0.0-rc.ff04b30 → 2.0.0-rc.ff99998
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/create-countryconfig/index.js +50 -20
- package/create-countryconfig/package.json +12 -2
- package/dist/application-config/index.js +243 -96
- package/dist/cli.js +9 -3
- package/dist/commons/api/router.d.ts +96 -19
- package/dist/commons/application-config/index.d.ts +1 -0
- package/dist/commons/conditionals/conditionals.d.ts +354 -4
- package/dist/commons/conditionals/validate.d.ts +51 -2
- package/dist/commons/events/ActionDocument.d.ts +6 -0
- package/dist/commons/events/ActionInput.d.ts +42 -36
- package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/EventDocument.d.ts +3 -0
- package/dist/commons/events/FieldConfig.d.ts +377 -50
- package/dist/commons/events/FieldValue.d.ts +6 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +5 -5
- package/dist/commons/events/field.d.ts +53 -1
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/state/flags.d.ts +16 -0
- package/dist/commons/events/state/utils.d.ts +12 -287
- package/dist/commons/events/utils.d.ts +12 -1
- package/dist/conditionals/index.js +52 -1
- package/dist/events/index.js +914 -192
- package/dist/migrations/v2.0/index.js +9 -3
- package/dist/notification/index.js +774 -118
- package/dist/scopes/index.d.ts +4 -6
- package/dist/scopes/index.js +9 -3
- package/opencrvs-toolkit-2.0.0-rc.ff99998.tgz +0 -0
- package/package.json +6 -2
- package/opencrvs-toolkit-2.0.0-rc.ff04b30.tgz +0 -0
|
@@ -2394,14 +2394,20 @@ var encodeScope = (scope) => {
|
|
|
2394
2394
|
encode: false
|
|
2395
2395
|
});
|
|
2396
2396
|
};
|
|
2397
|
-
var
|
|
2398
|
-
|
|
2397
|
+
var decodedScopeCache = /* @__PURE__ */ new Map();
|
|
2398
|
+
var decodeScope = (encodedScope) => {
|
|
2399
|
+
if (decodedScopeCache.has(encodedScope)) {
|
|
2400
|
+
return decodedScopeCache.get(encodedScope);
|
|
2401
|
+
}
|
|
2402
|
+
const scope = qs.parse(encodedScope, {
|
|
2399
2403
|
ignoreQueryPrefix: true,
|
|
2400
2404
|
comma: true,
|
|
2401
2405
|
allowDots: true
|
|
2402
2406
|
});
|
|
2403
2407
|
const unflattenedScope = unflattenScope(scope);
|
|
2404
|
-
|
|
2408
|
+
const result = Scope2.safeParse(unflattenedScope)?.data;
|
|
2409
|
+
decodedScopeCache.set(encodedScope, result);
|
|
2410
|
+
return result;
|
|
2405
2411
|
};
|
|
2406
2412
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2407
2413
|
placeOfEvent: JurisdictionFilter.enum.all,
|