From 65a207b83ba7fda94bb07eb66b0d37fb9a020219 Mon Sep 17 00:00:00 2001 From: Flavien David Date: Thu, 31 Oct 2024 19:05:16 +0100 Subject: [PATCH] More vaults to spaces (#8394) --- front/admin/init_dust_apps.ts | 2 +- front/components/ViewFolderAPIModal.tsx | 4 +- front/components/app/Deploy.tsx | 4 +- front/components/poke/plans/form.tsx | 2 +- .../lib/api/assistant/actions/dust_app_run.ts | 2 +- front/lib/api/config.ts | 2 +- front/lib/api/spaces.ts | 8 ++-- front/lib/registry.ts | 42 +++++++++---------- .../resources/data_source_view_resource.ts | 20 ++++----- front/lib/resources/space_resource.ts | 2 +- front/lib/resources/string_ids.ts | 3 +- front/lib/swr/spaces.ts | 18 ++++---- .../20240730_backfill_data_source_views.ts | 2 +- ...ews_in_agent_data_source_configurations.ts | 2 +- .../20240820_backfill_data_source_views.ts | 2 +- ...ews_in_agent_data_source_configurations.ts | 2 +- ...20240821_backfill_all_data_source_views.ts | 6 +-- ...ews_in_agent_table_query_configurations.ts | 2 +- .../20240906_backfill_apps_vault_ids.ts | 8 ++-- front/migrations/20240910_app_data_sources.ts | 14 +++---- ...1_backfill_views_in_retrieval_documents.ts | 2 +- ..._ds_in_agent_table_query_configurations.ts | 2 +- ...0240927_backfill_conversations_groupIds.ts | 2 +- front/pages/api/registry/[type]/lookup.ts | 6 +-- .../pages/api/w/[wId]/data_sources/managed.ts | 4 +- .../[spaceId]/apps/[aId]/datasets/index.ts | 2 +- .../[runId]/blocks/[type]/[name]/index.ts | 2 +- .../[spaceId]/data_source_views/index.ts | 4 +- .../api/w/[wId]/spaces/[spaceId]/index.ts | 2 +- front/pages/poke/[wId]/index.tsx | 4 +- front/poke/temporal/activities.ts | 36 ++++++++-------- front/poke/temporal/client.ts | 12 +++--- front/poke/temporal/workflows.ts | 14 +++---- front/temporal/scrub_workspace/activities.ts | 28 ++++++------- sdks/js/src/index.ts | 12 +++--- sparkle/src/stories/Breadcrumbs.stories.tsx | 14 +++---- .../public/{vaults.ts => spaces.ts} | 0 types/src/front/data_source_view.ts | 2 +- types/src/front/groups.ts | 8 ++-- types/src/index.ts | 2 +- 40 files changed, 153 insertions(+), 152 deletions(-) rename types/src/front/api_handlers/public/{vaults.ts => spaces.ts} (100%) diff --git a/front/admin/init_dust_apps.ts b/front/admin/init_dust_apps.ts index ba121371fc41..53579e28bc78 100644 --- a/front/admin/init_dust_apps.ts +++ b/front/admin/init_dust_apps.ts @@ -36,7 +36,7 @@ async function main() { }); const group = await GroupResource.makeNew({ - name: `Group for vault Public Dust Apps`, + name: `Group for space Public Dust Apps`, workspaceId: w.id, kind: "regular", }); diff --git a/front/components/ViewFolderAPIModal.tsx b/front/components/ViewFolderAPIModal.tsx index 075c941178d0..00479b56bfd7 100644 --- a/front/components/ViewFolderAPIModal.tsx +++ b/front/components/ViewFolderAPIModal.tsx @@ -30,7 +30,7 @@ export function ViewFolderAPIModal({ const cURLRequest = (type: "upsert" | "search") => { switch (type) { case "upsert": - return `curl "${process.env.NEXT_PUBLIC_DUST_CLIENT_FACING_URL}/api/v1/w/${owner.sId}/vaults/${space.sId}/data_sources/${dataSource.sId}/documents/YOUR_DOCUMENT_ID" \\ + return `curl "${process.env.NEXT_PUBLIC_DUST_CLIENT_FACING_URL}/api/v1/w/${owner.sId}/spaces/${space.sId}/data_sources/${dataSource.sId}/documents/YOUR_DOCUMENT_ID" \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{ @@ -38,7 +38,7 @@ export function ViewFolderAPIModal({ "source_url": "https://acme.com" }'`; case "search": - return `curl "${process.env.NEXT_PUBLIC_DUST_CLIENT_FACING_URL}/api/v1/w/${owner.sId}/vaults/${space.sId}/data_sources/${dataSource.sId}/search?query=foo+bar&top_k=16&full_text=false" \\ + return `curl "${process.env.NEXT_PUBLIC_DUST_CLIENT_FACING_URL}/api/v1/w/${owner.sId}/spaces/${space.sId}/data_sources/${dataSource.sId}/search?query=foo+bar&top_k=16&full_text=false" \\ -H "Authorization: Bearer YOUR_API_KEY"`; default: assertNever(type); diff --git a/front/components/app/Deploy.tsx b/front/components/app/Deploy.tsx index 03c95624d8e6..380b63c09134 100644 --- a/front/components/app/Deploy.tsx +++ b/front/components/app/Deploy.tsx @@ -57,7 +57,7 @@ export function ViewAppAPIModal({ const cURLRequest = (type: "run") => { switch (type) { case "run": - return `curl ${process.env.NEXT_PUBLIC_DUST_CLIENT_FACING_URL}/api/v1/w/${owner.sId}/vaults/${app.space.sId}/apps/${app.sId}/runs \\ + return `curl ${process.env.NEXT_PUBLIC_DUST_CLIENT_FACING_URL}/api/v1/w/${owner.sId}/spaces/${app.space.sId}/apps/${app.sId}/runs \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{ @@ -103,7 +103,7 @@ export function ViewAppAPIModal({