UNPKG

1.73 kBTypeScriptView 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 */
7import { GraphRequest } from "./GraphRequest";
8import { ClientOptions } from "./IClientOptions";
9import { Options } from "./IOptions";
10export declare class Client {
11 /**
12 * @private
13 * A member which stores the Client instance options
14 */
15 private config;
16 /**
17 * @private
18 * A member which holds the HTTPClient instance
19 */
20 private httpClient;
21 /**
22 * @public
23 * @static
24 * To create a client instance with options and initializes the default middleware chain
25 * @param {Options} options - The options for client instance
26 * @returns The Client instance
27 */
28 static init(options: Options): Client;
29 /**
30 * @public
31 * @static
32 * To create a client instance with the Client Options
33 * @param {ClientOptions} clientOptions - The options object for initializing the client
34 * @returns The Client instance
35 */
36 static initWithMiddleware(clientOptions: ClientOptions): Client;
37 /**
38 * @private
39 * @constructor
40 * Creates an instance of Client
41 * @param {ClientOptions} clientOptions - The options to instantiate the client object
42 */
43 private constructor();
44 /**
45 * @public
46 * Entry point to make requests
47 * @param {string} path - The path string value
48 * @returns The graph request instance
49 */
50 api(path: string): GraphRequest;
51}