diff --git a/flipt-client-browser/package-lock.json b/flipt-client-browser/package-lock.json index c43349d8..3c0bbb6a 100644 --- a/flipt-client-browser/package-lock.json +++ b/flipt-client-browser/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flipt-io/flipt-client-browser", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@flipt-io/flipt-client-browser", - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", "devDependencies": { "@rollup/plugin-typescript": "^11.1.6", diff --git a/flipt-client-browser/package.json b/flipt-client-browser/package.json index 382dfabb..9d2b9285 100644 --- a/flipt-client-browser/package.json +++ b/flipt-client-browser/package.json @@ -1,6 +1,6 @@ { "name": "@flipt-io/flipt-client-browser", - "version": "0.2.0", + "version": "0.2.1", "description": "Flipt Client Evaluation Browser SDK", "main": "dist/index.cjs", "module": "dist/index.mjs", diff --git a/flipt-client-browser/src/index.ts b/flipt-client-browser/src/index.ts index 744db274..cbd55f36 100644 --- a/flipt-client-browser/src/index.ts +++ b/flipt-client-browser/src/index.ts @@ -3,19 +3,22 @@ import wasm from '../dist/flipt_engine_wasm_bg.wasm'; import { deserialize, serialize } from './utils'; import { BatchEvaluationResponse, - BatchResult, BooleanEvaluationResponse, - BooleanResult, ClientOptions, ErrorEvaluationResponse, EvaluationRequest, EvaluationResponse, Flag, IFetcher, - ListFlagsResult, - VariantEvaluationResponse, - VariantResult -} from './models.js'; + VariantEvaluationResponse +} from './models'; + +import { + VariantResult, + BooleanResult, + BatchResult, + ListFlagsResult +} from './internal/models'; export class FliptEvaluationClient { private engine: Engine; @@ -292,3 +295,5 @@ export class FliptEvaluationClient { return flags.result.map(deserialize); } } + +export * from './models'; diff --git a/flipt-client-browser/src/internal/models.ts b/flipt-client-browser/src/internal/models.ts new file mode 100644 index 00000000..6374a6b9 --- /dev/null +++ b/flipt-client-browser/src/internal/models.ts @@ -0,0 +1,39 @@ +import { + BatchEvaluationResponse, + BooleanEvaluationResponse, + Flag, + VariantEvaluationResponse +} from '../models'; + +/** + * Represents a specialized result object for variant evaluation, extending + * the generic Result interface with a specific type VariantEvaluationResponse. + */ +export interface VariantResult extends Result {} + +/** + * Represents a specialized result object for boolean evaluation, extending + * the generic Result interface with a specific type BooleanEvaluationResponse. + */ +export interface BooleanResult extends Result {} + +/** + * Represents a specialized result object for batch evaluation, extending + * the generic Result interface with a specific type BatchEvaluationResponse. + */ +export interface BatchResult extends Result {} + +/** + * Represents a specialized result object for listing flags, extending + * the generic Result interface with a specific type ListFlagsResponse. + */ +export interface ListFlagsResult extends Result {} + +export interface Result { + /** Status of the result - `success` or `failure`. */ + status: string; + /** Actual result of type T if the operation was successful. */ + result?: T; + /** Error message describing the reason for failure, if applicable.*/ + errorMessage: string; +} diff --git a/flipt-client-browser/src/models.ts b/flipt-client-browser/src/models.ts index c7db098c..6897fdc0 100644 --- a/flipt-client-browser/src/models.ts +++ b/flipt-client-browser/src/models.ts @@ -191,36 +191,3 @@ export interface BatchEvaluationResponse { /** Duration of the request in milliseconds. */ requestDurationMillis: number; } - -/** - * Represents a specialized result object for variant evaluation, extending - * the generic Result interface with a specific type VariantEvaluationResponse. - */ -export interface VariantResult extends Result {} - -/** - * Represents a specialized result object for boolean evaluation, extending - * the generic Result interface with a specific type BooleanEvaluationResponse. - */ -export interface BooleanResult extends Result {} - -/** - * Represents a specialized result object for batch evaluation, extending - * the generic Result interface with a specific type BatchEvaluationResponse. - */ -export interface BatchResult extends Result {} - -/** - * Represents a specialized result object for listing flags, extending - * the generic Result interface with a specific type ListFlagsResponse. - */ -export interface ListFlagsResult extends Result {} - -export interface Result { - /** Status of the result - `success` or `failure`. */ - status: string; - /** Actual result of type T if the operation was successful. */ - result?: T; - /** Error message describing the reason for failure, if applicable.*/ - errorMessage: string; -} diff --git a/flipt-client-node/package-lock.json b/flipt-client-node/package-lock.json index f36e0ed2..f48aef4c 100644 --- a/flipt-client-node/package-lock.json +++ b/flipt-client-node/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flipt-io/flipt-client", - "version": "0.10.0", + "version": "0.10.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@flipt-io/flipt-client", - "version": "0.10.0", + "version": "0.10.1", "license": "MIT", "devDependencies": { "@types/jest": "^29.5.10", diff --git a/flipt-client-node/package.json b/flipt-client-node/package.json index 73ed6452..0ddd00b8 100644 --- a/flipt-client-node/package.json +++ b/flipt-client-node/package.json @@ -1,6 +1,6 @@ { "name": "@flipt-io/flipt-client", - "version": "0.10.0", + "version": "0.10.1", "description": "Flipt Client Evaluation SDK", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/flipt-client-node/src/index.ts b/flipt-client-node/src/index.ts index 8fb6929d..637ed6a6 100644 --- a/flipt-client-node/src/index.ts +++ b/flipt-client-node/src/index.ts @@ -3,21 +3,24 @@ import { serialize, deserialize } from './utils'; import { AuthenticationStrategy, - BooleanResult, - BatchResult, ClientOptions, EvaluationRequest, IFetcher, - VariantResult, VariantEvaluationResponse, BooleanEvaluationResponse, BatchEvaluationResponse, ErrorEvaluationResponse, EvaluationResponse, - Flag, - ListFlagsResult + Flag } from './models'; +import { + VariantResult, + BooleanResult, + BatchResult, + ListFlagsResult +} from './internal/models'; + export class FliptEvaluationClient { private engine: Engine; private fetcher: IFetcher; @@ -316,3 +319,5 @@ export class FliptEvaluationClient { this.stopAutoRefresh(); } } + +export * from './models'; diff --git a/flipt-client-node/src/internal/models.ts b/flipt-client-node/src/internal/models.ts new file mode 100644 index 00000000..4b87256a --- /dev/null +++ b/flipt-client-node/src/internal/models.ts @@ -0,0 +1,38 @@ +import { + Flag, + VariantEvaluationResponse, + BooleanEvaluationResponse, + BatchEvaluationResponse +} from '../models'; +/** + * Represents a specialized result object for variant evaluation, extending + * the generic Result interface with a specific type VariantEvaluationResponse. + */ +export interface VariantResult extends Result {} + +/** + * Represents a specialized result object for boolean evaluation, extending + * the generic Result interface with a specific type BooleanEvaluationResponse. + */ +export interface BooleanResult extends Result {} + +/** + * Represents a specialized result object for batch evaluation, extending + * the generic Result interface with a specific type BatchEvaluationResponse. + */ +export interface BatchResult extends Result {} + +/** + * Represents a specialized result object for listing flags, extending + * the generic Result interface with a specific type ListFlagsResponse. + */ +export interface ListFlagsResult extends Result {} + +export interface Result { + /** Status of the result - `success` or `failure`. */ + status: string; + /** Actual result of type T if the operation was successful. */ + result?: T; + /** Error message describing the reason for failure, if applicable.*/ + errorMessage: string; +} diff --git a/flipt-client-node/src/models.ts b/flipt-client-node/src/models.ts index 3be06222..30281b4a 100644 --- a/flipt-client-node/src/models.ts +++ b/flipt-client-node/src/models.ts @@ -191,36 +191,3 @@ export interface BatchEvaluationResponse { /** Duration of the request in milliseconds. */ requestDurationMillis: number; } - -/** - * Represents a specialized result object for variant evaluation, extending - * the generic Result interface with a specific type VariantEvaluationResponse. - */ -export interface VariantResult extends Result {} - -/** - * Represents a specialized result object for boolean evaluation, extending - * the generic Result interface with a specific type BooleanEvaluationResponse. - */ -export interface BooleanResult extends Result {} - -/** - * Represents a specialized result object for batch evaluation, extending - * the generic Result interface with a specific type BatchEvaluationResponse. - */ -export interface BatchResult extends Result {} - -/** - * Represents a specialized result object for listing flags, extending - * the generic Result interface with a specific type ListFlagsResponse. - */ -export interface ListFlagsResult extends Result {} - -export interface Result { - /** Status of the result - `success` or `failure`. */ - status: string; - /** Actual result of type T if the operation was successful. */ - result?: T; - /** Error message describing the reason for failure, if applicable.*/ - errorMessage: string; -}