@drawcall/design 0.5.0 → 0.5.2
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 +4 -3
- package/dist/index.js +3 -2
- package/dist/project-state.d.ts +369 -0
- package/dist/project-state.js +112 -0
- package/dist/protocol.d.ts +163 -5
- package/dist/protocol.js +123 -5
- package/dist/v1/contract.d.ts +304 -0
- package/dist/v1/contract.js +27 -1
- package/dist/v1/schemas.d.ts +136 -0
- package/dist/v1/schemas.js +87 -0
- package/package.json +1 -1
package/dist/protocol.d.ts
CHANGED
|
@@ -1,22 +1,165 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const projectSyncMaps: {
|
|
3
|
-
readonly frameContentRevisions: "frame-content-revisions";
|
|
4
|
-
readonly filesystemRevision: "filesystem-revision";
|
|
5
|
-
readonly frameRecords: "frame-records";
|
|
6
|
-
};
|
|
7
2
|
export declare const inspectionMessageTypes: {
|
|
8
3
|
readonly applied: "drawcall:inspection:applied";
|
|
9
4
|
readonly exit: "drawcall:inspection:exit";
|
|
5
|
+
readonly failed: "drawcall:inspection:failed";
|
|
10
6
|
readonly loading: "drawcall:inspection:loading";
|
|
11
7
|
readonly ready: "drawcall:inspection:ready";
|
|
12
8
|
readonly set: "drawcall:inspection:set";
|
|
13
9
|
};
|
|
10
|
+
export declare const gltsExportMessageTypes: {
|
|
11
|
+
readonly cancel: "drawcall:export:cancel";
|
|
12
|
+
readonly cancelled: "drawcall:export:cancelled";
|
|
13
|
+
readonly request: "drawcall:export:request";
|
|
14
|
+
readonly result: "drawcall:export:result";
|
|
15
|
+
};
|
|
16
|
+
export declare const gltsRuntimeExportFormatSchema: z.ZodEnum<{
|
|
17
|
+
gltf: "gltf";
|
|
18
|
+
stl: "stl";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const gltsExportCommandSchema: z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<"drawcall:export:request">;
|
|
22
|
+
requestId: z.ZodString;
|
|
23
|
+
format: z.ZodEnum<{
|
|
24
|
+
gltf: "gltf";
|
|
25
|
+
stl: "stl";
|
|
26
|
+
}>;
|
|
27
|
+
identity: z.ZodObject<{
|
|
28
|
+
projectId: z.ZodString;
|
|
29
|
+
frameId: z.ZodString;
|
|
30
|
+
frameName: z.ZodString;
|
|
31
|
+
frameType: z.ZodLiteral<"glts">;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export declare const gltsExportCancelCommandSchema: z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"drawcall:export:cancel">;
|
|
36
|
+
requestId: z.ZodString;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const gltsExportParentMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"drawcall:export:request">;
|
|
40
|
+
requestId: z.ZodString;
|
|
41
|
+
format: z.ZodEnum<{
|
|
42
|
+
gltf: "gltf";
|
|
43
|
+
stl: "stl";
|
|
44
|
+
}>;
|
|
45
|
+
identity: z.ZodObject<{
|
|
46
|
+
projectId: z.ZodString;
|
|
47
|
+
frameId: z.ZodString;
|
|
48
|
+
frameName: z.ZodString;
|
|
49
|
+
frameType: z.ZodLiteral<"glts">;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"drawcall:export:cancel">;
|
|
53
|
+
requestId: z.ZodString;
|
|
54
|
+
}, z.core.$strict>]>;
|
|
55
|
+
export declare const gltsExportResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"drawcall:export:result">;
|
|
57
|
+
requestId: z.ZodString;
|
|
58
|
+
ok: z.ZodLiteral<true>;
|
|
59
|
+
format: z.ZodEnum<{
|
|
60
|
+
gltf: "gltf";
|
|
61
|
+
stl: "stl";
|
|
62
|
+
}>;
|
|
63
|
+
bytes: z.ZodCustom<ArrayBuffer, ArrayBuffer>;
|
|
64
|
+
mediaType: z.ZodString;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
type: z.ZodLiteral<"drawcall:export:result">;
|
|
67
|
+
requestId: z.ZodString;
|
|
68
|
+
ok: z.ZodLiteral<false>;
|
|
69
|
+
error: z.ZodString;
|
|
70
|
+
}, z.core.$strict>], "ok">;
|
|
71
|
+
export declare const gltsExportCancelledResultSchema: z.ZodObject<{
|
|
72
|
+
type: z.ZodLiteral<"drawcall:export:cancelled">;
|
|
73
|
+
requestId: z.ZodString;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
export declare const gltsExportFrameMessageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
76
|
+
type: z.ZodLiteral<"drawcall:export:result">;
|
|
77
|
+
requestId: z.ZodString;
|
|
78
|
+
ok: z.ZodLiteral<true>;
|
|
79
|
+
format: z.ZodEnum<{
|
|
80
|
+
gltf: "gltf";
|
|
81
|
+
stl: "stl";
|
|
82
|
+
}>;
|
|
83
|
+
bytes: z.ZodCustom<ArrayBuffer, ArrayBuffer>;
|
|
84
|
+
mediaType: z.ZodString;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
type: z.ZodLiteral<"drawcall:export:result">;
|
|
87
|
+
requestId: z.ZodString;
|
|
88
|
+
ok: z.ZodLiteral<false>;
|
|
89
|
+
error: z.ZodString;
|
|
90
|
+
}, z.core.$strict>], "ok">, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"drawcall:export:cancelled">;
|
|
92
|
+
requestId: z.ZodString;
|
|
93
|
+
}, z.core.$strict>]>;
|
|
94
|
+
export declare const cameraMessageTypes: {
|
|
95
|
+
readonly capture: "drawcall:camera:capture";
|
|
96
|
+
readonly captured: "drawcall:camera:captured";
|
|
97
|
+
readonly unavailable: "drawcall:camera:unavailable";
|
|
98
|
+
};
|
|
99
|
+
export declare const sourceFileMessageTypes: {
|
|
100
|
+
readonly changed: "drawcall:source-files:changed";
|
|
101
|
+
readonly reloadResult: "drawcall:source-file:reload-result";
|
|
102
|
+
};
|
|
103
|
+
export declare const sourceFileChangeSchema: z.ZodObject<{
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
revision: z.ZodNumber;
|
|
106
|
+
}, z.core.$strict>;
|
|
107
|
+
export declare const sourceFilesChangedMessageSchema: z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<"drawcall:source-files:changed">;
|
|
109
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
110
|
+
path: z.ZodString;
|
|
111
|
+
revision: z.ZodNumber;
|
|
112
|
+
}, z.core.$strict>>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export declare const sourceFileReloadResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<"drawcall:source-file:reload-result">;
|
|
116
|
+
path: z.ZodString;
|
|
117
|
+
revision: z.ZodNumber;
|
|
118
|
+
ok: z.ZodLiteral<true>;
|
|
119
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
120
|
+
type: z.ZodLiteral<"drawcall:source-file:reload-result">;
|
|
121
|
+
path: z.ZodString;
|
|
122
|
+
revision: z.ZodNumber;
|
|
123
|
+
ok: z.ZodLiteral<false>;
|
|
124
|
+
error: z.ZodString;
|
|
125
|
+
}, z.core.$strict>], "ok">;
|
|
126
|
+
export declare const cameraCaptureCommandSchema: z.ZodObject<{
|
|
127
|
+
type: z.ZodLiteral<"drawcall:camera:capture">;
|
|
128
|
+
requestId: z.ZodString;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
export declare const cameraCaptureResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
131
|
+
type: z.ZodLiteral<"drawcall:camera:captured">;
|
|
132
|
+
requestId: z.ZodString;
|
|
133
|
+
camera: z.ZodObject<{
|
|
134
|
+
position: z.ZodObject<{
|
|
135
|
+
x: z.ZodNumber;
|
|
136
|
+
y: z.ZodNumber;
|
|
137
|
+
z: z.ZodNumber;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
quaternion: z.ZodObject<{
|
|
140
|
+
x: z.ZodNumber;
|
|
141
|
+
y: z.ZodNumber;
|
|
142
|
+
z: z.ZodNumber;
|
|
143
|
+
w: z.ZodNumber;
|
|
144
|
+
}, z.core.$strict>;
|
|
145
|
+
}, z.core.$strict>;
|
|
146
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
147
|
+
type: z.ZodLiteral<"drawcall:camera:unavailable">;
|
|
148
|
+
requestId: z.ZodString;
|
|
149
|
+
reason: z.ZodEnum<{
|
|
150
|
+
"immersive-active": "immersive-active";
|
|
151
|
+
"not-inspecting": "not-inspecting";
|
|
152
|
+
"runtime-unavailable": "runtime-unavailable";
|
|
153
|
+
}>;
|
|
154
|
+
}, z.core.$strict>], "type">;
|
|
14
155
|
export declare const inspectionCommandSchema: z.ZodObject<{
|
|
15
156
|
type: z.ZodLiteral<"drawcall:inspection:set">;
|
|
16
157
|
requestId: z.ZodString;
|
|
17
158
|
enabled: z.ZodBoolean;
|
|
18
159
|
}, z.core.$strict>;
|
|
19
160
|
export declare const inspectionFrameMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
161
|
+
type: z.ZodLiteral<"drawcall:inspection:failed">;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
163
|
type: z.ZodLiteral<"drawcall:inspection:loading">;
|
|
21
164
|
}, z.core.$strict>, z.ZodObject<{
|
|
22
165
|
type: z.ZodLiteral<"drawcall:inspection:ready">;
|
|
@@ -28,9 +171,24 @@ export declare const inspectionFrameMessageSchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
28
171
|
type: z.ZodLiteral<"drawcall:inspection:exit">;
|
|
29
172
|
}, z.core.$strict>], "type">;
|
|
30
173
|
export type InspectionCommand = z.infer<typeof inspectionCommandSchema>;
|
|
174
|
+
export type CameraCaptureCommand = z.infer<typeof cameraCaptureCommandSchema>;
|
|
175
|
+
export type CameraCaptureResult = z.infer<typeof cameraCaptureResultSchema>;
|
|
176
|
+
export type SourceFileChange = z.infer<typeof sourceFileChangeSchema>;
|
|
177
|
+
export type SourceFilesChangedMessage = z.infer<typeof sourceFilesChangedMessageSchema>;
|
|
178
|
+
export type SourceFileReloadResult = z.infer<typeof sourceFileReloadResultSchema>;
|
|
179
|
+
export type CameraCaptureFailure = Extract<CameraCaptureResult, {
|
|
180
|
+
type: typeof cameraMessageTypes.unavailable;
|
|
181
|
+
}>;
|
|
31
182
|
export type InspectionFrameMessage = z.infer<typeof inspectionFrameMessageSchema>;
|
|
32
183
|
export type InspectionAppliedMessage = Extract<InspectionFrameMessage, {
|
|
33
184
|
type: typeof inspectionMessageTypes.applied;
|
|
34
185
|
}>;
|
|
186
|
+
export type GltsRuntimeExportFormat = z.infer<typeof gltsRuntimeExportFormatSchema>;
|
|
187
|
+
export type GltsExportCommand = z.infer<typeof gltsExportCommandSchema>;
|
|
188
|
+
export type GltsExportCancelCommand = z.infer<typeof gltsExportCancelCommandSchema>;
|
|
189
|
+
export type GltsExportParentMessage = z.infer<typeof gltsExportParentMessageSchema>;
|
|
190
|
+
export type GltsExportResult = z.infer<typeof gltsExportResultSchema>;
|
|
191
|
+
export type GltsExportCancelledResult = z.infer<typeof gltsExportCancelledResultSchema>;
|
|
192
|
+
export type GltsExportFrameMessage = z.infer<typeof gltsExportFrameMessageSchema>;
|
|
35
193
|
export declare function acknowledgesInspection(command: InspectionCommand | null, message: InspectionAppliedMessage): boolean;
|
|
36
194
|
export declare function projectSyncUrl(baseUrl: string, project: string): string;
|
package/dist/protocol.js
CHANGED
|
@@ -1,16 +1,133 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
frameContentRevisions: "frame-content-revisions",
|
|
4
|
-
filesystemRevision: "filesystem-revision",
|
|
5
|
-
frameRecords: "frame-records",
|
|
6
|
-
};
|
|
2
|
+
import { cameraPoseSchema, projectPathSchema } from "./v1/schemas.js";
|
|
7
3
|
export const inspectionMessageTypes = {
|
|
8
4
|
applied: "drawcall:inspection:applied",
|
|
9
5
|
exit: "drawcall:inspection:exit",
|
|
6
|
+
failed: "drawcall:inspection:failed",
|
|
10
7
|
loading: "drawcall:inspection:loading",
|
|
11
8
|
ready: "drawcall:inspection:ready",
|
|
12
9
|
set: "drawcall:inspection:set",
|
|
13
10
|
};
|
|
11
|
+
export const gltsExportMessageTypes = {
|
|
12
|
+
cancel: "drawcall:export:cancel",
|
|
13
|
+
cancelled: "drawcall:export:cancelled",
|
|
14
|
+
request: "drawcall:export:request",
|
|
15
|
+
result: "drawcall:export:result",
|
|
16
|
+
};
|
|
17
|
+
export const gltsRuntimeExportFormatSchema = z.enum(["gltf", "stl"]);
|
|
18
|
+
export const gltsExportCommandSchema = z
|
|
19
|
+
.object({
|
|
20
|
+
type: z.literal(gltsExportMessageTypes.request),
|
|
21
|
+
requestId: z.string().min(1),
|
|
22
|
+
format: gltsRuntimeExportFormatSchema,
|
|
23
|
+
identity: z
|
|
24
|
+
.object({
|
|
25
|
+
projectId: z.string().regex(/^[a-z0-9]{14}$/),
|
|
26
|
+
frameId: z.string().regex(/^[a-z0-9]{14}$/),
|
|
27
|
+
frameName: z.string().min(1).max(80),
|
|
28
|
+
frameType: z.literal("glts"),
|
|
29
|
+
})
|
|
30
|
+
.strict(),
|
|
31
|
+
})
|
|
32
|
+
.strict();
|
|
33
|
+
export const gltsExportCancelCommandSchema = z
|
|
34
|
+
.object({
|
|
35
|
+
type: z.literal(gltsExportMessageTypes.cancel),
|
|
36
|
+
requestId: z.string().min(1),
|
|
37
|
+
})
|
|
38
|
+
.strict();
|
|
39
|
+
export const gltsExportParentMessageSchema = z.union([
|
|
40
|
+
gltsExportCommandSchema,
|
|
41
|
+
gltsExportCancelCommandSchema,
|
|
42
|
+
]);
|
|
43
|
+
const gltsExportResultBaseSchema = z.object({
|
|
44
|
+
type: z.literal(gltsExportMessageTypes.result),
|
|
45
|
+
requestId: z.string().min(1),
|
|
46
|
+
});
|
|
47
|
+
export const gltsExportResultSchema = z.discriminatedUnion("ok", [
|
|
48
|
+
gltsExportResultBaseSchema
|
|
49
|
+
.extend({
|
|
50
|
+
ok: z.literal(true),
|
|
51
|
+
format: gltsRuntimeExportFormatSchema,
|
|
52
|
+
bytes: z.instanceof(ArrayBuffer),
|
|
53
|
+
mediaType: z.string().min(1),
|
|
54
|
+
})
|
|
55
|
+
.strict(),
|
|
56
|
+
gltsExportResultBaseSchema
|
|
57
|
+
.extend({
|
|
58
|
+
ok: z.literal(false),
|
|
59
|
+
error: z.string().min(1),
|
|
60
|
+
})
|
|
61
|
+
.strict(),
|
|
62
|
+
]);
|
|
63
|
+
export const gltsExportCancelledResultSchema = z
|
|
64
|
+
.object({
|
|
65
|
+
type: z.literal(gltsExportMessageTypes.cancelled),
|
|
66
|
+
requestId: z.string().min(1),
|
|
67
|
+
})
|
|
68
|
+
.strict();
|
|
69
|
+
export const gltsExportFrameMessageSchema = z.union([
|
|
70
|
+
gltsExportResultSchema,
|
|
71
|
+
gltsExportCancelledResultSchema,
|
|
72
|
+
]);
|
|
73
|
+
export const cameraMessageTypes = {
|
|
74
|
+
capture: "drawcall:camera:capture",
|
|
75
|
+
captured: "drawcall:camera:captured",
|
|
76
|
+
unavailable: "drawcall:camera:unavailable",
|
|
77
|
+
};
|
|
78
|
+
export const sourceFileMessageTypes = {
|
|
79
|
+
changed: "drawcall:source-files:changed",
|
|
80
|
+
reloadResult: "drawcall:source-file:reload-result",
|
|
81
|
+
};
|
|
82
|
+
export const sourceFileChangeSchema = z
|
|
83
|
+
.object({
|
|
84
|
+
path: projectPathSchema,
|
|
85
|
+
revision: z.number().int().nonnegative(),
|
|
86
|
+
})
|
|
87
|
+
.strict();
|
|
88
|
+
export const sourceFilesChangedMessageSchema = z
|
|
89
|
+
.object({
|
|
90
|
+
type: z.literal(sourceFileMessageTypes.changed),
|
|
91
|
+
changes: z.array(sourceFileChangeSchema).min(1),
|
|
92
|
+
})
|
|
93
|
+
.strict();
|
|
94
|
+
const sourceFileReloadResultBaseSchema = z.object({
|
|
95
|
+
type: z.literal(sourceFileMessageTypes.reloadResult),
|
|
96
|
+
path: projectPathSchema,
|
|
97
|
+
revision: z.number().int().nonnegative(),
|
|
98
|
+
});
|
|
99
|
+
export const sourceFileReloadResultSchema = z.discriminatedUnion("ok", [
|
|
100
|
+
sourceFileReloadResultBaseSchema.extend({ ok: z.literal(true) }).strict(),
|
|
101
|
+
sourceFileReloadResultBaseSchema
|
|
102
|
+
.extend({ ok: z.literal(false), error: z.string().min(1) })
|
|
103
|
+
.strict(),
|
|
104
|
+
]);
|
|
105
|
+
export const cameraCaptureCommandSchema = z
|
|
106
|
+
.object({
|
|
107
|
+
type: z.literal(cameraMessageTypes.capture),
|
|
108
|
+
requestId: z.string().min(1),
|
|
109
|
+
})
|
|
110
|
+
.strict();
|
|
111
|
+
export const cameraCaptureResultSchema = z.discriminatedUnion("type", [
|
|
112
|
+
z
|
|
113
|
+
.object({
|
|
114
|
+
type: z.literal(cameraMessageTypes.captured),
|
|
115
|
+
requestId: z.string().min(1),
|
|
116
|
+
camera: cameraPoseSchema,
|
|
117
|
+
})
|
|
118
|
+
.strict(),
|
|
119
|
+
z
|
|
120
|
+
.object({
|
|
121
|
+
type: z.literal(cameraMessageTypes.unavailable),
|
|
122
|
+
requestId: z.string().min(1),
|
|
123
|
+
reason: z.enum([
|
|
124
|
+
"immersive-active",
|
|
125
|
+
"not-inspecting",
|
|
126
|
+
"runtime-unavailable",
|
|
127
|
+
]),
|
|
128
|
+
})
|
|
129
|
+
.strict(),
|
|
130
|
+
]);
|
|
14
131
|
export const inspectionCommandSchema = z
|
|
15
132
|
.object({
|
|
16
133
|
type: z.literal(inspectionMessageTypes.set),
|
|
@@ -19,6 +136,7 @@ export const inspectionCommandSchema = z
|
|
|
19
136
|
})
|
|
20
137
|
.strict();
|
|
21
138
|
export const inspectionFrameMessageSchema = z.discriminatedUnion("type", [
|
|
139
|
+
z.object({ type: z.literal(inspectionMessageTypes.failed) }).strict(),
|
|
22
140
|
z.object({ type: z.literal(inspectionMessageTypes.loading) }).strict(),
|
|
23
141
|
z.object({ type: z.literal(inspectionMessageTypes.ready) }).strict(),
|
|
24
142
|
z
|
package/dist/v1/contract.d.ts
CHANGED
|
@@ -115,6 +115,20 @@ export declare const contract: {
|
|
|
115
115
|
createdAt: z.ZodString;
|
|
116
116
|
updatedAt: z.ZodString;
|
|
117
117
|
type: z.ZodLiteral<"glts">;
|
|
118
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
position: z.ZodObject<{
|
|
120
|
+
x: z.ZodNumber;
|
|
121
|
+
y: z.ZodNumber;
|
|
122
|
+
z: z.ZodNumber;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
quaternion: z.ZodObject<{
|
|
125
|
+
x: z.ZodNumber;
|
|
126
|
+
y: z.ZodNumber;
|
|
127
|
+
z: z.ZodNumber;
|
|
128
|
+
w: z.ZodNumber;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
}, z.core.$strict>>;
|
|
131
|
+
contentRevision: z.ZodNumber;
|
|
118
132
|
}, z.core.$strip>, z.ZodObject<{
|
|
119
133
|
id: z.ZodString;
|
|
120
134
|
projectId: z.ZodString;
|
|
@@ -211,6 +225,20 @@ export declare const contract: {
|
|
|
211
225
|
createdAt: z.ZodString;
|
|
212
226
|
updatedAt: z.ZodString;
|
|
213
227
|
type: z.ZodLiteral<"glts">;
|
|
228
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
position: z.ZodObject<{
|
|
230
|
+
x: z.ZodNumber;
|
|
231
|
+
y: z.ZodNumber;
|
|
232
|
+
z: z.ZodNumber;
|
|
233
|
+
}, z.core.$strict>;
|
|
234
|
+
quaternion: z.ZodObject<{
|
|
235
|
+
x: z.ZodNumber;
|
|
236
|
+
y: z.ZodNumber;
|
|
237
|
+
z: z.ZodNumber;
|
|
238
|
+
w: z.ZodNumber;
|
|
239
|
+
}, z.core.$strict>;
|
|
240
|
+
}, z.core.$strict>>;
|
|
241
|
+
contentRevision: z.ZodNumber;
|
|
214
242
|
}, z.core.$strip>, z.ZodObject<{
|
|
215
243
|
id: z.ZodString;
|
|
216
244
|
projectId: z.ZodString;
|
|
@@ -301,6 +329,20 @@ export declare const contract: {
|
|
|
301
329
|
createdAt: z.ZodString;
|
|
302
330
|
updatedAt: z.ZodString;
|
|
303
331
|
type: z.ZodLiteral<"glts">;
|
|
332
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
position: z.ZodObject<{
|
|
334
|
+
x: z.ZodNumber;
|
|
335
|
+
y: z.ZodNumber;
|
|
336
|
+
z: z.ZodNumber;
|
|
337
|
+
}, z.core.$strict>;
|
|
338
|
+
quaternion: z.ZodObject<{
|
|
339
|
+
x: z.ZodNumber;
|
|
340
|
+
y: z.ZodNumber;
|
|
341
|
+
z: z.ZodNumber;
|
|
342
|
+
w: z.ZodNumber;
|
|
343
|
+
}, z.core.$strict>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
contentRevision: z.ZodNumber;
|
|
304
346
|
}, z.core.$strip>, z.ZodObject<{
|
|
305
347
|
id: z.ZodString;
|
|
306
348
|
projectId: z.ZodString;
|
|
@@ -379,6 +421,221 @@ export declare const contract: {
|
|
|
379
421
|
createdAt: z.ZodString;
|
|
380
422
|
updatedAt: z.ZodString;
|
|
381
423
|
type: z.ZodLiteral<"glts">;
|
|
424
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
425
|
+
position: z.ZodObject<{
|
|
426
|
+
x: z.ZodNumber;
|
|
427
|
+
y: z.ZodNumber;
|
|
428
|
+
z: z.ZodNumber;
|
|
429
|
+
}, z.core.$strict>;
|
|
430
|
+
quaternion: z.ZodObject<{
|
|
431
|
+
x: z.ZodNumber;
|
|
432
|
+
y: z.ZodNumber;
|
|
433
|
+
z: z.ZodNumber;
|
|
434
|
+
w: z.ZodNumber;
|
|
435
|
+
}, z.core.$strict>;
|
|
436
|
+
}, z.core.$strict>>;
|
|
437
|
+
contentRevision: z.ZodNumber;
|
|
438
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
439
|
+
id: z.ZodString;
|
|
440
|
+
projectId: z.ZodString;
|
|
441
|
+
name: z.ZodString;
|
|
442
|
+
x: z.ZodNumber;
|
|
443
|
+
y: z.ZodNumber;
|
|
444
|
+
width: z.ZodNumber;
|
|
445
|
+
height: z.ZodNumber;
|
|
446
|
+
viewUrl: z.ZodString;
|
|
447
|
+
createdAt: z.ZodString;
|
|
448
|
+
updatedAt: z.ZodString;
|
|
449
|
+
type: z.ZodLiteral<"image">;
|
|
450
|
+
file: z.ZodString;
|
|
451
|
+
provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
452
|
+
kind: z.ZodLiteral<"generated">;
|
|
453
|
+
operation: z.ZodEnum<{
|
|
454
|
+
generate: "generate";
|
|
455
|
+
edit: "edit";
|
|
456
|
+
}>;
|
|
457
|
+
prompt: z.ZodString;
|
|
458
|
+
references: z.ZodArray<z.ZodObject<{
|
|
459
|
+
frameId: z.ZodString;
|
|
460
|
+
frameUpdatedAt: z.ZodString;
|
|
461
|
+
}, z.core.$strip>>;
|
|
462
|
+
result: z.ZodEnum<{
|
|
463
|
+
replace: "replace";
|
|
464
|
+
new: "new";
|
|
465
|
+
}>;
|
|
466
|
+
provider: z.ZodLiteral<"fal-ai">;
|
|
467
|
+
model: z.ZodLiteral<"openai/gpt-image-2">;
|
|
468
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
469
|
+
kind: z.ZodLiteral<"generated">;
|
|
470
|
+
operation: z.ZodEnum<{
|
|
471
|
+
generate: "generate";
|
|
472
|
+
edit: "edit";
|
|
473
|
+
}>;
|
|
474
|
+
prompt: z.ZodString;
|
|
475
|
+
references: z.ZodArray<z.ZodObject<{
|
|
476
|
+
frameId: z.ZodString;
|
|
477
|
+
frameUpdatedAt: z.ZodString;
|
|
478
|
+
}, z.core.$strip>>;
|
|
479
|
+
result: z.ZodEnum<{
|
|
480
|
+
replace: "replace";
|
|
481
|
+
new: "new";
|
|
482
|
+
}>;
|
|
483
|
+
provider: z.ZodLiteral<"cloudflare-workers-ai">;
|
|
484
|
+
model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
|
|
485
|
+
}, z.core.$strip>], "provider">>;
|
|
486
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
487
|
+
id: z.ZodString;
|
|
488
|
+
projectId: z.ZodString;
|
|
489
|
+
name: z.ZodString;
|
|
490
|
+
x: z.ZodNumber;
|
|
491
|
+
y: z.ZodNumber;
|
|
492
|
+
width: z.ZodNumber;
|
|
493
|
+
height: z.ZodNumber;
|
|
494
|
+
viewUrl: z.ZodString;
|
|
495
|
+
createdAt: z.ZodString;
|
|
496
|
+
updatedAt: z.ZodString;
|
|
497
|
+
type: z.ZodLiteral<"market">;
|
|
498
|
+
asset: z.ZodString;
|
|
499
|
+
}, z.core.$strip>], "type">, Record<never, never>, Record<never, never>>;
|
|
500
|
+
setCamera: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
501
|
+
project: z.ZodString;
|
|
502
|
+
frame: z.ZodString;
|
|
503
|
+
camera: z.ZodObject<{
|
|
504
|
+
position: z.ZodObject<{
|
|
505
|
+
x: z.ZodNumber;
|
|
506
|
+
y: z.ZodNumber;
|
|
507
|
+
z: z.ZodNumber;
|
|
508
|
+
}, z.core.$strict>;
|
|
509
|
+
quaternion: z.ZodObject<{
|
|
510
|
+
x: z.ZodNumber;
|
|
511
|
+
y: z.ZodNumber;
|
|
512
|
+
z: z.ZodNumber;
|
|
513
|
+
w: z.ZodNumber;
|
|
514
|
+
}, z.core.$strict>;
|
|
515
|
+
}, z.core.$strict>;
|
|
516
|
+
expectedContentRevision: z.ZodNumber;
|
|
517
|
+
expectedUpdatedAt: z.ZodString;
|
|
518
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
519
|
+
id: z.ZodString;
|
|
520
|
+
projectId: z.ZodString;
|
|
521
|
+
name: z.ZodString;
|
|
522
|
+
x: z.ZodNumber;
|
|
523
|
+
y: z.ZodNumber;
|
|
524
|
+
width: z.ZodNumber;
|
|
525
|
+
height: z.ZodNumber;
|
|
526
|
+
viewUrl: z.ZodString;
|
|
527
|
+
createdAt: z.ZodString;
|
|
528
|
+
updatedAt: z.ZodString;
|
|
529
|
+
type: z.ZodLiteral<"glts">;
|
|
530
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
531
|
+
position: z.ZodObject<{
|
|
532
|
+
x: z.ZodNumber;
|
|
533
|
+
y: z.ZodNumber;
|
|
534
|
+
z: z.ZodNumber;
|
|
535
|
+
}, z.core.$strict>;
|
|
536
|
+
quaternion: z.ZodObject<{
|
|
537
|
+
x: z.ZodNumber;
|
|
538
|
+
y: z.ZodNumber;
|
|
539
|
+
z: z.ZodNumber;
|
|
540
|
+
w: z.ZodNumber;
|
|
541
|
+
}, z.core.$strict>;
|
|
542
|
+
}, z.core.$strict>>;
|
|
543
|
+
contentRevision: z.ZodNumber;
|
|
544
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
545
|
+
id: z.ZodString;
|
|
546
|
+
projectId: z.ZodString;
|
|
547
|
+
name: z.ZodString;
|
|
548
|
+
x: z.ZodNumber;
|
|
549
|
+
y: z.ZodNumber;
|
|
550
|
+
width: z.ZodNumber;
|
|
551
|
+
height: z.ZodNumber;
|
|
552
|
+
viewUrl: z.ZodString;
|
|
553
|
+
createdAt: z.ZodString;
|
|
554
|
+
updatedAt: z.ZodString;
|
|
555
|
+
type: z.ZodLiteral<"image">;
|
|
556
|
+
file: z.ZodString;
|
|
557
|
+
provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
558
|
+
kind: z.ZodLiteral<"generated">;
|
|
559
|
+
operation: z.ZodEnum<{
|
|
560
|
+
generate: "generate";
|
|
561
|
+
edit: "edit";
|
|
562
|
+
}>;
|
|
563
|
+
prompt: z.ZodString;
|
|
564
|
+
references: z.ZodArray<z.ZodObject<{
|
|
565
|
+
frameId: z.ZodString;
|
|
566
|
+
frameUpdatedAt: z.ZodString;
|
|
567
|
+
}, z.core.$strip>>;
|
|
568
|
+
result: z.ZodEnum<{
|
|
569
|
+
replace: "replace";
|
|
570
|
+
new: "new";
|
|
571
|
+
}>;
|
|
572
|
+
provider: z.ZodLiteral<"fal-ai">;
|
|
573
|
+
model: z.ZodLiteral<"openai/gpt-image-2">;
|
|
574
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
575
|
+
kind: z.ZodLiteral<"generated">;
|
|
576
|
+
operation: z.ZodEnum<{
|
|
577
|
+
generate: "generate";
|
|
578
|
+
edit: "edit";
|
|
579
|
+
}>;
|
|
580
|
+
prompt: z.ZodString;
|
|
581
|
+
references: z.ZodArray<z.ZodObject<{
|
|
582
|
+
frameId: z.ZodString;
|
|
583
|
+
frameUpdatedAt: z.ZodString;
|
|
584
|
+
}, z.core.$strip>>;
|
|
585
|
+
result: z.ZodEnum<{
|
|
586
|
+
replace: "replace";
|
|
587
|
+
new: "new";
|
|
588
|
+
}>;
|
|
589
|
+
provider: z.ZodLiteral<"cloudflare-workers-ai">;
|
|
590
|
+
model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
|
|
591
|
+
}, z.core.$strip>], "provider">>;
|
|
592
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
593
|
+
id: z.ZodString;
|
|
594
|
+
projectId: z.ZodString;
|
|
595
|
+
name: z.ZodString;
|
|
596
|
+
x: z.ZodNumber;
|
|
597
|
+
y: z.ZodNumber;
|
|
598
|
+
width: z.ZodNumber;
|
|
599
|
+
height: z.ZodNumber;
|
|
600
|
+
viewUrl: z.ZodString;
|
|
601
|
+
createdAt: z.ZodString;
|
|
602
|
+
updatedAt: z.ZodString;
|
|
603
|
+
type: z.ZodLiteral<"market">;
|
|
604
|
+
asset: z.ZodString;
|
|
605
|
+
}, z.core.$strip>], "type">, Record<never, never>, Record<never, never>>;
|
|
606
|
+
setLayout: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
607
|
+
project: z.ZodString;
|
|
608
|
+
frame: z.ZodString;
|
|
609
|
+
x: z.ZodNumber;
|
|
610
|
+
y: z.ZodNumber;
|
|
611
|
+
width: z.ZodNumber;
|
|
612
|
+
height: z.ZodNumber;
|
|
613
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
614
|
+
id: z.ZodString;
|
|
615
|
+
projectId: z.ZodString;
|
|
616
|
+
name: z.ZodString;
|
|
617
|
+
x: z.ZodNumber;
|
|
618
|
+
y: z.ZodNumber;
|
|
619
|
+
width: z.ZodNumber;
|
|
620
|
+
height: z.ZodNumber;
|
|
621
|
+
viewUrl: z.ZodString;
|
|
622
|
+
createdAt: z.ZodString;
|
|
623
|
+
updatedAt: z.ZodString;
|
|
624
|
+
type: z.ZodLiteral<"glts">;
|
|
625
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
626
|
+
position: z.ZodObject<{
|
|
627
|
+
x: z.ZodNumber;
|
|
628
|
+
y: z.ZodNumber;
|
|
629
|
+
z: z.ZodNumber;
|
|
630
|
+
}, z.core.$strict>;
|
|
631
|
+
quaternion: z.ZodObject<{
|
|
632
|
+
x: z.ZodNumber;
|
|
633
|
+
y: z.ZodNumber;
|
|
634
|
+
z: z.ZodNumber;
|
|
635
|
+
w: z.ZodNumber;
|
|
636
|
+
}, z.core.$strict>;
|
|
637
|
+
}, z.core.$strict>>;
|
|
638
|
+
contentRevision: z.ZodNumber;
|
|
382
639
|
}, z.core.$strip>, z.ZodObject<{
|
|
383
640
|
id: z.ZodString;
|
|
384
641
|
projectId: z.ZodString;
|
|
@@ -456,6 +713,53 @@ export declare const contract: {
|
|
|
456
713
|
height: z.ZodNumber;
|
|
457
714
|
mediaType: z.ZodLiteral<"image/png">;
|
|
458
715
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
716
|
+
prepareExport: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
717
|
+
project: z.ZodString;
|
|
718
|
+
frame: z.ZodString;
|
|
719
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
720
|
+
frameId: z.ZodString;
|
|
721
|
+
frameName: z.ZodString;
|
|
722
|
+
projectId: z.ZodString;
|
|
723
|
+
type: z.ZodLiteral<"glts">;
|
|
724
|
+
runtime: z.ZodObject<{
|
|
725
|
+
gltf: z.ZodObject<{
|
|
726
|
+
filename: z.ZodString;
|
|
727
|
+
}, z.core.$strip>;
|
|
728
|
+
stl: z.ZodObject<{
|
|
729
|
+
filename: z.ZodString;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
}, z.core.$strip>;
|
|
732
|
+
sourceArchive: z.ZodNullable<z.ZodObject<{
|
|
733
|
+
filename: z.ZodString;
|
|
734
|
+
url: z.ZodString;
|
|
735
|
+
mediaType: z.ZodLiteral<"application/zip">;
|
|
736
|
+
}, z.core.$strict>>;
|
|
737
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
738
|
+
frameId: z.ZodString;
|
|
739
|
+
frameName: z.ZodString;
|
|
740
|
+
projectId: z.ZodString;
|
|
741
|
+
type: z.ZodLiteral<"image">;
|
|
742
|
+
download: z.ZodObject<{
|
|
743
|
+
filename: z.ZodString;
|
|
744
|
+
url: z.ZodString;
|
|
745
|
+
mediaType: z.ZodEnum<{
|
|
746
|
+
"image/png": "image/png";
|
|
747
|
+
"image/jpeg": "image/jpeg";
|
|
748
|
+
"image/webp": "image/webp";
|
|
749
|
+
}>;
|
|
750
|
+
}, z.core.$strict>;
|
|
751
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
752
|
+
frameId: z.ZodString;
|
|
753
|
+
frameName: z.ZodString;
|
|
754
|
+
projectId: z.ZodString;
|
|
755
|
+
type: z.ZodLiteral<"market">;
|
|
756
|
+
asset: z.ZodString;
|
|
757
|
+
download: z.ZodObject<{
|
|
758
|
+
filename: z.ZodString;
|
|
759
|
+
url: z.ZodString;
|
|
760
|
+
mediaType: z.ZodLiteral<"application/zip">;
|
|
761
|
+
}, z.core.$strict>;
|
|
762
|
+
}, z.core.$strip>], "type">, Record<never, never>, Record<never, never>>;
|
|
459
763
|
};
|
|
460
764
|
filesystem: {
|
|
461
765
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|