@decartai/sdk 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/README.md +85 -1
- package/dist/create-client.d.ts +46 -0
- package/dist/create-client.js +106 -0
- package/dist/index.d.ts +8 -150
- package/dist/index.js +6 -116
- package/dist/index.react-native.d.ts +36 -0
- package/dist/index.react-native.js +9 -0
- package/dist/realtime/browser/glass-to-glass-diagnostics.js +27 -0
- package/dist/realtime/{observability → browser}/glass-to-glass.js +2 -19
- package/dist/realtime/browser/index.js +32 -0
- package/dist/realtime/{mirror-stream.js → browser/mirror-stream.js} +1 -1
- package/dist/realtime/{observability → browser}/pixel-marker.js +1 -1
- package/dist/realtime/{preflight.js → browser/preflight.js} +14 -108
- package/dist/realtime/browser/prepare-connection.js +39 -0
- package/dist/realtime/client.d.ts +11 -4
- package/dist/realtime/client.js +33 -37
- package/dist/realtime/livekit.js +26 -0
- package/dist/realtime/media-channel.js +17 -10
- package/dist/realtime/methods.d.ts +1 -1
- package/dist/realtime/methods.js +3 -2
- package/dist/realtime/observability/g2g.d.ts +14 -0
- package/dist/realtime/observability/realtime-observability.js +8 -18
- package/dist/realtime/observability/webrtc-stats.d.ts +1 -1
- package/dist/realtime/preflight-connectivity.js +102 -0
- package/dist/realtime/preflight-types.d.ts +30 -0
- package/dist/realtime/react-native/index.js +36 -0
- package/dist/realtime/react-native/preflight.js +10 -0
- package/dist/realtime/react-native/prepare-connection.js +26 -0
- package/dist/realtime/stream-session.js +1 -2
- package/dist/realtime/subscribe-client.js +10 -9
- package/dist/shared/model.d.ts +36 -36
- package/dist/shared/model.js +5 -17
- package/dist/shared/request.js +5 -4
- package/dist/shared/types.d.ts +1 -1
- package/dist/shared/types.js +3 -2
- package/dist/utils/errors.d.ts +3 -0
- package/dist/utils/errors.js +16 -1
- package/dist/utils/platform.js +17 -1
- package/dist/utils/runtime.js +13 -0
- package/package.json +10 -3
- package/dist/realtime/observability/glass-to-glass.d.ts +0 -41
- package/dist/realtime/preflight.d.ts +0 -59
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
//#region src/realtime/preflight-connectivity.ts
|
|
2
|
+
function candidateType(candidate) {
|
|
3
|
+
if (candidate.type) return candidate.type;
|
|
4
|
+
return /\btyp (\w+)/.exec(candidate.candidate)?.[1] ?? "";
|
|
5
|
+
}
|
|
6
|
+
function nowMs() {
|
|
7
|
+
return globalThis.performance?.now?.() ?? Date.now();
|
|
8
|
+
}
|
|
9
|
+
async function gatherIceCandidates(iceServers, timeoutMs, signal, logger) {
|
|
10
|
+
if (signal?.aborted) return {
|
|
11
|
+
transport: "failed",
|
|
12
|
+
rttMs: null
|
|
13
|
+
};
|
|
14
|
+
const PC = globalThis?.RTCPeerConnection;
|
|
15
|
+
if (typeof PC !== "function") {
|
|
16
|
+
logger.warn("preflight: RTCPeerConnection unavailable in this environment");
|
|
17
|
+
return {
|
|
18
|
+
transport: "failed",
|
|
19
|
+
rttMs: null
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
let pc = null;
|
|
23
|
+
try {
|
|
24
|
+
pc = new PC({ iceServers });
|
|
25
|
+
pc.createDataChannel("decart-preflight");
|
|
26
|
+
let sawSrflx = false;
|
|
27
|
+
let sawOtherCandidate = false;
|
|
28
|
+
let firstSrflxAt = null;
|
|
29
|
+
const start = nowMs();
|
|
30
|
+
await new Promise((resolve) => {
|
|
31
|
+
let settled = false;
|
|
32
|
+
let timer;
|
|
33
|
+
const finish = () => {
|
|
34
|
+
if (settled) return;
|
|
35
|
+
settled = true;
|
|
36
|
+
clearTimeout(timer);
|
|
37
|
+
signal?.removeEventListener("abort", finish);
|
|
38
|
+
resolve();
|
|
39
|
+
};
|
|
40
|
+
timer = setTimeout(finish, timeoutMs);
|
|
41
|
+
signal?.addEventListener("abort", finish, { once: true });
|
|
42
|
+
if (signal?.aborted) finish();
|
|
43
|
+
const peer = pc;
|
|
44
|
+
peer.onicecandidate = (event) => {
|
|
45
|
+
if (!event.candidate || event.candidate.candidate === "") return finish();
|
|
46
|
+
if (candidateType(event.candidate) === "srflx") {
|
|
47
|
+
sawSrflx = true;
|
|
48
|
+
if (firstSrflxAt === null) firstSrflxAt = nowMs();
|
|
49
|
+
} else sawOtherCandidate = true;
|
|
50
|
+
};
|
|
51
|
+
peer.onicegatheringstatechange = () => {
|
|
52
|
+
if (peer.iceGatheringState === "complete") finish();
|
|
53
|
+
};
|
|
54
|
+
peer.createOffer().then((offer) => peer.setLocalDescription(offer)).catch((error) => {
|
|
55
|
+
logger.warn("preflight: failed to create offer", { error: error instanceof Error ? error.message : String(error) });
|
|
56
|
+
finish();
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
const rttMs = firstSrflxAt !== null ? Math.round(firstSrflxAt - start) : null;
|
|
60
|
+
return {
|
|
61
|
+
transport: sawSrflx ? "udp" : sawOtherCandidate ? "relay" : "failed",
|
|
62
|
+
rttMs
|
|
63
|
+
};
|
|
64
|
+
} catch (error) {
|
|
65
|
+
logger.warn("preflight: connectivity probe threw", { error: error instanceof Error ? error.message : String(error) });
|
|
66
|
+
return {
|
|
67
|
+
transport: "failed",
|
|
68
|
+
rttMs: null
|
|
69
|
+
};
|
|
70
|
+
} finally {
|
|
71
|
+
try {
|
|
72
|
+
pc?.close();
|
|
73
|
+
} catch {}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function classifyConnectivity(metrics, thresholds) {
|
|
77
|
+
const reasons = [];
|
|
78
|
+
let quality;
|
|
79
|
+
if (metrics.transport === "failed") {
|
|
80
|
+
quality = "critical";
|
|
81
|
+
reasons.push("Could not establish any WebRTC connectivity (no ICE candidates gathered). Real-time streaming is unlikely to work on this network.");
|
|
82
|
+
} else if (metrics.transport === "relay") {
|
|
83
|
+
quality = "poor";
|
|
84
|
+
reasons.push("Direct UDP connectivity could not be confirmed; the session will need a TURN relay, which adds latency and can't be verified without starting a session.");
|
|
85
|
+
} else if (metrics.rttMs != null && metrics.rttMs > thresholds.marginalMs) {
|
|
86
|
+
quality = "poor";
|
|
87
|
+
reasons.push(`Network round-trip time is high (~${metrics.rttMs}ms > ${thresholds.marginalMs}ms); the real-time experience may feel laggy.`);
|
|
88
|
+
} else if (metrics.rttMs != null && metrics.rttMs > thresholds.goodMs) {
|
|
89
|
+
quality = "fair";
|
|
90
|
+
reasons.push(`Network round-trip time is elevated (~${metrics.rttMs}ms > ${thresholds.goodMs}ms).`);
|
|
91
|
+
} else quality = "good";
|
|
92
|
+
return {
|
|
93
|
+
quality,
|
|
94
|
+
metrics: {
|
|
95
|
+
transport: metrics.transport,
|
|
96
|
+
rttMs: metrics.rttMs
|
|
97
|
+
},
|
|
98
|
+
reasons
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { classifyConnectivity, gatherIceCandidates };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CustomModelDefinition, ModelDefinition } from "../shared/model.js";
|
|
2
|
+
import { ConnectionQuality } from "./observability/connection-quality.js";
|
|
3
|
+
|
|
4
|
+
//#region src/realtime/preflight-types.d.ts
|
|
5
|
+
type ConnectivityTransport = "udp" | "relay" | "failed";
|
|
6
|
+
type ConnectivityMetrics = {
|
|
7
|
+
transport: ConnectivityTransport;
|
|
8
|
+
rttMs: number | null;
|
|
9
|
+
g2gMs?: number | null;
|
|
10
|
+
ttffMs?: number | null;
|
|
11
|
+
g2gDropRatio?: number | null;
|
|
12
|
+
upstreamJitterMs?: number | null;
|
|
13
|
+
packetLoss?: number | null;
|
|
14
|
+
sampleCount?: number;
|
|
15
|
+
};
|
|
16
|
+
type ConnectivityReport = {
|
|
17
|
+
quality: ConnectionQuality;
|
|
18
|
+
metrics: ConnectivityMetrics;
|
|
19
|
+
reasons: string[];
|
|
20
|
+
};
|
|
21
|
+
type CheckConnectivityOptions = {
|
|
22
|
+
iceServers?: RTCIceServer[];
|
|
23
|
+
iceGatherTimeoutMs?: number;
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
deep?: boolean;
|
|
26
|
+
model?: ModelDefinition | CustomModelDefinition;
|
|
27
|
+
durationMs?: number;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { CheckConnectivityOptions, ConnectivityMetrics, ConnectivityReport, ConnectivityTransport };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRealTimeClient } from "../client.js";
|
|
2
|
+
import { createRealTimeSubscribeClient } from "../subscribe-client.js";
|
|
3
|
+
import { createReactNativePreflight } from "./preflight.js";
|
|
4
|
+
import { assertReactNativeReady, prepareReactNativeConnection, unsupportedReactNativeFeature } from "./prepare-connection.js";
|
|
5
|
+
//#region src/realtime/react-native/index.ts
|
|
6
|
+
const createReactNativeRealtime = (options) => {
|
|
7
|
+
const publish = createRealTimeClient({
|
|
8
|
+
baseUrl: options.publishBaseUrl,
|
|
9
|
+
apiKey: options.apiKey,
|
|
10
|
+
integration: options.integration,
|
|
11
|
+
logger: options.logger,
|
|
12
|
+
telemetryEnabled: options.telemetryEnabled,
|
|
13
|
+
prepareConnection: prepareReactNativeConnection
|
|
14
|
+
});
|
|
15
|
+
const subscribe = createRealTimeSubscribeClient({
|
|
16
|
+
baseUrl: options.subscribeBaseUrl,
|
|
17
|
+
apiKey: options.apiKey,
|
|
18
|
+
integration: options.integration,
|
|
19
|
+
logger: options.logger
|
|
20
|
+
});
|
|
21
|
+
const preflight = createReactNativePreflight({ logger: options.logger });
|
|
22
|
+
return {
|
|
23
|
+
connect: (stream, connectOptions) => publish.connect(stream, connectOptions),
|
|
24
|
+
subscribe: (subscribeOptions) => {
|
|
25
|
+
assertReactNativeReady();
|
|
26
|
+
return subscribe.subscribe(subscribeOptions);
|
|
27
|
+
},
|
|
28
|
+
checkConnectivity: async (checkOptions = {}) => {
|
|
29
|
+
assertReactNativeReady();
|
|
30
|
+
if (checkOptions.deep) unsupportedReactNativeFeature("Deep connectivity preflight");
|
|
31
|
+
return preflight.checkConnectivity(checkOptions);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { createReactNativeRealtime };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { REALTIME_CONFIG } from "../config-realtime.js";
|
|
2
|
+
import { classifyConnectivity, gatherIceCandidates } from "../preflight-connectivity.js";
|
|
3
|
+
//#region src/realtime/react-native/preflight.ts
|
|
4
|
+
function createReactNativePreflight({ logger }) {
|
|
5
|
+
return { checkConnectivity: async (options = {}) => {
|
|
6
|
+
return classifyConnectivity(await gatherIceCandidates(options.iceServers ?? REALTIME_CONFIG.preflight.defaultStunUrls.map((urls) => ({ urls })), options.iceGatherTimeoutMs ?? REALTIME_CONFIG.preflight.iceGatherTimeoutMs, options.signal, logger), REALTIME_CONFIG.preflight.rtt);
|
|
7
|
+
} };
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { createReactNativePreflight };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createReactNativeSetupRequiredError, createUnsupportedPlatformFeatureError } from "../../utils/errors.js";
|
|
2
|
+
import { RealtimeObservability } from "../observability/realtime-observability.js";
|
|
3
|
+
import { missingReactNativeRealtimeGlobals } from "../../utils/platform.js";
|
|
4
|
+
import { createLiveKitMediaChannel } from "../media-channel.js";
|
|
5
|
+
//#region src/realtime/react-native/prepare-connection.ts
|
|
6
|
+
function assertReactNativeReady() {
|
|
7
|
+
const missing = missingReactNativeRealtimeGlobals();
|
|
8
|
+
if (missing.length > 0) throw createReactNativeSetupRequiredError(missing);
|
|
9
|
+
}
|
|
10
|
+
function unsupportedReactNativeFeature(feature) {
|
|
11
|
+
throw createUnsupportedPlatformFeatureError(feature, "React Native");
|
|
12
|
+
}
|
|
13
|
+
const prepareReactNativeConnection = ({ stream, mirror, debugQuality, preferredVideoCodec, observability: observabilityOptions }) => {
|
|
14
|
+
assertReactNativeReady();
|
|
15
|
+
if (mirror !== false) unsupportedReactNativeFeature("Outgoing video mirroring");
|
|
16
|
+
if (debugQuality) unsupportedReactNativeFeature("debugQuality");
|
|
17
|
+
return {
|
|
18
|
+
stream: stream ?? new MediaStream(),
|
|
19
|
+
observability: new RealtimeObservability(observabilityOptions),
|
|
20
|
+
videoCodec: preferredVideoCodec,
|
|
21
|
+
createMediaChannel: createLiveKitMediaChannel,
|
|
22
|
+
dispose: () => {}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { assertReactNativeReady, prepareReactNativeConnection, unsupportedReactNativeFeature };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createConsoleLogger } from "../utils/logger.js";
|
|
2
2
|
import { REALTIME_CONFIG } from "./config-realtime.js";
|
|
3
|
-
import { MediaChannel } from "./media-channel.js";
|
|
4
3
|
import { SignalingChannel } from "./signaling-channel.js";
|
|
5
4
|
import mitt from "mitt";
|
|
6
5
|
import pRetry, { AbortError } from "p-retry";
|
|
@@ -238,7 +237,7 @@ var StreamSession = class {
|
|
|
238
237
|
logger: this.logger,
|
|
239
238
|
observability: this.config.observability
|
|
240
239
|
});
|
|
241
|
-
this.media =
|
|
240
|
+
this.media = this.config.createMediaChannel({
|
|
242
241
|
observability: this.config.observability,
|
|
243
242
|
localStream: this.config.localStream,
|
|
244
243
|
logger: this.logger,
|
|
@@ -2,8 +2,8 @@ import { classifyWebrtcError } from "../utils/errors.js";
|
|
|
2
2
|
import { createConsoleLogger } from "../utils/logger.js";
|
|
3
3
|
import { createEventBuffer } from "./event-buffer.js";
|
|
4
4
|
import { REALTIME_CONFIG } from "./config-realtime.js";
|
|
5
|
+
import { loadLiveKitClient } from "./livekit.js";
|
|
5
6
|
import { RealtimeObservability } from "./observability/realtime-observability.js";
|
|
6
|
-
import { ConnectionState, Room, RoomEvent, Track } from "livekit-client";
|
|
7
7
|
//#region src/realtime/subscribe-client.ts
|
|
8
8
|
function decodeSubscribeToken(token) {
|
|
9
9
|
try {
|
|
@@ -16,11 +16,11 @@ function decodeSubscribeToken(token) {
|
|
|
16
16
|
}
|
|
17
17
|
function mapLiveKitState(state) {
|
|
18
18
|
switch (state) {
|
|
19
|
-
case
|
|
20
|
-
case
|
|
21
|
-
case
|
|
22
|
-
case
|
|
23
|
-
case
|
|
19
|
+
case "connecting": return "connecting";
|
|
20
|
+
case "connected": return "connected";
|
|
21
|
+
case "reconnecting":
|
|
22
|
+
case "signalReconnecting": return "reconnecting";
|
|
23
|
+
case "disconnected": return "disconnected";
|
|
24
24
|
default: return "disconnected";
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -63,6 +63,7 @@ const createRealTimeSubscribeClient = (opts) => {
|
|
|
63
63
|
emitOrBuffer("connectionChange", state);
|
|
64
64
|
};
|
|
65
65
|
try {
|
|
66
|
+
const { Room: LiveKitRoom, RoomEvent } = await loadLiveKitClient();
|
|
66
67
|
observability = new RealtimeObservability({
|
|
67
68
|
telemetryEnabled: false,
|
|
68
69
|
apiKey,
|
|
@@ -76,11 +77,11 @@ const createRealTimeSubscribeClient = (opts) => {
|
|
|
76
77
|
apiKey,
|
|
77
78
|
roomName
|
|
78
79
|
});
|
|
79
|
-
room = new
|
|
80
|
+
room = new LiveKitRoom(REALTIME_CONFIG.livekit.roomOptions);
|
|
80
81
|
const activeRoom = room;
|
|
81
82
|
activeRoom.on(RoomEvent.TrackSubscribed, (track, _pub, participant) => {
|
|
82
83
|
if (!participant.identity.startsWith(REALTIME_CONFIG.livekit.inferenceServerIdentityPrefix)) return;
|
|
83
|
-
if (track.kind !==
|
|
84
|
+
if (track.kind !== "video" && track.kind !== "audio") return;
|
|
84
85
|
const mediaStreamTrack = track.mediaStreamTrack;
|
|
85
86
|
if (!mediaStreamTrack) return;
|
|
86
87
|
const tracks = remoteStream?.getTracks() ?? [];
|
|
@@ -98,7 +99,7 @@ const createRealTimeSubscribeClient = (opts) => {
|
|
|
98
99
|
observability.setLiveKitRoom(activeRoom);
|
|
99
100
|
setState("connected");
|
|
100
101
|
const client = {
|
|
101
|
-
isConnected: () => activeRoom.state ===
|
|
102
|
+
isConnected: () => activeRoom.state === "connected",
|
|
102
103
|
getConnectionState: () => mapLiveKitState(activeRoom.state),
|
|
103
104
|
disconnect: () => {
|
|
104
105
|
observability?.stop();
|
package/dist/shared/model.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ type CanonicalModel = z.infer<typeof canonicalModelSchema>;
|
|
|
17
17
|
* Old names still work but will log a deprecation warning.
|
|
18
18
|
*/
|
|
19
19
|
declare const modelAliases: {
|
|
20
|
-
readonly mirage_v2: "lucy-restyle-2";
|
|
21
20
|
readonly "lucy-2.1-vton-2": "lucy-vton-2";
|
|
22
21
|
readonly "lucy-pro-v2v": "lucy-clip";
|
|
23
22
|
readonly "lucy-restyle-v2v": "lucy-restyle-2";
|
|
@@ -25,10 +24,10 @@ declare const modelAliases: {
|
|
|
25
24
|
};
|
|
26
25
|
/** @internal Test-only helper to reset deprecation warning tracking */
|
|
27
26
|
|
|
28
|
-
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"
|
|
27
|
+
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-2.1-vton-2">]>;
|
|
29
28
|
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-2.1-vton-2">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>;
|
|
30
29
|
declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>;
|
|
31
|
-
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"
|
|
30
|
+
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-2.1-vton-2">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-2.1-vton-2">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
|
|
32
31
|
type Model = z.infer<typeof modelSchema>;
|
|
33
32
|
type RealTimeModels = z.infer<typeof realtimeModels>;
|
|
34
33
|
type VideoModels = z.infer<typeof videoModels>;
|
|
@@ -53,12 +52,12 @@ declare function resolveCanonicalModelAlias(model: string): CanonicalModel | und
|
|
|
53
52
|
declare const modelInputSchemas: {
|
|
54
53
|
readonly "lucy-clip": z.ZodObject<{
|
|
55
54
|
prompt: z.ZodString;
|
|
56
|
-
data: z.ZodUnion<readonly [z.
|
|
55
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
57
56
|
uri: z.ZodString;
|
|
58
57
|
type: z.ZodString;
|
|
59
58
|
name: z.ZodString;
|
|
60
59
|
}, z.core.$strip>]>;
|
|
61
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
60
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
62
61
|
uri: z.ZodString;
|
|
63
62
|
type: z.ZodString;
|
|
64
63
|
name: z.ZodString;
|
|
@@ -69,12 +68,12 @@ declare const modelInputSchemas: {
|
|
|
69
68
|
}, z.core.$strip>;
|
|
70
69
|
readonly "lucy-image-2": z.ZodObject<{
|
|
71
70
|
prompt: z.ZodString;
|
|
72
|
-
data: z.ZodUnion<readonly [z.
|
|
71
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
73
72
|
uri: z.ZodString;
|
|
74
73
|
type: z.ZodString;
|
|
75
74
|
name: z.ZodString;
|
|
76
75
|
}, z.core.$strip>]>;
|
|
77
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
76
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
78
77
|
uri: z.ZodString;
|
|
79
78
|
type: z.ZodString;
|
|
80
79
|
name: z.ZodString;
|
|
@@ -88,12 +87,12 @@ declare const modelInputSchemas: {
|
|
|
88
87
|
}, z.core.$strip>;
|
|
89
88
|
readonly "lucy-restyle-2": z.ZodObject<{
|
|
90
89
|
prompt: z.ZodOptional<z.ZodString>;
|
|
91
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
90
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
92
91
|
uri: z.ZodString;
|
|
93
92
|
type: z.ZodString;
|
|
94
93
|
name: z.ZodString;
|
|
95
94
|
}, z.core.$strip>]>>;
|
|
96
|
-
data: z.ZodUnion<readonly [z.
|
|
95
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
97
96
|
uri: z.ZodString;
|
|
98
97
|
type: z.ZodString;
|
|
99
98
|
name: z.ZodString;
|
|
@@ -104,12 +103,12 @@ declare const modelInputSchemas: {
|
|
|
104
103
|
}, z.core.$strip>;
|
|
105
104
|
readonly "lucy-2.1": z.ZodObject<{
|
|
106
105
|
prompt: z.ZodString;
|
|
107
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
106
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
108
107
|
uri: z.ZodString;
|
|
109
108
|
type: z.ZodString;
|
|
110
109
|
name: z.ZodString;
|
|
111
110
|
}, z.core.$strip>]>>;
|
|
112
|
-
data: z.ZodUnion<readonly [z.
|
|
111
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
113
112
|
uri: z.ZodString;
|
|
114
113
|
type: z.ZodString;
|
|
115
114
|
name: z.ZodString;
|
|
@@ -120,12 +119,12 @@ declare const modelInputSchemas: {
|
|
|
120
119
|
}, z.core.$strip>;
|
|
121
120
|
readonly "lucy-2.5": z.ZodObject<{
|
|
122
121
|
prompt: z.ZodString;
|
|
123
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
122
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
124
123
|
uri: z.ZodString;
|
|
125
124
|
type: z.ZodString;
|
|
126
125
|
name: z.ZodString;
|
|
127
126
|
}, z.core.$strip>]>>;
|
|
128
|
-
data: z.ZodUnion<readonly [z.
|
|
127
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
129
128
|
uri: z.ZodString;
|
|
130
129
|
type: z.ZodString;
|
|
131
130
|
name: z.ZodString;
|
|
@@ -136,12 +135,12 @@ declare const modelInputSchemas: {
|
|
|
136
135
|
}, z.core.$strip>;
|
|
137
136
|
readonly "lucy-vton-2": z.ZodObject<{
|
|
138
137
|
prompt: z.ZodString;
|
|
139
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
138
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
140
139
|
uri: z.ZodString;
|
|
141
140
|
type: z.ZodString;
|
|
142
141
|
name: z.ZodString;
|
|
143
142
|
}, z.core.$strip>]>>;
|
|
144
|
-
data: z.ZodUnion<readonly [z.
|
|
143
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
145
144
|
uri: z.ZodString;
|
|
146
145
|
type: z.ZodString;
|
|
147
146
|
name: z.ZodString;
|
|
@@ -152,12 +151,12 @@ declare const modelInputSchemas: {
|
|
|
152
151
|
}, z.core.$strip>;
|
|
153
152
|
readonly "lucy-vton-3": z.ZodObject<{
|
|
154
153
|
prompt: z.ZodString;
|
|
155
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
154
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
156
155
|
uri: z.ZodString;
|
|
157
156
|
type: z.ZodString;
|
|
158
157
|
name: z.ZodString;
|
|
159
158
|
}, z.core.$strip>]>>;
|
|
160
|
-
data: z.ZodUnion<readonly [z.
|
|
159
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
161
160
|
uri: z.ZodString;
|
|
162
161
|
type: z.ZodString;
|
|
163
162
|
name: z.ZodString;
|
|
@@ -168,12 +167,12 @@ declare const modelInputSchemas: {
|
|
|
168
167
|
}, z.core.$strip>;
|
|
169
168
|
readonly "lucy-latest": z.ZodObject<{
|
|
170
169
|
prompt: z.ZodString;
|
|
171
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
170
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
172
171
|
uri: z.ZodString;
|
|
173
172
|
type: z.ZodString;
|
|
174
173
|
name: z.ZodString;
|
|
175
174
|
}, z.core.$strip>]>>;
|
|
176
|
-
data: z.ZodUnion<readonly [z.
|
|
175
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
177
176
|
uri: z.ZodString;
|
|
178
177
|
type: z.ZodString;
|
|
179
178
|
name: z.ZodString;
|
|
@@ -184,12 +183,12 @@ declare const modelInputSchemas: {
|
|
|
184
183
|
}, z.core.$strip>;
|
|
185
184
|
readonly "lucy-vton-latest": z.ZodObject<{
|
|
186
185
|
prompt: z.ZodString;
|
|
187
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
186
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
188
187
|
uri: z.ZodString;
|
|
189
188
|
type: z.ZodString;
|
|
190
189
|
name: z.ZodString;
|
|
191
190
|
}, z.core.$strip>]>>;
|
|
192
|
-
data: z.ZodUnion<readonly [z.
|
|
191
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
193
192
|
uri: z.ZodString;
|
|
194
193
|
type: z.ZodString;
|
|
195
194
|
name: z.ZodString;
|
|
@@ -200,12 +199,12 @@ declare const modelInputSchemas: {
|
|
|
200
199
|
}, z.core.$strip>;
|
|
201
200
|
readonly "lucy-restyle-latest": z.ZodObject<{
|
|
202
201
|
prompt: z.ZodOptional<z.ZodString>;
|
|
203
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
202
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
204
203
|
uri: z.ZodString;
|
|
205
204
|
type: z.ZodString;
|
|
206
205
|
name: z.ZodString;
|
|
207
206
|
}, z.core.$strip>]>>;
|
|
208
|
-
data: z.ZodUnion<readonly [z.
|
|
207
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
209
208
|
uri: z.ZodString;
|
|
210
209
|
type: z.ZodString;
|
|
211
210
|
name: z.ZodString;
|
|
@@ -216,12 +215,12 @@ declare const modelInputSchemas: {
|
|
|
216
215
|
}, z.core.$strip>;
|
|
217
216
|
readonly "lucy-clip-latest": z.ZodObject<{
|
|
218
217
|
prompt: z.ZodString;
|
|
219
|
-
data: z.ZodUnion<readonly [z.
|
|
218
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
220
219
|
uri: z.ZodString;
|
|
221
220
|
type: z.ZodString;
|
|
222
221
|
name: z.ZodString;
|
|
223
222
|
}, z.core.$strip>]>;
|
|
224
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
223
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
225
224
|
uri: z.ZodString;
|
|
226
225
|
type: z.ZodString;
|
|
227
226
|
name: z.ZodString;
|
|
@@ -232,12 +231,12 @@ declare const modelInputSchemas: {
|
|
|
232
231
|
}, z.core.$strip>;
|
|
233
232
|
readonly "lucy-image-latest": z.ZodObject<{
|
|
234
233
|
prompt: z.ZodString;
|
|
235
|
-
data: z.ZodUnion<readonly [z.
|
|
234
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
236
235
|
uri: z.ZodString;
|
|
237
236
|
type: z.ZodString;
|
|
238
237
|
name: z.ZodString;
|
|
239
238
|
}, z.core.$strip>]>;
|
|
240
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
239
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
241
240
|
uri: z.ZodString;
|
|
242
241
|
type: z.ZodString;
|
|
243
242
|
name: z.ZodString;
|
|
@@ -251,12 +250,12 @@ declare const modelInputSchemas: {
|
|
|
251
250
|
}, z.core.$strip>;
|
|
252
251
|
readonly "lucy-2.1-vton-2": z.ZodObject<{
|
|
253
252
|
prompt: z.ZodString;
|
|
254
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
253
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
255
254
|
uri: z.ZodString;
|
|
256
255
|
type: z.ZodString;
|
|
257
256
|
name: z.ZodString;
|
|
258
257
|
}, z.core.$strip>]>>;
|
|
259
|
-
data: z.ZodUnion<readonly [z.
|
|
258
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
260
259
|
uri: z.ZodString;
|
|
261
260
|
type: z.ZodString;
|
|
262
261
|
name: z.ZodString;
|
|
@@ -267,12 +266,12 @@ declare const modelInputSchemas: {
|
|
|
267
266
|
}, z.core.$strip>;
|
|
268
267
|
readonly "lucy-pro-v2v": z.ZodObject<{
|
|
269
268
|
prompt: z.ZodString;
|
|
270
|
-
data: z.ZodUnion<readonly [z.
|
|
269
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
271
270
|
uri: z.ZodString;
|
|
272
271
|
type: z.ZodString;
|
|
273
272
|
name: z.ZodString;
|
|
274
273
|
}, z.core.$strip>]>;
|
|
275
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
274
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
276
275
|
uri: z.ZodString;
|
|
277
276
|
type: z.ZodString;
|
|
278
277
|
name: z.ZodString;
|
|
@@ -283,12 +282,12 @@ declare const modelInputSchemas: {
|
|
|
283
282
|
}, z.core.$strip>;
|
|
284
283
|
readonly "lucy-pro-i2i": z.ZodObject<{
|
|
285
284
|
prompt: z.ZodString;
|
|
286
|
-
data: z.ZodUnion<readonly [z.
|
|
285
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
287
286
|
uri: z.ZodString;
|
|
288
287
|
type: z.ZodString;
|
|
289
288
|
name: z.ZodString;
|
|
290
289
|
}, z.core.$strip>]>;
|
|
291
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
290
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
292
291
|
uri: z.ZodString;
|
|
293
292
|
type: z.ZodString;
|
|
294
293
|
name: z.ZodString;
|
|
@@ -302,12 +301,12 @@ declare const modelInputSchemas: {
|
|
|
302
301
|
}, z.core.$strip>;
|
|
303
302
|
readonly "lucy-restyle-v2v": z.ZodObject<{
|
|
304
303
|
prompt: z.ZodOptional<z.ZodString>;
|
|
305
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
304
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
306
305
|
uri: z.ZodString;
|
|
307
306
|
type: z.ZodString;
|
|
308
307
|
name: z.ZodString;
|
|
309
308
|
}, z.core.$strip>]>>;
|
|
310
|
-
data: z.ZodUnion<readonly [z.
|
|
309
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
311
310
|
uri: z.ZodString;
|
|
312
311
|
type: z.ZodString;
|
|
313
312
|
name: z.ZodString;
|
|
@@ -333,6 +332,7 @@ type ModelDefinition<T extends Model = Model> = {
|
|
|
333
332
|
height: number;
|
|
334
333
|
inputSchema: T extends keyof ModelInputSchemas ? ModelInputSchemas[T] : z.ZodTypeAny;
|
|
335
334
|
};
|
|
335
|
+
declare function resolveFpsNumber(fps: ModelFps, fallback?: number): number;
|
|
336
336
|
/**
|
|
337
337
|
* A model definition with an arbitrary (non-registry) model name.
|
|
338
338
|
* Use this when providing your own model configuration.
|
|
@@ -411,4 +411,4 @@ declare const models: {
|
|
|
411
411
|
};
|
|
412
412
|
};
|
|
413
413
|
//#endregion
|
|
414
|
-
export { CanonicalModel, CustomModelDefinition, ImageModelDefinition, ImageModels, ListedModelDefinition, Model, ModelDefinition, ModelInputSchemas, ModelKind, RealTimeModels, VideoModelDefinition, VideoModels, isCanonicalModel, isImageModel, isModel, isRealtimeModel, isVideoModel, listModels, modelAliases, models, resolveCanonicalModelAlias, resolveModelAlias };
|
|
414
|
+
export { CanonicalModel, CustomModelDefinition, ImageModelDefinition, ImageModels, ListedModelDefinition, Model, ModelDefinition, ModelFps, ModelInputSchemas, ModelKind, RealTimeModels, VideoModelDefinition, VideoModels, isCanonicalModel, isImageModel, isModel, isRealtimeModel, isVideoModel, listModels, modelAliases, models, resolveCanonicalModelAlias, resolveFpsNumber, resolveModelAlias };
|