@topconsultnpm/sdk-ts 6.19.0-test1 → 6.19.0
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 +73 -1
- package/dist/lib/helper/SDK_CacheServices.js +0 -6
- package/dist/lib/helper/index.js +1 -0
- package/dist/lib/helper/utils.js +30 -0
- package/dist/lib/openAPIs/TopMediaServiceClient.js +1 -1
- package/dist/types/Engine.d.ts +24 -1
- package/dist/types/helper/index.d.ts +1 -0
- package/dist/types/helper/utils.d.ts +2 -0
- package/dist/types/openAPIs/TopMediaServiceClient.d.ts +4 -1
- package/package.json +1 -1
package/dist/lib/Engine.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { ProgressCallbackData } from "./TopMediaServiceClientEx";
|
|
11
11
|
import { SDK_Globals } from "./helper";
|
|
12
12
|
import { StandardHelper } from "./helper/StandardHelper";
|
|
13
|
-
import { ArchiveModes, AreaDescriptor, AreaParams, BarcodeArchiverJobDescriptor, BarcodeDetectionDescriptor, Barcode_Colors, Barcode_Orientations, DcmtInputTypes, BasketTypeDescriptor, BatchUpdaterJobDescriptor, COSCheckerJobDescriptor, CassettoDoganaleJobDescriptor, CheckSequenceJobDescriptor, CultureIDs, DateTimeFormats, DcmtConverterJobDescriptor, DcmtDeleterJobDescriptor, DcmtDeleter_Actions, DcmtNoteJobDescriptor, DcmtPrinterJobDescriptor, DcmtTypeDescriptor, DiskDescriptor, FEAttacherJobDescriptor, FECreatorTxtJobDescriptor, FEDetacherJobDescriptor, FESenderWsJobDescriptor, FESplitterJobDescriptor, FEValidatorJobDescriptor, FileArchiverJobDescriptor, FileArchiver_ArchiveDescriptor, FileArchiver_ArchiveItemDescriptor, FileArchiver_InputTypes, FileCheckerJobDescriptor, FileDescriptor, FileExecJobDescriptor, FileExec_CheckFileModes, FileExportJobDescriptor, FileFormats, FileMoverJobDescriptor, FileTransferModes, FromItem, InputOrders, InvoiceRetrieveFormats, JobTypes, LexJobDescriptor, LinkerJobDescriptor, MailArchiverJobDescriptor, MailQueryJobDescriptor, MailSenderJobDescriptor, MigrationJobDescriptor, NSOCreatorTxtJobDescriptor, NSODetacherJobDescriptor, NSOSenderWsJobDescriptor, NSOValidatorJobDescriptor, OrderRetrieveFormats, OutputTypes, PDFArchiverJobDescriptor, PdDCreatorJobDescriptor, PdDTypes, PdVArchiverJobDescriptor, PdVQueryJobDescriptor, PdVSenderJobDescriptor, PeppolQueryJobDescriptor, PeppolSenderJobDescriptor, QueryDescriptor, ReplicatorJobDescriptor, SAPAlignerJobDescriptor, SAPBarcodeJobDescriptor, SAPDataReaderJobDescriptor, SAPDataWriterJobDescriptor, SignerJobDescriptor, Updater_UpdateDescriptor, SourceNotExistActions, SpoolArchiverJobDescriptor, UpdateModes, UpdaterJobDescriptor, Updater_MetadataMappingDescriptor, Updater_UpdateItemDescriptor, FileInputTypes, BarcodeArchiver_SplittingDescriptor, BarcodeArchiver_Splitting_Modes, BooleanExpressionDescriptor, BarcodeArchiver_ArchiveDescriptor, FileMover_Operations, SourceFilesFilters, FileRenameOptions, DestFileAlreadyExistActions, SplittingDescriptor, PDFArchiver_ArchiveDescriptor, HttpAddressDescriptor, Replicator_ArchiveDescriptor, BasketDescriptor, CommandSetDescriptor, PDFCommandSetDescriptor, ProcessDescriptor, ScheduleDescriptor, UserDescriptor, UserLevels, MetadataDataTypes, PreProc_Strategies, DataListDescriptor, ProcessRunAsModes, HistLogPurgeModes, ScheduleTypes, ScheduleOneTime, SignCertDescriptor, ScheduleDailyFrequency, ScheduleDailyOccursModes, ScheduleTimeUnits, ScheduleDuration, ScheduleRecurringMonthly, ScheduleRecurringWeekly, ScheduleRecurringDescriptor, ScheduleRecurringTypes, ProcessNotificationDescriptor, UpsertDescriptor, UpsertActions, UpsertSearchCriterias, BarcodeArchiver_ArchiveItemDescriptor, BarcodeArchiver_ArchiveMappingDescriptor, BarcodeArchiver_MetadataMappingDescriptor, MappingModes, MetadataMappingDescriptor, FileArchiver_ArchiveMappingDescriptor, CommandBaseDescriptor, CommandTypes, PadCommandDescriptor, ConcatCommandDescriptor, FormatCommandDescriptor, LeftSubstringCommandDescriptor, ReplaceCommandDescriptor, RightSubstringCommandDescriptor, SplitCommandDescriptor, TrimCommandDescriptor, SubstringCommandDescriptor, PDFCommandBaseDescriptor, PDFCommandTypes, PDFAddTextCommandDescriptor, PDFAddImageCommandDescriptor, PDFRemovePagesCommandDescriptor, PDFRemovePagesModes, COSDocTypes, ExpModes, AgentRoles, GroupingDescriptor, GroupingModes, SecureOperDescriptor, SignOperExDescriptor, SignFormats, TimeStampOperExDescriptor, PDFArchiver_ArchiveItemDescriptor, PDFArchiver_ArchiveMappingDescriptor, QueryFunctions, SelectItemVisibilities, QueryOperators, PdVCheckDescriptor, PDFTextItemDescriptor, PDFTextItemScopes, XYModes, SavedQueryDescriptor, Replicator_ArchiveItemDescriptor, Replicator_ArchiveMappingDescriptor, DossierDescriptor, WFDescriptor, TaskDescriptor, Updater_InputTypes, RemoveInputStrategies, SharingModes, RelationDescriptor, RelationTypes, NoDataActions, PrinterDescriptor, PagesRange, PrintOrientations, RetrieveFileOptions, DcmtOpers, MetadataValueDescriptor, MailBoxDescriptor, ReadingMailProtocols, IMAPDescriptor, SendingMailProtocols, MailAuthTypes, SMTPDescriptor, GraphAPIDescriptor, ProcessedItemActions, MailArchiver_FolderDescriptor, ArchiveDcmtDescriptor, MailSender_MailFormatDescriptor, MailArchiver_WholeMailCfgDescriptor, MailSender_TracingDescriptor, MailSender_GroupingDescriptor, MailSender_MailPropertyMappingDescriptor, MailSender_AttachmentCfgDescriptor, MailSender_AttachCompressModes, MailArchiver_WholeMailArchiveModes, MailArchiver_ArchiveMappingDescriptor, MailSender_GroupingModes, MailArchiver_AttachmentCfgDescriptor, Linker_OperTypes, MailArchiver_AttachmentCfgItemDescriptor, MailArchiver_MetadataMappingDescriptor, MailArchiver_ParametricValueTypes, MailMessageProperties, PeppolTracingDescriptor, PeppolDescriptor, GroupDescriptor, FEDistillerJobDescriptor, MailQuery_ArchiveItemDescriptor, MetadataDescriptor, IndexDescriptor, ArchiveConstraints, EncryptionModes, MembershipConstraints, UserTypes, CassettoFiscaleSenderJobDescriptor, CassettoFiscaleQueryJobDescriptor, MetadataDataDomains, DataListViewModes, SAPLoginDescriptor, SAPLoginModes, PdGs, Task_States, Priorities, AlreadySharedActions, DossierTypeDescriptor, WFTypes, WFPartRoles, WFSources, WFEvents, DossierDetail, Ds_ClassIDs } from "./openAPIs/TopMediaServiceClient";
|
|
13
|
+
import { ArchiveModes, AreaDescriptor, AreaParams, BarcodeArchiverJobDescriptor, BarcodeDetectionDescriptor, Barcode_Colors, Barcode_Orientations, DcmtInputTypes, BasketTypeDescriptor, BatchUpdaterJobDescriptor, COSCheckerJobDescriptor, CassettoDoganaleJobDescriptor, CheckSequenceJobDescriptor, CultureIDs, DateTimeFormats, DcmtConverterJobDescriptor, DcmtDeleterJobDescriptor, DcmtDeleter_Actions, DcmtNoteJobDescriptor, DcmtPrinterJobDescriptor, DcmtTypeDescriptor, DiskDescriptor, FEAttacherJobDescriptor, FECreatorTxtJobDescriptor, FEDetacherJobDescriptor, FESenderWsJobDescriptor, FESplitterJobDescriptor, FEValidatorJobDescriptor, FileArchiverJobDescriptor, FileArchiver_ArchiveDescriptor, FileArchiver_ArchiveItemDescriptor, FileArchiver_InputTypes, FileCheckerJobDescriptor, FileDescriptor, FileExecJobDescriptor, FileExec_CheckFileModes, FileExportJobDescriptor, FileFormats, FileMoverJobDescriptor, FileTransferModes, FromItem, InputOrders, InvoiceRetrieveFormats, JobTypes, LexJobDescriptor, LinkerJobDescriptor, MailArchiverJobDescriptor, MailQueryJobDescriptor, MailSenderJobDescriptor, MigrationJobDescriptor, NSOCreatorTxtJobDescriptor, NSODetacherJobDescriptor, NSOSenderWsJobDescriptor, NSOValidatorJobDescriptor, OrderRetrieveFormats, OutputTypes, PDFArchiverJobDescriptor, PdDCreatorJobDescriptor, PdDTypes, PdVArchiverJobDescriptor, PdVQueryJobDescriptor, PdVSenderJobDescriptor, PeppolQueryJobDescriptor, PeppolSenderJobDescriptor, QueryDescriptor, ReplicatorJobDescriptor, SAPAlignerJobDescriptor, SAPBarcodeJobDescriptor, SAPDataReaderJobDescriptor, SAPDataWriterJobDescriptor, SignerJobDescriptor, Updater_UpdateDescriptor, SourceNotExistActions, SpoolArchiverJobDescriptor, UpdateModes, UpdaterJobDescriptor, Updater_MetadataMappingDescriptor, Updater_UpdateItemDescriptor, FileInputTypes, BarcodeArchiver_SplittingDescriptor, BarcodeArchiver_Splitting_Modes, BooleanExpressionDescriptor, BarcodeArchiver_ArchiveDescriptor, FileMover_Operations, SourceFilesFilters, FileRenameOptions, DestFileAlreadyExistActions, SplittingDescriptor, PDFArchiver_ArchiveDescriptor, HttpAddressDescriptor, Replicator_ArchiveDescriptor, BasketDescriptor, CommandSetDescriptor, PDFCommandSetDescriptor, ProcessDescriptor, ScheduleDescriptor, UserDescriptor, UserLevels, MetadataDataTypes, PreProc_Strategies, DataListDescriptor, ProcessRunAsModes, HistLogPurgeModes, ScheduleTypes, ScheduleOneTime, SignCertDescriptor, ScheduleDailyFrequency, ScheduleDailyOccursModes, ScheduleTimeUnits, ScheduleDuration, ScheduleRecurringMonthly, ScheduleRecurringWeekly, ScheduleRecurringDescriptor, ScheduleRecurringTypes, ProcessNotificationDescriptor, UpsertDescriptor, UpsertActions, UpsertSearchCriterias, BarcodeArchiver_ArchiveItemDescriptor, BarcodeArchiver_ArchiveMappingDescriptor, BarcodeArchiver_MetadataMappingDescriptor, MappingModes, MetadataMappingDescriptor, FileArchiver_ArchiveMappingDescriptor, CommandBaseDescriptor, CommandTypes, PadCommandDescriptor, ConcatCommandDescriptor, FormatCommandDescriptor, LeftSubstringCommandDescriptor, ReplaceCommandDescriptor, RightSubstringCommandDescriptor, SplitCommandDescriptor, TrimCommandDescriptor, SubstringCommandDescriptor, PDFCommandBaseDescriptor, PDFCommandTypes, PDFAddTextCommandDescriptor, PDFAddImageCommandDescriptor, PDFRemovePagesCommandDescriptor, PDFRemovePagesModes, COSDocTypes, ExpModes, AgentRoles, GroupingDescriptor, GroupingModes, SecureOperDescriptor, SignOperExDescriptor, SignFormats, TimeStampOperExDescriptor, PDFArchiver_ArchiveItemDescriptor, PDFArchiver_ArchiveMappingDescriptor, QueryFunctions, SelectItemVisibilities, QueryOperators, PdVCheckDescriptor, PDFTextItemDescriptor, PDFTextItemScopes, XYModes, SavedQueryDescriptor, Replicator_ArchiveItemDescriptor, Replicator_ArchiveMappingDescriptor, DossierDescriptor, WFDescriptor, TaskDescriptor, Updater_InputTypes, RemoveInputStrategies, SharingModes, RelationDescriptor, RelationTypes, NoDataActions, PrinterDescriptor, PagesRange, PrintOrientations, RetrieveFileOptions, DcmtOpers, MetadataValueDescriptor, MailBoxDescriptor, ReadingMailProtocols, IMAPDescriptor, SendingMailProtocols, MailAuthTypes, SMTPDescriptor, GraphAPIDescriptor, ProcessedItemActions, MailArchiver_FolderDescriptor, ArchiveDcmtDescriptor, MailSender_MailFormatDescriptor, MailArchiver_WholeMailCfgDescriptor, MailSender_TracingDescriptor, MailSender_GroupingDescriptor, MailSender_MailPropertyMappingDescriptor, MailSender_AttachmentCfgDescriptor, MailSender_AttachCompressModes, MailArchiver_WholeMailArchiveModes, MailArchiver_ArchiveMappingDescriptor, MailSender_GroupingModes, MailArchiver_AttachmentCfgDescriptor, Linker_OperTypes, MailArchiver_AttachmentCfgItemDescriptor, MailArchiver_MetadataMappingDescriptor, MailArchiver_ParametricValueTypes, MailMessageProperties, PeppolTracingDescriptor, PeppolDescriptor, GroupDescriptor, FEDistillerJobDescriptor, MailQuery_ArchiveItemDescriptor, MetadataDescriptor, IndexDescriptor, ArchiveConstraints, EncryptionModes, MembershipConstraints, UserTypes, CassettoFiscaleSenderJobDescriptor, CassettoFiscaleQueryJobDescriptor, MetadataDataDomains, DataListViewModes, SAPLoginDescriptor, SAPLoginModes, PdGs, Task_States, Priorities, AlreadySharedActions, DossierTypeDescriptor, WFTypes, WFPartRoles, WFSources, WFEvents, DossierDetail, Ds_ClassIDs, LayoutCustomButtonModes } from "./openAPIs/TopMediaServiceClient";
|
|
14
14
|
class BaseEngine {
|
|
15
15
|
constructor(tms) {
|
|
16
16
|
this.TopMediaSession = tms;
|
|
@@ -506,6 +506,14 @@ export class DcmtTypeEngine extends BaseEngine {
|
|
|
506
506
|
else {
|
|
507
507
|
d.items = [];
|
|
508
508
|
}
|
|
509
|
+
if (d.customButtons) {
|
|
510
|
+
for (let cb of d.customButtons) {
|
|
511
|
+
this.NormalizeLayoutCustomButtonDescriptor(cb, isNew);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
d.customButtons = [];
|
|
516
|
+
}
|
|
509
517
|
return d;
|
|
510
518
|
}
|
|
511
519
|
static NormalizeLayoutItemDescriptor(d, isNew) {
|
|
@@ -516,6 +524,16 @@ export class DcmtTypeEngine extends BaseEngine {
|
|
|
516
524
|
(_b = d.parentID) !== null && _b !== void 0 ? _b : (d.parentID = 0);
|
|
517
525
|
return d;
|
|
518
526
|
}
|
|
527
|
+
static NormalizeLayoutCustomButtonDescriptor(d, isNew) {
|
|
528
|
+
var _a, _b, _c, _d;
|
|
529
|
+
if (!d)
|
|
530
|
+
return;
|
|
531
|
+
(_a = d.isForArchive) !== null && _a !== void 0 ? _a : (d.isForArchive = 0);
|
|
532
|
+
(_b = d.isForUpdate) !== null && _b !== void 0 ? _b : (d.isForUpdate = 0);
|
|
533
|
+
(_c = d.isForSearchResult) !== null && _c !== void 0 ? _c : (d.isForSearchResult = 0);
|
|
534
|
+
(_d = d.mode) !== null && _d !== void 0 ? _d : (d.mode = LayoutCustomButtonModes.RunForEachDcmt);
|
|
535
|
+
return d;
|
|
536
|
+
}
|
|
519
537
|
CreateAsync(d) {
|
|
520
538
|
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.dcmtTypeCreate(d)); });
|
|
521
539
|
}
|
|
@@ -4119,6 +4137,45 @@ export class UpdateEngineByID extends BaseEngine {
|
|
|
4119
4137
|
if (this.DID <= 0)
|
|
4120
4138
|
throw new Error("DID non specificato!");
|
|
4121
4139
|
}
|
|
4140
|
+
CheckOutAsync() {
|
|
4141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4142
|
+
var _a;
|
|
4143
|
+
this.Check_TID_DID();
|
|
4144
|
+
yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.checkOut(this.TID, this.DID));
|
|
4145
|
+
});
|
|
4146
|
+
}
|
|
4147
|
+
UndoCheckOutAsync() {
|
|
4148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4149
|
+
var _a;
|
|
4150
|
+
this.Check_TID_DID();
|
|
4151
|
+
yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.undoCheckOut(this.TID, this.DID));
|
|
4152
|
+
});
|
|
4153
|
+
}
|
|
4154
|
+
CheckInAsync(file, note, signal, progressCallback) {
|
|
4155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4156
|
+
var _a;
|
|
4157
|
+
this.Check_TID_DID();
|
|
4158
|
+
let fd = yield new ArchiveEngineByID(this.TopMediaSession).FileNameToFileDescriptorAsync(this.TopMediaSession, file, false, signal, progressCallback);
|
|
4159
|
+
yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.checkIn(this.TID, this.DID, note, fd, signal));
|
|
4160
|
+
});
|
|
4161
|
+
}
|
|
4162
|
+
GetChronologyAsync() {
|
|
4163
|
+
return __awaiter(this, arguments, void 0, function* (outputType = 6) {
|
|
4164
|
+
var _a;
|
|
4165
|
+
this.Check_TID_DID();
|
|
4166
|
+
return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.getChronology(this.TID, this.DID, outputType));
|
|
4167
|
+
});
|
|
4168
|
+
}
|
|
4169
|
+
GetDcmtsInCheckOutAsync() {
|
|
4170
|
+
return __awaiter(this, arguments, void 0, function* (outputType = 6) { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.getDcmtsInCheckOut(outputType)); });
|
|
4171
|
+
}
|
|
4172
|
+
GetLastCheckInInfoAsync() {
|
|
4173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4174
|
+
var _a;
|
|
4175
|
+
this.Check_TID_DID();
|
|
4176
|
+
return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.getLastCheckInInfo(this.TID, this.DID));
|
|
4177
|
+
});
|
|
4178
|
+
}
|
|
4122
4179
|
UpdateAsync() {
|
|
4123
4180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4124
4181
|
var _a;
|
|
@@ -4377,6 +4434,21 @@ export class WorkflowEngine extends BaseEngine {
|
|
|
4377
4434
|
WorkItem_ReassignAsync(VID, DID, toUserID, reason) {
|
|
4378
4435
|
return __awaiter(this, void 0, void 0, function* () { var _a; yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.workItemReassign(VID, DID, toUserID, reason)); });
|
|
4379
4436
|
}
|
|
4437
|
+
WFCtrl_GetWFsAsync() {
|
|
4438
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.workflowCtrlGetWFs()); });
|
|
4439
|
+
}
|
|
4440
|
+
WFCtrl_RetrieveAllDcmtsAsync(WFID_1) {
|
|
4441
|
+
return __awaiter(this, arguments, void 0, function* (WFID, outputType = 6) { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.workflowCtrlRetrieveAllDcmts(WFID, outputType)); });
|
|
4442
|
+
}
|
|
4443
|
+
WFCtrl_RetrieveAllWIsAsync(WFID_1, MTID_1, MDID_1, WIInstanceID_1) {
|
|
4444
|
+
return __awaiter(this, arguments, void 0, function* (WFID, MTID, MDID, WIInstanceID, outputType = 6) { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.workflowCtrlRetrieveAllWIs(WFID, MTID, MDID, WIInstanceID, outputType)); });
|
|
4445
|
+
}
|
|
4446
|
+
WFCtrl_EndInstanceAsync(WFID, MTID, MDID, reason) {
|
|
4447
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.workflowCtrlEndInstance(WFID, MTID, MDID, reason)); });
|
|
4448
|
+
}
|
|
4449
|
+
WFCtrl_ForceWIAsync(WFID, WIDID, eventID, reason) {
|
|
4450
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.workflowCtrlForceWI(WFID, WIDID, eventID, reason)); });
|
|
4451
|
+
}
|
|
4380
4452
|
}
|
|
4381
4453
|
export class WorkingGroupEngine extends BaseEngine {
|
|
4382
4454
|
CreateAsync(d) {
|
|
@@ -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
|
}));
|
package/dist/lib/helper/index.js
CHANGED
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
|
+
});
|