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 | import { AuthProvider } from "./IAuthProvider";
|
8 | import { FetchOptions } from "./IFetchOptions";
|
9 | /**
|
10 | * @interface
|
11 | * Options for initializing the Graph Client
|
12 | * @property {AuthProvider} authProvider - The function to get the authentication token
|
13 | * @property {string} [baseUrl] - Base url that needs to be appended to every request
|
14 | * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging
|
15 | * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request
|
16 | * @property {FetchOptions} [fetchOptions] - The options for fetch request
|
17 | * @property {Set<string>}[customHosts] - A set of custom host names. Should contain hostnames only.
|
18 | */
|
19 | export interface Options {
|
20 | authProvider: AuthProvider;
|
21 | baseUrl?: string;
|
22 | debugLogging?: boolean;
|
23 | defaultVersion?: string;
|
24 | fetchOptions?: FetchOptions;
|
25 | /**
|
26 | * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set<string>(["test_host"])"
|
27 | */
|
28 | customHosts?: Set<string>;
|
29 | }
|