exupery-core-types 0.3.47 → 0.3.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Query.d.ts +3 -0
- package/dist/Query_Procedure.d.ts +1 -1
- package/dist/Query_Result.d.ts +26 -0
- package/dist/Refinement_Result.d.ts +27 -0
- package/dist/Refinement_Result.js +2 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/dist/Stager.d.ts +0 -4
- package/dist/Staging_Result.d.ts +0 -18
- /package/dist/{Stager.js → Query.js} +0 -0
- /package/dist/{Staging_Result.js → Query_Result.js} +0 -0
package/dist/Query.d.ts
ADDED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Query } from "./
|
|
1
|
+
import { Query } from "./Query";
|
|
2
2
|
export type Query_Procedure<Result, Error, Parameters, Query_Resources> = ($q: Query_Resources) => Query<Result, Error, Parameters>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Transformer } from "./Transformer";
|
|
2
|
+
type Stager<Output, Error, Input> = ($: Input) => Query_Result<Output, Error>;
|
|
3
|
+
export interface Query_Result<Output, Error> {
|
|
4
|
+
query_result: null;
|
|
5
|
+
transform_result<New_Output>(transformer: Transformer<New_Output, Output>): Query_Result<New_Output, Error>;
|
|
6
|
+
transform_error_temp<New_Error>(error_transformer: Transformer<New_Error, Error>): Query_Result<Output, New_Error>;
|
|
7
|
+
query_without_error_transformation<New_Output>(query: Stager<New_Output, Error, Output>): Query_Result<New_Output, Error>;
|
|
8
|
+
query<New_Output, Stager_Error>(query: Stager<New_Output, Stager_Error, Output>,
|
|
9
|
+
/**
|
|
10
|
+
* if the stager fails, rework its error into the desired error type
|
|
11
|
+
*/
|
|
12
|
+
error_transformer: Transformer<Error, Stager_Error>): Query_Result<New_Output, Error>;
|
|
13
|
+
refine_without_error_transformation<New_Output>(refiner: Stager<New_Output, Error, Output>): Query_Result<New_Output, Error>;
|
|
14
|
+
refine<New_Output, Stager_Error>(refiner: Stager<New_Output, Stager_Error, Output>,
|
|
15
|
+
/**
|
|
16
|
+
* if the stager fails, rework its error into the desired error type
|
|
17
|
+
*/
|
|
18
|
+
error_transformer: Transformer<Error, Stager_Error>): Query_Result<New_Output, Error>;
|
|
19
|
+
rework_error_temp<New_Error, Rework_Error>(error_reworker: Stager<New_Error, Rework_Error, Error>,
|
|
20
|
+
/**
|
|
21
|
+
* if the reworker fails, we need to transform *that* error into the New_Error
|
|
22
|
+
*/
|
|
23
|
+
rework_error_transformer: Transformer<New_Error, Rework_Error>): Query_Result<Output, New_Error>;
|
|
24
|
+
__extract_data: (on_success: ($: Output) => void, on_error: ($: Error) => void) => void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Query_Result } from "./Query_Result";
|
|
2
|
+
import { Transformer } from "./Transformer";
|
|
3
|
+
type Stager<Output, Error, Input> = ($: Input) => Refinement_Result<Output, Error>;
|
|
4
|
+
export interface Refinement_Result<Output, Error> {
|
|
5
|
+
transform<Target>(output_transformer: Transformer<Target, Output>, error_transformer: Transformer<Target, Error>): Refinement_Result<Target, Target>;
|
|
6
|
+
transform_result<New_Output>(transformer: Transformer<New_Output, Output>): Refinement_Result<New_Output, Error>;
|
|
7
|
+
transform_error_temp<New_Error>(error_transformer: Transformer<New_Error, Error>): Refinement_Result<Output, New_Error>;
|
|
8
|
+
refine_without_error_transformation<New_Output>(refiner: Stager<New_Output, Error, Output>): Refinement_Result<New_Output, Error>;
|
|
9
|
+
refine<New_Output, Stager_Error>(refiner: Stager<New_Output, Stager_Error, Output>,
|
|
10
|
+
/**
|
|
11
|
+
* if the stager fails, rework its error into the desired error type
|
|
12
|
+
*/
|
|
13
|
+
error_transformer: Transformer<Error, Stager_Error>): Refinement_Result<New_Output, Error>;
|
|
14
|
+
query_without_error_transformation<New_Output>(query: Stager<New_Output, Error, Output>): Query_Result<New_Output, Error>;
|
|
15
|
+
query<New_Output, Stager_Error>(query: Stager<New_Output, Stager_Error, Output>,
|
|
16
|
+
/**
|
|
17
|
+
* if the stager fails, rework its error into the desired error type
|
|
18
|
+
*/
|
|
19
|
+
error_transformer: Transformer<Error, Stager_Error>): Query_Result<New_Output, Error>;
|
|
20
|
+
rework_error_temp<New_Error, Rework_Error>(error_reworker: Stager<New_Error, Rework_Error, Error>,
|
|
21
|
+
/**
|
|
22
|
+
* if the reworker fails, we need to transform *that* error into the New_Error
|
|
23
|
+
*/
|
|
24
|
+
rework_error_transformer: Transformer<New_Error, Rework_Error>): Refinement_Result<Output, New_Error>;
|
|
25
|
+
__extract_data: (on_success: ($: Output) => void, on_error: ($: Error) => void) => void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export * from "./Dictionary";
|
|
|
4
4
|
export * from "./Lookup";
|
|
5
5
|
export * from "./Optional_Value";
|
|
6
6
|
export * from "./Command";
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
7
|
+
export * from "./Query";
|
|
8
|
+
export * from "./Query_Result";
|
|
9
|
+
export * from "./Refinement_Result";
|
|
9
10
|
export * from "./Query_Procedure";
|
|
10
11
|
export * from "./Transformer";
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,8 @@ __exportStar(require("./Dictionary"), exports);
|
|
|
20
20
|
__exportStar(require("./Lookup"), exports);
|
|
21
21
|
__exportStar(require("./Optional_Value"), exports);
|
|
22
22
|
__exportStar(require("./Command"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
24
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./Query"), exports);
|
|
24
|
+
__exportStar(require("./Query_Result"), exports);
|
|
25
|
+
__exportStar(require("./Refinement_Result"), exports);
|
|
25
26
|
__exportStar(require("./Query_Procedure"), exports);
|
|
26
27
|
__exportStar(require("./Transformer"), exports);
|
package/package.json
CHANGED
package/dist/Stager.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Staging_Result } from "./Staging_Result";
|
|
2
|
-
import { Transformer } from "./Transformer";
|
|
3
|
-
export type Stager<Output, Error, Input> = ($: Input) => Staging_Result<Output, Error>;
|
|
4
|
-
export type Query<Output, Error, Input> = <Target_Error>($: Input, error_transformer: Transformer<Target_Error, Error>) => Staging_Result<Output, Target_Error>;
|
package/dist/Staging_Result.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Stager } from "./Stager";
|
|
2
|
-
import { Transformer } from "./Transformer";
|
|
3
|
-
export interface Staging_Result<Output, Error> {
|
|
4
|
-
transform_result<New_Output>(transformer: Transformer<New_Output, Output>): Staging_Result<New_Output, Error>;
|
|
5
|
-
transform_error_temp<New_Error>(error_transformer: Transformer<New_Error, Error>): Staging_Result<Output, New_Error>;
|
|
6
|
-
stage_without_error_transformation<New_Output>(stager: Stager<New_Output, Error, Output>): Staging_Result<New_Output, Error>;
|
|
7
|
-
stage<New_Output, Stager_Error>(stager: Stager<New_Output, Stager_Error, Output>,
|
|
8
|
-
/**
|
|
9
|
-
* if the stager fails, rework its error into the desired error type
|
|
10
|
-
*/
|
|
11
|
-
error_transformer: Transformer<Error, Stager_Error>): Staging_Result<New_Output, Error>;
|
|
12
|
-
rework_error_temp<New_Error, Rework_Error>(error_reworker: Stager<New_Error, Rework_Error, Error>,
|
|
13
|
-
/**
|
|
14
|
-
* if the reworker fails, we need to transform *that* error into the New_Error
|
|
15
|
-
*/
|
|
16
|
-
rework_error_transformer: Transformer<New_Error, Rework_Error>): Staging_Result<Output, New_Error>;
|
|
17
|
-
__extract_data: (on_success: ($: Output) => void, on_error: ($: Error) => void) => void;
|
|
18
|
-
}
|
|
File without changes
|
|
File without changes
|