@topconsultnpm/sdk-ts 6.19.0-dev2.4 → 6.19.0-dev2.6

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.
@@ -481,9 +481,6 @@ export class DossierCacheService {
481
481
  if (!tms)
482
482
  throw new Error("No valid session available for DossierEngine.");
483
483
  const items = (_a = (yield tms.NewDossierEngine().RetrieveAllAsync())) !== null && _a !== void 0 ? _a : [];
484
- if (!items.length) {
485
- console.warn(`RetrieveAllAsync() returned an empty list for accessToken: ${accessToken}`);
486
- }
487
484
  this._cacheAll.set(accessToken, items);
488
485
  return deepCopy ? this.cloneItems(items) : items;
489
486
  }));
@@ -561,9 +558,6 @@ export class WorkingGroupCacheService {
561
558
  if (!tms)
562
559
  throw new Error("No valid session available for WorkingGroupEngine.");
563
560
  const items = (_a = (yield tms.NewWorkingGroupEngine().RetrieveAllAsync())) !== null && _a !== void 0 ? _a : [];
564
- if (!items.length) {
565
- console.warn(`RetrieveAllAsync() returned an empty list for accessToken: ${accessToken}`);
566
- }
567
561
  this._cacheAll.set(accessToken, items);
568
562
  return deepCopy ? this.cloneItems(items) : items;
569
563
  }));
@@ -5,3 +5,4 @@ export * from "./SDK_Localizator";
5
5
  export * from "./utils";
6
6
  export * from './StringHelper';
7
7
  export * from "./LocalStorageService";
8
+ export * from "./StandardHelper";
@@ -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
+ });
@@ -5,3 +5,4 @@ export * from "./SDK_Localizator";
5
5
  export * from "./utils";
6
6
  export * from './StringHelper';
7
7
  export * from "./LocalStorageService";
8
+ export * from "./StandardHelper";
@@ -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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdk-ts",
3
- "version": "6.19.0-dev2.4",
3
+ "version": "6.19.0-dev2.6",
4
4
  "description": "TopMedia SDK typescript",
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/types/index.d.ts",