@sinequa/assistant 3.10.5 → 3.10.10
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/chat/index.d.ts +2155 -3
- package/fesm2022/sinequa-assistant-chat.mjs +764 -593
- package/fesm2022/sinequa-assistant-chat.mjs.map +1 -1
- package/index.d.ts +3 -5
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -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 +6 -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 +6 -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 +51 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -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 +2409 -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 +210 -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 +276 -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 +562 -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 +365 -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/discriminated-unions.test.ts +661 -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 +595 -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 +734 -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/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/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/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 +270 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -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.test.ts +282 -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 +632 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -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 +1175 -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 +2990 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -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 +1798 -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 +138 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +448 -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 +667 -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 +183 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4538 -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/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/he.test.ts +379 -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 +83 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -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 +613 -0
- package/node_modules/zod/src/v4/core/util.ts +966 -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/en.ts +119 -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 +116 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -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 +49 -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/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 +116 -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 +40 -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 +1916 -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 +529 -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 +963 -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 +275 -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 +347 -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 +6 -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 +15 -0
- package/node_modules/zod/v4/classic/external.d.ts +15 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +610 -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 +584 -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 +6 -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 +1272 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +739 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +739 -0
- package/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/node_modules/zod/v4/core/api.cjs +1222 -0
- package/node_modules/zod/v4/core/api.d.cts +304 -0
- package/node_modules/zod/v4/core/api.d.ts +304 -0
- package/node_modules/zod/v4/core/api.js +1082 -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 +83 -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 +76 -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 +213 -0
- package/node_modules/zod/v4/core/errors.d.cts +220 -0
- package/node_modules/zod/v4/core/errors.d.ts +220 -0
- package/node_modules/zod/v4/core/errors.js +182 -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 +648 -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 +605 -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 +6 -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 +166 -0
- package/node_modules/zod/v4/core/regexes.d.cts +79 -0
- package/node_modules/zod/v4/core/regexes.d.ts +79 -0
- package/node_modules/zod/v4/core/regexes.js +133 -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 +2124 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1146 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1146 -0
- package/node_modules/zod/v4/core/schemas.js +2093 -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 +446 -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 +437 -0
- package/node_modules/zod/v4/core/util.cjs +710 -0
- package/node_modules/zod/v4/core/util.d.cts +199 -0
- package/node_modules/zod/v4/core/util.d.ts +199 -0
- package/node_modules/zod/v4/core/util.js +651 -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/en.cjs +136 -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 +109 -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 +135 -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 +108 -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/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 +104 -0
- package/node_modules/zod/v4/locales/index.d.cts +49 -0
- package/node_modules/zod/v4/locales/index.d.ts +49 -0
- package/node_modules/zod/v4/locales/index.js +49 -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 +6 -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/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 +136 -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 +109 -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 +12 -0
- package/node_modules/zod/v4/mini/external.d.ts +12 -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 +6 -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 +1046 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +427 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +427 -0
- package/node_modules/zod/v4/mini/schemas.js +925 -0
- package/node_modules/zod/v4/package.json +6 -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 +6 -0
- package/package.json +11 -10
- package/chat/charts/chart/chart.component.d.ts +0 -13
- package/chat/chat-message/chat-message.component.d.ts +0 -75
- package/chat/chat-settings-v3/chat-settings-v3.component.d.ts +0 -48
- package/chat/chat.component.d.ts +0 -387
- package/chat/chat.service.d.ts +0 -370
- package/chat/custom-elements/components/code-block.component.d.ts +0 -11
- package/chat/custom-elements/components/document-reference.component.d.ts +0 -13
- package/chat/custom-elements/components/image-reference.component.d.ts +0 -14
- package/chat/custom-elements/components/page-reference.component.d.ts +0 -14
- package/chat/custom-elements/components/table-tools.component.d.ts +0 -11
- package/chat/custom-elements/custom-elements.config.d.ts +0 -2
- package/chat/custom-elements/custom-elements.service.d.ts +0 -14
- package/chat/debug-message/debug-message-details/debug-message-details.component.d.ts +0 -18
- package/chat/debug-message/debug-message.component.d.ts +0 -14
- package/chat/debug-message/debug-message.service.d.ts +0 -15
- package/chat/dialogs/delete-saved-chat.component.d.ts +0 -22
- package/chat/dialogs/rename-saved-chat.component.d.ts +0 -21
- package/chat/dialogs/updates.component.d.ts +0 -15
- package/chat/documents-upload/document-list/document-list.component.d.ts +0 -64
- package/chat/documents-upload/document-overview/document-overview.component.d.ts +0 -17
- package/chat/documents-upload/document-upload/document-upload.component.d.ts +0 -91
- package/chat/documents-upload/documents-upload.model.d.ts +0 -66
- package/chat/documents-upload/documents-upload.service.d.ts +0 -161
- package/chat/fetch-patcher/app-injector.d.ts +0 -9
- package/chat/fetch-patcher/fetch-patcher.d.ts +0 -31
- package/chat/fetch-patcher/global-error-handler.service.d.ts +0 -36
- package/chat/fetch-patcher/handle-unauthorized-logic.d.ts +0 -13
- package/chat/format-icon/format-icon.component.d.ts +0 -10
- package/chat/format-icon/icons.d.ts +0 -5
- package/chat/initials-avatar/initials-avatar.component.d.ts +0 -35
- package/chat/instance-manager.service.d.ts +0 -28
- package/chat/markdown-it/markdown-it.config.d.ts +0 -4
- package/chat/markdown-it/plugins/code-block.plugin.d.ts +0 -2
- package/chat/markdown-it/plugins/document-reference.plugin.d.ts +0 -8
- package/chat/markdown-it/plugins/image-reference.plugin.d.ts +0 -9
- package/chat/markdown-it/plugins/link.plugin.d.ts +0 -5
- package/chat/markdown-it/plugins/page-reference.plugin.d.ts +0 -9
- package/chat/markdown-it/plugins/table-tools.plugin.d.ts +0 -2
- package/chat/pipes/message-content.pipe.d.ts +0 -16
- package/chat/public-api.d.ts +0 -35
- package/chat/references/chat-reference/chat-reference.component.d.ts +0 -24
- package/chat/references/chat-reference-image/chat-reference-image.component.d.ts +0 -20
- package/chat/references/chat-reference-page/chat-reference-page.component.d.ts +0 -20
- package/chat/saved-chats/saved-chats.component.d.ts +0 -37
- package/chat/saved-chats/saved-chats.service.d.ts +0 -29
- package/chat/services/app.service.d.ts +0 -9
- package/chat/services/assistant-configuration.service.d.ts +0 -34
- package/chat/services/assistant-metadata.service.d.ts +0 -20
- package/chat/services/assistant-tokens-tracking.service.d.ts +0 -23
- package/chat/services/assistant-ws-frames.service.d.ts +0 -50
- package/chat/services/dialog.service.d.ts +0 -12
- package/chat/services/notification.service.d.ts +0 -10
- package/chat/services/principal.service.d.ts +0 -7
- package/chat/services/search.service.d.ts +0 -7
- package/chat/services/signalR-connection.service.d.ts +0 -25
- package/chat/services/signalR.web.service.d.ts +0 -35
- package/chat/services/ui.service.d.ts +0 -13
- package/chat/services/user-settings.service.d.ts +0 -7
- package/chat/smart-renderer/smart-renderer.d.ts +0 -25
- package/chat/token-progress-bar/token-progress-bar.component.d.ts +0 -24
- package/chat/tooltip/tooltip.component.d.ts +0 -12
- package/chat/tooltip/tooltip.directive.d.ts +0 -81
- package/chat/types/message-content.types.d.ts +0 -54
- package/chat/types/message-reference.types.d.ts +0 -14
- package/chat/types.d.ts +0 -920
- package/chat/utils/assistant-json.d.ts +0 -2
- package/chat/utils/utils.service.d.ts +0 -67
- package/chat/version.d.ts +0 -1
- package/esm2022/chat/charts/chart/chart.component.mjs +0 -40
- package/esm2022/chat/chat-message/chat-message.component.mjs +0 -252
- package/esm2022/chat/chat-settings-v3/chat-settings-v3.component.mjs +0 -121
- package/esm2022/chat/chat.component.mjs +0 -1115
- package/esm2022/chat/chat.service.mjs +0 -636
- package/esm2022/chat/custom-elements/components/code-block.component.mjs +0 -97
- package/esm2022/chat/custom-elements/components/document-reference.component.mjs +0 -85
- package/esm2022/chat/custom-elements/components/image-reference.component.mjs +0 -79
- package/esm2022/chat/custom-elements/components/page-reference.component.mjs +0 -79
- package/esm2022/chat/custom-elements/components/table-tools.component.mjs +0 -111
- package/esm2022/chat/custom-elements/custom-elements.config.mjs +0 -6
- package/esm2022/chat/custom-elements/custom-elements.service.mjs +0 -35
- package/esm2022/chat/debug-message/debug-message-details/debug-message-details.component.mjs +0 -43
- package/esm2022/chat/debug-message/debug-message.component.mjs +0 -40
- package/esm2022/chat/debug-message/debug-message.service.mjs +0 -49
- package/esm2022/chat/dialogs/delete-saved-chat.component.mjs +0 -81
- package/esm2022/chat/dialogs/rename-saved-chat.component.mjs +0 -85
- package/esm2022/chat/dialogs/updates.component.mjs +0 -61
- package/esm2022/chat/documents-upload/document-list/document-list.component.mjs +0 -141
- package/esm2022/chat/documents-upload/document-overview/document-overview.component.mjs +0 -42
- package/esm2022/chat/documents-upload/document-upload/document-upload.component.mjs +0 -254
- package/esm2022/chat/documents-upload/documents-upload.model.mjs +0 -2
- package/esm2022/chat/documents-upload/documents-upload.service.mjs +0 -274
- package/esm2022/chat/fetch-patcher/app-injector.mjs +0 -19
- package/esm2022/chat/fetch-patcher/fetch-patcher.mjs +0 -62
- package/esm2022/chat/fetch-patcher/global-error-handler.service.mjs +0 -92
- package/esm2022/chat/fetch-patcher/handle-unauthorized-logic.mjs +0 -19
- package/esm2022/chat/format-icon/format-icon.component.mjs +0 -23
- package/esm2022/chat/format-icon/icons.mjs +0 -138
- package/esm2022/chat/initials-avatar/initials-avatar.component.mjs +0 -60
- package/esm2022/chat/instance-manager.service.mjs +0 -46
- package/esm2022/chat/markdown-it/markdown-it.config.mjs +0 -6
- package/esm2022/chat/markdown-it/plugins/code-block.plugin.mjs +0 -14
- package/esm2022/chat/markdown-it/plugins/document-reference.plugin.mjs +0 -66
- package/esm2022/chat/markdown-it/plugins/image-reference.plugin.mjs +0 -67
- package/esm2022/chat/markdown-it/plugins/link.plugin.mjs +0 -15
- package/esm2022/chat/markdown-it/plugins/page-reference.plugin.mjs +0 -67
- package/esm2022/chat/markdown-it/plugins/table-tools.plugin.mjs +0 -12
- package/esm2022/chat/pipes/message-content.pipe.mjs +0 -37
- package/esm2022/chat/public-api.mjs +0 -37
- package/esm2022/chat/references/chat-reference/chat-reference.component.mjs +0 -72
- package/esm2022/chat/references/chat-reference-image/chat-reference-image.component.mjs +0 -42
- package/esm2022/chat/references/chat-reference-page/chat-reference-page.component.mjs +0 -42
- package/esm2022/chat/saved-chats/saved-chats.component.mjs +0 -115
- package/esm2022/chat/saved-chats/saved-chats.service.mjs +0 -170
- package/esm2022/chat/services/app.service.mjs +0 -30
- package/esm2022/chat/services/assistant-configuration.service.mjs +0 -158
- package/esm2022/chat/services/assistant-metadata.service.mjs +0 -85
- package/esm2022/chat/services/assistant-tokens-tracking.service.mjs +0 -50
- package/esm2022/chat/services/assistant-ws-frames.service.mjs +0 -391
- package/esm2022/chat/services/dialog.service.mjs +0 -40
- package/esm2022/chat/services/notification.service.mjs +0 -25
- package/esm2022/chat/services/principal.service.mjs +0 -16
- package/esm2022/chat/services/search.service.mjs +0 -13
- package/esm2022/chat/services/signalR-connection.service.mjs +0 -102
- package/esm2022/chat/services/signalR.web.service.mjs +0 -69
- package/esm2022/chat/services/ui.service.mjs +0 -61
- package/esm2022/chat/services/user-settings.service.mjs +0 -25
- package/esm2022/chat/sinequa-assistant-chat.mjs +0 -5
- package/esm2022/chat/smart-renderer/smart-renderer.mjs +0 -104
- package/esm2022/chat/token-progress-bar/token-progress-bar.component.mjs +0 -52
- package/esm2022/chat/tooltip/tooltip.component.mjs +0 -44
- package/esm2022/chat/tooltip/tooltip.directive.mjs +0 -203
- package/esm2022/chat/types/message-content.types.mjs +0 -2
- package/esm2022/chat/types/message-reference.types.mjs +0 -2
- package/esm2022/chat/types.mjs +0 -130
- package/esm2022/chat/utils/assistant-json.mjs +0 -12
- package/esm2022/chat/utils/utils.service.mjs +0 -170
- package/esm2022/chat/version.mjs +0 -3
- package/esm2022/public-api.mjs +0 -3
- package/esm2022/sinequa-assistant.mjs +0 -5
- package/public-api.d.ts +0 -1
package/chat/index.d.ts
CHANGED
|
@@ -1,5 +1,2157 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, EventEmitter, OnChanges, ChangeDetectorRef, ElementRef, TemplateRef, SimpleChanges, InjectionToken, Type, AfterViewInit, Injector } from '@angular/core';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
|
5
|
+
import { TranslocoService } from '@jsverse/transloco';
|
|
6
|
+
import { MessageHeaders, HttpTransportType, ITransport, HubConnection } from '@microsoft/signalr';
|
|
7
|
+
import { CCApp, Principal, Article, Query, AppGlobalConfig } from '@sinequa/atomic';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
import { FlowDirective, Transfer } from '@flowjs/ngx-flow';
|
|
10
|
+
import { HttpClient } from '@angular/common/http';
|
|
11
|
+
import MarkdownIt from 'markdown-it';
|
|
12
|
+
|
|
13
|
+
declare class AppService {
|
|
14
|
+
app: CCApp | undefined;
|
|
15
|
+
init(): Promise<void>;
|
|
16
|
+
get appName(): string;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type NotificationType = "success" | "warning" | "error";
|
|
22
|
+
declare class NotificationsService {
|
|
23
|
+
success(message: string, title?: string): void;
|
|
24
|
+
warning(message: string, title?: string): void;
|
|
25
|
+
error(message: string, title?: string): void;
|
|
26
|
+
private dispatchEvent;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsService, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationsService>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare class PrincipalService {
|
|
32
|
+
principal: Principal;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrincipalService, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PrincipalService>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare class UserSettingsWebService {
|
|
38
|
+
userSettings: {};
|
|
39
|
+
patch(data: any): rxjs.Observable<unknown>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserSettingsWebService, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UserSettingsWebService>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Supported message type */
|
|
45
|
+
type MessageType = "text" | "image" | "video";
|
|
46
|
+
/** Generic message content schema */
|
|
47
|
+
type MessageContent = {
|
|
48
|
+
type: MessageType;
|
|
49
|
+
};
|
|
50
|
+
type RawMessageContent = string | MessageContent[];
|
|
51
|
+
|
|
52
|
+
/** Type of a context image reference */
|
|
53
|
+
type MessageImageReference = {
|
|
54
|
+
name?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
url?: string;
|
|
57
|
+
type?: string;
|
|
58
|
+
mimeType?: string;
|
|
59
|
+
article?: Article;
|
|
60
|
+
articleId?: string;
|
|
61
|
+
$partId?: number;
|
|
62
|
+
parts?: DocumentPart[];
|
|
63
|
+
};
|
|
64
|
+
|
|
1
65
|
/**
|
|
2
|
-
*
|
|
66
|
+
* Individual message sent & returned by the ChatGPT API.
|
|
67
|
+
* If this message is an attachment, we attach the minimal
|
|
68
|
+
* information needed to reconstruct this attachment (RawAttachment)
|
|
69
|
+
* as well as the reference id computed at the moment of sending
|
|
70
|
+
* the attachment to the API.
|
|
3
71
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
72
|
+
interface RawMessage {
|
|
73
|
+
role: string;
|
|
74
|
+
content: RawMessageContent;
|
|
75
|
+
messageType?: "CHART" | "MARKDOWN";
|
|
76
|
+
additionalProperties: {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A chat message that has been processed to include the markdown-formatted
|
|
82
|
+
* content for display, as well as detailed attachment data, and optionally
|
|
83
|
+
* a list of the references extracted from that message
|
|
84
|
+
*/
|
|
85
|
+
interface ChatMessage extends RawMessage {
|
|
86
|
+
additionalProperties: {
|
|
87
|
+
messageId: string;
|
|
88
|
+
display?: boolean;
|
|
89
|
+
$progress?: ChatProgress[];
|
|
90
|
+
$attachment?: ChatContextAttachment[];
|
|
91
|
+
$suggestedAction?: SuggestedAction[];
|
|
92
|
+
$debug?: DebugMessage[];
|
|
93
|
+
forcedWorkflow?: string;
|
|
94
|
+
forcedWorkflowProperties?: any;
|
|
95
|
+
query?: Query;
|
|
96
|
+
isUserInput?: boolean;
|
|
97
|
+
usageMetrics?: ChatUsageMetrics;
|
|
98
|
+
additionalWorkflowProperties?: any;
|
|
99
|
+
$liked?: boolean;
|
|
100
|
+
$disliked?: boolean;
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
interface ChatProgress {
|
|
105
|
+
title: string;
|
|
106
|
+
content?: string;
|
|
107
|
+
done?: boolean;
|
|
108
|
+
time?: number;
|
|
109
|
+
}
|
|
110
|
+
interface RawAttachment {
|
|
111
|
+
/** Type of the attachment */
|
|
112
|
+
type: string;
|
|
113
|
+
/** Record id from which this attachment is taken */
|
|
114
|
+
recordId: string;
|
|
115
|
+
/** Record from which this this attachment is taken */
|
|
116
|
+
record: Article;
|
|
117
|
+
}
|
|
118
|
+
interface DocumentPart {
|
|
119
|
+
partId?: number;
|
|
120
|
+
offset: number;
|
|
121
|
+
length: number;
|
|
122
|
+
text?: string;
|
|
123
|
+
images?: string[] | MessageImageReference[];
|
|
124
|
+
}
|
|
125
|
+
type DocumentPage = {
|
|
126
|
+
url: string;
|
|
127
|
+
mimeType: string;
|
|
128
|
+
name?: string;
|
|
129
|
+
type?: string;
|
|
130
|
+
description?: string;
|
|
131
|
+
length?: number;
|
|
132
|
+
offSet?: number;
|
|
133
|
+
pageNumber?: number;
|
|
134
|
+
remappedLength?: number;
|
|
135
|
+
remappedOffset?: number;
|
|
136
|
+
};
|
|
137
|
+
interface ChatContextAttachment extends RawAttachment {
|
|
138
|
+
/** Type of the attachment */
|
|
139
|
+
type: "Context";
|
|
140
|
+
/** Rank of the attachment in the context message */
|
|
141
|
+
contextId: number;
|
|
142
|
+
/** Parts of the record that the assistant uses to answer */
|
|
143
|
+
parts: DocumentPart[];
|
|
144
|
+
/** Pages of the documents based on the query */
|
|
145
|
+
pages?: DocumentPage[];
|
|
146
|
+
/** The specific id used of the referenced part */
|
|
147
|
+
$partId?: number;
|
|
148
|
+
$expanded?: boolean;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Raw response of the chat API
|
|
152
|
+
*/
|
|
153
|
+
interface RawResponse {
|
|
154
|
+
history: RawMessage[];
|
|
155
|
+
executionTime: string | undefined;
|
|
156
|
+
executionTimeMilliseconds: number | undefined;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Enriched response of the chat API
|
|
160
|
+
*/
|
|
161
|
+
interface ChatResponse extends RawResponse {
|
|
162
|
+
history: ChatMessage[];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Response of the ListModels API
|
|
166
|
+
*/
|
|
167
|
+
interface GllmModelDescription {
|
|
168
|
+
provider: string;
|
|
169
|
+
displayName: string;
|
|
170
|
+
serviceId: string;
|
|
171
|
+
modelId: string;
|
|
172
|
+
enable: boolean;
|
|
173
|
+
maxGenerationSize: number;
|
|
174
|
+
contextWindowSize: number;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Response of the ListFunctions API
|
|
178
|
+
*/
|
|
179
|
+
interface GllmFunction {
|
|
180
|
+
functionName: string;
|
|
181
|
+
description: string;
|
|
182
|
+
enabled: boolean;
|
|
183
|
+
parameters: GllmFunctionParameter[];
|
|
184
|
+
}
|
|
185
|
+
interface GllmFunctionParameter {
|
|
186
|
+
description: string;
|
|
187
|
+
isRequired: boolean;
|
|
188
|
+
name: string;
|
|
189
|
+
type: string;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Minimal representation of a saved chat
|
|
193
|
+
*/
|
|
194
|
+
interface SavedChat {
|
|
195
|
+
id: string;
|
|
196
|
+
title: string;
|
|
197
|
+
modifiedUTC: string;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Data structure saved to reconstruct a saved chat conversation
|
|
201
|
+
*/
|
|
202
|
+
interface SavedChatHistory extends SavedChat {
|
|
203
|
+
history: ChatMessage[];
|
|
204
|
+
}
|
|
205
|
+
declare const connectionSettingsSchema: z.ZodObject<{
|
|
206
|
+
connectionErrorMessage: z.ZodString;
|
|
207
|
+
websocketEndpoint: z.ZodOptional<z.ZodString>;
|
|
208
|
+
signalRSkipNegotiation: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
signalRTransport: z.ZodEnum<{
|
|
210
|
+
None: "None";
|
|
211
|
+
WebSockets: "WebSockets";
|
|
212
|
+
ServerSentEvents: "ServerSentEvents";
|
|
213
|
+
LongPolling: "LongPolling";
|
|
214
|
+
}>;
|
|
215
|
+
signalRLogLevel: z.ZodEnum<{
|
|
216
|
+
None: "None";
|
|
217
|
+
Critical: "Critical";
|
|
218
|
+
Debug: "Debug";
|
|
219
|
+
Error: "Error";
|
|
220
|
+
Information: "Information";
|
|
221
|
+
Trace: "Trace";
|
|
222
|
+
Warning: "Warning";
|
|
223
|
+
}>;
|
|
224
|
+
signalRServerTimeoutInMilliseconds: z.ZodOptional<z.ZodNumber>;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
type ConnectionSettings = z.infer<typeof connectionSettingsSchema>;
|
|
227
|
+
declare const serviceSettingsSchema: z.ZodObject<{
|
|
228
|
+
service_id: z.ZodString;
|
|
229
|
+
model_id: z.ZodString;
|
|
230
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
interface ServiceSettings extends z.infer<typeof serviceSettingsSchema> {
|
|
235
|
+
}
|
|
236
|
+
declare const additionalServiceSettingsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
237
|
+
interface AdditionalServiceSettings extends z.infer<typeof additionalServiceSettingsSchema> {
|
|
238
|
+
}
|
|
239
|
+
declare const additionalWorkflowPropertiesSchema: z.ZodObject<{}, z.core.$strip>;
|
|
240
|
+
interface additionalWorkflowProperties extends z.infer<typeof additionalWorkflowPropertiesSchema> {
|
|
241
|
+
}
|
|
242
|
+
declare const uiSettingsSchema: z.ZodObject<{
|
|
243
|
+
display: z.ZodBoolean;
|
|
244
|
+
servicesModels: z.ZodBoolean;
|
|
245
|
+
functions: z.ZodBoolean;
|
|
246
|
+
temperature: z.ZodBoolean;
|
|
247
|
+
top_p: z.ZodBoolean;
|
|
248
|
+
max_tokens: z.ZodBoolean;
|
|
249
|
+
debug: z.ZodBoolean;
|
|
250
|
+
displaySystemPrompt: z.ZodBoolean;
|
|
251
|
+
displayUserPrompt: z.ZodBoolean;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
interface UiSettings extends z.infer<typeof uiSettingsSchema> {
|
|
254
|
+
}
|
|
255
|
+
declare const defaultValuesSchema: z.ZodObject<{
|
|
256
|
+
service_id: z.ZodString;
|
|
257
|
+
model_id: z.ZodString;
|
|
258
|
+
functions: z.ZodArray<z.ZodObject<{
|
|
259
|
+
name: z.ZodString;
|
|
260
|
+
enabled: z.ZodBoolean;
|
|
261
|
+
}, z.core.$strip>>;
|
|
262
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
263
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
264
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
265
|
+
debug: z.ZodBoolean;
|
|
266
|
+
systemPrompt: z.ZodString;
|
|
267
|
+
userPrompt: z.ZodString;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
interface DefaultValues extends z.infer<typeof defaultValuesSchema> {
|
|
270
|
+
}
|
|
271
|
+
declare const modeSettingsSchema: z.ZodObject<{
|
|
272
|
+
enabledUserInput: z.ZodBoolean;
|
|
273
|
+
displayUserPrompt: z.ZodBoolean;
|
|
274
|
+
sendUserPrompt: z.ZodBoolean;
|
|
275
|
+
initialization: z.ZodObject<{
|
|
276
|
+
event: z.ZodEnum<{
|
|
277
|
+
Query: "Query";
|
|
278
|
+
Prompt: "Prompt";
|
|
279
|
+
}>;
|
|
280
|
+
forcedWorkflow: z.ZodOptional<z.ZodString>;
|
|
281
|
+
forcedFunction: z.ZodOptional<z.ZodString>;
|
|
282
|
+
displayUserQuery: z.ZodOptional<z.ZodBoolean>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
285
|
+
forcedWorkflow: z.ZodString;
|
|
286
|
+
forcedWorkflowProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
287
|
+
}, z.core.$strip>>>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
interface ModeSettings extends z.infer<typeof modeSettingsSchema> {
|
|
290
|
+
}
|
|
291
|
+
declare const savedChatSettingsSchema: z.ZodObject<{
|
|
292
|
+
enabled: z.ZodBoolean;
|
|
293
|
+
display: z.ZodBoolean;
|
|
294
|
+
queryWebserviceForSearch: z.ZodOptional<z.ZodString>;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
interface SavedChatSettings extends z.infer<typeof savedChatSettingsSchema> {
|
|
297
|
+
}
|
|
298
|
+
interface SavedChatSettings extends z.infer<typeof savedChatSettingsSchema> {
|
|
299
|
+
}
|
|
300
|
+
declare const chatConfigSchema: z.ZodObject<{
|
|
301
|
+
connectionSettings: z.ZodObject<{
|
|
302
|
+
connectionErrorMessage: z.ZodString;
|
|
303
|
+
websocketEndpoint: z.ZodOptional<z.ZodString>;
|
|
304
|
+
signalRSkipNegotiation: z.ZodOptional<z.ZodBoolean>;
|
|
305
|
+
signalRTransport: z.ZodEnum<{
|
|
306
|
+
None: "None";
|
|
307
|
+
WebSockets: "WebSockets";
|
|
308
|
+
ServerSentEvents: "ServerSentEvents";
|
|
309
|
+
LongPolling: "LongPolling";
|
|
310
|
+
}>;
|
|
311
|
+
signalRLogLevel: z.ZodEnum<{
|
|
312
|
+
None: "None";
|
|
313
|
+
Critical: "Critical";
|
|
314
|
+
Debug: "Debug";
|
|
315
|
+
Error: "Error";
|
|
316
|
+
Information: "Information";
|
|
317
|
+
Trace: "Trace";
|
|
318
|
+
Warning: "Warning";
|
|
319
|
+
}>;
|
|
320
|
+
signalRServerTimeoutInMilliseconds: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
defaultValues: z.ZodObject<{
|
|
323
|
+
service_id: z.ZodString;
|
|
324
|
+
model_id: z.ZodString;
|
|
325
|
+
functions: z.ZodArray<z.ZodObject<{
|
|
326
|
+
name: z.ZodString;
|
|
327
|
+
enabled: z.ZodBoolean;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
330
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
debug: z.ZodBoolean;
|
|
333
|
+
systemPrompt: z.ZodString;
|
|
334
|
+
userPrompt: z.ZodString;
|
|
335
|
+
}, z.core.$strip>;
|
|
336
|
+
modeSettings: z.ZodObject<{
|
|
337
|
+
enabledUserInput: z.ZodBoolean;
|
|
338
|
+
displayUserPrompt: z.ZodBoolean;
|
|
339
|
+
sendUserPrompt: z.ZodBoolean;
|
|
340
|
+
initialization: z.ZodObject<{
|
|
341
|
+
event: z.ZodEnum<{
|
|
342
|
+
Query: "Query";
|
|
343
|
+
Prompt: "Prompt";
|
|
344
|
+
}>;
|
|
345
|
+
forcedWorkflow: z.ZodOptional<z.ZodString>;
|
|
346
|
+
forcedFunction: z.ZodOptional<z.ZodString>;
|
|
347
|
+
displayUserQuery: z.ZodOptional<z.ZodBoolean>;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
350
|
+
forcedWorkflow: z.ZodString;
|
|
351
|
+
forcedWorkflowProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
352
|
+
}, z.core.$strip>>>;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
uiSettings: z.ZodObject<{
|
|
355
|
+
display: z.ZodBoolean;
|
|
356
|
+
servicesModels: z.ZodBoolean;
|
|
357
|
+
functions: z.ZodBoolean;
|
|
358
|
+
temperature: z.ZodBoolean;
|
|
359
|
+
top_p: z.ZodBoolean;
|
|
360
|
+
max_tokens: z.ZodBoolean;
|
|
361
|
+
debug: z.ZodBoolean;
|
|
362
|
+
displaySystemPrompt: z.ZodBoolean;
|
|
363
|
+
displayUserPrompt: z.ZodBoolean;
|
|
364
|
+
}, z.core.$strip>;
|
|
365
|
+
savedChatSettings: z.ZodObject<{
|
|
366
|
+
enabled: z.ZodBoolean;
|
|
367
|
+
display: z.ZodBoolean;
|
|
368
|
+
queryWebserviceForSearch: z.ZodOptional<z.ZodString>;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
globalSettings: z.ZodObject<{
|
|
371
|
+
searchWarningMessage: z.ZodString;
|
|
372
|
+
disclaimer: z.ZodOptional<z.ZodString>;
|
|
373
|
+
genericChatErrorMessage: z.ZodOptional<z.ZodString>;
|
|
374
|
+
displayUserQuotaConsumption: z.ZodOptional<z.ZodBoolean>;
|
|
375
|
+
displayChatTokensConsumption: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
+
collapseReferences: z.ZodOptional<z.ZodBoolean>;
|
|
377
|
+
automaticScroll: z.ZodOptional<z.ZodBoolean>;
|
|
378
|
+
}, z.core.$strip>;
|
|
379
|
+
auditSettings: z.ZodObject<{
|
|
380
|
+
issueTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
381
|
+
logContent: z.ZodBoolean;
|
|
382
|
+
}, z.core.$strip>;
|
|
383
|
+
additionalServiceSettings: z.ZodObject<{}, z.core.$strip>;
|
|
384
|
+
additionalWorkflowProperties: z.ZodObject<{}, z.core.$strip>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
interface ChatConfig extends z.infer<typeof chatConfigSchema> {
|
|
387
|
+
}
|
|
388
|
+
interface ChatPayload {
|
|
389
|
+
debug: boolean;
|
|
390
|
+
functions: string[];
|
|
391
|
+
history: ChatMessage[];
|
|
392
|
+
serviceSettings: ServiceSettings;
|
|
393
|
+
appQuery: {
|
|
394
|
+
app: string;
|
|
395
|
+
query: Query | undefined;
|
|
396
|
+
targetUrl?: string;
|
|
397
|
+
accessToken?: string;
|
|
398
|
+
};
|
|
399
|
+
instanceId: string;
|
|
400
|
+
chatId: string;
|
|
401
|
+
genericChatErrorMessage?: string;
|
|
402
|
+
}
|
|
403
|
+
type ActionMessage = {
|
|
404
|
+
guid: string;
|
|
405
|
+
displayName?: string;
|
|
406
|
+
displayValue?: string;
|
|
407
|
+
executionTime?: number;
|
|
408
|
+
};
|
|
409
|
+
interface TextChunksOptions {
|
|
410
|
+
extendMode?: "None" | "Sentence" | "Chars";
|
|
411
|
+
extendScope?: number;
|
|
412
|
+
}
|
|
413
|
+
interface Quota {
|
|
414
|
+
lastRequest: string;
|
|
415
|
+
promptTokenCount: number;
|
|
416
|
+
completionTokenCount: number;
|
|
417
|
+
periodTokens: number;
|
|
418
|
+
resetHours: number;
|
|
419
|
+
tokenCount: number;
|
|
420
|
+
nextReset: string;
|
|
421
|
+
lastResetUTC: string;
|
|
422
|
+
nextResetUTC: string;
|
|
423
|
+
maxQuotaReached: boolean;
|
|
424
|
+
}
|
|
425
|
+
interface SuggestedAction {
|
|
426
|
+
content: string;
|
|
427
|
+
type: string;
|
|
428
|
+
}
|
|
429
|
+
interface InitChat {
|
|
430
|
+
messages: RawMessage[];
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* List of events data that can be emitted by the websocket chat endpoint
|
|
434
|
+
*/
|
|
435
|
+
type SuggestedActionsEvent = {
|
|
436
|
+
suggestedActions: SuggestedAction[];
|
|
437
|
+
};
|
|
438
|
+
type QuotaEvent = {
|
|
439
|
+
quota: Quota;
|
|
440
|
+
};
|
|
441
|
+
type MessageEvent = {
|
|
442
|
+
delta: string;
|
|
443
|
+
messageId: string;
|
|
444
|
+
};
|
|
445
|
+
type ContextMessageEvent = {
|
|
446
|
+
content: string;
|
|
447
|
+
additionalProperties: ChatContextAttachment;
|
|
448
|
+
};
|
|
449
|
+
type ErrorEvent = string;
|
|
450
|
+
type ActionStartEvent = {
|
|
451
|
+
guid: string;
|
|
452
|
+
displayName: string;
|
|
453
|
+
};
|
|
454
|
+
type ActionResultEvent = {
|
|
455
|
+
guid: string;
|
|
456
|
+
displayValue: string;
|
|
457
|
+
};
|
|
458
|
+
type ActionStopEvent = {
|
|
459
|
+
guid: string;
|
|
460
|
+
executionTime: number;
|
|
461
|
+
};
|
|
462
|
+
type HistoryEvent = {
|
|
463
|
+
history: RawMessage[];
|
|
464
|
+
executionTime: string;
|
|
465
|
+
executionTimeMilliseconds?: number;
|
|
466
|
+
};
|
|
467
|
+
type DebugMessageEvent = DebugMessage;
|
|
468
|
+
/**
|
|
469
|
+
* Data emitted by the http chat endpoint
|
|
470
|
+
*/
|
|
471
|
+
type HttpChatResponse = {
|
|
472
|
+
quota: Quota;
|
|
473
|
+
suggestedActions: SuggestedAction[];
|
|
474
|
+
debug: any;
|
|
475
|
+
context: {
|
|
476
|
+
content: string;
|
|
477
|
+
additionalProperties: ChatContextAttachment;
|
|
478
|
+
}[];
|
|
479
|
+
actions: ActionMessage[];
|
|
480
|
+
history: RawMessage[];
|
|
481
|
+
executionTime: string;
|
|
482
|
+
executionTimeMilliseconds: number;
|
|
483
|
+
};
|
|
484
|
+
interface TokenConsumption {
|
|
485
|
+
percentage: number;
|
|
486
|
+
}
|
|
487
|
+
interface UserTokenConsumption extends TokenConsumption {
|
|
488
|
+
nextResetDate: string;
|
|
489
|
+
}
|
|
490
|
+
interface ChatUsageMetrics {
|
|
491
|
+
totalTokenCount: number;
|
|
492
|
+
promptTokenCount: number;
|
|
493
|
+
completionTokenCount: number;
|
|
494
|
+
tokenizerType: string;
|
|
495
|
+
}
|
|
496
|
+
interface KvObject {
|
|
497
|
+
data: {
|
|
498
|
+
key: string;
|
|
499
|
+
value: any;
|
|
500
|
+
};
|
|
501
|
+
type: "KV";
|
|
502
|
+
isError: boolean;
|
|
503
|
+
}
|
|
504
|
+
interface ListObject {
|
|
505
|
+
name: string;
|
|
506
|
+
type: "LIST";
|
|
507
|
+
isError: boolean;
|
|
508
|
+
items: (KvObject | ListObject)[];
|
|
509
|
+
expanded: boolean;
|
|
510
|
+
}
|
|
511
|
+
type DebugMessage = {
|
|
512
|
+
title: string;
|
|
513
|
+
chatId: string;
|
|
514
|
+
executionId: string;
|
|
515
|
+
debugMessageId: string;
|
|
516
|
+
$expanded?: boolean;
|
|
517
|
+
$loading?: boolean;
|
|
518
|
+
$details?: ListObject[];
|
|
519
|
+
};
|
|
520
|
+
type MessageHandler<T> = {
|
|
521
|
+
handler: (data: T) => void;
|
|
522
|
+
isGlobalHandler: boolean;
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* Data emitted by the saved chat endpoints
|
|
526
|
+
*/
|
|
527
|
+
type DeleteSavedChatResponse = {
|
|
528
|
+
deleteCount: number;
|
|
529
|
+
executionTime: string;
|
|
530
|
+
executionTimeMilliseconds: number;
|
|
531
|
+
};
|
|
532
|
+
type SavedChatResponse = {
|
|
533
|
+
savedChat: SavedChat;
|
|
534
|
+
executionTime: string;
|
|
535
|
+
executionTimeMilliseconds: number;
|
|
536
|
+
};
|
|
537
|
+
/** */
|
|
538
|
+
type PluginVersion = {
|
|
539
|
+
pluginVersion: string;
|
|
540
|
+
major: number;
|
|
541
|
+
minor: number;
|
|
542
|
+
build: number;
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
interface ConnectionOptions {
|
|
546
|
+
withCredentials?: boolean;
|
|
547
|
+
headers?: MessageHeaders;
|
|
548
|
+
transport?: HttpTransportType | ITransport;
|
|
549
|
+
skipNegotiation?: boolean;
|
|
550
|
+
accessTokenFactory?: () => string | Promise<string>;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
declare class AssistantUtils {
|
|
554
|
+
readonly localID: string | null;
|
|
555
|
+
protected readonly transloco: TranslocoService;
|
|
556
|
+
/**
|
|
557
|
+
* Retrieves the rank (1-based index) of a message within a chat history array based on its message ID.
|
|
558
|
+
* If the message is not found, returns -1.
|
|
559
|
+
*
|
|
560
|
+
* @param array - An array of `ChatMessage` objects or `undefined`. Represents the chat history.
|
|
561
|
+
* @param messageId - The unique identifier of the message to locate.
|
|
562
|
+
* @returns The 1-based index of the message in the array, or -1 if the message is not found.
|
|
563
|
+
*/
|
|
564
|
+
getMessageRankInChatHistory(array: ChatMessage[] | undefined, messageId: string): number;
|
|
565
|
+
/**
|
|
566
|
+
* Traverse the array from the end and track the first 'assistant' message among the last group of "assistant" messages where display is true
|
|
567
|
+
* @param array The array of ChatMessage to traverse
|
|
568
|
+
* @returns The index of the first visible assistant message among the last group of "assistant" messages in the array
|
|
569
|
+
*/
|
|
570
|
+
firstVisibleAssistantMessageIndex(array: ChatMessage[] | undefined): number;
|
|
571
|
+
/**
|
|
572
|
+
* Traverse the array from the end and pick the last 'assistant' message among the last group of "assistant" messages where display is true
|
|
573
|
+
* @param array The array of ChatMessage to traverse
|
|
574
|
+
* @returns The index of the last visible assistant message among the last group of "assistant" messages in the array
|
|
575
|
+
*/
|
|
576
|
+
lastVisibleAssistantMessageIndex(array: ChatMessage[] | undefined): number;
|
|
577
|
+
/**
|
|
578
|
+
* Format a date string in UTC to a local date string
|
|
579
|
+
* @param value Date string in UTC to format
|
|
580
|
+
* @returns A formatted local date string
|
|
581
|
+
*/
|
|
582
|
+
formatDateTime(value: string): string;
|
|
583
|
+
/**
|
|
584
|
+
* Takes a text prompt that may contain placeholders for variables
|
|
585
|
+
* and replaces these placeholders if it finds a match in the given
|
|
586
|
+
* context object.
|
|
587
|
+
*
|
|
588
|
+
* @example
|
|
589
|
+
* const p = "Hello, [[user.name]]! You have [[user.notifications.length]] new notifications.";
|
|
590
|
+
* const context = {
|
|
591
|
+
* user: {
|
|
592
|
+
* name: "Alice",
|
|
593
|
+
* notifications: ["Message from Bob", "Reminder for meeting"]
|
|
594
|
+
* }
|
|
595
|
+
* };
|
|
596
|
+
* const formattedPrompt = formatPrompt(p, context);
|
|
597
|
+
* console.log(formattedPrompt); // Output: "Hello, Alice! You have 2 new notifications."
|
|
598
|
+
*/
|
|
599
|
+
static formatPrompt(prompt: string, context: any): string;
|
|
600
|
+
/**
|
|
601
|
+
* Determines a time-based key for a given date to be used for translations or formatting.
|
|
602
|
+
* The key represents a relative time period such as "today", "yesterday", "this week", etc.
|
|
603
|
+
* If the date does not fall into any predefined relative time period, it returns the year as a string.
|
|
604
|
+
*
|
|
605
|
+
* @param date - The date for which the time key is to be determined.
|
|
606
|
+
* @returns A string representing the time key, which can be used for translation or display purposes.
|
|
607
|
+
*/
|
|
608
|
+
getTimeKey(date: Date): string;
|
|
609
|
+
/**
|
|
610
|
+
* Get the current locale name.
|
|
611
|
+
* @returns The current locale name or an empty string if not available.
|
|
612
|
+
*/
|
|
613
|
+
getCurrentLocaleName(): string;
|
|
614
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AssistantUtils, never>;
|
|
615
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AssistantUtils>;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
declare class ChatService {
|
|
619
|
+
/** Name of the assistant websocket endpoint. */
|
|
620
|
+
WS_REQUEST_URL: string;
|
|
621
|
+
/** Name of the assistant REST endpoint. */
|
|
622
|
+
REST_REQUEST_URL: string;
|
|
623
|
+
/** SignalR connection instance */
|
|
624
|
+
connection: HubConnection | undefined;
|
|
625
|
+
/** Emit true once the initialization of the assistant process is done. */
|
|
626
|
+
initProcess$: BehaviorSubject<boolean>;
|
|
627
|
+
/** Emit true once the initialization of the assistant config is done. */
|
|
628
|
+
initConfig$: BehaviorSubject<boolean>;
|
|
629
|
+
/** Emit the global configuration of the assistant. */
|
|
630
|
+
assistantConfig$: BehaviorSubject<ChatConfig | undefined>;
|
|
631
|
+
/** Emit true if the user has been overridden, false otherwise. */
|
|
632
|
+
userOverride$: BehaviorSubject<boolean | undefined>;
|
|
633
|
+
/**
|
|
634
|
+
* Emit true if the fetch of an assistant's response is ongoing (it includes Streaming status of the assistant endpoint AND saving the discussion if save Chat is enabled).
|
|
635
|
+
* This is used to prevent multiple fetches at the same time.
|
|
636
|
+
* Typically, there is no problem chaining fetches, but when forcing a reload after query changes cases, it can't be allowed because it breaks the whole business logic.
|
|
637
|
+
*/
|
|
638
|
+
streaming$: BehaviorSubject<boolean>;
|
|
639
|
+
/** Store the messages history of the current chat. */
|
|
640
|
+
chatHistory: ChatMessage[] | undefined;
|
|
641
|
+
/** List of models available on the server. */
|
|
642
|
+
models: GllmModelDescription[] | undefined;
|
|
643
|
+
/** List of functions available on the server. */
|
|
644
|
+
functions: GllmFunction[] | undefined;
|
|
645
|
+
/** List of saved chats. */
|
|
646
|
+
savedChats$: BehaviorSubject<SavedChat[]>;
|
|
647
|
+
/** Whether there is an error with saved chats. */
|
|
648
|
+
savedChatsError$: BehaviorSubject<boolean>;
|
|
649
|
+
/** Emit the saved chat to load. */
|
|
650
|
+
loadSavedChat$: BehaviorSubject<SavedChat | undefined>;
|
|
651
|
+
/** Emit the quota each time the chat is invoked. */
|
|
652
|
+
quota$: BehaviorSubject<Quota | undefined>;
|
|
653
|
+
/** Emit the calculated user's token consumption based on the quota. */
|
|
654
|
+
userTokenConsumption$: BehaviorSubject<UserTokenConsumption | undefined>;
|
|
655
|
+
/** Emit the chat usage metrics each time the generation of the assistant response is completed. */
|
|
656
|
+
chatUsageMetrics$: BehaviorSubject<ChatUsageMetrics | undefined>;
|
|
657
|
+
/** Emit the calculated chat's token consumption based on the chat usage metrics. */
|
|
658
|
+
chatTokenConsumption$: BehaviorSubject<TokenConsumption | undefined>;
|
|
659
|
+
/** Emit true if "CancelTasks" is ongoing. */
|
|
660
|
+
stoppingGeneration$: BehaviorSubject<boolean>;
|
|
661
|
+
/** Instance ID of the chat service defining the assistant instance. */
|
|
662
|
+
private _chatInstanceId;
|
|
663
|
+
/** Generated GUID for the current chat discussion used to save/get/delete it and identify audit events. */
|
|
664
|
+
private _chatId;
|
|
665
|
+
userSettingsService: UserSettingsWebService;
|
|
666
|
+
notificationsService: NotificationsService;
|
|
667
|
+
appService: AppService;
|
|
668
|
+
principalService: PrincipalService;
|
|
669
|
+
assistantUtils: AssistantUtils;
|
|
670
|
+
private savedChatsService;
|
|
671
|
+
private signalRConnectionService;
|
|
672
|
+
private assistantConfigurationService;
|
|
673
|
+
private assistantMetadataService;
|
|
674
|
+
private assistantTokensTrackingService;
|
|
675
|
+
private debugMessageService;
|
|
676
|
+
private assistantWsFramesService;
|
|
677
|
+
protected readonly transloco: TranslocoService;
|
|
678
|
+
/**
|
|
679
|
+
* Initialize the assistant process.
|
|
680
|
+
* It includes building and starting a connection, executing parallel requests for models and functions, and handling errors during the process.
|
|
681
|
+
* ⚠️ This method MUST be called ONLY if the user is loggedIn and once when the assistant is initialized.
|
|
682
|
+
*
|
|
683
|
+
* @returns An Observable<boolean> indicating the success of the initialization process.
|
|
684
|
+
*/
|
|
685
|
+
init(): Observable<boolean>;
|
|
686
|
+
/**
|
|
687
|
+
* Define the endpoint to use for the websocket requests
|
|
688
|
+
* It can be overridden by the app config
|
|
689
|
+
*/
|
|
690
|
+
getWSRequestsUrl(): void;
|
|
691
|
+
/**
|
|
692
|
+
* Define the endpoint to use for the http requests
|
|
693
|
+
* It can be overridden by the app config
|
|
694
|
+
*/
|
|
695
|
+
getRESTRequestsUrl(): void;
|
|
696
|
+
/**
|
|
697
|
+
* Retrieves the plugin version information.
|
|
698
|
+
* @returns An Observable of PluginVersion or undefined.
|
|
699
|
+
*/
|
|
700
|
+
getPluginVersion(): Observable<PluginVersion | undefined>;
|
|
701
|
+
/**
|
|
702
|
+
* Retrieves the Sinequa Enterprise Search version.
|
|
703
|
+
* @returns The Sinequa Enterprise Search version as a string, or undefined if not available.
|
|
704
|
+
*/
|
|
705
|
+
getSinequaESVersion(): Observable<string | undefined>;
|
|
706
|
+
/**
|
|
707
|
+
* Checks and logs the version alignment between the Angular library, plugin, and Sinequa ES.
|
|
708
|
+
* It fetches the plugin and Sinequa ES versions in parallel and logs the information to the console.
|
|
709
|
+
*/
|
|
710
|
+
checkVersionAlignment(): Observable<any>;
|
|
711
|
+
/**
|
|
712
|
+
* Initializes the SavedChatsService with the necessary configuration.
|
|
713
|
+
*
|
|
714
|
+
* This method sets up the `SavedChatsService` by providing it with a configuration object
|
|
715
|
+
* (`SavedChatsOperationConfig`) that includes various callbacks and properties required
|
|
716
|
+
* for its operation. The initialization will only proceed if both `assistantConfig$` and
|
|
717
|
+
* `REST_REQUEST_URL` are available.
|
|
718
|
+
*
|
|
719
|
+
* The configuration object includes:
|
|
720
|
+
* - Application name retrieval.
|
|
721
|
+
* - Instance ID retrieval.
|
|
722
|
+
* - REST API URL retrieval.
|
|
723
|
+
* - Debug flag retrieval.
|
|
724
|
+
* - Chat ID for new saves.
|
|
725
|
+
* - Saved chats enablement check.
|
|
726
|
+
* - Methods for setting a saved chat ID, updating the saved chats list, and generating audit events.
|
|
727
|
+
*
|
|
728
|
+
* If the required dependencies are not ready, an error is logged to the console.
|
|
729
|
+
*
|
|
730
|
+
* @private
|
|
731
|
+
*/
|
|
732
|
+
private _initSavedChatsService;
|
|
733
|
+
/**
|
|
734
|
+
* Initializes the SignalR connection service with the necessary configuration.
|
|
735
|
+
*
|
|
736
|
+
* This method ensures that the SignalR connection service is properly set up
|
|
737
|
+
* by providing it with the required configuration values, such as the WebSocket
|
|
738
|
+
* request URL and assistant configuration. It also manages the SignalR hub connection
|
|
739
|
+
* instance.
|
|
740
|
+
*
|
|
741
|
+
* Preconditions:
|
|
742
|
+
* - `assistantConfig$.value` must be available.
|
|
743
|
+
* - `WS_REQUEST_URL` must be defined.
|
|
744
|
+
*
|
|
745
|
+
* If these preconditions are not met, an error is logged to the console.
|
|
746
|
+
*
|
|
747
|
+
* @private
|
|
748
|
+
*/
|
|
749
|
+
private _initSignalRConnectionService;
|
|
750
|
+
/**
|
|
751
|
+
* Initializes the Assistant Configuration Service with the necessary operation context.
|
|
752
|
+
* This method sets up the configuration context by providing various utility functions
|
|
753
|
+
* and state management mechanisms required for the assistant's configuration operations.
|
|
754
|
+
*
|
|
755
|
+
* The operation context includes:
|
|
756
|
+
* - Methods to retrieve chat instance and chat IDs.
|
|
757
|
+
* - Methods to get and set assistant configuration values.
|
|
758
|
+
* - Methods to set WebSocket and REST request URLs.
|
|
759
|
+
* - Methods to update the initialization configuration status.
|
|
760
|
+
* - A method to generate audit events for tracking operations.
|
|
761
|
+
*
|
|
762
|
+
* @private
|
|
763
|
+
*/
|
|
764
|
+
private _initAssistantConfigurationService;
|
|
765
|
+
/**
|
|
766
|
+
* Initializes the AssistantMetadataService with the necessary operation context.
|
|
767
|
+
*
|
|
768
|
+
* This method checks if the `assistantConfig$` value and `REST_REQUEST_URL` are available.
|
|
769
|
+
* If both are ready, it creates an `AssistantMetadataOperationContext` object and
|
|
770
|
+
* initializes the `assistantMetadataService` with it. The operation context provides
|
|
771
|
+
* methods to retrieve the REST URL, assistant configuration, and to set models and functions.
|
|
772
|
+
*
|
|
773
|
+
* If the required values are not ready, an error is logged to the console.
|
|
774
|
+
*
|
|
775
|
+
* @private
|
|
776
|
+
*/
|
|
777
|
+
private _initAssistantMetadataService;
|
|
778
|
+
/**
|
|
779
|
+
* Initializes the Assistant Tokens Tracking Service with the necessary operation context.
|
|
780
|
+
* This method sets up the service by providing it with functions to manage quotas,
|
|
781
|
+
* token consumption, usage metrics, and audit events, as well as access to assistant configuration
|
|
782
|
+
* and model retrieval.
|
|
783
|
+
*
|
|
784
|
+
* The initialization will only proceed if the assistant configuration is available.
|
|
785
|
+
* If the configuration is not ready, an error message is logged to the console.
|
|
786
|
+
*
|
|
787
|
+
* @private
|
|
788
|
+
*/
|
|
789
|
+
private _initAssistantTokensTrackingService;
|
|
790
|
+
/**
|
|
791
|
+
* Initializes the Assistant WebSocket Frames Service with the necessary operation context.
|
|
792
|
+
* This method sets up the required dependencies and configuration for the service to function properly.
|
|
793
|
+
* It ensures that the assistant configuration and connection are available before initializing the service.
|
|
794
|
+
*
|
|
795
|
+
* The operation context provides various utility functions and state management methods, including:
|
|
796
|
+
* - Accessing the assistant configuration, chat instance ID, saved chat ID, and chat history.
|
|
797
|
+
* - Managing streaming and stopping generation statuses.
|
|
798
|
+
* - Updating quota and chat usage metrics.
|
|
799
|
+
* - Generating audit events.
|
|
800
|
+
* - Managing saved chats (adding, updating, and listing).
|
|
801
|
+
*
|
|
802
|
+
* If the required dependencies (`assistantConfig$` and `connection`) are not ready, an error is logged.
|
|
803
|
+
*
|
|
804
|
+
* @private
|
|
805
|
+
*/
|
|
806
|
+
private _initAssistantWsFramesService;
|
|
807
|
+
private _initDebugMessageService;
|
|
808
|
+
get assistants(): any;
|
|
809
|
+
/**
|
|
810
|
+
* Get the instance ID of the chat service
|
|
811
|
+
* @returns The instance ID of the chat service
|
|
812
|
+
*/
|
|
813
|
+
get chatInstanceId(): string;
|
|
814
|
+
/**
|
|
815
|
+
* Persist the instance ID of the chat service
|
|
816
|
+
* @param instanceId The instance ID of the chat service
|
|
817
|
+
*/
|
|
818
|
+
setChatInstanceId(instanceId: string): void;
|
|
819
|
+
/**
|
|
820
|
+
* Get the ID of the current chat discussion which is used to save/get/delete the discussion and identify audit events
|
|
821
|
+
* @returns The ID of the current chat discussion
|
|
822
|
+
*/
|
|
823
|
+
get chatId(): string;
|
|
824
|
+
/**
|
|
825
|
+
* Generate an GUID for the current chat discussion which is used to save/get/delete it and identify audit events
|
|
826
|
+
* @param chatId if provided, it will be considered as the ID of the current chat discussion which is used to identify audit events
|
|
827
|
+
*/
|
|
828
|
+
generateChatId(chatId?: string): void;
|
|
829
|
+
/**
|
|
830
|
+
* Initialize the chat config by managing ONLY sub-object **defaultValues** configs of the standard app config (defined in the customization json tab ) and the user preferences.
|
|
831
|
+
* To do so, a tracking mechanism is implemented to notify the user about the available updates in the defaultValues object of the standard app config.
|
|
832
|
+
* The rest of the config object coming from "standard app config" is used as it is without any override.
|
|
833
|
+
* Thus, the user preferences are used only for the defaultValues object.
|
|
834
|
+
* This provide a centralized way to manage the rest of the config object by admins and ensure a unique common behavior for all users.
|
|
835
|
+
*/
|
|
836
|
+
initChatConfig(): Promise<void>;
|
|
837
|
+
/**
|
|
838
|
+
* Update the chat config and store its defaultValues in the user preferences
|
|
839
|
+
* @param config The updated chat config
|
|
840
|
+
* @param hashes The updated hashes to store in the user preferences
|
|
841
|
+
* @param notify Whether to notify the user about the update
|
|
842
|
+
* @param successCallback The callback to execute if the update is successful
|
|
843
|
+
* @param errorCallback The callback to execute if the update fails
|
|
844
|
+
*/
|
|
845
|
+
updateChatConfig(config: ChatConfig, hashes?: {
|
|
846
|
+
"applied-defaultValues-hash"?: string;
|
|
847
|
+
"skipped-defaultValues-hash"?: string;
|
|
848
|
+
}, notify?: boolean, successCallback?: () => any, errorCallback?: () => any): void;
|
|
849
|
+
/**
|
|
850
|
+
* Overrides the logged in user
|
|
851
|
+
*/
|
|
852
|
+
overrideUser(): void;
|
|
853
|
+
/**
|
|
854
|
+
* Calls the Fetch API to retrieve a new message given all previous messages
|
|
855
|
+
*/
|
|
856
|
+
fetch(messages: ChatMessage[], query: Query): Observable<ChatResponse>;
|
|
857
|
+
/**
|
|
858
|
+
* Return the list of models available on the server
|
|
859
|
+
*/
|
|
860
|
+
listModels(): Observable<GllmModelDescription[] | undefined>;
|
|
861
|
+
/**
|
|
862
|
+
* Return the list of functions available on the server AND matching enabled functions in the chat config
|
|
863
|
+
*/
|
|
864
|
+
listFunctions(): Observable<GllmFunction[] | undefined>;
|
|
865
|
+
/**
|
|
866
|
+
* Stops the assistant answer generation and cancels all the ongoing and pending related tasks
|
|
867
|
+
*/
|
|
868
|
+
stopGeneration(): Observable<boolean>;
|
|
869
|
+
/**
|
|
870
|
+
* A handler for quota updates each time the chat is invoked.
|
|
871
|
+
* It emits the updated quota to the quota$ subject, emits accordingly the updated user's tokens consumption and notifies the user if the max quota is reached.
|
|
872
|
+
* @param quota The updated quota
|
|
873
|
+
* @param propagateError Whether to propagate the error to the caller
|
|
874
|
+
*/
|
|
875
|
+
updateQuota(quota: Quota, propagateError?: boolean): void;
|
|
876
|
+
/**
|
|
877
|
+
* A handler for chat usage metrics each time the generation of the assistant response is completed.
|
|
878
|
+
* It emits the chat usage metrics to the chatUsageMetrics$ subject, emits accordingly the updated chat's tokens consumption
|
|
879
|
+
* @param chatUsageMetrics The chat usage metrics
|
|
880
|
+
*/
|
|
881
|
+
updateChatUsageMetrics(chatUsageMetrics: ChatUsageMetrics): void;
|
|
882
|
+
/**
|
|
883
|
+
* Get the model description for the given (serviceId + modelId)
|
|
884
|
+
* If a model is not found, an error message is returned
|
|
885
|
+
* @param serviceId The serviceId of the model
|
|
886
|
+
* @param modelId The modelId of the model
|
|
887
|
+
* @returns The model description
|
|
888
|
+
*/
|
|
889
|
+
getModel(serviceId: string, modelId: string): GllmModelDescription | undefined;
|
|
890
|
+
/**
|
|
891
|
+
* Fetch the list saved chats belonging to a specific instance of the assistant
|
|
892
|
+
*/
|
|
893
|
+
listSavedChat(): void;
|
|
894
|
+
/**
|
|
895
|
+
* Return the saved chat with the given id, if exists. Otherwise, return undefined
|
|
896
|
+
* @param id The id of the saved chat
|
|
897
|
+
*/
|
|
898
|
+
getSavedChat(id: string): Observable<SavedChatHistory | undefined>;
|
|
899
|
+
/**
|
|
900
|
+
* Check if a saved chat with the given id already exists
|
|
901
|
+
* @param id The id of the saved chat
|
|
902
|
+
* @returns True if the saved chat exists, false otherwise
|
|
903
|
+
*/
|
|
904
|
+
isExistingSavedChat(id: string): Observable<boolean>;
|
|
905
|
+
/**
|
|
906
|
+
* Save a chat with the given messages
|
|
907
|
+
* @param messages The messages to add to the saved chat index
|
|
908
|
+
* @returns The saved chat
|
|
909
|
+
*/
|
|
910
|
+
addSavedChat(id: string, messages: ChatMessage[]): Observable<SavedChatResponse>;
|
|
911
|
+
/**
|
|
912
|
+
* Update a saved chat with the given id.
|
|
913
|
+
* @param id The id of the saved chat
|
|
914
|
+
* @param name The new name of the saved chat, if provided
|
|
915
|
+
* @param messages The messages to update the saved chat history, if provided
|
|
916
|
+
* @returns True if the saved chat has been successfully updated
|
|
917
|
+
*/
|
|
918
|
+
updateSavedChat(id: string, name?: string, messages?: ChatMessage[]): Observable<SavedChatResponse>;
|
|
919
|
+
/**
|
|
920
|
+
* Bulk delete of saved chats matching the given ids
|
|
921
|
+
* @param ids List of ids of the saved chats to delete
|
|
922
|
+
* @returns The number of deleted chats
|
|
923
|
+
*/
|
|
924
|
+
deleteSavedChat(ids: string[]): Observable<DeleteSavedChatResponse>;
|
|
925
|
+
getDebugMessage(message: DebugMessage): Observable<KvObject | ListObject | undefined>;
|
|
926
|
+
/**
|
|
927
|
+
* Initialize out-of-the-box handlers
|
|
928
|
+
* It is a placeholder for non-streaming scenarios, where you invoke a specific hub method, and the server responds with frame message(s)
|
|
929
|
+
*/
|
|
930
|
+
initMessageHandlers(): void;
|
|
931
|
+
/**
|
|
932
|
+
* Override and register the entire _messageHandlers map by merging the provided map with the default one
|
|
933
|
+
* @param _messageHandlers
|
|
934
|
+
*/
|
|
935
|
+
overrideMessageHandlers<T>(_messageHandlers: Map<string, MessageHandler<T>>): void;
|
|
936
|
+
/**
|
|
937
|
+
* Add a listener for a specific event.
|
|
938
|
+
* If a listener for this same event already exists, it will be overridden.
|
|
939
|
+
* If the listener has "isGlobalHandler" set to true, it will be registered to the hub connection.
|
|
940
|
+
* @param eventName Name of the event to register a listener for
|
|
941
|
+
* @param eventHandler The handler to be called when the event is received
|
|
942
|
+
*/
|
|
943
|
+
addMessageHandler<T>(eventName: string, eventHandler: MessageHandler<T>): void;
|
|
944
|
+
/**
|
|
945
|
+
* Remove a listener for a specific event from the _messageHandlers map and unsubscribe from receiving messages for this event from the SignalR hub.
|
|
946
|
+
* @param eventName Name of the event to remove the listener for
|
|
947
|
+
*/
|
|
948
|
+
removeMessageHandler(eventName: string): void;
|
|
949
|
+
/**
|
|
950
|
+
* Build a connection to the signalR websocket and register default listeners to the methods defined in the server hub class
|
|
951
|
+
* @param options The options for the connection. It overrides the default options
|
|
952
|
+
* @param logLevel Define the log level displayed in the console
|
|
953
|
+
* @returns Promise that resolves when the connection is built
|
|
954
|
+
*/
|
|
955
|
+
buildConnection(options?: ConnectionOptions): Promise<void>;
|
|
956
|
+
/**
|
|
957
|
+
* Start the connection
|
|
958
|
+
* @returns Promise that resolves when the connection is started
|
|
959
|
+
*/
|
|
960
|
+
startConnection(): Promise<void>;
|
|
961
|
+
/**
|
|
962
|
+
* Stop the connection
|
|
963
|
+
* @returns Promise that resolves when the connection is stopped
|
|
964
|
+
*/
|
|
965
|
+
stopConnection(): Promise<void>;
|
|
966
|
+
/**
|
|
967
|
+
* Generate an audit event with the given type and details. The generated audit event is sent afterwards via the AuditWebService
|
|
968
|
+
* @param type Audit event type
|
|
969
|
+
* @param details Audit event details
|
|
970
|
+
* @param id Actions (savedChat delete/rename/...) may occur on a specific chat different than the current one stored in this service, so the chat id can be provided
|
|
971
|
+
*/
|
|
972
|
+
generateAuditEvent(type: string, details: Record<string, any>, id?: string): Promise<void>;
|
|
973
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatService, never>;
|
|
974
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChatService>;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* A service to create and manage instances of ChatService dynamically based on the provided component references and the implementation type (http or websocket)
|
|
979
|
+
* All chat-related components should share the same instance of this InstanceManagerService, which in turn provides the appropriate instance of ChatService
|
|
980
|
+
*/
|
|
981
|
+
declare class InstanceManagerService {
|
|
982
|
+
private _serviceInstances;
|
|
983
|
+
/**
|
|
984
|
+
* Store the instance of ChatService in the map
|
|
985
|
+
* @param key key differentiator between components used to store their corresponding ChatService instance
|
|
986
|
+
* @param service The ChatService instance
|
|
987
|
+
*/
|
|
988
|
+
storeInstance(key: string, service: ChatService): void;
|
|
989
|
+
/**
|
|
990
|
+
* @param key key differentiator between components based on which the corresponding ChatService instance is fetched
|
|
991
|
+
* @returns The instance of the service corresponding to the instance of the component
|
|
992
|
+
*/
|
|
993
|
+
getInstance(key: string): ChatService;
|
|
994
|
+
/**
|
|
995
|
+
*
|
|
996
|
+
* @param key key differentiator between components based on which the check for an existent ChatService instance is performed
|
|
997
|
+
* @returns True if a ChatService instance has been already instantiated for the given key. Otherwise, false.
|
|
998
|
+
*/
|
|
999
|
+
checkInstance(key: string): boolean;
|
|
1000
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InstanceManagerService, never>;
|
|
1001
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InstanceManagerService>;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
declare class ChatSettingsV3Component implements OnInit, OnDestroy {
|
|
1005
|
+
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
1006
|
+
instanceId: string;
|
|
1007
|
+
_update: EventEmitter<ChatConfig>;
|
|
1008
|
+
_cancel: EventEmitter<ChatConfig>;
|
|
1009
|
+
chatService: ChatService;
|
|
1010
|
+
config: ChatConfig;
|
|
1011
|
+
subscription: Subscription;
|
|
1012
|
+
selectedModel: GllmModelDescription | undefined;
|
|
1013
|
+
functions: {
|
|
1014
|
+
name: string;
|
|
1015
|
+
enabled: boolean;
|
|
1016
|
+
}[];
|
|
1017
|
+
isAdmin: boolean;
|
|
1018
|
+
showDebugToggle: boolean;
|
|
1019
|
+
instanceManagerService: InstanceManagerService;
|
|
1020
|
+
principalService: PrincipalService;
|
|
1021
|
+
appService: AppService;
|
|
1022
|
+
ngOnInit(): void;
|
|
1023
|
+
ngOnDestroy(): void;
|
|
1024
|
+
get hasPrompts(): boolean;
|
|
1025
|
+
get hasAdvancedParameters(): boolean;
|
|
1026
|
+
get hasModel(): boolean;
|
|
1027
|
+
instantiateChatService(): void;
|
|
1028
|
+
onChatModelChange(selectedModel: GllmModelDescription): void;
|
|
1029
|
+
getFunctionDescription(name: string): string;
|
|
1030
|
+
toggleFunctionsSelection(name: string): void;
|
|
1031
|
+
private initFunctionsList;
|
|
1032
|
+
/**
|
|
1033
|
+
* Save the new chat config in the chat service and the user preferences
|
|
1034
|
+
* If the user has never modified the default values, we need to save the hash of the standard default values, as defined by the admin, in order to properly track changes afterwards.
|
|
1035
|
+
*/
|
|
1036
|
+
save(): Promise<void>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Cancel the current changes
|
|
1039
|
+
*/
|
|
1040
|
+
cancel(): void;
|
|
1041
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatSettingsV3Component, never>;
|
|
1042
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatSettingsV3Component, "sq-chat-settings-v3", never, { "instanceId": { "alias": "instanceId"; "required": false; }; }, { "_update": "update"; "_cancel": "cancel"; }, never, never, true, never>;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
declare class SearchService {
|
|
1046
|
+
query: Query;
|
|
1047
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchService, never>;
|
|
1048
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SearchService>;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
declare class ChatComponent implements OnInit, OnChanges, OnDestroy {
|
|
1052
|
+
chatService: ChatService;
|
|
1053
|
+
instanceManagerService: InstanceManagerService;
|
|
1054
|
+
searchService: SearchService;
|
|
1055
|
+
principalService: PrincipalService;
|
|
1056
|
+
cdr: ChangeDetectorRef;
|
|
1057
|
+
notificationsService: NotificationsService;
|
|
1058
|
+
private readonly transloco;
|
|
1059
|
+
private readonly assistantUtils;
|
|
1060
|
+
private destroyRef;
|
|
1061
|
+
/** Define the key based on it, the chat service instance will be stored */
|
|
1062
|
+
instanceId: string;
|
|
1063
|
+
/** Define the query to use to fetch answers */
|
|
1064
|
+
query: Query;
|
|
1065
|
+
/** Function that determines whether the chat should be reloaded after the query changes
|
|
1066
|
+
* If not provided, the chat will be reloaded by default
|
|
1067
|
+
* @param prevQuery The previous query
|
|
1068
|
+
* @param newQuery The new query
|
|
1069
|
+
* @returns true if the chat should be reloaded, false otherwise
|
|
1070
|
+
*/
|
|
1071
|
+
queryChangeShouldTriggerReload: (prevQuery: Query, newQuery: Query) => boolean;
|
|
1072
|
+
/** Map of listeners overriding default registered ones*/
|
|
1073
|
+
messageHandlers: Map<string, MessageHandler<any>>;
|
|
1074
|
+
/** When the assistant answer a user question, automatically scroll down to the bottom of the discussion */
|
|
1075
|
+
automaticScrollToLastResponse: boolean;
|
|
1076
|
+
/** When the assistant answer a user question, automatically focus to the chat input */
|
|
1077
|
+
focusAfterResponse: boolean;
|
|
1078
|
+
/** A chat discussion that the component should get initialized with it */
|
|
1079
|
+
chat?: InitChat;
|
|
1080
|
+
/** Icon to use for the assistant messages */
|
|
1081
|
+
assistantMessageIcon: string;
|
|
1082
|
+
/** Icon to use for the user messages */
|
|
1083
|
+
userMessageIcon: string;
|
|
1084
|
+
/** Icon to use for the connection error messages */
|
|
1085
|
+
connectionErrorMessageIcon: string;
|
|
1086
|
+
/** Icon to use for the search warning messages */
|
|
1087
|
+
searchWarningMessageIcon: string;
|
|
1088
|
+
additionalWorkflowProperties: Record<string, any>;
|
|
1089
|
+
/** Used by assistant web component to pass properly init the global config */
|
|
1090
|
+
appConfig: AppGlobalConfig;
|
|
1091
|
+
/** Whether the chat component is displayed in a collapsed state */
|
|
1092
|
+
collapsed: boolean;
|
|
1093
|
+
/** Event emitter triggered once the signalR connection is established */
|
|
1094
|
+
connection: EventEmitter<HubConnection>;
|
|
1095
|
+
/** Event emitter triggered each time the assistant updates the current chat */
|
|
1096
|
+
/** Event emitter triggered when the chat is loading new content */
|
|
1097
|
+
loading$: EventEmitter<boolean>;
|
|
1098
|
+
/** Emits the assistant configuration used when instantiating the component */
|
|
1099
|
+
_config: EventEmitter<ChatConfig>;
|
|
1100
|
+
data: EventEmitter<ChatMessage[]>;
|
|
1101
|
+
/** Event emitter triggered when the user clicks to open the original document representing the context attachment*/
|
|
1102
|
+
openDocument: EventEmitter<Article>;
|
|
1103
|
+
/** Event emitter triggered when the user clicks to open the preview of a document representing the context attachment */
|
|
1104
|
+
openPreview: EventEmitter<ChatContextAttachment>;
|
|
1105
|
+
/** Event emitter triggered when the user clicks on a suggested action */
|
|
1106
|
+
suggestAction: EventEmitter<SuggestedAction>;
|
|
1107
|
+
/** ViewChild decorators to access the template elements */
|
|
1108
|
+
questionInput?: ElementRef<HTMLTextAreaElement>;
|
|
1109
|
+
/** ContentChild decorators allowing the override of the default templates from the parent component */
|
|
1110
|
+
loadingTpl?: TemplateRef<any>;
|
|
1111
|
+
reportTpl?: TemplateRef<any>;
|
|
1112
|
+
tokenConsumptionTpl?: TemplateRef<any>;
|
|
1113
|
+
debugMessagesTpl?: TemplateRef<any>;
|
|
1114
|
+
config: ChatConfig;
|
|
1115
|
+
messages$: BehaviorSubject<ChatMessage[] | undefined>;
|
|
1116
|
+
isAdminOrDeletedAdmin: boolean;
|
|
1117
|
+
question: string;
|
|
1118
|
+
private _dataSubscription;
|
|
1119
|
+
/** Variables that depend on the type of model in use */
|
|
1120
|
+
modelDescription?: GllmModelDescription;
|
|
1121
|
+
indexMessageToEdit?: number;
|
|
1122
|
+
rankMessageToEdit?: number;
|
|
1123
|
+
changes$: BehaviorSubject<SimpleChanges | undefined>;
|
|
1124
|
+
currentMessageIndex: number | undefined;
|
|
1125
|
+
firstChangesHandled: boolean;
|
|
1126
|
+
isAtBottom: boolean;
|
|
1127
|
+
initializationError: boolean;
|
|
1128
|
+
enabledUserInput: boolean;
|
|
1129
|
+
isConnected: boolean;
|
|
1130
|
+
retrialAttempts: number | undefined;
|
|
1131
|
+
private _isReconnectedListenerRegistered;
|
|
1132
|
+
issueTypes?: string[];
|
|
1133
|
+
defaultIssueTypes: string[];
|
|
1134
|
+
issueType: string;
|
|
1135
|
+
reportComment?: string;
|
|
1136
|
+
messageToReport?: ChatMessage;
|
|
1137
|
+
reportRank?: number;
|
|
1138
|
+
reportType: 'like' | 'dislike';
|
|
1139
|
+
showReport: boolean;
|
|
1140
|
+
debugMessages: DebugMessage[] | undefined;
|
|
1141
|
+
showDebugMessages: boolean;
|
|
1142
|
+
private _previousQuery;
|
|
1143
|
+
private _reloadSubscription;
|
|
1144
|
+
constructor();
|
|
1145
|
+
ngOnInit(): void;
|
|
1146
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1147
|
+
ngOnDestroy(): void;
|
|
1148
|
+
get isAdmin(): boolean;
|
|
1149
|
+
/**
|
|
1150
|
+
* This chat service instance is stored in the instanceManagerService with provided @input instanceId as a key
|
|
1151
|
+
*/
|
|
1152
|
+
instantiateChatService(): void;
|
|
1153
|
+
/**
|
|
1154
|
+
* Handles the changes in the chat component.
|
|
1155
|
+
* If the chat service is a WebSocketChatService, it handles the override of the message handlers if they exist.
|
|
1156
|
+
* Initializes the chat with the provided chat messages if they exist, otherwise loads the default chat.
|
|
1157
|
+
* If the chat is initialized, the initialization event is "Query", the query changes, and the queryChangeShouldTriggerReload function is provided,
|
|
1158
|
+
* then the chat should be reloaded if the function returns true. Otherwise, the chat should be reloaded by default.
|
|
1159
|
+
* It takes into account the ongoing streaming process and the ongoing stopping process to trigger that conditionally define the logic
|
|
1160
|
+
* of the reload :
|
|
1161
|
+
* - If the chat is streaming, then stop the generation and wait for the fetch to complete before reloading the chat.
|
|
1162
|
+
* - If the chat is stopping the generation, then wait for the fetch to complete before reloading the chat.
|
|
1163
|
+
*/
|
|
1164
|
+
private _handleChanges;
|
|
1165
|
+
/**
|
|
1166
|
+
* Triggers a reload after the query change.
|
|
1167
|
+
* This method performs the necessary operations to reload the chat after a query change.
|
|
1168
|
+
* It sets the system and user messages, resets the savedChatId, generates a new chatId,
|
|
1169
|
+
* generates a new chat audit event, and handles the query mode.
|
|
1170
|
+
*/
|
|
1171
|
+
private _triggerReloadAfterQueryChange;
|
|
1172
|
+
/**
|
|
1173
|
+
* Adds a scroll listener to the message list element.
|
|
1174
|
+
* The listener is triggered when any of the following events occur:
|
|
1175
|
+
* - Loading state changes
|
|
1176
|
+
* - Messages change
|
|
1177
|
+
* - Streaming state changes
|
|
1178
|
+
* - Scroll event occurs on the message list element
|
|
1179
|
+
*
|
|
1180
|
+
* When the listener is triggered, it updates the `isAtBottom` property.
|
|
1181
|
+
*/
|
|
1182
|
+
private _addScrollListener;
|
|
1183
|
+
/**
|
|
1184
|
+
* Get the model description based on the defaultValues service_id and model_id
|
|
1185
|
+
*/
|
|
1186
|
+
updateModelDescription(): void;
|
|
1187
|
+
/**
|
|
1188
|
+
* Submits a question from the user.
|
|
1189
|
+
* If the user is editing a previous message, removes all subsequent messages from the chat history.
|
|
1190
|
+
* Triggers the fetch of the answer for the submitted question by calling _fetchAnswer().
|
|
1191
|
+
* Clears the input value in the UI.
|
|
1192
|
+
* ⚠️ If the chat is streaming or stopping the generation, the operation is not allowed.
|
|
1193
|
+
*/
|
|
1194
|
+
submitQuestion(): void;
|
|
1195
|
+
/**
|
|
1196
|
+
* Triggers the fetch of the answer for the given question and updates the conversation.
|
|
1197
|
+
* Generates an audit event for the user input.
|
|
1198
|
+
*
|
|
1199
|
+
* @param question - The question asked by the user.
|
|
1200
|
+
* @param conversation - The current conversation messages.
|
|
1201
|
+
*/
|
|
1202
|
+
private _fetchAnswer;
|
|
1203
|
+
/**
|
|
1204
|
+
* Depending on the connection's state :
|
|
1205
|
+
* - If connected => given a list of messages, the chat endpoint is invoked for a continuation and updates the list of messages accordingly.
|
|
1206
|
+
* - If any other state => a connection error message is displayed in the chat.
|
|
1207
|
+
* ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
|
|
1208
|
+
* @param messages The list of messages to invoke the chat endpoint with
|
|
1209
|
+
*/
|
|
1210
|
+
fetch(messages: ChatMessage[]): void;
|
|
1211
|
+
/**
|
|
1212
|
+
* Retry to fetch the messages if the connection issues.
|
|
1213
|
+
* - If reconnecting => keep display the connection error message even when clicking on the "retry" button and increasing the number of retrial attempts, until the connection is re-established
|
|
1214
|
+
* - If disconnected => On click on the "retry" button, start the connection process while displaying the connection error message :
|
|
1215
|
+
* * If successful => given a list of messages, the chat endpoint is invoked for a continuation and updates the list of messages accordingly.
|
|
1216
|
+
* * If failed => increase the number of retrial attempts
|
|
1217
|
+
*/
|
|
1218
|
+
retryFetch(): void;
|
|
1219
|
+
/**
|
|
1220
|
+
* Check if the signalR connection is connected.
|
|
1221
|
+
* For the REST protocol, the connection is always considered connected (for the moment).
|
|
1222
|
+
*/
|
|
1223
|
+
private _updateConnectionStatus;
|
|
1224
|
+
/**
|
|
1225
|
+
* Update the UI with the new messages
|
|
1226
|
+
* @param messages
|
|
1227
|
+
*/
|
|
1228
|
+
updateData(messages: ChatMessage[]): void;
|
|
1229
|
+
/**
|
|
1230
|
+
* @returns true if the chat discussion is scrolled down to the bottom, false otherwise
|
|
1231
|
+
*/
|
|
1232
|
+
private _toggleScrollButtonVisibility;
|
|
1233
|
+
/**
|
|
1234
|
+
* Scroll down to the bottom of the chat discussion
|
|
1235
|
+
*/
|
|
1236
|
+
scrollDown(): void;
|
|
1237
|
+
/**
|
|
1238
|
+
* Start a new chat with the defaultValues settings.
|
|
1239
|
+
* The savedChatId in the chat service will be reset, so that the upcoming saved chat operations will be performed on the fresh new chat.
|
|
1240
|
+
* If the savedChat feature is enabled, the list of saved chats will be refreshed.
|
|
1241
|
+
* ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
|
|
1242
|
+
*/
|
|
1243
|
+
newChat(): void;
|
|
1244
|
+
/**
|
|
1245
|
+
* Attaches the specified document IDs to the assistant.
|
|
1246
|
+
* If no document IDs are provided, the operation is not allowed.
|
|
1247
|
+
* If the action for attaching a document is not defined at the application customization level, an error is logged.
|
|
1248
|
+
* ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
|
|
1249
|
+
* @param ids - An array of document IDs to attach.
|
|
1250
|
+
*/
|
|
1251
|
+
attachToChat(ids: string[]): void;
|
|
1252
|
+
/**
|
|
1253
|
+
* Start the default chat with the defaultValues settings
|
|
1254
|
+
* If the chat is meant to be initialized with event === "Query", the corresponding user query message will be added to the chat history
|
|
1255
|
+
*/
|
|
1256
|
+
loadDefaultChat(): void;
|
|
1257
|
+
/**
|
|
1258
|
+
* Handles the prompt mode of the chat component.
|
|
1259
|
+
* If `sendUserPrompt` is true, it opens the chat with both system and user messages,
|
|
1260
|
+
* and generates audit events for both messages.
|
|
1261
|
+
* If `sendUserPrompt` is false, it opens the chat with only the system message,
|
|
1262
|
+
* and generates an audit event for the system message.
|
|
1263
|
+
*
|
|
1264
|
+
* @param systemMsg - The system message to be displayed in the chat.
|
|
1265
|
+
* @param userMsg - The user message to be displayed in the chat (optional).
|
|
1266
|
+
*/
|
|
1267
|
+
private _handlePromptMode;
|
|
1268
|
+
/**
|
|
1269
|
+
* Handles the query mode by displaying the system message, user message, and user query message.
|
|
1270
|
+
* If the provided query text is not empty, then add the user query message to the chat history and invoke the assistant
|
|
1271
|
+
* Otherwise, just start a new chat with a warning message inviting the user to perform a full text search to retrieve some results
|
|
1272
|
+
* @param systemMsg - The system message to be displayed.
|
|
1273
|
+
* @param userMsg - The user message to be displayed.
|
|
1274
|
+
*/
|
|
1275
|
+
private _handleQueryMode;
|
|
1276
|
+
private _defineMessageAuditDetails;
|
|
1277
|
+
/**
|
|
1278
|
+
* Start/open a new chat with the provided messages and chatId
|
|
1279
|
+
* If the last message is from the user, a request to the assistant is made to get an answer
|
|
1280
|
+
* If the last message is from the assistant, the conversation is loaded right away
|
|
1281
|
+
* @param messages The list of messages of the chat
|
|
1282
|
+
* @param chatId The id of the discussion. If provided (ie. an existing discussion in the saved chat index), update the chatId in the chat service for the upcoming saved chat operations
|
|
1283
|
+
*/
|
|
1284
|
+
openChat(messages: RawMessage[], chatId?: string): void;
|
|
1285
|
+
/**
|
|
1286
|
+
* Reset the chat by clearing the chat history and the UI accordingly
|
|
1287
|
+
* The user input will be cleared
|
|
1288
|
+
* The fetch subscription will be terminated
|
|
1289
|
+
*/
|
|
1290
|
+
resetChat(): void;
|
|
1291
|
+
/**
|
|
1292
|
+
* Fetch and Load the saved chat from the saved chat index.
|
|
1293
|
+
* If the saved chat is found, the chat discussion will be loaded with the provided messages and chatId
|
|
1294
|
+
*/
|
|
1295
|
+
onLoadChat(): void;
|
|
1296
|
+
/**
|
|
1297
|
+
* Stop the generation of the current assistant's answer.
|
|
1298
|
+
* The fetch subscription will be terminated.
|
|
1299
|
+
*/
|
|
1300
|
+
stopGeneration(): void;
|
|
1301
|
+
/**
|
|
1302
|
+
* Terminate the fetch process by unsubscribing from the data subscription and updating the loading status to false.
|
|
1303
|
+
* Additionally, focus on the chat input if the focusAfterResponse flag is set to true.
|
|
1304
|
+
*/
|
|
1305
|
+
terminateFetch(): void;
|
|
1306
|
+
/**
|
|
1307
|
+
* Copy a previous user message of the chat history to the chat user input.
|
|
1308
|
+
* Thus, the user can edit and resubmit the message.
|
|
1309
|
+
* Once the edited message is submitted, all subsequent messages starting from @param index will be removed from the history and the UI will be updated accordingly.
|
|
1310
|
+
* The assistant will regenerate a new answer based on the updated chat history.
|
|
1311
|
+
* ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
|
|
1312
|
+
* @param message The user's message to edit
|
|
1313
|
+
* @param index The index of the user's message to edit
|
|
1314
|
+
* @returns void
|
|
1315
|
+
*/
|
|
1316
|
+
editMessage(message: ChatMessage, index: number): void;
|
|
1317
|
+
/**
|
|
1318
|
+
* Copy a previous assistant message of the chat history to the clipboard.
|
|
1319
|
+
* @param message The message to copy
|
|
1320
|
+
* @param index The index of the message to copy
|
|
1321
|
+
* @returns void
|
|
1322
|
+
*/
|
|
1323
|
+
copyMessage(message: ChatMessage, index: number): void;
|
|
1324
|
+
/**
|
|
1325
|
+
* Starting from the provided index, remove all subsequent messages from the chat history and the UI accordingly.
|
|
1326
|
+
* The assistant will regenerate a new answer based on the updated chat history.
|
|
1327
|
+
* ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
|
|
1328
|
+
* @param message The assistant's message to regenerate
|
|
1329
|
+
* @param index The index of the assistant's message to regenerate
|
|
1330
|
+
*/
|
|
1331
|
+
regenerateMessage(message: ChatMessage, index: number): void;
|
|
1332
|
+
/**
|
|
1333
|
+
* Handles the key up event for 'Backspace' and 'Enter' keys.
|
|
1334
|
+
* @param event - The keyboard event.
|
|
1335
|
+
*/
|
|
1336
|
+
onKeyUp(event: KeyboardEvent): void;
|
|
1337
|
+
/**
|
|
1338
|
+
* Calculates and adjusts the height of the question input element based on its content.
|
|
1339
|
+
* If the Enter key is pressed without the Shift key, it prevents the default behavior.
|
|
1340
|
+
* @param event The keyboard event
|
|
1341
|
+
*/
|
|
1342
|
+
calculateHeight(event?: KeyboardEvent): void;
|
|
1343
|
+
/**
|
|
1344
|
+
* Send a "like" event on clicking on the thumb-up icon of an assistant's message
|
|
1345
|
+
* @param message The assistant message to like
|
|
1346
|
+
* @param index The index of the message to like
|
|
1347
|
+
*/
|
|
1348
|
+
onLike(message: ChatMessage, index: number): void;
|
|
1349
|
+
/**
|
|
1350
|
+
* Send a "dislike" event on clicking on the thumb-down icon of an assistant's message.
|
|
1351
|
+
* It also opens the issue reporting dialog.
|
|
1352
|
+
* @param message The assistant message to dislike
|
|
1353
|
+
* @param index The rank of the message to dislike
|
|
1354
|
+
*/
|
|
1355
|
+
onDislike(message: ChatMessage, index: number): void;
|
|
1356
|
+
private _updateChatHistory;
|
|
1357
|
+
/**
|
|
1358
|
+
* Report an issue related to the assistant's message.
|
|
1359
|
+
*/
|
|
1360
|
+
sendReport(): void;
|
|
1361
|
+
/**
|
|
1362
|
+
* Close the reporting dialog.
|
|
1363
|
+
*/
|
|
1364
|
+
ignoreReport(): void;
|
|
1365
|
+
/**
|
|
1366
|
+
* Handle the click on a reference's 'open preview'.
|
|
1367
|
+
* @param data
|
|
1368
|
+
* @param message the message containing the reference
|
|
1369
|
+
* @param index index of the message containing the reference
|
|
1370
|
+
* @returns void
|
|
1371
|
+
*/
|
|
1372
|
+
openAttachmentPreview(data: {
|
|
1373
|
+
reference: ChatContextAttachment;
|
|
1374
|
+
partId?: number;
|
|
1375
|
+
}, message: ChatMessage, index: number): void;
|
|
1376
|
+
/**
|
|
1377
|
+
* Handle the click on a reference's 'open original document'.
|
|
1378
|
+
* @param data
|
|
1379
|
+
* @param message the message containing the reference
|
|
1380
|
+
* @param index index of the message containing the reference
|
|
1381
|
+
* @returns void
|
|
1382
|
+
*/
|
|
1383
|
+
openOriginalAttachment(data: {
|
|
1384
|
+
reference: ChatContextAttachment;
|
|
1385
|
+
partId?: number;
|
|
1386
|
+
}, message: ChatMessage, index: number): void;
|
|
1387
|
+
/**
|
|
1388
|
+
* Handle the click on a suggested action.
|
|
1389
|
+
* @param action Suggested action.
|
|
1390
|
+
* @param index index of the message containing the suggested action.
|
|
1391
|
+
* @returns void
|
|
1392
|
+
*/
|
|
1393
|
+
suggestActionClick(action: SuggestedAction, index: number): void;
|
|
1394
|
+
/**
|
|
1395
|
+
* It looks for the debug messages available in the current group of "assistant" messages.
|
|
1396
|
+
* By design, the debug messages are only available in the first visible message among the group of "assistant" messages.
|
|
1397
|
+
* @param message The message containing the debug information
|
|
1398
|
+
* @param index The index of the message
|
|
1399
|
+
* @returns The debug messages available in the current group of "assistant" messages
|
|
1400
|
+
*/
|
|
1401
|
+
getDebugMessages(message: ChatMessage, index: number): DebugMessage[];
|
|
1402
|
+
/**
|
|
1403
|
+
* Handle the click on the 'show log info' button of a message.
|
|
1404
|
+
* @param message The message containing the debug information
|
|
1405
|
+
* @param index The index of the message
|
|
1406
|
+
*/
|
|
1407
|
+
showDebug(message: ChatMessage, index: number): void;
|
|
1408
|
+
/**
|
|
1409
|
+
* Verify whether the current message is an assistant message and that all following messages are assistant ones
|
|
1410
|
+
* Used to keep the "View progress" opened even though the assistant is sending additional messages after the current one
|
|
1411
|
+
* @param messages the list of current messages
|
|
1412
|
+
* @param index the index of the current message
|
|
1413
|
+
* @returns if this messages and the following ones (if any) are the last ones
|
|
1414
|
+
*/
|
|
1415
|
+
isAssistantLastMessages(messages: ChatMessage[], index: number): boolean;
|
|
1416
|
+
/**
|
|
1417
|
+
* Checks if the given message is an empty assistant message.
|
|
1418
|
+
* An empty assistant message is defined as a message with the role 'assistant',
|
|
1419
|
+
* an empty content, and no additional properties such as attachments, progress,
|
|
1420
|
+
* debug information, or suggested actions.
|
|
1421
|
+
*
|
|
1422
|
+
* @param message - The message to check.
|
|
1423
|
+
* @returns `true` if the message is an empty assistant message, `false` otherwise.
|
|
1424
|
+
*/
|
|
1425
|
+
isEmptyAssistantMessage(message: ChatMessage | undefined): boolean;
|
|
1426
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
|
|
1427
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "sq-chat-v3", never, { "instanceId": { "alias": "instanceId"; "required": false; }; "query": { "alias": "query"; "required": false; }; "queryChangeShouldTriggerReload": { "alias": "queryChangeShouldTriggerReload"; "required": false; }; "messageHandlers": { "alias": "messageHandlers"; "required": false; }; "automaticScrollToLastResponse": { "alias": "automaticScrollToLastResponse"; "required": false; }; "focusAfterResponse": { "alias": "focusAfterResponse"; "required": false; }; "chat": { "alias": "chat"; "required": false; }; "assistantMessageIcon": { "alias": "assistantMessageIcon"; "required": false; }; "userMessageIcon": { "alias": "userMessageIcon"; "required": false; }; "connectionErrorMessageIcon": { "alias": "connectionErrorMessageIcon"; "required": false; }; "searchWarningMessageIcon": { "alias": "searchWarningMessageIcon"; "required": false; }; "additionalWorkflowProperties": { "alias": "additionalWorkflowProperties"; "required": false; }; "appConfig": { "alias": "appConfig"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "connection": "connection"; "loading$": "loading"; "_config": "config"; "data": "data"; "openDocument": "openDocument"; "openPreview": "openPreview"; "suggestAction": "suggestAction"; }, ["loadingTpl", "reportTpl", "tokenConsumptionTpl", "debugMessagesTpl"], never, true, never>;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
declare class SavedChatsComponent implements OnInit, OnDestroy {
|
|
1431
|
+
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
1432
|
+
instanceId: string;
|
|
1433
|
+
load: EventEmitter<SavedChat>;
|
|
1434
|
+
delete: EventEmitter<SavedChat>;
|
|
1435
|
+
chatService: ChatService;
|
|
1436
|
+
subscription: Subscription;
|
|
1437
|
+
groupedSavedChats$: BehaviorSubject<{
|
|
1438
|
+
key: string;
|
|
1439
|
+
value: SavedChat[];
|
|
1440
|
+
}[]>;
|
|
1441
|
+
queryWebserviceForSearch?: string;
|
|
1442
|
+
private searchQuery;
|
|
1443
|
+
private searchText;
|
|
1444
|
+
private searchText$;
|
|
1445
|
+
instanceManagerService: InstanceManagerService;
|
|
1446
|
+
notificationsService: NotificationsService;
|
|
1447
|
+
private readonly transloco;
|
|
1448
|
+
private readonly assistantUtils;
|
|
1449
|
+
ngOnInit(): void;
|
|
1450
|
+
ngOnDestroy(): void;
|
|
1451
|
+
onSearch(event: Event): void;
|
|
1452
|
+
instantiateChatService(): void;
|
|
1453
|
+
onListSavedChat(): void;
|
|
1454
|
+
onLoad(savedChat: SavedChat): void;
|
|
1455
|
+
private _groupSavedChatsByDate;
|
|
1456
|
+
private searchSavedChats;
|
|
1457
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SavedChatsComponent, never>;
|
|
1458
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SavedChatsComponent, "sq-saved-chats-v3", never, { "instanceId": { "alias": "instanceId"; "required": false; }; }, { "load": "load"; "delete": "delete"; }, never, never, true, never>;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
declare class InitialsAvatarComponent {
|
|
1462
|
+
fullName: string;
|
|
1463
|
+
size: number;
|
|
1464
|
+
/**
|
|
1465
|
+
* Gives initials of a name and a safe color background to use,
|
|
1466
|
+
* assuming text color will be white
|
|
1467
|
+
* @param fullName full name to evaluate intials for
|
|
1468
|
+
* @param split string to use has splitter for `fullName`
|
|
1469
|
+
* @returns an `object` containing initials and color
|
|
1470
|
+
*/
|
|
1471
|
+
getInitialsAndColorFromFullName(fullName: string, split?: string): {
|
|
1472
|
+
initials: string;
|
|
1473
|
+
color: string;
|
|
1474
|
+
};
|
|
1475
|
+
/**
|
|
1476
|
+
* Gives initials of a name, ie:
|
|
1477
|
+
* ```
|
|
1478
|
+
* getInitialForFullName('John Snow') => 'JS'
|
|
1479
|
+
* getInitialForFullName('Geralt of Rivia', ' of ') => 'GR'
|
|
1480
|
+
* ```
|
|
1481
|
+
* @param fullName full name to evaluate intial for
|
|
1482
|
+
* @param split string to use has splitter
|
|
1483
|
+
* @returns string containg the first letter of splitted name
|
|
1484
|
+
*/
|
|
1485
|
+
getInitialsFromFullName(fullName: string, split?: string): string;
|
|
1486
|
+
/**
|
|
1487
|
+
* Gets a random color using text as seed
|
|
1488
|
+
* @param text string to use for color generation
|
|
1489
|
+
* @returns string formatted like `rgb(xxx, xxx, xxx)`
|
|
1490
|
+
*/
|
|
1491
|
+
getColorFromName(text: string): string;
|
|
1492
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InitialsAvatarComponent, never>;
|
|
1493
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InitialsAvatarComponent, "sq-initials-avatar", never, { "fullName": { "alias": "fullName"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
declare class FormatIconComponent implements OnChanges {
|
|
1497
|
+
extension: string;
|
|
1498
|
+
private _formatIcons;
|
|
1499
|
+
icon: string;
|
|
1500
|
+
ngOnChanges(): void;
|
|
1501
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatIconComponent, never>;
|
|
1502
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormatIconComponent, "sq-format-icon", never, { "extension": { "alias": "extension"; "required": false; }; }, {}, never, never, true, never>;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
type UploadConfig = {
|
|
1506
|
+
documentsUploadEnabled: boolean;
|
|
1507
|
+
constraints: {
|
|
1508
|
+
maxTotalFileSizeMB: number;
|
|
1509
|
+
remainingFileSizeMB: number;
|
|
1510
|
+
maxTotalFileCount: number;
|
|
1511
|
+
remainingFileCount: number;
|
|
1512
|
+
supportedFileExtensions: string[];
|
|
1513
|
+
};
|
|
1514
|
+
};
|
|
1515
|
+
type UploadResponse = {
|
|
1516
|
+
statusToken: string;
|
|
1517
|
+
executionTime: string;
|
|
1518
|
+
connectorResponse?: {
|
|
1519
|
+
collection: string;
|
|
1520
|
+
action: string;
|
|
1521
|
+
stats: {
|
|
1522
|
+
nbDocUpdated: number;
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1525
|
+
};
|
|
1526
|
+
type UploadingInfos = {
|
|
1527
|
+
loaded: number;
|
|
1528
|
+
total: number;
|
|
1529
|
+
progress: number;
|
|
1530
|
+
};
|
|
1531
|
+
type UploadProgressEvent = {
|
|
1532
|
+
type: 'uploadProgress';
|
|
1533
|
+
} & UploadingInfos;
|
|
1534
|
+
interface UploadResponseEvent {
|
|
1535
|
+
type: 'response';
|
|
1536
|
+
body: UploadResponse;
|
|
1537
|
+
}
|
|
1538
|
+
type UploadEvent = UploadProgressEvent | UploadResponseEvent;
|
|
1539
|
+
type IndexingInfos = {
|
|
1540
|
+
docs: {
|
|
1541
|
+
id: string;
|
|
1542
|
+
fileName: string;
|
|
1543
|
+
operation: "Add" | "Update";
|
|
1544
|
+
status: "Indexing" | "Indexed" | "Error";
|
|
1545
|
+
previousIndexationTime: string | null;
|
|
1546
|
+
currentIndexationTime: string | null;
|
|
1547
|
+
}[];
|
|
1548
|
+
isCompleted: boolean;
|
|
1549
|
+
executionTime: string;
|
|
1550
|
+
};
|
|
1551
|
+
interface UploadedDocuments {
|
|
1552
|
+
docs: UploadedDocument[];
|
|
1553
|
+
count: number;
|
|
1554
|
+
totalCount: number;
|
|
1555
|
+
executionTime: string;
|
|
1556
|
+
}
|
|
1557
|
+
interface UploadedDocument {
|
|
1558
|
+
id: string;
|
|
1559
|
+
fileName: string;
|
|
1560
|
+
title: string;
|
|
1561
|
+
fileExt: string;
|
|
1562
|
+
indexationTime: string;
|
|
1563
|
+
size: string;
|
|
1564
|
+
sizeDisplay: string;
|
|
1565
|
+
[key: string]: any;
|
|
1566
|
+
}
|
|
1567
|
+
interface deleteDocumentsResponse {
|
|
1568
|
+
deletedCount: number;
|
|
1569
|
+
executionTime: string;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
declare class DocumentsUploadService {
|
|
1573
|
+
readonly REQUEST_URL = "api/v1/plugin/SinequaAssistantREST";
|
|
1574
|
+
/** Documents upload configuration. */
|
|
1575
|
+
uploadConfig$: BehaviorSubject<UploadConfig | undefined>;
|
|
1576
|
+
/** Emit the list of indexed documents */
|
|
1577
|
+
uploadedDocuments$: BehaviorSubject<UploadedDocument[] | undefined>;
|
|
1578
|
+
appService: AppService;
|
|
1579
|
+
http: HttpClient;
|
|
1580
|
+
/**
|
|
1581
|
+
* Initializes the file upload service.
|
|
1582
|
+
*/
|
|
1583
|
+
init(): void;
|
|
1584
|
+
/**
|
|
1585
|
+
* Retrieves the upload configuration for documents.
|
|
1586
|
+
* The response, which contains the upload configuration, is emitted to the `uploadConfig$` observable.
|
|
1587
|
+
*
|
|
1588
|
+
* @throws {Error} If there is an error invoking the `documentsUploadConfigGet` action.
|
|
1589
|
+
*/
|
|
1590
|
+
getUploadConfig(): void;
|
|
1591
|
+
/**
|
|
1592
|
+
* Uploads documents to the server.
|
|
1593
|
+
*
|
|
1594
|
+
* This method takes a FormData object which should contain all files to be uploaded.
|
|
1595
|
+
* Each file should be appended to the FormData object with its original name.
|
|
1596
|
+
*
|
|
1597
|
+
* For example:
|
|
1598
|
+
* ```typescript
|
|
1599
|
+
* const formData = new FormData();
|
|
1600
|
+
* formData.append(file.name, file.file);
|
|
1601
|
+
* ```
|
|
1602
|
+
*
|
|
1603
|
+
* @param formData - The FormData object containing the files to be uploaded.
|
|
1604
|
+
* - Each file should be appended to the FormData object with its original name.
|
|
1605
|
+
* For example:
|
|
1606
|
+
* ```typescript
|
|
1607
|
+
* const formData = new FormData();
|
|
1608
|
+
* formData.append(file.name, file.file);
|
|
1609
|
+
* ```
|
|
1610
|
+
*
|
|
1611
|
+
* @param enableProgress - (Optional) A boolean parameter that controls whether progress reporting is enabled.
|
|
1612
|
+
* - Defaults to `true`.
|
|
1613
|
+
* - If `true`, the `reportProgress` option is set in the request options, enabling the track of upload progress based on the underlying browser's progress events.
|
|
1614
|
+
* - If `false`, progress events are not reported.
|
|
1615
|
+
*
|
|
1616
|
+
* @returns An Observable that emits events of type `UploadEvent`:
|
|
1617
|
+
* - `UploadProgressEvent`: Emitted during the upload process, containing:
|
|
1618
|
+
* - * `type`: "uploadProgress" - The type of the event.
|
|
1619
|
+
* - * `loaded`: number - The number of bytes uploaded so far.
|
|
1620
|
+
* - * `total`: number - The total number of bytes to be uploaded (if available).
|
|
1621
|
+
* - * `progress`: number - The percentage of upload progress (calculated as `(loaded / total) * 100`).
|
|
1622
|
+
* - `UploadResponseEvent`: Emitted when the upload is complete, containing:
|
|
1623
|
+
* - * `type`: "response" - The type of the event.
|
|
1624
|
+
* - * `body`: `UploadResponse` - The server's response, including:
|
|
1625
|
+
* - * - * `statusToken`: string - A token to track the status of the indexing process.
|
|
1626
|
+
* - * - * `executionTime`: string - The time taken to execute the upload.
|
|
1627
|
+
* - * - * `connectorResponse` (optional): Additional response data from the connector, containing:
|
|
1628
|
+
* - * - * - * `collection`: string - The collection name.
|
|
1629
|
+
* - * - * - * `action`: string - The action performed.
|
|
1630
|
+
* - * - * - * `stats`: object - Statistics about the upload, including:
|
|
1631
|
+
* - * - * - * - * `nbDocUpdated`: number - The number of documents updated.
|
|
1632
|
+
*
|
|
1633
|
+
* @throws {Error} If there is an error invoking the `documentsupload` action.
|
|
1634
|
+
*
|
|
1635
|
+
* Example usage:
|
|
1636
|
+
* ```typescript
|
|
1637
|
+
* const formData = new FormData();
|
|
1638
|
+
* formData.append(file.name, file.file);
|
|
1639
|
+
* this.documentsUploadService.uploadDocuments(formData).subscribe(event => {
|
|
1640
|
+
* if (event.type === 'uploadProgress') {
|
|
1641
|
+
* console.log(`Progress: ${event.progress}%`);
|
|
1642
|
+
* } else if (event.type === 'response') {
|
|
1643
|
+
* console.log('Upload complete:', event.body);
|
|
1644
|
+
* }
|
|
1645
|
+
* });
|
|
1646
|
+
* ```
|
|
1647
|
+
*/
|
|
1648
|
+
uploadDocuments(formData: FormData, enableProgress?: boolean): Observable<UploadEvent>;
|
|
1649
|
+
/**
|
|
1650
|
+
* Retrieves the indexing status of a predefined uploaded document(s)
|
|
1651
|
+
* based on the provided status token returned from the upload process.
|
|
1652
|
+
*
|
|
1653
|
+
* @param token - The status token used to track the indexing process.
|
|
1654
|
+
* @returns An Observable that emits the server response of type `IndexingResponse`.
|
|
1655
|
+
* The `IndexingResponse` object contains:
|
|
1656
|
+
* - `docs`: array - An array of document status objects, each containing:
|
|
1657
|
+
* - * `id`: string - The document ID.
|
|
1658
|
+
* - * `fileName`: string - The name of the file.
|
|
1659
|
+
* - * `operation`: "Add" | "Update" - The operation performed on the document.
|
|
1660
|
+
* - * `status`: "Indexing" | "Indexed" | "Error" - The status of the document.
|
|
1661
|
+
* - * `previousIndexationTime`: string | null - The previous indexation time.
|
|
1662
|
+
* - * `currentIndexationTime`: string | null - The current indexation time.
|
|
1663
|
+
* - `executionTime`: string - The time taken to retrieve the indexing status.
|
|
1664
|
+
* @throws {Error} If there is an error invoking the `documentsUploadStatus` action.
|
|
1665
|
+
*/
|
|
1666
|
+
getIndexingStatus(token: string): Observable<IndexingInfos>;
|
|
1667
|
+
/**
|
|
1668
|
+
* Retrieves a list of uploaded documents.
|
|
1669
|
+
*
|
|
1670
|
+
* @param {string[]} [columns] - Optional array of additional index columns to include for each document.
|
|
1671
|
+
* @param {number} [skip] - Optional number of documents to skip for pagination. If set, count also needs to be set. No skip if not set.
|
|
1672
|
+
* @param {number} [count] - Optional number of documents to take for pagination (unlimited if not set).
|
|
1673
|
+
* @returns {Observable<UploadedDocuments>} An observable that emits the list of uploaded documents.
|
|
1674
|
+
* The `UploadedDocuments` object contains:
|
|
1675
|
+
* - `docs`: array - An array of objects representing a single document with the following properties:
|
|
1676
|
+
* - * `id`: string - A unique identifier for the document.
|
|
1677
|
+
* - * `fileName`: string - The name of the file.
|
|
1678
|
+
* - * `title`: string - The title of the document.
|
|
1679
|
+
* - * `fileExt`: string - The file extension of the document.
|
|
1680
|
+
* - * `indexationTime`: string - The time when the document was indexed.
|
|
1681
|
+
* - * `size`: number - The size of the document.
|
|
1682
|
+
* - * `sizeDisplay`: string - A human-readable representation of the document size.
|
|
1683
|
+
* - * `[key: string]`: any - Additional columns asked in the request, value of the column for the document.
|
|
1684
|
+
* - `count`: number - The count of documents in the current batch or subset.
|
|
1685
|
+
* - `totalCount`: number - The total count of documents available.
|
|
1686
|
+
* - `executionTime`: string - The time taken to process the documents.
|
|
1687
|
+
* @throws {Error} Throws an error if the request fails.
|
|
1688
|
+
*/
|
|
1689
|
+
getDocumentsList(columns?: string[], skip?: number, count?: number): Observable<UploadedDocuments>;
|
|
1690
|
+
/**
|
|
1691
|
+
* Deletes the uploaded documents with the specified IDs.
|
|
1692
|
+
*
|
|
1693
|
+
* @param docIds - An array of document IDs to delete.
|
|
1694
|
+
* @returns An observable that emits the server response of type `deleteDocumentsResponse`.
|
|
1695
|
+
* The `deleteDocumentsResponse` object contains:
|
|
1696
|
+
* - `deletedCount`: number - The number of deleted documents.
|
|
1697
|
+
* - `executionTime`: string - The time taken to delete the documents.
|
|
1698
|
+
* @throws {Error} If there is an error invoking the `documentsDelete` action.
|
|
1699
|
+
*/
|
|
1700
|
+
deleteDocuments(docIds: string[]): Observable<deleteDocumentsResponse>;
|
|
1701
|
+
/**
|
|
1702
|
+
* Deletes all uploaded documents.
|
|
1703
|
+
*
|
|
1704
|
+
* @returns An observable that emits the server response of type `deleteDocumentsResponse`.
|
|
1705
|
+
* The `deleteDocumentsResponse` object contains:
|
|
1706
|
+
* - `deletedCount`: number - The number of deleted documents.
|
|
1707
|
+
* - `executionTime`: string - The time taken to delete the documents.
|
|
1708
|
+
* @throws {Error} If there is an error invoking the `documentsDeleteAll` action.
|
|
1709
|
+
*/
|
|
1710
|
+
deleteAllDocuments(): Observable<deleteDocumentsResponse>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Formats the given file size in bytes into a human-readable string.
|
|
1713
|
+
*
|
|
1714
|
+
* @param bytes - The size of the file in bytes.
|
|
1715
|
+
* @returns A string representing the file size in a human-readable format (e.g., "10.24 KB", "1.00 MB").
|
|
1716
|
+
*/
|
|
1717
|
+
formatFileSize(bytes: number): string;
|
|
1718
|
+
/**
|
|
1719
|
+
* Converts the given file size in bytes into megabytes.
|
|
1720
|
+
*
|
|
1721
|
+
* @param bytes - The size of the file in bytes.
|
|
1722
|
+
* @returns The size of the file in megabytes.
|
|
1723
|
+
*/
|
|
1724
|
+
convertBytesToMB(bytes: number): number;
|
|
1725
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentsUploadService, never>;
|
|
1726
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentsUploadService>;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
1730
|
+
/** Polling interval in milliseconds to update the indexing status of the uploaded documents */
|
|
1731
|
+
pollingInterval: number;
|
|
1732
|
+
flow: FlowDirective;
|
|
1733
|
+
readonly flowConfig: flowjs.FlowOptions;
|
|
1734
|
+
errorAlerts: string[];
|
|
1735
|
+
dragging$: BehaviorSubject<boolean>;
|
|
1736
|
+
indexing$: BehaviorSubject<boolean>;
|
|
1737
|
+
indexingInfos$: BehaviorSubject<IndexingInfos | undefined>;
|
|
1738
|
+
uploading$: BehaviorSubject<boolean>;
|
|
1739
|
+
uploadingInfos$: BehaviorSubject<UploadingInfos | undefined>;
|
|
1740
|
+
private _subscription;
|
|
1741
|
+
documentsUploadService: DocumentsUploadService;
|
|
1742
|
+
notificationsService: NotificationsService;
|
|
1743
|
+
appService: AppService;
|
|
1744
|
+
private readonly transloco;
|
|
1745
|
+
ngOnInit(): void;
|
|
1746
|
+
ngOnDestroy(): void;
|
|
1747
|
+
/**
|
|
1748
|
+
* Handles the submission of files.
|
|
1749
|
+
*
|
|
1750
|
+
* @remarks
|
|
1751
|
+
* This method performs the following checks on the submitted files:
|
|
1752
|
+
*
|
|
1753
|
+
* 1. Checks if the number of files submitted exceeds the remainingFileCount defined in the constraints.
|
|
1754
|
+
* - If the number of files exceeds the allowed count, all files are removed from the flow.
|
|
1755
|
+
* - An error message is added to the error alerts.
|
|
1756
|
+
*
|
|
1757
|
+
* 2. Checks if the total size of the files submitted exceeds the remainingFileSize defined in the constraints.
|
|
1758
|
+
* - If the total size exceeds the allowed size, all files are removed from the flow.
|
|
1759
|
+
* - An error message is added to the error alerts.
|
|
1760
|
+
*
|
|
1761
|
+
* 3. Checks if the file extension of the files submitted is not allowed.
|
|
1762
|
+
* - If the file extension is not allowed, the file is removed from the flow.
|
|
1763
|
+
* - An error message is added to the error alerts.
|
|
1764
|
+
*/
|
|
1765
|
+
private _onFilesSubmitted;
|
|
1766
|
+
private _onFilesAdded;
|
|
1767
|
+
onDragenter(): void;
|
|
1768
|
+
onDragleave(event: DragEvent): void;
|
|
1769
|
+
onDrop(): void;
|
|
1770
|
+
trackTransfer(transfer: Transfer): string;
|
|
1771
|
+
/**
|
|
1772
|
+
* Initiates the upload process by invoking the `upload` method
|
|
1773
|
+
* of the `flow` instance.
|
|
1774
|
+
* The `upload` method is overridden in the `ngOnInit` method to match the requirements of the assistant API.
|
|
1775
|
+
*/
|
|
1776
|
+
upload(): void;
|
|
1777
|
+
/**
|
|
1778
|
+
* Initiates the file upload process by preparing the form data,
|
|
1779
|
+
* setting the uploading flag, and making an API call to upload the files.
|
|
1780
|
+
*
|
|
1781
|
+
* @remarks
|
|
1782
|
+
* - Collects all files from the `flowJs` instance and appends them to a `FormData` object.
|
|
1783
|
+
* - Subscribes to the upload process to handle progress updates, completion, and errors.
|
|
1784
|
+
* - Triggers tracking the indexing process upon successful upload completion.
|
|
1785
|
+
* - Cleans up the `flow` instance after the upload process is finalized.
|
|
1786
|
+
*/
|
|
1787
|
+
private startUpload;
|
|
1788
|
+
/**
|
|
1789
|
+
* Tracks the indexing process for a single documents upload session by polling the API for its status.
|
|
1790
|
+
*
|
|
1791
|
+
* @param token - A unique token representing the single documents upload session.
|
|
1792
|
+
*
|
|
1793
|
+
* @remarks
|
|
1794
|
+
* - Clears the uploading flags and sets the indexing flag to true before starting the process.
|
|
1795
|
+
* - Polls the API every (pollingInterval: default = 1 second) to retrieve the current indexing status.
|
|
1796
|
+
* - Updates the `indexingInfos` property with the latest status.
|
|
1797
|
+
* - Stops polling when the indexing process is completed or an error occurs.
|
|
1798
|
+
* - Cleans up by resetting the indexing flags and clearing the `indexingInfos` property when the process is finalized.
|
|
1799
|
+
*/
|
|
1800
|
+
trackIndexingProcess(token: string): void;
|
|
1801
|
+
/**
|
|
1802
|
+
* Calculates the indexing progress as a percentage of completed documents.
|
|
1803
|
+
*
|
|
1804
|
+
* @param infos - The indexing information containing the list of documents and their statuses.
|
|
1805
|
+
* @returns The progress as a number between 0 and 1, where 0 indicates no progress and 1 indicates all documents are processed (processed means either indexed or errored).
|
|
1806
|
+
* Returns 0 if the input is invalid or there are no documents.
|
|
1807
|
+
*/
|
|
1808
|
+
getIndexingProgress(infos: IndexingInfos | undefined): number;
|
|
1809
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadComponent, never>;
|
|
1810
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "sq-document-upload", never, { "pollingInterval": { "alias": "pollingInterval"; "required": false; }; }, {}, never, never, true, never>;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
1814
|
+
groupedUploadedDocuments$: BehaviorSubject<{
|
|
1815
|
+
key: string;
|
|
1816
|
+
value: UploadedDocument[];
|
|
1817
|
+
}[]>;
|
|
1818
|
+
documentToDelete?: UploadedDocument;
|
|
1819
|
+
deletingAll: boolean;
|
|
1820
|
+
private _subscription;
|
|
1821
|
+
documentsUploadService: DocumentsUploadService;
|
|
1822
|
+
notificationsService: NotificationsService;
|
|
1823
|
+
appService: AppService;
|
|
1824
|
+
private readonly transloco;
|
|
1825
|
+
private readonly assistantUtils;
|
|
1826
|
+
ngOnInit(): void;
|
|
1827
|
+
ngOnDestroy(): void;
|
|
1828
|
+
/**
|
|
1829
|
+
* Updates the list of uploaded documents by fetching the latest data from the service.
|
|
1830
|
+
* The fetched documents are grouped by date.
|
|
1831
|
+
*
|
|
1832
|
+
* @returns {void}
|
|
1833
|
+
*/
|
|
1834
|
+
onUpdateUploadedDocumentsList(): void;
|
|
1835
|
+
deleteDocument(event: Event, doc: UploadedDocument): void;
|
|
1836
|
+
/**
|
|
1837
|
+
* Handles the deletion of an uploaded document. This method triggers a confirmation modal
|
|
1838
|
+
* to ensure the user wants to proceed with the deletion. If confirmed, it sends a request
|
|
1839
|
+
* to delete the document and provides feedback to the user upon success or failure.
|
|
1840
|
+
*
|
|
1841
|
+
* @param event - The event object associated with the delete action, used to stop propagation.
|
|
1842
|
+
* @param doc - The document to be deleted, represented as an instance of `UploadedDocument`.
|
|
1843
|
+
*
|
|
1844
|
+
* @remarks
|
|
1845
|
+
* - Displays a confirmation modal with a warning message.
|
|
1846
|
+
* - On confirmation, deletes the document.
|
|
1847
|
+
* - Shows a success notification upon successful deletion.
|
|
1848
|
+
* - Logs and notifies the user of any errors encountered during the deletion process.
|
|
1849
|
+
*/
|
|
1850
|
+
performDeleteDocument(): void;
|
|
1851
|
+
deleteAllDocuments(event?: Event): void;
|
|
1852
|
+
/**
|
|
1853
|
+
* Handles the deletion of all uploaded documents. This method triggers a confirmation modal
|
|
1854
|
+
* to ensure the user wants to proceed with the deletion. If confirmed, it sends a request
|
|
1855
|
+
* to delete the whole list of documents and provides feedback to the user upon success or failure.
|
|
1856
|
+
*
|
|
1857
|
+
* @param event - (Optional) The event object associated with the delete action, used to stop propagation.
|
|
1858
|
+
*
|
|
1859
|
+
* @remarks
|
|
1860
|
+
* - Displays a confirmation modal with a warning message.
|
|
1861
|
+
* - On confirmation, deletes all documents.
|
|
1862
|
+
* - Shows a success notification upon successful deletion.
|
|
1863
|
+
* - Logs and notifies the user of any errors encountered during the deletion process.
|
|
1864
|
+
*/
|
|
1865
|
+
performDeleteAllDocuments(): void;
|
|
1866
|
+
private _groupUploadedDocumentsByDate;
|
|
1867
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListComponent, never>;
|
|
1868
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "sq-document-list", never, {}, {}, never, never, true, never>;
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
declare class DocumentOverviewComponent implements OnInit, OnDestroy {
|
|
1872
|
+
disabledUpload: boolean;
|
|
1873
|
+
onUpload: EventEmitter<any>;
|
|
1874
|
+
private _subscription;
|
|
1875
|
+
documentsUploadService: DocumentsUploadService;
|
|
1876
|
+
notificationsService: NotificationsService;
|
|
1877
|
+
appService: AppService;
|
|
1878
|
+
ngOnInit(): void;
|
|
1879
|
+
ngOnDestroy(): void;
|
|
1880
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentOverviewComponent, never>;
|
|
1881
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentOverviewComponent, "sq-document-overview", never, { "disabledUpload": { "alias": "disabledUpload"; "required": false; }; }, { "onUpload": "onUpload"; }, never, never, true, never>;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
declare class ChatReferenceComponent {
|
|
1885
|
+
readonly reference: i0.InputSignal<string>;
|
|
1886
|
+
readonly attachment: i0.InputSignal<ChatContextAttachment>;
|
|
1887
|
+
readonly partId: i0.InputSignal<number | undefined>;
|
|
1888
|
+
readonly referenceMap: i0.InputSignal<Map<string, ChatContextAttachment> | undefined>;
|
|
1889
|
+
readonly images: i0.InputSignal<string[]>;
|
|
1890
|
+
readonly pages: i0.InputSignal<string[]>;
|
|
1891
|
+
readonly openDocument: i0.OutputEmitterRef<ChatContextAttachment>;
|
|
1892
|
+
readonly openPreview: i0.OutputEmitterRef<ChatContextAttachment>;
|
|
1893
|
+
readonly modalTpl: i0.Signal<ElementRef<HTMLDialogElement> | undefined>;
|
|
1894
|
+
readonly modalRef: i0.WritableSignal<any>;
|
|
1895
|
+
readonly groupedImagesIds: i0.Signal<Record<string, number[]>>;
|
|
1896
|
+
readonly groupedPagesIds: i0.Signal<Record<string, number[]>>;
|
|
1897
|
+
get parts(): DocumentPart[];
|
|
1898
|
+
findImage: (arr: any[], number: number) => any | undefined;
|
|
1899
|
+
findPage: (arr: any[], number: number) => any | undefined;
|
|
1900
|
+
expandAttachment(): void;
|
|
1901
|
+
modalClicked(ref: any): void;
|
|
1902
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatReferenceComponent, never>;
|
|
1903
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatReferenceComponent, "sq-chat-reference", never, { "reference": { "alias": "reference"; "required": true; "isSignal": true; }; "attachment": { "alias": "attachment"; "required": true; "isSignal": true; }; "partId": { "alias": "partId"; "required": false; "isSignal": true; }; "referenceMap": { "alias": "referenceMap"; "required": false; "isSignal": true; }; "images": { "alias": "images"; "required": false; "isSignal": true; }; "pages": { "alias": "pages"; "required": false; "isSignal": true; }; }, { "openDocument": "openDocument"; "openPreview": "openPreview"; }, never, never, true, never>;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
declare class ChatReferenceImageComponent {
|
|
1907
|
+
readonly id: i0.InputSignal<string>;
|
|
1908
|
+
readonly ref: i0.InputSignal<MessageImageReference>;
|
|
1909
|
+
readonly openPreview: i0.OutputEmitterRef<Omit<RawAttachment, "type"> & {
|
|
1910
|
+
$partId: number;
|
|
1911
|
+
parts: DocumentPart[];
|
|
1912
|
+
}>;
|
|
1913
|
+
readonly openDocument: i0.OutputEmitterRef<Omit<RawAttachment, "type">>;
|
|
1914
|
+
readonly openModal: i0.OutputEmitterRef<void>;
|
|
1915
|
+
readonly modalTpl: i0.Signal<ElementRef<HTMLDialogElement> | undefined>;
|
|
1916
|
+
previewClicked(): void;
|
|
1917
|
+
documentClicked(): void;
|
|
1918
|
+
modalClicked(): void;
|
|
1919
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatReferenceImageComponent, never>;
|
|
1920
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatReferenceImageComponent, "ChatReferenceImage", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "ref": { "alias": "ref"; "required": true; "isSignal": true; }; }, { "openPreview": "openPreview"; "openDocument": "openDocument"; "openModal": "openModal"; }, never, never, true, never>;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
declare class ChatReferencePageComponent {
|
|
1924
|
+
readonly id: i0.InputSignal<string>;
|
|
1925
|
+
readonly ref: i0.InputSignal<MessageImageReference>;
|
|
1926
|
+
readonly openPreview: i0.OutputEmitterRef<Omit<RawAttachment, "type"> & {
|
|
1927
|
+
$partId: number;
|
|
1928
|
+
parts: DocumentPart[];
|
|
1929
|
+
}>;
|
|
1930
|
+
readonly openDocument: i0.OutputEmitterRef<Omit<RawAttachment, "type">>;
|
|
1931
|
+
readonly openModal: i0.OutputEmitterRef<void>;
|
|
1932
|
+
readonly modalTpl: i0.Signal<ElementRef<HTMLDialogElement> | undefined>;
|
|
1933
|
+
previewClicked(): void;
|
|
1934
|
+
documentClicked(): void;
|
|
1935
|
+
modalClicked(): void;
|
|
1936
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatReferencePageComponent, never>;
|
|
1937
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatReferencePageComponent, "ChatReferencePage", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "ref": { "alias": "ref"; "required": true; "isSignal": true; }; }, { "openPreview": "openPreview"; "openDocument": "openDocument"; "openModal": "openModal"; }, never, never, true, never>;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Service to register custom elements in the Angular application.
|
|
1942
|
+
* This service is used to define custom elements that can be used in the application.
|
|
1943
|
+
* It is called through APP_INITIALIZER to ensure that custom elements are registered before the application starts.
|
|
1944
|
+
*/
|
|
1945
|
+
declare class CustomElementsService {
|
|
1946
|
+
private _injector;
|
|
1947
|
+
private readonly _customElements;
|
|
1948
|
+
setupCustomElements(): void;
|
|
1949
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomElementsService, never>;
|
|
1950
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CustomElementsService>;
|
|
1951
|
+
}
|
|
1952
|
+
declare function initializeCustomElements(customElementsService: CustomElementsService): () => void;
|
|
1953
|
+
|
|
1954
|
+
declare const ASSISTANT_CUSTOM_ELEMENTS: InjectionToken<Record<string, Type<unknown>>>;
|
|
1955
|
+
|
|
1956
|
+
declare class DocumentReferenceComponent implements OnChanges {
|
|
1957
|
+
id: any;
|
|
1958
|
+
attachment: any;
|
|
1959
|
+
ref: ChatContextAttachment;
|
|
1960
|
+
ngOnChanges(): void;
|
|
1961
|
+
onOpenPreview(attachment: ChatContextAttachment): void;
|
|
1962
|
+
onOpenDocument(attachment: ChatContextAttachment): void;
|
|
1963
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentReferenceComponent, never>;
|
|
1964
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentReferenceComponent, "document-reference", never, { "id": { "alias": "id"; "required": false; }; "attachment": { "alias": "attachment"; "required": false; }; }, {}, never, never, true, never>;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
declare class PageReferenceComponent implements OnChanges {
|
|
1968
|
+
id: any;
|
|
1969
|
+
attachment: any;
|
|
1970
|
+
ref: MessageImageReference;
|
|
1971
|
+
ngOnChanges(): void;
|
|
1972
|
+
onOpenPreview(attachment: ChatContextAttachment): void;
|
|
1973
|
+
onOpenDocument(attachment: ChatContextAttachment): void;
|
|
1974
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageReferenceComponent, never>;
|
|
1975
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageReferenceComponent, "page-reference", never, { "id": { "alias": "id"; "required": false; }; "attachment": { "alias": "attachment"; "required": false; }; }, {}, never, never, true, never>;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
declare class ImageReferenceComponent implements OnChanges {
|
|
1979
|
+
id: any;
|
|
1980
|
+
attachment: any;
|
|
1981
|
+
ref: MessageImageReference;
|
|
1982
|
+
ngOnChanges(): void;
|
|
1983
|
+
onOpenPreview(attachment: ChatContextAttachment): void;
|
|
1984
|
+
onOpenDocument(attachment: ChatContextAttachment): void;
|
|
1985
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageReferenceComponent, never>;
|
|
1986
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageReferenceComponent, "image-reference", never, { "id": { "alias": "id"; "required": false; }; "attachment": { "alias": "attachment"; "required": false; }; }, {}, never, never, true, never>;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
declare class CodeBlockComponent {
|
|
1990
|
+
langname: string;
|
|
1991
|
+
el: ElementRef<any>;
|
|
1992
|
+
copying: i0.WritableSignal<boolean>;
|
|
1993
|
+
handleClick(event: Event): void;
|
|
1994
|
+
copyCodeToClipboard(code: string): void;
|
|
1995
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeBlockComponent, never>;
|
|
1996
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CodeBlockComponent, "code-block", never, { "langname": { "alias": "langname"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
declare class TableToolsComponent {
|
|
2000
|
+
private readonly host;
|
|
2001
|
+
copied: i0.WritableSignal<boolean>;
|
|
2002
|
+
get table(): HTMLTableElement | null;
|
|
2003
|
+
copyAsCSV(): void;
|
|
2004
|
+
downloadAsCSV(): void;
|
|
2005
|
+
private extractCSV;
|
|
2006
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableToolsComponent, never>;
|
|
2007
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableToolsComponent, "table-tools", never, {}, {}, never, ["*"], true, never>;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
declare class ChartPlotComponent implements AfterViewInit {
|
|
2011
|
+
chartPlotRef: ElementRef<HTMLCanvasElement>;
|
|
2012
|
+
private destroyRef;
|
|
2013
|
+
private chart?;
|
|
2014
|
+
constructor();
|
|
2015
|
+
ngAfterViewInit(): void;
|
|
2016
|
+
private parseChartJsConfig;
|
|
2017
|
+
private getChartJsConfig;
|
|
2018
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartPlotComponent, never>;
|
|
2019
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartPlotComponent, "chart-plot", never, {}, {}, never, ["*"], true, never>;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
declare function markdownItCodeBlockPlugin(md: MarkdownIt): void;
|
|
2023
|
+
|
|
2024
|
+
/**
|
|
2025
|
+
* A markdown-it plugin to convert [Img-x.y.z], where x, y and z are numbers, into a <image-reference id="x.y.z">Img-x.y.z</image-reference> HTML tag.
|
|
2026
|
+
*
|
|
2027
|
+
* For example, when attachment x is found in the referencesMap and which contains the image z of the part y, [Img-x.y.z] will be converted to <image-reference id="x.y.z">Img-x.y.z</image-reference>.
|
|
2028
|
+
* If the attachment x, the part y or the image z is not found, it will remain as plain text [Img-x.y.z] in a span tag : <span>[Img-x.y.z]</span>
|
|
2029
|
+
*/
|
|
2030
|
+
declare const EMBEDDED_IMAGE_NAME = "embedded-image-reference";
|
|
2031
|
+
declare function markdownItImageReferencePlugin(md: MarkdownIt): void;
|
|
2032
|
+
|
|
2033
|
+
/**
|
|
2034
|
+
* This plugin overrides the default link renderer to add `target="_blank"` and `rel="noopener noreferrer"` to all links.
|
|
2035
|
+
*/
|
|
2036
|
+
declare function markdownItLinkPlugin(md: MarkdownIt): void;
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* A markdown-it plugin to convert [Page-x.n], where x and n are numbers, into a <page-reference id="x.n">Page-x.n</page-reference> HTML tag.
|
|
2040
|
+
*
|
|
2041
|
+
* For example, when attachment x is found in the referencesMap and which contains the page n, [Page-x.n] will be converted to <page-reference id="x.n">Page-x.n</page-reference>.
|
|
2042
|
+
* If the attachment x or the page n is not found, it will remain as plain text [Page-x.n] in a span tag : <span>[Page-x.n]</span>
|
|
2043
|
+
*/
|
|
2044
|
+
declare const EMBEDDED_PAGE_NAME = "embedded-page-reference";
|
|
2045
|
+
declare function markdownItPageReferencePlugin(md: MarkdownIt): void;
|
|
2046
|
+
|
|
2047
|
+
/**
|
|
2048
|
+
* A markdown-it plugin to convert [n] where n is a number into a <document-reference id="n">n</document-reference> HTML tag.
|
|
2049
|
+
*
|
|
2050
|
+
* For example, when attachment 123 is found in the referencesMap, [123] will be converted to <document-reference id="123">123</document-reference>.
|
|
2051
|
+
* If the attachment is not found, it will remain as plain text [123] in a span tag : <span>[123]</span>
|
|
2052
|
+
*/
|
|
2053
|
+
declare function markdownItDocumentReferencePlugin(md: MarkdownIt): void;
|
|
2054
|
+
|
|
2055
|
+
declare function markdownItTableToolsPlugin(md: MarkdownIt): void;
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Markdown-it plugin to replace ```chartjs fenced blocks
|
|
2059
|
+
* with <chart-plot> custom elements.
|
|
2060
|
+
*/
|
|
2061
|
+
declare function markdownItChartJsPlugin(md: MarkdownIt): void;
|
|
2062
|
+
|
|
2063
|
+
type MarkdownItPlugin = (md: MarkdownIt, ...params: any[]) => void;
|
|
2064
|
+
declare const ASSISTANT_MARKDOWN_IT_PLUGINS: InjectionToken<MarkdownItPlugin[]>;
|
|
2065
|
+
|
|
2066
|
+
/**
|
|
2067
|
+
* Initializes a global fetch interceptor that patches the native window.fetch function.
|
|
2068
|
+
*
|
|
2069
|
+
* This function replaces the browser's native fetch with a custom implementation that:
|
|
2070
|
+
* - Preserves all original fetch functionality and behavior
|
|
2071
|
+
* - Intercepts HTTP responses that are not successful (!response.ok)
|
|
2072
|
+
* - Automatically handles errors through the GlobalErrorHandlerService when available
|
|
2073
|
+
* - Logs network errors to the console for debugging purposes
|
|
2074
|
+
*
|
|
2075
|
+
* The interceptor uses Angular's dependency injection system to retrieve the
|
|
2076
|
+
* GlobalErrorHandlerService and delegate error handling to it. If the injector
|
|
2077
|
+
* is not available, the function gracefully continues without error handling.
|
|
2078
|
+
*
|
|
2079
|
+
* @remarks
|
|
2080
|
+
* - This function should be called once during application initialization
|
|
2081
|
+
* - The original fetch function is preserved and all requests are forwarded to it
|
|
2082
|
+
* - Non-ok responses are still returned to the caller after error handling
|
|
2083
|
+
* - Network errors (connection failures, etc.) are logged and re-thrown
|
|
2084
|
+
*
|
|
2085
|
+
* @example
|
|
2086
|
+
* ```typescript
|
|
2087
|
+
* // Call during app initialization
|
|
2088
|
+
* initializeFetchInterceptor();
|
|
2089
|
+
*
|
|
2090
|
+
* // All subsequent fetch calls will be automatically intercepted
|
|
2091
|
+
* fetch('/api/data').then(response => {
|
|
2092
|
+
* // Error handling already occurred if response was not ok
|
|
2093
|
+
* });
|
|
2094
|
+
* ```
|
|
2095
|
+
*/
|
|
2096
|
+
declare function initializeFetchInterceptor(): void;
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Function to set the global Injector reference.
|
|
2100
|
+
*/
|
|
2101
|
+
declare function setAppInjector(injector: Injector): void;
|
|
2102
|
+
/**
|
|
2103
|
+
* Function to retrieve the global Injector reference.
|
|
2104
|
+
*/
|
|
2105
|
+
declare function getAppInjector(): Injector;
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* Injection Token for the specific function to execute on a 401 Unauthorized error.
|
|
2109
|
+
*/
|
|
2110
|
+
declare const ASSISTANT_UNAUTHORIZED_ACTION_TOKEN: InjectionToken<() => void>;
|
|
2111
|
+
declare class GlobalErrorHandlerService {
|
|
2112
|
+
private unauthorizedAction;
|
|
2113
|
+
/** Prevents infinite unauthorized attempts */
|
|
2114
|
+
private _authAttempted;
|
|
2115
|
+
/** Tracks if a re-authentication process is currently in progress */
|
|
2116
|
+
private _reauthInProgress;
|
|
2117
|
+
private authEventListener;
|
|
2118
|
+
constructor();
|
|
2119
|
+
/**
|
|
2120
|
+
* Sets up a global listener for the `authenticated` event.
|
|
2121
|
+
* When re-authentication succeeds (authenticated === true),
|
|
2122
|
+
* reset the auth lock so another 401 can trigger again later.
|
|
2123
|
+
*/
|
|
2124
|
+
private setupAuthEventListener;
|
|
2125
|
+
/**
|
|
2126
|
+
* Main entry point to handle fetch or HTTP errors globally.
|
|
2127
|
+
*/
|
|
2128
|
+
handleFetchError(url: string, status: number, statusText: string): void;
|
|
2129
|
+
/**
|
|
2130
|
+
* Handles 401 errors by triggering re-authentication only once
|
|
2131
|
+
* until authentication is restored (via the DOM event).
|
|
2132
|
+
*/
|
|
2133
|
+
private handleUnauthorized;
|
|
2134
|
+
/**
|
|
2135
|
+
* Clean up global event listener when Angular destroys this service.
|
|
2136
|
+
*/
|
|
2137
|
+
ngOnDestroy(): void;
|
|
2138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalErrorHandlerService, never>;
|
|
2139
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalErrorHandlerService>;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
/**
|
|
2143
|
+
* Handles unauthorized HTTP responses (401) by clearing session data and reloading the page.
|
|
2144
|
+
*
|
|
2145
|
+
* This function is triggered when a 401 Unauthorized response is detected during API calls.
|
|
2146
|
+
* It performs cleanup operations by removing stored credentials from session storage
|
|
2147
|
+
* and forces a page reload to redirect the user to the login flow.
|
|
2148
|
+
*
|
|
2149
|
+
* @remarks
|
|
2150
|
+
* This function directly manipulates the browser's session storage and window location,
|
|
2151
|
+
* making it suitable for client-side applications only.
|
|
2152
|
+
*
|
|
2153
|
+
*/
|
|
2154
|
+
declare const handleUnauthorizedLogic: () => void;
|
|
2155
|
+
|
|
2156
|
+
export { ASSISTANT_CUSTOM_ELEMENTS, ASSISTANT_MARKDOWN_IT_PLUGINS, ASSISTANT_UNAUTHORIZED_ACTION_TOKEN, ChartPlotComponent, ChatComponent, ChatReferenceComponent, ChatReferenceImageComponent, ChatReferencePageComponent, ChatService, ChatSettingsV3Component, CodeBlockComponent, CustomElementsService, DocumentListComponent, DocumentOverviewComponent, DocumentReferenceComponent, DocumentUploadComponent, DocumentsUploadService, EMBEDDED_IMAGE_NAME, EMBEDDED_PAGE_NAME, FormatIconComponent, GlobalErrorHandlerService, ImageReferenceComponent, InitialsAvatarComponent, InstanceManagerService, NotificationsService, PageReferenceComponent, SavedChatsComponent, TableToolsComponent, chatConfigSchema, connectionSettingsSchema, getAppInjector, handleUnauthorizedLogic, initializeCustomElements, initializeFetchInterceptor, markdownItChartJsPlugin, markdownItCodeBlockPlugin, markdownItDocumentReferencePlugin, markdownItImageReferencePlugin, markdownItLinkPlugin, markdownItPageReferencePlugin, markdownItTableToolsPlugin, setAppInjector };
|
|
2157
|
+
export type { ActionMessage, ActionResultEvent, ActionStartEvent, ActionStopEvent, AdditionalServiceSettings, ChatConfig, ChatContextAttachment, ChatMessage, ChatPayload, ChatProgress, ChatResponse, ChatUsageMetrics, ConnectionSettings, ContextMessageEvent, DebugMessage, DebugMessageEvent, DefaultValues, DeleteSavedChatResponse, DocumentPage, DocumentPart, ErrorEvent, GllmFunction, GllmFunctionParameter, GllmModelDescription, HistoryEvent, HttpChatResponse, IndexingInfos, InitChat, KvObject, ListObject, MarkdownItPlugin, MessageEvent, MessageHandler, ModeSettings, NotificationType, PluginVersion, Quota, QuotaEvent, RawAttachment, RawMessage, RawResponse, SavedChat, SavedChatHistory, SavedChatResponse, SavedChatSettings, ServiceSettings, SuggestedAction, SuggestedActionsEvent, TextChunksOptions, TokenConsumption, UiSettings, UploadConfig, UploadEvent, UploadProgressEvent, UploadResponse, UploadResponseEvent, UploadedDocument, UploadedDocuments, UploadingInfos, UserTokenConsumption, additionalWorkflowProperties, deleteDocumentsResponse };
|