@bubblelab/shared-schemas 0.1.13 → 0.1.14
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/agent-memory.d.ts +21 -0
- package/dist/agent-memory.d.ts.map +1 -0
- package/dist/ai-models.d.ts +4 -0
- package/dist/ai-models.d.ts.map +1 -0
- package/dist/api-schema.d.ts +38 -0
- package/dist/api-schema.d.ts.map +1 -0
- package/dist/bubble-definition-schema.d.ts +840 -0
- package/dist/bubble-definition-schema.d.ts.map +1 -0
- package/dist/bubbleflow-execution-schema.d.ts +1297 -0
- package/dist/bubbleflow-execution-schema.d.ts.map +1 -0
- package/dist/bubbleflow-generation-prompts.d.ts +8 -0
- package/dist/bubbleflow-generation-prompts.d.ts.map +1 -0
- package/dist/bubbleflow-schema.d.ts +2071 -0
- package/dist/bubbleflow-schema.d.ts.map +1 -0
- package/dist/coffee.d.ts +2201 -0
- package/dist/coffee.d.ts.map +1 -0
- package/dist/credential-schema.d.ts +574 -0
- package/dist/credential-schema.d.ts.map +1 -0
- package/dist/cron-utils.d.ts +47 -0
- package/dist/cron-utils.d.ts.map +1 -0
- package/dist/database-definition-schema.d.ts +97 -0
- package/dist/database-definition-schema.d.ts.map +1 -0
- package/dist/error-enhancer.d.ts +6 -0
- package/dist/error-enhancer.d.ts.map +1 -0
- package/dist/generate-bubbleflow-schema.d.ts +1525 -0
- package/dist/generate-bubbleflow-schema.d.ts.map +1 -0
- package/dist/hash-utils.d.ts +26 -0
- package/dist/hash-utils.d.ts.map +1 -0
- package/dist/index.d.ts +29 -10076
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +225 -0
- package/dist/index.js.map +1 -1
- package/dist/milk-tea.d.ts +106 -0
- package/dist/milk-tea.d.ts.map +1 -0
- package/dist/mock-data-generator.d.ts +51 -0
- package/dist/mock-data-generator.d.ts.map +1 -0
- package/dist/oauth-schema.d.ts +61 -0
- package/dist/oauth-schema.d.ts.map +1 -0
- package/dist/param-utils.d.ts +10 -0
- package/dist/param-utils.d.ts.map +1 -0
- package/dist/pearl.d.ts +346 -0
- package/dist/pearl.d.ts.map +1 -0
- package/dist/rice.d.ts +100 -0
- package/dist/rice.d.ts.map +1 -0
- package/dist/storage-utils.d.ts +19 -0
- package/dist/storage-utils.d.ts.map +1 -0
- package/dist/streaming-events.d.ts +140 -0
- package/dist/streaming-events.d.ts.map +1 -0
- package/dist/subscription-status-schema.d.ts +250 -0
- package/dist/subscription-status-schema.d.ts.map +1 -0
- package/dist/trigger.d.ts +172 -0
- package/dist/trigger.d.ts.map +1 -0
- package/dist/types.d.ts +31 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/waitlist-schema.d.ts +30 -0
- package/dist/waitlist-schema.d.ts.map +1 -0
- package/dist/webhook-schema.d.ts +95 -0
- package/dist/webhook-schema.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/rice.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type AvailableModel } from './ai-models.js';
|
|
3
|
+
export declare const RICE_DEFAULT_MODEL: AvailableModel;
|
|
4
|
+
/**
|
|
5
|
+
* Issue type categories for Rice evaluation
|
|
6
|
+
* - setup: Configuration/credential issues (user can fix in settings, not workflow code)
|
|
7
|
+
* - workflow: Logic/code issues in the workflow itself (fixable with Pearl)
|
|
8
|
+
* - input: Issues with input data (user needs to provide different input)
|
|
9
|
+
* - null: No issues (working=true)
|
|
10
|
+
*/
|
|
11
|
+
export declare const RiceIssueTypeSchema: z.ZodNullable<z.ZodEnum<["setup", "workflow", "input"]>>;
|
|
12
|
+
export type RiceIssueType = z.infer<typeof RiceIssueTypeSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* Evaluation result schema from Rice agent
|
|
15
|
+
* This represents the AI's assessment of workflow execution quality
|
|
16
|
+
*/
|
|
17
|
+
export declare const RiceEvaluationResultSchema: z.ZodObject<{
|
|
18
|
+
working: z.ZodBoolean;
|
|
19
|
+
issueType: z.ZodNullable<z.ZodEnum<["setup", "workflow", "input"]>>;
|
|
20
|
+
summary: z.ZodString;
|
|
21
|
+
rating: z.ZodNumber;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
summary: string;
|
|
24
|
+
working: boolean;
|
|
25
|
+
issueType: "workflow" | "input" | "setup" | null;
|
|
26
|
+
rating: number;
|
|
27
|
+
}, {
|
|
28
|
+
summary: string;
|
|
29
|
+
working: boolean;
|
|
30
|
+
issueType: "workflow" | "input" | "setup" | null;
|
|
31
|
+
rating: number;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Request schema for Rice evaluation agent
|
|
35
|
+
* Rice evaluates workflow execution quality based on logs and code
|
|
36
|
+
*/
|
|
37
|
+
export declare const RiceRequestSchema: z.ZodObject<{
|
|
38
|
+
executionLogs: z.ZodArray<z.ZodUnknown, "many">;
|
|
39
|
+
workflowCode: z.ZodString;
|
|
40
|
+
executionId: z.ZodNumber;
|
|
41
|
+
bubbleFlowId: z.ZodNumber;
|
|
42
|
+
model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "openai/gpt-5.1", "openai/gpt-5.2", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash-image-preview", "google/gemini-3-pro-preview", "google/gemini-3-pro-image-preview", "google/gemini-3-flash-preview", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "anthropic/claude-haiku-4-5", "openrouter/x-ai/grok-code-fast-1", "openrouter/z-ai/glm-4.6", "openrouter/anthropic/claude-sonnet-4.5", "openrouter/google/gemini-3-pro-preview", "openrouter/morph/morph-v3-large", "openrouter/x-ai/grok-4.1-fast", "openrouter/openai/gpt-oss-120b", "openrouter/deepseek/deepseek-chat-v3.1"]>>>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
executionLogs: unknown[];
|
|
45
|
+
executionId: number;
|
|
46
|
+
model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/x-ai/grok-4.1-fast" | "openrouter/openai/gpt-oss-120b" | "openrouter/deepseek/deepseek-chat-v3.1";
|
|
47
|
+
workflowCode: string;
|
|
48
|
+
bubbleFlowId: number;
|
|
49
|
+
}, {
|
|
50
|
+
executionLogs: unknown[];
|
|
51
|
+
executionId: number;
|
|
52
|
+
workflowCode: string;
|
|
53
|
+
bubbleFlowId: number;
|
|
54
|
+
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/x-ai/grok-4.1-fast" | "openrouter/openai/gpt-oss-120b" | "openrouter/deepseek/deepseek-chat-v3.1" | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Response schema for Rice evaluation agent
|
|
58
|
+
*/
|
|
59
|
+
export declare const RiceResponseSchema: z.ZodObject<{
|
|
60
|
+
success: z.ZodBoolean;
|
|
61
|
+
evaluation: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
working: z.ZodBoolean;
|
|
63
|
+
issueType: z.ZodNullable<z.ZodEnum<["setup", "workflow", "input"]>>;
|
|
64
|
+
summary: z.ZodString;
|
|
65
|
+
rating: z.ZodNumber;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
summary: string;
|
|
68
|
+
working: boolean;
|
|
69
|
+
issueType: "workflow" | "input" | "setup" | null;
|
|
70
|
+
rating: number;
|
|
71
|
+
}, {
|
|
72
|
+
summary: string;
|
|
73
|
+
working: boolean;
|
|
74
|
+
issueType: "workflow" | "input" | "setup" | null;
|
|
75
|
+
rating: number;
|
|
76
|
+
}>>;
|
|
77
|
+
error: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
success: boolean;
|
|
80
|
+
error?: string | undefined;
|
|
81
|
+
evaluation?: {
|
|
82
|
+
summary: string;
|
|
83
|
+
working: boolean;
|
|
84
|
+
issueType: "workflow" | "input" | "setup" | null;
|
|
85
|
+
rating: number;
|
|
86
|
+
} | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
success: boolean;
|
|
89
|
+
error?: string | undefined;
|
|
90
|
+
evaluation?: {
|
|
91
|
+
summary: string;
|
|
92
|
+
working: boolean;
|
|
93
|
+
issueType: "workflow" | "input" | "setup" | null;
|
|
94
|
+
rating: number;
|
|
95
|
+
} | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
export type RiceEvaluationResult = z.infer<typeof RiceEvaluationResultSchema>;
|
|
98
|
+
export type RiceRequest = z.input<typeof RiceRequestSchema>;
|
|
99
|
+
export type RiceResponse = z.infer<typeof RiceResponseSchema>;
|
|
100
|
+
//# sourceMappingURL=rice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rice.d.ts","sourceRoot":"","sources":["../src/rice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAItE,eAAO,MAAM,kBAAkB,EAAE,cAAwC,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0DAEnB,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAyBrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAgB5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC;AAGH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAK9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type StorableValue = {
|
|
2
|
+
truncated: boolean;
|
|
3
|
+
preview: string | unknown;
|
|
4
|
+
sizeBytes: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Prepare an object for storage with a size cap. If the JSON stringified
|
|
8
|
+
* representation exceeds maxBytes, return a preview marker with metadata.
|
|
9
|
+
* Also logs a warning when truncation happens.
|
|
10
|
+
*
|
|
11
|
+
* Returns a consistent object structure when truncated to ensure compatibility
|
|
12
|
+
* with database schemas expecting JSON objects (jsonb/text with mode: 'json').
|
|
13
|
+
*/
|
|
14
|
+
export declare function prepareForStorage(value: unknown, options?: {
|
|
15
|
+
maxBytes?: number;
|
|
16
|
+
previewBytes?: number;
|
|
17
|
+
}): StorableValue;
|
|
18
|
+
export declare function cleanUpObjectForDisplayAndStorage(obj: unknown, maxBytes?: number): unknown;
|
|
19
|
+
//# sourceMappingURL=storage-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-utils.d.ts","sourceRoot":"","sources":["../src/storage-utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GACrD,aAAa,CA2Cf;AAED,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,OAAO,EACZ,QAAQ,GAAE,MAAoB,GAC7B,OAAO,CAMT"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for streaming log events between backend and frontend
|
|
3
|
+
*/
|
|
4
|
+
import type { CoffeeClarificationEvent, CoffeeContextEvent, CoffeePlanEvent, CoffeeRequestExternalContextEvent } from './coffee.js';
|
|
5
|
+
export interface StreamingLogEvent {
|
|
6
|
+
type: 'log_line' | 'bubble_instantiation' | 'bubble_execution' | 'bubble_start' | 'bubble_complete' | 'execution_complete' | 'error' | 'stream_complete' | 'info' | 'warn' | 'debug' | 'bubble_execution_complete' | 'trace' | 'fatal' | 'bubble_parameters_update' | 'tool_call_start' | 'tool_call_complete' | 'function_call_start' | 'function_call_complete' | 'start_evaluating' | 'end_evaluating' | 'browser_session_start' | 'browser_session_end';
|
|
7
|
+
timestamp: string;
|
|
8
|
+
lineNumber?: number;
|
|
9
|
+
variableId?: number;
|
|
10
|
+
message: string;
|
|
11
|
+
bubbleId?: string;
|
|
12
|
+
bubbleName?: string;
|
|
13
|
+
variableName?: string;
|
|
14
|
+
additionalData?: Record<string, unknown>;
|
|
15
|
+
executionTime?: number;
|
|
16
|
+
memoryUsage?: number;
|
|
17
|
+
logLevel?: string;
|
|
18
|
+
bubbleParameters?: Record<number, import('./bubble-definition-schema').ParsedBubbleWithInfo>;
|
|
19
|
+
toolCallId?: string;
|
|
20
|
+
toolName?: string;
|
|
21
|
+
toolInput?: unknown;
|
|
22
|
+
toolOutput?: unknown;
|
|
23
|
+
toolDuration?: number;
|
|
24
|
+
functionName?: string;
|
|
25
|
+
functionInput?: unknown;
|
|
26
|
+
functionOutput?: unknown;
|
|
27
|
+
functionDuration?: number;
|
|
28
|
+
tokenUsage?: {
|
|
29
|
+
inputTokens: number;
|
|
30
|
+
outputTokens: number;
|
|
31
|
+
totalTokens: number;
|
|
32
|
+
};
|
|
33
|
+
cumulativeTokenUsage?: {
|
|
34
|
+
inputTokens: number;
|
|
35
|
+
outputTokens: number;
|
|
36
|
+
totalTokens: number;
|
|
37
|
+
};
|
|
38
|
+
evaluationResult?: {
|
|
39
|
+
working: boolean;
|
|
40
|
+
issueType: 'setup' | 'workflow' | 'input' | null;
|
|
41
|
+
summary: string;
|
|
42
|
+
rating: number;
|
|
43
|
+
};
|
|
44
|
+
browserSessionUrl?: string;
|
|
45
|
+
browserSessionId?: string;
|
|
46
|
+
}
|
|
47
|
+
export type StreamingEvent = {
|
|
48
|
+
type: 'start';
|
|
49
|
+
data: {
|
|
50
|
+
message: string;
|
|
51
|
+
maxIterations: number;
|
|
52
|
+
timestamp: string;
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
55
|
+
type: 'llm_start';
|
|
56
|
+
data: {
|
|
57
|
+
model: string;
|
|
58
|
+
temperature: number;
|
|
59
|
+
};
|
|
60
|
+
} | {
|
|
61
|
+
type: 'token';
|
|
62
|
+
data: {
|
|
63
|
+
content: string;
|
|
64
|
+
messageId: string;
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
type: 'think';
|
|
68
|
+
data: {
|
|
69
|
+
content: string;
|
|
70
|
+
messageId: string;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
type: 'llm_complete';
|
|
74
|
+
data: {
|
|
75
|
+
messageId: string;
|
|
76
|
+
totalTokens?: number;
|
|
77
|
+
content?: string;
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
type: 'tool_start';
|
|
81
|
+
data: {
|
|
82
|
+
tool: string;
|
|
83
|
+
input: unknown;
|
|
84
|
+
callId: string;
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
type: 'tool_complete';
|
|
88
|
+
data: {
|
|
89
|
+
tool: string;
|
|
90
|
+
input: {
|
|
91
|
+
input: string;
|
|
92
|
+
};
|
|
93
|
+
output: unknown;
|
|
94
|
+
duration: number;
|
|
95
|
+
callId: string;
|
|
96
|
+
};
|
|
97
|
+
} | {
|
|
98
|
+
type: 'iteration_start';
|
|
99
|
+
data: {
|
|
100
|
+
iteration: number;
|
|
101
|
+
};
|
|
102
|
+
} | {
|
|
103
|
+
type: 'iteration_complete';
|
|
104
|
+
data: {
|
|
105
|
+
iteration: number;
|
|
106
|
+
hasToolCalls: boolean;
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
type: 'error';
|
|
110
|
+
data: {
|
|
111
|
+
error: string;
|
|
112
|
+
recoverable: boolean;
|
|
113
|
+
};
|
|
114
|
+
} | {
|
|
115
|
+
type: 'complete';
|
|
116
|
+
data: {
|
|
117
|
+
result: unknown;
|
|
118
|
+
totalDuration: number;
|
|
119
|
+
};
|
|
120
|
+
} | {
|
|
121
|
+
type: 'coffee_clarification';
|
|
122
|
+
data: CoffeeClarificationEvent;
|
|
123
|
+
} | {
|
|
124
|
+
type: 'coffee_context_gathering';
|
|
125
|
+
data: CoffeeContextEvent;
|
|
126
|
+
} | {
|
|
127
|
+
type: 'coffee_request_context';
|
|
128
|
+
data: CoffeeRequestExternalContextEvent;
|
|
129
|
+
} | {
|
|
130
|
+
type: 'coffee_plan';
|
|
131
|
+
data: CoffeePlanEvent;
|
|
132
|
+
} | {
|
|
133
|
+
type: 'coffee_complete';
|
|
134
|
+
data: {
|
|
135
|
+
success: boolean;
|
|
136
|
+
message?: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export type StreamCallback = (event: StreamingLogEvent) => void | Promise<void>;
|
|
140
|
+
//# sourceMappingURL=streaming-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-events.d.ts","sourceRoot":"","sources":["../src/streaming-events.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,iCAAiC,EAClC,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EACA,UAAU,GACV,sBAAsB,GACtB,kBAAkB,GAClB,cAAc,GACd,iBAAiB,GACjB,oBAAoB,GACpB,OAAO,GACP,iBAAiB,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,2BAA2B,GAC3B,OAAO,GACP,OAAO,GACP,0BAA0B,GAC1B,iBAAiB,GACjB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,GAClB,gBAAgB,GAChB,uBAAuB,GACvB,qBAAqB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA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;CACpD,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GAChE;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CAClD,GAED;IACE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,IAAI,EAAE,wBAAwB,CAAC;CAChC,GACD;IACE,IAAI,EAAE,0BAA0B,CAAC;IACjC,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GACD;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,iCAAiC,CAAC;CACzC,GACD;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,eAAe,CAAC;CACvB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C,CAAC;AAEN,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { z } from '@hono/zod-openapi';
|
|
2
|
+
export declare const hackathonOfferSchema: z.ZodObject<{
|
|
3
|
+
isActive: z.ZodBoolean;
|
|
4
|
+
expiresAt: z.ZodString;
|
|
5
|
+
redeemedAt: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
expiresAt: string;
|
|
9
|
+
redeemedAt: string;
|
|
10
|
+
}, {
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
expiresAt: string;
|
|
13
|
+
redeemedAt: string;
|
|
14
|
+
}>;
|
|
15
|
+
export type HackathonOffer = z.infer<typeof hackathonOfferSchema>;
|
|
16
|
+
export declare const specialOfferSchema: z.ZodObject<{
|
|
17
|
+
isActive: z.ZodBoolean;
|
|
18
|
+
plan: z.ZodString;
|
|
19
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
isActive: boolean;
|
|
22
|
+
plan: string;
|
|
23
|
+
expiresAt: string | null;
|
|
24
|
+
}, {
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
plan: string;
|
|
27
|
+
expiresAt: string | null;
|
|
28
|
+
}>;
|
|
29
|
+
export type SpecialOffer = z.infer<typeof specialOfferSchema>;
|
|
30
|
+
export declare const redeemCouponRequestSchema: z.ZodObject<{
|
|
31
|
+
code: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
code: string;
|
|
34
|
+
}, {
|
|
35
|
+
code: string;
|
|
36
|
+
}>;
|
|
37
|
+
export type RedeemCouponRequest = z.infer<typeof redeemCouponRequestSchema>;
|
|
38
|
+
export declare const redeemCouponResponseSchema: z.ZodObject<{
|
|
39
|
+
success: z.ZodBoolean;
|
|
40
|
+
message: z.ZodString;
|
|
41
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
message: string;
|
|
44
|
+
success: boolean;
|
|
45
|
+
expiresAt?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
message: string;
|
|
48
|
+
success: boolean;
|
|
49
|
+
expiresAt?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export type RedeemCouponResponse = z.infer<typeof redeemCouponResponseSchema>;
|
|
52
|
+
export declare const subscriptionStatusResponseSchema: z.ZodObject<{
|
|
53
|
+
userId: z.ZodString;
|
|
54
|
+
plan: z.ZodString;
|
|
55
|
+
planDisplayName: z.ZodString;
|
|
56
|
+
features: z.ZodArray<z.ZodString, "many">;
|
|
57
|
+
usage: z.ZodObject<{
|
|
58
|
+
executionCount: z.ZodNumber;
|
|
59
|
+
executionLimit: z.ZodNumber;
|
|
60
|
+
creditLimit: z.ZodNumber;
|
|
61
|
+
activeFlowLimit: z.ZodNumber;
|
|
62
|
+
estimatedMonthlyCost: z.ZodNumber;
|
|
63
|
+
resetDate: z.ZodString;
|
|
64
|
+
tokenUsage: z.ZodArray<z.ZodObject<{
|
|
65
|
+
modelName: z.ZodString;
|
|
66
|
+
inputTokens: z.ZodNumber;
|
|
67
|
+
outputTokens: z.ZodNumber;
|
|
68
|
+
totalTokens: z.ZodNumber;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
modelName: string;
|
|
71
|
+
inputTokens: number;
|
|
72
|
+
outputTokens: number;
|
|
73
|
+
totalTokens: number;
|
|
74
|
+
}, {
|
|
75
|
+
modelName: string;
|
|
76
|
+
inputTokens: number;
|
|
77
|
+
outputTokens: number;
|
|
78
|
+
totalTokens: number;
|
|
79
|
+
}>, "many">;
|
|
80
|
+
serviceUsage: z.ZodArray<z.ZodObject<{
|
|
81
|
+
service: z.ZodNativeEnum<typeof import("./types").CredentialType>;
|
|
82
|
+
subService: z.ZodOptional<z.ZodString>;
|
|
83
|
+
unit: z.ZodString;
|
|
84
|
+
usage: z.ZodNumber;
|
|
85
|
+
unitCost: z.ZodNumber;
|
|
86
|
+
totalCost: z.ZodNumber;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
service: import("./types").CredentialType;
|
|
89
|
+
unit: string;
|
|
90
|
+
usage: number;
|
|
91
|
+
unitCost: number;
|
|
92
|
+
totalCost: number;
|
|
93
|
+
subService?: string | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
service: import("./types").CredentialType;
|
|
96
|
+
unit: string;
|
|
97
|
+
usage: number;
|
|
98
|
+
unitCost: number;
|
|
99
|
+
totalCost: number;
|
|
100
|
+
subService?: string | undefined;
|
|
101
|
+
}>, "many">;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
serviceUsage: {
|
|
104
|
+
service: import("./types").CredentialType;
|
|
105
|
+
unit: string;
|
|
106
|
+
usage: number;
|
|
107
|
+
unitCost: number;
|
|
108
|
+
totalCost: number;
|
|
109
|
+
subService?: string | undefined;
|
|
110
|
+
}[];
|
|
111
|
+
executionCount: number;
|
|
112
|
+
executionLimit: number;
|
|
113
|
+
creditLimit: number;
|
|
114
|
+
activeFlowLimit: number;
|
|
115
|
+
estimatedMonthlyCost: number;
|
|
116
|
+
resetDate: string;
|
|
117
|
+
tokenUsage: {
|
|
118
|
+
modelName: string;
|
|
119
|
+
inputTokens: number;
|
|
120
|
+
outputTokens: number;
|
|
121
|
+
totalTokens: number;
|
|
122
|
+
}[];
|
|
123
|
+
}, {
|
|
124
|
+
serviceUsage: {
|
|
125
|
+
service: import("./types").CredentialType;
|
|
126
|
+
unit: string;
|
|
127
|
+
usage: number;
|
|
128
|
+
unitCost: number;
|
|
129
|
+
totalCost: number;
|
|
130
|
+
subService?: string | undefined;
|
|
131
|
+
}[];
|
|
132
|
+
executionCount: number;
|
|
133
|
+
executionLimit: number;
|
|
134
|
+
creditLimit: number;
|
|
135
|
+
activeFlowLimit: number;
|
|
136
|
+
estimatedMonthlyCost: number;
|
|
137
|
+
resetDate: string;
|
|
138
|
+
tokenUsage: {
|
|
139
|
+
modelName: string;
|
|
140
|
+
inputTokens: number;
|
|
141
|
+
outputTokens: number;
|
|
142
|
+
totalTokens: number;
|
|
143
|
+
}[];
|
|
144
|
+
}>;
|
|
145
|
+
isActive: z.ZodBoolean;
|
|
146
|
+
hackathonOffer: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
isActive: z.ZodBoolean;
|
|
148
|
+
expiresAt: z.ZodString;
|
|
149
|
+
redeemedAt: z.ZodString;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
isActive: boolean;
|
|
152
|
+
expiresAt: string;
|
|
153
|
+
redeemedAt: string;
|
|
154
|
+
}, {
|
|
155
|
+
isActive: boolean;
|
|
156
|
+
expiresAt: string;
|
|
157
|
+
redeemedAt: string;
|
|
158
|
+
}>>;
|
|
159
|
+
specialOffer: z.ZodOptional<z.ZodObject<{
|
|
160
|
+
isActive: z.ZodBoolean;
|
|
161
|
+
plan: z.ZodString;
|
|
162
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
isActive: boolean;
|
|
165
|
+
plan: string;
|
|
166
|
+
expiresAt: string | null;
|
|
167
|
+
}, {
|
|
168
|
+
isActive: boolean;
|
|
169
|
+
plan: string;
|
|
170
|
+
expiresAt: string | null;
|
|
171
|
+
}>>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
usage: {
|
|
174
|
+
serviceUsage: {
|
|
175
|
+
service: import("./types").CredentialType;
|
|
176
|
+
unit: string;
|
|
177
|
+
usage: number;
|
|
178
|
+
unitCost: number;
|
|
179
|
+
totalCost: number;
|
|
180
|
+
subService?: string | undefined;
|
|
181
|
+
}[];
|
|
182
|
+
executionCount: number;
|
|
183
|
+
executionLimit: number;
|
|
184
|
+
creditLimit: number;
|
|
185
|
+
activeFlowLimit: number;
|
|
186
|
+
estimatedMonthlyCost: number;
|
|
187
|
+
resetDate: string;
|
|
188
|
+
tokenUsage: {
|
|
189
|
+
modelName: string;
|
|
190
|
+
inputTokens: number;
|
|
191
|
+
outputTokens: number;
|
|
192
|
+
totalTokens: number;
|
|
193
|
+
}[];
|
|
194
|
+
};
|
|
195
|
+
isActive: boolean;
|
|
196
|
+
plan: string;
|
|
197
|
+
userId: string;
|
|
198
|
+
planDisplayName: string;
|
|
199
|
+
features: string[];
|
|
200
|
+
hackathonOffer?: {
|
|
201
|
+
isActive: boolean;
|
|
202
|
+
expiresAt: string;
|
|
203
|
+
redeemedAt: string;
|
|
204
|
+
} | undefined;
|
|
205
|
+
specialOffer?: {
|
|
206
|
+
isActive: boolean;
|
|
207
|
+
plan: string;
|
|
208
|
+
expiresAt: string | null;
|
|
209
|
+
} | undefined;
|
|
210
|
+
}, {
|
|
211
|
+
usage: {
|
|
212
|
+
serviceUsage: {
|
|
213
|
+
service: import("./types").CredentialType;
|
|
214
|
+
unit: string;
|
|
215
|
+
usage: number;
|
|
216
|
+
unitCost: number;
|
|
217
|
+
totalCost: number;
|
|
218
|
+
subService?: string | undefined;
|
|
219
|
+
}[];
|
|
220
|
+
executionCount: number;
|
|
221
|
+
executionLimit: number;
|
|
222
|
+
creditLimit: number;
|
|
223
|
+
activeFlowLimit: number;
|
|
224
|
+
estimatedMonthlyCost: number;
|
|
225
|
+
resetDate: string;
|
|
226
|
+
tokenUsage: {
|
|
227
|
+
modelName: string;
|
|
228
|
+
inputTokens: number;
|
|
229
|
+
outputTokens: number;
|
|
230
|
+
totalTokens: number;
|
|
231
|
+
}[];
|
|
232
|
+
};
|
|
233
|
+
isActive: boolean;
|
|
234
|
+
plan: string;
|
|
235
|
+
userId: string;
|
|
236
|
+
planDisplayName: string;
|
|
237
|
+
features: string[];
|
|
238
|
+
hackathonOffer?: {
|
|
239
|
+
isActive: boolean;
|
|
240
|
+
expiresAt: string;
|
|
241
|
+
redeemedAt: string;
|
|
242
|
+
} | undefined;
|
|
243
|
+
specialOffer?: {
|
|
244
|
+
isActive: boolean;
|
|
245
|
+
plan: string;
|
|
246
|
+
expiresAt: string | null;
|
|
247
|
+
} | undefined;
|
|
248
|
+
}>;
|
|
249
|
+
export type SubscriptionStatusResponse = z.infer<typeof subscriptionStatusResponseSchema>;
|
|
250
|
+
//# sourceMappingURL=subscription-status-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-status-schema.d.ts","sourceRoot":"","sources":["../src/subscription-status-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAItC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAeL,CAAC;AAE7B,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAgBL,CAAC;AAE3B,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG9D,eAAO,MAAM,yBAAyB;;;;;;EAOL,CAAC;AAElC,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAG5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAeL,CAAC;AAEnC,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFL,CAAC;AAEzC,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
|