tr]:last:border-b-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
+ return (
+
+ )
+}
+
+function TableHead({ className, ...props }: React.ComponentProps<"th">) {
+ return (
+ [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCell({ className, ...props }: React.ComponentProps<"td">) {
+ return (
+ | [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCaption({
+ className,
+ ...props
+}: React.ComponentProps<"caption">) {
+ return (
+
+ )
+}
+
+export {
+ Table,
+ TableHeader,
+ TableBody,
+ TableFooter,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableCaption,
+}
diff --git a/turing-shadcn/src/components/ui/tabs.tsx b/turing-shadcn/src/components/ui/tabs.tsx
new file mode 100644
index 00000000000..3d6f3acf86c
--- /dev/null
+++ b/turing-shadcn/src/components/ui/tabs.tsx
@@ -0,0 +1,64 @@
+import * as React from "react"
+import * as TabsPrimitive from "@radix-ui/react-tabs"
+
+import { cn } from "@/lib/utils"
+
+function Tabs({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function TabsList({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function TabsTrigger({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function TabsContent({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+export { Tabs, TabsList, TabsTrigger, TabsContent }
diff --git a/turing-shadcn/src/components/ui/textarea.tsx b/turing-shadcn/src/components/ui/textarea.tsx
new file mode 100644
index 00000000000..7f21b5e78a4
--- /dev/null
+++ b/turing-shadcn/src/components/ui/textarea.tsx
@@ -0,0 +1,18 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
+ return (
+
+ )
+}
+
+export { Textarea }
diff --git a/turing-shadcn/src/components/ui/toggle-group.tsx b/turing-shadcn/src/components/ui/toggle-group.tsx
new file mode 100644
index 00000000000..24a4850d73e
--- /dev/null
+++ b/turing-shadcn/src/components/ui/toggle-group.tsx
@@ -0,0 +1,83 @@
+"use client"
+
+import * as React from "react"
+import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
+import { type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+import { toggleVariants } from "@/components/ui/toggle"
+
+const ToggleGroupContext = React.createContext<
+ VariantProps & {
+ spacing?: number
+ }
+>({
+ size: "default",
+ variant: "default",
+ spacing: 0,
+})
+
+function ToggleGroup({
+ className,
+ variant,
+ size,
+ spacing = 0,
+ children,
+ ...props
+}: React.ComponentProps &
+ VariantProps & {
+ spacing?: number
+ }) {
+ return (
+
+
+ {children}
+
+
+ )
+}
+
+function ToggleGroupItem({
+ className,
+ children,
+ variant,
+ size,
+ ...props
+}: React.ComponentProps &
+ VariantProps) {
+ const context = React.useContext(ToggleGroupContext)
+
+ return (
+
+ {children}
+
+ )
+}
+
+export { ToggleGroup, ToggleGroupItem }
diff --git a/turing-shadcn/src/components/ui/toggle.tsx b/turing-shadcn/src/components/ui/toggle.tsx
new file mode 100644
index 00000000000..2e13faf69bc
--- /dev/null
+++ b/turing-shadcn/src/components/ui/toggle.tsx
@@ -0,0 +1,46 @@
+/* eslint-disable react-refresh/only-export-components */
+import * as React from "react"
+import * as TogglePrimitive from "@radix-ui/react-toggle"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const toggleVariants = cva(
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
+ {
+ variants: {
+ variant: {
+ default: "bg-transparent",
+ outline:
+ "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
+ },
+ size: {
+ default: "h-9 px-2 min-w-9",
+ sm: "h-8 px-1.5 min-w-8",
+ lg: "h-10 px-2.5 min-w-10",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default",
+ },
+ }
+)
+
+function Toggle({
+ className,
+ variant,
+ size,
+ ...props
+}: React.ComponentProps &
+ VariantProps) {
+ return (
+
+ )
+}
+
+export { Toggle, toggleVariants }
diff --git a/turing-shadcn/src/components/ui/tooltip.tsx b/turing-shadcn/src/components/ui/tooltip.tsx
new file mode 100644
index 00000000000..715bf76d6ba
--- /dev/null
+++ b/turing-shadcn/src/components/ui/tooltip.tsx
@@ -0,0 +1,59 @@
+import * as React from "react"
+import * as TooltipPrimitive from "@radix-ui/react-tooltip"
+
+import { cn } from "@/lib/utils"
+
+function TooltipProvider({
+ delayDuration = 0,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function Tooltip({
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+
+ )
+}
+
+function TooltipTrigger({
+ ...props
+}: React.ComponentProps) {
+ return
+}
+
+function TooltipContent({
+ className,
+ sideOffset = 0,
+ children,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+ {children}
+
+
+
+ )
+}
+
+export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
diff --git a/turing-shadcn/src/hooks/use-mobile.ts b/turing-shadcn/src/hooks/use-mobile.ts
new file mode 100644
index 00000000000..2b0fe1dfef3
--- /dev/null
+++ b/turing-shadcn/src/hooks/use-mobile.ts
@@ -0,0 +1,19 @@
+import * as React from "react"
+
+const MOBILE_BREAKPOINT = 768
+
+export function useIsMobile() {
+ const [isMobile, setIsMobile] = React.useState(undefined)
+
+ React.useEffect(() => {
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
+ const onChange = () => {
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
+ }
+ mql.addEventListener("change", onChange)
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
+ return () => mql.removeEventListener("change", onChange)
+ }, [])
+
+ return !!isMobile
+}
diff --git a/turing-shadcn/src/main.tsx b/turing-shadcn/src/main.tsx
index 6df01880ab6..632bf593c2a 100644
--- a/turing-shadcn/src/main.tsx
+++ b/turing-shadcn/src/main.tsx
@@ -6,16 +6,17 @@ import App from './App.tsx'
import { ROUTES } from './app/routes.const.ts'
import './index.css'
import type { TurRestInfo } from './models/auth/rest-info.ts'
-import { TurAuthorizationService, type TurDiscovery } from './services/authorization.service.ts'
+import { TurAuthorizationService } from './services/authorization.service.ts'
+import type { TurDiscoveryAPI } from './models/auth/discovery.ts'
const authorization = new TurAuthorizationService()
axios.defaults.baseURL = `${import.meta.env.VITE_API_URL}/api`;
// Cache discovery result to avoid repeated API calls
-let discoveryCache: TurDiscovery | null = null;
-let discoveryPromise: Promise | null = null;
+let discoveryCache: TurDiscoveryAPI | null = null;
+let discoveryPromise: Promise | null = null;
-const getDiscovery = async (): Promise => {
+const getDiscovery = async (): Promise => {
if (discoveryCache) {
return discoveryCache;
}
diff --git a/turing-shadcn/src/models/auth/discovery.ts b/turing-shadcn/src/models/auth/discovery.ts
new file mode 100644
index 00000000000..5db0edd3ce6
--- /dev/null
+++ b/turing-shadcn/src/models/auth/discovery.ts
@@ -0,0 +1,5 @@
+export type TurDiscoveryAPI = {
+ product: string;
+ keycloak: boolean;
+ multiTenant: boolean;
+};
diff --git a/turing-shadcn/src/models/auth/rest-info.ts b/turing-shadcn/src/models/auth/rest-info.ts
index 2d523e8ef30..838cf5b5612 100644
--- a/turing-shadcn/src/models/auth/rest-info.ts
+++ b/turing-shadcn/src/models/auth/rest-info.ts
@@ -1,5 +1,10 @@
-export interface TurRestInfo {
- username?: string;
- password?: string;
- authdata?: string;
-}
+export type TurRestInfo = {
+ id: number;
+ username: string;
+ password: string;
+ firstName: string;
+ lastName: string;
+ authdata?: string;
+ admin: boolean;
+ email: string;
+}
\ No newline at end of file
diff --git a/turing-shadcn/src/models/integration/integration-instance.model.ts b/turing-shadcn/src/models/integration/integration-instance.model.ts
new file mode 100644
index 00000000000..4cbf9b7fc1e
--- /dev/null
+++ b/turing-shadcn/src/models/integration/integration-instance.model.ts
@@ -0,0 +1,8 @@
+export type TurIntegrationInstance = {
+ id: string;
+ title: string;
+ description: string;
+ endpoint: string;
+ vendor: string;
+ enabled: number;
+};
diff --git a/turing-shadcn/src/models/llm/llm-instance.model.ts b/turing-shadcn/src/models/llm/llm-instance.model.ts
new file mode 100644
index 00000000000..86145634045
--- /dev/null
+++ b/turing-shadcn/src/models/llm/llm-instance.model.ts
@@ -0,0 +1,23 @@
+import type { TurLLMVendor } from "./llm-vendor.model.ts";
+
+export interface TurLLMInstance {
+ id: string;
+ title: string;
+ description: string;
+ url: string;
+ turLLMVendor: TurLLMVendor;
+ language: string;
+ enabled: number;
+ modelName: string;
+ temperature: number;
+ topK: number;
+ topP: number;
+ repeatPenalty: number;
+ seed: number;
+ numPredict: number;
+ stop: string;
+ responseFormat: string;
+ supportedCapabilities: string;
+ timeout: string;
+ maxRetries: number;
+}
diff --git a/turing-shadcn/src/models/llm/llm-vendor.model.ts b/turing-shadcn/src/models/llm/llm-vendor.model.ts
new file mode 100644
index 00000000000..986543d0e2e
--- /dev/null
+++ b/turing-shadcn/src/models/llm/llm-vendor.model.ts
@@ -0,0 +1,5 @@
+export interface TurLLMVendor {
+ id: string;
+ title: string;
+ description: string;
+}
\ No newline at end of file
diff --git a/turing-shadcn/src/models/locale/locale.model.ts b/turing-shadcn/src/models/locale/locale.model.ts
new file mode 100644
index 00000000000..2cc7ca8275b
--- /dev/null
+++ b/turing-shadcn/src/models/locale/locale.model.ts
@@ -0,0 +1,5 @@
+export type TurLocale = {
+ initials: string;
+ en: string;
+ pt: string;
+};
diff --git a/turing-shadcn/src/models/logging/logging-instance.model.ts b/turing-shadcn/src/models/logging/logging-instance.model.ts
new file mode 100644
index 00000000000..9b7463656d4
--- /dev/null
+++ b/turing-shadcn/src/models/logging/logging-instance.model.ts
@@ -0,0 +1,23 @@
+import type { TurLoggingVendor } from "./logging-vendor.model.ts";
+
+export interface TurLoggingInstance {
+ id: string;
+ title: string;
+ description: string;
+ url: string;
+ turLoggingVendor: TurLoggingVendor;
+ language: string;
+ enabled: number;
+ modelName: string;
+ temperature: number;
+ topK: number;
+ topP: number;
+ repeatPenalty: number;
+ seed: number;
+ numPredict: number;
+ stop: string;
+ responseFormat: string;
+ supportedCapabilities: string;
+ timeout: string;
+ maxRetries: number;
+}
diff --git a/turing-shadcn/src/models/logging/logging-vendor.model.ts b/turing-shadcn/src/models/logging/logging-vendor.model.ts
new file mode 100644
index 00000000000..cc5cae312a0
--- /dev/null
+++ b/turing-shadcn/src/models/logging/logging-vendor.model.ts
@@ -0,0 +1,5 @@
+export interface TurLoggingVendor {
+ id: string;
+ title: string;
+ description: string;
+}
\ No newline at end of file
diff --git a/turing-shadcn/src/models/se/se-instance.model.ts b/turing-shadcn/src/models/se/se-instance.model.ts
new file mode 100644
index 00000000000..47210109c06
--- /dev/null
+++ b/turing-shadcn/src/models/se/se-instance.model.ts
@@ -0,0 +1,12 @@
+import type { TurSEVendor } from "./se-vendor.model.ts";
+
+export interface TurSEInstance {
+ id: string;
+ title: string;
+ description: string;
+ host: string;
+ port: number;
+ turSEVendor: TurSEVendor;
+ language: string;
+ enabled: number;
+}
diff --git a/turing-shadcn/src/models/se/se-vendor.model.ts b/turing-shadcn/src/models/se/se-vendor.model.ts
new file mode 100644
index 00000000000..8c5fe721fc6
--- /dev/null
+++ b/turing-shadcn/src/models/se/se-vendor.model.ts
@@ -0,0 +1,5 @@
+export interface TurSEVendor {
+ id: string;
+ title: string;
+ description: string;
+}
\ No newline at end of file
diff --git a/turing-shadcn/src/models/sn/sn-field-type.model.ts b/turing-shadcn/src/models/sn/sn-field-type.model.ts
new file mode 100644
index 00000000000..b2fc9e1172d
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-field-type.model.ts
@@ -0,0 +1,4 @@
+export type TurSNFieldType = {
+ id: string;
+ name: string;
+};
diff --git a/turing-shadcn/src/models/sn/sn-ranking-condition.model.ts b/turing-shadcn/src/models/sn/sn-ranking-condition.model.ts
new file mode 100644
index 00000000000..7090aa1e417
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-ranking-condition.model.ts
@@ -0,0 +1,6 @@
+export type TurSNRankingCondition = {
+ id: string;
+ attribute: string;
+ condition: number;
+ value: string;
+}
diff --git a/turing-shadcn/src/models/sn/sn-ranking-expression.model.ts b/turing-shadcn/src/models/sn/sn-ranking-expression.model.ts
new file mode 100644
index 00000000000..24b786fa2b0
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-ranking-expression.model.ts
@@ -0,0 +1,10 @@
+import type {TurSNRankingCondition} from "./sn-ranking-condition.model";
+
+export type TurSNRankingExpression = {
+ id: string;
+ name: string;
+ weight: number;
+ turSNRankingConditions: TurSNRankingCondition[];
+ lastModifiedDate: Date;
+ description: string;
+}
diff --git a/turing-shadcn/src/models/sn/sn-site-facet-field-sort.type.ts b/turing-shadcn/src/models/sn/sn-site-facet-field-sort.type.ts
new file mode 100644
index 00000000000..3d2ee45d8b2
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-facet-field-sort.type.ts
@@ -0,0 +1 @@
+ export type TurSNSiteFacetFieldSortTypes = 'DEFAULT' | 'COUNT' | 'ALPHABETICAL';
\ No newline at end of file
diff --git a/turing-shadcn/src/models/sn/sn-site-facet-range.type.ts b/turing-shadcn/src/models/sn/sn-site-facet-range.type.ts
new file mode 100644
index 00000000000..877d8178885
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-facet-range.type.ts
@@ -0,0 +1 @@
+export type TurSNSiteFacetRangeTypes = "DISABLED" |"DAY" |"MONTH" |"YEAR";
diff --git a/turing-shadcn/src/models/sn/sn-site-facet-sort.type.ts b/turing-shadcn/src/models/sn/sn-site-facet-sort.type.ts
new file mode 100644
index 00000000000..6be94da6ded
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-facet-sort.type.ts
@@ -0,0 +1 @@
+export type TurSNSiteFacetSortTypes = "COUNT" | "ALPHABETICAL";
diff --git a/turing-shadcn/src/models/sn/sn-site-facet.field.type.ts b/turing-shadcn/src/models/sn/sn-site-facet.field.type.ts
new file mode 100644
index 00000000000..9652a3aa7bb
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-facet.field.type.ts
@@ -0,0 +1 @@
+export type TurSNSiteFacetFieldTypes = "DEFAULT" | "AND" | "OR";
diff --git a/turing-shadcn/src/models/sn/sn-site-facet.type.ts b/turing-shadcn/src/models/sn/sn-site-facet.type.ts
new file mode 100644
index 00000000000..694954a2d37
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-facet.type.ts
@@ -0,0 +1 @@
+export type TurSNSiteFacetTypes = "AND" | "OR";
diff --git a/turing-shadcn/src/models/sn/sn-site-field-facet.model.ts b/turing-shadcn/src/models/sn/sn-site-field-facet.model.ts
new file mode 100644
index 00000000000..0d8acbc7cbf
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-field-facet.model.ts
@@ -0,0 +1,5 @@
+export type TurSNSiteFieldFacet = {
+ id: string;
+ locale: string;
+ label: string;
+};
diff --git a/turing-shadcn/src/models/sn/sn-site-field.model.ts b/turing-shadcn/src/models/sn/sn-site-field.model.ts
new file mode 100644
index 00000000000..d4d16aece49
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-field.model.ts
@@ -0,0 +1,29 @@
+import type { TurSNSiteFacetFieldSortTypes } from "./sn-site-facet-field-sort.type.ts";
+import type { TurSNSiteFacetRangeTypes } from "./sn-site-facet-range.type.ts";
+import type { TurSNSiteFacetFieldTypes } from "./sn-site-facet.field.type.ts";
+import type { TurSNSiteFieldFacet } from "./sn-site-field-facet.model.ts";
+
+export type TurSNSiteField = {
+ id: string;
+ name: string;
+ description: string;
+ defaultValue: string;
+ enabled: number;
+ externalId: string;
+ facet: number;
+ facetName: string;
+ facetRange: TurSNSiteFacetRangeTypes;
+ facetLocales: TurSNSiteFieldFacet[];
+ facetType: TurSNSiteFacetFieldTypes;
+ facetItemType: TurSNSiteFacetFieldTypes;
+ facetSort: TurSNSiteFacetFieldSortTypes;
+ facetPosition: number;
+ secondaryFacet: boolean;
+ showAllFacetItems: boolean;
+ mlt: number;
+ multiValued: number;
+ required: number;
+ snType: string;
+ type: string;
+ hl: number;
+};
diff --git a/turing-shadcn/src/models/sn/sn-site-genai.model.ts b/turing-shadcn/src/models/sn/sn-site-genai.model.ts
new file mode 100644
index 00000000000..700563cdd38
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-genai.model.ts
@@ -0,0 +1,10 @@
+import type { TurLLMInstance } from "../llm/llm-instance.model.ts";
+import type { TurStoreInstance } from "../store/store-instance.model.ts";
+
+export interface TurSNSiteGenAi {
+ id: string;
+ turLLMInstance: TurLLMInstance;
+ turStoreInstance: TurStoreInstance;
+ enabled: boolean;
+ systemPrompt: string;
+}
diff --git a/turing-shadcn/src/models/sn/sn-site-locale.model.ts b/turing-shadcn/src/models/sn/sn-site-locale.model.ts
new file mode 100644
index 00000000000..89699e62c3d
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-locale.model.ts
@@ -0,0 +1,8 @@
+import type { TurSNSite } from "./sn-site.model.ts";
+
+export type TurSNSiteLocale = {
+ id: string;
+ language: string;
+ core: string;
+ turSNSite: TurSNSite;
+}
\ No newline at end of file
diff --git a/turing-shadcn/src/models/sn/sn-site-merge-field.model.ts b/turing-shadcn/src/models/sn/sn-site-merge-field.model.ts
new file mode 100644
index 00000000000..ea0f643cd8a
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-merge-field.model.ts
@@ -0,0 +1,5 @@
+export type TurSNSiteMergeField = {
+ id?: string;
+ name: string;
+
+}
diff --git a/turing-shadcn/src/models/sn/sn-site-merge.model.ts b/turing-shadcn/src/models/sn/sn-site-merge.model.ts
new file mode 100644
index 00000000000..6a88af63b8d
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-merge.model.ts
@@ -0,0 +1,14 @@
+import type {TurSNSiteMergeField} from "./sn-site-merge-field.model.ts";
+import type {TurSNSite} from "./sn-site.model.ts";
+
+export type TurSNSiteMerge = {
+ id: string;
+ turSNSite: TurSNSite;
+ locale: string;
+ providerFrom: string;
+ providerTo: string;
+ relationFrom: string;
+ relationTo: string;
+ overwrittenFields: TurSNSiteMergeField[];
+ description: string;
+}
diff --git a/turing-shadcn/src/models/sn/sn-site-spotlight-document.model.ts b/turing-shadcn/src/models/sn/sn-site-spotlight-document.model.ts
new file mode 100644
index 00000000000..38a2ae7b872
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-spotlight-document.model.ts
@@ -0,0 +1,9 @@
+export type TurSNSiteSpotlightDocument = {
+ id: string;
+ position: number;
+ title: string;
+ type: string;
+ link: string;
+ referenceId: string;
+ content:string;
+}
diff --git a/turing-shadcn/src/models/sn/sn-site-spotlight-term.model.ts b/turing-shadcn/src/models/sn/sn-site-spotlight-term.model.ts
new file mode 100644
index 00000000000..ad87a215319
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-spotlight-term.model.ts
@@ -0,0 +1,4 @@
+export type TurSNSiteSpotlightTerm = {
+ id: string;
+ name: string;
+}
diff --git a/turing-shadcn/src/models/sn/sn-site-spotlight.model.ts b/turing-shadcn/src/models/sn/sn-site-spotlight.model.ts
new file mode 100644
index 00000000000..279e2db8d5c
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site-spotlight.model.ts
@@ -0,0 +1,14 @@
+import type {TurSNSiteSpotlightDocument} from "./sn-site-spotlight-document.model.ts";
+import type {TurSNSiteSpotlightTerm} from "./sn-site-spotlight-term.model.ts";
+import type {TurSNSite} from "./sn-site.model.ts";
+
+export type TurSNSiteSpotlight = {
+ id: string;
+ name: string;
+ description: string;
+ language: string;
+ modificationDate: Date;
+ turSNSiteSpotlightTerms: TurSNSiteSpotlightTerm[];
+ turSNSiteSpotlightDocuments: TurSNSiteSpotlightDocument[];
+ turSNSite: TurSNSite;
+}
diff --git a/turing-shadcn/src/models/sn/sn-site.model.ts b/turing-shadcn/src/models/sn/sn-site.model.ts
new file mode 100644
index 00000000000..aef85742631
--- /dev/null
+++ b/turing-shadcn/src/models/sn/sn-site.model.ts
@@ -0,0 +1,39 @@
+import type { TurSEInstance } from "../se/se-instance.model.ts";
+import type { TurSNSiteFacetFieldSortTypes } from "./sn-site-facet-field-sort.type.ts";
+import type { TurSNSiteFacetTypes } from "./sn-site-facet.type.ts";
+import type { TurSNSiteGenAi } from "./sn-site-genai.model.ts";
+import type { TurSNSiteLocale } from "./sn-site-locale.model.ts";
+
+export type TurSNSite = {
+ id: string;
+ name: string;
+ description: string;
+ exactMatchField: string;
+ defaultField: string;
+ defaultTitleField: string;
+ defaultDescriptionField: string;
+ defaultTextField: string;
+ defaultDateField: string;
+ defaultImageField: string;
+ defaultURLField: string;
+ facet: number;
+ itemsPerFacet: number;
+ hl: number;
+ hlPre: string;
+ hlPost: string;
+ mlt: number;
+ thesaurus: number;
+ turSEInstance: TurSEInstance;
+ turSNSiteLocales: TurSNSiteLocale[];
+ rowsPerPage: number;
+ spellCheck: number;
+ spellCheckFixes: number;
+ spotlightWithResults: number;
+ facetType: TurSNSiteFacetTypes;
+ facetItemType: TurSNSiteFacetTypes;
+ facetSort: TurSNSiteFacetFieldSortTypes;
+ wildcardNoResults: number;
+ wildcardAlways: number;
+ exactMatch: number;
+ turSNSiteGenAi: TurSNSiteGenAi;
+}
diff --git a/turing-shadcn/src/models/store/store-instance.model.ts b/turing-shadcn/src/models/store/store-instance.model.ts
new file mode 100644
index 00000000000..a8a37b82b44
--- /dev/null
+++ b/turing-shadcn/src/models/store/store-instance.model.ts
@@ -0,0 +1,23 @@
+import type { TurStoreVendor } from "./store-vendor.model.ts";
+
+export interface TurStoreInstance {
+ id: string;
+ title: string;
+ description: string;
+ url: string;
+ turStoreVendor: TurStoreVendor;
+ language: string;
+ enabled: number;
+ modelName: string;
+ temperature: number;
+ topK: number;
+ topP: number;
+ repeatPenalty: number;
+ seed: number;
+ numPredict: number;
+ stop: string;
+ responseFormat: string;
+ supportedCapabilities: string;
+ timeout: string;
+ maxRetries: number;
+}
diff --git a/turing-shadcn/src/models/store/store-vendor.model.ts b/turing-shadcn/src/models/store/store-vendor.model.ts
new file mode 100644
index 00000000000..96eeeffee67
--- /dev/null
+++ b/turing-shadcn/src/models/store/store-vendor.model.ts
@@ -0,0 +1,5 @@
+export interface TurStoreVendor {
+ id: string;
+ title: string;
+ description: string;
+}
\ No newline at end of file
diff --git a/turing-shadcn/src/models/token/token-instance.model.ts b/turing-shadcn/src/models/token/token-instance.model.ts
new file mode 100644
index 00000000000..2be1a90e34c
--- /dev/null
+++ b/turing-shadcn/src/models/token/token-instance.model.ts
@@ -0,0 +1,6 @@
+export type TurTokenInstance = {
+ id: string;
+ token: string;
+ title: string;
+ description: string;
+};
diff --git a/turing-shadcn/src/services/authorization.service.ts b/turing-shadcn/src/services/authorization.service.ts
index b15dea72a62..4a14d71f0aa 100644
--- a/turing-shadcn/src/services/authorization.service.ts
+++ b/turing-shadcn/src/services/authorization.service.ts
@@ -1,17 +1,28 @@
-import axios from 'axios';
-
-export interface TurDiscovery {
- keycloak?: boolean;
-}
+import type { TurDiscoveryAPI } from "@/models/auth/discovery";
+import type { TurRestInfo } from "@/models/auth/rest-info";
+import axios, { type AxiosRequestConfig } from "axios";
export class TurAuthorizationService {
- async discovery(): Promise {
- try {
- const response = await axios.get('/v2/discovery');
- return response.data;
- } catch (error) {
- console.error('Discovery error:', error);
- return { keycloak: false };
- }
+ async login(username: string, password: string): Promise {
+ const config: AxiosRequestConfig = {
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: "Basic " + window.btoa(username + ":" + password),
+ },
+ };
+ const response = await axios.create().get("/v2", config);
+ return response.data;
+ }
+
+ async discovery(): Promise {
+ const config: AxiosRequestConfig = {};
+ const response = await axios
+ .create()
+ .get("/discovery", config);
+ return response.data;
+ }
+
+ logout() {
+ localStorage.removeItem("restInfo");
}
}
diff --git a/turing-shadcn/src/services/integration.service.ts b/turing-shadcn/src/services/integration.service.ts
new file mode 100644
index 00000000000..bc9cbd30a46
--- /dev/null
+++ b/turing-shadcn/src/services/integration.service.ts
@@ -0,0 +1,32 @@
+import axios from "axios";
+import type { TurIntegrationInstance } from "@/models/integration/integration-instance.model";
+
+export class TurIntegrationInstanceService {
+ async query(): Promise {
+ const response = await axios.get("/integration");
+ return response.data;
+ }
+ async get(id: string): Promise {
+ const response = await axios.get(`/integration/${id}`);
+ return response.data;
+ }
+ async create(turIntegrationInstance: TurIntegrationInstance): Promise {
+ const response = await axios.post("/integration",
+ turIntegrationInstance
+ );
+ return response.data;
+ }
+ async update(turIntegrationInstance: TurIntegrationInstance): Promise {
+ const response = await axios.put(
+ `/integration/${turIntegrationInstance.id.toString()}`,
+ turIntegrationInstance
+ );
+ return response.data;
+ }
+ async delete(turIntegrationInstance: TurIntegrationInstance): Promise {
+ const response = await axios.delete(
+ `/integration/${turIntegrationInstance.id.toString()}`
+ );
+ return response.status == 200;
+ }
+}
diff --git a/turing-shadcn/src/services/llm.service.ts b/turing-shadcn/src/services/llm.service.ts
new file mode 100644
index 00000000000..01b26cc217b
--- /dev/null
+++ b/turing-shadcn/src/services/llm.service.ts
@@ -0,0 +1,32 @@
+import axios from "axios";
+import type { TurLLMInstance } from "@/models/llm/llm-instance.model";
+
+export class TurLLMInstanceService {
+ async query(): Promise {
+ const response = await axios.get("/llm");
+ return response.data;
+ }
+ async get(id: string): Promise {
+ const response = await axios.get(`/llm/${id}`);
+ return response.data;
+ }
+ async create(turLLMInstance: TurLLMInstance): Promise {
+ const response = await axios.post("/llm",
+ turLLMInstance
+ );
+ return response.data;
+ }
+ async update(turLLMInstance: TurLLMInstance): Promise {
+ const response = await axios.put(
+ `/llm/${turLLMInstance.id.toString()}`,
+ turLLMInstance
+ );
+ return response.data;
+ }
+ async delete(turLLMInstance: TurLLMInstance): Promise {
+ const response = await axios.delete(
+ `/llm/${turLLMInstance.id.toString()}`
+ );
+ return response.status == 200;
+ }
+}
diff --git a/turing-shadcn/src/services/locale.service.ts b/turing-shadcn/src/services/locale.service.ts
new file mode 100644
index 00000000000..850406e7b92
--- /dev/null
+++ b/turing-shadcn/src/services/locale.service.ts
@@ -0,0 +1,13 @@
+import type { TurLocale } from "@/models/locale/locale.model";
+import axios from "axios";
+
+export class TurLocaleService {
+ async query(): Promise {
+ const response = await axios.get("/locale");
+ return response.data;
+ }
+ async get(initials: string): Promise {
+ const response = await axios.get(`/locale/${initials}`);
+ return response.data;
+ }
+}
diff --git a/turing-shadcn/src/services/logging.service.ts b/turing-shadcn/src/services/logging.service.ts
new file mode 100644
index 00000000000..98f93589443
--- /dev/null
+++ b/turing-shadcn/src/services/logging.service.ts
@@ -0,0 +1,32 @@
+import axios from "axios";
+import type { TurLoggingInstance } from "@/models/logging/logging-instance.model";
+
+export class TurLoggingInstanceService {
+ async query(): Promise {
+ const response = await axios.get("/logging");
+ return response.data;
+ }
+ async get(id: string): Promise {
+ const response = await axios.get(`/logging/${id}`);
+ return response.data;
+ }
+ async create(turLoggingInstance: TurLoggingInstance): Promise {
+ const response = await axios.post("/logging",
+ turLoggingInstance
+ );
+ return response.data;
+ }
+ async update(turLoggingInstance: TurLoggingInstance): Promise {
+ const response = await axios.put(
+ `/logging/${turLoggingInstance.id.toString()}`,
+ turLoggingInstance
+ );
+ return response.data;
+ }
+ async delete(turLoggingInstance: TurLoggingInstance): Promise {
+ const response = await axios.delete(
+ `/logging/${turLoggingInstance.id.toString()}`
+ );
+ return response.status == 200;
+ }
+}
diff --git a/turing-shadcn/src/services/se.service.ts b/turing-shadcn/src/services/se.service.ts
new file mode 100644
index 00000000000..07bfb48ccc8
--- /dev/null
+++ b/turing-shadcn/src/services/se.service.ts
@@ -0,0 +1,32 @@
+import axios from "axios";
+import type { TurSEInstance } from "@/models/se/se-instance.model";
+
+export class TurSEInstanceService {
+ async query(): Promise |