Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/rox-browser

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/rox-browser - npm Package Compare versions

Comparing version 4.8.5 to 4.8.6

208

rox-browser v4.8/index.d.ts

@@ -8,10 +8,8 @@ // Type definitions for rox-browser 4.8

/**
*
* Official documentation for rox-browser is available here:
* https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api
*
*/
export interface RoxContainer {
[key: string]: Flag | Configuration<any> | Variant;
[key: string]: Flag | Configuration<any> | Variant;
}

@@ -43,44 +41,44 @@

export interface RoxSetupOptions {
version?: string | undefined;
// https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_configurationfetchedhandler
configurationFetchedHandler?(fetcherResult: RoxFetcherResult): void;
debugLevel?: 'verbose' | undefined;
// https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_using_the_impressionhandler_option
impressionHandler?(reporting: RoxReporting, experiment: RoxExperiment, context: unknown): void;
platform?: string | undefined;
freeze?: RoxFlagFreezeLevel | undefined;
disableNetworkFetch?: boolean | undefined;
devModeSecret?: string | undefined;
/**
* Set Roxy's URL for automated tests or local development.
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags/latest/debugging/microservices-automated-testing-and-local-development
*/
roxy?: string | undefined;
version?: string | undefined;
// https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_configurationfetchedhandler
configurationFetchedHandler?(fetcherResult: RoxFetcherResult): void;
debugLevel?: "verbose" | undefined;
// https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_using_the_impressionhandler_option
impressionHandler?(reporting: RoxReporting, experiment: RoxExperiment, context: unknown): void;
platform?: string | undefined;
freeze?: RoxFlagFreezeLevel | undefined;
disableNetworkFetch?: boolean | undefined;
devModeSecret?: string | undefined;
/**
* Set Roxy's URL for automated tests or local development.
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags/latest/debugging/microservices-automated-testing-and-local-development
*/
roxy?: string | undefined;
}
export enum RoxFetcherStatus {
AppliedFromEmbedded = 'APPLIED_FROM_EMBEDDED',
AppliedFromCache = 'APPLIED_FROM_CACHE',
AppliedFromNetwork = 'APPLIED_FROM_NETWORK',
ErrorFetchFailed = 'ERROR_FETCH_FAILED'
AppliedFromEmbedded = "APPLIED_FROM_EMBEDDED",
AppliedFromCache = "APPLIED_FROM_CACHE",
AppliedFromNetwork = "APPLIED_FROM_NETWORK",
ErrorFetchFailed = "ERROR_FETCH_FAILED",
}
export interface RoxFetcherResult {
fetcherStatus: RoxFetcherStatus;
creationDate: Date;
hasChanges: boolean;
errorDetails?: string | undefined;
fetcherStatus: RoxFetcherStatus;
creationDate: Date;
hasChanges: boolean;
errorDetails?: string | undefined;
}
export interface RoxReporting {
name: string;
value: string;
name: string;
value: string;
}
export interface RoxExperiment {
identifier: string; // experiment id
name: string;
isArchived: boolean;
labels: string[]; // experiment's labels. assigned from dashboard
identifier: string; // experiment id
name: string;
isArchived: boolean;
labels: string[]; // experiment's labels. assigned from dashboard
}

@@ -96,3 +94,3 @@

export function setDynamicCustomPropertyRule(
handler: (propName: string, context: unknown) => number | string | boolean
handler: (propName: string, context: unknown) => number | string | boolean,
): void;

@@ -123,6 +121,6 @@

export enum RoxOverridesPosition {
TopLeft = 'top left',
TopRight = 'top right',
BottomLeft = 'bottom left',
BottomRight = 'bottom right'
TopLeft = "top left",
TopRight = "top right",
BottomLeft = "bottom left",
BottomRight = "bottom right",
}

@@ -136,9 +134,9 @@

export enum RoxFlagFreezeLevel {
None = 'none',
UntilForeground = 'untilForeground',
UntilLaunch = 'untilLaunch'
None = "none",
UntilForeground = "untilForeground",
UntilLaunch = "untilLaunch",
}
export interface RoxFlagOptions {
freeze?: RoxFlagFreezeLevel | undefined;
freeze?: RoxFlagFreezeLevel | undefined;
}

@@ -151,15 +149,15 @@

export class Flag {
constructor(defaultValue?: boolean, options?: RoxFlagOptions);
constructor(defaultValue?: boolean, options?: RoxFlagOptions);
// The name of the Flag
readonly name: string;
// The name of the Flag
readonly name: string;
// Default value of the Flag
readonly defaultValue: boolean;
// Default value of the Flag
readonly defaultValue: boolean;
// Returns true when the flag is enabled
isEnabled(context?: unknown): boolean;
// Returns true when the flag is enabled
isEnabled(context?: unknown): boolean;
// Unlock the Flag value from changes from the last time it was freezed
unfreeze(): void;
// Unlock the Flag value from changes from the last time it was freezed
unfreeze(): void;
}

@@ -173,15 +171,15 @@

export class Variant<T extends string = string> {
constructor(defaultValue: T, options: ReadonlyArray<T>, name?: string);
constructor(defaultValue: T, options: ReadonlyArray<T>, name?: string);
// The name of the Variant
readonly name: string;
// The name of the Variant
readonly name: string;
// Default value of the Variant
readonly defaultValue: BasicType<T>;
// Default value of the Variant
readonly defaultValue: BasicType<T>;
// Returns the current value of the Variant, accounting for value overrides
getValue(context?: unknown): BasicType<T>;
// Returns the current value of the Variant, accounting for value overrides
getValue(context?: unknown): BasicType<T>;
// Unlock the Variant value from changes from the last time it was freezed
unfreeze(): void;
// Unlock the Variant value from changes from the last time it was freezed
unfreeze(): void;
}

@@ -196,15 +194,15 @@

export class Configuration<T extends number | boolean | string> {
constructor(defaultValue: T);
constructor(defaultValue: T);
// The name of the Configuration
readonly name: string;
// The name of the Configuration
readonly name: string;
// Default value of the Configuration
readonly defaultValue: BasicType<T>;
// Default value of the Configuration
readonly defaultValue: BasicType<T>;
// Returns the current value of the Configuration, accounting for value overrides
getValue(context?: unknown): BasicType<T>;
// Returns the current value of the Configuration, accounting for value overrides
getValue(context?: unknown): BasicType<T>;
// Unlock the Configuration value from changes from the last time it was freezed
unfreeze(): void;
// Unlock the Configuration value from changes from the last time it was freezed
unfreeze(): void;
}

@@ -230,34 +228,34 @@

export namespace overrides {
/**
* Sets an override value on a specific flag, this function accepts two parameters flag name (
* full flag name including namespace) and desired value (from type String).
* This function also saves the override value on the local device disk,
* so it is "remembered" for the next the SDK is loaded to production.
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_rox_overrides_setoverride
*
* Note that for boolean flag we still give the value as a string.
*/
function setOverride(nameSpacedFlagName: string, value: string): void;
/**
* Sets an override value on a specific flag, this function accepts two parameters flag name (
* full flag name including namespace) and desired value (from type String).
* This function also saves the override value on the local device disk,
* so it is "remembered" for the next the SDK is loaded to production.
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_rox_overrides_setoverride
*
* Note that for boolean flag we still give the value as a string.
*/
function setOverride(nameSpacedFlagName: string, value: string): void;
/**
* Clears the override value from the flag (and the disk).
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_rox_overrides_clearoverride
*/
function clearOverride(nameSpacedFlagName: string): void;
/**
* Clears the override value from the flag (and the disk).
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_rox_overrides_clearoverride
*/
function clearOverride(nameSpacedFlagName: string): void;
/**
* Clears all override values
*/
function clearAllOverrides(): void;
/**
* Clears all override values
*/
function clearAllOverrides(): void;
function getOriginalValue(nameSpacedFlagName: string): string;
function getOriginalValue(nameSpacedFlagName: string): string;
/**
* full flag name including namespace
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_rox_overrides_hasoverride
*/
function hasOverride(nameSpacedFlagName: string): boolean;
/**
* full flag name including namespace
*
* https://docs.cloudbees.com/docs/cloudbees-feature-flags-api/4.9/api-reference/javascript-browser-api#_rox_overrides_hasoverride
*/
function hasOverride(nameSpacedFlagName: string): boolean;
}

@@ -271,13 +269,13 @@

export namespace dynamicApi {
/**
* Getting boolean value of a flag
*/
function isEnabled(nameSpacedFlagName: string, defaultValue: boolean, context?: unknown): boolean;
/**
* Getting boolean value of a flag
*/
function isEnabled(nameSpacedFlagName: string, defaultValue: boolean, context?: unknown): boolean;
/**
* Getting string value of a Variant flag
*/
function value(nameSpacedFlagName: string, defaultValue: string, context?: unknown): string;
/**
* Getting string value of a Variant flag
*/
function value(nameSpacedFlagName: string, defaultValue: string, context?: unknown): string;
}
export const flags: ReadonlyArray<Flag>;
{
"name": "@types/rox-browser",
"version": "4.8.5",
"version": "4.8.6",
"description": "TypeScript definitions for rox-browser",

@@ -23,4 +23,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rox-browser",

"dependencies": {},
"typesPublisherContentHash": "f05d63fc75a15c2898b388e44d42ab1d663f4044e025f061fd2a83591a697a9e",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "8189431c4e61128bc7179afd408d45576c473577036260e5d2f654088c0b873f",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 08 Jul 2021 22:42:11 GMT
* Last updated: Wed, 27 Sep 2023 07:12:04 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc