### FeatureProbe Client API Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html Provides methods for interacting with the FeatureProbe service to manage feature flags and track user behavior within a miniprogram application. Includes methods for retrieving toggle values, starting and stopping the client, and custom event tracking. ```APIDOC once(event: string, callback: Function, ctx?: any): FeatureProbe Registers a one-time event listener. Parameters: event: The name of the event to listen for. callback: The function to execute when the event is triggered. ctx: Optional context object for the callback. Returns: The FeatureProbe instance for chaining. Inherited from TinyEmitter.once Defined in node_modules/tiny-emitter/index.d.ts:3 start(): Promise Starts the FeatureProbe client, enabling it to fetch toggles and send metrics. Returns: A Promise that resolves when the client has successfully started. Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:45 stop(): void Stops the FeatureProbe client, disabling toggle updates and metric reporting. Returns: void Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:50 stringDetail(key: string, defaultValue: string): FPDetail Retrieves the string value of a toggle and detailed information about its evaluation. Parameters: key: The unique key of the toggle. defaultValue: The default string value if the toggle is not found. Returns: An FPDetail object containing the toggle value and evaluation details. Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:127 stringValue(key: string, defaultValue: string): string Retrieves the string value of a toggle for the current user. Parameters: key: The unique key of the toggle. defaultValue: The default string value if the toggle is not found. Returns: The string value of the toggle. Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:87 track(name: string, value?: unknown): void Records a custom event with an optional associated value. Parameters: name: The name of the event to track. value: An optional value associated with the event. Returns: void Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:169 waitUntilReady(): Promise Returns a Promise that resolves when the client is ready or rejects if it fails to connect within the timeout. The Promise will be resolved if the client successfully gets toggles from the server or ejected if client error get toggles from the server until `timeoutInterval` countdown reaches. Returns: A Promise that tracks the client's ready state. Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:57 Static newForTest(toggles: { [key: string]: boolean }): FeatureProbe Creates a FeatureProbe instance for testing purposes with predefined toggles. Parameters: toggles: An object where keys are toggle names and values are their boolean states. Returns: A FeatureProbe instance configured for testing. Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:39 ``` -------------------------------- ### FeatureProbe SDK API Reference Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/README.md This section provides the API reference for the FeatureProbe Client Side SDK for MiniProgram. It details the available methods, parameters, and usage examples for controlling features within miniprogram applications. ```APIDOC SDK API Reference: This documentation outlines the core functionalities and methods available in the FeatureProbe Client Side SDK for MiniProgram. Refer to the official SDK documentation for detailed usage and examples. Key areas covered: - Initialization and configuration of the SDK. - Fetching feature flag states for users. - Evaluating feature variations based on user attributes. - Handling of different data types for feature flags. - Best practices for integrating the SDK into miniprogram environments. For comprehensive details, please visit: https://featureprobe.github.io/client-sdk-miniprogram/ ``` -------------------------------- ### Get FeatureProbe Client Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/functions/getClient.html Retrieves the FeatureProbe SDK client instance. This function is essential for interacting with the FeatureProbe service to fetch feature flags and user configurations. ```APIDOC getClient(): FeatureProbe | undefined Get the SDK client Returns: undefined | FeatureProbe: The FeatureProbe client instance or undefined if not initialized. ``` -------------------------------- ### Initialization and Theme Setting Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/index.html Demonstrates how to initialize the SDK and set the theme based on local storage or OS preference. ```javascript document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os" ``` -------------------------------- ### FeatureProbe Class API Documentation Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html Provides a comprehensive overview of the FeatureProbe class methods and properties. This includes initialization, toggle retrieval, user management, event tracking, and real-time connection management. ```APIDOC FeatureProbe: constructor(clientSdkKey: string, options?: FeatureProbeOptions) Initializes the FeatureProbe client. Parameters: clientSdkKey: The unique key for your client SDK. options: Optional configuration object. - enableRealtime: Enable real-time updates (default: true). - refreshInterval: Interval for polling toggles in seconds (default: 60). - timeoutInterval: Timeout for initial toggle fetch in seconds (default: 5). - eventCollector: Custom event collector implementation. - logger: Custom logger implementation. start(): Promise Starts the FeatureProbe client, fetching toggles and establishing real-time connections if enabled. Returns: A promise that resolves when the client is ready. stop(): void Stops the FeatureProbe client, disconnecting real-time connections and clearing intervals. waitUntilReady(): Promise Waits until the FeatureProbe client is ready (toggles have been fetched). Returns: A promise that resolves when the client is ready. fetchToggles(): Promise Manually fetches the latest toggles from the FeatureProbe server. Returns: A promise that resolves when toggles are fetched. allToggles(): Toggle[] Returns all available toggles. toggleValue(key: string, defaultValue?: any): any Retrieves the value of a specific toggle. Parameters: key: The key of the toggle. defaultValue: The default value to return if the toggle is not found. Returns: The toggle value or the default value. toggleDetail(key: string): ToggleDetail Retrieves detailed information about a specific toggle, including its variation and rule. Parameters: key: The key of the toggle. Returns: An object containing toggle details. boolValue(key: string, defaultValue?: boolean): boolean Retrieves the boolean value of a specific toggle. Parameters: key: The key of the toggle. defaultValue: The default value to return if the toggle is not found or not a boolean. Returns: The boolean toggle value or the default value. boolDetail(key: string): ToggleDetail Retrieves detailed information about a boolean toggle. Parameters: key: The key of the toggle. Returns: An object containing toggle details. stringValue(key: string, defaultValue?: string): string Retrieves the string value of a specific toggle. Parameters: key: The key of the toggle. defaultValue: The default value to return if the toggle is not found or not a string. Returns: The string toggle value or the default value. stringDetail(key: string): ToggleDetail Retrieves detailed information about a string toggle. Parameters: key: The key of the toggle. Returns: An object containing toggle details. numberValue(key: string, defaultValue?: number): number Retrieves the number value of a specific toggle. Parameters: key: The key of the toggle. defaultValue: The default value to return if the toggle is not found or not a number. Returns: The number toggle value or the default value. numberDetail(key: string): ToggleDetail Retrieves detailed information about a number toggle. Parameters: key: The key of the toggle. Returns: An object containing toggle details. jsonValue(key: string, defaultValue?: any): any Retrieves the JSON value of a specific toggle. Parameters: key: The key of the toggle. defaultValue: The default value to return if the toggle is not found or not a JSON object. Returns: The JSON toggle value or the default value. jsonDetail(key: string): ToggleDetail Retrieves detailed information about a JSON toggle. Parameters: key: The key of the toggle. Returns: An object containing toggle details. identifyUser(user: User): void Identifies the current user with custom attributes. Parameters: user: An object representing the user. getUser(): User Returns the current user object. track(eventKey: string, eventValue?: any): void Tracks a custom event. Parameters: eventKey: The key of the event. eventValue: Optional value associated with the event. flush(): Promise Immediately sends all buffered events to the server. Returns: A promise that resolves when events are flushed. on(event: string, listener: Function): void Subscribes to client events (e.g., 'ready', 'update'). Parameters: event: The name of the event to subscribe to. listener: The callback function to execute when the event is triggered. off(event: string, listener: Function): void Unsubscribes from client events. Parameters: event: The name of the event to unsubscribe from. listener: The listener function to remove. once(event: string, listener: Function): void Subscribes to an event that will be triggered only once. Parameters: event: The name of the event to subscribe to. listener: The callback function to execute when the event is triggered. connectSocket(url: string): void Manually connects to the real-time update socket. Parameters: url: The URL of the real-time update server. errorInitialized(message: string): void Logs an initialization error. Parameters: message: The error message. successInitialized(): void Logs a successful initialization. clientSdkKey(): string Returns the client SDK key. eventRecorder(): EventRecorder Returns the event recorder instance. eventsUrl(): string Returns the URL for events. user(): User Returns the current user. newForTest(clientSdkKey: string, options?: FeatureProbeOptions): FeatureProbe Creates a new FeatureProbe instance for testing purposes. Parameters: clientSdkKey: The unique key for your client SDK. options: Optional configuration object. Returns: A new FeatureProbe instance. // Internal properties (not typically used directly by consumers) _clientSdkKey: string _eventRecorder: EventRecorder _eventsUrl: string _getEventsUrl(): string _readyPromise: Promise _realtimePath: string _realtimeUrl: string _refreshInterval: number _status: Status _storage: Storage _timeoutInterval: number _timeoutTimer?: NodeJS.Timeout _timer?: NodeJS.Timeout _toggles: Toggles _togglesUrl: string _user: User ``` -------------------------------- ### FeatureProbe Class Constructor Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html Initializes a new instance of the FeatureProbe class. This constructor requires an FPConfig object containing configuration details for the SDK. ```APIDOC FeatureProbe: constructor(__namedParameters: FPConfig) Parameters: __namedParameters: FPConfig: Configuration object for the FeatureProbe SDK. Returns: FeatureProbe: An instance of the FeatureProbe client. Overrides: TinyEmitter.constructor Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:34 ``` -------------------------------- ### FeatureProbe Client SDK API Documentation Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html This section details the public API of the FeatureProbe client SDK for miniprogram applications. It includes methods for retrieving feature flag values (boolean, detail objects), managing user context, and emitting events. The documentation covers method signatures, parameter descriptions, return types, and inheritance from TinyEmitter. ```APIDOC FeatureProbe Client SDK API: Accessors: clientSdkKey(): string - Returns the client SDK key. - Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:35 eventRecorder(): EventRecorder - Returns the event recorder instance. - Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:38 eventsUrl(): string - Returns the URL for events. - Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:37 user(): FPUser - Returns the current FPUser object. - Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:36 Methods: allToggles(): undefined | { [key: string]: FPDetail }[] - Returns an object of all available toggles' details to the current user. - Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:141 boolDetail(key: string, defaultValue: boolean): FPDetail - Determines the return boolean value of a toggle for the current user, along with information about how it was calculated. - Parameters: - key: string - The unique key of the toggle. - defaultValue: boolean - The default value of the toggle, to be used if the value is not available from FeatureProbe. - Returns FPDetail - Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:107 boolValue(key: string, defaultValue: boolean): boolean - Determines the return boolean value of a toggle for the current user. - Parameters: - key: string - The unique key of the toggle. - defaultValue: boolean - The default value of the toggle, to be used if the value is not available from FeatureProbe. - Returns boolean - Defined in node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:67 emit(event: string, ...args: any[]): FeatureProbe - Emits an event. - Parameters: - event: string - The event name. - ...args: any[] - Arguments for the event. - Returns FeatureProbe - Inherited from TinyEmitter.emit - Defined in node_modules/tiny-emitter/index.d.ts:4 ``` -------------------------------- ### FeatureProbe Client SDK API Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/index.html API documentation for the FeatureProbe Client Side SDK for Mini Program, covering classes, interfaces, and functions. ```APIDOC Classes: FPUser: Represents a user in the FeatureProbe system. FeatureProbe: The main class for interacting with FeatureProbe features. Interfaces: FPConfig: Configuration options for the FeatureProbe SDK. FPDetail: Details related to feature evaluation. Functions: getClient(): Retrieves the FeatureProbe client instance. initialize(config: FPConfig): Initializes the FeatureProbe SDK with the provided configuration. ``` -------------------------------- ### Initialize FeatureProbe SDK Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/functions/initialize.html Initializes the FeatureProbe SDK with the required configuration options. This function is essential for setting up the client to interact with FeatureProbe services. ```APIDOC initialize(options: FPConfig): FeatureProbe | undefined Initializes SDK with required parameters Parameters: options: FPConfig - The required parameters used in SDK initialization Returns: FeatureProbe | undefined - An instance of FeatureProbe or undefined if initialization fails. ``` -------------------------------- ### FPUser Class API Documentation Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FPUser.html Provides a comprehensive reference for the FPUser class, including its constructor, properties, and methods for managing user attributes and feature rollouts. This class is central to interacting with the FeatureProbe SDK for mini-programs. ```APIDOC FPUser: __constructor(key?: string) Initializes a new FPUser instance. Parameters: key: string (Optional) - The unique key for the user. Returns: FPUser - An instance of the FPUser class. extendAttrs(attrs: { [key: string]: string }): FPUser Extends several attributes of the FPUser client. Parameters: attrs: object - Key-value pairs of attributes to add or update. [key: string]: string - The attribute key and its string value. Returns: FPUser - The updated FPUser instance. get(attrName: string): string | undefined Gets the attribute value for a specified attribute key. Parameters: attrName: string - The name of the attribute to retrieve. Returns: string | undefined - The attribute value if found, otherwise undefined. getAttrs(): { [key: string]: string } Gets all attributes of the FPUser client. Returns: object - An object containing all user attributes. [key: string]: string - Key-value pairs of attributes. getKey(): string Gets the unique key of the FPUser client. Returns: string - The unique user key. stableRollout(key: string): FPUser Changes a stable key for the FPUser client, influencing feature rollout. Parameters: key: string - The unique FPUser key to set for stable rollout. Returns: FPUser - The FPUser instance with the updated stable key. with(attrName: string, attrValue: string): FPUser Uploads attributes to the FPUser client. This is typically used for setting user attributes. Parameters: attrName: string - The name of the attribute to set. attrValue: string - The value of the attribute. Returns: FPUser - The FPUser instance with the added attribute. ``` -------------------------------- ### FeatureProbe Class Methods Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html Lists the available methods for the FeatureProbe class, covering functionalities like managing toggles, user identification, event tracking, and SDK lifecycle control. ```APIDOC FeatureProbe: allToggles(): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:50 boolDetail(key: string, defaultValue: boolean): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:52 boolValue(key: string, defaultValue: boolean): boolean Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:51 emit(eventName: string, ...args: any[]): boolean Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:73 flush(): Promise Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:57 getUser(): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:60 identifyUser(user: FPUser): void Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:59 jsonDetail(key: string, defaultValue: object): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:64 jsonValue(key: string, defaultValue: object): object Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:63 logout(): void Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:61 numberDetail(key: string, defaultValue: number): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:66 numberValue(key: string, defaultValue: number): number Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:65 off(eventName: string, listener: (...args: any[]) => void): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:71 on(eventName: string, listener: (...args: any[]) => void): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:69 once(eventName: string, listener: (...args: any[]) => void): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:70 start(): void Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:55 stop(): void Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:56 stringDetail(key: string, defaultValue: string): any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:68 stringValue(key: string, defaultValue: string): string Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:67 track(name: string, value: any): void Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:58 waitUntilReady(): Promise Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:54 newForTest(config: FPConfig): FeatureProbe Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:74 ``` -------------------------------- ### FPConfig Interface Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/interfaces/FPConfig.html Defines the configuration structure for the FeatureProbe Client Side SDK. It includes properties for authentication, server communication, event handling, and user attributes. ```APIDOC Interface FPConfig Properties: clientSdkKey: string The Client SDK Key is used to authentification. enableAutoReporting?: boolean Whether SDK should report pageview and click event automatically. Default value is true. eventsUrl?: string The specific URL to post events, if not set, will generate from remoteUrl. realtimePath?: string The specific path to receive realtime events, if not set, default value will be used. realtimeUrl?: string The specific URL to receive realtime events, if not set, will generate from remoteUrl. refreshInterval?: number Milliseconds for SDK to check for update. remoteUrl?: string The unified URL to connect FeatureProbe Server. timeoutInterval?: number Milliseconds for SDK to initialize, SDK will emit an `error` event when milliseconds reach. togglesUrl?: string The specific URL to get toggles, if not set, will generate from remoteUrl. user: FPUser The User with attributes like name, age is used when toggle evaluation. ``` -------------------------------- ### FeatureProbe Client SDK API Reference Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html This section details the core API methods available in the FeatureProbe client SDK for miniprograms. It covers functions for user identification, retrieving feature toggle values of various types, and managing events. ```APIDOC FeatureProbe: flush(): void Manually push events. Returns: void getUser(): FPUser Returns the current user. This is the user that was most recently passed to identifyUser, or, if identifyUser has never been called, the initial user specified when the client was created. Returns: FPUser identifyUser(user: FPUser): void Changing the current user to FeatureProbe. Parameters: user: FPUser - A new FPUser instance. Returns: void jsonDetail(key: string, defaultValue: Record): FPDetail Determines the return `json` value of a toggle for the current user, along with information about how it was calculated. Parameters: key: string - The unique key of the toggle. defaultValue: Record - The default value of the toggle, to be used if the value is not available from FeatureProbe. Returns: FPDetail jsonValue(key: string, defaultValue: Record): Record Determines the return `json` value of a toggle for the current user. Parameters: key: string - The unique key of the toggle. defaultValue: Record - The default value of the toggle, to be used if the value is not available from FeatureProbe. Returns: Record logout(): void Logout the current user, change the current user to an anonymous user. Returns: void numberDetail(key: string, defaultValue: number): FPDetail Determines the return `number` value of a toggle for the current user, along with information about how it was calculated. Parameters: key: string - The unique key of the toggle. defaultValue: number - The default value of the toggle, to be used if the value is not available from FeatureProbe. Returns: FPDetail numberValue(key: string, defaultValue: number): number Determines the return `number` value of a toggle for the current user. Parameters: key: string - The unique key of the toggle. defaultValue: number - The default value of the toggle, to be used if the value is not available from FeatureProbe. Returns: number off(event: string, callback?: Function): FeatureProbe Parameters: event: string callback?: Function Returns: FeatureProbe Inherited from TinyEmitter.off on(event: string, callback: Function, ctx?: any): FeatureProbe Parameters: event: string callback: Function ctx?: any Returns: FeatureProbe Inherited from TinyEmitter.on ``` -------------------------------- ### FeatureProbe Class Properties Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html Details the private properties of the FeatureProbe class, which manage internal state such as SDK key, event recording, URLs, status, and user data. ```APIDOC FeatureProbe: _clientSdkKey: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:24 _eventRecorder: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:33 _eventsUrl: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:19 _getEventsUrl: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:20 _readyPromise: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:29 _realtimePath: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:22 _realtimeUrl: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:21 _refreshInterval: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:23 _status: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:30 _storage: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:32 _timeoutInterval: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:25 _timeoutTimer?: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:26 _timer?: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:27 _toggles: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:28 _togglesUrl: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:18 _user: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:31 connectSocket: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:37 errorInitialized: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:40 fetchToggles: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:36 successInitialized: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:39 toggleDetail: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:42 toggleValue: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:41 ``` -------------------------------- ### FeatureProbe Class Accessors Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html Provides access to specific properties of the FeatureProbe class, including client SDK key, event recorder, events URL, and user information. ```APIDOC FeatureProbe: clientSdkKey: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:44 eventRecorder: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:46 eventsUrl: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:45 user: any Defined in: node_modules/featureprobe-client-sdk-js/dist/src/FeatureProbe.d.ts:47 ``` -------------------------------- ### FPDetail Interface Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/interfaces/FPDetail.html Defines the structure for feature flag evaluation details, including the returned value, reason for the evaluation, and associated metadata. ```APIDOC Interface FPDetail Properties: value: string | number | boolean | Record The value corresponding to the rule in the UI platform. Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:29 reason: string Why return this value, like disabled, default, not exist and so on. Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:45 ruleIndex: null | number The sequence number of the rule in the UI configuration that hit the rule. Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:33 variationIndex: null | number The sequence number of the variation in the UI platform. Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:37 version: null | number The version of the toggle. Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:41 trackAccessEvents?: boolean Whether to report access events. Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:49 debugUntilTime?: number Debug deadline timestamp Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:57 lastModified?: number Toggle last modified timestamp Defined in node_modules/featureprobe-client-sdk-js/dist/src/types.d.ts:53 ``` -------------------------------- ### FeatureProbe Internal Properties (TypeScript) Source: https://github.com/featureprobe/client-sdk-miniprogram/blob/main/docs/classes/FeatureProbe.html This snippet lists internal properties of the FeatureProbe class, marked as private. These properties are used for managing the SDK's state, including timers, URLs, and toggle data. They are defined within the FeatureProbe.d.ts file. ```typescript class FeatureProbe { private _timeoutInterval: any; private _timeoutTimer?: any; private _timer?: any; private _toggles: any; private _togglesUrl: any; private _user: any; private connectSocket: any; private errorInitialized: any; private fetchToggles: any; private successInitialized: any; private toggleDetail: any; private toggleValue: any; // ... other properties and methods } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.