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