From ce8b72540900836b31daf2aded7411d4bf7e24cd Mon Sep 17 00:00:00 2001 From: Flavien David Date: Thu, 1 Aug 2024 19:28:42 +0200 Subject: [PATCH] :scissors: --- front/lib/auth.ts | 3 +-- types/src/front/auth.ts | 11 ----------- types/src/index.ts | 1 - 3 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 types/src/front/auth.ts diff --git a/front/lib/auth.ts b/front/lib/auth.ts index caec9ead77bf..8af4c6297cf5 100644 --- a/front/lib/auth.ts +++ b/front/lib/auth.ts @@ -13,7 +13,6 @@ import type { PlanType, SubscriptionType } from "@dust-tt/types"; import type { DustAPICredentials } from "@dust-tt/types"; import type { Result } from "@dust-tt/types"; import type { APIErrorWithStatusCode } from "@dust-tt/types"; -import type { BaseAuthenticator } from "@dust-tt/types"; import { Err, groupHasPermission, @@ -61,7 +60,7 @@ const DUST_INTERNAL_EMAIL_REGEXP = /^[^@]+@dust\.tt$/; * It explicitely does not store a reference to the current user to make sure our permissions are * workspace oriented. Use `getUserFromSession` if needed. */ -export class Authenticator implements BaseAuthenticator { +export class Authenticator { _flags: WhitelistableFeature[]; _key?: KeyAuthType; _role: RoleType; diff --git a/types/src/front/auth.ts b/types/src/front/auth.ts deleted file mode 100644 index 51643d90ca0e..000000000000 --- a/types/src/front/auth.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { GroupType } from "./groups"; -import { LightWorkspaceType } from "./user"; - -// Authenticator is a concept that lives in front, -// but it's used when doing api calls to other services. -// This interface is a cheap way to represent the concept of an authenticator within types. -export interface BaseAuthenticator { - groups: () => GroupType[]; - - getNonNullableWorkspace: () => LightWorkspaceType; -} diff --git a/types/src/index.ts b/types/src/index.ts index 8efb3e848098..1cc99b31acc7 100644 --- a/types/src/index.ts +++ b/types/src/index.ts @@ -32,7 +32,6 @@ export * from "./front/assistant/builder"; export * from "./front/assistant/conversation"; export * from "./front/assistant/templates"; export * from "./front/assistant/visualization"; -export * from "./front/auth"; export * from "./front/content_fragment"; export * from "./front/data_source"; export * from "./front/data_source_view";