@topconsultnpm/sdk-ts 6.20.0-dev1.7 → 6.20.0-dev2.11
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.d.ts +1734 -0
- package/dist/lib/Engine.js +53 -3
- package/dist/lib/TopMediaServer.d.ts +26 -0
- package/dist/lib/TopMediaServiceClientEx.d.ts +20 -0
- package/dist/lib/TopMediaSession.d.ts +120 -0
- package/dist/lib/helper/ExtMethods.d.ts +4 -0
- package/dist/lib/helper/LocalStorageService.d.ts +10 -0
- package/dist/lib/helper/PlatformObjectValidator.d.ts +43 -0
- package/dist/lib/helper/PlatformObjectValidator.js +41 -0
- package/dist/lib/helper/SDK_CacheServices.d.ts +104 -0
- package/dist/lib/helper/SDK_Globals.d.ts +35 -0
- package/dist/lib/helper/SDK_Localizator.d.ts +136 -0
- package/dist/lib/helper/SDK_Localizator.js +10 -0
- package/dist/lib/helper/StandardHelper.d.ts +4 -0
- package/dist/lib/helper/StringHelper.d.ts +4 -0
- package/dist/lib/helper/index.d.ts +7 -0
- package/dist/lib/helper/utils.d.ts +12 -0
- package/dist/lib/helper/utils.js +2 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/openAPIs/TopMediaServiceClient.d.ts +8158 -0
- package/dist/lib/openAPIs/TopMediaServiceClient.js +1 -1
- package/dist/types/Engine.d.ts +38 -5
- package/dist/types/helper/PlatformObjectValidator.d.ts +3 -1
- package/dist/types/helper/SDK_Localizator.d.ts +1 -0
- package/dist/types/helper/utils.d.ts +9 -7
- package/dist/types/openAPIs/TopMediaServiceClient.d.ts +8 -3
- package/package.json +4 -4
package/dist/lib/Engine.js
CHANGED
|
@@ -335,6 +335,43 @@ 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
|
+
LockAsync(BTID, BID, autoUnlock) {
|
|
339
|
+
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)); });
|
|
340
|
+
}
|
|
341
|
+
UnlockAsync(BTID, BID) {
|
|
342
|
+
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)); });
|
|
343
|
+
}
|
|
344
|
+
UnlockAllAsync() {
|
|
345
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketUnlockAll()); });
|
|
346
|
+
}
|
|
347
|
+
ChangeStatusAsync(BTID, BID, newStatus, newAction) {
|
|
348
|
+
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)); });
|
|
349
|
+
}
|
|
350
|
+
AddFileAsync(BTID, BID, batch, barcode, dateTime, fd, abortSignal) {
|
|
351
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketAddFile(BTID, BID, batch, barcode, dateTime, fd, abortSignal)); });
|
|
352
|
+
}
|
|
353
|
+
RetrieveAllFilesAsync(BTID, BID, fromBFID, toBFID, excludeIgnore) {
|
|
354
|
+
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)); });
|
|
355
|
+
}
|
|
356
|
+
RemoveFilesAsync(BTID, BID, BFIDs) {
|
|
357
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketRemoveFiles(BTID, BID, BFIDs)); });
|
|
358
|
+
}
|
|
359
|
+
SetIgnoreFilesFlagAsync(BTID, BID, BFIDs, ignore) {
|
|
360
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketSetIgnoreFiles(BTID, BID, ignore ? 1 : 0, BFIDs)); });
|
|
361
|
+
}
|
|
362
|
+
SetFileBarcodeAsync(BTID, BID, BFID, barcode) {
|
|
363
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketSetFileBarcode(BTID, BID, BFID, barcode)); });
|
|
364
|
+
}
|
|
365
|
+
RetrieveFileAsync(BTID, BID, BFID, cvtFormat, abortSignal) {
|
|
366
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
367
|
+
var _a;
|
|
368
|
+
let fr = yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.basketRetrieveFile(BTID, BID, BFID, cvtFormat, abortSignal));
|
|
369
|
+
return new File([fr === null || fr === void 0 ? void 0 : fr.data], fr === null || fr === void 0 ? void 0 : fr.fileName, {
|
|
370
|
+
lastModified: new Date().getTime(),
|
|
371
|
+
type: fr === null || fr === void 0 ? void 0 : fr.data.type
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
}
|
|
338
375
|
}
|
|
339
376
|
export class BasketTypeEngine extends BaseEngine {
|
|
340
377
|
static NewBasketTypeDescriptor() { return this.Normalize(new BasketTypeDescriptor(), true); }
|
|
@@ -4949,13 +4986,26 @@ export var PagoPA_Receipt_MetadataNames;
|
|
|
4949
4986
|
export var Rentri_MetadataNames;
|
|
4950
4987
|
(function (Rentri_MetadataNames) {
|
|
4951
4988
|
Rentri_MetadataNames["Identificativo"] = "Rentri_Identificativo";
|
|
4989
|
+
Rentri_MetadataNames["IdentificativoRichiesta"] = "Rentri_IdentificativoRichiesta";
|
|
4952
4990
|
Rentri_MetadataNames["Denominazione"] = "Rentri_Denominazione";
|
|
4953
4991
|
Rentri_MetadataNames["IndirizzoSito"] = "Rentri_IndirizzoSito";
|
|
4954
4992
|
Rentri_MetadataNames["Anno"] = "Rentri_Anno";
|
|
4955
|
-
Rentri_MetadataNames["
|
|
4956
|
-
Rentri_MetadataNames["
|
|
4957
|
-
Rentri_MetadataNames["
|
|
4993
|
+
Rentri_MetadataNames["AutoreRichiesta"] = "Rentri_AutoreRichiesta";
|
|
4994
|
+
Rentri_MetadataNames["CCIAANome"] = "Rentri_CCIAANome";
|
|
4995
|
+
Rentri_MetadataNames["CodiceFiscale"] = "Rentri_CodiceFiscale";
|
|
4996
|
+
Rentri_MetadataNames["NumIscr"] = "Rentri_NumIscr";
|
|
4997
|
+
Rentri_MetadataNames["NumIscrSito"] = "Rentri_NumIscrSito";
|
|
4958
4998
|
Rentri_MetadataNames["DataCreazione"] = "Rentri_DataCreazione";
|
|
4999
|
+
Rentri_MetadataNames["DataRichiesta"] = "Rentri_DataRichiesta";
|
|
5000
|
+
Rentri_MetadataNames["ProgressivoDa_Primo"] = "Rentri_ProgressivoDa_Primo";
|
|
5001
|
+
Rentri_MetadataNames["ProgressivoA_Primo"] = "Rentri_ProgressivoA_Primo";
|
|
5002
|
+
Rentri_MetadataNames["NumeroRegistrazioni_Primo"] = "Rentri_NumeroRegistrazioni_Primo";
|
|
5003
|
+
Rentri_MetadataNames["ProgressivoDa_Ultimo"] = "Rentri_ProgressivoDa_Ultimo";
|
|
5004
|
+
Rentri_MetadataNames["ProgressivoA_Ultimo"] = "Rentri_ProgressivoA_Ultimo";
|
|
5005
|
+
Rentri_MetadataNames["NumeroRegistrazioni_Ultimo"] = "Rentri_NumeroRegistrazioni_Ultimo";
|
|
5006
|
+
Rentri_MetadataNames["ProgressivoDa_Assoluto"] = "Rentri_ProgressivoDa_Assoluto";
|
|
5007
|
+
Rentri_MetadataNames["ProgressivoA_Assoluto"] = "Rentri_ProgressivoA_Assoluto";
|
|
5008
|
+
Rentri_MetadataNames["NumeroRegistrazioni_Assoluto"] = "Rentri_NumeroRegistrazioni_Assoluto";
|
|
4959
5009
|
})(Rentri_MetadataNames || (Rentri_MetadataNames = {}));
|
|
4960
5010
|
export var WorkItemMetadataNames;
|
|
4961
5011
|
(function (WorkItemMetadataNames) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ITopMediaSession } from "./TopMediaSession";
|
|
2
|
+
import { CultureIDs, TopMediaServiceClient } from "./openAPIs/TopMediaServiceClient";
|
|
3
|
+
import { TopMediaServiceClientEx } from "./TopMediaServiceClientEx";
|
|
4
|
+
export interface ITopMediaServer {
|
|
5
|
+
BaseAddress?: string;
|
|
6
|
+
NullValue: string;
|
|
7
|
+
PingAsync(): Promise<string[]>;
|
|
8
|
+
NewSession(): ITopMediaSession;
|
|
9
|
+
CreateHttpClient(accessToken?: string, useClientEx?: boolean): TopMediaServiceClient | TopMediaServiceClientEx;
|
|
10
|
+
FontNamesAsync(): Promise<string[]>;
|
|
11
|
+
PrinterNamesAsync(): Promise<string[]>;
|
|
12
|
+
EncryptAsync(input: string): Promise<string>;
|
|
13
|
+
}
|
|
14
|
+
export declare class TopMediaServer implements ITopMediaServer {
|
|
15
|
+
constructor(baseAddress?: string);
|
|
16
|
+
BaseAddress: string | undefined;
|
|
17
|
+
NullValue: string;
|
|
18
|
+
PingAsync(): Promise<string[]>;
|
|
19
|
+
NewSession(): ITopMediaSession;
|
|
20
|
+
/** Restituisce l'elenco dei CultureID disponibili */
|
|
21
|
+
static RetrieveAllCultureIDs(): CultureIDs[];
|
|
22
|
+
FontNamesAsync(): Promise<string[]>;
|
|
23
|
+
PrinterNamesAsync(): Promise<string[]>;
|
|
24
|
+
EncryptAsync(input: string): Promise<string>;
|
|
25
|
+
CreateHttpClient(accessToken?: string, useClientEx?: boolean): TopMediaServiceClient | TopMediaServiceClientEx;
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
+
import { AreaParams, FileResponse, RetrieveFileOptions } from './openAPIs/TopMediaServiceClient';
|
|
3
|
+
export declare class TopMediaServiceClientEx {
|
|
4
|
+
private instance;
|
|
5
|
+
private baseUrl;
|
|
6
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
7
|
+
constructor(baseUrl?: string, instance?: AxiosInstance);
|
|
8
|
+
areaAddFileEx(body: AreaParams | undefined, progressCallback?: (pd: ProgressCallbackData) => any, signal?: AbortSignal | undefined): Promise<void>;
|
|
9
|
+
protected processAreaAddFileEx(response: AxiosResponse): Promise<void>;
|
|
10
|
+
areaRetrieveFileEx(body: AreaParams | undefined, progressCallback?: (pd: ProgressCallbackData) => any, signal?: AbortSignal | undefined): Promise<FileResponse>;
|
|
11
|
+
protected processAreaRetrieveFileEx(response: AxiosResponse): Promise<FileResponse>;
|
|
12
|
+
retrieveFileEx(tID: number | undefined, dID: number | undefined, body: RetrieveFileOptions | undefined, progressCallback?: (pd: ProgressCallbackData) => any, signal?: AbortSignal): Promise<FileResponse>;
|
|
13
|
+
protected processRetrieveFileEx(response: AxiosResponse): Promise<FileResponse>;
|
|
14
|
+
}
|
|
15
|
+
export declare class ProgressCallbackData {
|
|
16
|
+
ProgressBarMaximum: number | undefined;
|
|
17
|
+
ProgressBarValue: number;
|
|
18
|
+
ProgressMessage?: string;
|
|
19
|
+
CustomParam?: object;
|
|
20
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { PopupRequest, PublicClientApplication } from "@azure/msal-browser";
|
|
2
|
+
import { IArchiveEngine, IAreaEngine, IBasketEngine, IBasketTypeEngine, IDataListEngine, IDcmtTypeEngine, IDiskEngine, IDossierEngine, IFavoritesEngine, IHomePageEngine, IJobEngine, ILicenseEngine, INotificationEngine, IOrchPlatformEngine, IPreviewEngine, IProcessEngine, IRecentEngine, ISavedQueryEngine, ISearchEngine, ISignCertEngine, ITSAEngine, ITaskEngine, ITreeEngine, IUploadFileEngine, IUserEngine, IWorkflowEngine, IWorkingGroupEngine, IRelationEngine, IDeleteEngine, IUpdateEngineByID, IArchiveEngineByID, IDcmtPlatformEngine, IADMEngine, INumeratorEngine, IReportEngine, ISignServerEngine, ILDAPEngine, IGroupEngine } from "./Engine";
|
|
3
|
+
import { ITopMediaServer } from "./TopMediaServer";
|
|
4
|
+
import { TopMediaServiceClient, SessionDescriptor, AppModules } from "./openAPIs/TopMediaServiceClient";
|
|
5
|
+
import { TopMediaServiceClientEx } from "./TopMediaServiceClientEx";
|
|
6
|
+
export interface ITopMediaSession {
|
|
7
|
+
/**Se impostato a true, aggiorna automaticamente la sessione.
|
|
8
|
+
* Se non viene impostato AutoRefreshInterval, la sessione viene aggiornata ogni 5 minuti */
|
|
9
|
+
AutoRefresh: boolean | undefined;
|
|
10
|
+
/** Intervallo espresso in minuti che indica ogni quanto deve essere aggiornata la sessione (default 5 minuti) */
|
|
11
|
+
AutoRefreshInterval: number;
|
|
12
|
+
SessionDescr: SessionDescriptor | undefined;
|
|
13
|
+
TopMediaServer: ITopMediaServer;
|
|
14
|
+
TMSClient: TopMediaServiceClient | undefined;
|
|
15
|
+
TMSClientEx: TopMediaServiceClientEx | undefined;
|
|
16
|
+
LoginAsync(sd: SessionDescriptor, useGlobals?: boolean): Promise<void>;
|
|
17
|
+
LoginToAsync(toAppModule: AppModules): Promise<SessionDescriptor | undefined>;
|
|
18
|
+
LogoutAsync(useGlobals?: boolean): Promise<void>;
|
|
19
|
+
RefreshAsync(): Promise<number | undefined>;
|
|
20
|
+
NewADMEngine(): IADMEngine;
|
|
21
|
+
NewArchiveEngine(): IArchiveEngine;
|
|
22
|
+
NewArchiveEngineByID(): IArchiveEngineByID;
|
|
23
|
+
NewAreaEngine(): IAreaEngine;
|
|
24
|
+
NewBasketEngine(): IBasketEngine;
|
|
25
|
+
NewBasketTypeEngine(): IBasketTypeEngine;
|
|
26
|
+
NewDataListEngine(): IDataListEngine;
|
|
27
|
+
NewDcmtPlatformEngine(): IDcmtPlatformEngine;
|
|
28
|
+
NewDcmtTypeEngine(): IDcmtTypeEngine;
|
|
29
|
+
NewDeleteEngine(): IDeleteEngine;
|
|
30
|
+
NewDiskEngine(): IDiskEngine;
|
|
31
|
+
NewDossierEngine(): IDossierEngine;
|
|
32
|
+
NewFavoritesEngine(): IFavoritesEngine;
|
|
33
|
+
NewGroupEngine(): IGroupEngine;
|
|
34
|
+
NewHomePageEngine(): IHomePageEngine;
|
|
35
|
+
NewJobEngine(): IJobEngine;
|
|
36
|
+
NewLDAPEngine(): ILDAPEngine;
|
|
37
|
+
NewLicenseEngine(): ILicenseEngine;
|
|
38
|
+
NewNotificationEngine(): INotificationEngine;
|
|
39
|
+
NewNumeratorEngine(): INumeratorEngine;
|
|
40
|
+
NewOrchPlatformEngine(): IOrchPlatformEngine;
|
|
41
|
+
NewPreviewEngine(): IPreviewEngine;
|
|
42
|
+
NewProcessEngine(): IProcessEngine;
|
|
43
|
+
NewRecentEngine(): IRecentEngine;
|
|
44
|
+
NewRelationEngine(): IRelationEngine;
|
|
45
|
+
NewReportEngine(): IReportEngine;
|
|
46
|
+
NewSavedQueryEngine(): ISavedQueryEngine;
|
|
47
|
+
NewSearchEngine(): ISearchEngine;
|
|
48
|
+
NewSignCertEngine(): ISignCertEngine;
|
|
49
|
+
NewSignServerEngine(): ISignServerEngine;
|
|
50
|
+
NewTaskEngine(): ITaskEngine;
|
|
51
|
+
NewTreeEngine(): ITreeEngine;
|
|
52
|
+
NewTSAEngine(): ITSAEngine;
|
|
53
|
+
NewUpdateEngineByID(): IUpdateEngineByID;
|
|
54
|
+
NewUploadFileEngine(): IUploadFileEngine;
|
|
55
|
+
NewUserEngine(): IUserEngine;
|
|
56
|
+
NewWorkflowEngine(): IWorkflowEngine;
|
|
57
|
+
NewWorkingGroupEngine(): IWorkingGroupEngine;
|
|
58
|
+
}
|
|
59
|
+
export declare class TopMediaSession implements ITopMediaSession {
|
|
60
|
+
constructor(tmSrv: ITopMediaServer);
|
|
61
|
+
SessionDescr: SessionDescriptor | undefined;
|
|
62
|
+
get TMSClient(): TopMediaServiceClient | undefined;
|
|
63
|
+
get TMSClientEx(): TopMediaServiceClientEx | undefined;
|
|
64
|
+
TopMediaServer: ITopMediaServer;
|
|
65
|
+
private _autoRefreshInterval;
|
|
66
|
+
get AutoRefreshInterval(): number;
|
|
67
|
+
set AutoRefreshInterval(autoRefreshInterval: number);
|
|
68
|
+
private _refreshTimer;
|
|
69
|
+
private _autoRefresh;
|
|
70
|
+
get AutoRefresh(): boolean | undefined;
|
|
71
|
+
set AutoRefresh(autoRefresh: boolean | undefined);
|
|
72
|
+
IsLogged(): boolean;
|
|
73
|
+
CheckIsLogged(): void;
|
|
74
|
+
_loginRequest: PopupRequest;
|
|
75
|
+
_accountId: string;
|
|
76
|
+
_msalInstance: PublicClientApplication | null | undefined;
|
|
77
|
+
LoginAsync(sd: SessionDescriptor, useGlobals?: boolean): Promise<void>;
|
|
78
|
+
LoginToAsync(toAppModule: AppModules): Promise<SessionDescriptor | undefined>;
|
|
79
|
+
private _azureLogout;
|
|
80
|
+
LogoutAsync(useGlobals?: boolean): Promise<void>;
|
|
81
|
+
RefreshAsync(): Promise<number | undefined>;
|
|
82
|
+
NewADMEngine(): IADMEngine;
|
|
83
|
+
NewArchiveEngine(): IArchiveEngine;
|
|
84
|
+
NewArchiveEngineByID(): IArchiveEngineByID;
|
|
85
|
+
NewAreaEngine(): IAreaEngine;
|
|
86
|
+
NewBasketEngine(): IBasketEngine;
|
|
87
|
+
NewBasketTypeEngine(): IBasketTypeEngine;
|
|
88
|
+
NewDataListEngine(): IDataListEngine;
|
|
89
|
+
NewDcmtPlatformEngine(): IDcmtPlatformEngine;
|
|
90
|
+
NewDcmtTypeEngine(): IDcmtTypeEngine;
|
|
91
|
+
NewDeleteEngine(): IDeleteEngine;
|
|
92
|
+
NewDiskEngine(): IDiskEngine;
|
|
93
|
+
NewDossierEngine(): IDossierEngine;
|
|
94
|
+
NewFavoritesEngine(): IFavoritesEngine;
|
|
95
|
+
NewGroupEngine(): IGroupEngine;
|
|
96
|
+
NewHomePageEngine(): IHomePageEngine;
|
|
97
|
+
NewJobEngine(): IJobEngine;
|
|
98
|
+
NewLDAPEngine(): ILDAPEngine;
|
|
99
|
+
NewLicenseEngine(): ILicenseEngine;
|
|
100
|
+
NewNotificationEngine(): INotificationEngine;
|
|
101
|
+
NewNumeratorEngine(): INumeratorEngine;
|
|
102
|
+
NewOrchPlatformEngine(): IOrchPlatformEngine;
|
|
103
|
+
NewProcessEngine(): IProcessEngine;
|
|
104
|
+
NewPreviewEngine(): IPreviewEngine;
|
|
105
|
+
NewRecentEngine(): IRecentEngine;
|
|
106
|
+
NewRelationEngine(): IRelationEngine;
|
|
107
|
+
NewReportEngine(): IReportEngine;
|
|
108
|
+
NewSavedQueryEngine(): ISavedQueryEngine;
|
|
109
|
+
NewSearchEngine(): ISearchEngine;
|
|
110
|
+
NewSignCertEngine(): ISignCertEngine;
|
|
111
|
+
NewSignServerEngine(): ISignServerEngine;
|
|
112
|
+
NewTaskEngine(): ITaskEngine;
|
|
113
|
+
NewTreeEngine(): ITreeEngine;
|
|
114
|
+
NewTSAEngine(): ITSAEngine;
|
|
115
|
+
NewUpdateEngineByID(): IUpdateEngineByID;
|
|
116
|
+
NewUploadFileEngine(): IUploadFileEngine;
|
|
117
|
+
NewUserEngine(): IUserEngine;
|
|
118
|
+
NewWorkflowEngine(): IWorkflowEngine;
|
|
119
|
+
NewWorkingGroupEngine(): IWorkingGroupEngine;
|
|
120
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class LocalStorageService {
|
|
2
|
+
static setItem<T extends string | number | Record<string, any>>(key: string, value: T): void;
|
|
3
|
+
static getItem<T extends Record<string, any> | string>(key: string): T | null;
|
|
4
|
+
static updateItem<T extends Record<string, any>>(key: string, value: T): void;
|
|
5
|
+
static deleteItem(key: string): void;
|
|
6
|
+
static clear(): void;
|
|
7
|
+
static findItemByField<T extends Record<string, any>>(key: string, field: keyof T, value: any): T | null;
|
|
8
|
+
static deleteItemByField<T extends Record<string, any>>(key: string, field: keyof T, value: any): void;
|
|
9
|
+
static updateItemByField<T extends Record<string, any>>(key: string, field: keyof T, value: any, newData: Partial<T>): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DcmtTypeDescriptor, QueryDescriptor, QueryOperators, WhereItem } from "../openAPIs/TopMediaServiceClient";
|
|
2
|
+
export declare enum ResultTypes {
|
|
3
|
+
NONE = "None",
|
|
4
|
+
SUCCESS = "Success",
|
|
5
|
+
WARNING = "Warning",
|
|
6
|
+
ERROR = "Error",
|
|
7
|
+
INFO = "Info"
|
|
8
|
+
}
|
|
9
|
+
export declare class QueryValidatorOptions {
|
|
10
|
+
DoSelectValidation: boolean;
|
|
11
|
+
DoOrderByValidation: boolean;
|
|
12
|
+
DoWhereHasItemsValidation: boolean;
|
|
13
|
+
PropertyName: string;
|
|
14
|
+
RaiseWarningForOnlyMetadataDcmtTypes: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class ValidationItem {
|
|
17
|
+
ResultType: ResultTypes;
|
|
18
|
+
Message: string;
|
|
19
|
+
PropertyName: string;
|
|
20
|
+
PropertyScopes: string[];
|
|
21
|
+
constructor(resultType: ResultTypes, propertyName: string, message: string, propertyScopes?: string[]);
|
|
22
|
+
}
|
|
23
|
+
export declare class PlatformObjectValidator {
|
|
24
|
+
static StringIsNullOrEmpty(value: string | undefined): boolean;
|
|
25
|
+
static StringIsNullOrWhiteSpace(value: string | undefined): boolean;
|
|
26
|
+
static GetInvalidFileNameChars(): string[];
|
|
27
|
+
static IsValidObjectName(name: string | null | undefined): boolean;
|
|
28
|
+
static GetTIDByQd(qd?: QueryDescriptor): number;
|
|
29
|
+
static ObjectNameValidator(propertyValue: string | null | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string): void;
|
|
30
|
+
static RequiredObjectValidator(propertyValue: object | null | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
31
|
+
static RequiredStrictlyPositiveNumberValidator(propertyValue: number | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
32
|
+
static RequiredStrictlyPositiveNumberValidator_RequiredField(propertyValue: number | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
33
|
+
static RequiredStrictlyPositiveNumberValidator_ValueNotAllowed(propertyValue: number | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
34
|
+
static RequiredNotEqualZeroNumberValidator(propertyValue: number | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
35
|
+
static RequiredNotEqualZeroNumberValidator_RequiredField(propertyValue: number | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
36
|
+
static RequiredNotEqualZeroNumberValidator_ValueNotAllowed(propertyValue: number | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
37
|
+
static RequiredNotNoneValueValidator(propertyValue: string | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
38
|
+
static RequiredStringValidator(propertyValue: string | null | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
39
|
+
static RequiredStringWithValidSpacesValidator(propertyValue: string | null | undefined, propertyName: string, vl: ValidationItem[], localizedPropertyCaption: string, showPropertyName?: boolean): void;
|
|
40
|
+
static GetNumberOfOperands(qo?: QueryOperators): 0 | 1 | 2 | 12 | 11 | 99;
|
|
41
|
+
static WhereItemHasValues(wi: WhereItem): boolean;
|
|
42
|
+
static QueryValidatorAsync(qdNew: QueryDescriptor | undefined, vl: ValidationItem[], qvo: QueryValidatorOptions, showPropertyName?: boolean): Promise<DcmtTypeDescriptor | undefined>;
|
|
43
|
+
}
|
|
@@ -307,4 +307,45 @@ export class PlatformObjectValidator {
|
|
|
307
307
|
return dtdFrom;
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
+
static DataListValidator(d) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
var _a;
|
|
313
|
+
let vil = [];
|
|
314
|
+
this.ObjectNameValidator(d.name, TMPropertyNames.entityName, vil, TMPropertyNames.entityName);
|
|
315
|
+
this.RequiredObjectValidator(d.items, TMPropertyNames.items, vil, '');
|
|
316
|
+
if (d.items) {
|
|
317
|
+
if (d.items.length == 0)
|
|
318
|
+
this.RequiredNotEqualZeroNumberValidator_RequiredField((_a = d.items) === null || _a === void 0 ? void 0 : _a.length, TMPropertyNames.items, vil, '');
|
|
319
|
+
else {
|
|
320
|
+
let viList;
|
|
321
|
+
let i = 0;
|
|
322
|
+
for (let aid of d.items) {
|
|
323
|
+
i++;
|
|
324
|
+
viList = [];
|
|
325
|
+
yield this.DataListItemValidator(aid, viList, true);
|
|
326
|
+
for (let vi of viList) {
|
|
327
|
+
vil.push(new ValidationItem(vi.ResultType, vi.PropertyName, `${SDK_Localizator.DataListItem} #${i} - ${vi.Message}`));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
for (let curdlid of d.items) {
|
|
331
|
+
let v = d.items.filter(i => i.value == curdlid.value);
|
|
332
|
+
if (v.length > 1) {
|
|
333
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, "items", `Esistono più elementi della lista dati con valore ${v[0].value}`));
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return vil;
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
static DataListItemValidator(dlid_1, vil_1) {
|
|
343
|
+
return __awaiter(this, arguments, void 0, function* (dlid, vil, showPropertyName = false) {
|
|
344
|
+
this.RequiredStringValidator(dlid.value, TMPropertyNames.value, vil, '');
|
|
345
|
+
if (!dlid.name) {
|
|
346
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, "itemName", SDK_Localizator.RequiredField));
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
310
351
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ITopMediaSession } from "../TopMediaSession";
|
|
2
|
+
import { DataListDescriptor, DcmtTypeDescriptor, QueryDescriptor, RelationDescriptor, SavedQueryDescriptor, SignCertDescriptor, TSADescriptor, TreeDescriptor, UserDescriptor, WorkingGroupDescriptor } from "../openAPIs/TopMediaServiceClient";
|
|
3
|
+
export declare class DataListCacheService {
|
|
4
|
+
private static _mutex;
|
|
5
|
+
private static _cacheAll;
|
|
6
|
+
private static _cache;
|
|
7
|
+
static GetAllAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<DataListDescriptor[]>;
|
|
8
|
+
static GetAsync(id: number | undefined, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<DataListDescriptor | undefined>;
|
|
9
|
+
static RemoveAll(tmSession?: ITopMediaSession | undefined): void;
|
|
10
|
+
static Remove(tmSession?: ITopMediaSession | undefined): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class DcmtTypeListCacheService {
|
|
13
|
+
private static _mutex;
|
|
14
|
+
private static _cacheWithoutMetadata;
|
|
15
|
+
/** Restituisce la cache di tutti i tipi documento SENZA metadati.
|
|
16
|
+
* Se deepCopy = true restituisce una copia della cache */
|
|
17
|
+
static GetAllWithoutMetadataAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<DcmtTypeDescriptor[]>;
|
|
18
|
+
static RemoveAllWithoutMetadata(tmSession?: ITopMediaSession | undefined): void;
|
|
19
|
+
private static _cacheWithMetadata;
|
|
20
|
+
/** Restituisce il tipo documento (tid).
|
|
21
|
+
* Se withMetadata = true, restituisce anche i metadati.
|
|
22
|
+
* Se deepCopy = true restituisce una copia */
|
|
23
|
+
static GetAsync(tid: number | undefined, withMetadata?: boolean, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean, refreshCache?: boolean): Promise<DcmtTypeDescriptor | undefined>;
|
|
24
|
+
static RemoveAllWithMetadata(tmSession?: ITopMediaSession | undefined): void;
|
|
25
|
+
private static RemoveWithMetadata;
|
|
26
|
+
/** Restituisce i tipi documento (CON metadati) referenziati da qd.
|
|
27
|
+
* Se deepCopy = true restituisce una copia */
|
|
28
|
+
static GetFromQdAsync(qd: QueryDescriptor | undefined, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean, refreshCache?: boolean): Promise<DcmtTypeDescriptor[]>;
|
|
29
|
+
/** Restituisce i tipi documento tids.
|
|
30
|
+
* Se withMetadata = true, restituisce anche i metadati.
|
|
31
|
+
* Se deepCopy = true restituisce una copia */
|
|
32
|
+
static GetFromTIDsAsync(tids: number[] | undefined, withMetadata?: boolean, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean, refreshCache?: boolean): Promise<DcmtTypeDescriptor[]>;
|
|
33
|
+
static GetCache(cacheWithoutMetadata: boolean): Map<string, DcmtTypeDescriptor[]>;
|
|
34
|
+
static CacheCount(cacheWithoutMetadata: boolean, tmSession?: ITopMediaSession | undefined): number;
|
|
35
|
+
}
|
|
36
|
+
export declare class RelationCacheService {
|
|
37
|
+
private static readonly _mutex;
|
|
38
|
+
private static readonly _cacheAllRelation;
|
|
39
|
+
static GetAllAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean, refreshCache?: boolean): Promise<RelationDescriptor[]>;
|
|
40
|
+
static RemoveAll(tmSession?: ITopMediaSession | undefined): void;
|
|
41
|
+
static CacheAllCount(tmSession?: ITopMediaSession | undefined): number;
|
|
42
|
+
}
|
|
43
|
+
export declare class SavedQueryCacheService {
|
|
44
|
+
private static _mutex;
|
|
45
|
+
private static _cacheAll;
|
|
46
|
+
private static _cache;
|
|
47
|
+
static GetAllAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<SavedQueryDescriptor[]>;
|
|
48
|
+
static GetAsync(id: number | undefined, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<SavedQueryDescriptor | undefined>;
|
|
49
|
+
static RemoveAll(tmSession?: ITopMediaSession | undefined): void;
|
|
50
|
+
static Remove(tmSession?: ITopMediaSession | undefined): void;
|
|
51
|
+
static CacheAllCount(tmSession?: ITopMediaSession | undefined): number;
|
|
52
|
+
}
|
|
53
|
+
export declare class WorkingGroupCacheService {
|
|
54
|
+
private static readonly _mutex;
|
|
55
|
+
private static readonly _cacheAll;
|
|
56
|
+
private static readonly _cache;
|
|
57
|
+
private static getAccessToken;
|
|
58
|
+
static GetAllAsync(tmSession?: ITopMediaSession, deepCopy?: boolean): Promise<WorkingGroupDescriptor[]>;
|
|
59
|
+
static GetAsync(id?: number, tmSession?: ITopMediaSession, deepCopy?: boolean): Promise<WorkingGroupDescriptor | undefined>;
|
|
60
|
+
static RemoveAll(tmSession?: ITopMediaSession): void;
|
|
61
|
+
static Remove(tmSession?: ITopMediaSession): void;
|
|
62
|
+
static CacheAllCount(tmSession?: ITopMediaSession): number;
|
|
63
|
+
/** Thread-safe execution wrapper using mutex */
|
|
64
|
+
private static withLock;
|
|
65
|
+
/** Deep copy helper */
|
|
66
|
+
private static cloneItems;
|
|
67
|
+
private static cloneItem;
|
|
68
|
+
}
|
|
69
|
+
export declare class SignCertCacheService {
|
|
70
|
+
private static _mutex;
|
|
71
|
+
private static _cacheAll;
|
|
72
|
+
private static _cache;
|
|
73
|
+
static GetAllAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<SignCertDescriptor[]>;
|
|
74
|
+
static GetAsync(id: number | undefined, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<SignCertDescriptor | undefined>;
|
|
75
|
+
static RemoveAll(tmSession?: ITopMediaSession | undefined): void;
|
|
76
|
+
static Remove(tmSession?: ITopMediaSession | undefined): void;
|
|
77
|
+
}
|
|
78
|
+
export declare class TreeCacheService {
|
|
79
|
+
private static _mutex;
|
|
80
|
+
private static _cacheAllSearch;
|
|
81
|
+
private static _cacheAllArchive;
|
|
82
|
+
static GetAllSearchAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<TreeDescriptor[]>;
|
|
83
|
+
static GetAllArchiveAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<TreeDescriptor[]>;
|
|
84
|
+
static RemoveAllSearch(tmSession?: ITopMediaSession | undefined): void;
|
|
85
|
+
static RemoveAllArchive(tmSession?: ITopMediaSession | undefined): void;
|
|
86
|
+
static CacheAllSearchCount(tmSession?: ITopMediaSession | undefined): number;
|
|
87
|
+
static CacheAllArchiveCount(tmSession?: ITopMediaSession | undefined): number;
|
|
88
|
+
}
|
|
89
|
+
export declare class TSACacheService {
|
|
90
|
+
private static _mutex;
|
|
91
|
+
private static _cacheAll;
|
|
92
|
+
private static _cache;
|
|
93
|
+
static GetAllAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<TSADescriptor[]>;
|
|
94
|
+
static GetAsync(id: number | undefined, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<TSADescriptor | undefined>;
|
|
95
|
+
static RemoveAll(tmSession?: ITopMediaSession | undefined): void;
|
|
96
|
+
static Remove(tmSession?: ITopMediaSession | undefined): void;
|
|
97
|
+
}
|
|
98
|
+
export declare class UserListCacheService {
|
|
99
|
+
private static _mutex;
|
|
100
|
+
private static _cache;
|
|
101
|
+
static GetAllAsync(tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<UserDescriptor[]>;
|
|
102
|
+
static GetAsync(userId: number | undefined, tmSession?: ITopMediaSession | undefined, deepCopy?: boolean): Promise<UserDescriptor | undefined>;
|
|
103
|
+
static RemoveAll(tmSession?: ITopMediaSession | undefined): void;
|
|
104
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ITopMediaSession } from "../TopMediaSession";
|
|
2
|
+
import { AppModules, DBBrands, LicenseDescriptor } from "../openAPIs/TopMediaServiceClient";
|
|
3
|
+
export declare class SDK_Globals {
|
|
4
|
+
private static _tmSession;
|
|
5
|
+
private static _appModule;
|
|
6
|
+
private static _appVersion;
|
|
7
|
+
private static _sdkVersion;
|
|
8
|
+
private static _sdkuiVersion;
|
|
9
|
+
private static _sdkName;
|
|
10
|
+
private static _sdkuiName;
|
|
11
|
+
private static _websdkVersion;
|
|
12
|
+
private static _useLocalizedName;
|
|
13
|
+
private static _dbBrand;
|
|
14
|
+
private static _license;
|
|
15
|
+
static get tmSession(): ITopMediaSession | undefined;
|
|
16
|
+
static set tmSession(theTmSession: ITopMediaSession | undefined);
|
|
17
|
+
static get appModule(): AppModules | undefined;
|
|
18
|
+
static set appModule(theAppModule: AppModules | undefined);
|
|
19
|
+
static get appVersion(): string | undefined;
|
|
20
|
+
static set appVersion(theAppVersion: string | undefined);
|
|
21
|
+
static get dbBrand(): DBBrands;
|
|
22
|
+
static get sdkVersion(): string | undefined;
|
|
23
|
+
static set sdkVersion(theSdkVersion: string | undefined);
|
|
24
|
+
static get sdkuiVersion(): string | undefined;
|
|
25
|
+
static set sdkuiVersion(theSdkuiVersion: string | undefined);
|
|
26
|
+
static get sdkName(): string | undefined;
|
|
27
|
+
static set sdkName(theSdkName: string | undefined);
|
|
28
|
+
static get sdkuiName(): string | undefined;
|
|
29
|
+
static set sdkuiName(theSdkuiName: string | undefined);
|
|
30
|
+
static get websdkVersion(): string | undefined;
|
|
31
|
+
static get useLocalizedName(): boolean;
|
|
32
|
+
static set useLocalizedName(theUseLocalizedName: boolean);
|
|
33
|
+
static get license(): LicenseDescriptor | undefined;
|
|
34
|
+
static set license(theLicense: LicenseDescriptor | undefined);
|
|
35
|
+
}
|