Skip to content

Commit

Permalink
Removed types for endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
overmode committed Jan 14, 2025
1 parent ee21bd4 commit 872b9f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
6 changes: 1 addition & 5 deletions front/lib/swr/data_source_view_tables.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { useSendNotification } from "@dust-tt/sparkle";
import type { DataSourceViewType, LightWorkspaceType } from "@dust-tt/types";
import type {
PatchDataSourceTableRequestBody,
PostDataSourceTableRequestBody,
} from "@dust-tt/types";
import type { PatchDataSourceTableRequestBody } from "@dust-tt/types";
import { useMemo } from "react";
import type { Fetcher } from "swr";

Expand All @@ -15,7 +12,6 @@ import {
} from "@app/lib/swr/swr";
import type { ListTablesResponseBody } from "@app/pages/api/w/[wId]/spaces/[spaceId]/data_source_views/[dsvId]/tables";
import type { GetDataSourceViewTableResponseBody } from "@app/pages/api/w/[wId]/spaces/[spaceId]/data_source_views/[dsvId]/tables/[tableId]";
import type { PostTableResponseBody } from "@app/pages/api/w/[wId]/spaces/[spaceId]/data_sources/[dsId]/tables";
import type { PatchTableResponseBody } from "@app/pages/api/w/[wId]/spaces/[spaceId]/data_sources/[dsId]/tables/[tableId]";

export function useDataSourceViewTable({
Expand Down
12 changes: 0 additions & 12 deletions types/src/front/api_handlers/public/data_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ export type PatchDataSourceTableRequestBody = t.TypeOf<
typeof PatchDataSourceTableRequestBodySchema
>;

// Post and Patch require the same request body
export type PostDataSourceTableRequestBody = t.TypeOf<
typeof PatchDataSourceTableRequestBodySchema
>;

export const PostDataSourceTableRequestBodySchema = t.intersection([
PatchDataSourceTableRequestBodySchema,
t.type({
csv: t.string,
}),
]);

export const UpsertTableFromCsvRequestSchema = t.intersection([
t.type({
name: t.string,
Expand Down

0 comments on commit 872b9f0

Please sign in to comment.