@nexalink/carecompass-sdk 0.6.0 → 0.7.0
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/README.md +380 -4
- package/dist/adapters.d.ts +54 -0
- package/dist/adapters.js +53 -0
- package/dist/client.d.ts +117 -1
- package/dist/client.js +218 -2
- package/dist/coding-element.d.ts +22 -0
- package/dist/coding-element.js +475 -0
- package/dist/coding-ui.d.ts +62 -0
- package/dist/coding-ui.js +358 -0
- package/dist/coding.d.ts +188 -0
- package/dist/coding.js +590 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +6 -0
- package/dist/rcm.d.ts +5 -16
- package/dist/rcm.js +58 -53
- package/dist/telemetry.d.ts +11 -0
- package/dist/telemetry.js +19 -2
- package/dist/ui.d.ts +4 -0
- package/dist/ui.js +2 -0
- package/dist/version.js +1 -1
- package/node_modules/@nexalink/coding-contracts/LICENSE +23 -0
- package/node_modules/@nexalink/coding-contracts/README.md +200 -0
- package/node_modules/@nexalink/coding-contracts/dist/cjs/index.cjs +6179 -0
- package/node_modules/@nexalink/coding-contracts/dist/index.d.ts +1338 -0
- package/node_modules/@nexalink/coding-contracts/dist/index.js +6135 -0
- package/node_modules/@nexalink/coding-contracts/package.json +60 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-batch.schema.json +63 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-case-clinical.schema.json +428 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-case-context.schema.json +128 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-case-payer.schema.json +126 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-case.schema.json +97 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-decision-line.schema.json +172 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-decision.schema.json +430 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-evidence.schema.json +100 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-extension.schema.json +36 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-reviewer-action.schema.json +64 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-rule-result.schema.json +90 -0
- package/node_modules/@nexalink/coding-contracts/schemas/coding-service-line.schema.json +120 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-coding-input.schema.json +82 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-coding-output.schema.json +146 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-model-prompt.schema.json +91 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-retrieval-metadata.schema.json +61 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-reviewer-event.schema.json +92 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-runtime-event.schema.json +170 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-supporting-reference.schema.json +81 -0
- package/node_modules/@nexalink/coding-contracts/schemas/rcm-workflow-catalog.schema.json +180 -0
- package/node_modules/@nexalink/coding-contracts/versions.json +107 -0
- package/node_modules/@nexalink/coding-contracts/workflow-constants.json +11 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +191 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +52 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1823 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +153 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +455 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +190 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
- package/node_modules/zod/src/v4/core/util.ts +983 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +123 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +132 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +52 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +41 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +16 -0
- package/node_modules/zod/v4/classic/external.d.ts +16 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
- package/node_modules/zod/v4/classic/schemas.js +1395 -0
- package/node_modules/zod/v4/core/api.cjs +1227 -0
- package/node_modules/zod/v4/core/api.d.cts +325 -0
- package/node_modules/zod/v4/core/api.d.ts +325 -0
- package/node_modules/zod/v4/core/api.js +1087 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +85 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +78 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +216 -0
- package/node_modules/zod/v4/core/errors.d.cts +221 -0
- package/node_modules/zod/v4/core/errors.d.ts +221 -0
- package/node_modules/zod/v4/core/errors.js +185 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +172 -0
- package/node_modules/zod/v4/core/regexes.d.cts +85 -0
- package/node_modules/zod/v4/core/regexes.d.ts +85 -0
- package/node_modules/zod/v4/core/regexes.js +139 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2270 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
- package/node_modules/zod/v4/core/schemas.js +2239 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +448 -0
- package/node_modules/zod/v4/core/util.cjs +734 -0
- package/node_modules/zod/v4/core/util.d.cts +200 -0
- package/node_modules/zod/v4/core/util.d.ts +200 -0
- package/node_modules/zod/v4/core/util.js +674 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +140 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +113 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +152 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +125 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +111 -0
- package/node_modules/zod/v4/locales/index.d.cts +52 -0
- package/node_modules/zod/v4/locales/index.d.ts +52 -0
- package/node_modules/zod/v4/locales/index.js +52 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +13 -0
- package/node_modules/zod/v4/mini/external.d.ts +13 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
- package/node_modules/zod/v4/mini/schemas.js +961 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +32 -5
- package/qa-fixtures/DEMO-ENC-1042-rcm-policy.md +16 -11
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { CARECOMPASS_CODING_DECISION_LABELS, createCodingFlow, decisionConflicts, decisionGaps, decisionPrimaryState, decisionRequiresHumanReview, } from "./coding.js";
|
|
2
|
+
import { validateCareCompassConfig } from "./schema.js";
|
|
3
|
+
export const CARECOMPASS_CODING_REVIEW_ELEMENT_TAG = "carecompass-coding-review";
|
|
4
|
+
/**
|
|
5
|
+
* Register a framework-neutral coding-review embed backed by the headless
|
|
6
|
+
* coding flow. Deferring the HTMLElement subclass creation keeps this entry
|
|
7
|
+
* point safe to import during server rendering.
|
|
8
|
+
*/
|
|
9
|
+
export function defineCodingReviewElement(tagName = CARECOMPASS_CODING_REVIEW_ELEMENT_TAG) {
|
|
10
|
+
if (typeof customElements === "undefined" ||
|
|
11
|
+
typeof HTMLElement === "undefined") {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const existing = customElements.get(tagName);
|
|
15
|
+
if (existing)
|
|
16
|
+
return existing;
|
|
17
|
+
class CodingReviewElement extends HTMLElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.draft = "";
|
|
21
|
+
this.hasPropertyConfig = false;
|
|
22
|
+
this.cancelledDispatched = false;
|
|
23
|
+
}
|
|
24
|
+
static get observedAttributes() {
|
|
25
|
+
return ["config"];
|
|
26
|
+
}
|
|
27
|
+
get config() {
|
|
28
|
+
return this.configValue;
|
|
29
|
+
}
|
|
30
|
+
set config(value) {
|
|
31
|
+
this.hasPropertyConfig = true;
|
|
32
|
+
this.configValue = value;
|
|
33
|
+
this.remount();
|
|
34
|
+
}
|
|
35
|
+
get initialCase() {
|
|
36
|
+
return this.initialCaseValue;
|
|
37
|
+
}
|
|
38
|
+
set initialCase(value) {
|
|
39
|
+
this.initialCaseValue = value;
|
|
40
|
+
this.remount();
|
|
41
|
+
}
|
|
42
|
+
get packId() {
|
|
43
|
+
return this.packIdValue;
|
|
44
|
+
}
|
|
45
|
+
set packId(value) {
|
|
46
|
+
this.packIdValue = value;
|
|
47
|
+
this.remount();
|
|
48
|
+
}
|
|
49
|
+
get reviewerId() {
|
|
50
|
+
return this.reviewerIdValue;
|
|
51
|
+
}
|
|
52
|
+
set reviewerId(value) {
|
|
53
|
+
this.reviewerIdValue = value;
|
|
54
|
+
this.remount();
|
|
55
|
+
}
|
|
56
|
+
get reviewerRole() {
|
|
57
|
+
return this.reviewerRoleValue;
|
|
58
|
+
}
|
|
59
|
+
set reviewerRole(value) {
|
|
60
|
+
this.reviewerRoleValue = value;
|
|
61
|
+
this.remount();
|
|
62
|
+
}
|
|
63
|
+
get runtimeTokenProvider() {
|
|
64
|
+
return this.runtimeTokenProviderValue;
|
|
65
|
+
}
|
|
66
|
+
get reviewerAuthProvider() {
|
|
67
|
+
return this.reviewerAuthProviderValue;
|
|
68
|
+
}
|
|
69
|
+
set reviewerAuthProvider(value) {
|
|
70
|
+
this.reviewerAuthProviderValue = value;
|
|
71
|
+
this.remount();
|
|
72
|
+
}
|
|
73
|
+
set runtimeTokenProvider(value) {
|
|
74
|
+
this.runtimeTokenProviderValue = value;
|
|
75
|
+
this.remount();
|
|
76
|
+
}
|
|
77
|
+
connectedCallback() {
|
|
78
|
+
this.remount();
|
|
79
|
+
}
|
|
80
|
+
disconnectedCallback() {
|
|
81
|
+
this.unmount();
|
|
82
|
+
}
|
|
83
|
+
attributeChangedCallback(name, _oldValue, value) {
|
|
84
|
+
if (name !== "config" || this.hasPropertyConfig)
|
|
85
|
+
return;
|
|
86
|
+
if (value === null) {
|
|
87
|
+
this.configValue = undefined;
|
|
88
|
+
this.remount();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
try {
|
|
92
|
+
this.configValue = JSON.parse(value);
|
|
93
|
+
this.remount();
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
this.reportConfigurationError();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
unmount() {
|
|
100
|
+
this.unsubscribe?.();
|
|
101
|
+
this.unsubscribe = undefined;
|
|
102
|
+
this.core?.dispose();
|
|
103
|
+
this.core = undefined;
|
|
104
|
+
this.replaceChildren();
|
|
105
|
+
}
|
|
106
|
+
remount() {
|
|
107
|
+
this.unmount();
|
|
108
|
+
this.lastDecisionId = undefined;
|
|
109
|
+
this.lastErrorKey = undefined;
|
|
110
|
+
this.cancelledDispatched = false;
|
|
111
|
+
if (!this.isConnected || !this.configValue)
|
|
112
|
+
return;
|
|
113
|
+
const validation = validateCareCompassConfig(this.configValue);
|
|
114
|
+
if (!validation.ok) {
|
|
115
|
+
this.reportConfigurationError();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this.core = createCodingFlow(validation.config, {
|
|
119
|
+
onAuditEvent: (event) => this.dispatchMetadataEvent("carecompass-audit", event),
|
|
120
|
+
onSafetyEvent: (event) => this.dispatchMetadataEvent("carecompass-safety", event),
|
|
121
|
+
runtimeTokenProvider: this.runtimeTokenProviderValue,
|
|
122
|
+
reviewerAuthProvider: this.reviewerAuthProviderValue,
|
|
123
|
+
});
|
|
124
|
+
this.unsubscribe = this.core.subscribe((snapshot) => this.renderSnapshot(validation.config, snapshot));
|
|
125
|
+
this.renderSnapshot(validation.config, this.core.getSnapshot());
|
|
126
|
+
}
|
|
127
|
+
dispatchMetadataEvent(name, event) {
|
|
128
|
+
// Core audit and safety records intentionally contain metadata only;
|
|
129
|
+
// never interpolate case content into DOM events.
|
|
130
|
+
this.dispatchEvent(new CustomEvent(name, {
|
|
131
|
+
bubbles: true,
|
|
132
|
+
detail: event,
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
renderSnapshot(config, snapshot) {
|
|
136
|
+
const section = document.createElement("section");
|
|
137
|
+
section.setAttribute("aria-label", `${config.labels.title} coding review`);
|
|
138
|
+
Object.assign(section.style, {
|
|
139
|
+
background: config.theme.backgroundColor,
|
|
140
|
+
border: `1px solid ${config.theme.primaryColor}`,
|
|
141
|
+
borderRadius: config.theme.borderRadius,
|
|
142
|
+
color: config.theme.textColor,
|
|
143
|
+
fontFamily: config.theme.fontFamily,
|
|
144
|
+
maxWidth: "720px",
|
|
145
|
+
padding: "20px",
|
|
146
|
+
});
|
|
147
|
+
const header = document.createElement("header");
|
|
148
|
+
const brand = document.createElement("strong");
|
|
149
|
+
brand.textContent = config.branding.displayName;
|
|
150
|
+
header.append(brand);
|
|
151
|
+
if (snapshot.packId) {
|
|
152
|
+
const pack = document.createElement("span");
|
|
153
|
+
pack.textContent = ` · ${snapshot.packId}`;
|
|
154
|
+
pack.style.fontSize = "12px";
|
|
155
|
+
pack.style.opacity = "0.72";
|
|
156
|
+
header.append(pack);
|
|
157
|
+
}
|
|
158
|
+
section.append(header);
|
|
159
|
+
const showSubmission = this.initialCaseValue !== undefined &&
|
|
160
|
+
snapshot.phase !== "submitting" &&
|
|
161
|
+
snapshot.phase !== "polling";
|
|
162
|
+
if (showSubmission) {
|
|
163
|
+
const submit = document.createElement("button");
|
|
164
|
+
submit.textContent = CARECOMPASS_CODING_DECISION_LABELS.prepare;
|
|
165
|
+
submit.type = "button";
|
|
166
|
+
submit.disabled = snapshot.loading;
|
|
167
|
+
Object.assign(submit.style, {
|
|
168
|
+
background: config.theme.primaryColor,
|
|
169
|
+
color: "#ffffff",
|
|
170
|
+
border: "0",
|
|
171
|
+
borderRadius: "6px",
|
|
172
|
+
padding: "8px 12px",
|
|
173
|
+
});
|
|
174
|
+
submit.addEventListener("click", () => void this.submit());
|
|
175
|
+
section.append(submit);
|
|
176
|
+
}
|
|
177
|
+
if (snapshot.loading) {
|
|
178
|
+
const status = document.createElement("p");
|
|
179
|
+
status.setAttribute("role", "status");
|
|
180
|
+
status.setAttribute("aria-live", "polite");
|
|
181
|
+
status.textContent = "Preparing coding review…";
|
|
182
|
+
if (snapshot.cancelable) {
|
|
183
|
+
const cancel = document.createElement("button");
|
|
184
|
+
cancel.textContent = CARECOMPASS_CODING_DECISION_LABELS.cancel;
|
|
185
|
+
cancel.type = "button";
|
|
186
|
+
cancel.style.marginLeft = "8px";
|
|
187
|
+
cancel.style.fontSize = "12px";
|
|
188
|
+
cancel.addEventListener("click", () => void this.cancel());
|
|
189
|
+
status.append(cancel);
|
|
190
|
+
}
|
|
191
|
+
section.append(status);
|
|
192
|
+
}
|
|
193
|
+
if (snapshot.error) {
|
|
194
|
+
const error = document.createElement("p");
|
|
195
|
+
error.setAttribute("role", "alert");
|
|
196
|
+
error.textContent = snapshot.error.message;
|
|
197
|
+
error.style.color = "#b91c1c";
|
|
198
|
+
error.style.fontSize = "13px";
|
|
199
|
+
section.append(error);
|
|
200
|
+
if (snapshot.canRetry) {
|
|
201
|
+
const retry = document.createElement("button");
|
|
202
|
+
retry.textContent = CARECOMPASS_CODING_DECISION_LABELS.retry;
|
|
203
|
+
retry.type = "button";
|
|
204
|
+
retry.style.fontSize = "12px";
|
|
205
|
+
retry.addEventListener("click", () => void this.retry());
|
|
206
|
+
section.append(retry);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (snapshot.phase === "cancelled") {
|
|
210
|
+
const cancelled = document.createElement("p");
|
|
211
|
+
cancelled.setAttribute("role", "status");
|
|
212
|
+
cancelled.textContent = CARECOMPASS_CODING_DECISION_LABELS.cancelled;
|
|
213
|
+
section.append(cancelled);
|
|
214
|
+
}
|
|
215
|
+
if (snapshot.decision) {
|
|
216
|
+
const decision = snapshot.decision;
|
|
217
|
+
const result = document.createElement("div");
|
|
218
|
+
result.setAttribute("aria-live", "polite");
|
|
219
|
+
result.setAttribute("role", "region");
|
|
220
|
+
result.setAttribute("aria-label", "Coding decision result");
|
|
221
|
+
const boundary = document.createElement("p");
|
|
222
|
+
boundary.setAttribute("role", "alert");
|
|
223
|
+
boundary.textContent = decisionRequiresHumanReview(decision)
|
|
224
|
+
? CARECOMPASS_CODING_DECISION_LABELS.humanReviewRequired
|
|
225
|
+
: decisionPrimaryState(decision);
|
|
226
|
+
result.append(boundary);
|
|
227
|
+
const rationale = document.createElement("p");
|
|
228
|
+
rationale.textContent = decision.rationale;
|
|
229
|
+
result.append(rationale);
|
|
230
|
+
if (decision.lineDecisions.length > 0) {
|
|
231
|
+
const lines = document.createElement("section");
|
|
232
|
+
const heading = document.createElement("h3");
|
|
233
|
+
heading.textContent = "Line decisions";
|
|
234
|
+
const list = document.createElement("ul");
|
|
235
|
+
for (const line of decision.lineDecisions) {
|
|
236
|
+
const item = document.createElement("li");
|
|
237
|
+
item.textContent = line.rationale;
|
|
238
|
+
const strong = document.createElement("strong");
|
|
239
|
+
strong.textContent = defaultLineLabel(line);
|
|
240
|
+
item.prepend(strong, document.createTextNode(" — "));
|
|
241
|
+
list.append(item);
|
|
242
|
+
}
|
|
243
|
+
lines.append(heading, list);
|
|
244
|
+
result.append(lines);
|
|
245
|
+
}
|
|
246
|
+
const gaps = decisionGaps(decision);
|
|
247
|
+
if (gaps.length > 0) {
|
|
248
|
+
const gapSection = document.createElement("section");
|
|
249
|
+
const heading = document.createElement("h3");
|
|
250
|
+
heading.textContent = "Gaps";
|
|
251
|
+
const list = document.createElement("ul");
|
|
252
|
+
for (const gap of gaps) {
|
|
253
|
+
const item = document.createElement("li");
|
|
254
|
+
const strong = document.createElement("strong");
|
|
255
|
+
strong.textContent = gap.type;
|
|
256
|
+
item.append(strong, document.createTextNode(` (${gap.severity}) — ${gap.description}`));
|
|
257
|
+
list.append(item);
|
|
258
|
+
}
|
|
259
|
+
gapSection.append(heading, list);
|
|
260
|
+
result.append(gapSection);
|
|
261
|
+
}
|
|
262
|
+
const conflicts = decisionConflicts(decision);
|
|
263
|
+
if (conflicts.length > 0) {
|
|
264
|
+
const conflictSection = document.createElement("section");
|
|
265
|
+
const heading = document.createElement("h3");
|
|
266
|
+
heading.textContent = "Conflicts";
|
|
267
|
+
const list = document.createElement("ul");
|
|
268
|
+
for (const conflict of conflicts) {
|
|
269
|
+
const item = document.createElement("li");
|
|
270
|
+
const strong = document.createElement("strong");
|
|
271
|
+
strong.textContent = conflict.type;
|
|
272
|
+
item.append(strong, document.createTextNode(` — ${conflict.summary}`));
|
|
273
|
+
list.append(item);
|
|
274
|
+
}
|
|
275
|
+
conflictSection.append(heading, list);
|
|
276
|
+
result.append(conflictSection);
|
|
277
|
+
}
|
|
278
|
+
if (decision.evidenceItems?.length) {
|
|
279
|
+
const evidenceSection = document.createElement("section");
|
|
280
|
+
evidenceSection.setAttribute("aria-label", "Supporting evidence");
|
|
281
|
+
const heading = document.createElement("h3");
|
|
282
|
+
heading.textContent = "Supporting evidence";
|
|
283
|
+
const list = document.createElement("ul");
|
|
284
|
+
for (const evidence of decision.evidenceItems) {
|
|
285
|
+
const item = document.createElement("li");
|
|
286
|
+
const strong = document.createElement("strong");
|
|
287
|
+
strong.textContent = `${evidence.source}${evidence.sourceVersion
|
|
288
|
+
? ` (version ${evidence.sourceVersion})`
|
|
289
|
+
: ""}`;
|
|
290
|
+
item.append(strong, document.createTextNode(` — ${evidence.excerpt}`));
|
|
291
|
+
list.append(item);
|
|
292
|
+
}
|
|
293
|
+
evidenceSection.append(heading, list);
|
|
294
|
+
result.append(evidenceSection);
|
|
295
|
+
}
|
|
296
|
+
const reviewerForm = document.createElement("form");
|
|
297
|
+
const fieldset = document.createElement("fieldset");
|
|
298
|
+
fieldset.disabled = !this.reviewerIdValue;
|
|
299
|
+
const legend = document.createElement("legend");
|
|
300
|
+
legend.textContent = "Record reviewer action";
|
|
301
|
+
const actionLabel = document.createElement("label");
|
|
302
|
+
actionLabel.textContent = "Action ";
|
|
303
|
+
const action = document.createElement("select");
|
|
304
|
+
action.setAttribute("aria-label", "Reviewer action");
|
|
305
|
+
for (const [value, label] of [
|
|
306
|
+
["", "Select…"],
|
|
307
|
+
["approved", "Approved"],
|
|
308
|
+
["rejected", "Rejected"],
|
|
309
|
+
["escalated", "Escalated"],
|
|
310
|
+
]) {
|
|
311
|
+
const option = document.createElement("option");
|
|
312
|
+
option.value = value;
|
|
313
|
+
option.textContent = label;
|
|
314
|
+
option.disabled = value === "";
|
|
315
|
+
option.selected = value === "";
|
|
316
|
+
action.append(option);
|
|
317
|
+
}
|
|
318
|
+
actionLabel.append(action);
|
|
319
|
+
const notesLabel = document.createElement("label");
|
|
320
|
+
notesLabel.textContent = "Notes ";
|
|
321
|
+
const notes = document.createElement("textarea");
|
|
322
|
+
notes.setAttribute("aria-label", "Reviewer notes");
|
|
323
|
+
notes.rows = 2;
|
|
324
|
+
notesLabel.append(notes);
|
|
325
|
+
const record = document.createElement("button");
|
|
326
|
+
record.type = "submit";
|
|
327
|
+
record.disabled = true;
|
|
328
|
+
record.textContent = CARECOMPASS_CODING_DECISION_LABELS.recordAction;
|
|
329
|
+
const recordStatus = document.createElement("p");
|
|
330
|
+
recordStatus.setAttribute("aria-live", "polite");
|
|
331
|
+
recordStatus.style.fontSize = "12px";
|
|
332
|
+
action.addEventListener("change", () => {
|
|
333
|
+
record.disabled = action.value === "";
|
|
334
|
+
});
|
|
335
|
+
reviewerForm.addEventListener("submit", (event) => {
|
|
336
|
+
event.preventDefault();
|
|
337
|
+
const reviewerId = this.reviewerIdValue;
|
|
338
|
+
if (!action.value || !reviewerId)
|
|
339
|
+
return;
|
|
340
|
+
fieldset.disabled = true;
|
|
341
|
+
record.textContent = "Recording…";
|
|
342
|
+
const reviewerAction = {
|
|
343
|
+
reviewerId,
|
|
344
|
+
...(this.reviewerRoleValue
|
|
345
|
+
? { reviewerRole: this.reviewerRoleValue }
|
|
346
|
+
: {}),
|
|
347
|
+
action: action.value,
|
|
348
|
+
...(notes.value.trim() ? { notes: notes.value.trim() } : {}),
|
|
349
|
+
occurredAt: new Date().toISOString(),
|
|
350
|
+
};
|
|
351
|
+
void this.core
|
|
352
|
+
?.recordReviewerAction(decision.decisionId, reviewerAction)
|
|
353
|
+
.then((recorded) => {
|
|
354
|
+
recordStatus.setAttribute("role", "status");
|
|
355
|
+
recordStatus.textContent = `${CARECOMPASS_CODING_DECISION_LABELS.actionRecorded} ${new Date().toISOString()}.`;
|
|
356
|
+
this.dispatchMetadataEvent("carecompass-reviewer-action", recorded);
|
|
357
|
+
})
|
|
358
|
+
.catch((caught) => {
|
|
359
|
+
const flowError = {
|
|
360
|
+
code: "reviewer_action_failed",
|
|
361
|
+
message: caught instanceof Error
|
|
362
|
+
? caught.message
|
|
363
|
+
: "The reviewer action could not be recorded.",
|
|
364
|
+
};
|
|
365
|
+
recordStatus.setAttribute("role", "alert");
|
|
366
|
+
recordStatus.textContent = flowError.message;
|
|
367
|
+
this.dispatchMetadataEvent("carecompass-error", flowError);
|
|
368
|
+
})
|
|
369
|
+
.finally(() => {
|
|
370
|
+
fieldset.disabled = !this.reviewerIdValue;
|
|
371
|
+
record.textContent =
|
|
372
|
+
CARECOMPASS_CODING_DECISION_LABELS.recordAction;
|
|
373
|
+
});
|
|
374
|
+
});
|
|
375
|
+
fieldset.append(legend, actionLabel, notesLabel, record);
|
|
376
|
+
if (!this.reviewerIdValue) {
|
|
377
|
+
const identityRequired = document.createElement("p");
|
|
378
|
+
identityRequired.setAttribute("role", "note");
|
|
379
|
+
identityRequired.textContent =
|
|
380
|
+
"A reviewer ID is required to record an action.";
|
|
381
|
+
reviewerForm.append(identityRequired);
|
|
382
|
+
}
|
|
383
|
+
reviewerForm.append(fieldset, recordStatus);
|
|
384
|
+
result.append(reviewerForm);
|
|
385
|
+
section.append(result);
|
|
386
|
+
}
|
|
387
|
+
this.replaceChildren(section);
|
|
388
|
+
this.dispatchTerminalEvents(snapshot);
|
|
389
|
+
}
|
|
390
|
+
dispatchTerminalEvents(snapshot) {
|
|
391
|
+
if (snapshot.error) {
|
|
392
|
+
const errorKey = `${snapshot.error.code}:${snapshot.error.message}`;
|
|
393
|
+
if (errorKey !== this.lastErrorKey) {
|
|
394
|
+
this.lastErrorKey = errorKey;
|
|
395
|
+
this.dispatchMetadataEvent("carecompass-error", snapshot.error);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
this.lastErrorKey = undefined;
|
|
400
|
+
}
|
|
401
|
+
if (snapshot.phase === "cancelled") {
|
|
402
|
+
if (!this.cancelledDispatched) {
|
|
403
|
+
this.cancelledDispatched = true;
|
|
404
|
+
this.dispatchMetadataEvent("carecompass-cancelled", {
|
|
405
|
+
packId: snapshot.packId,
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
this.cancelledDispatched = false;
|
|
411
|
+
}
|
|
412
|
+
if (snapshot.decision) {
|
|
413
|
+
if (snapshot.decision.decisionId !== this.lastDecisionId) {
|
|
414
|
+
this.lastDecisionId = snapshot.decision.decisionId;
|
|
415
|
+
this.dispatchMetadataEvent("carecompass-decision", snapshot.decision);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
this.lastDecisionId = undefined;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
async submit() {
|
|
423
|
+
if (!this.core || !this.packIdValue || !this.initialCaseValue)
|
|
424
|
+
return;
|
|
425
|
+
try {
|
|
426
|
+
await this.core.submit(this.packIdValue, this.initialCaseValue);
|
|
427
|
+
}
|
|
428
|
+
catch {
|
|
429
|
+
// The snapshot already carries the safe, user-visible error state.
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
async cancel() {
|
|
433
|
+
if (!this.core)
|
|
434
|
+
return;
|
|
435
|
+
try {
|
|
436
|
+
await this.core.cancel();
|
|
437
|
+
}
|
|
438
|
+
catch {
|
|
439
|
+
// The snapshot already carries the safe cancellation state.
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
async retry() {
|
|
443
|
+
if (!this.core)
|
|
444
|
+
return;
|
|
445
|
+
try {
|
|
446
|
+
await this.core.retryLast();
|
|
447
|
+
}
|
|
448
|
+
catch {
|
|
449
|
+
// The snapshot already carries the safe failure state.
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
reportConfigurationError() {
|
|
453
|
+
this.dispatchEvent(new CustomEvent("carecompass-error", {
|
|
454
|
+
bubbles: true,
|
|
455
|
+
detail: { code: "configuration_invalid" },
|
|
456
|
+
}));
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
customElements.define(tagName, CodingReviewElement);
|
|
460
|
+
return CodingReviewElement;
|
|
461
|
+
}
|
|
462
|
+
function defaultLineLabel(line) {
|
|
463
|
+
const unitPart = line.units?.count !== undefined
|
|
464
|
+
? ` x${line.units.count}${line.units.unitOfMeasure ? ` ${line.units.unitOfMeasure}` : ""}`
|
|
465
|
+
: "";
|
|
466
|
+
return [
|
|
467
|
+
line.action,
|
|
468
|
+
line.code.codeSystem,
|
|
469
|
+
line.code.code,
|
|
470
|
+
line.modifiers?.length ? ` (${line.modifiers.join(", ")})` : "",
|
|
471
|
+
unitPart,
|
|
472
|
+
]
|
|
473
|
+
.filter(Boolean)
|
|
474
|
+
.join(" ");
|
|
475
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CodingCase, CodingDecision, CodingReviewerAction } from "@nexalink/coding-contracts";
|
|
3
|
+
import { type CodingDecisionLabels, type CodingFlow, type CodingFlowOptions, type CodingFlowSnapshot, type TypedCodingGap } from "./coding.js";
|
|
4
|
+
import type { CareCompassAuditListener, CareCompassSafetyListener } from "./compliance.js";
|
|
5
|
+
import type { CareCompassReviewerAuthProvider, CareCompassRuntimeTokenProvider } from "./client.js";
|
|
6
|
+
import type { CareCompassConfig } from "./schema.js";
|
|
7
|
+
export type CodingDecisionLine = NonNullable<CodingDecision["lineDecisions"]>[number];
|
|
8
|
+
export type CodingReviewRenderProps = {
|
|
9
|
+
renderDecision?: (decision: CodingDecision, content: React.ReactNode) => React.ReactNode;
|
|
10
|
+
renderLineDecision?: (line: CodingDecisionLine) => React.ReactNode;
|
|
11
|
+
renderGap?: (gap: TypedCodingGap) => React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export type EvidenceEngagementAction = "opened" | "copied";
|
|
14
|
+
export type CodingReviewProps = {
|
|
15
|
+
config: CareCompassConfig;
|
|
16
|
+
flow?: CodingFlow;
|
|
17
|
+
initialCase?: CodingCase;
|
|
18
|
+
labels?: Partial<CodingDecisionLabels>;
|
|
19
|
+
onAuditEvent?: CareCompassAuditListener;
|
|
20
|
+
onCodingDecision?: (decision: CodingDecision) => void;
|
|
21
|
+
onSafetyEvent?: CareCompassSafetyListener;
|
|
22
|
+
packId?: string;
|
|
23
|
+
pollIntervalMs?: number;
|
|
24
|
+
reviewerId?: string;
|
|
25
|
+
reviewerRole?: string;
|
|
26
|
+
reviewerAuthProvider?: CareCompassReviewerAuthProvider;
|
|
27
|
+
runtimeTokenProvider?: CareCompassRuntimeTokenProvider;
|
|
28
|
+
} & CodingReviewRenderProps;
|
|
29
|
+
export declare function CareCompassCodingReviewContent({ config, flow, initialCase, labels: labelsOverride, onCodingDecision, packId, renderDecision, renderGap, renderLineDecision, reviewerId, reviewerRole, snapshot, }: {
|
|
30
|
+
config: CareCompassConfig;
|
|
31
|
+
flow: CodingFlow;
|
|
32
|
+
initialCase?: CodingCase;
|
|
33
|
+
labels?: Partial<CodingDecisionLabels>;
|
|
34
|
+
onCodingDecision?: (decision: CodingDecision) => void;
|
|
35
|
+
packId?: string;
|
|
36
|
+
reviewerId?: string;
|
|
37
|
+
reviewerRole?: string;
|
|
38
|
+
snapshot: CodingFlowSnapshot;
|
|
39
|
+
} & CodingReviewRenderProps): React.JSX.Element;
|
|
40
|
+
export declare function CodingReview({ config, flow: flowProp, initialCase, labels, onAuditEvent, onCodingDecision, onSafetyEvent, packId, pollIntervalMs, renderDecision, renderGap, renderLineDecision, reviewerId, reviewerRole, reviewerAuthProvider, runtimeTokenProvider, }: CodingReviewProps): React.JSX.Element | null;
|
|
41
|
+
export type UseCodingReviewResult = {
|
|
42
|
+
cancel: () => Promise<CodingFlowSnapshot>;
|
|
43
|
+
flow: CodingFlow;
|
|
44
|
+
recordReviewerAction: (decisionId: string, action: CodingReviewerAction) => Promise<{
|
|
45
|
+
recorded: true;
|
|
46
|
+
reviewerAction: Record<string, unknown>;
|
|
47
|
+
}>;
|
|
48
|
+
retryLast: () => Promise<CodingFlowSnapshot>;
|
|
49
|
+
snapshot: CodingFlowSnapshot;
|
|
50
|
+
submit: (packId: string, codingCase: CodingCase) => Promise<CodingFlowSnapshot>;
|
|
51
|
+
};
|
|
52
|
+
/** React adapter for the headless coding flow. Renders nothing itself. */
|
|
53
|
+
export declare function useCodingReview(config: CareCompassConfig, options?: CodingFlowOptions): UseCodingReviewResult;
|
|
54
|
+
export declare function mountCodingReview(element: Element | null, config: CareCompassConfig, options?: {
|
|
55
|
+
initialCase?: CodingCase;
|
|
56
|
+
onCodingDecision?: (decision: CodingDecision) => void;
|
|
57
|
+
packId?: string;
|
|
58
|
+
reviewerAuthProvider?: CareCompassReviewerAuthProvider;
|
|
59
|
+
runtimeTokenProvider?: CareCompassRuntimeTokenProvider;
|
|
60
|
+
}): {
|
|
61
|
+
unmount: () => void;
|
|
62
|
+
};
|