@opengeni/sdk 3.1.0 → 3.3.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/README.md +60 -8
- package/dist/accounts.d.ts +5 -1
- package/dist/accounts.js +13 -1
- package/dist/accounts.js.map +1 -1
- package/dist/artifacts.js +5 -5
- package/dist/browser.js +3 -3
- package/dist/{chunk-YTAWBDO2.js → chunk-JUS2UYRP.js} +2 -1
- package/dist/chunk-JUS2UYRP.js.map +1 -0
- package/dist/{chunk-GW3EJ2GP.js → chunk-KKRO2VCP.js} +27 -2
- package/dist/{chunk-GW3EJ2GP.js.map → chunk-KKRO2VCP.js.map} +1 -1
- package/dist/{chunk-VUQZAB3O.js → chunk-QT3KFVDP.js} +2 -2
- package/dist/{chunk-7ZXBPJZP.js → chunk-TRNI7KEO.js} +213 -42
- package/dist/chunk-TRNI7KEO.js.map +1 -0
- package/dist/{chunk-TX3EIENU.js → chunk-YXQX7RQT.js} +2 -2
- package/dist/client.d.ts +35 -11
- package/dist/company-profile.d.ts +13 -0
- package/dist/core.js +4 -4
- package/dist/document-authority.js +4 -4
- package/dist/editable-artifacts.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +215 -5
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +3 -0
- package/dist/interaction.js +3 -1
- package/dist/realtime.d.ts +3 -1
- package/dist/realtime.js.map +1 -1
- package/dist/session-titles.d.ts +28 -0
- package/dist/types.d.ts +58 -2
- package/package.json +2 -2
- package/src/accounts.ts +18 -0
- package/src/client.ts +291 -35
- package/src/company-profile.ts +13 -0
- package/src/index.ts +18 -0
- package/src/interaction.ts +32 -0
- package/src/realtime.ts +1 -0
- package/src/session-titles.ts +84 -0
- package/src/types.ts +64 -1
- package/dist/chunk-7ZXBPJZP.js.map +0 -1
- package/dist/chunk-YTAWBDO2.js.map +0 -1
- /package/dist/{chunk-VUQZAB3O.js.map → chunk-QT3KFVDP.js.map} +0 -0
- /package/dist/{chunk-TX3EIENU.js.map → chunk-YXQX7RQT.js.map} +0 -0
|
@@ -601,6 +601,9 @@ var ComputerSessionResource = class {
|
|
|
601
601
|
async observe(targetId, options = {}) {
|
|
602
602
|
return await this.transport.observeComputerTarget(this.workspaceId, this.id, targetId, options);
|
|
603
603
|
}
|
|
604
|
+
async capture(targetId, options = {}) {
|
|
605
|
+
return await this.transport.captureComputerTarget(this.workspaceId, this.id, targetId, options);
|
|
606
|
+
}
|
|
604
607
|
async act(request, options = {}) {
|
|
605
608
|
return await this.transport.actInComputer(this.workspaceId, this.id, request, options);
|
|
606
609
|
}
|
|
@@ -883,6 +886,27 @@ function parseComputerFrameMetadata(value) {
|
|
|
883
886
|
}
|
|
884
887
|
return metadata;
|
|
885
888
|
}
|
|
889
|
+
function decodeComputerFrameMetadataHeader(value) {
|
|
890
|
+
if (!value || value.length > 32 * 1024 || !/^[A-Za-z0-9_-]+$/u.test(value)) {
|
|
891
|
+
throw new Error("computer frame metadata header is invalid");
|
|
892
|
+
}
|
|
893
|
+
const normalized = value.replace(/-/gu, "+").replace(/_/gu, "/");
|
|
894
|
+
const padded = normalized.padEnd(Math.ceil(normalized.length / 4) * 4, "=");
|
|
895
|
+
let decoded;
|
|
896
|
+
try {
|
|
897
|
+
decoded = atob(padded);
|
|
898
|
+
} catch {
|
|
899
|
+
throw new Error("computer frame metadata header is invalid");
|
|
900
|
+
}
|
|
901
|
+
const bytes = Uint8Array.from(decoded, (character) => character.charCodeAt(0));
|
|
902
|
+
let metadata;
|
|
903
|
+
try {
|
|
904
|
+
metadata = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
905
|
+
} catch {
|
|
906
|
+
throw new Error("computer frame metadata header is invalid");
|
|
907
|
+
}
|
|
908
|
+
return parseComputerFrameMetadata(metadata);
|
|
909
|
+
}
|
|
886
910
|
function newestRelevantBrowser(sessions, associationSessionId) {
|
|
887
911
|
const live = sessions.filter(
|
|
888
912
|
(session) => !["ending", "ended", "failed", "lost"].includes(session.lifecycle) && session.associations.some((association) => association.sessionId === associationSessionId)
|
|
@@ -1033,6 +1057,7 @@ export {
|
|
|
1033
1057
|
decodeBrowserFrameMessage,
|
|
1034
1058
|
decodeComputerFrameMessage,
|
|
1035
1059
|
parseBrowserFrameMetadata,
|
|
1036
|
-
parseComputerFrameMetadata
|
|
1060
|
+
parseComputerFrameMetadata,
|
|
1061
|
+
decodeComputerFrameMetadataHeader
|
|
1037
1062
|
};
|
|
1038
|
-
//# sourceMappingURL=chunk-
|
|
1063
|
+
//# sourceMappingURL=chunk-KKRO2VCP.js.map
|