diff --git a/apps/studio/components/grid/components/grid/Grid.utils.tsx b/apps/studio/components/grid/components/grid/Grid.utils.tsx index b822b4be1d9..1c4bb625968 100644 --- a/apps/studio/components/grid/components/grid/Grid.utils.tsx +++ b/apps/studio/components/grid/components/grid/Grid.utils.tsx @@ -14,7 +14,7 @@ import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { DOCS_URL } from 'lib/constants' import { useGetImpersonatedRoleState } from 'state/role-impersonation-state' import { useTableEditorTableStateSnapshot } from 'state/table-editor-table' -import { Dictionary } from 'types' +import type { Dictionary } from 'types' export function useOnRowsChange(rows: SupaRow[]) { const queryClient = useQueryClient() diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx index 557c26f7f37..0fbb5df2f91 100644 --- a/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx +++ b/apps/studio/components/interfaces/Database/Replication/DestinationRow.tsx @@ -16,7 +16,7 @@ import { PipelineStatusRequestStatus, usePipelineRequestStatus, } from 'state/replication-pipeline-request-status' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { Button, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import ShimmeringLoader from 'ui-patterns/ShimmeringLoader' import { DeleteDestination } from './DeleteDestination' diff --git a/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx b/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx index 5e7bec9d0e2..c84b130bdd7 100644 --- a/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx +++ b/apps/studio/components/interfaces/Database/Replication/PipelineStatus.tsx @@ -4,7 +4,7 @@ import { useParams } from 'common' import { InlineLink } from 'components/ui/InlineLink' import { ReplicationPipelineStatusData } from 'data/replication/pipeline-status-query' import { PipelineStatusRequestStatus } from 'state/replication-pipeline-request-status' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { cn, Tooltip, TooltipContent, TooltipTrigger, WarningIcon } from 'ui' import ShimmeringLoader from 'ui-patterns/ShimmeringLoader' import { getPipelineStateMessages } from './Pipeline.utils' diff --git a/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx b/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx index 5974fe6f98a..fa1cfd82834 100644 --- a/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx +++ b/apps/studio/components/interfaces/Database/Replication/RowMenu.tsx @@ -11,7 +11,7 @@ import { PipelineStatusRequestStatus, usePipelineRequestStatus, } from 'state/replication-pipeline-request-status' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { Button, DropdownMenu, diff --git a/apps/studio/components/interfaces/Home/ProjectList/ProjectTableRow.tsx b/apps/studio/components/interfaces/Home/ProjectList/ProjectTableRow.tsx index 46210ee67ce..3ed1f237cef 100644 --- a/apps/studio/components/interfaces/Home/ProjectList/ProjectTableRow.tsx +++ b/apps/studio/components/interfaces/Home/ProjectList/ProjectTableRow.tsx @@ -7,7 +7,7 @@ import type { IntegrationProjectConnection } from 'data/integrations/integration import { getComputeSize, OrgProject } from 'data/projects/org-projects-infinite-query' import type { ResourceWarning } from 'data/usage/resource-warnings-query' import { BASE_PATH } from 'lib/constants' -import { Organization } from 'types' +import type { Organization } from 'types' import { TableCell, TableRow } from 'ui' import { TimestampInfo } from 'ui-patterns' import { inferProjectStatus } from './ProjectCard.utils' diff --git a/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueDataGrid.tsx b/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueDataGrid.tsx index c57020fd0c7..a3743525dd0 100644 --- a/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueDataGrid.tsx +++ b/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueDataGrid.tsx @@ -7,7 +7,7 @@ import DataGrid, { Column, DataGridHandle, Row } from 'react-data-grid' import AlertError from 'components/ui/AlertError' import { PostgresQueueMessage } from 'data/database-queues/database-queue-messages-infinite-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { Badge, Button, ResizableHandle, ResizablePanel, ResizablePanelGroup, cn } from 'ui' import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' import { DATE_FORMAT, MessageDetailsPanel } from './MessageDetailsPanel' diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/__tests__/EditSecretModal.test.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/__tests__/EditSecretModal.test.tsx index b9423af032a..497feb435ef 100644 --- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/__tests__/EditSecretModal.test.tsx +++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/__tests__/EditSecretModal.test.tsx @@ -6,7 +6,7 @@ import { useState } from 'react' import { render } from 'tests/helpers' import { addAPIMock } from 'tests/lib/msw' import { routerMock } from 'tests/lib/route-mock' -import { VaultSecret } from 'types' +import type { VaultSecret } from 'types' import { beforeEach, describe, expect, it, vi } from 'vitest' import EditSecretModal from '../EditSecretModal' diff --git a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx index d653482a4e4..76ae4e61663 100644 --- a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx +++ b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx @@ -17,7 +17,7 @@ import { import { ButtonTooltip } from 'components/ui/ButtonTooltip' import { useOrganizationLinkAwsMarketplaceMutation } from 'data/organizations/organization-link-aws-marketplace-mutation' import { DOCS_URL } from 'lib/constants' -import { Organization } from 'types' +import type { Organization } from 'types' import { Button, Collapsible_Shadcn_, diff --git a/apps/studio/components/interfaces/Organization/OrganizationCard.tsx b/apps/studio/components/interfaces/Organization/OrganizationCard.tsx index 0a4b81c256f..7ec30cf806c 100644 --- a/apps/studio/components/interfaces/Organization/OrganizationCard.tsx +++ b/apps/studio/components/interfaces/Organization/OrganizationCard.tsx @@ -5,7 +5,7 @@ import { useIsMFAEnabled } from 'common' import { ActionCard } from 'components/ui/ActionCard' import { useOrgProjectsInfiniteQuery } from 'data/projects/org-projects-infinite-query' import { Fragment } from 'react' -import { Organization } from 'types' +import type { Organization } from 'types' import { cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' export const OrganizationCard = ({ diff --git a/apps/studio/components/interfaces/Organization/ProjectClaim/confirm.tsx b/apps/studio/components/interfaces/Organization/ProjectClaim/confirm.tsx index 29954b0a303..d9547dc2793 100644 --- a/apps/studio/components/interfaces/Organization/ProjectClaim/confirm.tsx +++ b/apps/studio/components/interfaces/Organization/ProjectClaim/confirm.tsx @@ -12,7 +12,7 @@ import { useOrganizationProjectClaimMutation } from 'data/organizations/organiza import { OrganizationProjectClaimResponse } from 'data/organizations/organization-project-claim-query' import { projectKeys } from 'data/projects/keys' import { BASE_PATH } from 'lib/constants' -import { Organization } from 'types' +import type { Organization } from 'types' import { Button, cn, diff --git a/apps/studio/components/interfaces/OrganizationInvite/OrganizationInviteError.tsx b/apps/studio/components/interfaces/OrganizationInvite/OrganizationInviteError.tsx index 0e4907cd7fd..2a3578d8a55 100644 --- a/apps/studio/components/interfaces/OrganizationInvite/OrganizationInviteError.tsx +++ b/apps/studio/components/interfaces/OrganizationInvite/OrganizationInviteError.tsx @@ -4,7 +4,7 @@ import AlertError from 'components/ui/AlertError' import { OrganizationInviteByToken } from 'data/organization-members/organization-invitation-token-query' import { useSignOut } from 'lib/auth' import { useProfile } from 'lib/profile' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { cn } from 'ui' interface OrganizationInviteError { diff --git a/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx b/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx index f6a0884353a..db220dbf91e 100644 --- a/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx +++ b/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx @@ -11,17 +11,17 @@ import Table from 'components/to-be-cleaned/Table' import AlertError from 'components/ui/AlertError' import BarChart from 'components/ui/Charts/BarChart' import { useFillTimeseriesSorted } from 'hooks/analytics/useFillTimeseriesSorted' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Button, Collapsible, - WarningIcon, Collapsible_Shadcn_, - CollapsibleTrigger_Shadcn_, CollapsibleContent_Shadcn_, + CollapsibleTrigger_Shadcn_, + WarningIcon, } from 'ui' import { queryParamsToObject } from '../Reports.utils' import { ReportWidgetProps, ReportWidgetRendererProps } from '../ReportWidget' diff --git a/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx b/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx index 139998920ee..8e363debfeb 100644 --- a/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx +++ b/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx @@ -12,7 +12,7 @@ import { useLocalStorage } from 'hooks/misc/useLocalStorage' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { DOCS_URL } from 'lib/constants' import { useRoleImpersonationStateSnapshot } from 'state/role-impersonation-state' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { Button, cn, diff --git a/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx b/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx index cd92098dd7a..0dddabc29e9 100644 --- a/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx +++ b/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx @@ -13,7 +13,7 @@ import { useUrlState } from 'hooks/ui/useUrlState' import { IS_PLATFORM } from 'lib/constants' import { useAppStateSnapshot } from 'state/app-state' import { useDatabaseSelectorStateSnapshot } from 'state/database-selector' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { Button, CodeBlock, diff --git a/apps/studio/components/interfaces/Settings/Logs/LogTable.tsx b/apps/studio/components/interfaces/Settings/Logs/LogTable.tsx index d16a715497e..68fccc043e1 100644 --- a/apps/studio/components/interfaces/Settings/Logs/LogTable.tsx +++ b/apps/studio/components/interfaces/Settings/Logs/LogTable.tsx @@ -5,6 +5,7 @@ import { Key, ReactNode, useCallback, useEffect, useMemo, useState } from 'react import { Item, Menu, useContextMenu } from 'react-contexify' import DataGrid, { Column, RenderRowProps, Row } from 'react-data-grid' import { createPortal } from 'react-dom' +import { toast } from 'sonner' import { IS_PLATFORM, useParams } from 'common' import { ButtonTooltip } from 'components/ui/ButtonTooltip' @@ -12,8 +13,7 @@ import { DownloadResultsButton } from 'components/ui/DownloadResultsButton' import { useSelectedLog } from 'hooks/analytics/useSelectedLog' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useProfile } from 'lib/profile' -import { toast } from 'sonner' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { Button, ResizableHandle, diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx index 3647f90009d..a3d1905d1f2 100644 --- a/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx +++ b/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx @@ -3,7 +3,7 @@ import { getPublicUrlForBucketObject } from 'data/storage/bucket-object-get-publ import { signBucketObject } from 'data/storage/bucket-object-sign-mutation' import { Bucket } from 'data/storage/buckets-query' import { useStorageExplorerStateSnapshot } from 'state/storage-explorer' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { StorageItem } from '../Storage.types' const DEFAULT_EXPIRY = 7 * 24 * 60 * 60 // in seconds, default to 1 week diff --git a/apps/studio/components/ui/AIAssistantPanel/AIAssistant.utils.ts b/apps/studio/components/ui/AIAssistantPanel/AIAssistant.utils.ts index c593efce4a7..4f3c15f2853 100644 --- a/apps/studio/components/ui/AIAssistantPanel/AIAssistant.utils.ts +++ b/apps/studio/components/ui/AIAssistantPanel/AIAssistant.utils.ts @@ -1,6 +1,5 @@ -import { toast } from 'sonner' import { handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import { toast } from 'sonner' import { authKeys } from 'data/auth/keys' import { databaseExtensionsKeys } from 'data/database-extensions/keys' @@ -11,6 +10,7 @@ import { databaseKeys } from 'data/database/keys' import { enumeratedTypesKeys } from 'data/enumerated-types/keys' import { tableKeys } from 'data/tables/keys' import { tryParseJson } from 'lib/helpers' +import { ResponseError } from 'types' import { SAFE_FUNCTIONS } from './AiAssistant.constants' // [Joshen] This is just very basic identification, but possible can extend perhaps diff --git a/apps/studio/components/ui/PartnerIcon.tsx b/apps/studio/components/ui/PartnerIcon.tsx index acd3aa7b952..ec66d2f1e06 100644 --- a/apps/studio/components/ui/PartnerIcon.tsx +++ b/apps/studio/components/ui/PartnerIcon.tsx @@ -1,6 +1,6 @@ -import { Organization } from 'types' -import { cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { MANAGED_BY } from 'lib/constants/infrastructure' +import type { Organization } from 'types' +import { cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { PARTNER_TO_NAME } from './PartnerManagedResource' interface PartnerIconProps { diff --git a/apps/studio/components/ui/org-selector.tsx b/apps/studio/components/ui/org-selector.tsx index 17c0e31513d..5c09baf40f9 100644 --- a/apps/studio/components/ui/org-selector.tsx +++ b/apps/studio/components/ui/org-selector.tsx @@ -6,7 +6,7 @@ import ShimmeringLoader from 'components/ui/ShimmeringLoader' import { useFreeProjectLimitCheckQuery } from 'data/organizations/free-project-limit-check-query' import { useOrganizationsQuery } from 'data/organizations/organizations-query' import { parseAsString, useQueryState } from 'nuqs' -import { Organization } from 'types' +import type { Organization } from 'types' import { Badge, Button, Card, CardHeader, CardTitle, Input_Shadcn_ } from 'ui' import { ButtonTooltip } from './ButtonTooltip' diff --git a/apps/studio/data/access-tokens/access-tokens-query.ts b/apps/studio/data/access-tokens/access-tokens-query.ts index 7e882a7a170..53d5f97c3b6 100644 --- a/apps/studio/data/access-tokens/access-tokens-query.ts +++ b/apps/studio/data/access-tokens/access-tokens-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { accessTokenKeys } from './keys' export async function getAccessTokens(signal?: AbortSignal) { diff --git a/apps/studio/data/ai/rate-message-mutation.ts b/apps/studio/data/ai/rate-message-mutation.ts index 8f9907723cf..e0b0abbf174 100644 --- a/apps/studio/data/ai/rate-message-mutation.ts +++ b/apps/studio/data/ai/rate-message-mutation.ts @@ -1,10 +1,10 @@ -import { useMutation, UseMutationOptions } from '@tanstack/react-query' import { UIMessage } from '@ai-sdk/react' +import { useMutation, UseMutationOptions } from '@tanstack/react-query' +import type { RateMessageResponse } from 'components/ui/AIAssistantPanel/Message.utils' import { constructHeaders, fetchHandler } from 'data/fetchers' import { BASE_PATH } from 'lib/constants' import { ResponseError } from 'types' -import type { RateMessageResponse } from 'components/ui/AIAssistantPanel/Message.utils' export type RateMessageVariables = { rating: 'positive' | 'negative' diff --git a/apps/studio/data/analytics/org-daily-stats-query.ts b/apps/studio/data/analytics/org-daily-stats-query.ts index ae80bcf4c06..c6d0e247b77 100644 --- a/apps/studio/data/analytics/org-daily-stats-query.ts +++ b/apps/studio/data/analytics/org-daily-stats-query.ts @@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import type { components } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { analyticsKeys } from './keys' export enum EgressType { diff --git a/apps/studio/data/api-keys/[id]/api-key-id-query.ts b/apps/studio/data/api-keys/[id]/api-key-id-query.ts index 87ab4073ae8..b143f24e40e 100644 --- a/apps/studio/data/api-keys/[id]/api-key-id-query.ts +++ b/apps/studio/data/api-keys/[id]/api-key-id-query.ts @@ -1,6 +1,6 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { apiKeysKeys } from './../keys' export interface APIKeyVariables { diff --git a/apps/studio/data/api-keys/[id]/api-key-id-update-mutation.ts b/apps/studio/data/api-keys/[id]/api-key-id-update-mutation.ts index 0548af5bdba..2af09655ba0 100644 --- a/apps/studio/data/api-keys/[id]/api-key-id-update-mutation.ts +++ b/apps/studio/data/api-keys/[id]/api-key-id-update-mutation.ts @@ -1,7 +1,8 @@ +import { toast } from 'sonner' + import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query' import { handleError, patch } from 'data/fetchers' -import { toast } from 'sonner' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { apiKeysKeys } from '../keys' export interface UpdateAPIKeybyIdVariables { diff --git a/apps/studio/data/api-keys/api-keys-query.ts b/apps/studio/data/api-keys/api-keys-query.ts index 596ae00710b..36a93b83f53 100644 --- a/apps/studio/data/api-keys/api-keys-query.ts +++ b/apps/studio/data/api-keys/api-keys-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { apiKeysKeys } from './keys' type LegacyKeys = { diff --git a/apps/studio/data/api-keys/legacy-api-keys-status-query.ts b/apps/studio/data/api-keys/legacy-api-keys-status-query.ts index 9d314ea5407..33c812b72eb 100644 --- a/apps/studio/data/api-keys/legacy-api-keys-status-query.ts +++ b/apps/studio/data/api-keys/legacy-api-keys-status-query.ts @@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' import { IS_PLATFORM } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { apiKeysKeys } from './keys' interface LegacyAPIKeysStatusVariables { diff --git a/apps/studio/data/config/project-postgrest-config-query.ts b/apps/studio/data/config/project-postgrest-config-query.ts index 67c14ee48f1..5ecea8a8bb7 100644 --- a/apps/studio/data/config/project-postgrest-config-query.ts +++ b/apps/studio/data/config/project-postgrest-config-query.ts @@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { components } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { configKeys } from './keys' export type ProjectPostgrestConfigVariables = { diff --git a/apps/studio/data/config/project-unpause-postgres-versions-query.ts b/apps/studio/data/config/project-unpause-postgres-versions-query.ts index 9ddcc6b1d18..2b62e151fb3 100644 --- a/apps/studio/data/config/project-unpause-postgres-versions-query.ts +++ b/apps/studio/data/config/project-unpause-postgres-versions-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { configKeys } from './keys' export type ProjectUnpausePostgresVersionsVariables = { diff --git a/apps/studio/data/content/content-count-query.ts b/apps/studio/data/content/content-count-query.ts index d7ae0eca0dd..8b4d6cea696 100644 --- a/apps/studio/data/content/content-count-query.ts +++ b/apps/studio/data/content/content-count-query.ts @@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { operations } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { contentKeys } from './keys' type GetContentCountVariables = diff --git a/apps/studio/data/content/sql-folder-contents-query.ts b/apps/studio/data/content/sql-folder-contents-query.ts index 6027e3923c7..393844df459 100644 --- a/apps/studio/data/content/sql-folder-contents-query.ts +++ b/apps/studio/data/content/sql-folder-contents-query.ts @@ -1,7 +1,7 @@ import { useInfiniteQuery, UseInfiniteQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { contentKeys } from './keys' import { SNIPPET_PAGE_LIMIT } from './sql-folders-query' diff --git a/apps/studio/data/content/sql-folders-query.ts b/apps/studio/data/content/sql-folders-query.ts index c329e5ce014..54749e47d87 100644 --- a/apps/studio/data/content/sql-folders-query.ts +++ b/apps/studio/data/content/sql-folders-query.ts @@ -2,7 +2,7 @@ import { useInfiniteQuery, UseInfiniteQueryOptions } from '@tanstack/react-query import { components } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { contentKeys } from './keys' export type SnippetFolderResponse = components['schemas']['GetUserContentFolderResponse']['data'] diff --git a/apps/studio/data/database-cron-jobs/database-cron-job-query.ts b/apps/studio/data/database-cron-jobs/database-cron-job-query.ts index 3fe4524b17a..3f35b350671 100644 --- a/apps/studio/data/database-cron-jobs/database-cron-job-query.ts +++ b/apps/studio/data/database-cron-jobs/database-cron-job-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { CronJob } from './database-cron-jobs-infinite-query' import { databaseCronJobsKeys } from './keys' diff --git a/apps/studio/data/database-cron-jobs/database-cron-jobs-count-query.ts b/apps/studio/data/database-cron-jobs/database-cron-jobs-count-query.ts index 85813f9b240..db44923c27b 100644 --- a/apps/studio/data/database-cron-jobs/database-cron-jobs-count-query.ts +++ b/apps/studio/data/database-cron-jobs/database-cron-jobs-count-query.ts @@ -1,6 +1,6 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseCronJobsKeys } from './keys' type DatabaseCronJobsCountVariables = { diff --git a/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts b/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts index c116e1d6e64..81cf7242b3e 100644 --- a/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts +++ b/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts @@ -1,7 +1,7 @@ import { UseInfiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseCronJobsKeys } from './keys' const CRON_JOBS_PAGE_LIMIT = 20 diff --git a/apps/studio/data/database-cron-jobs/database-cron-jobs-runs-infinite-query.ts b/apps/studio/data/database-cron-jobs/database-cron-jobs-runs-infinite-query.ts index 115ed9fabc3..57e859e2129 100644 --- a/apps/studio/data/database-cron-jobs/database-cron-jobs-runs-infinite-query.ts +++ b/apps/studio/data/database-cron-jobs/database-cron-jobs-runs-infinite-query.ts @@ -2,7 +2,7 @@ import { UseInfiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query import { last } from 'lodash' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseCronJobsKeys } from './keys' export type DatabaseCronJobRunsVariables = { diff --git a/apps/studio/data/database-cron-jobs/database-cron-timezone-query.ts b/apps/studio/data/database-cron-jobs/database-cron-timezone-query.ts index 0047e57c3c4..1ef2e3a99e8 100644 --- a/apps/studio/data/database-cron-jobs/database-cron-timezone-query.ts +++ b/apps/studio/data/database-cron-jobs/database-cron-timezone-query.ts @@ -1,6 +1,6 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseCronJobsKeys } from './keys' export type DatabaseCronJobsVariables = { diff --git a/apps/studio/data/database-queues/database-queue-messages-infinite-query.ts b/apps/studio/data/database-queues/database-queue-messages-infinite-query.ts index 2e3a436f56e..e43456a8976 100644 --- a/apps/studio/data/database-queues/database-queue-messages-infinite-query.ts +++ b/apps/studio/data/database-queues/database-queue-messages-infinite-query.ts @@ -1,10 +1,11 @@ import { UseInfiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query' +import dayjs from 'dayjs' +import { last } from 'lodash' + import { QUEUE_MESSAGE_TYPE } from 'components/interfaces/Integrations/Queues/SingleQueue/Queue.utils' import { executeSql } from 'data/sql/execute-sql-query' -import dayjs from 'dayjs' import { DATE_FORMAT } from 'lib/constants' -import { last } from 'lodash' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseQueuesKeys } from './keys' export type DatabaseQueueVariables = { diff --git a/apps/studio/data/database-queues/database-queues-expose-postgrest-status-query.ts b/apps/studio/data/database-queues/database-queues-expose-postgrest-status-query.ts index b298b7290ea..d1672bd60be 100644 --- a/apps/studio/data/database-queues/database-queues-expose-postgrest-status-query.ts +++ b/apps/studio/data/database-queues/database-queues-expose-postgrest-status-query.ts @@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import minify from 'pg-minify' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { QUEUES_SCHEMA } from './database-queues-toggle-postgrest-mutation' import { databaseQueuesKeys } from './keys' diff --git a/apps/studio/data/database-queues/database-queues-metrics-query.ts b/apps/studio/data/database-queues/database-queues-metrics-query.ts index 21bee875c36..681e86108cc 100644 --- a/apps/studio/data/database-queues/database-queues-metrics-query.ts +++ b/apps/studio/data/database-queues/database-queues-metrics-query.ts @@ -1,6 +1,6 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseQueuesKeys } from './keys' export type DatabaseQueuesMetricsVariables = { diff --git a/apps/studio/data/database-queues/database-queues-query.ts b/apps/studio/data/database-queues/database-queues-query.ts index 9726507f7da..c86f33e5c54 100644 --- a/apps/studio/data/database-queues/database-queues-query.ts +++ b/apps/studio/data/database-queues/database-queues-query.ts @@ -1,6 +1,6 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { executeSql } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseQueuesKeys } from './keys' export type DatabaseQueuesVariables = { diff --git a/apps/studio/data/database/pgbouncer-config-query.ts b/apps/studio/data/database/pgbouncer-config-query.ts index 4bbd2f5a356..5269d82dda2 100644 --- a/apps/studio/data/database/pgbouncer-config-query.ts +++ b/apps/studio/data/database/pgbouncer-config-query.ts @@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' import { IS_PLATFORM } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseKeys } from './keys' export type PgbouncerConfigVariables = { diff --git a/apps/studio/data/database/pgbouncer-status-query.ts b/apps/studio/data/database/pgbouncer-status-query.ts index 8a896250057..513ea8816ae 100644 --- a/apps/studio/data/database/pgbouncer-status-query.ts +++ b/apps/studio/data/database/pgbouncer-status-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { databaseKeys } from './keys' export type PgbouncerStatusVariables = { diff --git a/apps/studio/data/docs/project-json-schema-query.ts b/apps/studio/data/docs/project-json-schema-query.ts index 1d55dc64b32..cf828c88773 100644 --- a/apps/studio/data/docs/project-json-schema-query.ts +++ b/apps/studio/data/docs/project-json-schema-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { docsKeys } from './keys' export type ProjectJsonSchemaVariables = { diff --git a/apps/studio/data/edge-functions/edge-function-body-query.ts b/apps/studio/data/edge-functions/edge-function-body-query.ts index 7fe5947f633..5f7f7923a10 100644 --- a/apps/studio/data/edge-functions/edge-function-body-query.ts +++ b/apps/studio/data/edge-functions/edge-function-body-query.ts @@ -2,7 +2,7 @@ import { getMultipartBoundary, parseMultipartStream } from '@mjackson/multipart- import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' import { IS_PLATFORM } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { edgeFunctionsKeys } from './keys' export type EdgeFunctionBodyVariables = { diff --git a/apps/studio/data/edge-functions/edge-function-query.ts b/apps/studio/data/edge-functions/edge-function-query.ts index 4625fcf86f5..c0aa1ff013d 100644 --- a/apps/studio/data/edge-functions/edge-function-query.ts +++ b/apps/studio/data/edge-functions/edge-function-query.ts @@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { components } from 'api-types' import { get, handleError } from 'data/fetchers' import { IS_PLATFORM } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { edgeFunctionsKeys } from './keys' export type EdgeFunctionVariables = { diff --git a/apps/studio/data/edge-functions/edge-function-test-mutation.ts b/apps/studio/data/edge-functions/edge-function-test-mutation.ts index ab2df63c873..5c9ec39c5d8 100644 --- a/apps/studio/data/edge-functions/edge-function-test-mutation.ts +++ b/apps/studio/data/edge-functions/edge-function-test-mutation.ts @@ -4,7 +4,7 @@ import { toast } from 'sonner' import { ResponseData } from 'components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.types' import { constructHeaders, fetchHandler } from 'data/fetchers' import { BASE_PATH } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' export type EdgeFunctionTestResponse = { title: string diff --git a/apps/studio/data/entity-types/entity-types-infinite-query.ts b/apps/studio/data/entity-types/entity-types-infinite-query.ts index 4b9358aea4d..72fc8ac4fe0 100644 --- a/apps/studio/data/entity-types/entity-types-infinite-query.ts +++ b/apps/studio/data/entity-types/entity-types-infinite-query.ts @@ -1,6 +1,6 @@ import { QueryClient, useInfiniteQuery, UseInfiniteQueryOptions } from '@tanstack/react-query' import { executeSql, ExecuteSqlVariables } from 'data/sql/execute-sql-query' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { ENTITY_TYPE } from './entity-type-constants' import { entityTypeKeys } from './keys' diff --git a/apps/studio/data/jwt-signing-keys/jwt-signing-keys-query.ts b/apps/studio/data/jwt-signing-keys/jwt-signing-keys-query.ts index ceaebae9dda..959dbf5abf6 100644 --- a/apps/studio/data/jwt-signing-keys/jwt-signing-keys-query.ts +++ b/apps/studio/data/jwt-signing-keys/jwt-signing-keys-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { components } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { jwtSigningKeysKeys } from './keys' export type JWTSigningKey = components['schemas']['SigningKeyResponse'] diff --git a/apps/studio/data/jwt-signing-keys/legacy-jwt-signing-key-query.ts b/apps/studio/data/jwt-signing-keys/legacy-jwt-signing-key-query.ts index 9bb2d493107..23be0df5bc5 100644 --- a/apps/studio/data/jwt-signing-keys/legacy-jwt-signing-key-query.ts +++ b/apps/studio/data/jwt-signing-keys/legacy-jwt-signing-key-query.ts @@ -1,6 +1,6 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { jwtSigningKeysKeys } from './keys' diff --git a/apps/studio/data/lint/lint-query.ts b/apps/studio/data/lint/lint-query.ts index 3e84f485da3..bcb7fdf5be2 100644 --- a/apps/studio/data/lint/lint-query.ts +++ b/apps/studio/data/lint/lint-query.ts @@ -4,7 +4,7 @@ import { components } from 'api-types' import { get, handleError } from 'data/fetchers' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { PROJECT_STATUS } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { lintKeys } from './keys' type ProjectLintsVariables = { diff --git a/apps/studio/data/lint/lint-rules-query.ts b/apps/studio/data/lint/lint-rules-query.ts index 37778d3b81e..7cdd94bfed9 100644 --- a/apps/studio/data/lint/lint-rules-query.ts +++ b/apps/studio/data/lint/lint-rules-query.ts @@ -4,7 +4,7 @@ import { components } from 'api-types' import { get, handleError } from 'data/fetchers' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { PROJECT_STATUS } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { lintKeys } from './keys' type ProjectLintRulesVariables = { diff --git a/apps/studio/data/log-drains/log-drains-query.ts b/apps/studio/data/log-drains/log-drains-query.ts index e4766967361..bcc5a349e09 100644 --- a/apps/studio/data/log-drains/log-drains-query.ts +++ b/apps/studio/data/log-drains/log-drains-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' +import type { ResponseError } from 'types' import { logDrainsKeys } from './keys' -import { ResponseError } from 'types' export type LogDrainsVariables = { ref?: string diff --git a/apps/studio/data/logs/unified-log-inspection-query.ts b/apps/studio/data/logs/unified-log-inspection-query.ts index 68c9bec8256..a9be4009fec 100644 --- a/apps/studio/data/logs/unified-log-inspection-query.ts +++ b/apps/studio/data/logs/unified-log-inspection-query.ts @@ -9,7 +9,7 @@ import { } from 'components/interfaces/UnifiedLogs/Queries/ServiceFlowQueries/ServiceFlow.sql' import { QuerySearchParamsType } from 'components/interfaces/UnifiedLogs/UnifiedLogs.types' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { logsKeys } from './keys' import { getUnifiedLogsISOStartEnd, diff --git a/apps/studio/data/logs/unified-logs-infinite-query.ts b/apps/studio/data/logs/unified-logs-infinite-query.ts index e31534d98a3..3dc22ee8f62 100644 --- a/apps/studio/data/logs/unified-logs-infinite-query.ts +++ b/apps/studio/data/logs/unified-logs-infinite-query.ts @@ -6,7 +6,7 @@ import { QuerySearchParamsType, } from 'components/interfaces/UnifiedLogs/UnifiedLogs.types' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { logsKeys } from './keys' const LOGS_PAGE_LIMIT = 50 diff --git a/apps/studio/data/oauth-secrets/client-secret-create-mutation.ts b/apps/studio/data/oauth-secrets/client-secret-create-mutation.ts index 1ae00e41a42..1cce6c6fcac 100644 --- a/apps/studio/data/oauth-secrets/client-secret-create-mutation.ts +++ b/apps/studio/data/oauth-secrets/client-secret-create-mutation.ts @@ -1,7 +1,7 @@ import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query' import { handleError, post } from 'data/fetchers' import { toast } from 'sonner' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { clientSecretKeys } from './keys' export type ClientSecretCreateVariables = { diff --git a/apps/studio/data/oauth-secrets/client-secret-delete-mutation.ts b/apps/studio/data/oauth-secrets/client-secret-delete-mutation.ts index 6ead4a0167a..0b96c249c5d 100644 --- a/apps/studio/data/oauth-secrets/client-secret-delete-mutation.ts +++ b/apps/studio/data/oauth-secrets/client-secret-delete-mutation.ts @@ -1,7 +1,7 @@ import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query' import { del, handleError } from 'data/fetchers' import { toast } from 'sonner' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { clientSecretKeys } from './keys' export type ClientSecretDeleteVariables = { diff --git a/apps/studio/data/oauth-secrets/client-secrets-query.ts b/apps/studio/data/oauth-secrets/client-secrets-query.ts index 4e5c84389f0..1e29456b08e 100644 --- a/apps/studio/data/oauth-secrets/client-secrets-query.ts +++ b/apps/studio/data/oauth-secrets/client-secrets-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { clientSecretKeys } from './keys' import { components } from 'api-types' diff --git a/apps/studio/data/projects/clone-query.ts b/apps/studio/data/projects/clone-query.ts index 11a18edf970..7de7d173b1d 100644 --- a/apps/studio/data/projects/clone-query.ts +++ b/apps/studio/data/projects/clone-query.ts @@ -1,8 +1,8 @@ -import { get, handleError } from 'data/fetchers' -import { projectKeys } from './keys' import { useQuery, UseQueryOptions } from '@tanstack/react-query' -import { ResponseError } from 'types' import { InfraInstanceSize } from 'components/interfaces/DiskManagement/DiskManagement.types' +import { get, handleError } from 'data/fetchers' +import type { ResponseError } from 'types' +import { projectKeys } from './keys' export async function getCloneBackups(projectRef?: string) { if (!projectRef) throw new Error('Project ref is required') diff --git a/apps/studio/data/projects/clone-status-query.ts b/apps/studio/data/projects/clone-status-query.ts index 71b816badcf..2ed76392964 100644 --- a/apps/studio/data/projects/clone-status-query.ts +++ b/apps/studio/data/projects/clone-status-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { components } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { projectKeys } from './keys' export type CloneStatus = components['schemas']['ProjectClonedStatusResponse'] diff --git a/apps/studio/data/projects/org-projects-infinite-query.ts b/apps/studio/data/projects/org-projects-infinite-query.ts index 607dd870f5c..47524700e9c 100644 --- a/apps/studio/data/projects/org-projects-infinite-query.ts +++ b/apps/studio/data/projects/org-projects-infinite-query.ts @@ -3,7 +3,7 @@ import { useInfiniteQuery, UseInfiniteQueryOptions, useQueryClient } from '@tans import { components } from 'api-types' import { get, handleError } from 'data/fetchers' import { useProfile } from 'lib/profile' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { INFINITE_PROJECTS_KEY_PREFIX, projectKeys } from './keys' // [Joshen] Try to keep this value a multiple of 6 (common denominator of 2 and 3) to fit the cards view diff --git a/apps/studio/data/projects/project-transfer-mutation.ts b/apps/studio/data/projects/project-transfer-mutation.ts index 6f01d7ced6a..7aee266c13c 100644 --- a/apps/studio/data/projects/project-transfer-mutation.ts +++ b/apps/studio/data/projects/project-transfer-mutation.ts @@ -2,7 +2,7 @@ import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react import { toast } from 'sonner' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { projectKeys } from './keys' export type ProjectTransferVariables = { diff --git a/apps/studio/data/projects/projects-infinite-query.ts b/apps/studio/data/projects/projects-infinite-query.ts index ebcee877657..d25dba27ce7 100644 --- a/apps/studio/data/projects/projects-infinite-query.ts +++ b/apps/studio/data/projects/projects-infinite-query.ts @@ -3,7 +3,7 @@ import { useInfiniteQuery, UseInfiniteQueryOptions } from '@tanstack/react-query import { components } from 'api-types' import { get, handleError } from 'data/fetchers' import { useProfile } from 'lib/profile' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { projectKeys } from './keys' const DEFAULT_LIMIT = 100 diff --git a/apps/studio/data/replication/destination-by-id-query.ts b/apps/studio/data/replication/destination-by-id-query.ts index 256f7d2497e..c157f0108e2 100644 --- a/apps/studio/data/replication/destination-by-id-query.ts +++ b/apps/studio/data/replication/destination-by-id-query.ts @@ -1,8 +1,8 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' -import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' import type { components } from 'api-types' +import { get, handleError } from 'data/fetchers' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationDestinationByIdParams = { projectRef?: string; destinationId?: number } diff --git a/apps/studio/data/replication/destinations-query.ts b/apps/studio/data/replication/destinations-query.ts index 38eb3ac2d27..63fd8098fae 100644 --- a/apps/studio/data/replication/destinations-query.ts +++ b/apps/studio/data/replication/destinations-query.ts @@ -1,7 +1,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationDestinationsParams = { projectRef?: string } diff --git a/apps/studio/data/replication/pipeline-by-id-query.ts b/apps/studio/data/replication/pipeline-by-id-query.ts index 88d537a9b6b..65e3584b3a6 100644 --- a/apps/studio/data/replication/pipeline-by-id-query.ts +++ b/apps/studio/data/replication/pipeline-by-id-query.ts @@ -1,8 +1,8 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' -import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' import type { components } from 'api-types' +import { get, handleError } from 'data/fetchers' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationPipelineByIdParams = { projectRef?: string; pipelineId?: number } diff --git a/apps/studio/data/replication/pipeline-replication-status-query.ts b/apps/studio/data/replication/pipeline-replication-status-query.ts index faf0769a534..9289ff21ea6 100644 --- a/apps/studio/data/replication/pipeline-replication-status-query.ts +++ b/apps/studio/data/replication/pipeline-replication-status-query.ts @@ -1,7 +1,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationPipelineReplicationStatusParams = { projectRef?: string; pipelineId?: number } diff --git a/apps/studio/data/replication/pipeline-status-query.ts b/apps/studio/data/replication/pipeline-status-query.ts index 0731af7e1af..400884d4628 100644 --- a/apps/studio/data/replication/pipeline-status-query.ts +++ b/apps/studio/data/replication/pipeline-status-query.ts @@ -1,7 +1,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationPipelinesStatusParams = { projectRef?: string; pipelineId?: number } diff --git a/apps/studio/data/replication/pipeline-version-query.ts b/apps/studio/data/replication/pipeline-version-query.ts index 9ed514ff570..911ced6ff53 100644 --- a/apps/studio/data/replication/pipeline-version-query.ts +++ b/apps/studio/data/replication/pipeline-version-query.ts @@ -2,7 +2,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { components } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationPipelineVersionParams = { projectRef?: string; pipelineId?: number } diff --git a/apps/studio/data/replication/pipelines-query.ts b/apps/studio/data/replication/pipelines-query.ts index c21af4e7b2f..cb00595c6f2 100644 --- a/apps/studio/data/replication/pipelines-query.ts +++ b/apps/studio/data/replication/pipelines-query.ts @@ -1,7 +1,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationPipelinesParams = { projectRef?: string } diff --git a/apps/studio/data/replication/publications-query.ts b/apps/studio/data/replication/publications-query.ts index 8a10561946b..6fb56ad7982 100644 --- a/apps/studio/data/replication/publications-query.ts +++ b/apps/studio/data/replication/publications-query.ts @@ -2,7 +2,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { components } from 'api-types' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationPublicationsParams = { projectRef?: string; sourceId?: number } diff --git a/apps/studio/data/replication/sources-query.ts b/apps/studio/data/replication/sources-query.ts index 3fd68761f87..14201ee64ce 100644 --- a/apps/studio/data/replication/sources-query.ts +++ b/apps/studio/data/replication/sources-query.ts @@ -1,7 +1,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationSourcesParams = { projectRef?: string } diff --git a/apps/studio/data/replication/tables-query.ts b/apps/studio/data/replication/tables-query.ts index 7da559b1139..a557f33d6f3 100644 --- a/apps/studio/data/replication/tables-query.ts +++ b/apps/studio/data/replication/tables-query.ts @@ -1,7 +1,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { replicationKeys } from './keys' type ReplicationTablesParams = { projectRef?: string; sourceId?: number } diff --git a/apps/studio/data/reports/database-charts.ts b/apps/studio/data/reports/database-charts.ts index 6ee8c26fbac..6937de4ed92 100644 --- a/apps/studio/data/reports/database-charts.ts +++ b/apps/studio/data/reports/database-charts.ts @@ -2,7 +2,7 @@ import { numberFormatter } from 'components/ui/Charts/Charts.utils' import { ReportAttributes } from 'components/ui/Charts/ComposedChart.utils' import { DOCS_URL } from 'lib/constants' import { formatBytes } from 'lib/helpers' -import { Organization } from 'types' +import type { Organization } from 'types' import { DiskAttributesData } from '../config/disk-attributes-query' import { MaxConnectionsData } from '../database/max-connections-query' import { Project } from '../projects/project-detail-query' diff --git a/apps/studio/data/storage/bucket-object-delete-mutation.ts b/apps/studio/data/storage/bucket-object-delete-mutation.ts index 4e2a474de3b..2554d7feedb 100644 --- a/apps/studio/data/storage/bucket-object-delete-mutation.ts +++ b/apps/studio/data/storage/bucket-object-delete-mutation.ts @@ -2,7 +2,7 @@ import { UseMutationOptions, useMutation, useQueryClient } from '@tanstack/react import { del, handleError } from 'data/fetchers' import { toast } from 'sonner' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' type DeleteBucketObjectParams = { projectRef: string diff --git a/apps/studio/data/storage/bucket-object-download-mutation.ts b/apps/studio/data/storage/bucket-object-download-mutation.ts index ce36130170b..5fb6df6752d 100644 --- a/apps/studio/data/storage/bucket-object-download-mutation.ts +++ b/apps/studio/data/storage/bucket-object-download-mutation.ts @@ -4,7 +4,7 @@ import { toast } from 'sonner' import { components } from 'data/api' import { fetchPost } from 'data/fetchers' import { API_URL, IS_PLATFORM } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' type DownloadBucketObjectParams = { projectRef: string diff --git a/apps/studio/data/storage/bucket-object-get-public-url-mutation.ts b/apps/studio/data/storage/bucket-object-get-public-url-mutation.ts index 51987b66304..d9b3274d83f 100644 --- a/apps/studio/data/storage/bucket-object-get-public-url-mutation.ts +++ b/apps/studio/data/storage/bucket-object-get-public-url-mutation.ts @@ -3,7 +3,7 @@ import { toast } from 'sonner' import { components } from 'data/api' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' type BucketObjectPublicUrlParams = { projectRef: string diff --git a/apps/studio/data/storage/bucket-object-sign-mutation.ts b/apps/studio/data/storage/bucket-object-sign-mutation.ts index e6857bfe833..82e0435f90b 100644 --- a/apps/studio/data/storage/bucket-object-sign-mutation.ts +++ b/apps/studio/data/storage/bucket-object-sign-mutation.ts @@ -3,7 +3,7 @@ import { toast } from 'sonner' import { components } from 'data/api' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' type SignBucketObjectParams = { projectRef: string diff --git a/apps/studio/data/storage/bucket-objects-list-mutation.ts b/apps/studio/data/storage/bucket-objects-list-mutation.ts index a951d23918c..1fe470e4ac1 100644 --- a/apps/studio/data/storage/bucket-objects-list-mutation.ts +++ b/apps/studio/data/storage/bucket-objects-list-mutation.ts @@ -3,7 +3,7 @@ import { toast } from 'sonner' import { components } from 'data/api' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' type ListBucketObjectsParams = { projectRef: string diff --git a/apps/studio/data/storage/object-move-mutation.ts b/apps/studio/data/storage/object-move-mutation.ts index 577589c79ad..7994f95ceeb 100644 --- a/apps/studio/data/storage/object-move-mutation.ts +++ b/apps/studio/data/storage/object-move-mutation.ts @@ -2,7 +2,7 @@ import { UseMutationOptions, useMutation } from '@tanstack/react-query' import { toast } from 'sonner' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' type MoveStorageObjectParams = { projectRef: string diff --git a/apps/studio/data/storage/s3-access-key-create-mutation.ts b/apps/studio/data/storage/s3-access-key-create-mutation.ts index b8ce4f8f184..68699bbcfe9 100644 --- a/apps/studio/data/storage/s3-access-key-create-mutation.ts +++ b/apps/studio/data/storage/s3-access-key-create-mutation.ts @@ -2,7 +2,7 @@ import { UseMutationOptions, useMutation, useQueryClient } from '@tanstack/react import { toast } from 'sonner' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { storageCredentialsKeys } from './s3-access-key-keys' type CreateS3AccessKeyCredentialVariables = { diff --git a/apps/studio/data/storage/s3-access-key-delete-mutation.ts b/apps/studio/data/storage/s3-access-key-delete-mutation.ts index b02b899c889..1e92a9954ef 100644 --- a/apps/studio/data/storage/s3-access-key-delete-mutation.ts +++ b/apps/studio/data/storage/s3-access-key-delete-mutation.ts @@ -2,7 +2,7 @@ import { UseMutationOptions, useMutation, useQueryClient } from '@tanstack/react import { toast } from 'sonner' import { del, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { storageCredentialsKeys } from './s3-access-key-keys' type S3AccessKeyDeleteVariables = { diff --git a/apps/studio/data/storage/s3-access-key-query.ts b/apps/studio/data/storage/s3-access-key-query.ts index 61adee253ac..bf5990c4aaf 100644 --- a/apps/studio/data/storage/s3-access-key-query.ts +++ b/apps/studio/data/storage/s3-access-key-query.ts @@ -3,7 +3,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { components } from 'api-types' import { get, handleError } from 'data/fetchers' import { IS_PLATFORM } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { storageCredentialsKeys } from './s3-access-key-keys' type StorageCredentialsVariables = { projectRef?: string } diff --git a/apps/studio/data/storage/storage-archive-create-mutation.ts b/apps/studio/data/storage/storage-archive-create-mutation.ts index 2d5978f51cf..473502dc99e 100644 --- a/apps/studio/data/storage/storage-archive-create-mutation.ts +++ b/apps/studio/data/storage/storage-archive-create-mutation.ts @@ -2,7 +2,7 @@ import { UseMutationOptions, useMutation, useQueryClient } from '@tanstack/react import { toast } from 'sonner' import { handleError, post } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { storageKeys } from './keys' type StorageArchiveCreateVariables = { diff --git a/apps/studio/data/storage/storage-archive-query.ts b/apps/studio/data/storage/storage-archive-query.ts index cd570a3bc59..c5d715c383c 100644 --- a/apps/studio/data/storage/storage-archive-query.ts +++ b/apps/studio/data/storage/storage-archive-query.ts @@ -1,7 +1,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { get, handleError } from 'data/fetchers' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' import { storageKeys } from './keys' type StorageArchiveVariables = { projectRef?: string } diff --git a/apps/studio/data/support/generate-attachment-urls-mutation.ts b/apps/studio/data/support/generate-attachment-urls-mutation.ts index 5ab50a50b6a..74e47f003e1 100644 --- a/apps/studio/data/support/generate-attachment-urls-mutation.ts +++ b/apps/studio/data/support/generate-attachment-urls-mutation.ts @@ -3,7 +3,7 @@ import { toast } from 'sonner' import { constructHeaders } from 'data/fetchers' import { BASE_PATH } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' export type GenerateAttachmentURLsResponse = { title: string diff --git a/apps/studio/data/utils/deployment-commit-query.ts b/apps/studio/data/utils/deployment-commit-query.ts index 0e243be0794..775e2c417e4 100644 --- a/apps/studio/data/utils/deployment-commit-query.ts +++ b/apps/studio/data/utils/deployment-commit-query.ts @@ -1,7 +1,7 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query' import { fetchHandler } from 'data/fetchers' import { BASE_PATH } from 'lib/constants' -import { ResponseError } from 'types' +import type { ResponseError } from 'types' export async function getDeploymentCommit(signal?: AbortSignal) { const response = await fetchHandler(`${BASE_PATH}/api/get-deployment-commit`) diff --git a/apps/studio/lib/api/self-hosted/generate-types.ts b/apps/studio/lib/api/self-hosted/generate-types.ts index e46fbdd9e03..2ea9af14ea1 100644 --- a/apps/studio/lib/api/self-hosted/generate-types.ts +++ b/apps/studio/lib/api/self-hosted/generate-types.ts @@ -1,7 +1,7 @@ import { fetchGet } from 'data/fetchers' import { PG_META_URL } from 'lib/constants' +import type { ResponseError } from 'types' import { assertSelfHosted } from './util' -import { ResponseError } from 'types' export type GenerateTypescriptTypesOptions = { headers?: HeadersInit diff --git a/apps/studio/state/sql-editor-v2.ts b/apps/studio/state/sql-editor-v2.ts index c9a4b3a6a0f..dda6f89c397 100644 --- a/apps/studio/state/sql-editor-v2.ts +++ b/apps/studio/state/sql-editor-v2.ts @@ -11,7 +11,7 @@ import { createSQLSnippetFolder } from 'data/content/sql-folder-create-mutation' import { updateSQLSnippetFolder } from 'data/content/sql-folder-update-mutation' import { Snippet, SnippetFolder } from 'data/content/sql-folders-query' import { getQueryClient } from 'data/query-client' -import { SqlSnippets } from 'types' +import type { SqlSnippets } from 'types' export type StateSnippetFolder = { projectRef: string