UNPKG

meet-addons-devtools

Version:

Set of tools helping developing addons for Meet.rs

48 lines (47 loc) 1.99 kB
import { ITokenInfo } from "./ITokenInfo"; import { AddonRuntimeInfo } from "./AddonRuntimeInfo"; import { ISessionTokenInfo } from "./ISessionTokenInfo"; /** * This is class which can be used for local development of the SDK addon * and which provides an easy way to retrieve auth token using the global variables. * * The host address, key and secret are defined in the local storage in the browser * developer is using for developing addon so they will be preserved even on page reloads * browser closing etc. * * At the end of the development - developer should clear his local storage. * * @export * @class TokenService */ export declare class TokenService { /** * Gets the runtime context addon will receive during the Meet session * to simulate the ongoing meeting * * @param {string} session An session token containing resource claims. * @returns {Promise<ITokenInfo>} * @memberof TokenService */ getAddonRuntimeInfoAsync: (sessionToken: string) => Promise<AddonRuntimeInfo>; /** * Gets the token populated with all the claims user will have after logging to a specific * Meet session (meeting code, role etc) * * @param {string} tenantToken An api token containing tenant claims. * @param {string} addonIdentifier Id of the addon which should be part of meet config for which session token is returned. * @returns {Promise<ITokenInfo>} * @memberof TokenService */ getSessionTokenAsync: (tenantToken: string, addonIdentifier: string) => Promise<ISessionTokenInfo>; /** * Gets the general purpose api token without any specific Meet claims * but instead only tenant claims. * * @returns {Promise<ITokenInfo>} An tenant api key containing the tenant claims * @memberof TokenService */ getTenantTokenAsync: () => Promise<ITokenInfo>; private createMeetingAsync; private createEventAsync; }