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 | /**
|
8 | * @module TelemetryHandlerOptions
|
9 | */
|
10 | import { Context } from "../../IContext";
|
11 | import { MiddlewareOptions } from "./IMiddlewareOptions";
|
12 | /**
|
13 | * @enum
|
14 | * @property {number} NONE - The hexadecimal flag value for nothing enabled
|
15 | * @property {number} REDIRECT_HANDLER_ENABLED - The hexadecimal flag value for redirect handler enabled
|
16 | * @property {number} RETRY_HANDLER_ENABLED - The hexadecimal flag value for retry handler enabled
|
17 | * @property {number} AUTHENTICATION_HANDLER_ENABLED - The hexadecimal flag value for the authentication handler enabled
|
18 | */
|
19 | export declare enum FeatureUsageFlag {
|
20 | NONE = 0,
|
21 | REDIRECT_HANDLER_ENABLED = 1,
|
22 | RETRY_HANDLER_ENABLED = 2,
|
23 | AUTHENTICATION_HANDLER_ENABLED = 4
|
24 | }
|
25 | /**
|
26 | * @class
|
27 | * @implements MiddlewareOptions
|
28 | * Class for TelemetryHandlerOptions
|
29 | */
|
30 | export declare class TelemetryHandlerOptions implements MiddlewareOptions {
|
31 | /**
|
32 | * @private
|
33 | * A member to hold the OR of feature usage flags
|
34 | */
|
35 | private featureUsage;
|
36 | /**
|
37 | * @public
|
38 | * @static
|
39 | * To update the feature usage in the context object
|
40 | * @param {Context} context - The request context object containing middleware options
|
41 | * @param {FeatureUsageFlag} flag - The flag value
|
42 | * @returns nothing
|
43 | */
|
44 | static updateFeatureUsageFlag(context: Context, flag: FeatureUsageFlag): void;
|
45 | /**
|
46 | * @private
|
47 | * To set the feature usage flag
|
48 | * @param {FeatureUsageFlag} flag - The flag value
|
49 | * @returns nothing
|
50 | */
|
51 | private setFeatureUsage;
|
52 | /**
|
53 | * @public
|
54 | * To get the feature usage
|
55 | * @returns A feature usage flag as hexadecimal string
|
56 | */
|
57 | getFeatureUsage(): string;
|
58 | }
|