@scalebun-release/protocol 2.0.3
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/LICENSE +21 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/enums.d.ts +23 -0
- package/dist/internal/enums.d.ts.map +1 -0
- package/dist/internal/enums.js +28 -0
- package/dist/internal/enums.js.map +1 -0
- package/dist/internal/envelope.d.ts +4501 -0
- package/dist/internal/envelope.d.ts.map +1 -0
- package/dist/internal/envelope.js +56 -0
- package/dist/internal/envelope.js.map +1 -0
- package/dist/internal/frames.d.ts +390 -0
- package/dist/internal/frames.d.ts.map +1 -0
- package/dist/internal/frames.js +89 -0
- package/dist/internal/frames.js.map +1 -0
- package/dist/internal/items.d.ts +5900 -0
- package/dist/internal/items.d.ts.map +1 -0
- package/dist/internal/items.js +334 -0
- package/dist/internal/items.js.map +1 -0
- package/dist/internal/validation.d.ts +18 -0
- package/dist/internal/validation.d.ts.map +1 -0
- package/dist/internal/validation.js +32 -0
- package/dist/internal/validation.js.map +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/internal/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAG,CAAU,CAAC;AAEzC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;gCAUb,CAAC;AAEjB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;gCAOV,CAAC;AAEjB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQd,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PlatformSchema, RendererSchema } from './enums.js';
|
|
3
|
+
import { ItemSchema } from './items.js';
|
|
4
|
+
/**
|
|
5
|
+
* The wire schema version. Bump ONLY on a breaking change — the protocol evolves additively (new
|
|
6
|
+
* platforms / new optional fields don't bump it). Backend supports N and N-1.
|
|
7
|
+
*/
|
|
8
|
+
export const SCHEMA_VERSION = 1;
|
|
9
|
+
export const ClientInfoSchema = z.object({
|
|
10
|
+
platform: PlatformSchema, // open enum — future platforms "just work"
|
|
11
|
+
renderer: RendererSchema,
|
|
12
|
+
sdk: z.object({ name: z.string(), version: z.string() }),
|
|
13
|
+
});
|
|
14
|
+
export const DeviceInfoSchema = z
|
|
15
|
+
.object({
|
|
16
|
+
id: z.string().min(1),
|
|
17
|
+
model: z.string().optional(),
|
|
18
|
+
os: z.string().optional(),
|
|
19
|
+
osVersion: z.string().optional(),
|
|
20
|
+
// web maps browser identity here (e.g. "Chrome on macOS" — matches the backend Device label)
|
|
21
|
+
browser: z.string().optional(),
|
|
22
|
+
browserVersion: z.string().optional(),
|
|
23
|
+
})
|
|
24
|
+
.passthrough();
|
|
25
|
+
export const AppInfoSchema = z
|
|
26
|
+
.object({
|
|
27
|
+
version: z.string().optional(),
|
|
28
|
+
build: z.union([z.string(), z.number()]).optional(),
|
|
29
|
+
environment: z.string().optional(),
|
|
30
|
+
release: z.string().optional(),
|
|
31
|
+
})
|
|
32
|
+
.passthrough();
|
|
33
|
+
export const ContextInfoSchema = z
|
|
34
|
+
.object({
|
|
35
|
+
locale: z.string().optional(),
|
|
36
|
+
timezone: z.string().optional(),
|
|
37
|
+
networkType: z.string().optional(),
|
|
38
|
+
url: z.string().optional(),
|
|
39
|
+
viewport: z.object({ width: z.number(), height: z.number() }).optional(),
|
|
40
|
+
})
|
|
41
|
+
.passthrough();
|
|
42
|
+
/**
|
|
43
|
+
* The unified envelope. One session = one container; `items` is the mixed signal stream. Every
|
|
44
|
+
* platform POSTs this exact shape to `/ingestion/sessions/:sessionId/batch`.
|
|
45
|
+
*/
|
|
46
|
+
export const SessionEnvelopeSchema = z.object({
|
|
47
|
+
schemaVersion: z.literal(SCHEMA_VERSION),
|
|
48
|
+
sessionId: z.string().min(1),
|
|
49
|
+
sentAt: z.number(),
|
|
50
|
+
client: ClientInfoSchema,
|
|
51
|
+
device: DeviceInfoSchema,
|
|
52
|
+
app: AppInfoSchema.optional(),
|
|
53
|
+
context: ContextInfoSchema.optional(),
|
|
54
|
+
items: z.array(ItemSchema),
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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0,0 +1,390 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FrameSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"renderer", [z.ZodObject<{
|
|
3
|
+
renderer: z.ZodLiteral<"screenshot">;
|
|
4
|
+
imageData: z.ZodOptional<z.ZodString>;
|
|
5
|
+
storageKey: z.ZodOptional<z.ZodString>;
|
|
6
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
7
|
+
format: z.ZodOptional<z.ZodString>;
|
|
8
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
14
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
16
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
17
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
19
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
route: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
23
|
+
renderer: z.ZodLiteral<"screenshot">;
|
|
24
|
+
imageData: z.ZodOptional<z.ZodString>;
|
|
25
|
+
storageKey: z.ZodOptional<z.ZodString>;
|
|
26
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
27
|
+
format: z.ZodOptional<z.ZodString>;
|
|
28
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
32
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
34
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
36
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
37
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
39
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
41
|
+
route: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
43
|
+
renderer: z.ZodLiteral<"screenshot">;
|
|
44
|
+
imageData: z.ZodOptional<z.ZodString>;
|
|
45
|
+
storageKey: z.ZodOptional<z.ZodString>;
|
|
46
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
47
|
+
format: z.ZodOptional<z.ZodString>;
|
|
48
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
54
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
56
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
57
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
59
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
61
|
+
route: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
63
|
+
renderer: z.ZodLiteral<"dom">;
|
|
64
|
+
snapshot: z.ZodOptional<z.ZodUnknown>;
|
|
65
|
+
mutations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
66
|
+
adoptedStyles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
67
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
width: z.ZodNumber;
|
|
69
|
+
height: z.ZodNumber;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
}, {
|
|
74
|
+
width: number;
|
|
75
|
+
height: number;
|
|
76
|
+
}>>;
|
|
77
|
+
href: z.ZodOptional<z.ZodString>;
|
|
78
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
79
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
81
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
82
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
83
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
84
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
86
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
88
|
+
route: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
90
|
+
renderer: z.ZodLiteral<"dom">;
|
|
91
|
+
snapshot: z.ZodOptional<z.ZodUnknown>;
|
|
92
|
+
mutations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
93
|
+
adoptedStyles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
94
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
width: z.ZodNumber;
|
|
96
|
+
height: z.ZodNumber;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
width: number;
|
|
99
|
+
height: number;
|
|
100
|
+
}, {
|
|
101
|
+
width: number;
|
|
102
|
+
height: number;
|
|
103
|
+
}>>;
|
|
104
|
+
href: z.ZodOptional<z.ZodString>;
|
|
105
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
106
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
108
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
109
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
110
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
111
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
113
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
114
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
115
|
+
route: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
117
|
+
renderer: z.ZodLiteral<"dom">;
|
|
118
|
+
snapshot: z.ZodOptional<z.ZodUnknown>;
|
|
119
|
+
mutations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
120
|
+
adoptedStyles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
121
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
width: z.ZodNumber;
|
|
123
|
+
height: z.ZodNumber;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
width: number;
|
|
126
|
+
height: number;
|
|
127
|
+
}, {
|
|
128
|
+
width: number;
|
|
129
|
+
height: number;
|
|
130
|
+
}>>;
|
|
131
|
+
href: z.ZodOptional<z.ZodString>;
|
|
132
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
133
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
135
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
136
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
137
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
138
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
140
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
141
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
route: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
144
|
+
renderer: z.ZodLiteral<"view-hierarchy">;
|
|
145
|
+
tree: z.ZodOptional<z.ZodUnknown>;
|
|
146
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
147
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
149
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
150
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
151
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
152
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
154
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
155
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
156
|
+
route: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
158
|
+
renderer: z.ZodLiteral<"view-hierarchy">;
|
|
159
|
+
tree: z.ZodOptional<z.ZodUnknown>;
|
|
160
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
161
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
163
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
164
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
165
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
166
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
168
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
170
|
+
route: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
172
|
+
renderer: z.ZodLiteral<"view-hierarchy">;
|
|
173
|
+
tree: z.ZodOptional<z.ZodUnknown>;
|
|
174
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
175
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
177
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
178
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
179
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
180
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
182
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
183
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
184
|
+
route: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
186
|
+
renderer: z.ZodLiteral<"canvas">;
|
|
187
|
+
bitmapKey: z.ZodOptional<z.ZodString>;
|
|
188
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
191
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
193
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
194
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
195
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
196
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
198
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
199
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
200
|
+
route: z.ZodOptional<z.ZodString>;
|
|
201
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
202
|
+
renderer: z.ZodLiteral<"canvas">;
|
|
203
|
+
bitmapKey: z.ZodOptional<z.ZodString>;
|
|
204
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
207
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
209
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
210
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
211
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
212
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
214
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
215
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
216
|
+
route: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
218
|
+
renderer: z.ZodLiteral<"canvas">;
|
|
219
|
+
bitmapKey: z.ZodOptional<z.ZodString>;
|
|
220
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
223
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
225
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
226
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
227
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
228
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
229
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
230
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
231
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
232
|
+
route: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.ZodTypeAny, "passthrough">>]>, z.objectOutputType<{
|
|
234
|
+
renderer: z.ZodLiteral<"screenshot">;
|
|
235
|
+
imageData: z.ZodOptional<z.ZodString>;
|
|
236
|
+
storageKey: z.ZodOptional<z.ZodString>;
|
|
237
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
238
|
+
format: z.ZodOptional<z.ZodString>;
|
|
239
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
243
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
245
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
246
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
247
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
248
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
250
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
251
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
252
|
+
route: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
|
|
254
|
+
renderer: z.ZodLiteral<"dom">;
|
|
255
|
+
snapshot: z.ZodOptional<z.ZodUnknown>;
|
|
256
|
+
mutations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
257
|
+
adoptedStyles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
258
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
259
|
+
width: z.ZodNumber;
|
|
260
|
+
height: z.ZodNumber;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
width: number;
|
|
263
|
+
height: number;
|
|
264
|
+
}, {
|
|
265
|
+
width: number;
|
|
266
|
+
height: number;
|
|
267
|
+
}>>;
|
|
268
|
+
href: z.ZodOptional<z.ZodString>;
|
|
269
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
270
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
272
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
273
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
274
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
275
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
276
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
277
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
278
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
279
|
+
route: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
|
|
281
|
+
renderer: z.ZodLiteral<"view-hierarchy">;
|
|
282
|
+
tree: z.ZodOptional<z.ZodUnknown>;
|
|
283
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
284
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
286
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
287
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
288
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
289
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
290
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
291
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
292
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
293
|
+
route: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
|
|
295
|
+
renderer: z.ZodLiteral<"canvas">;
|
|
296
|
+
bitmapKey: z.ZodOptional<z.ZodString>;
|
|
297
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
299
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
300
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
301
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
302
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
303
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
304
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
305
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
306
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
307
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
308
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
309
|
+
route: z.ZodOptional<z.ZodString>;
|
|
310
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
311
|
+
renderer: z.ZodLiteral<"screenshot">;
|
|
312
|
+
imageData: z.ZodOptional<z.ZodString>;
|
|
313
|
+
storageKey: z.ZodOptional<z.ZodString>;
|
|
314
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
315
|
+
format: z.ZodOptional<z.ZodString>;
|
|
316
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
317
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
318
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
319
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
320
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
322
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
323
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
324
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
325
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
326
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
327
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
328
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
329
|
+
route: z.ZodOptional<z.ZodString>;
|
|
330
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
331
|
+
renderer: z.ZodLiteral<"dom">;
|
|
332
|
+
snapshot: z.ZodOptional<z.ZodUnknown>;
|
|
333
|
+
mutations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
334
|
+
adoptedStyles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
335
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
336
|
+
width: z.ZodNumber;
|
|
337
|
+
height: z.ZodNumber;
|
|
338
|
+
}, "strip", z.ZodTypeAny, {
|
|
339
|
+
width: number;
|
|
340
|
+
height: number;
|
|
341
|
+
}, {
|
|
342
|
+
width: number;
|
|
343
|
+
height: number;
|
|
344
|
+
}>>;
|
|
345
|
+
href: z.ZodOptional<z.ZodString>;
|
|
346
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
347
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
349
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
350
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
351
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
352
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
353
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
354
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
355
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
356
|
+
route: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
358
|
+
renderer: z.ZodLiteral<"view-hierarchy">;
|
|
359
|
+
tree: z.ZodOptional<z.ZodUnknown>;
|
|
360
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
361
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
363
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
364
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
365
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
366
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
367
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
368
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
369
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
370
|
+
route: z.ZodOptional<z.ZodString>;
|
|
371
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
372
|
+
renderer: z.ZodLiteral<"canvas">;
|
|
373
|
+
bitmapKey: z.ZodOptional<z.ZodString>;
|
|
374
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
375
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
376
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
377
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
378
|
+
frameType: z.ZodOptional<z.ZodEnum<["keyframe", "delta"]>>;
|
|
379
|
+
baseFrameId: z.ZodOptional<z.ZodString>;
|
|
380
|
+
timestamp: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
381
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
382
|
+
masked: z.ZodOptional<z.ZodBoolean>;
|
|
383
|
+
screenName: z.ZodOptional<z.ZodString>;
|
|
384
|
+
tabId: z.ZodOptional<z.ZodString>;
|
|
385
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
386
|
+
route: z.ZodOptional<z.ZodString>;
|
|
387
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
388
|
+
export type Frame = z.infer<typeof FrameSchema>;
|
|
389
|
+
export declare const FrameRendererSchema: z.ZodEnum<["dom", "screenshot", "view-hierarchy", "canvas"]>;
|
|
390
|
+
//# sourceMappingURL=frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../src/internal/frames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgExB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA4BpB,CAAC;AAEL,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,eAAO,MAAM,mBAAmB,8DAAiB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RendererSchema, TimestampSchema } from './enums.js';
|
|
3
|
+
/**
|
|
4
|
+
* Replay frames are the one place web and mobile genuinely differ. We absorb that with the
|
|
5
|
+
* `renderer` discriminator instead of separate endpoints:
|
|
6
|
+
*
|
|
7
|
+
* - screenshot → mobile (RN today): image keyframes/deltas (imageData | storageKey)
|
|
8
|
+
* - dom → web: a full DOM snapshot OR an array of incremental mutations
|
|
9
|
+
* - view-hierarchy → future native
|
|
10
|
+
* - canvas → future
|
|
11
|
+
*
|
|
12
|
+
* The existing RN `FrameDto` maps 1:1 onto the `screenshot` arm, so current mobile SDKs remain
|
|
13
|
+
* valid with zero changes. Renderer-specific payload constraints are enforced by `superRefine` so
|
|
14
|
+
* the OUTER item union (items.ts) can stay a clean discriminatedUnion on `kind`.
|
|
15
|
+
*/
|
|
16
|
+
const FrameCommon = {
|
|
17
|
+
frameId: z.string().optional(),
|
|
18
|
+
seq: z.number().optional(),
|
|
19
|
+
frameType: z.enum(['keyframe', 'delta']).optional(),
|
|
20
|
+
baseFrameId: z.string().optional(),
|
|
21
|
+
timestamp: TimestampSchema.optional(),
|
|
22
|
+
trigger: z.string().optional(),
|
|
23
|
+
masked: z.boolean().optional(),
|
|
24
|
+
screenName: z.string().optional(),
|
|
25
|
+
// Replay 2.0 (R0.5): where the frame happened — powers the keyframe index, per-tab timeline lane,
|
|
26
|
+
// and cross-device journeys. All optional → older SDKs/frames stay valid.
|
|
27
|
+
tabId: z.string().optional(),
|
|
28
|
+
viewId: z.string().optional(),
|
|
29
|
+
route: z.string().optional(),
|
|
30
|
+
};
|
|
31
|
+
const ScreenshotFrameFields = {
|
|
32
|
+
renderer: z.literal('screenshot'),
|
|
33
|
+
imageData: z.string().optional(),
|
|
34
|
+
storageKey: z.string().optional(),
|
|
35
|
+
contentType: z.string().optional(),
|
|
36
|
+
format: z.string().optional(),
|
|
37
|
+
width: z.number().optional(),
|
|
38
|
+
height: z.number().optional(),
|
|
39
|
+
sizeBytes: z.number().optional(),
|
|
40
|
+
};
|
|
41
|
+
const DomFrameFields = {
|
|
42
|
+
renderer: z.literal('dom'),
|
|
43
|
+
snapshot: z.unknown().optional(),
|
|
44
|
+
mutations: z.array(z.unknown()).optional(),
|
|
45
|
+
adoptedStyles: z.array(z.string()).optional(),
|
|
46
|
+
viewport: z.object({ width: z.number(), height: z.number() }).optional(),
|
|
47
|
+
href: z.string().optional(),
|
|
48
|
+
};
|
|
49
|
+
const ViewHierarchyFrameFields = {
|
|
50
|
+
renderer: z.literal('view-hierarchy'),
|
|
51
|
+
tree: z.unknown().optional(),
|
|
52
|
+
};
|
|
53
|
+
const CanvasFrameFields = {
|
|
54
|
+
renderer: z.literal('canvas'),
|
|
55
|
+
bitmapKey: z.string().optional(),
|
|
56
|
+
width: z.number().optional(),
|
|
57
|
+
height: z.number().optional(),
|
|
58
|
+
};
|
|
59
|
+
export const FrameSchema = z
|
|
60
|
+
.discriminatedUnion('renderer', [
|
|
61
|
+
z.object({ ...FrameCommon, ...ScreenshotFrameFields }).passthrough(),
|
|
62
|
+
z.object({ ...FrameCommon, ...DomFrameFields }).passthrough(),
|
|
63
|
+
z.object({ ...FrameCommon, ...ViewHierarchyFrameFields }).passthrough(),
|
|
64
|
+
z.object({ ...FrameCommon, ...CanvasFrameFields }).passthrough(),
|
|
65
|
+
])
|
|
66
|
+
.superRefine((frame, ctx) => {
|
|
67
|
+
if (frame.renderer === 'screenshot') {
|
|
68
|
+
const hasInline = 'imageData' in frame && frame.imageData != null;
|
|
69
|
+
const hasKey = 'storageKey' in frame && frame.storageKey != null;
|
|
70
|
+
if (hasInline && hasKey) {
|
|
71
|
+
ctx.addIssue({
|
|
72
|
+
code: z.ZodIssueCode.custom,
|
|
73
|
+
message: 'screenshot frame: provide exactly one of imageData or storageKey',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (frame.renderer === 'dom') {
|
|
78
|
+
const hasSnapshot = 'snapshot' in frame && frame.snapshot != null;
|
|
79
|
+
const hasMutations = 'mutations' in frame && frame.mutations != null;
|
|
80
|
+
if (hasSnapshot && hasMutations) {
|
|
81
|
+
ctx.addIssue({
|
|
82
|
+
code: z.ZodIssueCode.custom,
|
|
83
|
+
message: 'dom frame: provide either a snapshot (keyframe) or mutations (delta), not both',
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
export const FrameRendererSchema = RendererSchema;
|
|
89
|
+
//# sourceMappingURL=frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.js","sourceRoot":"","sources":["../../src/internal/frames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,GAAG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