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

@eppo/js-client-sdk-common

Package Overview
Dependencies
Maintainers
0
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eppo/js-client-sdk-common - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0

2

dist/bandit-logger.d.ts

@@ -18,4 +18,4 @@ import { Attributes } from './types';

export interface IBanditLogger {
logBanditAction(assignment: IBanditEvent): void;
logBanditAction(banditEvent: IBanditEvent): void;
}
//# sourceMappingURL=bandit-logger.d.ts.map

@@ -7,3 +7,3 @@ import { IAssignmentLogger } from '../assignment-logger';

import { BanditVariation, BanditParameters, Flag, ObfuscatedFlag, VariationType } from '../interfaces';
import { AttributeType, BanditActions, BanditSubjectAttributes, ValueType } from '../types';
import { Attributes, BanditActions, BanditSubjectAttributes, ValueType } from '../types';
/**

@@ -25,7 +25,7 @@ * Client for assigning experiment variations.

*/
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: string): string;
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: string): string;
/**
* @deprecated use getBooleanAssignment instead.
*/
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: boolean): boolean;
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: boolean): boolean;
/**

@@ -40,3 +40,3 @@ * Maps a subject to a boolean variation for a given experiment.

*/
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: boolean): boolean;
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: boolean): boolean;
/**

@@ -51,3 +51,3 @@ * Maps a subject to an Integer variation for a given experiment.

*/
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: number): number;
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: number): number;
/**

@@ -62,3 +62,3 @@ * Maps a subject to a Numeric variation for a given experiment.

*/
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: number): number;
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: number): number;
/**

@@ -73,3 +73,3 @@ * Maps a subject to a JSON variation for a given experiment.

*/
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: object): object;
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: object): object;
/**

@@ -144,8 +144,8 @@ * Maps a subject to a string assignment for a given experiment.

stopPolling(): void;
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: string): string;
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: boolean): boolean;
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: boolean): boolean;
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: number): number;
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: number): number;
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: object): object;
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: string): string;
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: boolean): boolean;
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: boolean): boolean;
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: number): number;
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: number): number;
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Attributes, defaultValue: object): object;
getBanditAction(flagKey: string, subjectKey: string, subjectAttributes: BanditSubjectAttributes, actions: BanditActions, defaultValue: string): {

@@ -175,3 +175,3 @@ variation: string;

*/
getAssignmentDetail(flagKey: string, subjectKey: string, subjectAttributes?: Record<string, AttributeType>, expectedVariationType?: VariationType): FlagEvaluation;
getAssignmentDetail(flagKey: string, subjectKey: string, subjectAttributes?: Attributes, expectedVariationType?: VariationType): FlagEvaluation;
private getFlag;

@@ -178,0 +178,0 @@ private getObfuscatedFlag;

import ApiEndpoints from './api-endpoints';
import { logger } from './application-logger';
import { logger as applicationLogger } from './application-logger';
import { IAssignmentHooks } from './assignment-hooks';

@@ -15,5 +15,5 @@ import { IAssignmentLogger, IAssignmentEvent } from './assignment-logger';

import { Flag, ObfuscatedFlag, VariationType } from './interfaces';
import { AttributeType, Attributes } from './types';
import { AttributeType, Attributes, BanditActions, BanditSubjectAttributes, ContextAttributes } from './types';
import * as validation from './validation';
export { logger as applicationLogger, AbstractAssignmentCache, IAssignmentHooks, IAssignmentLogger, IAssignmentEvent, IBanditLogger, IBanditEvent, EppoClient, IEppoClient, constants, ApiEndpoints, FlagConfigRequestor, HttpClient, validation, IConfigurationStore, IAsyncStore, ISyncStore, MemoryStore, HybridConfigurationStore, MemoryOnlyConfigurationStore, AssignmentCacheKey, AssignmentCacheValue, AssignmentCacheEntry, AssignmentCache, AsyncMap, NonExpiringInMemoryAssignmentCache, LRUInMemoryAssignmentCache, assignmentCacheKeyToString, assignmentCacheValueToString, FlagConfigurationRequestParameters, Flag, ObfuscatedFlag, VariationType, AttributeType, Attributes, };
export { applicationLogger, AbstractAssignmentCache, IAssignmentHooks, IAssignmentLogger, IAssignmentEvent, IBanditLogger, IBanditEvent, EppoClient, IEppoClient, constants, ApiEndpoints, FlagConfigRequestor, HttpClient, validation, IConfigurationStore, IAsyncStore, ISyncStore, MemoryStore, HybridConfigurationStore, MemoryOnlyConfigurationStore, AssignmentCacheKey, AssignmentCacheValue, AssignmentCacheEntry, AssignmentCache, AsyncMap, NonExpiringInMemoryAssignmentCache, LRUInMemoryAssignmentCache, assignmentCacheKeyToString, assignmentCacheValueToString, FlagConfigurationRequestParameters, Flag, ObfuscatedFlag, VariationType, AttributeType, Attributes, ContextAttributes, BanditSubjectAttributes, BanditActions, };
//# sourceMappingURL=index.d.ts.map
export declare type ValueType = string | number | boolean | JSON;
export declare type AttributeType = string | number | boolean;
export declare type ConditionValueType = AttributeType | AttributeType[];
export declare type Attributes = {
[key: string]: AttributeType;
};
export declare type Attributes = Record<string, AttributeType>;
export declare type ContextAttributes = {

@@ -8,0 +6,0 @@ numericAttributes: Attributes;

{
"name": "@eppo/js-client-sdk-common",
"version": "3.5.0",
"version": "3.6.0",
"description": "Eppo SDK for client-side JavaScript applications (base for both web and react native)",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -20,3 +20,3 @@ import { Attributes } from './types';

export interface IBanditLogger {
logBanditAction(assignment: IBanditEvent): void;
logBanditAction(banditEvent: IBanditEvent): void;
}

@@ -63,3 +63,3 @@ import ApiEndpoints from '../api-endpoints';

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: string,

@@ -74,3 +74,3 @@ ): string;

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: boolean,

@@ -91,3 +91,3 @@ ): boolean;

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: boolean,

@@ -108,3 +108,3 @@ ): boolean;

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: number,

@@ -125,3 +125,3 @@ ): number;

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: number,

@@ -142,3 +142,3 @@ ): number;

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: object,

@@ -337,3 +337,3 @@ ): object;

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: string,

@@ -355,3 +355,3 @@ ): string {

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: boolean,

@@ -365,3 +365,3 @@ ): boolean {

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: boolean,

@@ -383,3 +383,3 @@ ): boolean {

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: number,

@@ -401,3 +401,3 @@ ): number {

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: number,

@@ -419,3 +419,3 @@ ): number {

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: object,

@@ -614,3 +614,3 @@ ): object {

subjectKey: string,
subjectAttributes: Record<string, AttributeType>,
subjectAttributes: Attributes,
defaultValue: EppoValue,

@@ -660,3 +660,3 @@ expectedVariationType: VariationType,

subjectKey: string,
subjectAttributes: Record<string, AttributeType> = {},
subjectAttributes: Attributes = {},
expectedVariationType?: VariationType,

@@ -663,0 +663,0 @@ ): FlagEvaluation {

import ApiEndpoints from './api-endpoints';
import { logger } from './application-logger';
import { logger as applicationLogger } from './application-logger';
import { IAssignmentHooks } from './assignment-hooks';

@@ -30,7 +30,13 @@ import { IAssignmentLogger, IAssignmentEvent } from './assignment-logger';

import { Flag, ObfuscatedFlag, VariationType } from './interfaces';
import { AttributeType, Attributes } from './types';
import {
AttributeType,
Attributes,
BanditActions,
BanditSubjectAttributes,
ContextAttributes,
} from './types';
import * as validation from './validation';
export {
logger as applicationLogger,
applicationLogger,
AbstractAssignmentCache,

@@ -76,2 +82,5 @@ IAssignmentHooks,

Attributes,
ContextAttributes,
BanditSubjectAttributes,
BanditActions,
};
export type ValueType = string | number | boolean | JSON;
export type AttributeType = string | number | boolean;
export type ConditionValueType = AttributeType | AttributeType[];
export type Attributes = { [key: string]: AttributeType };
export type Attributes = Record<string, AttributeType>;
export type ContextAttributes = {

@@ -6,0 +6,0 @@ numericAttributes: Attributes;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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