import { APIResource } from '../resource'; import { APIPromise } from '../api-promise'; import type { RequestOptions } from '../internal/request-options'; export declare class GlobalSearch extends APIResource { /** * Search all video assets / playlists / folders etc across workspaces. * * @param {GlobalSearchSearchParams} query - The parameters to send with the request. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} Successful response * * @example * ```ts * const globalSearch = await client.globalSearch.search({ * search_query: 'searchQuery', * size: 20, * assets_offset: 0, * folders_offset: 0, * playlists_offset: 0, * channels_offset: 0, * }); * ``` */ search(query: GlobalSearchSearchParams, options?: RequestOptions): APIPromise; } export interface GlobalSearchSearchParams { /** * Search query term */ search_query: string; /** * Gumlet video workspace ID. Preferred. Provide `workspace_id`, or deprecated `collection_id` / `source_id` (same ID). */ workspace_id?: string; /** * Deprecated. Use `workspace_id` instead. Still accepted for backwards compatibility. */ collection_id?: string; /** * Number of results to return * @default 20 */ size?: number; /** * Offset for assets * @default 0 */ assets_offset?: number; /** * Offset for folders * @default 0 */ folders_offset?: number; /** * Offset for playlists * @default 0 */ playlists_offset?: number; /** * Offset for channels * @default 0 */ channels_offset?: number; } export interface GlobalSearchSearchResponse { /** * Result array of all folders */ all_folders: Array; /** * Result array of all assets */ all_assets: Array; /** * Result array of all playlists */ all_playlists: Array; /** * Result array of all channels */ all_channels: Array; } export declare namespace GlobalSearchSearchResponse { interface AllFolder { /** * Folder ID */ id: string; /** * Created at timestamp in milliseconds since epoch * @format int64 */ created_at: number; /** * Updated at timestamp in milliseconds since epoch * @format int64 */ updated_at: number; /** * Workspace ID in which the folder resides */ workspace_id: string; highlight: Array; } namespace AllFolder { interface Highlight { /** * Search ranking score */ score: number; /** * Which field to highlight */ path: string; texts: Array; } namespace Highlight { interface Text { /** * The word to highlight or not */ value: string; /** * Whether this word needs highlight */ type: 'hit' | 'text'; } } } interface AllAsset { /** * Asset ID */ id: string; /** * Asset Title */ title: string; /** * List of tags applied to this asset */ tags: Array; /** * Workspace ID on in which this asset resides */ workspace_id: string; /** * Created at timestamp in milliseconds since epoch * @format int64 */ created_at: number; /** * Updated at timestamp in milliseconds since epoch * @format int64 */ updated_at: number; highlight: Array; } namespace AllAsset { interface Highlight { /** * Search ranking score */ score: number; /** * Which field to highlight */ path: string; texts: Array; } namespace Highlight { interface Text { /** * The word to highlight or not */ value: string; /** * Whether this word needs highlight */ type: 'hit' | 'text'; } } } interface AllPlaylist { /** * Playlist ID */ id: string; /** * Playlist title */ title: string; /** * Playlist description */ description: string; /** * Created at timestamp in milliseconds since epoch * @format int64 */ created_at: number; /** * Updated at timestamp in milliseconds since epoch * @format int64 */ updated_at: number; /** * Workspace ID on in which this playlist resides */ workspace_id: string; highlight: Array; } namespace AllPlaylist { interface Highlight { /** * Search ranking score */ score: number; /** * Which field to highlight */ path: string; texts: Array; } namespace Highlight { interface Text { /** * The word to highlight or not */ value: string; /** * Whether this word needs highlight */ type: 'hit' | 'text'; } } } interface AllChannel { /** * Channel title */ title: string; /** * Channel description */ description: string; /** * Created at timestamp in milliseconds since epoch * @format int64 */ created_at: number; /** * Updated at timestamp in milliseconds since epoch * @format int64 */ updated_at: number; /** * Workspace ID on in which this channel resides */ workspace_id: string; highlight: Array; } namespace AllChannel { interface Highlight { /** * Search ranking score */ score: number; /** * Which field to highlight */ path: string; texts: Array; } namespace Highlight { interface Text { /** * The word to highlight or not */ value: string; /** * Whether this word needs highlight */ type: 'hit' | 'text'; } } } } export declare namespace GlobalSearch { export { type GlobalSearchSearchResponse as GlobalSearchSearchResponse, type GlobalSearchSearchParams as GlobalSearchSearchParams, }; } //# sourceMappingURL=global-search.d.ts.map