// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { buildHeaders } from '../../internal/headers'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; export class ThirdParty extends APIResource { /** * Get media file from third-party provider */ retrieve( provider: 'microsoft-sharepoint', params: ThirdPartyRetrieveParams, options?: RequestOptions, ): APIPromise { const { 'Accept-Language': acceptLanguage, 'X-Error-Format': xErrorFormat, ...query } = params; return this._client.get(path`/media/third-party/${provider}`, { query, ...options, headers: buildHeaders([ { ...(acceptLanguage != null ? { 'Accept-Language': acceptLanguage } : undefined), ...(xErrorFormat != null ? { 'X-Error-Format': xErrorFormat } : undefined), }, options?.headers, ]), }); } } export type ThirdPartyRetrieveResponse = unknown; export interface ThirdPartyRetrieveParams { /** * Query param: Drive ID */ drive_id: string; /** * Query param: Drive item ID */ item_id: string; /** * Query param: Organization ID */ organization_id: string; /** * Query param: HMAC signature for service-to-service access */ sig: string; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace ThirdParty { export { type ThirdPartyRetrieveResponse as ThirdPartyRetrieveResponse, type ThirdPartyRetrieveParams as ThirdPartyRetrieveParams, }; }