@merittdev/horus-lens 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.cjs +31594 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +125 -0
- package/dist/browser.d.ts +125 -0
- package/dist/browser.js +24 -0
- package/dist/browser.js.map +1 -0
- package/dist/chunk-DU7HNRF4.js +1644 -0
- package/dist/chunk-DU7HNRF4.js.map +1 -0
- package/dist/chunk-DWOH2ENF.js +17613 -0
- package/dist/chunk-DWOH2ENF.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-S6S3ZZQA.js +17225 -0
- package/dist/chunk-S6S3ZZQA.js.map +1 -0
- package/dist/dashboard.cjs +19774 -0
- package/dist/dashboard.cjs.map +1 -0
- package/dist/dashboard.css +2233 -0
- package/dist/dashboard.d.cts +707 -0
- package/dist/dashboard.d.ts +707 -0
- package/dist/dashboard.js +2237 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/index.cjs +30040 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d-BA540Fae.d.ts +80 -0
- package/dist/index.d-Bzgtl7-B.d.cts +161 -0
- package/dist/index.d-Bzgtl7-B.d.ts +161 -0
- package/dist/index.d-DOCLVJGS.d.cts +80 -0
- package/dist/index.d.cts +906 -0
- package/dist/index.d.ts +906 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/lens.min.js +770 -0
- package/dist/lens.min.js.map +1 -0
- package/dist/react.cjs +31683 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +100 -0
- package/dist/react.d.ts +100 -0
- package/dist/react.js +108 -0
- package/dist/react.js.map +1 -0
- package/dist/rrweb-EYUUZIYR.js +30 -0
- package/dist/rrweb-EYUUZIYR.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Heavy payloads are uploaded to S3 as individual assets via presigned URLs;
|
|
5
|
+
* the finalize call carries only metadata + asset manifest.
|
|
6
|
+
*/
|
|
7
|
+
declare const AssetKindSchema: z.ZodEnum<{
|
|
8
|
+
replay: "replay";
|
|
9
|
+
console: "console";
|
|
10
|
+
network: "network";
|
|
11
|
+
dom: "dom";
|
|
12
|
+
screenshot: "screenshot";
|
|
13
|
+
attachment: "attachment";
|
|
14
|
+
}>;
|
|
15
|
+
type AssetKind = z.infer<typeof AssetKindSchema>;
|
|
16
|
+
declare const AssetRefSchema: z.ZodObject<{
|
|
17
|
+
kind: z.ZodEnum<{
|
|
18
|
+
replay: "replay";
|
|
19
|
+
console: "console";
|
|
20
|
+
network: "network";
|
|
21
|
+
dom: "dom";
|
|
22
|
+
screenshot: "screenshot";
|
|
23
|
+
attachment: "attachment";
|
|
24
|
+
}>;
|
|
25
|
+
key: z.ZodString;
|
|
26
|
+
contentType: z.ZodString;
|
|
27
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
type AssetRef = z.infer<typeof AssetRefSchema>;
|
|
30
|
+
declare const ReportStatusSchema: z.ZodEnum<{
|
|
31
|
+
initiated: "initiated";
|
|
32
|
+
submitted: "submitted";
|
|
33
|
+
triaged: "triaged";
|
|
34
|
+
linked: "linked";
|
|
35
|
+
resolved: "resolved";
|
|
36
|
+
}>;
|
|
37
|
+
type ReportStatus = z.infer<typeof ReportStatusSchema>;
|
|
38
|
+
declare const ReportMetadataSchema: z.ZodObject<{
|
|
39
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
40
|
+
annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
41
|
+
kind: z.ZodEnum<{
|
|
42
|
+
rect: "rect";
|
|
43
|
+
ellipse: "ellipse";
|
|
44
|
+
arrow: "arrow";
|
|
45
|
+
}>;
|
|
46
|
+
x: z.ZodNumber;
|
|
47
|
+
y: z.ZodNumber;
|
|
48
|
+
width: z.ZodNumber;
|
|
49
|
+
height: z.ZodNumber;
|
|
50
|
+
viewport: z.ZodObject<{
|
|
51
|
+
width: z.ZodNumber;
|
|
52
|
+
height: z.ZodNumber;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
}, z.core.$strip>>>;
|
|
55
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
domPath: z.ZodOptional<z.ZodString>;
|
|
57
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
58
|
+
text: z.ZodOptional<z.ZodString>;
|
|
59
|
+
boundingRect: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
x: z.ZodNumber;
|
|
61
|
+
y: z.ZodNumber;
|
|
62
|
+
width: z.ZodNumber;
|
|
63
|
+
height: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
env: z.ZodObject<{
|
|
68
|
+
url: z.ZodString;
|
|
69
|
+
route: z.ZodOptional<z.ZodString>;
|
|
70
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
71
|
+
userAgent: z.ZodString;
|
|
72
|
+
browser: z.ZodOptional<z.ZodString>;
|
|
73
|
+
os: z.ZodOptional<z.ZodString>;
|
|
74
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
desktop: "desktop";
|
|
76
|
+
tablet: "tablet";
|
|
77
|
+
mobile: "mobile";
|
|
78
|
+
}>>;
|
|
79
|
+
viewport: z.ZodObject<{
|
|
80
|
+
width: z.ZodNumber;
|
|
81
|
+
height: z.ZodNumber;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
screen: z.ZodObject<{
|
|
84
|
+
width: z.ZodNumber;
|
|
85
|
+
height: z.ZodNumber;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
devicePixelRatio: z.ZodNumber;
|
|
88
|
+
language: z.ZodString;
|
|
89
|
+
timezone: z.ZodString;
|
|
90
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
light: "light";
|
|
92
|
+
dark: "dark";
|
|
93
|
+
}>>;
|
|
94
|
+
online: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
capturedAt: z.ZodNumber;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
release: z.ZodOptional<z.ZodString>;
|
|
99
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
100
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
101
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
102
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
id: z.ZodOptional<z.ZodString>;
|
|
104
|
+
email: z.ZodOptional<z.ZodString>;
|
|
105
|
+
name: z.ZodOptional<z.ZodString>;
|
|
106
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
111
|
+
message: z.ZodString;
|
|
112
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
113
|
+
source: z.ZodEnum<{
|
|
114
|
+
"window.onerror": "window.onerror";
|
|
115
|
+
unhandledrejection: "unhandledrejection";
|
|
116
|
+
"console.error": "console.error";
|
|
117
|
+
"react-boundary": "react-boundary";
|
|
118
|
+
}>;
|
|
119
|
+
timestamp: z.ZodNumber;
|
|
120
|
+
}, z.core.$strip>>>;
|
|
121
|
+
consoleTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
122
|
+
level: z.ZodEnum<{
|
|
123
|
+
log: "log";
|
|
124
|
+
info: "info";
|
|
125
|
+
warn: "warn";
|
|
126
|
+
error: "error";
|
|
127
|
+
debug: "debug";
|
|
128
|
+
}>;
|
|
129
|
+
args: z.ZodArray<z.ZodString>;
|
|
130
|
+
timestamp: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>>>;
|
|
132
|
+
networkTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
133
|
+
method: z.ZodString;
|
|
134
|
+
url: z.ZodString;
|
|
135
|
+
status: z.ZodNullable<z.ZodNumber>;
|
|
136
|
+
ok: z.ZodNullable<z.ZodBoolean>;
|
|
137
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
138
|
+
requestType: z.ZodEnum<{
|
|
139
|
+
fetch: "fetch";
|
|
140
|
+
xhr: "xhr";
|
|
141
|
+
}>;
|
|
142
|
+
startedAt: z.ZodNumber;
|
|
143
|
+
error: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>>>;
|
|
145
|
+
sdk: z.ZodObject<{
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
version: z.ZodString;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
type ReportMetadata = z.infer<typeof ReportMetadataSchema>;
|
|
151
|
+
declare const ReportSchema: z.ZodObject<{
|
|
152
|
+
id: z.ZodString;
|
|
153
|
+
projectId: z.ZodString;
|
|
154
|
+
status: z.ZodEnum<{
|
|
155
|
+
initiated: "initiated";
|
|
156
|
+
submitted: "submitted";
|
|
157
|
+
triaged: "triaged";
|
|
158
|
+
linked: "linked";
|
|
159
|
+
resolved: "resolved";
|
|
160
|
+
}>;
|
|
161
|
+
createdAt: z.ZodString;
|
|
162
|
+
submittedAt: z.ZodNullable<z.ZodString>;
|
|
163
|
+
metadata: z.ZodNullable<z.ZodObject<{
|
|
164
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
165
|
+
annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
166
|
+
kind: z.ZodEnum<{
|
|
167
|
+
rect: "rect";
|
|
168
|
+
ellipse: "ellipse";
|
|
169
|
+
arrow: "arrow";
|
|
170
|
+
}>;
|
|
171
|
+
x: z.ZodNumber;
|
|
172
|
+
y: z.ZodNumber;
|
|
173
|
+
width: z.ZodNumber;
|
|
174
|
+
height: z.ZodNumber;
|
|
175
|
+
viewport: z.ZodObject<{
|
|
176
|
+
width: z.ZodNumber;
|
|
177
|
+
height: z.ZodNumber;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
}, z.core.$strip>>>;
|
|
180
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
domPath: z.ZodOptional<z.ZodString>;
|
|
182
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
183
|
+
text: z.ZodOptional<z.ZodString>;
|
|
184
|
+
boundingRect: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
x: z.ZodNumber;
|
|
186
|
+
y: z.ZodNumber;
|
|
187
|
+
width: z.ZodNumber;
|
|
188
|
+
height: z.ZodNumber;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
env: z.ZodObject<{
|
|
193
|
+
url: z.ZodString;
|
|
194
|
+
route: z.ZodOptional<z.ZodString>;
|
|
195
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
196
|
+
userAgent: z.ZodString;
|
|
197
|
+
browser: z.ZodOptional<z.ZodString>;
|
|
198
|
+
os: z.ZodOptional<z.ZodString>;
|
|
199
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
200
|
+
desktop: "desktop";
|
|
201
|
+
tablet: "tablet";
|
|
202
|
+
mobile: "mobile";
|
|
203
|
+
}>>;
|
|
204
|
+
viewport: z.ZodObject<{
|
|
205
|
+
width: z.ZodNumber;
|
|
206
|
+
height: z.ZodNumber;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
screen: z.ZodObject<{
|
|
209
|
+
width: z.ZodNumber;
|
|
210
|
+
height: z.ZodNumber;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
devicePixelRatio: z.ZodNumber;
|
|
213
|
+
language: z.ZodString;
|
|
214
|
+
timezone: z.ZodString;
|
|
215
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
216
|
+
light: "light";
|
|
217
|
+
dark: "dark";
|
|
218
|
+
}>>;
|
|
219
|
+
online: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
capturedAt: z.ZodNumber;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
223
|
+
release: z.ZodOptional<z.ZodString>;
|
|
224
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
225
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
226
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
227
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
id: z.ZodOptional<z.ZodString>;
|
|
229
|
+
email: z.ZodOptional<z.ZodString>;
|
|
230
|
+
name: z.ZodOptional<z.ZodString>;
|
|
231
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
236
|
+
message: z.ZodString;
|
|
237
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
238
|
+
source: z.ZodEnum<{
|
|
239
|
+
"window.onerror": "window.onerror";
|
|
240
|
+
unhandledrejection: "unhandledrejection";
|
|
241
|
+
"console.error": "console.error";
|
|
242
|
+
"react-boundary": "react-boundary";
|
|
243
|
+
}>;
|
|
244
|
+
timestamp: z.ZodNumber;
|
|
245
|
+
}, z.core.$strip>>>;
|
|
246
|
+
consoleTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
247
|
+
level: z.ZodEnum<{
|
|
248
|
+
log: "log";
|
|
249
|
+
info: "info";
|
|
250
|
+
warn: "warn";
|
|
251
|
+
error: "error";
|
|
252
|
+
debug: "debug";
|
|
253
|
+
}>;
|
|
254
|
+
args: z.ZodArray<z.ZodString>;
|
|
255
|
+
timestamp: z.ZodNumber;
|
|
256
|
+
}, z.core.$strip>>>;
|
|
257
|
+
networkTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
258
|
+
method: z.ZodString;
|
|
259
|
+
url: z.ZodString;
|
|
260
|
+
status: z.ZodNullable<z.ZodNumber>;
|
|
261
|
+
ok: z.ZodNullable<z.ZodBoolean>;
|
|
262
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
263
|
+
requestType: z.ZodEnum<{
|
|
264
|
+
fetch: "fetch";
|
|
265
|
+
xhr: "xhr";
|
|
266
|
+
}>;
|
|
267
|
+
startedAt: z.ZodNumber;
|
|
268
|
+
error: z.ZodOptional<z.ZodString>;
|
|
269
|
+
}, z.core.$strip>>>;
|
|
270
|
+
sdk: z.ZodObject<{
|
|
271
|
+
name: z.ZodString;
|
|
272
|
+
version: z.ZodString;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
}, z.core.$strip>>;
|
|
275
|
+
assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
276
|
+
kind: z.ZodEnum<{
|
|
277
|
+
replay: "replay";
|
|
278
|
+
console: "console";
|
|
279
|
+
network: "network";
|
|
280
|
+
dom: "dom";
|
|
281
|
+
screenshot: "screenshot";
|
|
282
|
+
attachment: "attachment";
|
|
283
|
+
}>;
|
|
284
|
+
key: z.ZodString;
|
|
285
|
+
contentType: z.ZodString;
|
|
286
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
287
|
+
}, z.core.$strip>>>;
|
|
288
|
+
externalIssue: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
289
|
+
provider: z.ZodString;
|
|
290
|
+
key: z.ZodString;
|
|
291
|
+
url: z.ZodString;
|
|
292
|
+
}, z.core.$strip>>>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
type Report = z.infer<typeof ReportSchema>;
|
|
295
|
+
declare const ReportSummarySchema: z.ZodObject<{
|
|
296
|
+
status: z.ZodEnum<{
|
|
297
|
+
initiated: "initiated";
|
|
298
|
+
submitted: "submitted";
|
|
299
|
+
triaged: "triaged";
|
|
300
|
+
linked: "linked";
|
|
301
|
+
resolved: "resolved";
|
|
302
|
+
}>;
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
projectId: z.ZodString;
|
|
305
|
+
createdAt: z.ZodString;
|
|
306
|
+
submittedAt: z.ZodNullable<z.ZodString>;
|
|
307
|
+
externalIssue: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
308
|
+
provider: z.ZodString;
|
|
309
|
+
key: z.ZodString;
|
|
310
|
+
url: z.ZodString;
|
|
311
|
+
}, z.core.$strip>>>;
|
|
312
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
313
|
+
url: z.ZodOptional<z.ZodString>;
|
|
314
|
+
errorCount: z.ZodDefault<z.ZodNumber>;
|
|
315
|
+
hasReplay: z.ZodDefault<z.ZodBoolean>;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
type ReportSummary = z.infer<typeof ReportSummarySchema>;
|
|
318
|
+
|
|
319
|
+
declare const IntegrationProviderSchema: z.ZodEnum<{
|
|
320
|
+
github: "github";
|
|
321
|
+
jira: "jira";
|
|
322
|
+
linear: "linear";
|
|
323
|
+
}>;
|
|
324
|
+
type IntegrationProvider = z.infer<typeof IntegrationProviderSchema>;
|
|
325
|
+
declare const IntegrationStatusSchema: z.ZodEnum<{
|
|
326
|
+
disconnected: "disconnected";
|
|
327
|
+
pending: "pending";
|
|
328
|
+
connected: "connected";
|
|
329
|
+
}>;
|
|
330
|
+
type IntegrationStatus = z.infer<typeof IntegrationStatusSchema>;
|
|
331
|
+
/**
|
|
332
|
+
* One integration per provider per project; at most ONE is `active` — the
|
|
333
|
+
* active one is the destination issues are routed to.
|
|
334
|
+
*/
|
|
335
|
+
/** Non-secret issue-routing settings, editable from the dashboard. */
|
|
336
|
+
declare const IntegrationConfigSchema: z.ZodObject<{
|
|
337
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
338
|
+
teamKey: z.ZodOptional<z.ZodString>;
|
|
339
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
340
|
+
issueType: z.ZodOptional<z.ZodString>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
|
|
343
|
+
declare const IntegrationSchema: z.ZodObject<{
|
|
344
|
+
provider: z.ZodEnum<{
|
|
345
|
+
github: "github";
|
|
346
|
+
jira: "jira";
|
|
347
|
+
linear: "linear";
|
|
348
|
+
}>;
|
|
349
|
+
status: z.ZodEnum<{
|
|
350
|
+
disconnected: "disconnected";
|
|
351
|
+
pending: "pending";
|
|
352
|
+
connected: "connected";
|
|
353
|
+
}>;
|
|
354
|
+
account: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
355
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
356
|
+
config: z.ZodDefault<z.ZodObject<{
|
|
357
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
358
|
+
teamKey: z.ZodOptional<z.ZodString>;
|
|
359
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
360
|
+
issueType: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, z.core.$strip>>;
|
|
362
|
+
}, z.core.$strip>;
|
|
363
|
+
type Integration = z.infer<typeof IntegrationSchema>;
|
|
364
|
+
/** Write-only S3 credentials. The secret is never returned by any endpoint. */
|
|
365
|
+
declare const S3ConfigInputSchema: z.ZodObject<{
|
|
366
|
+
bucket: z.ZodString;
|
|
367
|
+
region: z.ZodString;
|
|
368
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
369
|
+
accessKeyId: z.ZodString;
|
|
370
|
+
secretAccessKey: z.ZodString;
|
|
371
|
+
forcePathStyle: z.ZodOptional<z.ZodBoolean>;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
type S3ConfigInput = z.infer<typeof S3ConfigInputSchema>;
|
|
374
|
+
/** What the API returns about a project's S3 config — secret omitted, key masked. */
|
|
375
|
+
declare const S3ConfigPublicSchema: z.ZodObject<{
|
|
376
|
+
bucket: z.ZodString;
|
|
377
|
+
region: z.ZodString;
|
|
378
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
379
|
+
forcePathStyle: z.ZodOptional<z.ZodBoolean>;
|
|
380
|
+
accessKeyIdMasked: z.ZodString;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
type S3ConfigPublic = z.infer<typeof S3ConfigPublicSchema>;
|
|
383
|
+
declare const ProjectSchema: z.ZodObject<{
|
|
384
|
+
id: z.ZodString;
|
|
385
|
+
name: z.ZodString;
|
|
386
|
+
accessId: z.ZodString;
|
|
387
|
+
allowedOrigins: z.ZodArray<z.ZodString>;
|
|
388
|
+
destination: z.ZodNullable<z.ZodEnum<{
|
|
389
|
+
github: "github";
|
|
390
|
+
jira: "jira";
|
|
391
|
+
linear: "linear";
|
|
392
|
+
}>>;
|
|
393
|
+
dashboardUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
394
|
+
s3: z.ZodNullable<z.ZodObject<{
|
|
395
|
+
bucket: z.ZodString;
|
|
396
|
+
region: z.ZodString;
|
|
397
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
398
|
+
forcePathStyle: z.ZodOptional<z.ZodBoolean>;
|
|
399
|
+
accessKeyIdMasked: z.ZodString;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
onboardedAt: z.ZodNullable<z.ZodString>;
|
|
402
|
+
createdAt: z.ZodString;
|
|
403
|
+
}, z.core.$strip>;
|
|
404
|
+
type Project = z.infer<typeof ProjectSchema>;
|
|
405
|
+
/** POST /v1/projects — bootstrap auth (admin token). Secret is shown exactly once. */
|
|
406
|
+
declare const CreateProjectRequestSchema: z.ZodObject<{
|
|
407
|
+
name: z.ZodString;
|
|
408
|
+
allowedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
type CreateProjectRequest = z.infer<typeof CreateProjectRequestSchema>;
|
|
411
|
+
declare const CreateProjectResponseSchema: z.ZodObject<{
|
|
412
|
+
project: z.ZodObject<{
|
|
413
|
+
id: z.ZodString;
|
|
414
|
+
name: z.ZodString;
|
|
415
|
+
accessId: z.ZodString;
|
|
416
|
+
allowedOrigins: z.ZodArray<z.ZodString>;
|
|
417
|
+
destination: z.ZodNullable<z.ZodEnum<{
|
|
418
|
+
github: "github";
|
|
419
|
+
jira: "jira";
|
|
420
|
+
linear: "linear";
|
|
421
|
+
}>>;
|
|
422
|
+
dashboardUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
s3: z.ZodNullable<z.ZodObject<{
|
|
424
|
+
bucket: z.ZodString;
|
|
425
|
+
region: z.ZodString;
|
|
426
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
427
|
+
forcePathStyle: z.ZodOptional<z.ZodBoolean>;
|
|
428
|
+
accessKeyIdMasked: z.ZodString;
|
|
429
|
+
}, z.core.$strip>>;
|
|
430
|
+
onboardedAt: z.ZodNullable<z.ZodString>;
|
|
431
|
+
createdAt: z.ZodString;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
accessId: z.ZodString;
|
|
434
|
+
accessSecret: z.ZodString;
|
|
435
|
+
}, z.core.$strip>;
|
|
436
|
+
type CreateProjectResponse = z.infer<typeof CreateProjectResponseSchema>;
|
|
437
|
+
/** PATCH /v1/project — secret auth. */
|
|
438
|
+
declare const UpdateProjectRequestSchema: z.ZodObject<{
|
|
439
|
+
name: z.ZodOptional<z.ZodString>;
|
|
440
|
+
allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
441
|
+
onboarded: z.ZodOptional<z.ZodBoolean>;
|
|
442
|
+
dashboardUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
443
|
+
}, z.core.$strip>;
|
|
444
|
+
type UpdateProjectRequest = z.infer<typeof UpdateProjectRequestSchema>;
|
|
445
|
+
declare const ListIntegrationsResponseSchema: z.ZodObject<{
|
|
446
|
+
integrations: z.ZodArray<z.ZodObject<{
|
|
447
|
+
provider: z.ZodEnum<{
|
|
448
|
+
github: "github";
|
|
449
|
+
jira: "jira";
|
|
450
|
+
linear: "linear";
|
|
451
|
+
}>;
|
|
452
|
+
status: z.ZodEnum<{
|
|
453
|
+
disconnected: "disconnected";
|
|
454
|
+
pending: "pending";
|
|
455
|
+
connected: "connected";
|
|
456
|
+
}>;
|
|
457
|
+
account: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
458
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
459
|
+
config: z.ZodDefault<z.ZodObject<{
|
|
460
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
461
|
+
teamKey: z.ZodOptional<z.ZodString>;
|
|
462
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
463
|
+
issueType: z.ZodOptional<z.ZodString>;
|
|
464
|
+
}, z.core.$strip>>;
|
|
465
|
+
}, z.core.$strip>>;
|
|
466
|
+
}, z.core.$strip>;
|
|
467
|
+
type ListIntegrationsResponse = z.infer<typeof ListIntegrationsResponseSchema>;
|
|
468
|
+
declare const ConnectIntegrationResponseSchema: z.ZodObject<{
|
|
469
|
+
authorizeUrl: z.ZodString;
|
|
470
|
+
provider: z.ZodEnum<{
|
|
471
|
+
github: "github";
|
|
472
|
+
jira: "jira";
|
|
473
|
+
linear: "linear";
|
|
474
|
+
}>;
|
|
475
|
+
}, z.core.$strip>;
|
|
476
|
+
type ConnectIntegrationResponse = z.infer<typeof ConnectIntegrationResponseSchema>;
|
|
477
|
+
|
|
478
|
+
interface ListReportsQuery {
|
|
479
|
+
status?: ReportStatus;
|
|
480
|
+
/** Case-insensitive substring search over comment and URL. */
|
|
481
|
+
q?: string;
|
|
482
|
+
limit?: number;
|
|
483
|
+
cursor?: string;
|
|
484
|
+
}
|
|
485
|
+
interface ListReportsResult {
|
|
486
|
+
reports: ReportSummary[];
|
|
487
|
+
nextCursor: string | null;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Typed fetch client for the Lens management API. Every request is
|
|
491
|
+
* authenticated with `Authorization: Bearer <token>` where the token is
|
|
492
|
+
* resolved lazily via `config.getToken` on each call — so hosts can hand out
|
|
493
|
+
* short-lived, server-minted tokens instead of leaking the long-lived
|
|
494
|
+
* `accessSecret` to the browser.
|
|
495
|
+
*/
|
|
496
|
+
interface LensApi {
|
|
497
|
+
listReports(query?: ListReportsQuery): Promise<ListReportsResult>;
|
|
498
|
+
getReport(id: string): Promise<Report>;
|
|
499
|
+
/** Resolves the short-lived signed GET URL for a report asset. */
|
|
500
|
+
getAssetUrl(id: string, kind: AssetKind): Promise<string>;
|
|
501
|
+
/** Fetches a report asset and parses it as JSON (e.g. the rrweb replay events). */
|
|
502
|
+
getAssetJson<T>(id: string, kind: AssetKind): Promise<T>;
|
|
503
|
+
listIntegrations(): Promise<Integration[]>;
|
|
504
|
+
connectIntegration(provider: IntegrationProvider, opts?: {
|
|
505
|
+
returnUrl?: string;
|
|
506
|
+
}): Promise<ConnectIntegrationResponse>;
|
|
507
|
+
/**
|
|
508
|
+
* Dev-only: completes the OAuth dance that `connectIntegration` starts,
|
|
509
|
+
* flipping the provider to `connected` (and active as the destination).
|
|
510
|
+
*/
|
|
511
|
+
completeIntegrationDev(provider: IntegrationProvider, account?: string): Promise<Integration>;
|
|
512
|
+
/** Makes `provider` the single active issue destination; returns the refreshed list. */
|
|
513
|
+
activateIntegration(provider: IntegrationProvider): Promise<Integration[]>;
|
|
514
|
+
/** Disconnects `provider`; returns the refreshed list. */
|
|
515
|
+
disconnectIntegration(provider: IntegrationProvider): Promise<Integration[]>;
|
|
516
|
+
/** Updates `provider`'s non-secret issue-routing config; returns the refreshed list. */
|
|
517
|
+
updateIntegrationConfig(provider: IntegrationProvider, config: IntegrationConfig): Promise<Integration[]>;
|
|
518
|
+
/** Bootstrap/admin auth. `accessSecret` is returned exactly once. */
|
|
519
|
+
createProject(body: CreateProjectRequest): Promise<CreateProjectResponse>;
|
|
520
|
+
/** Reads the current project (S3 config masked, secret never returned). */
|
|
521
|
+
getProject(): Promise<Project>;
|
|
522
|
+
updateProject(body: UpdateProjectRequest): Promise<Project>;
|
|
523
|
+
/** Verifies + stores S3 credentials. Rejects with code `s3_verification_failed` on bad creds. */
|
|
524
|
+
setS3Config(body: S3ConfigInput): Promise<Project>;
|
|
525
|
+
/** Removes the project's S3 config, reverting to Lens-managed storage. */
|
|
526
|
+
clearS3Config(): Promise<Project>;
|
|
527
|
+
/** Effective asset storage for the project (status only — credentials live in env). */
|
|
528
|
+
getStorageStatus(): Promise<StorageStatus>;
|
|
529
|
+
}
|
|
530
|
+
interface StorageStatus {
|
|
531
|
+
mode: 's3' | 'local';
|
|
532
|
+
/** 'project' = per-project credentials, 'env' = the Lens API's environment. */
|
|
533
|
+
source: 'project' | 'env' | null;
|
|
534
|
+
bucket: string | null;
|
|
535
|
+
region: string | null;
|
|
536
|
+
/** Dev only. In production, report intake is rejected until S3 is configured. */
|
|
537
|
+
localAllowed: boolean;
|
|
538
|
+
}
|
|
539
|
+
interface LensApiConfig {
|
|
540
|
+
/** Base URL of the management API, e.g. `https://lens.acme.com` (no trailing `/v1`). */
|
|
541
|
+
baseUrl: string;
|
|
542
|
+
/**
|
|
543
|
+
* Resolves a bearer token for each request. Return a short-lived token
|
|
544
|
+
* minted by your backend — or an empty string when the host proxies
|
|
545
|
+
* requests server-side and attaches credentials there (no Authorization
|
|
546
|
+
* header is sent in that case, which keeps auth middleware like Clerk from
|
|
547
|
+
* trying to validate a foreign bearer token).
|
|
548
|
+
*/
|
|
549
|
+
getToken: () => string | Promise<string>;
|
|
550
|
+
/**
|
|
551
|
+
* Header used to carry the token. Defaults to `Authorization` with a
|
|
552
|
+
* `Bearer ` prefix. Set a custom header (e.g. `x-lens-token`, sent raw)
|
|
553
|
+
* when requests pass through auth middleware that hijacks Authorization
|
|
554
|
+
* bearer tokens (Clerk returns 404 for foreign ones).
|
|
555
|
+
*/
|
|
556
|
+
tokenHeader?: string;
|
|
557
|
+
/**
|
|
558
|
+
* Resolves the active Lens project id for hosts that manage multiple
|
|
559
|
+
* projects behind one server-side proxy. When it returns a non-empty
|
|
560
|
+
* string, every request additionally sends it as the `x-lens-project`
|
|
561
|
+
* header — the proxy maps it to the right project secret, so the dashboard
|
|
562
|
+
* never sees any secret. Return `null`/`undefined`/`''` (or omit the option
|
|
563
|
+
* entirely) for single-project hosts, in which case no header is sent.
|
|
564
|
+
*/
|
|
565
|
+
project?: () => string | null | undefined;
|
|
566
|
+
}
|
|
567
|
+
declare class LensApiError extends Error {
|
|
568
|
+
readonly status: number;
|
|
569
|
+
readonly code: string;
|
|
570
|
+
constructor(status: number, code: string, message: string);
|
|
571
|
+
}
|
|
572
|
+
declare function createLensApi(config: LensApiConfig): LensApi;
|
|
573
|
+
|
|
574
|
+
interface LensDashboardProviderProps {
|
|
575
|
+
api: LensApi;
|
|
576
|
+
/**
|
|
577
|
+
* Optional explicit theme. When set, the provider wraps its subtree in a
|
|
578
|
+
* `display: contents` scope that stamps `lens-db--dark` / `lens-db--light`,
|
|
579
|
+
* pinning the components to that theme regardless of the host's `.dark` class
|
|
580
|
+
* or `data-theme`. When omitted, components render LIGHT by default and follow
|
|
581
|
+
* a host opt-in (`.dark`/`[data-theme]`) if present. OS preference is ignored.
|
|
582
|
+
*/
|
|
583
|
+
theme?: 'light' | 'dark';
|
|
584
|
+
children: React.ReactNode;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Supplies a {@link LensApi} instance to the Lens dashboard components via
|
|
588
|
+
* React context. Wrap any subtree that renders `ReportsTable`, `ReportDetail`,
|
|
589
|
+
* `ReplayPlayer`, or `IntegrationSettings`.
|
|
590
|
+
*/
|
|
591
|
+
declare function LensDashboardProvider(props: LensDashboardProviderProps): React.JSX.Element;
|
|
592
|
+
/** Reads the {@link LensApi} from context, throwing a clear error if missing. */
|
|
593
|
+
declare function useLensApi(): LensApi;
|
|
594
|
+
|
|
595
|
+
interface ReportsTableProps {
|
|
596
|
+
onSelect?: (id: string) => void;
|
|
597
|
+
status?: ReportStatus;
|
|
598
|
+
pageSize?: number;
|
|
599
|
+
className?: string;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Paginated, searchable table of captured reports. A debounced search box
|
|
603
|
+
* filters over comment + URL (server-side); pagination walks the API cursor
|
|
604
|
+
* one page at a time via a client-side cursor stack (Prev/Next), where each
|
|
605
|
+
* Next pushes the current cursor and each Prev pops back to it.
|
|
606
|
+
*/
|
|
607
|
+
declare function ReportsTable(props: ReportsTableProps): React.JSX.Element;
|
|
608
|
+
|
|
609
|
+
interface ReportDetailProps {
|
|
610
|
+
reportId: string;
|
|
611
|
+
onClose?: () => void;
|
|
612
|
+
className?: string;
|
|
613
|
+
}
|
|
614
|
+
/** Full detail view for a single report: context, errors, logs, replay and assets. */
|
|
615
|
+
declare function ReportDetail(props: ReportDetailProps): React.JSX.Element;
|
|
616
|
+
|
|
617
|
+
interface ReplayPlayerProps {
|
|
618
|
+
reportId: string;
|
|
619
|
+
className?: string;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* First-party rrweb session-replay player.
|
|
623
|
+
*
|
|
624
|
+
* Built directly on rrweb's proven `Replayer` (the `rrweb-player` Svelte wrapper
|
|
625
|
+
* shipped a broken dist that never constructs a Replayer). The replayer's iframe
|
|
626
|
+
* is scaled with a CSS transform to fit a responsive, viewport-aspect container;
|
|
627
|
+
* a monochrome first-party controls bar drives play/pause, scrubbing, speed, and
|
|
628
|
+
* skip-inactive.
|
|
629
|
+
*
|
|
630
|
+
* rrweb is loaded via a dynamic `import()` inside an effect so it never runs
|
|
631
|
+
* during SSR. rrweb's base stylesheet is NOT imported here — the required rules
|
|
632
|
+
* are inlined into `styles.css` under "rrweb replayer base".
|
|
633
|
+
*/
|
|
634
|
+
declare function ReplayPlayer(props: ReplayPlayerProps): React.JSX.Element;
|
|
635
|
+
|
|
636
|
+
interface IntegrationSettingsProps {
|
|
637
|
+
className?: string;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Lists all three issue-tracker integrations and manages their lifecycle against
|
|
641
|
+
* the single-destination contract: exactly one connected provider can be the
|
|
642
|
+
* active destination issues route to. Every mutation refetches the authoritative
|
|
643
|
+
* list so single-active semantics are enforced by the server, not the UI. The
|
|
644
|
+
* row/radio presentation lives in the shared {@link IntegrationList}.
|
|
645
|
+
*/
|
|
646
|
+
declare function IntegrationSettings(props: IntegrationSettingsProps): React.JSX.Element;
|
|
647
|
+
|
|
648
|
+
interface OnboardingWizardProps {
|
|
649
|
+
/** Fired when the host clicks Finish on the final step. */
|
|
650
|
+
onComplete?: (result: {
|
|
651
|
+
project: Project;
|
|
652
|
+
accessId: string;
|
|
653
|
+
/** Only present when the wizard created the project this session — shown once, never re-fetchable. */
|
|
654
|
+
accessSecret: string | null;
|
|
655
|
+
}) => void;
|
|
656
|
+
/**
|
|
657
|
+
* Fired immediately after project creation (step 1), before the wizard
|
|
658
|
+
* continues. Lets proxy-based hosts start forwarding the new project's
|
|
659
|
+
* secret for the remaining wizard calls.
|
|
660
|
+
*/
|
|
661
|
+
onProjectCreated?: (result: CreateProjectResponse) => void;
|
|
662
|
+
className?: string;
|
|
663
|
+
/**
|
|
664
|
+
* Skip project creation and load the existing project instead. The
|
|
665
|
+
* `accessSecret` cannot be shown again in this mode.
|
|
666
|
+
*/
|
|
667
|
+
existingProject?: boolean;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Guided, multi-step setup card for provisioning a Lens project: create the
|
|
671
|
+
* project, pick the single issue destination, configure asset storage, then
|
|
672
|
+
* surface the install snippets. Designed for internal admin dashboards — the
|
|
673
|
+
* `accessSecret` lives only in memory and is displayed exactly once.
|
|
674
|
+
*/
|
|
675
|
+
declare function OnboardingWizard(props: OnboardingWizardProps): React.JSX.Element;
|
|
676
|
+
|
|
677
|
+
interface ProjectSettingsProps {
|
|
678
|
+
className?: string;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Always-available editor for a project's name and allowed origins, plus a
|
|
682
|
+
* read-only, copyable access id. Unlike the wizard this stands alone, so hosts
|
|
683
|
+
* can expose an origins editor anywhere in their admin surface. Every save goes
|
|
684
|
+
* through `updateProject`; the access secret is never shown here (it exists
|
|
685
|
+
* only at creation time).
|
|
686
|
+
*/
|
|
687
|
+
declare function ProjectSettings(props: ProjectSettingsProps): React.JSX.Element;
|
|
688
|
+
|
|
689
|
+
declare function StatusBadge({ status }: {
|
|
690
|
+
status: ReportStatus;
|
|
691
|
+
}): React.JSX.Element;
|
|
692
|
+
|
|
693
|
+
interface AsyncState<T> {
|
|
694
|
+
data: T | undefined;
|
|
695
|
+
error: Error | undefined;
|
|
696
|
+
loading: boolean;
|
|
697
|
+
/** Re-runs the async function. */
|
|
698
|
+
reload: () => void;
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Tiny data-fetching primitive — no react-query dependency. Runs `fn` on mount
|
|
702
|
+
* and whenever `deps` change, tracks loading/error, and ignores results from
|
|
703
|
+
* stale invocations (so the last-requested call always wins).
|
|
704
|
+
*/
|
|
705
|
+
declare function useAsync<T>(fn: () => Promise<T>, deps: unknown[]): AsyncState<T>;
|
|
706
|
+
|
|
707
|
+
export { type AssetKind, type AssetRef, type AsyncState, type ConnectIntegrationResponse, type CreateProjectRequest, type CreateProjectResponse, type Integration, type IntegrationProvider, IntegrationSettings, type IntegrationSettingsProps, type IntegrationStatus, type LensApi, type LensApiConfig, LensApiError, LensDashboardProvider, type LensDashboardProviderProps, type ListIntegrationsResponse, type ListReportsQuery, type ListReportsResult, OnboardingWizard, type OnboardingWizardProps, type Project, ProjectSettings, type ProjectSettingsProps, ReplayPlayer, type ReplayPlayerProps, type Report, ReportDetail, type ReportDetailProps, type ReportMetadata, type ReportStatus, type ReportSummary, ReportsTable, type ReportsTableProps, type S3ConfigInput, type S3ConfigPublic, StatusBadge, type UpdateProjectRequest, createLensApi, useAsync, useLensApi };
|