@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.
Files changed (42) hide show
  1. package/dist/browser.cjs +31594 -0
  2. package/dist/browser.cjs.map +1 -0
  3. package/dist/browser.d.cts +125 -0
  4. package/dist/browser.d.ts +125 -0
  5. package/dist/browser.js +24 -0
  6. package/dist/browser.js.map +1 -0
  7. package/dist/chunk-DU7HNRF4.js +1644 -0
  8. package/dist/chunk-DU7HNRF4.js.map +1 -0
  9. package/dist/chunk-DWOH2ENF.js +17613 -0
  10. package/dist/chunk-DWOH2ENF.js.map +1 -0
  11. package/dist/chunk-PZ5AY32C.js +10 -0
  12. package/dist/chunk-PZ5AY32C.js.map +1 -0
  13. package/dist/chunk-S6S3ZZQA.js +17225 -0
  14. package/dist/chunk-S6S3ZZQA.js.map +1 -0
  15. package/dist/dashboard.cjs +19774 -0
  16. package/dist/dashboard.cjs.map +1 -0
  17. package/dist/dashboard.css +2233 -0
  18. package/dist/dashboard.d.cts +707 -0
  19. package/dist/dashboard.d.ts +707 -0
  20. package/dist/dashboard.js +2237 -0
  21. package/dist/dashboard.js.map +1 -0
  22. package/dist/index.cjs +30040 -0
  23. package/dist/index.cjs.map +1 -0
  24. package/dist/index.d-BA540Fae.d.ts +80 -0
  25. package/dist/index.d-Bzgtl7-B.d.cts +161 -0
  26. package/dist/index.d-Bzgtl7-B.d.ts +161 -0
  27. package/dist/index.d-DOCLVJGS.d.cts +80 -0
  28. package/dist/index.d.cts +906 -0
  29. package/dist/index.d.ts +906 -0
  30. package/dist/index.js +89 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/lens.min.js +770 -0
  33. package/dist/lens.min.js.map +1 -0
  34. package/dist/react.cjs +31683 -0
  35. package/dist/react.cjs.map +1 -0
  36. package/dist/react.d.cts +100 -0
  37. package/dist/react.d.ts +100 -0
  38. package/dist/react.js +108 -0
  39. package/dist/react.js.map +1 -0
  40. package/dist/rrweb-EYUUZIYR.js +30 -0
  41. package/dist/rrweb-EYUUZIYR.js.map +1 -0
  42. package/package.json +68 -0
@@ -0,0 +1,906 @@
1
+ import { z } from 'zod';
2
+ import { A as AppContext$1, R as ReportMetadata$1, T as TargetElement$1, a as Annotation$1 } from './index.d-Bzgtl7-B.js';
3
+
4
+ /**
5
+ * Key model (mirrors Stripe/GTM):
6
+ * - accessId (`lai_...`) — public, embedded in the browser tag like a GTM
7
+ * container id. Enforcement comes from per-project origin allowlists and
8
+ * rate limits, never from secrecy.
9
+ * - accessSecret (`las_...`) — server-side only. Management API, dashboard
10
+ * data components (via the host app's backend), CI uploads, integrations.
11
+ */
12
+ declare const ACCESS_ID_PREFIX = "lai_";
13
+ declare const ACCESS_SECRET_PREFIX = "las_";
14
+ declare function isAccessId(value: string): boolean;
15
+ declare function isAccessSecret(value: string): boolean;
16
+
17
+ declare const ConsoleLevelSchema: z.ZodEnum<{
18
+ log: "log";
19
+ info: "info";
20
+ warn: "warn";
21
+ error: "error";
22
+ debug: "debug";
23
+ }>;
24
+ type ConsoleLevel = z.infer<typeof ConsoleLevelSchema>;
25
+ declare const ConsoleEntrySchema: z.ZodObject<{
26
+ level: z.ZodEnum<{
27
+ log: "log";
28
+ info: "info";
29
+ warn: "warn";
30
+ error: "error";
31
+ debug: "debug";
32
+ }>;
33
+ args: z.ZodArray<z.ZodString>;
34
+ timestamp: z.ZodNumber;
35
+ }, z.core.$strip>;
36
+ type ConsoleEntry = z.infer<typeof ConsoleEntrySchema>;
37
+ declare const NetworkEntrySchema: z.ZodObject<{
38
+ method: z.ZodString;
39
+ url: z.ZodString;
40
+ status: z.ZodNullable<z.ZodNumber>;
41
+ ok: z.ZodNullable<z.ZodBoolean>;
42
+ durationMs: z.ZodNullable<z.ZodNumber>;
43
+ requestType: z.ZodEnum<{
44
+ fetch: "fetch";
45
+ xhr: "xhr";
46
+ }>;
47
+ startedAt: z.ZodNumber;
48
+ error: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ type NetworkEntry = z.infer<typeof NetworkEntrySchema>;
51
+ declare const ErrorEntrySchema: z.ZodObject<{
52
+ message: z.ZodString;
53
+ stack: z.ZodOptional<z.ZodString>;
54
+ source: z.ZodEnum<{
55
+ "window.onerror": "window.onerror";
56
+ unhandledrejection: "unhandledrejection";
57
+ "console.error": "console.error";
58
+ "react-boundary": "react-boundary";
59
+ }>;
60
+ timestamp: z.ZodNumber;
61
+ }, z.core.$strip>;
62
+ type ErrorEntry = z.infer<typeof ErrorEntrySchema>;
63
+ declare const EnvContextSchema: z.ZodObject<{
64
+ url: z.ZodString;
65
+ route: z.ZodOptional<z.ZodString>;
66
+ referrer: z.ZodOptional<z.ZodString>;
67
+ userAgent: z.ZodString;
68
+ browser: z.ZodOptional<z.ZodString>;
69
+ os: z.ZodOptional<z.ZodString>;
70
+ device: z.ZodOptional<z.ZodEnum<{
71
+ desktop: "desktop";
72
+ tablet: "tablet";
73
+ mobile: "mobile";
74
+ }>>;
75
+ viewport: z.ZodObject<{
76
+ width: z.ZodNumber;
77
+ height: z.ZodNumber;
78
+ }, z.core.$strip>;
79
+ screen: z.ZodObject<{
80
+ width: z.ZodNumber;
81
+ height: z.ZodNumber;
82
+ }, z.core.$strip>;
83
+ devicePixelRatio: z.ZodNumber;
84
+ language: z.ZodString;
85
+ timezone: z.ZodString;
86
+ theme: z.ZodOptional<z.ZodEnum<{
87
+ light: "light";
88
+ dark: "dark";
89
+ }>>;
90
+ online: z.ZodOptional<z.ZodBoolean>;
91
+ capturedAt: z.ZodNumber;
92
+ }, z.core.$strip>;
93
+ type EnvContext = z.infer<typeof EnvContextSchema>;
94
+ declare const AppContextSchema: z.ZodObject<{
95
+ release: z.ZodOptional<z.ZodString>;
96
+ gitSha: z.ZodOptional<z.ZodString>;
97
+ environment: z.ZodOptional<z.ZodString>;
98
+ featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
99
+ user: z.ZodOptional<z.ZodObject<{
100
+ id: z.ZodOptional<z.ZodString>;
101
+ email: z.ZodOptional<z.ZodString>;
102
+ name: z.ZodOptional<z.ZodString>;
103
+ organization: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>>;
105
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
106
+ }, z.core.$strip>;
107
+ type AppContext = z.infer<typeof AppContextSchema>;
108
+ /** DOM path + React fiber path of the element the reporter targeted. */
109
+ declare const TargetElementSchema: z.ZodObject<{
110
+ domPath: z.ZodOptional<z.ZodString>;
111
+ tagName: z.ZodOptional<z.ZodString>;
112
+ text: z.ZodOptional<z.ZodString>;
113
+ boundingRect: z.ZodOptional<z.ZodObject<{
114
+ x: z.ZodNumber;
115
+ y: z.ZodNumber;
116
+ width: z.ZodNumber;
117
+ height: z.ZodNumber;
118
+ }, z.core.$strip>>;
119
+ reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
120
+ }, z.core.$strip>;
121
+ type TargetElement = z.infer<typeof TargetElementSchema>;
122
+ declare const AnnotationSchema: z.ZodObject<{
123
+ kind: z.ZodEnum<{
124
+ rect: "rect";
125
+ ellipse: "ellipse";
126
+ arrow: "arrow";
127
+ }>;
128
+ x: z.ZodNumber;
129
+ y: z.ZodNumber;
130
+ width: z.ZodNumber;
131
+ height: z.ZodNumber;
132
+ viewport: z.ZodObject<{
133
+ width: z.ZodNumber;
134
+ height: z.ZodNumber;
135
+ }, z.core.$strip>;
136
+ }, z.core.$strip>;
137
+ type Annotation = z.infer<typeof AnnotationSchema>;
138
+
139
+ /**
140
+ * Heavy payloads are uploaded to S3 as individual assets via presigned URLs;
141
+ * the finalize call carries only metadata + asset manifest.
142
+ */
143
+ declare const AssetKindSchema: z.ZodEnum<{
144
+ replay: "replay";
145
+ console: "console";
146
+ network: "network";
147
+ dom: "dom";
148
+ screenshot: "screenshot";
149
+ attachment: "attachment";
150
+ }>;
151
+ type AssetKind = z.infer<typeof AssetKindSchema>;
152
+ declare const AssetRefSchema: z.ZodObject<{
153
+ kind: z.ZodEnum<{
154
+ replay: "replay";
155
+ console: "console";
156
+ network: "network";
157
+ dom: "dom";
158
+ screenshot: "screenshot";
159
+ attachment: "attachment";
160
+ }>;
161
+ key: z.ZodString;
162
+ contentType: z.ZodString;
163
+ byteSize: z.ZodOptional<z.ZodNumber>;
164
+ }, z.core.$strip>;
165
+ type AssetRef = z.infer<typeof AssetRefSchema>;
166
+ declare const ReportStatusSchema: z.ZodEnum<{
167
+ initiated: "initiated";
168
+ submitted: "submitted";
169
+ triaged: "triaged";
170
+ linked: "linked";
171
+ resolved: "resolved";
172
+ }>;
173
+ type ReportStatus = z.infer<typeof ReportStatusSchema>;
174
+ declare const ReportMetadataSchema: z.ZodObject<{
175
+ comment: z.ZodOptional<z.ZodString>;
176
+ annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
177
+ kind: z.ZodEnum<{
178
+ rect: "rect";
179
+ ellipse: "ellipse";
180
+ arrow: "arrow";
181
+ }>;
182
+ x: z.ZodNumber;
183
+ y: z.ZodNumber;
184
+ width: z.ZodNumber;
185
+ height: z.ZodNumber;
186
+ viewport: z.ZodObject<{
187
+ width: z.ZodNumber;
188
+ height: z.ZodNumber;
189
+ }, z.core.$strip>;
190
+ }, z.core.$strip>>>;
191
+ target: z.ZodOptional<z.ZodObject<{
192
+ domPath: z.ZodOptional<z.ZodString>;
193
+ tagName: z.ZodOptional<z.ZodString>;
194
+ text: z.ZodOptional<z.ZodString>;
195
+ boundingRect: z.ZodOptional<z.ZodObject<{
196
+ x: z.ZodNumber;
197
+ y: z.ZodNumber;
198
+ width: z.ZodNumber;
199
+ height: z.ZodNumber;
200
+ }, z.core.$strip>>;
201
+ reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
202
+ }, z.core.$strip>>;
203
+ env: z.ZodObject<{
204
+ url: z.ZodString;
205
+ route: z.ZodOptional<z.ZodString>;
206
+ referrer: z.ZodOptional<z.ZodString>;
207
+ userAgent: z.ZodString;
208
+ browser: z.ZodOptional<z.ZodString>;
209
+ os: z.ZodOptional<z.ZodString>;
210
+ device: z.ZodOptional<z.ZodEnum<{
211
+ desktop: "desktop";
212
+ tablet: "tablet";
213
+ mobile: "mobile";
214
+ }>>;
215
+ viewport: z.ZodObject<{
216
+ width: z.ZodNumber;
217
+ height: z.ZodNumber;
218
+ }, z.core.$strip>;
219
+ screen: z.ZodObject<{
220
+ width: z.ZodNumber;
221
+ height: z.ZodNumber;
222
+ }, z.core.$strip>;
223
+ devicePixelRatio: z.ZodNumber;
224
+ language: z.ZodString;
225
+ timezone: z.ZodString;
226
+ theme: z.ZodOptional<z.ZodEnum<{
227
+ light: "light";
228
+ dark: "dark";
229
+ }>>;
230
+ online: z.ZodOptional<z.ZodBoolean>;
231
+ capturedAt: z.ZodNumber;
232
+ }, z.core.$strip>;
233
+ app: z.ZodOptional<z.ZodObject<{
234
+ release: z.ZodOptional<z.ZodString>;
235
+ gitSha: z.ZodOptional<z.ZodString>;
236
+ environment: z.ZodOptional<z.ZodString>;
237
+ featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
238
+ user: z.ZodOptional<z.ZodObject<{
239
+ id: z.ZodOptional<z.ZodString>;
240
+ email: z.ZodOptional<z.ZodString>;
241
+ name: z.ZodOptional<z.ZodString>;
242
+ organization: z.ZodOptional<z.ZodString>;
243
+ }, z.core.$strip>>;
244
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
245
+ }, z.core.$strip>>;
246
+ errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
247
+ message: z.ZodString;
248
+ stack: z.ZodOptional<z.ZodString>;
249
+ source: z.ZodEnum<{
250
+ "window.onerror": "window.onerror";
251
+ unhandledrejection: "unhandledrejection";
252
+ "console.error": "console.error";
253
+ "react-boundary": "react-boundary";
254
+ }>;
255
+ timestamp: z.ZodNumber;
256
+ }, z.core.$strip>>>;
257
+ consoleTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
258
+ level: z.ZodEnum<{
259
+ log: "log";
260
+ info: "info";
261
+ warn: "warn";
262
+ error: "error";
263
+ debug: "debug";
264
+ }>;
265
+ args: z.ZodArray<z.ZodString>;
266
+ timestamp: z.ZodNumber;
267
+ }, z.core.$strip>>>;
268
+ networkTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
269
+ method: z.ZodString;
270
+ url: z.ZodString;
271
+ status: z.ZodNullable<z.ZodNumber>;
272
+ ok: z.ZodNullable<z.ZodBoolean>;
273
+ durationMs: z.ZodNullable<z.ZodNumber>;
274
+ requestType: z.ZodEnum<{
275
+ fetch: "fetch";
276
+ xhr: "xhr";
277
+ }>;
278
+ startedAt: z.ZodNumber;
279
+ error: z.ZodOptional<z.ZodString>;
280
+ }, z.core.$strip>>>;
281
+ sdk: z.ZodObject<{
282
+ name: z.ZodString;
283
+ version: z.ZodString;
284
+ }, z.core.$strip>;
285
+ }, z.core.$strip>;
286
+ type ReportMetadata = z.infer<typeof ReportMetadataSchema>;
287
+ declare const ReportSchema: z.ZodObject<{
288
+ id: z.ZodString;
289
+ projectId: z.ZodString;
290
+ status: z.ZodEnum<{
291
+ initiated: "initiated";
292
+ submitted: "submitted";
293
+ triaged: "triaged";
294
+ linked: "linked";
295
+ resolved: "resolved";
296
+ }>;
297
+ createdAt: z.ZodString;
298
+ submittedAt: z.ZodNullable<z.ZodString>;
299
+ metadata: z.ZodNullable<z.ZodObject<{
300
+ comment: z.ZodOptional<z.ZodString>;
301
+ annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
302
+ kind: z.ZodEnum<{
303
+ rect: "rect";
304
+ ellipse: "ellipse";
305
+ arrow: "arrow";
306
+ }>;
307
+ x: z.ZodNumber;
308
+ y: z.ZodNumber;
309
+ width: z.ZodNumber;
310
+ height: z.ZodNumber;
311
+ viewport: z.ZodObject<{
312
+ width: z.ZodNumber;
313
+ height: z.ZodNumber;
314
+ }, z.core.$strip>;
315
+ }, z.core.$strip>>>;
316
+ target: z.ZodOptional<z.ZodObject<{
317
+ domPath: z.ZodOptional<z.ZodString>;
318
+ tagName: z.ZodOptional<z.ZodString>;
319
+ text: z.ZodOptional<z.ZodString>;
320
+ boundingRect: z.ZodOptional<z.ZodObject<{
321
+ x: z.ZodNumber;
322
+ y: z.ZodNumber;
323
+ width: z.ZodNumber;
324
+ height: z.ZodNumber;
325
+ }, z.core.$strip>>;
326
+ reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
327
+ }, z.core.$strip>>;
328
+ env: z.ZodObject<{
329
+ url: z.ZodString;
330
+ route: z.ZodOptional<z.ZodString>;
331
+ referrer: z.ZodOptional<z.ZodString>;
332
+ userAgent: z.ZodString;
333
+ browser: z.ZodOptional<z.ZodString>;
334
+ os: z.ZodOptional<z.ZodString>;
335
+ device: z.ZodOptional<z.ZodEnum<{
336
+ desktop: "desktop";
337
+ tablet: "tablet";
338
+ mobile: "mobile";
339
+ }>>;
340
+ viewport: z.ZodObject<{
341
+ width: z.ZodNumber;
342
+ height: z.ZodNumber;
343
+ }, z.core.$strip>;
344
+ screen: z.ZodObject<{
345
+ width: z.ZodNumber;
346
+ height: z.ZodNumber;
347
+ }, z.core.$strip>;
348
+ devicePixelRatio: z.ZodNumber;
349
+ language: z.ZodString;
350
+ timezone: z.ZodString;
351
+ theme: z.ZodOptional<z.ZodEnum<{
352
+ light: "light";
353
+ dark: "dark";
354
+ }>>;
355
+ online: z.ZodOptional<z.ZodBoolean>;
356
+ capturedAt: z.ZodNumber;
357
+ }, z.core.$strip>;
358
+ app: z.ZodOptional<z.ZodObject<{
359
+ release: z.ZodOptional<z.ZodString>;
360
+ gitSha: z.ZodOptional<z.ZodString>;
361
+ environment: z.ZodOptional<z.ZodString>;
362
+ featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
363
+ user: z.ZodOptional<z.ZodObject<{
364
+ id: z.ZodOptional<z.ZodString>;
365
+ email: z.ZodOptional<z.ZodString>;
366
+ name: z.ZodOptional<z.ZodString>;
367
+ organization: z.ZodOptional<z.ZodString>;
368
+ }, z.core.$strip>>;
369
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
370
+ }, z.core.$strip>>;
371
+ errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
372
+ message: z.ZodString;
373
+ stack: z.ZodOptional<z.ZodString>;
374
+ source: z.ZodEnum<{
375
+ "window.onerror": "window.onerror";
376
+ unhandledrejection: "unhandledrejection";
377
+ "console.error": "console.error";
378
+ "react-boundary": "react-boundary";
379
+ }>;
380
+ timestamp: z.ZodNumber;
381
+ }, z.core.$strip>>>;
382
+ consoleTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
383
+ level: z.ZodEnum<{
384
+ log: "log";
385
+ info: "info";
386
+ warn: "warn";
387
+ error: "error";
388
+ debug: "debug";
389
+ }>;
390
+ args: z.ZodArray<z.ZodString>;
391
+ timestamp: z.ZodNumber;
392
+ }, z.core.$strip>>>;
393
+ networkTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
394
+ method: z.ZodString;
395
+ url: z.ZodString;
396
+ status: z.ZodNullable<z.ZodNumber>;
397
+ ok: z.ZodNullable<z.ZodBoolean>;
398
+ durationMs: z.ZodNullable<z.ZodNumber>;
399
+ requestType: z.ZodEnum<{
400
+ fetch: "fetch";
401
+ xhr: "xhr";
402
+ }>;
403
+ startedAt: z.ZodNumber;
404
+ error: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>>>;
406
+ sdk: z.ZodObject<{
407
+ name: z.ZodString;
408
+ version: z.ZodString;
409
+ }, z.core.$strip>;
410
+ }, z.core.$strip>>;
411
+ assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
412
+ kind: z.ZodEnum<{
413
+ replay: "replay";
414
+ console: "console";
415
+ network: "network";
416
+ dom: "dom";
417
+ screenshot: "screenshot";
418
+ attachment: "attachment";
419
+ }>;
420
+ key: z.ZodString;
421
+ contentType: z.ZodString;
422
+ byteSize: z.ZodOptional<z.ZodNumber>;
423
+ }, z.core.$strip>>>;
424
+ externalIssue: z.ZodDefault<z.ZodNullable<z.ZodObject<{
425
+ provider: z.ZodString;
426
+ key: z.ZodString;
427
+ url: z.ZodString;
428
+ }, z.core.$strip>>>;
429
+ }, z.core.$strip>;
430
+ type Report = z.infer<typeof ReportSchema>;
431
+ declare const ReportSummarySchema: z.ZodObject<{
432
+ status: z.ZodEnum<{
433
+ initiated: "initiated";
434
+ submitted: "submitted";
435
+ triaged: "triaged";
436
+ linked: "linked";
437
+ resolved: "resolved";
438
+ }>;
439
+ id: z.ZodString;
440
+ projectId: z.ZodString;
441
+ createdAt: z.ZodString;
442
+ submittedAt: z.ZodNullable<z.ZodString>;
443
+ externalIssue: z.ZodDefault<z.ZodNullable<z.ZodObject<{
444
+ provider: z.ZodString;
445
+ key: z.ZodString;
446
+ url: z.ZodString;
447
+ }, z.core.$strip>>>;
448
+ comment: z.ZodOptional<z.ZodString>;
449
+ url: z.ZodOptional<z.ZodString>;
450
+ errorCount: z.ZodDefault<z.ZodNumber>;
451
+ hasReplay: z.ZodDefault<z.ZodBoolean>;
452
+ }, z.core.$strip>;
453
+ type ReportSummary = z.infer<typeof ReportSummarySchema>;
454
+
455
+ /**
456
+ * POST /v1/reports/initiate — public endpoint, authenticated by accessId +
457
+ * Origin allowlist. Returns presigned PUT URLs so asset bytes go straight to
458
+ * S3 and never through the API.
459
+ */
460
+ declare const InitiateReportRequestSchema: z.ZodObject<{
461
+ accessId: z.ZodString;
462
+ assets: z.ZodArray<z.ZodObject<{
463
+ kind: z.ZodEnum<{
464
+ replay: "replay";
465
+ console: "console";
466
+ network: "network";
467
+ dom: "dom";
468
+ screenshot: "screenshot";
469
+ attachment: "attachment";
470
+ }>;
471
+ contentType: z.ZodString;
472
+ }, z.core.$strip>>;
473
+ }, z.core.$strip>;
474
+ type InitiateReportRequest = z.infer<typeof InitiateReportRequestSchema>;
475
+ declare const InitiateReportResponseSchema: z.ZodObject<{
476
+ reportId: z.ZodString;
477
+ uploads: z.ZodArray<z.ZodObject<{
478
+ kind: z.ZodEnum<{
479
+ replay: "replay";
480
+ console: "console";
481
+ network: "network";
482
+ dom: "dom";
483
+ screenshot: "screenshot";
484
+ attachment: "attachment";
485
+ }>;
486
+ key: z.ZodString;
487
+ url: z.ZodString;
488
+ method: z.ZodLiteral<"PUT">;
489
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
490
+ }, z.core.$strip>>;
491
+ expiresAt: z.ZodString;
492
+ }, z.core.$strip>;
493
+ type InitiateReportResponse = z.infer<typeof InitiateReportResponseSchema>;
494
+ /** POST /v1/reports/:id/finalize — same auth as initiate. */
495
+ declare const FinalizeReportRequestSchema: z.ZodObject<{
496
+ accessId: z.ZodString;
497
+ metadata: z.ZodObject<{
498
+ comment: z.ZodOptional<z.ZodString>;
499
+ annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
500
+ kind: z.ZodEnum<{
501
+ rect: "rect";
502
+ ellipse: "ellipse";
503
+ arrow: "arrow";
504
+ }>;
505
+ x: z.ZodNumber;
506
+ y: z.ZodNumber;
507
+ width: z.ZodNumber;
508
+ height: z.ZodNumber;
509
+ viewport: z.ZodObject<{
510
+ width: z.ZodNumber;
511
+ height: z.ZodNumber;
512
+ }, z.core.$strip>;
513
+ }, z.core.$strip>>>;
514
+ target: z.ZodOptional<z.ZodObject<{
515
+ domPath: z.ZodOptional<z.ZodString>;
516
+ tagName: z.ZodOptional<z.ZodString>;
517
+ text: z.ZodOptional<z.ZodString>;
518
+ boundingRect: z.ZodOptional<z.ZodObject<{
519
+ x: z.ZodNumber;
520
+ y: z.ZodNumber;
521
+ width: z.ZodNumber;
522
+ height: z.ZodNumber;
523
+ }, z.core.$strip>>;
524
+ reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
525
+ }, z.core.$strip>>;
526
+ env: z.ZodObject<{
527
+ url: z.ZodString;
528
+ route: z.ZodOptional<z.ZodString>;
529
+ referrer: z.ZodOptional<z.ZodString>;
530
+ userAgent: z.ZodString;
531
+ browser: z.ZodOptional<z.ZodString>;
532
+ os: z.ZodOptional<z.ZodString>;
533
+ device: z.ZodOptional<z.ZodEnum<{
534
+ desktop: "desktop";
535
+ tablet: "tablet";
536
+ mobile: "mobile";
537
+ }>>;
538
+ viewport: z.ZodObject<{
539
+ width: z.ZodNumber;
540
+ height: z.ZodNumber;
541
+ }, z.core.$strip>;
542
+ screen: z.ZodObject<{
543
+ width: z.ZodNumber;
544
+ height: z.ZodNumber;
545
+ }, z.core.$strip>;
546
+ devicePixelRatio: z.ZodNumber;
547
+ language: z.ZodString;
548
+ timezone: z.ZodString;
549
+ theme: z.ZodOptional<z.ZodEnum<{
550
+ light: "light";
551
+ dark: "dark";
552
+ }>>;
553
+ online: z.ZodOptional<z.ZodBoolean>;
554
+ capturedAt: z.ZodNumber;
555
+ }, z.core.$strip>;
556
+ app: z.ZodOptional<z.ZodObject<{
557
+ release: z.ZodOptional<z.ZodString>;
558
+ gitSha: z.ZodOptional<z.ZodString>;
559
+ environment: z.ZodOptional<z.ZodString>;
560
+ featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
561
+ user: z.ZodOptional<z.ZodObject<{
562
+ id: z.ZodOptional<z.ZodString>;
563
+ email: z.ZodOptional<z.ZodString>;
564
+ name: z.ZodOptional<z.ZodString>;
565
+ organization: z.ZodOptional<z.ZodString>;
566
+ }, z.core.$strip>>;
567
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
568
+ }, z.core.$strip>>;
569
+ errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
570
+ message: z.ZodString;
571
+ stack: z.ZodOptional<z.ZodString>;
572
+ source: z.ZodEnum<{
573
+ "window.onerror": "window.onerror";
574
+ unhandledrejection: "unhandledrejection";
575
+ "console.error": "console.error";
576
+ "react-boundary": "react-boundary";
577
+ }>;
578
+ timestamp: z.ZodNumber;
579
+ }, z.core.$strip>>>;
580
+ consoleTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
581
+ level: z.ZodEnum<{
582
+ log: "log";
583
+ info: "info";
584
+ warn: "warn";
585
+ error: "error";
586
+ debug: "debug";
587
+ }>;
588
+ args: z.ZodArray<z.ZodString>;
589
+ timestamp: z.ZodNumber;
590
+ }, z.core.$strip>>>;
591
+ networkTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
592
+ method: z.ZodString;
593
+ url: z.ZodString;
594
+ status: z.ZodNullable<z.ZodNumber>;
595
+ ok: z.ZodNullable<z.ZodBoolean>;
596
+ durationMs: z.ZodNullable<z.ZodNumber>;
597
+ requestType: z.ZodEnum<{
598
+ fetch: "fetch";
599
+ xhr: "xhr";
600
+ }>;
601
+ startedAt: z.ZodNumber;
602
+ error: z.ZodOptional<z.ZodString>;
603
+ }, z.core.$strip>>>;
604
+ sdk: z.ZodObject<{
605
+ name: z.ZodString;
606
+ version: z.ZodString;
607
+ }, z.core.$strip>;
608
+ }, z.core.$strip>;
609
+ uploadedAssets: z.ZodArray<z.ZodObject<{
610
+ kind: z.ZodEnum<{
611
+ replay: "replay";
612
+ console: "console";
613
+ network: "network";
614
+ dom: "dom";
615
+ screenshot: "screenshot";
616
+ attachment: "attachment";
617
+ }>;
618
+ key: z.ZodString;
619
+ byteSize: z.ZodOptional<z.ZodNumber>;
620
+ }, z.core.$strip>>;
621
+ }, z.core.$strip>;
622
+ type FinalizeReportRequest = z.infer<typeof FinalizeReportRequestSchema>;
623
+ declare const FinalizeReportResponseSchema: z.ZodObject<{
624
+ reportId: z.ZodString;
625
+ status: z.ZodLiteral<"submitted">;
626
+ }, z.core.$strip>;
627
+ type FinalizeReportResponse = z.infer<typeof FinalizeReportResponseSchema>;
628
+ /**
629
+ * POST /v1/reports/:id/assets — attach a late-arriving asset (screenshot) to an
630
+ * already-finalized report. The upload itself used the presigned slot from
631
+ * initiate; this records it in the report manifest. Same auth as initiate.
632
+ */
633
+ declare const AttachAssetRequestSchema: z.ZodObject<{
634
+ accessId: z.ZodString;
635
+ kind: z.ZodEnum<{
636
+ replay: "replay";
637
+ console: "console";
638
+ network: "network";
639
+ dom: "dom";
640
+ screenshot: "screenshot";
641
+ attachment: "attachment";
642
+ }>;
643
+ key: z.ZodString;
644
+ contentType: z.ZodString;
645
+ byteSize: z.ZodOptional<z.ZodNumber>;
646
+ }, z.core.$strip>;
647
+ type AttachAssetRequest = z.infer<typeof AttachAssetRequestSchema>;
648
+ /** Management API (Bearer accessSecret) — consumed by @merittdev/horus-lens/dashboard. */
649
+ declare const ListReportsQuerySchema: z.ZodObject<{
650
+ status: z.ZodOptional<z.ZodString>;
651
+ q: z.ZodOptional<z.ZodString>;
652
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
653
+ cursor: z.ZodOptional<z.ZodString>;
654
+ }, z.core.$strip>;
655
+ type ListReportsQuery = z.infer<typeof ListReportsQuerySchema>;
656
+ declare const ApiErrorSchema: z.ZodObject<{
657
+ error: z.ZodString;
658
+ message: z.ZodString;
659
+ }, z.core.$strip>;
660
+ type ApiError = z.infer<typeof ApiErrorSchema>;
661
+
662
+ declare const IntegrationProviderSchema: z.ZodEnum<{
663
+ github: "github";
664
+ jira: "jira";
665
+ linear: "linear";
666
+ }>;
667
+ type IntegrationProvider = z.infer<typeof IntegrationProviderSchema>;
668
+ declare const IntegrationStatusSchema: z.ZodEnum<{
669
+ disconnected: "disconnected";
670
+ pending: "pending";
671
+ connected: "connected";
672
+ }>;
673
+ type IntegrationStatus = z.infer<typeof IntegrationStatusSchema>;
674
+ /**
675
+ * One integration per provider per project; at most ONE is `active` — the
676
+ * active one is the destination issues are routed to.
677
+ */
678
+ /** Non-secret issue-routing settings, editable from the dashboard. */
679
+ declare const IntegrationConfigSchema: z.ZodObject<{
680
+ repo: z.ZodOptional<z.ZodString>;
681
+ teamKey: z.ZodOptional<z.ZodString>;
682
+ projectKey: z.ZodOptional<z.ZodString>;
683
+ issueType: z.ZodOptional<z.ZodString>;
684
+ }, z.core.$strip>;
685
+ type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
686
+ declare const IntegrationSchema: z.ZodObject<{
687
+ provider: z.ZodEnum<{
688
+ github: "github";
689
+ jira: "jira";
690
+ linear: "linear";
691
+ }>;
692
+ status: z.ZodEnum<{
693
+ disconnected: "disconnected";
694
+ pending: "pending";
695
+ connected: "connected";
696
+ }>;
697
+ account: z.ZodDefault<z.ZodNullable<z.ZodString>>;
698
+ active: z.ZodDefault<z.ZodBoolean>;
699
+ config: z.ZodDefault<z.ZodObject<{
700
+ repo: z.ZodOptional<z.ZodString>;
701
+ teamKey: z.ZodOptional<z.ZodString>;
702
+ projectKey: z.ZodOptional<z.ZodString>;
703
+ issueType: z.ZodOptional<z.ZodString>;
704
+ }, z.core.$strip>>;
705
+ }, z.core.$strip>;
706
+ type Integration = z.infer<typeof IntegrationSchema>;
707
+ /** Write-only S3 credentials. The secret is never returned by any endpoint. */
708
+ declare const S3ConfigInputSchema: z.ZodObject<{
709
+ bucket: z.ZodString;
710
+ region: z.ZodString;
711
+ endpoint: z.ZodOptional<z.ZodString>;
712
+ accessKeyId: z.ZodString;
713
+ secretAccessKey: z.ZodString;
714
+ forcePathStyle: z.ZodOptional<z.ZodBoolean>;
715
+ }, z.core.$strip>;
716
+ type S3ConfigInput = z.infer<typeof S3ConfigInputSchema>;
717
+ /** What the API returns about a project's S3 config — secret omitted, key masked. */
718
+ declare const S3ConfigPublicSchema: z.ZodObject<{
719
+ bucket: z.ZodString;
720
+ region: z.ZodString;
721
+ endpoint: z.ZodOptional<z.ZodString>;
722
+ forcePathStyle: z.ZodOptional<z.ZodBoolean>;
723
+ accessKeyIdMasked: z.ZodString;
724
+ }, z.core.$strip>;
725
+ type S3ConfigPublic = z.infer<typeof S3ConfigPublicSchema>;
726
+ declare const ProjectSchema: z.ZodObject<{
727
+ id: z.ZodString;
728
+ name: z.ZodString;
729
+ accessId: z.ZodString;
730
+ allowedOrigins: z.ZodArray<z.ZodString>;
731
+ destination: z.ZodNullable<z.ZodEnum<{
732
+ github: "github";
733
+ jira: "jira";
734
+ linear: "linear";
735
+ }>>;
736
+ dashboardUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
737
+ s3: z.ZodNullable<z.ZodObject<{
738
+ bucket: z.ZodString;
739
+ region: z.ZodString;
740
+ endpoint: z.ZodOptional<z.ZodString>;
741
+ forcePathStyle: z.ZodOptional<z.ZodBoolean>;
742
+ accessKeyIdMasked: z.ZodString;
743
+ }, z.core.$strip>>;
744
+ onboardedAt: z.ZodNullable<z.ZodString>;
745
+ createdAt: z.ZodString;
746
+ }, z.core.$strip>;
747
+ type Project = z.infer<typeof ProjectSchema>;
748
+ /** POST /v1/projects — bootstrap auth (admin token). Secret is shown exactly once. */
749
+ declare const CreateProjectRequestSchema: z.ZodObject<{
750
+ name: z.ZodString;
751
+ allowedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
752
+ }, z.core.$strip>;
753
+ type CreateProjectRequest = z.infer<typeof CreateProjectRequestSchema>;
754
+ declare const CreateProjectResponseSchema: z.ZodObject<{
755
+ project: z.ZodObject<{
756
+ id: z.ZodString;
757
+ name: z.ZodString;
758
+ accessId: z.ZodString;
759
+ allowedOrigins: z.ZodArray<z.ZodString>;
760
+ destination: z.ZodNullable<z.ZodEnum<{
761
+ github: "github";
762
+ jira: "jira";
763
+ linear: "linear";
764
+ }>>;
765
+ dashboardUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
766
+ s3: z.ZodNullable<z.ZodObject<{
767
+ bucket: z.ZodString;
768
+ region: z.ZodString;
769
+ endpoint: z.ZodOptional<z.ZodString>;
770
+ forcePathStyle: z.ZodOptional<z.ZodBoolean>;
771
+ accessKeyIdMasked: z.ZodString;
772
+ }, z.core.$strip>>;
773
+ onboardedAt: z.ZodNullable<z.ZodString>;
774
+ createdAt: z.ZodString;
775
+ }, z.core.$strip>;
776
+ accessId: z.ZodString;
777
+ accessSecret: z.ZodString;
778
+ }, z.core.$strip>;
779
+ type CreateProjectResponse = z.infer<typeof CreateProjectResponseSchema>;
780
+ /** PATCH /v1/project — secret auth. */
781
+ declare const UpdateProjectRequestSchema: z.ZodObject<{
782
+ name: z.ZodOptional<z.ZodString>;
783
+ allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
784
+ onboarded: z.ZodOptional<z.ZodBoolean>;
785
+ dashboardUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
786
+ }, z.core.$strip>;
787
+ type UpdateProjectRequest = z.infer<typeof UpdateProjectRequestSchema>;
788
+ declare const ListIntegrationsResponseSchema: z.ZodObject<{
789
+ integrations: z.ZodArray<z.ZodObject<{
790
+ provider: z.ZodEnum<{
791
+ github: "github";
792
+ jira: "jira";
793
+ linear: "linear";
794
+ }>;
795
+ status: z.ZodEnum<{
796
+ disconnected: "disconnected";
797
+ pending: "pending";
798
+ connected: "connected";
799
+ }>;
800
+ account: z.ZodDefault<z.ZodNullable<z.ZodString>>;
801
+ active: z.ZodDefault<z.ZodBoolean>;
802
+ config: z.ZodDefault<z.ZodObject<{
803
+ repo: z.ZodOptional<z.ZodString>;
804
+ teamKey: z.ZodOptional<z.ZodString>;
805
+ projectKey: z.ZodOptional<z.ZodString>;
806
+ issueType: z.ZodOptional<z.ZodString>;
807
+ }, z.core.$strip>>;
808
+ }, z.core.$strip>>;
809
+ }, z.core.$strip>;
810
+ type ListIntegrationsResponse = z.infer<typeof ListIntegrationsResponseSchema>;
811
+ /** Body for POST /v1/integrations/:provider/connect. */
812
+ declare const ConnectIntegrationRequestSchema: z.ZodObject<{
813
+ returnUrl: z.ZodOptional<z.ZodString>;
814
+ }, z.core.$strip>;
815
+ type ConnectIntegrationRequest = z.infer<typeof ConnectIntegrationRequestSchema>;
816
+ declare const ConnectIntegrationResponseSchema: z.ZodObject<{
817
+ authorizeUrl: z.ZodString;
818
+ provider: z.ZodEnum<{
819
+ github: "github";
820
+ jira: "jira";
821
+ linear: "linear";
822
+ }>;
823
+ }, z.core.$strip>;
824
+ type ConnectIntegrationResponse = z.infer<typeof ConnectIntegrationResponseSchema>;
825
+
826
+ declare const SDK_NAME = "@merittdev/horus-lens";
827
+ declare const SDK_VERSION = "0.0.1";
828
+
829
+ interface LensConfig {
830
+ accessId: string;
831
+ endpoint?: string;
832
+ replay?: {
833
+ windowMs?: number;
834
+ } | false;
835
+ app?: AppContext$1;
836
+ maxConsoleEntries?: number;
837
+ maxNetworkEntries?: number;
838
+ beforeSend?: (metadata: ReportMetadata$1) => ReportMetadata$1 | null;
839
+ /** Capture a page screenshot on submit (best-effort). Default `true`. */
840
+ screenshot?: boolean;
841
+ debug?: boolean;
842
+ }
843
+ /**
844
+ * Per-report opt-outs for the captured data. Every flag defaults to `true`;
845
+ * setting one to `false` skips both the corresponding asset upload and its
846
+ * metadata mirror. Config-level `screenshot: false` still wins over
847
+ * `include.screenshot: true`.
848
+ */
849
+ interface SubmitReportIncludes {
850
+ replay?: boolean;
851
+ console?: boolean;
852
+ network?: boolean;
853
+ errors?: boolean;
854
+ screenshot?: boolean;
855
+ dom?: boolean;
856
+ }
857
+ interface SubmitReportInput {
858
+ comment?: string;
859
+ annotations?: Annotation$1[];
860
+ target?: TargetElement$1;
861
+ attachments?: {
862
+ blob: Blob;
863
+ contentType: string;
864
+ }[];
865
+ /** Element hidden from the screenshot capture (e.g. the overlay host). */
866
+ excludeFromScreenshot?: HTMLElement;
867
+ /** Selective data opt-outs; each flag defaults to `true`. */
868
+ include?: SubmitReportIncludes;
869
+ }
870
+ declare class LensClient {
871
+ private readonly accessId;
872
+ private readonly endpoint;
873
+ private readonly replayWindowMs;
874
+ private readonly debug;
875
+ private readonly screenshotEnabled;
876
+ private readonly beforeSend?;
877
+ private app;
878
+ private readonly consoleBuffer;
879
+ private readonly networkBuffer;
880
+ private readonly errorBuffer;
881
+ private readonly transport;
882
+ private readonly replay;
883
+ private teardowns;
884
+ private started;
885
+ constructor(config: LensConfig);
886
+ start(): void;
887
+ stop(): void;
888
+ setApp(app: Partial<AppContext$1>): void;
889
+ captureTarget(el: Element): TargetElement$1;
890
+ /** Begin an explicit "record steps" session (no-op if replay is disabled). */
891
+ startRecording(): void;
892
+ /** Stop the active recording; returns its duration, or `null` if none / disabled. */
893
+ stopRecording(): {
894
+ durationMs: number;
895
+ } | null;
896
+ /** Discard a retained manual recording and fall back to the rolling window. */
897
+ discardRecording(): void;
898
+ /** True while an explicit recording is in progress. */
899
+ isRecording(): boolean;
900
+ submitReport(input: SubmitReportInput): Promise<{
901
+ reportId: string;
902
+ }>;
903
+ private warn;
904
+ }
905
+
906
+ export { ACCESS_ID_PREFIX, ACCESS_SECRET_PREFIX, type Annotation, AnnotationSchema, type ApiError, ApiErrorSchema, type AppContext, AppContextSchema, type AssetKind, AssetKindSchema, type AssetRef, AssetRefSchema, type AttachAssetRequest, AttachAssetRequestSchema, type ConnectIntegrationRequest, ConnectIntegrationRequestSchema, type ConnectIntegrationResponse, ConnectIntegrationResponseSchema, type ConsoleEntry, ConsoleEntrySchema, type ConsoleLevel, ConsoleLevelSchema, type CreateProjectRequest, CreateProjectRequestSchema, type CreateProjectResponse, CreateProjectResponseSchema, type EnvContext, EnvContextSchema, type ErrorEntry, ErrorEntrySchema, type FinalizeReportRequest, FinalizeReportRequestSchema, type FinalizeReportResponse, FinalizeReportResponseSchema, type InitiateReportRequest, InitiateReportRequestSchema, type InitiateReportResponse, InitiateReportResponseSchema, type Integration, type IntegrationConfig, IntegrationConfigSchema, type IntegrationProvider, IntegrationProviderSchema, IntegrationSchema, type IntegrationStatus, IntegrationStatusSchema, LensClient, type LensConfig, type ListIntegrationsResponse, ListIntegrationsResponseSchema, type ListReportsQuery, ListReportsQuerySchema, type NetworkEntry, NetworkEntrySchema, type Project, ProjectSchema, type Report, type ReportMetadata, ReportMetadataSchema, ReportSchema, type ReportStatus, ReportStatusSchema, type ReportSummary, ReportSummarySchema, type S3ConfigInput, S3ConfigInputSchema, type S3ConfigPublic, S3ConfigPublicSchema, SDK_NAME, SDK_VERSION, type TargetElement, TargetElementSchema, type UpdateProjectRequest, UpdateProjectRequestSchema, isAccessId, isAccessSecret };