-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(node/browser): export models outside package (#392)
- Loading branch information
1 parent
76fd9ba
commit c3f0806
Showing
10 changed files
with
104 additions
and
83 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<VariantEvaluationResponse> {} | ||
|
||
/** | ||
* Represents a specialized result object for boolean evaluation, extending | ||
* the generic Result interface with a specific type BooleanEvaluationResponse. | ||
*/ | ||
export interface BooleanResult extends Result<BooleanEvaluationResponse> {} | ||
|
||
/** | ||
* Represents a specialized result object for batch evaluation, extending | ||
* the generic Result interface with a specific type BatchEvaluationResponse. | ||
*/ | ||
export interface BatchResult extends Result<BatchEvaluationResponse> {} | ||
|
||
/** | ||
* Represents a specialized result object for listing flags, extending | ||
* the generic Result interface with a specific type ListFlagsResponse. | ||
*/ | ||
export interface ListFlagsResult extends Result<Flag[]> {} | ||
|
||
export interface Result<T> { | ||
/** 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<VariantEvaluationResponse> {} | ||
|
||
/** | ||
* Represents a specialized result object for boolean evaluation, extending | ||
* the generic Result interface with a specific type BooleanEvaluationResponse. | ||
*/ | ||
export interface BooleanResult extends Result<BooleanEvaluationResponse> {} | ||
|
||
/** | ||
* Represents a specialized result object for batch evaluation, extending | ||
* the generic Result interface with a specific type BatchEvaluationResponse. | ||
*/ | ||
export interface BatchResult extends Result<BatchEvaluationResponse> {} | ||
|
||
/** | ||
* Represents a specialized result object for listing flags, extending | ||
* the generic Result interface with a specific type ListFlagsResponse. | ||
*/ | ||
export interface ListFlagsResult extends Result<Flag[]> {} | ||
|
||
export interface Result<T> { | ||
/** 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters