@umituz/react-native-ai-generation-content 1.27.11 → 1.27.13
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.13",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -5,17 +5,39 @@
|
|
|
5
5
|
|
|
6
6
|
/** Step Types */
|
|
7
7
|
export enum StepType {
|
|
8
|
+
// Gate steps - auth and credits check
|
|
9
|
+
AUTH_GATE = "auth_gate",
|
|
10
|
+
CREDIT_GATE = "credit_gate",
|
|
11
|
+
// Content steps
|
|
8
12
|
CATEGORY_SELECTION = "category_selection",
|
|
9
13
|
SCENARIO_SELECTION = "scenario_selection",
|
|
10
14
|
SCENARIO_PREVIEW = "scenario_preview",
|
|
11
15
|
PARTNER_UPLOAD = "partner_upload",
|
|
12
16
|
TEXT_INPUT = "text_input",
|
|
13
17
|
FEATURE_SELECTION = "feature_selection",
|
|
18
|
+
// Generation steps
|
|
14
19
|
GENERATING = "generating",
|
|
15
20
|
RESULT_PREVIEW = "result_preview",
|
|
16
21
|
CUSTOM = "custom",
|
|
17
22
|
}
|
|
18
23
|
|
|
24
|
+
/** Gate Step Result */
|
|
25
|
+
export type GateResult = "passed" | "blocked" | "pending";
|
|
26
|
+
|
|
27
|
+
/** Auth Gate Configuration */
|
|
28
|
+
export interface AuthGateConfig {
|
|
29
|
+
readonly allowAnonymous?: boolean;
|
|
30
|
+
readonly onAuthRequired?: () => void;
|
|
31
|
+
readonly onAuthSuccess?: () => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Credit Gate Configuration */
|
|
35
|
+
export interface CreditGateConfig {
|
|
36
|
+
readonly requiredCredits: number;
|
|
37
|
+
readonly onCreditsExhausted?: () => void;
|
|
38
|
+
readonly onCreditsAvailable?: () => void;
|
|
39
|
+
}
|
|
40
|
+
|
|
19
41
|
/** Partner Configuration */
|
|
20
42
|
export interface PartnerConfig {
|
|
21
43
|
readonly partnerId: "A" | "B" | "single";
|
|
@@ -35,3 +35,16 @@ export { ExecutorFactory, type GenerationType as ExecutorGenerationType } from "
|
|
|
35
35
|
|
|
36
36
|
export * from "./wizard";
|
|
37
37
|
export * from "./infrastructure/flow";
|
|
38
|
+
|
|
39
|
+
// Flow config types from domain
|
|
40
|
+
export {
|
|
41
|
+
StepType,
|
|
42
|
+
type GateResult,
|
|
43
|
+
type AuthGateConfig,
|
|
44
|
+
type CreditGateConfig,
|
|
45
|
+
type FlowState,
|
|
46
|
+
type FlowActions,
|
|
47
|
+
type FlowCallbacks,
|
|
48
|
+
type FlowConfiguration,
|
|
49
|
+
type StepDefinition,
|
|
50
|
+
} from "../../domain/entities/flow-config.types";
|
|
@@ -72,10 +72,32 @@ export interface PreviewStepConfig extends BaseStepConfig {
|
|
|
72
72
|
readonly showContinueButton?: boolean;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Auth Gate Step Configuration
|
|
77
|
+
* Blocks flow if user is not authenticated
|
|
78
|
+
*/
|
|
79
|
+
export interface AuthGateStepConfig extends BaseStepConfig {
|
|
80
|
+
readonly type: "auth_gate";
|
|
81
|
+
readonly allowAnonymous?: boolean;
|
|
82
|
+
readonly messageKey?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Credit Gate Step Configuration
|
|
87
|
+
* Blocks flow if user doesn't have enough credits
|
|
88
|
+
*/
|
|
89
|
+
export interface CreditGateStepConfig extends BaseStepConfig {
|
|
90
|
+
readonly type: "credit_gate";
|
|
91
|
+
readonly requiredCredits: number;
|
|
92
|
+
readonly messageKey?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
75
95
|
/**
|
|
76
96
|
* Union of all step config types
|
|
77
97
|
*/
|
|
78
98
|
export type WizardStepConfig =
|
|
99
|
+
| AuthGateStepConfig
|
|
100
|
+
| CreditGateStepConfig
|
|
79
101
|
| PhotoUploadStepConfig
|
|
80
102
|
| TextInputStepConfig
|
|
81
103
|
| SelectionStepConfig
|