import type { ExternalServiceTokenT } from './types'; /** * Fetches the Oauth token with related data * @param {number} editorId - Editor's id. * @param {string} service - Name of the service. * @param {object} orm - the BookBrainz ORM, initialized during app setup * @returns {Promise} A Promise that resolves to the oauth token in JSON format */ export declare function getOauthToken(editorId: number, service: string, orm: Record): Promise; /** * Deletes the Oauth token with related data from the database * * @param {number} editorId - Editor's id. * @param {string} service - name of the service. * @param {object} orm - the BookBrainz ORM, initialized during app setup * */ export declare function deleteOauthToken(editorId: number, service: string, orm: Record): Promise; /** * Saves the Oauth token with related data to the database * * @param {number} editorId - Editor's id. * @param {string} service - name of the service. * @param {string} accessToken - access token. * @param {string} refreshToken - refresh token. * @param {number} tokenExpiresTs - token expiration timestamp. * @param {string[]} scopes - scopes. * @param {object} orm - the BookBrainz ORM, initialized during app setup * @returns {Promise} A Promise that resolves to the oauth token in JSON format */ export declare function saveOauthToken(editorId: number, service: string, accessToken: string, refreshToken: string, tokenExpiresTs: number, scopes: Array, orm: Record): Promise; /** * Updates the Oauth token with related data in the database * * @param {number} editorId - Editor's id. * @param {string} service - name of the service. * @param {string} accessToken - access token. * @param {string} refreshToken - refresh token. * @param {number} tokenExpiresTs - token expiration timestamp. * @param {object} orm - the BookBrainz ORM, initialized during app setup * @returns {Promise} A Promise that resolves to the oauth token in JSON format */ export declare function updateOauthToken(editorId: number, service: string, accessToken: string, refreshToken: string, tokenExpiresTs: number, orm: Record): Promise;