mirror of https://github.com/buster-so/buster.git
rip are shared interfaces
This commit is contained in:
parent
92e89ea3ac
commit
bcede1856d
|
@ -19,5 +19,3 @@ export type BusterSocketResponseRoute =
|
|||
| keyof typeof SQLResponses
|
||||
| keyof typeof TermsResponses
|
||||
| keyof typeof ChatsResponses;
|
||||
|
||||
export type * from './shared_interfaces';
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
export * from './shareInterfaces';
|
|
@ -1,35 +0,0 @@
|
|||
import type { ShareRole } from '@/api/asset_interfaces/share';
|
||||
|
||||
/**
|
||||
* Type defining the sharing permissions and settings for a dashboard
|
||||
*
|
||||
* @interface ShareRequest
|
||||
*/
|
||||
export type ShareRequest = {
|
||||
/** The unique identifier of the dashboard */
|
||||
id: string;
|
||||
/** User-specific permissions array */
|
||||
user_permissions?: {
|
||||
/** Email of the user to grant permissions to */
|
||||
user_email: string;
|
||||
/** Role to assign to the user */
|
||||
role: ShareRole;
|
||||
}[];
|
||||
/** Array of user IDs to remove access from */
|
||||
remove_users?: string[];
|
||||
/** Team-specific permissions array */
|
||||
team_permissions?: {
|
||||
/** ID of the team to grant permissions to */
|
||||
team_id: string;
|
||||
/** Role to assign to the team */
|
||||
role: ShareRole;
|
||||
}[];
|
||||
/** Array of team IDs to remove access from */
|
||||
remove_teams?: string[];
|
||||
/** Whether the dashboard is publicly accessible */
|
||||
publicly_accessible?: boolean;
|
||||
/** Optional password for public access */
|
||||
public_password?: string | null;
|
||||
/** Optional expiration date for public access (timestamptz) */
|
||||
public_expiry_date?: string | null;
|
||||
};
|
|
@ -1,4 +1,4 @@
|
|||
import type { ShareRequest } from '@/api/buster_socket/shared_interfaces';
|
||||
import type { ShareRequest } from '@/api/asset_interfaces/shared_interfaces';
|
||||
import type { ShareAssetType } from '../../asset_interfaces';
|
||||
|
||||
export interface GetCollectionListParams {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { DashboardConfig } from '@/api/asset_interfaces/dashboard';
|
||||
import { VerificationStatus } from '@/api/asset_interfaces/share';
|
||||
import { ShareRequest } from '@/api/asset_interfaces/shared_interfaces';
|
||||
import type { ShareRequest } from '@/api/asset_interfaces/shared_interfaces';
|
||||
|
||||
/**
|
||||
* Interface for dashboard list request parameters
|
||||
|
@ -47,7 +47,7 @@ export interface DashboardCreateRequest {
|
|||
/**
|
||||
* Interface for updating a dashboard
|
||||
*/
|
||||
export interface DashboardUpdateRequest extends ShareRequest {
|
||||
export type DashboardUpdateRequest = {
|
||||
/** The unique identifier of the dashboard */
|
||||
id: string;
|
||||
/** New name for the dashboard */
|
||||
|
@ -66,7 +66,7 @@ export interface DashboardUpdateRequest extends ShareRequest {
|
|||
remove_users?: string[];
|
||||
/** Array of metric IDs associated with the dashboard */
|
||||
metrics?: string[];
|
||||
}
|
||||
} & ShareRequest;
|
||||
|
||||
/**
|
||||
* Interface for deleting dashboards
|
||||
|
|
|
@ -3,7 +3,6 @@ import React from 'react';
|
|||
import { validate } from 'email-validator';
|
||||
import { useMemoizedFn } from '@/hooks';
|
||||
import { BusterShare, ShareRole, ShareAssetType } from '@/api/asset_interfaces';
|
||||
import type { ShareRequest } from '@/api/buster_socket/shared_interfaces';
|
||||
import { Input } from '@/components/ui/inputs';
|
||||
import { Button } from '@/components/ui/buttons';
|
||||
import { Text } from '@/components/ui/typography';
|
||||
|
@ -20,7 +19,7 @@ import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics';
|
|||
import { inputHasText } from '@/lib/text';
|
||||
import { UserGroup, ChevronRight } from '@/components/ui/icons';
|
||||
import { cn } from '@/lib/classMerge';
|
||||
import { UpdateMetricParams } from '@/api/buster_rest/metrics';
|
||||
import type { ShareRequest } from '@/api/asset_interfaces/shared_interfaces';
|
||||
|
||||
export const ShareMenuContentBody: React.FC<{
|
||||
selectedOptions: ShareMenuTopBarOptions;
|
||||
|
|
|
@ -8,7 +8,6 @@ import {
|
|||
useBusterDashboardContextSelector,
|
||||
useBusterDashboardIndividual
|
||||
} from '@/context/Dashboards';
|
||||
import type { ShareRequest } from '@/api/buster_socket';
|
||||
import { useMemoizedFn } from '@/hooks';
|
||||
import { Text } from '@/components/ui/typography';
|
||||
import { UserGroup } from '@/components/ui/icons';
|
||||
|
@ -18,6 +17,7 @@ import {
|
|||
useBusterCollectionIndividualContextSelector,
|
||||
useCollectionIndividual
|
||||
} from '@/context/Collections';
|
||||
import type { ShareRequest } from '@/api/asset_interfaces/shared_interfaces';
|
||||
|
||||
export const ShareWithGroupAndTeam: React.FC<{
|
||||
goBack: () => void;
|
||||
|
|
|
@ -14,8 +14,6 @@ export const useDashboardUpdateConfig = ({
|
|||
}: {
|
||||
getDashboardMemoized: (dashboardId: string) => BusterDashboardResponse | undefined;
|
||||
}) => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const { mutateAsync: updateDashboardMutation, isPending: isUpdatingDashboard } =
|
||||
useUpdateDashboard();
|
||||
|
||||
|
|
Loading…
Reference in New Issue