@swiss-ai-hub/web 0.320.0 → 0.321.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/FormKit/AgentSelector.vue +20 -7
- package/components/FormKit/Repeater.vue +1 -4
- package/components/FormKit/VectorStoreInput.vue +43 -6
- package/components/Knowledge/Database/CreateModal.vue +315 -0
- package/components/Knowledge/Database/EmptyCard.vue +34 -0
- package/components/Knowledge/DeleteConfirmModal.vue +87 -0
- package/components/Knowledge/Namespace/Card.vue +18 -0
- package/components/Knowledge/Namespace/CreateModal.vue +11 -3
- package/components/Role/AccessCapabilities.vue +4 -4
- package/components/Role/AccessCapabilityGroup.vue +22 -6
- package/components/Role/AccessRulesEditor.vue +15 -12
- package/composables/app/useAppVersion.ts +31 -33
- package/composables/auth/useAuth.ts +3 -11
- package/composables/document/useCreateDatabase.ts +21 -0
- package/composables/document/useDeleteDatabase.ts +29 -0
- package/composables/document/useDeleteDocument.ts +1 -1
- package/composables/document/useDeleteDocuments.ts +1 -1
- package/composables/document/useDeleteNamespace.ts +30 -0
- package/composables/document/useIngestors.ts +23 -0
- package/composables/form/useCreateInstanceForm.ts +2 -2
- package/composables/form/useFormKitTransform.ts +44 -15
- package/formkit.config.ts +24 -1
- package/i18n/locales/de.yaml +60 -5
- package/i18n/locales/en.yaml +57 -3
- package/i18n/locales/fr.yaml +58 -3
- package/i18n/locales/it.yaml +60 -3
- package/middleware/agent-admin.ts +31 -0
- package/package.json +1 -1
- package/pages/[tenant]/service/agents.vue +3 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id].vue +12 -5
- package/pages/[tenant]/service/knowledge.vue +138 -0
- package/plugins/0.runtime-config.client.ts +5 -0
- package/plugins/oidc-client.ts +1 -1
- package/sdk/client/index.ts +29 -2
- package/sdk/client/schemas.gen.ts +641 -77
- package/sdk/client/sdk.gen.ts +159 -1
- package/sdk/client/types.gen.ts +543 -75
- package/plugins/keycloak-client.ts +0 -41
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
|
|
3
|
-
class KeycloakClient {
|
|
4
|
-
private readonly logoutUrl: string
|
|
5
|
-
private readonly clientId: string
|
|
6
|
-
|
|
7
|
-
constructor(authorityUrl: string, clientId: string) {
|
|
8
|
-
this.logoutUrl = `${authorityUrl}/protocol/openid-connect/logout`
|
|
9
|
-
this.clientId = clientId
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async logout(refreshToken: string): Promise<void> {
|
|
13
|
-
const response = await fetch(this.logoutUrl, {
|
|
14
|
-
method: 'POST',
|
|
15
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
16
|
-
body: new URLSearchParams({
|
|
17
|
-
client_id: this.clientId,
|
|
18
|
-
refresh_token: refreshToken,
|
|
19
|
-
}),
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
if (!response.ok) {
|
|
23
|
-
throw new Error(`Keycloak logout failed with status ${response.status}`)
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default defineNuxtPlugin(() => {
|
|
29
|
-
const config = useRuntimeConfig()
|
|
30
|
-
|
|
31
|
-
const keycloakClient = new KeycloakClient(
|
|
32
|
-
config.public.oidc.authorityUrl,
|
|
33
|
-
config.public.oidc.clientId,
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
provide: {
|
|
38
|
-
keycloakClient,
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
})
|