@quiverai/sdk 0.8.0 → 0.8.1
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/commonjs/funcs/createSVGsGenerateSVG.js +1 -1
- package/dist/commonjs/funcs/createSVGsGenerateSVG.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModel.js +1 -1
- package/dist/commonjs/funcs/modelsGetModel.js.map +1 -1
- package/dist/commonjs/funcs/modelsListModels.js +1 -1
- package/dist/commonjs/funcs/modelsListModels.js.map +1 -1
- package/dist/commonjs/funcs/vectorizeSVGVectorizeSVG.js +1 -4
- package/dist/commonjs/funcs/vectorizeSVGVectorizeSVG.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/sdk/models/shared/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +1 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/publicerrorenvelope.d.ts +8 -3
- package/dist/commonjs/sdk/models/shared/publicerrorenvelope.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/publicerrorenvelope.js +8 -3
- package/dist/commonjs/sdk/models/shared/publicerrorenvelope.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/publicerrorsseeventdata.d.ts +40 -0
- package/dist/commonjs/sdk/models/shared/publicerrorsseeventdata.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/publicerrorsseeventdata.js +82 -0
- package/dist/commonjs/sdk/models/shared/publicerrorsseeventdata.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/svgstreamevent.d.ts +25 -6
- package/dist/commonjs/sdk/models/shared/svgstreamevent.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/svgstreamevent.js +30 -6
- package/dist/commonjs/sdk/models/shared/svgstreamevent.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/svgstreameventdata.d.ts +4 -1
- package/dist/commonjs/sdk/models/shared/svgstreameventdata.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/svgstreameventdata.js +2 -0
- package/dist/commonjs/sdk/models/shared/svgstreameventdata.js.map +1 -1
- package/dist/esm/funcs/createSVGsGenerateSVG.js +1 -1
- package/dist/esm/funcs/createSVGsGenerateSVG.js.map +1 -1
- package/dist/esm/funcs/modelsGetModel.js +1 -1
- package/dist/esm/funcs/modelsGetModel.js.map +1 -1
- package/dist/esm/funcs/modelsListModels.js +1 -1
- package/dist/esm/funcs/modelsListModels.js.map +1 -1
- package/dist/esm/funcs/vectorizeSVGVectorizeSVG.js +1 -4
- package/dist/esm/funcs/vectorizeSVGVectorizeSVG.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/sdk/models/shared/index.d.ts +1 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +1 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/publicerrorenvelope.d.ts +8 -3
- package/dist/esm/sdk/models/shared/publicerrorenvelope.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/publicerrorenvelope.js +8 -3
- package/dist/esm/sdk/models/shared/publicerrorenvelope.js.map +1 -1
- package/dist/esm/sdk/models/shared/publicerrorsseeventdata.d.ts +40 -0
- package/dist/esm/sdk/models/shared/publicerrorsseeventdata.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/publicerrorsseeventdata.js +45 -0
- package/dist/esm/sdk/models/shared/publicerrorsseeventdata.js.map +1 -0
- package/dist/esm/sdk/models/shared/svgstreamevent.d.ts +25 -6
- package/dist/esm/sdk/models/shared/svgstreamevent.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/svgstreamevent.js +28 -5
- package/dist/esm/sdk/models/shared/svgstreamevent.js.map +1 -1
- package/dist/esm/sdk/models/shared/svgstreameventdata.d.ts +4 -1
- package/dist/esm/sdk/models/shared/svgstreameventdata.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/svgstreameventdata.js +2 -0
- package/dist/esm/sdk/models/shared/svgstreameventdata.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/createSVGsGenerateSVG.ts +2 -2
- package/src/funcs/modelsGetModel.ts +2 -2
- package/src/funcs/modelsListModels.ts +2 -2
- package/src/funcs/vectorizeSVGVectorizeSVG.ts +6 -5
- package/src/lib/config.ts +3 -3
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/publicerrorenvelope.ts +8 -3
- package/src/sdk/models/shared/publicerrorsseeventdata.ts +80 -0
- package/src/sdk/models/shared/svgstreamevent.ts +59 -11
- package/src/sdk/models/shared/svgstreameventdata.ts +8 -0
|
@@ -175,11 +175,11 @@ async function $do(
|
|
|
175
175
|
key: "Result",
|
|
176
176
|
}),
|
|
177
177
|
M.json(
|
|
178
|
-
[400, 401, 402, 403, 404, 429],
|
|
178
|
+
[400, 401, 402, 403, 404, 408, 413, 429],
|
|
179
179
|
operations.GenerateSVGResponse$inboundSchema,
|
|
180
180
|
{ hdrs: true, key: "Result" },
|
|
181
181
|
),
|
|
182
|
-
M.json(500, operations.GenerateSVGResponse$inboundSchema, {
|
|
182
|
+
M.json([500, 502, 503, 504], operations.GenerateSVGResponse$inboundSchema, {
|
|
183
183
|
hdrs: true,
|
|
184
184
|
key: "Result",
|
|
185
185
|
}),
|
|
@@ -164,11 +164,11 @@ async function $do(
|
|
|
164
164
|
key: "Result",
|
|
165
165
|
}),
|
|
166
166
|
M.json(
|
|
167
|
-
[400, 401, 402, 403, 404, 429],
|
|
167
|
+
[400, 401, 402, 403, 404, 408, 413, 429],
|
|
168
168
|
operations.GetModelResponse$inboundSchema,
|
|
169
169
|
{ hdrs: true, key: "Result" },
|
|
170
170
|
),
|
|
171
|
-
M.json(500, operations.GetModelResponse$inboundSchema, {
|
|
171
|
+
M.json([500, 502, 503, 504], operations.GetModelResponse$inboundSchema, {
|
|
172
172
|
hdrs: true,
|
|
173
173
|
key: "Result",
|
|
174
174
|
}),
|
|
@@ -141,11 +141,11 @@ async function $do(
|
|
|
141
141
|
key: "Result",
|
|
142
142
|
}),
|
|
143
143
|
M.json(
|
|
144
|
-
[400, 401, 402, 403, 429],
|
|
144
|
+
[400, 401, 402, 403, 408, 413, 429],
|
|
145
145
|
operations.ListModelsResponse$inboundSchema,
|
|
146
146
|
{ hdrs: true, key: "Result" },
|
|
147
147
|
),
|
|
148
|
-
M.json(500, operations.ListModelsResponse$inboundSchema, {
|
|
148
|
+
M.json([500, 502, 503, 504], operations.ListModelsResponse$inboundSchema, {
|
|
149
149
|
hdrs: true,
|
|
150
150
|
key: "Result",
|
|
151
151
|
}),
|
|
@@ -175,14 +175,15 @@ async function $do(
|
|
|
175
175
|
key: "Result",
|
|
176
176
|
}),
|
|
177
177
|
M.json(
|
|
178
|
-
[400, 401, 402, 403, 404, 429],
|
|
178
|
+
[400, 401, 402, 403, 404, 408, 413, 429],
|
|
179
|
+
operations.VectorizeSVGResponse$inboundSchema,
|
|
180
|
+
{ hdrs: true, key: "Result" },
|
|
181
|
+
),
|
|
182
|
+
M.json(
|
|
183
|
+
[500, 502, 503, 504],
|
|
179
184
|
operations.VectorizeSVGResponse$inboundSchema,
|
|
180
185
|
{ hdrs: true, key: "Result" },
|
|
181
186
|
),
|
|
182
|
-
M.json(500, operations.VectorizeSVGResponse$inboundSchema, {
|
|
183
|
-
hdrs: true,
|
|
184
|
-
key: "Result",
|
|
185
|
-
}),
|
|
186
187
|
)(response, req, { extraFields: responseFields });
|
|
187
188
|
if (!result.ok) {
|
|
188
189
|
return [result, { status: "complete", request: req, response }];
|
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "1.0.0",
|
|
64
|
-
sdkVersion: "0.8.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.8.
|
|
64
|
+
sdkVersion: "0.8.1",
|
|
65
|
+
genVersion: "2.904.2",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.8.1 2.904.2 1.0.0 @quiverai/sdk",
|
|
67
67
|
} as const;
|
|
@@ -10,6 +10,7 @@ export * from "./imageinputreferenceurl.js";
|
|
|
10
10
|
export * from "./listmodelsresponse.js";
|
|
11
11
|
export * from "./model.js";
|
|
12
12
|
export * from "./publicerrorenvelope.js";
|
|
13
|
+
export * from "./publicerrorsseeventdata.js";
|
|
13
14
|
export * from "./security.js";
|
|
14
15
|
export * from "./svgattributes.js";
|
|
15
16
|
export * from "./svgcontenteventdata.js";
|
|
@@ -13,12 +13,17 @@ export const Code = {
|
|
|
13
13
|
InvalidRequest: "invalid_request",
|
|
14
14
|
InvalidApiKey: "invalid_api_key",
|
|
15
15
|
Unauthorized: "unauthorized",
|
|
16
|
-
RateLimitExceeded: "rate_limit_exceeded",
|
|
17
|
-
WeeklyLimitExceeded: "weekly_limit_exceeded",
|
|
18
16
|
InsufficientCredits: "insufficient_credits",
|
|
19
17
|
AccountFrozen: "account_frozen",
|
|
18
|
+
ContentPolicyViolation: "content_policy_violation",
|
|
20
19
|
ModelNotFound: "model_not_found",
|
|
21
|
-
|
|
20
|
+
PayloadTooLarge: "payload_too_large",
|
|
21
|
+
RequestTimeout: "request_timeout",
|
|
22
|
+
RateLimitExceeded: "rate_limit_exceeded",
|
|
23
|
+
WeeklyLimitExceeded: "weekly_limit_exceeded",
|
|
24
|
+
ServerError: "server_error",
|
|
25
|
+
ModelError: "model_error",
|
|
26
|
+
ModelUnavailable: "model_unavailable",
|
|
22
27
|
} as const;
|
|
23
28
|
export type Code = ClosedEnum<typeof Code>;
|
|
24
29
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const PublicErrorSseEventDataCode = {
|
|
13
|
+
InvalidRequest: "invalid_request",
|
|
14
|
+
InvalidApiKey: "invalid_api_key",
|
|
15
|
+
Unauthorized: "unauthorized",
|
|
16
|
+
InsufficientCredits: "insufficient_credits",
|
|
17
|
+
AccountFrozen: "account_frozen",
|
|
18
|
+
ContentPolicyViolation: "content_policy_violation",
|
|
19
|
+
ModelNotFound: "model_not_found",
|
|
20
|
+
PayloadTooLarge: "payload_too_large",
|
|
21
|
+
RequestTimeout: "request_timeout",
|
|
22
|
+
RateLimitExceeded: "rate_limit_exceeded",
|
|
23
|
+
WeeklyLimitExceeded: "weekly_limit_exceeded",
|
|
24
|
+
ServerError: "server_error",
|
|
25
|
+
ModelError: "model_error",
|
|
26
|
+
ModelUnavailable: "model_unavailable",
|
|
27
|
+
} as const;
|
|
28
|
+
export type PublicErrorSseEventDataCode = ClosedEnum<
|
|
29
|
+
typeof PublicErrorSseEventDataCode
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
export const Type = {
|
|
33
|
+
Error: "error",
|
|
34
|
+
} as const;
|
|
35
|
+
export type Type = ClosedEnum<typeof Type>;
|
|
36
|
+
|
|
37
|
+
export type PublicErrorSseEventData = {
|
|
38
|
+
code: PublicErrorSseEventDataCode;
|
|
39
|
+
message: string;
|
|
40
|
+
requestId: string;
|
|
41
|
+
status: number;
|
|
42
|
+
type: Type;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const PublicErrorSseEventDataCode$inboundSchema: z.ZodNativeEnum<
|
|
47
|
+
typeof PublicErrorSseEventDataCode
|
|
48
|
+
> = z.nativeEnum(PublicErrorSseEventDataCode);
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
|
|
52
|
+
Type,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const PublicErrorSseEventData$inboundSchema: z.ZodType<
|
|
57
|
+
PublicErrorSseEventData,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
unknown
|
|
60
|
+
> = z.object({
|
|
61
|
+
code: PublicErrorSseEventDataCode$inboundSchema,
|
|
62
|
+
message: z.string(),
|
|
63
|
+
request_id: z.string(),
|
|
64
|
+
status: z.number().int(),
|
|
65
|
+
type: Type$inboundSchema,
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
"request_id": "requestId",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function publicErrorSseEventDataFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<PublicErrorSseEventData, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => PublicErrorSseEventData$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'PublicErrorSseEventData' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -6,12 +6,16 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
PublicErrorSseEventData,
|
|
11
|
+
PublicErrorSseEventData$inboundSchema,
|
|
12
|
+
} from "./publicerrorsseeventdata.js";
|
|
9
13
|
import {
|
|
10
14
|
SvgStreamEventData,
|
|
11
15
|
SvgStreamEventData$inboundSchema,
|
|
12
16
|
} from "./svgstreameventdata.js";
|
|
13
17
|
|
|
14
|
-
export type
|
|
18
|
+
export type Five = {
|
|
15
19
|
/**
|
|
16
20
|
* The event payload. Shape depends on the `type` phase discriminator.
|
|
17
21
|
*/
|
|
@@ -30,7 +34,7 @@ export type Four = {
|
|
|
30
34
|
retry?: number | undefined;
|
|
31
35
|
};
|
|
32
36
|
|
|
33
|
-
export type
|
|
37
|
+
export type Four = {
|
|
34
38
|
/**
|
|
35
39
|
* The event payload. Shape depends on the `type` phase discriminator.
|
|
36
40
|
*/
|
|
@@ -49,7 +53,7 @@ export type Three = {
|
|
|
49
53
|
retry?: number | undefined;
|
|
50
54
|
};
|
|
51
55
|
|
|
52
|
-
export type
|
|
56
|
+
export type Three = {
|
|
53
57
|
/**
|
|
54
58
|
* The event payload. Shape depends on the `type` phase discriminator.
|
|
55
59
|
*/
|
|
@@ -68,7 +72,7 @@ export type Two = {
|
|
|
68
72
|
retry?: number | undefined;
|
|
69
73
|
};
|
|
70
74
|
|
|
71
|
-
export type
|
|
75
|
+
export type Two = {
|
|
72
76
|
/**
|
|
73
77
|
* The event payload. Shape depends on the `type` phase discriminator.
|
|
74
78
|
*/
|
|
@@ -87,13 +91,29 @@ export type One = {
|
|
|
87
91
|
retry?: number | undefined;
|
|
88
92
|
};
|
|
89
93
|
|
|
94
|
+
export type One = {
|
|
95
|
+
data: PublicErrorSseEventData;
|
|
96
|
+
/**
|
|
97
|
+
* The SSE event name (sent via the `event:` line).
|
|
98
|
+
*/
|
|
99
|
+
event: "error";
|
|
100
|
+
/**
|
|
101
|
+
* Optional SSE event id (sent via the `id:` line).
|
|
102
|
+
*/
|
|
103
|
+
id?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Optional SSE retry value in milliseconds (sent via the `retry:` line).
|
|
106
|
+
*/
|
|
107
|
+
retry?: number | undefined;
|
|
108
|
+
};
|
|
109
|
+
|
|
90
110
|
/**
|
|
91
|
-
* Server-sent event (SSE) envelope for SVG streaming operations. Each SSE message uses the `event:` line for the phase discriminator and the `data:` line for a JSON payload. For `n > 1`, events are interleaved: use `data.index` for output position and `data.id` as the stable per-output identifier. The stream terminates with `data: [DONE]`.
|
|
111
|
+
* Server-sent event (SSE) envelope for SVG streaming operations. Each SSE message uses the `event:` line for the phase discriminator and the `data:` line for a JSON payload. For `n > 1`, events are interleaved: use `data.index` for output position and `data.id` as the stable per-output identifier. Terminal failures emit `event: error` with public error data. The stream terminates with `data: [DONE]`.
|
|
92
112
|
*/
|
|
93
|
-
export type SvgStreamEvent = One | Two | Three | Four;
|
|
113
|
+
export type SvgStreamEvent = One | Two | Three | Four | Five;
|
|
94
114
|
|
|
95
115
|
/** @internal */
|
|
96
|
-
export const
|
|
116
|
+
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
97
117
|
.object({
|
|
98
118
|
data: z.unknown().transform((v, ctx) => {
|
|
99
119
|
if (typeof v !== "string") return v;
|
|
@@ -109,6 +129,33 @@ export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
|
|
|
109
129
|
retry: z.number().int().optional(),
|
|
110
130
|
});
|
|
111
131
|
|
|
132
|
+
export function fiveFromJSON(
|
|
133
|
+
jsonString: string,
|
|
134
|
+
): SafeParseResult<Five, SDKValidationError> {
|
|
135
|
+
return safeParse(
|
|
136
|
+
jsonString,
|
|
137
|
+
(x) => Five$inboundSchema.parse(JSON.parse(x)),
|
|
138
|
+
`Failed to parse 'Five' from JSON`,
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
|
|
144
|
+
.object({
|
|
145
|
+
data: z.unknown().transform((v, ctx) => {
|
|
146
|
+
if (typeof v !== "string") return v;
|
|
147
|
+
try {
|
|
148
|
+
return JSON.parse(v);
|
|
149
|
+
} catch (err) {
|
|
150
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
151
|
+
return z.NEVER;
|
|
152
|
+
}
|
|
153
|
+
}).pipe(SvgStreamEventData$inboundSchema),
|
|
154
|
+
event: z.literal("draft"),
|
|
155
|
+
id: z.string().optional(),
|
|
156
|
+
retry: z.number().int().optional(),
|
|
157
|
+
});
|
|
158
|
+
|
|
112
159
|
export function fourFromJSON(
|
|
113
160
|
jsonString: string,
|
|
114
161
|
): SafeParseResult<Four, SDKValidationError> {
|
|
@@ -131,7 +178,7 @@ export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
|
|
|
131
178
|
return z.NEVER;
|
|
132
179
|
}
|
|
133
180
|
}).pipe(SvgStreamEventData$inboundSchema),
|
|
134
|
-
event: z.literal("
|
|
181
|
+
event: z.literal("reasoning"),
|
|
135
182
|
id: z.string().optional(),
|
|
136
183
|
retry: z.number().int().optional(),
|
|
137
184
|
});
|
|
@@ -158,7 +205,7 @@ export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
|
|
|
158
205
|
return z.NEVER;
|
|
159
206
|
}
|
|
160
207
|
}).pipe(SvgStreamEventData$inboundSchema),
|
|
161
|
-
event: z.literal("
|
|
208
|
+
event: z.literal("generating"),
|
|
162
209
|
id: z.string().optional(),
|
|
163
210
|
retry: z.number().int().optional(),
|
|
164
211
|
});
|
|
@@ -184,8 +231,8 @@ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
|
|
|
184
231
|
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
185
232
|
return z.NEVER;
|
|
186
233
|
}
|
|
187
|
-
}).pipe(
|
|
188
|
-
event: z.literal("
|
|
234
|
+
}).pipe(PublicErrorSseEventData$inboundSchema),
|
|
235
|
+
event: z.literal("error"),
|
|
189
236
|
id: z.string().optional(),
|
|
190
237
|
retry: z.number().int().optional(),
|
|
191
238
|
});
|
|
@@ -210,6 +257,7 @@ export const SvgStreamEvent$inboundSchema: z.ZodType<
|
|
|
210
257
|
z.lazy(() => Two$inboundSchema),
|
|
211
258
|
z.lazy(() => Three$inboundSchema),
|
|
212
259
|
z.lazy(() => Four$inboundSchema),
|
|
260
|
+
z.lazy(() => Five$inboundSchema),
|
|
213
261
|
]);
|
|
214
262
|
|
|
215
263
|
export function svgStreamEventFromJSON(
|
|
@@ -6,6 +6,10 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
PublicErrorSseEventData,
|
|
11
|
+
PublicErrorSseEventData$inboundSchema,
|
|
12
|
+
} from "./publicerrorsseeventdata.js";
|
|
9
13
|
import {
|
|
10
14
|
SvgContentEventData,
|
|
11
15
|
SvgContentEventData$inboundSchema,
|
|
@@ -29,6 +33,7 @@ import {
|
|
|
29
33
|
export type SvgStreamEventData =
|
|
30
34
|
| SvgContentEventData
|
|
31
35
|
| SvgDraftEventData
|
|
36
|
+
| (PublicErrorSseEventData & { type: "error" })
|
|
32
37
|
| SvgGeneratingEventData
|
|
33
38
|
| SvgReasoningEventData;
|
|
34
39
|
|
|
@@ -40,6 +45,9 @@ export const SvgStreamEventData$inboundSchema: z.ZodType<
|
|
|
40
45
|
> = z.union([
|
|
41
46
|
SvgContentEventData$inboundSchema,
|
|
42
47
|
SvgDraftEventData$inboundSchema,
|
|
48
|
+
PublicErrorSseEventData$inboundSchema.and(
|
|
49
|
+
z.object({ type: z.literal("error") }),
|
|
50
|
+
),
|
|
43
51
|
SvgGeneratingEventData$inboundSchema,
|
|
44
52
|
SvgReasoningEventData$inboundSchema,
|
|
45
53
|
]);
|