import { MiniPage, File, CanvasRetrieve } from '../../types/openapi'; /** * Payload for getting instance metadata templates. */ export interface GetInstanceMetadataTemplatesPayload { /** * Ordering of the metadata templates. String containing field name to order by. */ ordering?: string; /** * Page number for pagination. */ page?: number; /** * Number of items per page. */ page_size?: number; /** * Search query for filtering metadata templates. */ search?: string; } /** * Payload for listing files with optional filters. */ export type ListFilesPayload = Partial> & { /** * Range filter for creation date. */ created_at__range?: string; /** * Range filter for expiration date. */ expires_at__range?: string; /** * Range filter for update date. */ updated_at__range?: string; /** * Filter for file IDs. */ id__in?: string; /** * Filter for file types. */ type?: File['type'] | File['type'][]; /** * Filter for content types. */ content_type?: File['content_type'] | File['content_type'][]; }; /** * Payload for getting recent files. */ export type GetRecentFilesPayload = { /** * Number of recent files to retrieve. */ size?: number; }; /** * Payload for sending a notification. */ export interface NotificationPayload { /** * Content of the notification. */ content: string; /** * Type of the notification. */ type?: 'native' | 'alert'; } /** * Payload for executing a query. */ export interface QueryPayload { /** * The query string to execute. */ query: string; /** * Optional arguments for the query. */ args?: string[][]; } export type CRMServiceType = 'salesforce' | 'dynamics' | 'sap'; /** * Payload for executing a query against CRM. */ export interface CRMQueryPayload { /** * The query string to execute. */ query: string; /** * Optional name of the service to be queried. */ service?: CRMServiceType; } /** * Payload for submitting user feedback. */ export interface SubmitUserFeedbackPayload { /** * Type of feedback being submitted. */ type: 'bug' | 'feedback'; /** * Data associated with the feedback. */ data: Record; } /** * Payload object for opening a file. */ export interface OpenRequestPayload { /** * Id of the file to open. */ fileId?: File['id']; /** * Ids of the files to open and the strategy to open them with. */ files?: { ids: File['id'][]; strategy: 'simultaneous' | 'swap'; }; /** * Id of the canvas section from which the file is opened. */ usedInSectionId?: CanvasRetrieve['id']; /** * Id of the canvas from which the file is opened. */ fromCanvasId?: CanvasRetrieve['id']; /** * Optional, page index to open. Default is `null`. */ pageIndex?: MiniPage['page_index']; /** * Optional, video start timestamp in seconds. Default is `null`. */ startTime?: number; /** * URL of the file content. */ url?: File['content_url']; /** * Indicates if the canvas is in view. */ canvasInView?: boolean; /** * Indicates if the user is in a call. */ isInCall?: boolean; /** * Optional, overrides over the context of the current canvas, useful for injecting file annotation data. Default is {}. */ context?: Record; /** * Search query string within the file. */ search?: string; /** * Indicates if the file should be opened in a new tab. */ newTab?: boolean; /** * Indicates if the app should be opened as overlay. */ isOverlayApp?: boolean; /** * Tracking id for the canvas presentation session. */ canvasCorrelationId?: string; } /** * Payload object for opening an external URL. */ export interface OpenExternalUrlRequestPayload { /** * The URL to open. */ url: string; /** * The target where the URL should be opened. Defaults to '_blank'. */ target?: '_self' | '_blank'; /** * Additional options for opening the URL. */ options?: string; } /** * Payload object for opening a web view that is always on top. */ export interface OpenWebViewAlwaysOnTop { /** * The URL to open in the web view. */ url: string; /** * Settings for the modal window. */ modal_settings: { /** * The width of the modal window. */ width: number; /** * The height of the modal window. */ height: number; /** * The y-coordinate of the modal window. */ y: number; /** * The x-coordinate of the modal window. */ x: number; }; } /** * Payload for iOS sharing dialog. */ export interface SharePayload { /** * Text to be shared. */ text: string; /** * Subject */ subject?: string; /** * Body */ body?: string; } /** * Represents a response to a iOS sharing dialog. */ export type ShareResponse = { /** * Action taken by the user. */ user_action: 'cancelled' | 'shared'; /** * Type of share action. */ activity_type?: string; }; /** * Payload for showing peer session dialog. */ export interface ShowPeerSessionRequestPayload { /** * The x-coordinate of the button that triggered the action. */ x: number; /** * The y-coordinate of the button that triggered the action. */ y: number; } /** * Payload for showing syncbox dialog. */ export interface ShowSyncboxRequestPayload { /** * The x-coordinate of the button that triggered the action. */ x: number; /** * The y-coordinate of the button that triggered the action. */ y: number; } export type FolderListRequest = { search?: string; ordering?: string; filters?: Record; fields?: string; name?: string; page?: number; page_size?: number; id__in?: string[]; };