UNPKG

1.78 kBTypeScriptView Raw
1/**
2 * The Office apps which can host Office Add-ins.
3 */
4export declare enum OfficeApp {
5 Excel = "excel",
6 OneNote = "onenote",
7 Outlook = "outlook",
8 PowerPoint = "powerpoint",
9 Project = "project",
10 Word = "word"
11}
12/**
13 * Get the Office app for the manifest Host name
14 * @param host Host name
15 */
16export declare function getOfficeAppForManifestHost(host: string): OfficeApp | undefined;
17/**
18 * Gets the Office application name suitable for display.
19 * @param app Office app
20 */
21export declare function getOfficeAppName(app: OfficeApp): string;
22/**
23 * Gets the Office application names suitable for display.
24 * @param apps Office apps
25 */
26export declare function getOfficeAppNames(apps: OfficeApp[]): string[];
27/**
28 * Returns the Office apps that support Office add-ins.
29 */
30export declare function getOfficeApps(): OfficeApp[];
31/**
32 * Get the Office apps for the manifest Host names.
33 * @param hosts Host names specified in the manifest.
34 */
35export declare function getOfficeAppsForManifestHosts(hosts?: string[]): OfficeApp[];
36/**
37 * Converts the string to the OfficeApp enum value.
38 * @param value string
39 * @throws Error if the value is not a valid Office app.
40 */
41export declare function parseOfficeApp(value: string): OfficeApp;
42/**
43 * Converts the strings to the OfficeApp enum values.
44 * @param input "all" for all Office apps, or a comma-separated list of one or more Office apps.
45 * @throws Error if a value is not a valid Office app.
46 */
47export declare function parseOfficeApps(input: string): OfficeApp[];
48/**
49 * Returns the OfficeApp enum for the value, or undefined if not valid.
50 * @param value Office app string
51 */
52export declare function toOfficeApp(value: string): OfficeApp | undefined;