@topconsultnpm/sdk-ts 6.19.0-dev2.5 → 6.19.0-dev2.7
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/lib/helper/utils.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { TopMediaServer } from "../TopMediaServer";
|
|
11
|
+
import { SDK_Globals } from "./SDK_Globals";
|
|
1
12
|
export class TMPropertyNames {
|
|
2
13
|
}
|
|
3
14
|
TMPropertyNames.entityName = "name";
|
|
@@ -10,3 +21,22 @@ TMPropertyNames.where = "where";
|
|
|
10
21
|
export class TMScopeNames {
|
|
11
22
|
}
|
|
12
23
|
TMScopeNames.qd = "qd";
|
|
24
|
+
export const SetGlobalsInfoAsync = (tms) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
var _a;
|
|
26
|
+
const tmServer = new TopMediaServer((_a = tms === null || tms === void 0 ? void 0 : tms.TopMediaServer) === null || _a === void 0 ? void 0 : _a.BaseAddress);
|
|
27
|
+
const tmSessionNew = tmServer === null || tmServer === void 0 ? void 0 : tmServer.NewSession();
|
|
28
|
+
if (tmSessionNew) {
|
|
29
|
+
tmSessionNew.SessionDescr = tms === null || tms === void 0 ? void 0 : tms.SessionDescr;
|
|
30
|
+
}
|
|
31
|
+
SDK_Globals.tmSession = tmSessionNew;
|
|
32
|
+
SDK_Globals.tmSession.AutoRefresh = true;
|
|
33
|
+
if (SDK_Globals.license == undefined) {
|
|
34
|
+
try {
|
|
35
|
+
SDK_Globals.license = yield tmSessionNew.NewLicenseEngine().RetrieveAsync();
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
throw e;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return tmSessionNew;
|
|
42
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ITopMediaSession } from "../TopMediaSession";
|
|
1
2
|
export declare class TMPropertyNames {
|
|
2
3
|
static entityName: string;
|
|
3
4
|
static fromTid: string;
|
|
@@ -10,3 +11,4 @@ export declare class TMPropertyNames {
|
|
|
10
11
|
export declare class TMScopeNames {
|
|
11
12
|
static qd: string;
|
|
12
13
|
}
|
|
14
|
+
export declare const SetGlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession>;
|