@microsoft/teams.apps
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.apps" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.apps/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.apps?activeTab=code
26 lines (25 loc) • 1.28 kB
TypeScript
import { App } from './app';
import { IFunctionContext } from './contexts';
import * as manifest from './manifest';
import { IPlugin } from './types';
/**
* add/update a function that can be called remotely
* @param name The unique function name
* @param cb The callback to handle the function
*/
export declare function func<TPlugin extends IPlugin, TData>(this: App<TPlugin>, name: string, cb: (context: IFunctionContext<TData>) => any | Promise<any>): App<TPlugin>;
/**
* add/update a static tab.
* the tab will be hosted at
* `http://localhost:{{PORT}}/tabs/{{name}}` or `https://{{BOT_DOMAIN}}/tabs/{{name}}`
* @remark scopes default to `personal`
* @param name A unique identifier for the entity which the tab displays.
* @param path The path to the web `dist` folder.
*/
export declare function tab<TPlugin extends IPlugin>(this: App<TPlugin>, name: string, path: string, options?: Partial<Omit<manifest.StaticTab, 'contentUrl' | 'entityId'>>): App<TPlugin>;
/**
* add a configurable tab
* @remark scopes defaults to `team`
* @param url The url to use when configuring the tab.
*/
export declare function configTab<TPlugin extends IPlugin>(this: App<TPlugin>, url: string, options?: Partial<Omit<manifest.ConfigurableTab, 'configurationUrl'>>): App<TPlugin>;