@caido/sdk-frontend 0.53.2-beta.1 → 0.53.2-beta.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": "@caido/sdk-frontend",
3
- "version": "0.53.2-beta.1",
3
+ "version": "0.53.2-beta.2",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "repository": "https://github.com/caido/sdk-js/",
@@ -29,6 +29,20 @@ export type ReplaySDK = {
29
29
  * @returns The list of all replay sessions.
30
30
  */
31
31
  getSessions: () => ReplaySession[];
32
+ /**
33
+ * Get the currently selected replay session.
34
+ * @returns The currently selected replay session, or undefined if no session is selected.
35
+ * @example
36
+ * ```ts
37
+ * const currentSession = sdk.replay.getCurrentSession();
38
+ * if (currentSession) {
39
+ * console.log(`Current session: ${currentSession.name}`);
40
+ * } else {
41
+ * console.log("No session is currently selected");
42
+ * }
43
+ * ```
44
+ */
45
+ getCurrentSession: () => ReplaySession | undefined;
32
46
  /**
33
47
  * Rename a session.
34
48
  * @param id The ID of the session to rename.