cogfy-data-exchange 1.0.21 → 1.0.22
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/types/result.d.ts +3 -3
- package/package.json +1 -1
- package/src/types/result.ts +3 -5
package/dist/types/result.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { FlowJson } from './flow-json';
|
|
2
2
|
import type { NextScreens } from './routing';
|
|
3
3
|
import type { ScreenData, ScreenName } from './screen';
|
|
4
|
-
type
|
|
4
|
+
type ScreenSelfResult<F extends FlowJson, S extends ScreenName<F>> = {
|
|
5
5
|
screen: S;
|
|
6
|
-
data: {
|
|
6
|
+
data: ScreenData<F, S> | {
|
|
7
7
|
error_message: string;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
@@ -22,5 +22,5 @@ export type NextResult<F extends FlowJson, S extends ScreenName<F>> = {
|
|
|
22
22
|
screen: K;
|
|
23
23
|
data: ScreenData<F, K>;
|
|
24
24
|
};
|
|
25
|
-
}[NextScreens<F, S>] |
|
|
25
|
+
}[NextScreens<F, S>] | ScreenSelfResult<F, S> | FlowSuccessResult;
|
|
26
26
|
export {};
|
package/package.json
CHANGED
package/src/types/result.ts
CHANGED
|
@@ -2,11 +2,9 @@ import type { FlowJson } from './flow-json'
|
|
|
2
2
|
import type { NextScreens } from './routing'
|
|
3
3
|
import type { ScreenData, ScreenName } from './screen'
|
|
4
4
|
|
|
5
|
-
type
|
|
5
|
+
type ScreenSelfResult<F extends FlowJson, S extends ScreenName<F>> = {
|
|
6
6
|
screen: S
|
|
7
|
-
data: {
|
|
8
|
-
error_message: string
|
|
9
|
-
}
|
|
7
|
+
data: ScreenData<F, S> | { error_message: string }
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
type FlowSuccessResult = {
|
|
@@ -25,5 +23,5 @@ export type NextResult<F extends FlowJson, S extends ScreenName<F>> =
|
|
|
25
23
|
data: ScreenData<F, K>
|
|
26
24
|
}
|
|
27
25
|
}[NextScreens<F, S>]
|
|
28
|
-
|
|
|
26
|
+
| ScreenSelfResult<F, S>
|
|
29
27
|
| FlowSuccessResult
|