/** * Provider interface defines the specifications of any provider implementation */ export default class Provider { /** * config to extend the grant config */ static getExtraGrantConfig(): {}; /** * Name of the OAuth provider (passed to Grant). Return empty string if no OAuth provider is needed. * * @returns {string} */ static get oauthProvider(): string; static grantDynamicToUserSession({ grantDynamic }: { grantDynamic: any; }): {}; static get hasSimpleAuth(): boolean; static get authStateExpiry(): number; /** * * @param {{providerName: string, allowLocalUrls: boolean, providerGrantConfig?: object, secret: string}} options */ constructor({ allowLocalUrls, providerGrantConfig, secret }: { providerName: string; allowLocalUrls: boolean; providerGrantConfig?: object; secret: string; }); needsCookieAuth: boolean; allowLocalUrls: boolean; providerGrantConfig: any; secret: string; /** * list the files and folders in the provider account * * @param {object} options * @returns {Promise} */ list(options: object): Promise; /** * search for files/folders in the provider account * * @param {object} options * @returns {Promise} */ search(options: object): Promise; /** * download a certain file from the provider account * * @param {object} options * @returns {Promise} */ download(options: object): Promise; /** * return a thumbnail for a provider file * * @param {object} options * @returns {Promise} */ thumbnail(options: object): Promise; /** * first Companion will try to get the size from the content-length response header, * if that fails, it will call this method to get the size. * So if your provider has a different method for getting the size, you can return the size here * * @param {object} options * @returns {Promise} */ size(options: object): Promise; /** * handle deauthorization notification from oauth providers * * @param {object} options * @returns {Promise} */ deauthorizationCallback(options: object): Promise; /** * Generate a new access token based on the refresh token */ refreshToken(options: any): Promise; /** * @param {any} param0 * @returns {Promise} */ simpleAuth({ requestBody }: any): Promise; } export function isOAuthProvider(oauthProvider: any): boolean;