@logspace/sdk 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logspace/sdk",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "LogSpace JavaScript SDK for session recording and logging",
5
5
  "type": "module",
6
6
  "main": "./logspace.umd.js",
@@ -37,8 +37,5 @@
37
37
  "monitoring"
38
38
  ],
39
39
  "author": "LogSpace",
40
- "license": "MIT",
41
- "scripts": {
42
- "preinstall": "npx only-allow bun && bun --version | grep -q '^1.2.21$' || (echo 'Error: Bun version 1.2.21 is required' && exit 1)"
43
- }
40
+ "license": "MIT"
44
41
  }
package/sdk/types.d.ts CHANGED
@@ -7,6 +7,13 @@ export type { eventWithTime };
7
7
  * Recording type - determines replay format
8
8
  */
9
9
  export type RecordingType = 'video' | 'rrweb';
10
+ /**
11
+ * Recording quality preset - controls rrweb recording fidelity vs size tradeoff
12
+ * - 'low': Smaller size, less detailed replay (good for long sessions)
13
+ * - 'medium': Balanced quality and size (recommended default)
14
+ * - 'high': Full fidelity recording (larger files)
15
+ */
16
+ export type RecordingQuality = 'low' | 'medium' | 'high';
10
17
  /**
11
18
  * SDK Session state
12
19
  */
@@ -270,11 +277,19 @@ export interface LogSpaceConfig {
270
277
  * @default undefined
271
278
  */
272
279
  apiKey?: string;
280
+ /** Recording quality preset - simplifies rrweb configuration
281
+ * - 'low': Smaller size, less detailed replay (good for long sessions)
282
+ * - 'medium': Balanced quality and size (recommended)
283
+ * - 'high': Full fidelity recording (larger files)
284
+ * Individual rrweb settings will override quality preset values.
285
+ * @default 'medium'
286
+ */
287
+ recordingQuality?: RecordingQuality;
273
288
  /** Configure what to capture (console, network, errors, etc.)
274
289
  * @default All capture options enabled (true)
275
290
  */
276
291
  capture?: CaptureConfig;
277
- /** rrweb DOM recording settings
292
+ /** rrweb DOM recording settings (overrides recordingQuality preset values)
278
293
  * @default { maskAllInputs: false, recordCanvas: false, checkoutEveryNth: 150 }
279
294
  */
280
295
  rrweb?: RRWebConfig;