@topconsultnpm/sdk-ts 6.20.0-dev1.6 → 6.20.0-dev2.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/dist/lib/Engine.js
CHANGED
|
@@ -335,6 +335,31 @@ export class BasketEngine extends BaseEngine {
|
|
|
335
335
|
DeleteAsync(BTID, BID) {
|
|
336
336
|
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketDelete(BTID, BID)); });
|
|
337
337
|
}
|
|
338
|
+
RetrieveAllFilesAsync(BTID, BID, fromBFID, toBFID, excludeIgnore) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketRetrieveAllFiles(BTID, BID, fromBFID, toBFID, excludeIgnore ? 1 : 0)); });
|
|
340
|
+
}
|
|
341
|
+
LockAsync(BTID, BID, autoUnlock) {
|
|
342
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketLock(BTID, BID, autoUnlock)); });
|
|
343
|
+
}
|
|
344
|
+
UnlockAsync(BTID, BID) {
|
|
345
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketUnlock(BTID, BID)); });
|
|
346
|
+
}
|
|
347
|
+
UnlockAllAsync() {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketUnlockAll()); });
|
|
349
|
+
}
|
|
350
|
+
ChangeStatusAsync(BTID, BID, newStatus, newAction) {
|
|
351
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketChangeStatus(BTID, BID, newStatus, newAction)); });
|
|
352
|
+
}
|
|
353
|
+
RetrieveFileAsync(BTID, BID, BFID, cvtFormat, abortSignal) {
|
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
+
var _a;
|
|
356
|
+
let fr = yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketRetrieveFile(BTID, BID, BFID, cvtFormat, abortSignal));
|
|
357
|
+
return new File([fr === null || fr === void 0 ? void 0 : fr.data], fr === null || fr === void 0 ? void 0 : fr.fileName, {
|
|
358
|
+
lastModified: new Date().getTime(),
|
|
359
|
+
type: fr === null || fr === void 0 ? void 0 : fr.data.type
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
}
|
|
338
363
|
}
|
|
339
364
|
export class BasketTypeEngine extends BaseEngine {
|
|
340
365
|
static NewBasketTypeDescriptor() { return this.Normalize(new BasketTypeDescriptor(), true); }
|
|
@@ -16,7 +16,10 @@ export class TopMediaSession {
|
|
|
16
16
|
constructor(tmSrv) {
|
|
17
17
|
this._autoRefreshInterval = 5;
|
|
18
18
|
this._loginRequest = {
|
|
19
|
-
scopes: ["User.Read"]
|
|
19
|
+
scopes: ["User.Read"],
|
|
20
|
+
popupWindowAttributes: {
|
|
21
|
+
popupSize: { width: 600, height: 700 }
|
|
22
|
+
}
|
|
20
23
|
};
|
|
21
24
|
this._accountId = "";
|
|
22
25
|
this.TopMediaServer = tmSrv;
|
|
@@ -62,18 +65,16 @@ export class TopMediaSession {
|
|
|
62
65
|
throw new Error(`MsAzureTenantID not configured (ArchiveID = ${sd.archiveID})`);
|
|
63
66
|
if (!(ad === null || ad === void 0 ? void 0 : ad.msAzureClientID))
|
|
64
67
|
throw new Error(`MsAzureClientID not configured (ArchiveID = ${sd.archiveID})`);
|
|
68
|
+
console.log("MSAzure window.location.origin: " + window.location.origin);
|
|
65
69
|
this._msalInstance = new PublicClientApplication({
|
|
66
70
|
auth: {
|
|
67
71
|
clientId: ad === null || ad === void 0 ? void 0 : ad.msAzureClientID,
|
|
68
72
|
authority: "https://login.microsoftonline.com/" + (ad === null || ad === void 0 ? void 0 : ad.msAzureTenantID),
|
|
69
|
-
redirectUri:
|
|
73
|
+
redirectUri: window.location.origin
|
|
70
74
|
},
|
|
71
75
|
cache: {
|
|
72
76
|
cacheLocation: 'sessionStorage',
|
|
73
77
|
storeAuthStateInCookie: false,
|
|
74
|
-
},
|
|
75
|
-
system: {
|
|
76
|
-
allowNativeBroker: false
|
|
77
78
|
}
|
|
78
79
|
});
|
|
79
80
|
yield this._msalInstance.initialize();
|
|
@@ -99,8 +100,7 @@ export class TopMediaSession {
|
|
|
99
100
|
_azureLogout() {
|
|
100
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
102
|
if (this._msalInstance) {
|
|
102
|
-
|
|
103
|
-
yield this._msalInstance.logoutPopup({ account: currentAccount });
|
|
103
|
+
yield this._msalInstance.logoutPopup();
|
|
104
104
|
this._msalInstance = null;
|
|
105
105
|
}
|
|
106
106
|
});
|