@computec/uibase 1.0.2 → 1.0.4
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/communication/ConnectionOptions.d.ts +48 -0
- package/dist/communication/ConnectionOptions.d.ts.map +1 -0
- package/dist/communication/ConnectionOptions.js +9 -0
- package/dist/communication/IConnectionInfo.d.ts +18 -0
- package/dist/communication/IConnectionInfo.d.ts.map +1 -0
- package/dist/communication/IConnectionInfo.js +2 -0
- package/dist/communication/ISignalRHubClient.d.ts +47 -0
- package/dist/communication/ISignalRHubClient.d.ts.map +1 -0
- package/dist/communication/ISignalRHubClient.js +2 -0
- package/dist/communication/ISignalRMessage.d.ts +8 -0
- package/dist/communication/ISignalRMessage.d.ts.map +1 -0
- package/dist/communication/ISignalRMessage.js +2 -0
- package/dist/communication/SignalRHubClient.d.ts +26 -0
- package/dist/communication/SignalRHubClient.d.ts.map +1 -0
- package/dist/communication/SignalRHubClient.js +133 -0
- package/dist/communication/SignalRMessage.d.ts +10 -0
- package/dist/communication/SignalRMessage.d.ts.map +1 -0
- package/dist/communication/SignalRMessage.js +9 -0
- package/dist/communication/SubscribeProperties.d.ts +17 -0
- package/dist/communication/SubscribeProperties.d.ts.map +1 -0
- package/dist/communication/SubscribeProperties.js +25 -0
- package/dist/helpers/ErrorHelper.d.ts +1 -1
- package/dist/helpers/ErrorHelper.d.ts.map +1 -1
- package/dist/helpers/ErrorHelper.js +6 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/models/AppEngineConfiguration.d.ts +26 -0
- package/dist/models/AppEngineConfiguration.d.ts.map +1 -0
- package/dist/models/AppEngineConfiguration.js +9 -0
- package/dist/models/AppEngineException.d.ts +3 -5
- package/dist/models/AppEngineException.d.ts.map +1 -1
- package/dist/models/AppEngineException.js +9 -7
- package/dist/models/BaseBusinessObject.d.ts +1 -2
- package/dist/models/BaseBusinessObject.d.ts.map +1 -1
- package/dist/models/CompanyInfo.d.ts +11 -0
- package/dist/models/CompanyInfo.d.ts.map +1 -0
- package/dist/models/CompanyInfo.js +22 -0
- package/dist/models/ProblemDetails.d.ts +13 -0
- package/dist/models/ProblemDetails.d.ts.map +1 -0
- package/dist/models/ProblemDetails.js +22 -0
- package/dist/models/UserInfo.d.ts +7 -0
- package/dist/models/UserInfo.d.ts.map +1 -0
- package/dist/models/UserInfo.js +9 -0
- package/dist/models/ValidationProblemDetails.d.ts +10 -0
- package/dist/models/ValidationProblemDetails.d.ts.map +1 -0
- package/dist/models/ValidationProblemDetails.js +30 -0
- package/dist/models/Version.d.ts +15 -0
- package/dist/models/Version.d.ts.map +1 -0
- package/dist/models/Version.js +62 -0
- package/dist/models/interfaces/IAppEngineConfiguration.d.ts +24 -0
- package/dist/models/interfaces/IAppEngineConfiguration.d.ts.map +1 -0
- package/dist/models/interfaces/IAppEngineConfiguration.js +2 -0
- package/dist/models/interfaces/IAppEngineException.d.ts +2 -4
- package/dist/models/interfaces/IAppEngineException.d.ts.map +1 -1
- package/dist/models/interfaces/IProblemDetails.d.ts +8 -0
- package/dist/models/interfaces/IProblemDetails.d.ts.map +1 -0
- package/dist/models/interfaces/IProblemDetails.js +2 -0
- package/dist/models/interfaces/IValidationProblemDetails.d.ts +6 -0
- package/dist/models/interfaces/IValidationProblemDetails.d.ts.map +1 -0
- package/dist/models/interfaces/IValidationProblemDetails.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/.library +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions-dbg.js +19 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/IConnectionInfo-dbg.js +7 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/IConnectionInfo.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/IConnectionInfo.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRHubClient-dbg.js +7 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRHubClient.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRHubClient.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRMessage-dbg.js +7 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRMessage.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRMessage.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient-dbg.js +215 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRMessage-dbg.js +31 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRMessage.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRMessage.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SubscribeProperties-dbg.js +49 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SubscribeProperties.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/SubscribeProperties.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper-dbg.js +7 -1
- package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/library-dbg.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/library-preload.js +37 -7
- package/dist-ui5/resources/computec/appengine/uibase/library-preload.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/library.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/manifest.json +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException-dbg.js +5 -7
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails-dbg.js +49 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails-dbg.js +70 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IProblemDetails-dbg.js +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IProblemDetails.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IProblemDetails.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IValidationProblemDetails-dbg.js +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IValidationProblemDetails.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IValidationProblemDetails.js.map +1 -0
- package/package.json +6 -10
- package/dist-ui5/resources/computec/appengine/uibase/index-dbg.js +0 -43
- package/dist-ui5/resources/computec/appengine/uibase/index.js +0 -2
- package/dist-ui5/resources/computec/appengine/uibase/index.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name ConnectionOptions
|
|
3
|
+
* ConnectionOptions is used to configure the connection to the server.
|
|
4
|
+
*/
|
|
5
|
+
declare class ConnectionOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The root path for the connection. If not provided default is `${window.location.origin}/tnc`.
|
|
8
|
+
*/
|
|
9
|
+
rootPath?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Indicates whether to use a shared connection. False by default
|
|
12
|
+
*/
|
|
13
|
+
useSharedConnection?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether to automatically connect to the server. True by default. If true connection is made after creagin the object.
|
|
16
|
+
*/
|
|
17
|
+
autoConnect?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates whether to automatically reconnect to the server.
|
|
20
|
+
*/
|
|
21
|
+
autoReconnect?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The interval or intervals (in milliseconds) at which to attempt auto reconnection.
|
|
24
|
+
*/
|
|
25
|
+
autoReconnectInterval?: number | number[];
|
|
26
|
+
/**
|
|
27
|
+
* The retry policy for auto reconnection. If policy is provided, autoReconnectInterval is ignored.
|
|
28
|
+
*/
|
|
29
|
+
autoReconnectPolicy?: signalR.IRetryPolicy;
|
|
30
|
+
/**
|
|
31
|
+
* The interval (in milliseconds) at which to send keep-alive messages to the server.
|
|
32
|
+
*/
|
|
33
|
+
keepAliveIntervalInMilliseconds?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The timeout (in milliseconds) for server responses.
|
|
36
|
+
*/
|
|
37
|
+
serverTimeoutInMilliseconds?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The Company Api Key used for authentication
|
|
40
|
+
*/
|
|
41
|
+
companyApiKey?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The Company id used for authentication
|
|
44
|
+
*/
|
|
45
|
+
companyId?: string;
|
|
46
|
+
}
|
|
47
|
+
export default ConnectionOptions;
|
|
48
|
+
//# sourceMappingURL=ConnectionOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionOptions.d.ts","sourceRoot":"","sources":["../../src/communication/ConnectionOptions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAM,iBAAiB;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;IAE3C;;OAEG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as signalR from "@microsoft/signalr";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the connection information for a SignalR hub.
|
|
4
|
+
* @interface IConnectionInfo
|
|
5
|
+
* @property {string} path - The path to the SignalR hub endpoint.
|
|
6
|
+
* @property {signalR.HubConnection} connection - The SignalR HubConnection instance.
|
|
7
|
+
*/
|
|
8
|
+
export default interface IConnectionInfo {
|
|
9
|
+
/**
|
|
10
|
+
* The path to the SignalR hub endpoint.
|
|
11
|
+
*/
|
|
12
|
+
path: string;
|
|
13
|
+
/**
|
|
14
|
+
* The SignalR HubConnection instance.
|
|
15
|
+
*/
|
|
16
|
+
connection: signalR.HubConnection;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=IConnectionInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConnectionInfo.d.ts","sourceRoot":"","sources":["../../src/communication/IConnectionInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,WAAW,eAAe;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC;CAClC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as signalR from "@microsoft/signalr";
|
|
2
|
+
import { SubscribeProperties } from "./SubscribeProperties";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for a SignalR Hub client, providing methods and properties to manage SignalR connections and subscriptions.
|
|
5
|
+
* @interface ISignalRHubClient
|
|
6
|
+
*/
|
|
7
|
+
export default interface ISignalRHubClient {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use {@link initialized} promise instead.
|
|
10
|
+
* A promise that resolves when the client is initialized (deprecated).
|
|
11
|
+
*/
|
|
12
|
+
promise: Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* A promise that resolves when the client is initialized.
|
|
15
|
+
*/
|
|
16
|
+
initialized: Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the current SignalR HubConnection instance.
|
|
19
|
+
*/
|
|
20
|
+
get connection(): signalR.HubConnection;
|
|
21
|
+
/**
|
|
22
|
+
* Gets a promise that resolves when the client is automatically connected.
|
|
23
|
+
*/
|
|
24
|
+
get autoConnectPromise(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Connects to the SignalR hub.
|
|
27
|
+
* @returns {Promise<void>} A promise that resolves when the connection is established.
|
|
28
|
+
*/
|
|
29
|
+
connect(): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Disconnects from the SignalR hub.
|
|
32
|
+
*/
|
|
33
|
+
disconnect(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Subscribes to a SignalR hub.
|
|
36
|
+
* @param {SubscribeProperties} options - Options for the subscription.
|
|
37
|
+
* @returns {Promise<void>} A promise that resolves when the subscription is successful.
|
|
38
|
+
*/
|
|
39
|
+
subscribe(options: SubscribeProperties): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Registers a handler for a specific method name received from the SignalR hub.
|
|
42
|
+
* @param {string} methodName - The name of the method to handle.
|
|
43
|
+
* @param {(...args: any[]) => any} newMethod - The handler function to execute when the method is received.
|
|
44
|
+
*/
|
|
45
|
+
on(methodName: string, newMethod: (...args: any[]) => any): void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ISignalRHubClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISignalRHubClient.d.ts","sourceRoot":"","sources":["../../src/communication/ISignalRHubClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACzC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;OAEG;IACH,IAAI,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAExC;;OAEG;IACH,IAAI,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;;OAIG;IACH,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAAC;CACjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISignalRMessage.d.ts","sourceRoot":"","sources":["../../src/communication/ISignalRMessage.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,eAAe;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import IConnectionInfo from "./IConnectionInfo";
|
|
2
|
+
import ConnectionOptions from "./ConnectionOptions";
|
|
3
|
+
import ISignalRHubClient from "./ISignalRHubClient";
|
|
4
|
+
import { SubscribeProperties } from "./SubscribeProperties";
|
|
5
|
+
export default class SignalRHubClient implements ISignalRHubClient {
|
|
6
|
+
protected _globalConnections: Array<IConnectionInfo>;
|
|
7
|
+
protected _connection: signalR.HubConnection;
|
|
8
|
+
options: ConnectionOptions;
|
|
9
|
+
initialized: Promise<void>;
|
|
10
|
+
get promise(): Promise<void>;
|
|
11
|
+
get autoConnectPromise(): Promise<void>;
|
|
12
|
+
get connection(): import("@microsoft/signalr").HubConnection;
|
|
13
|
+
constructor(options?: ConnectionOptions);
|
|
14
|
+
connect(): Promise<void>;
|
|
15
|
+
disconnect(): void;
|
|
16
|
+
subscribe(options: SubscribeProperties): Promise<void>;
|
|
17
|
+
on<T, TU>(methodName: string, callback: (message: T) => TU): void;
|
|
18
|
+
off: (methodName: string) => void;
|
|
19
|
+
protected _subscribe(options: SubscribeProperties): Promise<void>;
|
|
20
|
+
private _addQueries;
|
|
21
|
+
private _initNewConnection;
|
|
22
|
+
private _setAutoReconnect;
|
|
23
|
+
private _getSharedConnection;
|
|
24
|
+
private _getConnection;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=SignalRHubClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignalRHubClient.d.ts","sourceRoot":"","sources":["../../src/communication/SignalRHubClient.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,iBAAiB;IACjE,SAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACrD,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,aAAa,CAAC;IAC7C,OAAO,EAAE,iBAAiB,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,IAAW,OAAO,kBAEjB;IACD,IAAW,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE7C;IACD,IAAW,UAAU,+CAEpB;gBACW,OAAO,CAAC,EAAE,iBAAiB;IAiBjC,OAAO;IAIb,UAAU;IAKH,SAAS,CAAC,OAAO,EAAE,mBAAmB;IAGtC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE;IAI1D,GAAG,GAAI,YAAY,MAAM,UAAsC;cAEtD,UAAU,CAAC,OAAO,EAAE,mBAAmB;IAavD,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,cAAc;CAOtB"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const ErrorHelper_1 = __importDefault(require("../helpers/ErrorHelper"));
|
|
16
|
+
class SignalRHubClient {
|
|
17
|
+
get promise() {
|
|
18
|
+
return this.initialized;
|
|
19
|
+
}
|
|
20
|
+
get autoConnectPromise() {
|
|
21
|
+
return this.initialized;
|
|
22
|
+
}
|
|
23
|
+
get connection() {
|
|
24
|
+
return this._connection;
|
|
25
|
+
}
|
|
26
|
+
constructor(options) {
|
|
27
|
+
this.off = (methodName) => this._connection.off(methodName);
|
|
28
|
+
options = Object.assign({ useSharedConnection: false, rootPath: `${window.location.origin}/tnc`, autoConnect: true }, options);
|
|
29
|
+
this._globalConnections = [];
|
|
30
|
+
this.options = options;
|
|
31
|
+
this._connection = this._getConnection(this.options);
|
|
32
|
+
if (this.options.autoConnect) {
|
|
33
|
+
this.initialized = this.connect();
|
|
34
|
+
}
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
connect() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
return yield this.connection.start();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
disconnect() {
|
|
43
|
+
this.connection.stop();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
subscribe(options) {
|
|
47
|
+
return this._subscribe(options);
|
|
48
|
+
}
|
|
49
|
+
on(methodName, callback) {
|
|
50
|
+
this.connection.on(methodName, callback);
|
|
51
|
+
}
|
|
52
|
+
_subscribe(options) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
try {
|
|
55
|
+
yield this.initialized;
|
|
56
|
+
const args = options.getAttributes();
|
|
57
|
+
yield this.connection.invoke(options.Name, ...args);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
const err = ErrorHelper_1.default.getError(error);
|
|
61
|
+
console.error(`${err.name}:${err.message}`);
|
|
62
|
+
console.error(err.stack);
|
|
63
|
+
throw new Error(`Error while subscribing to function: ${err.name} ${err.message}`);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
_addQueries(options) {
|
|
68
|
+
const queries = [];
|
|
69
|
+
if (options.companyId)
|
|
70
|
+
queries.push(`CompanyId=${options.companyId}`);
|
|
71
|
+
if (options.companyApiKey) {
|
|
72
|
+
queries.push(`ApiKey=${options.companyApiKey}`);
|
|
73
|
+
}
|
|
74
|
+
if (queries.length == 0)
|
|
75
|
+
return "";
|
|
76
|
+
return "?" + queries.join("&");
|
|
77
|
+
}
|
|
78
|
+
_initNewConnection(options) {
|
|
79
|
+
var _a;
|
|
80
|
+
let connection;
|
|
81
|
+
let hubConnectionBuilder = new signalR.HubConnectionBuilder();
|
|
82
|
+
if (options.rootPath) {
|
|
83
|
+
const args = `${(_a = options.companyId) !== null && _a !== void 0 ? _a : ""} `;
|
|
84
|
+
hubConnectionBuilder = hubConnectionBuilder.withUrl(`${options.rootPath}${this._addQueries(options)}`);
|
|
85
|
+
}
|
|
86
|
+
hubConnectionBuilder = this._setAutoReconnect(hubConnectionBuilder, options);
|
|
87
|
+
if (options.keepAliveIntervalInMilliseconds && options.keepAliveIntervalInMilliseconds > 0) {
|
|
88
|
+
hubConnectionBuilder = hubConnectionBuilder.withKeepAliveInterval(options.keepAliveIntervalInMilliseconds);
|
|
89
|
+
}
|
|
90
|
+
if (options.serverTimeoutInMilliseconds && options.serverTimeoutInMilliseconds > 0) {
|
|
91
|
+
hubConnectionBuilder = hubConnectionBuilder.withServerTimeout(options.serverTimeoutInMilliseconds);
|
|
92
|
+
}
|
|
93
|
+
connection = hubConnectionBuilder.build();
|
|
94
|
+
return connection;
|
|
95
|
+
}
|
|
96
|
+
_setAutoReconnect(hubConnectionBuilder, options) {
|
|
97
|
+
if (!options.autoReconnect) {
|
|
98
|
+
return hubConnectionBuilder;
|
|
99
|
+
}
|
|
100
|
+
if (options.autoReconnectPolicy) {
|
|
101
|
+
return hubConnectionBuilder.withAutomaticReconnect(options.autoReconnectPolicy);
|
|
102
|
+
}
|
|
103
|
+
if (typeof options.autoReconnectInterval === "number") {
|
|
104
|
+
return hubConnectionBuilder.withAutomaticReconnect([options.autoReconnectInterval]);
|
|
105
|
+
}
|
|
106
|
+
if (Array.isArray(options.autoReconnectInterval) && options.autoReconnectInterval.length > 0) {
|
|
107
|
+
return hubConnectionBuilder.withAutomaticReconnect(options.autoReconnectInterval);
|
|
108
|
+
}
|
|
109
|
+
return hubConnectionBuilder.withAutomaticReconnect();
|
|
110
|
+
}
|
|
111
|
+
_getSharedConnection(options) {
|
|
112
|
+
let existingConnectionInfo = this._globalConnections.find((ci) => ci.path === options.rootPath);
|
|
113
|
+
let connection;
|
|
114
|
+
if (!existingConnectionInfo) {
|
|
115
|
+
connection = this._initNewConnection(this.options);
|
|
116
|
+
existingConnectionInfo = {
|
|
117
|
+
path: options.rootPath,
|
|
118
|
+
connection: connection,
|
|
119
|
+
};
|
|
120
|
+
this._globalConnections.push(existingConnectionInfo);
|
|
121
|
+
}
|
|
122
|
+
return existingConnectionInfo === null || existingConnectionInfo === void 0 ? void 0 : existingConnectionInfo.connection;
|
|
123
|
+
}
|
|
124
|
+
_getConnection(options) {
|
|
125
|
+
if (this.options.useSharedConnection) {
|
|
126
|
+
return this._getSharedConnection(options);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return this._initNewConnection(this.options);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.default = SignalRHubClient;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import BaseBusinessObject from "../models/BaseBusinessObject";
|
|
2
|
+
import ISignalRMessage from "./ISignalRMessage";
|
|
3
|
+
export default class SignalRMessage extends BaseBusinessObject implements ISignalRMessage {
|
|
4
|
+
CompanyId: string;
|
|
5
|
+
EventType: string;
|
|
6
|
+
FormType: string;
|
|
7
|
+
ObjectKey: string;
|
|
8
|
+
UserName: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=SignalRMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignalRMessage.d.ts","sourceRoot":"","sources":["../../src/communication/SignalRMessage.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,kBAAmB,YAAW,eAAe;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseBusinessObject_1 = __importDefault(require("../models/BaseBusinessObject"));
|
|
7
|
+
class SignalRMessage extends BaseBusinessObject_1.default {
|
|
8
|
+
}
|
|
9
|
+
exports.default = SignalRMessage;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents properties used for subscribing to a SignalR hub or similar event source.
|
|
3
|
+
*/
|
|
4
|
+
export declare class SubscribeProperties {
|
|
5
|
+
Name: string;
|
|
6
|
+
/**
|
|
7
|
+
* Creates an instance of SubscribeProperties.
|
|
8
|
+
* @param {string} Name - The name of the subscription property.
|
|
9
|
+
*/
|
|
10
|
+
constructor(Name: string);
|
|
11
|
+
/**
|
|
12
|
+
* Returns all attributes of the instance except the 'Name' property.
|
|
13
|
+
* @returns {any[]} An array of attribute values excluding 'Name'.
|
|
14
|
+
*/
|
|
15
|
+
getAttributes(): any[];
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=SubscribeProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscribeProperties.d.ts","sourceRoot":"","sources":["../../src/communication/SubscribeProperties.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,mBAAmB;IAKZ,IAAI,EAAE,MAAM;IAJ/B;;;OAGG;gBACgB,IAAI,EAAE,MAAM;IAE/B;;;OAGG;IACH,aAAa;CAKb"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscribeProperties = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Represents properties used for subscribing to a SignalR hub or similar event source.
|
|
6
|
+
*/
|
|
7
|
+
class SubscribeProperties {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of SubscribeProperties.
|
|
10
|
+
* @param {string} Name - The name of the subscription property.
|
|
11
|
+
*/
|
|
12
|
+
constructor(Name) {
|
|
13
|
+
this.Name = Name;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns all attributes of the instance except the 'Name' property.
|
|
17
|
+
* @returns {any[]} An array of attribute values excluding 'Name'.
|
|
18
|
+
*/
|
|
19
|
+
getAttributes() {
|
|
20
|
+
const idx = Object.keys(this).indexOf("Name");
|
|
21
|
+
const args = [...Object.values(this).slice(0, idx), ...Object.values(this).slice(idx + 1)];
|
|
22
|
+
return args;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.SubscribeProperties = SubscribeProperties;
|
|
@@ -10,6 +10,6 @@ export default class ErrorHelper {
|
|
|
10
10
|
* @param error any object
|
|
11
11
|
* @returns boolean
|
|
12
12
|
*/
|
|
13
|
-
static isAppEngineException(error: any): error is import("
|
|
13
|
+
static isAppEngineException(error: any): error is import("../models/interfaces/IAppEngineException").default;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=ErrorHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,OAAO,WAAW;IAC/B;;;OAGG;WACW,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK;IAmBzC;;;;;OAKG;WACW,oBAAoB,CAAC,KAAK,EAAE,GAAG;CAG7C"}
|
|
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ValidationProblemDetails_1 = __importDefault(require("../models/ValidationProblemDetails"));
|
|
6
7
|
const AppEngineException_1 = __importDefault(require("../models/AppEngineException"));
|
|
8
|
+
const ProblemDetails_1 = __importDefault(require("../models/ProblemDetails"));
|
|
7
9
|
class ErrorHelper {
|
|
8
10
|
/**
|
|
9
11
|
* @description Helper method that try to return Error type
|
|
@@ -16,6 +18,10 @@ class ErrorHelper {
|
|
|
16
18
|
return error;
|
|
17
19
|
case typeof error === "string":
|
|
18
20
|
return new Error(error);
|
|
21
|
+
case ValidationProblemDetails_1.default.is(error):
|
|
22
|
+
return ValidationProblemDetails_1.default.create(error).error;
|
|
23
|
+
case ProblemDetails_1.default.is(error):
|
|
24
|
+
return ProblemDetails_1.default.create(error).error;
|
|
19
25
|
case AppEngineException_1.default.is(error):
|
|
20
26
|
return new AppEngineException_1.default(error).error;
|
|
21
27
|
case (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.message:
|
package/dist/index.d.ts
CHANGED
|
@@ -7,17 +7,27 @@ export { default as ErrorHelper } from './helpers/ErrorHelper';
|
|
|
7
7
|
export * from './helpers/ErrorHelper';
|
|
8
8
|
export { default as HttpClientHelper } from './helpers/HttpClientHelper';
|
|
9
9
|
export * from './helpers/HttpClientHelper';
|
|
10
|
+
export { default as AppEngineConfiguration } from './models/AppEngineConfiguration';
|
|
11
|
+
export * from './models/AppEngineConfiguration';
|
|
10
12
|
export { default as AppEngineException } from './models/AppEngineException';
|
|
11
13
|
export * from './models/AppEngineException';
|
|
12
14
|
export { default as BaseBusinessObject } from './models/BaseBusinessObject';
|
|
13
15
|
export * from './models/BaseBusinessObject';
|
|
16
|
+
export { default as CompanyInfo } from './models/CompanyInfo';
|
|
17
|
+
export * from './models/CompanyInfo';
|
|
14
18
|
export { default as HeadersContentTypeEnum } from './models/enums/HeadersContentTypeEnum';
|
|
15
19
|
export * from './models/enums/HeadersContentTypeEnum';
|
|
16
20
|
export * from './models/enums/StorageTypeEnum';
|
|
21
|
+
export { default as IAppEngineConfiguration } from './models/interfaces/IAppEngineConfiguration';
|
|
22
|
+
export * from './models/interfaces/IAppEngineConfiguration';
|
|
17
23
|
export { default as IAppEngineException } from './models/interfaces/IAppEngineException';
|
|
18
24
|
export * from './models/interfaces/IAppEngineException';
|
|
19
25
|
export { default as LocalStorage } from './models/LocalStorage';
|
|
20
26
|
export * from './models/LocalStorage';
|
|
21
27
|
export { default as Session } from './models/Session';
|
|
22
28
|
export * from './models/Session';
|
|
29
|
+
export { default as UserInfo } from './models/UserInfo';
|
|
30
|
+
export * from './models/UserInfo';
|
|
31
|
+
export { default as Version } from './models/Version';
|
|
32
|
+
export * from './models/Version';
|
|
23
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC3F,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC/D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC1F,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACzF,cAAc,yCAAyC,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC3F,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC/D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC1F,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACjG,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACzF,cAAc,yCAAyC,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.Session = exports.LocalStorage = exports.HeadersContentTypeEnum = exports.BaseBusinessObject = exports.AppEngineException = exports.HttpClientHelper = exports.ErrorHelper = exports.HttpClientCacheOptions = exports.HttpClient = void 0;
|
|
20
|
+
exports.Version = exports.UserInfo = exports.Session = exports.LocalStorage = exports.HeadersContentTypeEnum = exports.CompanyInfo = exports.BaseBusinessObject = exports.AppEngineException = exports.AppEngineConfiguration = exports.HttpClientHelper = exports.ErrorHelper = exports.HttpClientCacheOptions = exports.HttpClient = void 0;
|
|
21
21
|
var HttpClient_1 = require("./communication/HttpClient");
|
|
22
22
|
Object.defineProperty(exports, "HttpClient", { enumerable: true, get: function () { return __importDefault(HttpClient_1).default; } });
|
|
23
23
|
__exportStar(require("./communication/HttpClient"), exports);
|
|
@@ -31,16 +31,23 @@ __exportStar(require("./helpers/ErrorHelper"), exports);
|
|
|
31
31
|
var HttpClientHelper_1 = require("./helpers/HttpClientHelper");
|
|
32
32
|
Object.defineProperty(exports, "HttpClientHelper", { enumerable: true, get: function () { return __importDefault(HttpClientHelper_1).default; } });
|
|
33
33
|
__exportStar(require("./helpers/HttpClientHelper"), exports);
|
|
34
|
+
var AppEngineConfiguration_1 = require("./models/AppEngineConfiguration");
|
|
35
|
+
Object.defineProperty(exports, "AppEngineConfiguration", { enumerable: true, get: function () { return __importDefault(AppEngineConfiguration_1).default; } });
|
|
36
|
+
__exportStar(require("./models/AppEngineConfiguration"), exports);
|
|
34
37
|
var AppEngineException_1 = require("./models/AppEngineException");
|
|
35
38
|
Object.defineProperty(exports, "AppEngineException", { enumerable: true, get: function () { return __importDefault(AppEngineException_1).default; } });
|
|
36
39
|
__exportStar(require("./models/AppEngineException"), exports);
|
|
37
40
|
var BaseBusinessObject_1 = require("./models/BaseBusinessObject");
|
|
38
41
|
Object.defineProperty(exports, "BaseBusinessObject", { enumerable: true, get: function () { return __importDefault(BaseBusinessObject_1).default; } });
|
|
39
42
|
__exportStar(require("./models/BaseBusinessObject"), exports);
|
|
43
|
+
var CompanyInfo_1 = require("./models/CompanyInfo");
|
|
44
|
+
Object.defineProperty(exports, "CompanyInfo", { enumerable: true, get: function () { return __importDefault(CompanyInfo_1).default; } });
|
|
45
|
+
__exportStar(require("./models/CompanyInfo"), exports);
|
|
40
46
|
var HeadersContentTypeEnum_1 = require("./models/enums/HeadersContentTypeEnum");
|
|
41
47
|
Object.defineProperty(exports, "HeadersContentTypeEnum", { enumerable: true, get: function () { return __importDefault(HeadersContentTypeEnum_1).default; } });
|
|
42
48
|
__exportStar(require("./models/enums/HeadersContentTypeEnum"), exports);
|
|
43
49
|
__exportStar(require("./models/enums/StorageTypeEnum"), exports);
|
|
50
|
+
__exportStar(require("./models/interfaces/IAppEngineConfiguration"), exports);
|
|
44
51
|
__exportStar(require("./models/interfaces/IAppEngineException"), exports);
|
|
45
52
|
var LocalStorage_1 = require("./models/LocalStorage");
|
|
46
53
|
Object.defineProperty(exports, "LocalStorage", { enumerable: true, get: function () { return __importDefault(LocalStorage_1).default; } });
|
|
@@ -48,3 +55,9 @@ __exportStar(require("./models/LocalStorage"), exports);
|
|
|
48
55
|
var Session_1 = require("./models/Session");
|
|
49
56
|
Object.defineProperty(exports, "Session", { enumerable: true, get: function () { return __importDefault(Session_1).default; } });
|
|
50
57
|
__exportStar(require("./models/Session"), exports);
|
|
58
|
+
var UserInfo_1 = require("./models/UserInfo");
|
|
59
|
+
Object.defineProperty(exports, "UserInfo", { enumerable: true, get: function () { return __importDefault(UserInfo_1).default; } });
|
|
60
|
+
__exportStar(require("./models/UserInfo"), exports);
|
|
61
|
+
var Version_1 = require("./models/Version");
|
|
62
|
+
Object.defineProperty(exports, "Version", { enumerable: true, get: function () { return __importDefault(Version_1).default; } });
|
|
63
|
+
__exportStar(require("./models/Version"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import BaseBusinessObject from "./BaseBusinessObject";
|
|
2
|
+
import IAppEngineConfiguration from "./interfaces/IAppEngineConfiguration";
|
|
3
|
+
export default class AppEngineConfiguration extends BaseBusinessObject implements IAppEngineConfiguration {
|
|
4
|
+
Code: number;
|
|
5
|
+
Name?: string;
|
|
6
|
+
U_CoreVersion?: string;
|
|
7
|
+
U_CoreDbVersion?: string;
|
|
8
|
+
U_AESrvAddr?: string;
|
|
9
|
+
U_LicenseServer?: string;
|
|
10
|
+
U_CompanyGuid?: string;
|
|
11
|
+
U_ApiKey?: string;
|
|
12
|
+
U_CmdTimeout?: number;
|
|
13
|
+
U_ConnTimeout?: number;
|
|
14
|
+
U_MaxPoolSize?: number;
|
|
15
|
+
U_MinPoolSize?: number;
|
|
16
|
+
U_AStartDate?: Date;
|
|
17
|
+
U_AEndDate?: Date;
|
|
18
|
+
U_OpeningMode?: string;
|
|
19
|
+
U_TimeZone?: string;
|
|
20
|
+
U_SldServer?: string;
|
|
21
|
+
U_SapLicenseServer?: string;
|
|
22
|
+
U_ApiGatewayAddress?: string;
|
|
23
|
+
U_SLServer?: string;
|
|
24
|
+
U_GMapAPIKey: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=AppEngineConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppEngineConfiguration.d.ts","sourceRoot":"","sources":["../../src/models/AppEngineConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,uBAAuB,MAAM,sCAAsC,CAAC;AAE3E,MAAM,CAAC,OAAO,OAAO,sBACpB,SAAQ,kBACR,YAAW,uBAAuB;IAElC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseBusinessObject_1 = __importDefault(require("./BaseBusinessObject"));
|
|
7
|
+
class AppEngineConfiguration extends BaseBusinessObject_1.default {
|
|
8
|
+
}
|
|
9
|
+
exports.default = AppEngineConfiguration;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import IAppEngineException from "./interfaces/IAppEngineException";
|
|
2
2
|
export default class AppEngineException implements IAppEngineException {
|
|
3
|
-
Title
|
|
4
|
-
Detail
|
|
5
|
-
title?: string;
|
|
6
|
-
detail?: string;
|
|
3
|
+
Title: string;
|
|
4
|
+
Detail: string;
|
|
7
5
|
constructor(error?: any);
|
|
8
6
|
get error(): Error;
|
|
9
|
-
static is(
|
|
7
|
+
static is(obj: any): obj is IAppEngineException;
|
|
10
8
|
}
|
|
11
9
|
//# sourceMappingURL=AppEngineException.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppEngineException.d.ts","sourceRoot":"","sources":["../../src/models/AppEngineException.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppEngineException.d.ts","sourceRoot":"","sources":["../../src/models/AppEngineException.ts"],"names":[],"mappings":"AACA,OAAO,mBAAmB,MAAM,kCAAkC,CAAC;AAEnE,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,mBAAmB;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;gBAEH,KAAK,CAAC,EAAE,GAAG;IAOvB,IAAI,KAAK,UAER;IAED,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,mBAAmB;CAW/C"}
|
|
@@ -5,17 +5,19 @@ class AppEngineException {
|
|
|
5
5
|
if (error) {
|
|
6
6
|
this.Title = error.Title;
|
|
7
7
|
this.Detail = error.Detail;
|
|
8
|
-
this.title = error.title;
|
|
9
|
-
this.detail = error.detail;
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
10
|
get error() {
|
|
13
|
-
return new Error(this.Detail
|
|
11
|
+
return new Error(this.Detail);
|
|
14
12
|
}
|
|
15
|
-
static is(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
static is(obj) {
|
|
14
|
+
if (typeof obj !== "object" || obj === null)
|
|
15
|
+
return false;
|
|
16
|
+
const candidate = obj;
|
|
17
|
+
return ("Title" in candidate &&
|
|
18
|
+
typeof candidate.Title === "string" &&
|
|
19
|
+
"Detail" in candidate &&
|
|
20
|
+
typeof candidate.Detail === "string");
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
exports.default = AppEngineException;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type BaseBusinessObjectConstructor<T extends BaseBusinessObject> = {
|
|
1
|
+
export type BaseBusinessObjectConstructor<T extends BaseBusinessObject> = {
|
|
2
2
|
new (): T;
|
|
3
3
|
create<U extends T>(this: BaseBusinessObjectConstructor<U>, data: Record<string, unknown> | object): U;
|
|
4
4
|
createMany<U extends T>(this: BaseBusinessObjectConstructor<U>, data: Record<string, unknown>[] | object[]): U[];
|
|
@@ -154,5 +154,4 @@ export default abstract class BaseBusinessObject {
|
|
|
154
154
|
*/
|
|
155
155
|
toJSON(): Record<string, unknown>;
|
|
156
156
|
}
|
|
157
|
-
export {};
|
|
158
157
|
//# sourceMappingURL=BaseBusinessObject.d.ts.map
|