@bubblelab/shared-schemas 0.1.12 → 0.1.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/dist/index.d.ts +10076 -29
- package/dist/index.js +3328 -30
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/agent-memory.d.ts +0 -21
- package/dist/agent-memory.d.ts.map +0 -1
- package/dist/agent-memory.js +0 -11
- package/dist/agent-memory.js.map +0 -1
- package/dist/ai-models.d.ts +0 -4
- package/dist/ai-models.d.ts.map +0 -1
- package/dist/ai-models.js +0 -31
- package/dist/ai-models.js.map +0 -1
- package/dist/api-schema.d.ts +0 -38
- package/dist/api-schema.d.ts.map +0 -1
- package/dist/api-schema.js +0 -26
- package/dist/api-schema.js.map +0 -1
- package/dist/bubble-definition-schema.d.ts +0 -840
- package/dist/bubble-definition-schema.d.ts.map +0 -1
- package/dist/bubble-definition-schema.js +0 -299
- package/dist/bubble-definition-schema.js.map +0 -1
- package/dist/bubbleflow-execution-schema.d.ts +0 -1297
- package/dist/bubbleflow-execution-schema.d.ts.map +0 -1
- package/dist/bubbleflow-execution-schema.js +0 -360
- package/dist/bubbleflow-execution-schema.js.map +0 -1
- package/dist/bubbleflow-generation-prompts.d.ts +0 -8
- package/dist/bubbleflow-generation-prompts.d.ts.map +0 -1
- package/dist/bubbleflow-generation-prompts.js +0 -17
- package/dist/bubbleflow-generation-prompts.js.map +0 -1
- package/dist/bubbleflow-schema.d.ts +0 -2071
- package/dist/bubbleflow-schema.d.ts.map +0 -1
- package/dist/bubbleflow-schema.js +0 -336
- package/dist/bubbleflow-schema.js.map +0 -1
- package/dist/coffee.d.ts +0 -2201
- package/dist/coffee.d.ts.map +0 -1
- package/dist/coffee.js +0 -257
- package/dist/coffee.js.map +0 -1
- package/dist/credential-schema.d.ts +0 -574
- package/dist/credential-schema.d.ts.map +0 -1
- package/dist/credential-schema.js +0 -829
- package/dist/credential-schema.js.map +0 -1
- package/dist/cron-utils.d.ts +0 -47
- package/dist/cron-utils.d.ts.map +0 -1
- package/dist/cron-utils.js +0 -228
- package/dist/cron-utils.js.map +0 -1
- package/dist/database-definition-schema.d.ts +0 -97
- package/dist/database-definition-schema.d.ts.map +0 -1
- package/dist/database-definition-schema.js +0 -36
- package/dist/database-definition-schema.js.map +0 -1
- package/dist/error-enhancer.d.ts +0 -6
- package/dist/error-enhancer.d.ts.map +0 -1
- package/dist/error-enhancer.js +0 -88
- package/dist/error-enhancer.js.map +0 -1
- package/dist/generate-bubbleflow-schema.d.ts +0 -1525
- package/dist/generate-bubbleflow-schema.d.ts.map +0 -1
- package/dist/generate-bubbleflow-schema.js +0 -304
- package/dist/generate-bubbleflow-schema.js.map +0 -1
- package/dist/hash-utils.d.ts +0 -26
- package/dist/hash-utils.d.ts.map +0 -1
- package/dist/hash-utils.js +0 -37
- package/dist/hash-utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/milk-tea.d.ts +0 -106
- package/dist/milk-tea.d.ts.map +0 -1
- package/dist/milk-tea.js +0 -71
- package/dist/milk-tea.js.map +0 -1
- package/dist/mock-data-generator.d.ts +0 -51
- package/dist/mock-data-generator.d.ts.map +0 -1
- package/dist/mock-data-generator.js +0 -335
- package/dist/mock-data-generator.js.map +0 -1
- package/dist/oauth-schema.d.ts +0 -61
- package/dist/oauth-schema.d.ts.map +0 -1
- package/dist/oauth-schema.js +0 -75
- package/dist/oauth-schema.js.map +0 -1
- package/dist/param-utils.d.ts +0 -10
- package/dist/param-utils.d.ts.map +0 -1
- package/dist/param-utils.js +0 -13
- package/dist/param-utils.js.map +0 -1
- package/dist/pearl.d.ts +0 -346
- package/dist/pearl.d.ts.map +0 -1
- package/dist/pearl.js +0 -90
- package/dist/pearl.js.map +0 -1
- package/dist/rice.d.ts +0 -100
- package/dist/rice.d.ts.map +0 -1
- package/dist/rice.js +0 -65
- package/dist/rice.js.map +0 -1
- package/dist/storage-utils.d.ts +0 -19
- package/dist/storage-utils.d.ts.map +0 -1
- package/dist/storage-utils.js +0 -54
- package/dist/storage-utils.js.map +0 -1
- package/dist/streaming-events.d.ts +0 -140
- package/dist/streaming-events.d.ts.map +0 -1
- package/dist/streaming-events.js +0 -5
- package/dist/streaming-events.js.map +0 -1
- package/dist/subscription-status-schema.d.ts +0 -250
- package/dist/subscription-status-schema.d.ts.map +0 -1
- package/dist/subscription-status-schema.js +0 -144
- package/dist/subscription-status-schema.js.map +0 -1
- package/dist/trigger.d.ts +0 -113
- package/dist/trigger.d.ts.map +0 -1
- package/dist/trigger.js +0 -12
- package/dist/trigger.js.map +0 -1
- package/dist/types.d.ts +0 -31
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -47
- package/dist/types.js.map +0 -1
- package/dist/waitlist-schema.d.ts +0 -30
- package/dist/waitlist-schema.d.ts.map +0 -1
- package/dist/waitlist-schema.js +0 -39
- package/dist/waitlist-schema.js.map +0 -1
- package/dist/webhook-schema.d.ts +0 -95
- package/dist/webhook-schema.d.ts.map +0 -1
- package/dist/webhook-schema.js +0 -50
- package/dist/webhook-schema.js.map +0 -1
package/dist/storage-utils.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prepare an object for storage with a size cap. If the JSON stringified
|
|
3
|
-
* representation exceeds maxBytes, return a preview marker with metadata.
|
|
4
|
-
* Also logs a warning when truncation happens.
|
|
5
|
-
*
|
|
6
|
-
* Returns a consistent object structure when truncated to ensure compatibility
|
|
7
|
-
* with database schemas expecting JSON objects (jsonb/text with mode: 'json').
|
|
8
|
-
*/
|
|
9
|
-
export function prepareForStorage(value, options) {
|
|
10
|
-
const maxBytes = options?.maxBytes ?? 1024 * 1024; // 1MB
|
|
11
|
-
const previewBytes = options?.previewBytes ?? 4096; // 4KB
|
|
12
|
-
try {
|
|
13
|
-
const json = JSON.stringify(value);
|
|
14
|
-
// Compute byte length in a way that works in both browser and Node
|
|
15
|
-
const sizeBytes = typeof TextEncoder !== 'undefined'
|
|
16
|
-
? new TextEncoder().encode(json).length
|
|
17
|
-
: (globalThis.Buffer?.byteLength?.(json, 'utf8') ??
|
|
18
|
-
json.length);
|
|
19
|
-
if (sizeBytes > maxBytes) {
|
|
20
|
-
// eslint-disable-next-line no-console
|
|
21
|
-
console.warn(`[prepareForStorage] Size ${sizeBytes} > ${maxBytes}. Storing preview only.`);
|
|
22
|
-
// Use Buffer.slice to ensure we slice at byte boundaries, not character boundaries
|
|
23
|
-
// This prevents splitting multi-byte UTF-8 characters
|
|
24
|
-
const previewBuffer = json.slice(0, previewBytes) + '....truncated due to size limit';
|
|
25
|
-
return {
|
|
26
|
-
truncated: true,
|
|
27
|
-
preview: previewBuffer,
|
|
28
|
-
sizeBytes,
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
truncated: false,
|
|
33
|
-
preview: value,
|
|
34
|
-
sizeBytes: 0,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
catch (_err) {
|
|
38
|
-
// eslint-disable-next-line no-console
|
|
39
|
-
console.warn('[prepareForStorage] Failed to serialize value for size check. Storing preview only.');
|
|
40
|
-
return {
|
|
41
|
-
truncated: true,
|
|
42
|
-
preview: '',
|
|
43
|
-
sizeBytes: 0,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
export function cleanUpObjectForDisplayAndStorage(obj, maxBytes = 1024 * 1024) {
|
|
48
|
-
const storageResult = prepareForStorage(obj, { maxBytes });
|
|
49
|
-
if (storageResult.truncated) {
|
|
50
|
-
return storageResult.preview;
|
|
51
|
-
}
|
|
52
|
-
return obj;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=storage-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage-utils.js","sourceRoot":"","sources":["../src/storage-utils.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAc,EACd,OAAsD;IAEt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,IAAI;IAE9B,MAAM,aAAa,GAAG,iBAAiB,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,aAAa,CAAC,SAAS,EAAE,CAAC;QAC5B,OAAO,aAAa,CAAC,OAAO,CAAC;IAC/B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,140 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streaming-events.d.ts","sourceRoot":"","sources":["../src/streaming-events.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,K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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"}
|
package/dist/streaming-events.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streaming-events.js","sourceRoot":"","sources":["../src/streaming-events.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,250 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { z } from '@hono/zod-openapi';
|
|
2
|
-
import { ServiceUsageSchema } from './bubbleflow-execution-schema';
|
|
3
|
-
// Hackathon offer schema for promotional code redemptions
|
|
4
|
-
export const hackathonOfferSchema = z
|
|
5
|
-
.object({
|
|
6
|
-
isActive: z.boolean().openapi({
|
|
7
|
-
description: 'Whether a hackathon offer is currently active',
|
|
8
|
-
example: true,
|
|
9
|
-
}),
|
|
10
|
-
expiresAt: z.string().openapi({
|
|
11
|
-
description: 'ISO date when the hackathon offer expires',
|
|
12
|
-
example: '2025-01-15T14:30:00.000Z',
|
|
13
|
-
}),
|
|
14
|
-
redeemedAt: z.string().openapi({
|
|
15
|
-
description: 'ISO date when the code was redeemed',
|
|
16
|
-
example: '2025-01-14T14:30:00.000Z',
|
|
17
|
-
}),
|
|
18
|
-
})
|
|
19
|
-
.openapi('HackathonOffer');
|
|
20
|
-
// Special offer schema for private metadata overrides (exclusive members)
|
|
21
|
-
export const specialOfferSchema = z
|
|
22
|
-
.object({
|
|
23
|
-
isActive: z.boolean().openapi({
|
|
24
|
-
description: 'Whether a special offer is currently active',
|
|
25
|
-
example: true,
|
|
26
|
-
}),
|
|
27
|
-
plan: z.string().openapi({
|
|
28
|
-
description: 'The plan granted by the special offer',
|
|
29
|
-
example: 'unlimited',
|
|
30
|
-
}),
|
|
31
|
-
expiresAt: z.string().nullable().openapi({
|
|
32
|
-
description: 'ISO date when the special offer expires (null = never expires)',
|
|
33
|
-
example: '2025-06-15T14:30:00.000Z',
|
|
34
|
-
}),
|
|
35
|
-
})
|
|
36
|
-
.openapi('SpecialOffer');
|
|
37
|
-
// Coupon redemption request schema
|
|
38
|
-
export const redeemCouponRequestSchema = z
|
|
39
|
-
.object({
|
|
40
|
-
code: z.string().min(1).openapi({
|
|
41
|
-
description: 'The coupon code to redeem',
|
|
42
|
-
example: 'HACKATHON2025',
|
|
43
|
-
}),
|
|
44
|
-
})
|
|
45
|
-
.openapi('RedeemCouponRequest');
|
|
46
|
-
// Coupon redemption response schema
|
|
47
|
-
export const redeemCouponResponseSchema = z
|
|
48
|
-
.object({
|
|
49
|
-
success: z.boolean().openapi({
|
|
50
|
-
description: 'Whether the redemption was successful',
|
|
51
|
-
example: true,
|
|
52
|
-
}),
|
|
53
|
-
message: z.string().openapi({
|
|
54
|
-
description: 'Human-readable message about the redemption result',
|
|
55
|
-
example: 'Coupon redeemed successfully! You now have Pro access.',
|
|
56
|
-
}),
|
|
57
|
-
expiresAt: z.string().optional().openapi({
|
|
58
|
-
description: 'When the offer expires (if successful)',
|
|
59
|
-
example: '2025-01-15T14:30:00.000Z',
|
|
60
|
-
}),
|
|
61
|
-
})
|
|
62
|
-
.openapi('RedeemCouponResponse');
|
|
63
|
-
export const subscriptionStatusResponseSchema = z
|
|
64
|
-
.object({
|
|
65
|
-
userId: z.string().openapi({
|
|
66
|
-
description: 'User ID from Clerk',
|
|
67
|
-
example: 'user_30Gbwrzto1VZvAHcGUm5NLQhpkp',
|
|
68
|
-
}),
|
|
69
|
-
plan: z.string().openapi({
|
|
70
|
-
description: 'Current subscription plan',
|
|
71
|
-
example: 'pro_plus',
|
|
72
|
-
}),
|
|
73
|
-
planDisplayName: z.string().openapi({
|
|
74
|
-
description: 'Human-readable plan name',
|
|
75
|
-
example: 'Pro Plus',
|
|
76
|
-
}),
|
|
77
|
-
features: z.array(z.string()).openapi({
|
|
78
|
-
description: 'List of features available to the user',
|
|
79
|
-
example: ['unlimited_usage', 'priority_support'],
|
|
80
|
-
}),
|
|
81
|
-
usage: z.object({
|
|
82
|
-
executionCount: z.number().openapi({
|
|
83
|
-
description: 'Current monthly execution count',
|
|
84
|
-
example: 100,
|
|
85
|
-
}),
|
|
86
|
-
executionLimit: z.number().openapi({
|
|
87
|
-
description: 'Current monthly execution limit',
|
|
88
|
-
example: 42,
|
|
89
|
-
}),
|
|
90
|
-
creditLimit: z.number().openapi({
|
|
91
|
-
description: 'Monthly credit limit',
|
|
92
|
-
example: 100,
|
|
93
|
-
}),
|
|
94
|
-
activeFlowLimit: z.number().openapi({
|
|
95
|
-
description: 'Current monthly active flow limit',
|
|
96
|
-
example: 2,
|
|
97
|
-
}),
|
|
98
|
-
estimatedMonthlyCost: z.number().openapi({
|
|
99
|
-
description: 'Projected monthly cost based on current usage trend',
|
|
100
|
-
example: 14.19,
|
|
101
|
-
}),
|
|
102
|
-
resetDate: z.string().openapi({
|
|
103
|
-
description: 'ISO date when usage resets',
|
|
104
|
-
example: '2025-02-01T00:00:00.000Z',
|
|
105
|
-
}),
|
|
106
|
-
tokenUsage: z
|
|
107
|
-
.array(z.object({
|
|
108
|
-
modelName: z.string().openapi({
|
|
109
|
-
description: 'Model name',
|
|
110
|
-
example: 'gpt-4',
|
|
111
|
-
}),
|
|
112
|
-
inputTokens: z.number().openapi({
|
|
113
|
-
description: 'Input tokens used this month',
|
|
114
|
-
example: 1500,
|
|
115
|
-
}),
|
|
116
|
-
outputTokens: z.number().openapi({
|
|
117
|
-
description: 'Output tokens used this month',
|
|
118
|
-
example: 750,
|
|
119
|
-
}),
|
|
120
|
-
totalTokens: z.number().openapi({
|
|
121
|
-
description: 'Total tokens used this month',
|
|
122
|
-
example: 2250,
|
|
123
|
-
}),
|
|
124
|
-
}))
|
|
125
|
-
.openapi({
|
|
126
|
-
description: 'Token usage breakdown by model for current month',
|
|
127
|
-
}),
|
|
128
|
-
serviceUsage: z.array(ServiceUsageSchema).openapi({
|
|
129
|
-
description: 'Service usage and cost breakdown for current month',
|
|
130
|
-
}),
|
|
131
|
-
}),
|
|
132
|
-
isActive: z.boolean().openapi({
|
|
133
|
-
description: 'Whether the subscription is active',
|
|
134
|
-
example: true,
|
|
135
|
-
}),
|
|
136
|
-
hackathonOffer: hackathonOfferSchema.optional().openapi({
|
|
137
|
-
description: 'Active hackathon promotional offer information',
|
|
138
|
-
}),
|
|
139
|
-
specialOffer: specialOfferSchema.optional().openapi({
|
|
140
|
-
description: 'Special offer from private metadata (takes precedence over hackathon offer)',
|
|
141
|
-
}),
|
|
142
|
-
})
|
|
143
|
-
.openapi('SubscriptionStatusResponse');
|
|
144
|
-
//# sourceMappingURL=subscription-status-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-status-schema.js","sourceRoot":"","sources":["../src/subscription-status-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;QAC5B,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,IAAI;KACd,CAAC;IACF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;QAC5B,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,0BAA0B;KACpC,CAAC;IACF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;QAC7B,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,0BAA0B;KACpC,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