export type GetApiV1AssetVideoVideoUploadIdArgs = {video_upload_id: string}; export type GetApiV1AssetVideoVideoUploadIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get a video * * GET /v1/asset/video/{video_upload_id} */ export const getApiV1AssetVideoVideoUploadId = async (args: GetApiV1AssetVideoVideoUploadIdArgs, options?: GetApiV1AssetVideoVideoUploadIdOptions) => { const {baseUrl = "https://api.navigateai.co", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set('authorization', `Bearer ${ApiKeyAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/asset/video/${encodeURIComponent(String(args.video_upload_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };