UNPKG

1.39 kBPlain TextView Raw
1/**
2 * -------------------------------------------------------------------------------------------
3 * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
4 * See License in the project root for license information.
5 * -------------------------------------------------------------------------------------------
6 */
7
8import { AuthProvider } from "./IAuthProvider";
9import { FetchOptions } from "./IFetchOptions";
10
11/**
12 * @interface
13 * Options for initializing the Graph Client
14 * @property {AuthProvider} authProvider - The function to get the authentication token
15 * @property {string} [baseUrl] - Base url that needs to be appended to every request
16 * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging
17 * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request
18 * @property {FetchOptions} [fetchOptions] - The options for fetch request
19 * @property {Set<string>}[customHosts] - A set of custom host names. Should contain hostnames only.
20 */
21export interface Options {
22 authProvider: AuthProvider;
23 baseUrl?: string;
24 debugLogging?: boolean;
25 defaultVersion?: string;
26 fetchOptions?: FetchOptions;
27 /**
28 * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set<string>(["test_host"])"
29 */
30 customHosts?: Set<string>;
31}