@nivaro/sdk 0.1.2 → 0.1.4
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/index.d.ts +7 -2
- package/dist/index.js +6 -2
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -489,8 +489,13 @@ declare function sessionRecordingEnabled(): Command<{
|
|
|
489
489
|
enabled: boolean;
|
|
490
490
|
};
|
|
491
491
|
}>;
|
|
492
|
-
/**
|
|
493
|
-
|
|
492
|
+
/**
|
|
493
|
+
* Open a recording. `app` labels which frontend it came from; `origin` says
|
|
494
|
+
* which environment, so a replay list can tell production apart from a
|
|
495
|
+
* developer's laptop. The server falls back to the request's referer when a
|
|
496
|
+
* caller omits it.
|
|
497
|
+
*/
|
|
498
|
+
declare function startSessionRecording(app?: string, origin?: string): Command<{
|
|
494
499
|
data: {
|
|
495
500
|
id: UUID;
|
|
496
501
|
};
|
package/dist/index.js
CHANGED
|
@@ -168,8 +168,12 @@ function readPipelineReplay(templateId, days) {
|
|
|
168
168
|
function sessionRecordingEnabled() {
|
|
169
169
|
return cmd("GET", "/session-recordings/enabled");
|
|
170
170
|
}
|
|
171
|
-
function startSessionRecording(app) {
|
|
172
|
-
|
|
171
|
+
function startSessionRecording(app, origin) {
|
|
172
|
+
const body = {};
|
|
173
|
+
if (app) body.app = app;
|
|
174
|
+
const resolved = origin ?? (typeof window !== "undefined" ? window.location.origin : void 0);
|
|
175
|
+
if (resolved) body.origin = resolved;
|
|
176
|
+
return cmd("POST", "/session-recordings/start", void 0, body);
|
|
173
177
|
}
|
|
174
178
|
function appendSessionRecordingEvents(id, seq, events) {
|
|
175
179
|
return cmd("POST", `/session-recordings/${id}/events`, void 0, { seq, events });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nivaro/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "TypeScript SDK for Nivaro CMS — typed REST client, GraphQL, realtime subscriptions, and presence.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"homepage": "https://nivaro.dev",
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
34
|
-
"url": "https://github.com/nodeworks/nivaro"
|
|
34
|
+
"url": "git+https://github.com/nodeworks/nivaro.git",
|
|
35
|
+
"directory": "packages/sdk"
|
|
35
36
|
},
|
|
36
37
|
"bugs": {
|
|
37
38
|
"url": "https://github.com/nodeworks/nivaro/issues",
|