@nmshd/app-runtime 7.0.0-alpha.7 → 7.0.0-alpha.71
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/AppConfig.js +1 -1
- package/dist/AppConfig.js.map +1 -1
- package/dist/AppRuntime.d.ts +11 -18
- package/dist/AppRuntime.d.ts.map +1 -1
- package/dist/AppRuntime.js +16 -45
- package/dist/AppRuntime.js.map +1 -1
- package/dist/AppRuntimeErrors.d.ts +19 -14
- package/dist/AppRuntimeErrors.d.ts.map +1 -1
- package/dist/AppRuntimeErrors.js +35 -26
- package/dist/AppRuntimeErrors.js.map +1 -1
- package/dist/AppStringProcessor.d.ts +7 -9
- package/dist/AppStringProcessor.d.ts.map +1 -1
- package/dist/AppStringProcessor.js +74 -49
- package/dist/AppStringProcessor.js.map +1 -1
- package/dist/buildInformation.js +5 -5
- package/dist/events/AppLanguageChangedEvent.d.ts +8 -0
- package/dist/events/AppLanguageChangedEvent.d.ts.map +1 -0
- package/dist/events/AppLanguageChangedEvent.js +13 -0
- package/dist/events/AppLanguageChangedEvent.js.map +1 -0
- package/dist/{natives/events → events}/RemoteNotificationEvent.d.ts +2 -2
- package/dist/events/RemoteNotificationEvent.d.ts.map +1 -0
- package/dist/{natives/events → events}/RemoteNotificationEvent.js +2 -2
- package/dist/events/RemoteNotificationEvent.js.map +1 -0
- package/dist/{natives/events → events}/RemoteNotificationRegistrationEvent.d.ts +2 -2
- package/dist/events/RemoteNotificationRegistrationEvent.d.ts.map +1 -0
- package/dist/{natives/events → events}/RemoteNotificationRegistrationEvent.js +2 -2
- package/dist/events/RemoteNotificationRegistrationEvent.js.map +1 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -0
- package/dist/events/index.js.map +1 -1
- package/dist/extensibility/index.d.ts +0 -1
- package/dist/extensibility/index.d.ts.map +1 -1
- package/dist/extensibility/index.js +0 -1
- package/dist/extensibility/index.js.map +1 -1
- package/dist/extensibility/ui/IUIBridge.d.ts +3 -4
- package/dist/extensibility/ui/IUIBridge.d.ts.map +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/IAppLanguageProvider.d.ts +6 -0
- package/dist/infrastructure/IAppLanguageProvider.d.ts.map +1 -0
- package/dist/{extensibility/DVOs/RelationshipItemsDVO.js → infrastructure/IAppLanguageProvider.js} +1 -1
- package/dist/infrastructure/IAppLanguageProvider.js.map +1 -0
- package/dist/infrastructure/INotificationAccess.d.ts +22 -0
- package/dist/infrastructure/INotificationAccess.d.ts.map +1 -0
- package/dist/{AppRuntimeServices.js → infrastructure/INotificationAccess.js} +1 -1
- package/dist/infrastructure/INotificationAccess.js.map +1 -0
- package/dist/infrastructure/index.d.ts +3 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/{extensibility/facades → infrastructure}/index.js +2 -1
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/modules/AppLanguageModule.d.ts +11 -0
- package/dist/modules/AppLanguageModule.d.ts.map +1 -0
- package/dist/modules/AppLanguageModule.js +47 -0
- package/dist/modules/AppLanguageModule.js.map +1 -0
- package/dist/modules/AppRuntimeModule.d.ts +0 -1
- package/dist/modules/AppRuntimeModule.d.ts.map +1 -1
- package/dist/modules/AppRuntimeModule.js +0 -4
- package/dist/modules/AppRuntimeModule.js.map +1 -1
- package/dist/modules/PushNotificationModule.d.ts +1 -2
- package/dist/modules/PushNotificationModule.d.ts.map +1 -1
- package/dist/modules/PushNotificationModule.js +41 -19
- package/dist/modules/PushNotificationModule.js.map +1 -1
- package/dist/modules/SSEModule.js +4 -4
- package/dist/modules/SSEModule.js.map +1 -1
- package/dist/modules/appEvents/MailReceivedModule.d.ts +0 -3
- package/dist/modules/appEvents/MailReceivedModule.d.ts.map +1 -1
- package/dist/modules/appEvents/MailReceivedModule.js +2 -6
- package/dist/modules/appEvents/MailReceivedModule.js.map +1 -1
- package/dist/modules/appEvents/OnboardingChangeReceivedModule.d.ts +0 -3
- package/dist/modules/appEvents/OnboardingChangeReceivedModule.d.ts.map +1 -1
- package/dist/modules/appEvents/OnboardingChangeReceivedModule.js +2 -6
- package/dist/modules/appEvents/OnboardingChangeReceivedModule.js.map +1 -1
- package/dist/modules/appEvents/RelationshipTemplateProcessedModule.d.ts.map +1 -1
- package/dist/modules/appEvents/RelationshipTemplateProcessedModule.js +4 -4
- package/dist/modules/appEvents/RelationshipTemplateProcessedModule.js.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +1 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/runtimeEvents/IdentityDeletionProcessStatusChangedModule.d.ts +0 -3
- package/dist/modules/runtimeEvents/IdentityDeletionProcessStatusChangedModule.d.ts.map +1 -1
- package/dist/modules/runtimeEvents/IdentityDeletionProcessStatusChangedModule.js +4 -8
- package/dist/modules/runtimeEvents/IdentityDeletionProcessStatusChangedModule.js.map +1 -1
- package/dist/modules/runtimeEvents/MessageReceivedModule.d.ts +0 -3
- package/dist/modules/runtimeEvents/MessageReceivedModule.d.ts.map +1 -1
- package/dist/modules/runtimeEvents/MessageReceivedModule.js +1 -5
- package/dist/modules/runtimeEvents/MessageReceivedModule.js.map +1 -1
- package/dist/modules/runtimeEvents/RelationshipChangedModule.d.ts +0 -3
- package/dist/modules/runtimeEvents/RelationshipChangedModule.d.ts.map +1 -1
- package/dist/modules/runtimeEvents/RelationshipChangedModule.js +1 -5
- package/dist/modules/runtimeEvents/RelationshipChangedModule.js.map +1 -1
- package/dist/multiAccount/AccountServices.d.ts +2 -2
- package/dist/multiAccount/AccountServices.d.ts.map +1 -1
- package/dist/multiAccount/AccountServices.js +4 -4
- package/dist/multiAccount/AccountServices.js.map +1 -1
- package/dist/multiAccount/MultiAccountController.d.ts +2 -2
- package/dist/multiAccount/MultiAccountController.d.ts.map +1 -1
- package/dist/multiAccount/MultiAccountController.js +10 -10
- package/dist/multiAccount/MultiAccountController.js.map +1 -1
- package/dist/multiAccount/data/LocalAccountSession.d.ts +0 -2
- package/dist/multiAccount/data/LocalAccountSession.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/AppRuntimeError.d.ts +0 -6
- package/dist/AppRuntimeError.d.ts.map +0 -1
- package/dist/AppRuntimeError.js +0 -12
- package/dist/AppRuntimeError.js.map +0 -1
- package/dist/AppRuntimeServices.d.ts +0 -6
- package/dist/AppRuntimeServices.d.ts.map +0 -1
- package/dist/AppRuntimeServices.js.map +0 -1
- package/dist/UserfriendlyApplicationError.d.ts +0 -8
- package/dist/UserfriendlyApplicationError.d.ts.map +0 -1
- package/dist/UserfriendlyApplicationError.js +0 -18
- package/dist/UserfriendlyApplicationError.js.map +0 -1
- package/dist/UserfriendlyResult.d.ts +0 -5
- package/dist/UserfriendlyResult.d.ts.map +0 -1
- package/dist/UserfriendlyResult.js +0 -8
- package/dist/UserfriendlyResult.js.map +0 -1
- package/dist/extensibility/AppServices.d.ts +0 -8
- package/dist/extensibility/AppServices.d.ts.map +0 -1
- package/dist/extensibility/AppServices.js +0 -11
- package/dist/extensibility/AppServices.js.map +0 -1
- package/dist/extensibility/DVOs/RelationshipItemsDVO.d.ts +0 -4
- package/dist/extensibility/DVOs/RelationshipItemsDVO.d.ts.map +0 -1
- package/dist/extensibility/DVOs/RelationshipItemsDVO.js.map +0 -1
- package/dist/extensibility/facades/AppRelationshipFacade.d.ts +0 -18
- package/dist/extensibility/facades/AppRelationshipFacade.d.ts.map +0 -1
- package/dist/extensibility/facades/AppRelationshipFacade.js +0 -60
- package/dist/extensibility/facades/AppRelationshipFacade.js.map +0 -1
- package/dist/extensibility/facades/AppRuntimeFacade.d.ts +0 -14
- package/dist/extensibility/facades/AppRuntimeFacade.d.ts.map +0 -1
- package/dist/extensibility/facades/AppRuntimeFacade.js +0 -29
- package/dist/extensibility/facades/AppRuntimeFacade.js.map +0 -1
- package/dist/extensibility/facades/index.d.ts +0 -2
- package/dist/extensibility/facades/index.d.ts.map +0 -1
- package/dist/extensibility/facades/index.js.map +0 -1
- package/dist/natives/INativeBootstrapper.d.ts +0 -8
- package/dist/natives/INativeBootstrapper.d.ts.map +0 -1
- package/dist/natives/INativeBootstrapper.js +0 -3
- package/dist/natives/INativeBootstrapper.js.map +0 -1
- package/dist/natives/INativeConfigAccess.d.ts +0 -8
- package/dist/natives/INativeConfigAccess.d.ts.map +0 -1
- package/dist/natives/INativeConfigAccess.js +0 -3
- package/dist/natives/INativeConfigAccess.js.map +0 -1
- package/dist/natives/INativeEnvironment.d.ts +0 -11
- package/dist/natives/INativeEnvironment.d.ts.map +0 -1
- package/dist/natives/INativeEnvironment.js +0 -3
- package/dist/natives/INativeEnvironment.js.map +0 -1
- package/dist/natives/INativeNotificationAccess.d.ts +0 -21
- package/dist/natives/INativeNotificationAccess.d.ts.map +0 -1
- package/dist/natives/INativeNotificationAccess.js +0 -3
- package/dist/natives/INativeNotificationAccess.js.map +0 -1
- package/dist/natives/INativeTranslationProvider.d.ts +0 -7
- package/dist/natives/INativeTranslationProvider.d.ts.map +0 -1
- package/dist/natives/INativeTranslationProvider.js +0 -3
- package/dist/natives/INativeTranslationProvider.js.map +0 -1
- package/dist/natives/NativeEvent.d.ts +0 -4
- package/dist/natives/NativeEvent.d.ts.map +0 -1
- package/dist/natives/NativeEvent.js +0 -8
- package/dist/natives/NativeEvent.js.map +0 -1
- package/dist/natives/events/AppReadyEvent.d.ts +0 -6
- package/dist/natives/events/AppReadyEvent.d.ts.map +0 -1
- package/dist/natives/events/AppReadyEvent.js +0 -12
- package/dist/natives/events/AppReadyEvent.js.map +0 -1
- package/dist/natives/events/RemoteNotificationEvent.d.ts.map +0 -1
- package/dist/natives/events/RemoteNotificationEvent.js.map +0 -1
- package/dist/natives/events/RemoteNotificationRegistrationEvent.d.ts.map +0 -1
- package/dist/natives/events/RemoteNotificationRegistrationEvent.js.map +0 -1
- package/dist/natives/events/index.d.ts +0 -4
- package/dist/natives/events/index.d.ts.map +0 -1
- package/dist/natives/events/index.js +0 -20
- package/dist/natives/events/index.js.map +0 -1
- package/dist/natives/index.d.ts +0 -8
- package/dist/natives/index.d.ts.map +0 -1
- package/dist/natives/index.js +0 -24
- package/dist/natives/index.js.map +0 -1
package/dist/AppConfig.js
CHANGED
|
@@ -10,6 +10,7 @@ function createAppConfig(...configs) {
|
|
|
10
10
|
databaseFolder: "./data",
|
|
11
11
|
transportLibrary: { datawalletEnabled: true },
|
|
12
12
|
modules: {
|
|
13
|
+
appLanguage: { enabled: true, location: "appLanguage" },
|
|
13
14
|
pushNotification: { enabled: true, location: "pushNotification" },
|
|
14
15
|
mailReceived: { enabled: true, location: "mailReceived" },
|
|
15
16
|
onboardingChangeReceived: { enabled: true, location: "onboardingChangeReceived" },
|
|
@@ -20,7 +21,6 @@ function createAppConfig(...configs) {
|
|
|
20
21
|
sse: { enabled: false, location: "sse" },
|
|
21
22
|
decider: { enabled: true, location: "@nmshd/runtime:DeciderModule" },
|
|
22
23
|
request: { enabled: true, location: "@nmshd/runtime:RequestModule" },
|
|
23
|
-
attributeListener: { enabled: true, location: "@nmshd/runtime:AttributeListenerModule" },
|
|
24
24
|
notification: { enabled: true, location: "@nmshd/runtime:NotificationModule" }
|
|
25
25
|
}
|
|
26
26
|
};
|
package/dist/AppConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":";;AAwBA,0CA4BC;AAlDD,mCAAsC;AAsBtC,SAAgB,eAAe,CAAC,GAAG,OAA2C;IAC1E,MAAM,SAAS,GAEX;QACA,cAAc,EAAE,UAAU;QAC1B,WAAW,EAAE,MAAM;QACnB,oCAAoC,EAAE,KAAK;QAC3C,cAAc,EAAE,QAAQ;QACxB,gBAAgB,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE;QAC7C,OAAO,EAAE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AE,IAAI,EAAE,QAAQ,EAAE,kBAAkB,EAAE;YACjE,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE;YACzD,wBAAwB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,0BAA0B,EAAE;YACjF,oCAAoC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,sCAAsC,EAAE;YACzG,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,EAAE;YAC/D,mBAAmB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,qBAAqB,EAAE;YACvE,6BAA6B,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,+BAA+B,EAAE;YAC3F,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;YACxC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,8BAA8B,EAAE;YACpE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,8BAA8B,EAAE;YACpE,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,mCAAmC,EAAE;SACjF;KACJ,CAAC;IAEF,MAAM,YAAY,GAAG,IAAA,qBAAY,EAAC,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,CAAC,CAAC;IAE7D,OAAO,YAAY,CAAC;AACxB,CAAC"}
|
package/dist/AppRuntime.d.ts
CHANGED
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
import { IDatabaseConnection } from "@js-soft/docdb-access-abstractions";
|
|
2
|
-
import { LokiJsConnection } from "@js-soft/docdb-access-loki";
|
|
2
|
+
import { ILokiJsDatabaseFactory, LokiJsConnection } from "@js-soft/docdb-access-loki";
|
|
3
|
+
import { ILoggerFactory } from "@js-soft/logging-abstractions";
|
|
3
4
|
import { EventBus, Result } from "@js-soft/ts-utils";
|
|
4
|
-
import { ConsumptionController } from "@nmshd/consumption";
|
|
5
5
|
import { ICoreAddress } from "@nmshd/core-types";
|
|
6
|
-
import { ModuleConfiguration, Runtime, RuntimeHealth } from "@nmshd/runtime";
|
|
7
|
-
import { AccountController } from "@nmshd/transport";
|
|
6
|
+
import { ModuleConfiguration, Runtime, RuntimeHealth, RuntimeServices } from "@nmshd/runtime";
|
|
8
7
|
import { AppConfig, AppConfigOverwrite } from "./AppConfig";
|
|
9
|
-
import { AppRuntimeServices } from "./AppRuntimeServices";
|
|
10
8
|
import { AppStringProcessor } from "./AppStringProcessor";
|
|
11
9
|
import { IUIBridge } from "./extensibility";
|
|
10
|
+
import { IAppLanguageProvider, INotificationAccess } from "./infrastructure";
|
|
12
11
|
import { IAppRuntimeModuleConstructor } from "./modules";
|
|
13
12
|
import { AccountServices, LocalAccountSession, MultiAccountController } from "./multiAccount";
|
|
14
|
-
import { INativeBootstrapper, INativeEnvironment, INativeTranslationProvider } from "./natives";
|
|
15
|
-
import { UserfriendlyResult } from "./UserfriendlyResult";
|
|
16
13
|
export declare class AppRuntime extends Runtime<AppConfig> {
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
readonly notificationAccess: INotificationAccess;
|
|
15
|
+
readonly appLanguageProvider: IAppLanguageProvider;
|
|
16
|
+
private readonly databaseFactory?;
|
|
17
|
+
constructor(appConfig: AppConfig, loggerFactory: ILoggerFactory, notificationAccess: INotificationAccess, appLanguageProvider: IAppLanguageProvider, databaseFactory?: ILokiJsDatabaseFactory | undefined, eventBus?: EventBus);
|
|
19
18
|
get config(): AppConfig;
|
|
20
19
|
private _uiBridge;
|
|
21
20
|
private _uiBridgeResolver?;
|
|
22
21
|
uiBridge(): Promise<IUIBridge> | IUIBridge;
|
|
23
|
-
registerUIBridge(uiBridge: IUIBridge):
|
|
22
|
+
registerUIBridge(uiBridge: IUIBridge): Result<void>;
|
|
24
23
|
protected readonly databaseConnection: LokiJsConnection;
|
|
25
24
|
private _multiAccountController;
|
|
26
25
|
get multiAccountController(): MultiAccountController;
|
|
27
26
|
private _accountServices;
|
|
28
27
|
get accountServices(): AccountServices;
|
|
29
|
-
get nativeEnvironment(): INativeEnvironment;
|
|
30
28
|
private readonly sessionStorage;
|
|
31
29
|
getSessions(): LocalAccountSession[];
|
|
32
30
|
private readonly _stringProcessor;
|
|
33
31
|
get stringProcessor(): AppStringProcessor;
|
|
34
|
-
|
|
35
|
-
getServices(accountReference: string | ICoreAddress): Promise<AppRuntimeServices>;
|
|
32
|
+
getServices(accountReference: string | ICoreAddress): Promise<RuntimeServices>;
|
|
36
33
|
selectAccount(accountReference: string): Promise<LocalAccountSession>;
|
|
37
34
|
getOrCreateSession(accountReference: string): Promise<LocalAccountSession>;
|
|
38
35
|
private currentSessionPromise;
|
|
@@ -40,8 +37,7 @@ export declare class AppRuntime extends Runtime<AppConfig> {
|
|
|
40
37
|
private _createSession;
|
|
41
38
|
getHealth(): Promise<RuntimeHealth>;
|
|
42
39
|
protected initAccount(): Promise<void>;
|
|
43
|
-
static create(
|
|
44
|
-
static createAndStart(nativeBootstrapper: INativeBootstrapper, appConfig?: AppConfigOverwrite): Promise<AppRuntime>;
|
|
40
|
+
static create(appConfig: (AppConfigOverwrite | AppConfig) | undefined, loggerFactory: ILoggerFactory, notificationAccess: INotificationAccess, appLanguageProvider: IAppLanguageProvider, eventBus?: EventBus, databaseFactory?: ILokiJsDatabaseFactory): Promise<AppRuntime>;
|
|
45
41
|
protected createDatabaseConnection(): Promise<IDatabaseConnection>;
|
|
46
42
|
private static moduleRegistry;
|
|
47
43
|
static registerModule(moduleName: string, ctor: IAppRuntimeModuleConstructor): void;
|
|
@@ -49,8 +45,5 @@ export declare class AppRuntime extends Runtime<AppConfig> {
|
|
|
49
45
|
start(): Promise<void>;
|
|
50
46
|
stop(): Promise<void>;
|
|
51
47
|
private startAccounts;
|
|
52
|
-
private translationProvider;
|
|
53
|
-
registerTranslationProvider(provider: INativeTranslationProvider): void;
|
|
54
|
-
translate(key: string, ...values: any[]): Promise<Result<string>>;
|
|
55
48
|
}
|
|
56
49
|
//# sourceMappingURL=AppRuntime.d.ts.map
|
package/dist/AppRuntime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRuntime.d.ts","sourceRoot":"","sources":["../src/AppRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"AppRuntime.d.ts","sourceRoot":"","sources":["../src/AppRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAU,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAmB,MAAM,aAAa,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAIH,4BAA4B,EAS/B,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAsB,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGlH,qBAAa,UAAW,SAAQ,OAAO,CAAC,SAA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I,OAAO,CAAC,IAAI,CAAC;WAMxB,MAAM,CACtB,SAAS,GAAE,kBAAkB,GAAG,SAAS,aAAK,EAC9C,aAAa,EAAE,cAAc,EAC7B,kBAAkB,EAAE,mBAAmB,EACvC,mBAAmB,EAAE,oBAAoB,EACzC,QAAQ,CAAC,EAAE,QAAQ,EACnB,eAAe,CAAC,EAAE,sBAAsB,GACzC,OAAO,CAAC,UAAU,CAAC;IAUtB,SAAS,CAAC,wBAAwB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAQlE,OAAO,CAAC,MAAM,CAAC,cAAc,CAW3B;WAEY,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,GAAG,IAAI;IAI1F,SAAS,CAAC,UAAU,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBvD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAO7B,aAAa;CAoC9B"}
|
package/dist/AppRuntime.js
CHANGED
|
@@ -10,19 +10,16 @@ const AppConfig_1 = require("./AppConfig");
|
|
|
10
10
|
const AppRuntimeErrors_1 = require("./AppRuntimeErrors");
|
|
11
11
|
const AppStringProcessor_1 = require("./AppStringProcessor");
|
|
12
12
|
const events_1 = require("./events");
|
|
13
|
-
const extensibility_1 = require("./extensibility");
|
|
14
13
|
const modules_1 = require("./modules");
|
|
15
14
|
const multiAccount_1 = require("./multiAccount");
|
|
16
15
|
const SessionStorage_1 = require("./SessionStorage");
|
|
17
|
-
const UserfriendlyResult_1 = require("./UserfriendlyResult");
|
|
18
16
|
class AppRuntime extends runtime_1.Runtime {
|
|
19
|
-
constructor(
|
|
20
|
-
super(appConfig,
|
|
21
|
-
this.
|
|
17
|
+
constructor(appConfig, loggerFactory, notificationAccess, appLanguageProvider, databaseFactory, eventBus) {
|
|
18
|
+
super(appConfig, loggerFactory, eventBus);
|
|
19
|
+
this.notificationAccess = notificationAccess;
|
|
20
|
+
this.appLanguageProvider = appLanguageProvider;
|
|
21
|
+
this.databaseFactory = databaseFactory;
|
|
22
22
|
this.sessionStorage = new SessionStorage_1.SessionStorage();
|
|
23
|
-
this.translationProvider = {
|
|
24
|
-
translate: (key) => Promise.resolve(ts_utils_1.Result.ok(key))
|
|
25
|
-
};
|
|
26
23
|
this._stringProcessor = new AppStringProcessor_1.AppStringProcessor(this, this.loggerFactory);
|
|
27
24
|
}
|
|
28
25
|
get config() {
|
|
@@ -45,10 +42,10 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
45
42
|
}
|
|
46
43
|
registerUIBridge(uiBridge) {
|
|
47
44
|
if (this._uiBridge)
|
|
48
|
-
return
|
|
45
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.startup.uiBridgeAlreadyRegistered());
|
|
49
46
|
this._uiBridge = uiBridge;
|
|
50
47
|
this._uiBridgeResolver?.resolve(uiBridge);
|
|
51
|
-
return
|
|
48
|
+
return ts_utils_1.Result.ok(undefined);
|
|
52
49
|
}
|
|
53
50
|
get multiAccountController() {
|
|
54
51
|
return this._multiAccountController;
|
|
@@ -56,26 +53,17 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
56
53
|
get accountServices() {
|
|
57
54
|
return this._accountServices;
|
|
58
55
|
}
|
|
59
|
-
get nativeEnvironment() {
|
|
60
|
-
return this._nativeEnvironment;
|
|
61
|
-
}
|
|
62
56
|
getSessions() {
|
|
63
57
|
return this.sessionStorage.getSessions();
|
|
64
58
|
}
|
|
65
59
|
get stringProcessor() {
|
|
66
60
|
return this._stringProcessor;
|
|
67
61
|
}
|
|
68
|
-
async login(accountController, consumptionController) {
|
|
69
|
-
const services = await super.login(accountController, consumptionController);
|
|
70
|
-
const appServices = new extensibility_1.AppServices(this, services.transportServices, services.consumptionServices, services.dataViewExpander);
|
|
71
|
-
return { ...services, appServices };
|
|
72
|
-
}
|
|
73
62
|
async getServices(accountReference) {
|
|
74
63
|
const session = await this.getOrCreateSession(accountReference.toString());
|
|
75
64
|
return {
|
|
76
65
|
transportServices: session.transportServices,
|
|
77
66
|
consumptionServices: session.consumptionServices,
|
|
78
|
-
appServices: session.appServices,
|
|
79
67
|
dataViewExpander: session.expander
|
|
80
68
|
};
|
|
81
69
|
}
|
|
@@ -115,9 +103,11 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
115
103
|
async _createSession(accountId) {
|
|
116
104
|
const [localAccount, accountController] = await this._multiAccountController.selectAccount(core_types_1.CoreId.from(accountId));
|
|
117
105
|
if (!localAccount.address) {
|
|
118
|
-
|
|
106
|
+
const error = AppRuntimeErrors_1.AppRuntimeErrors.general.addressUnavailable();
|
|
107
|
+
this.logger.error(error);
|
|
108
|
+
throw error;
|
|
119
109
|
}
|
|
120
|
-
const consumptionController = await new consumption_1.ConsumptionController(this.transport, accountController, {
|
|
110
|
+
const consumptionController = await new consumption_1.ConsumptionController(this.transport, accountController, { setDefaultOwnIdentityAttributes: true }).init();
|
|
121
111
|
const services = await this.login(accountController, consumptionController);
|
|
122
112
|
this.logger.debug(`Finished login to ${accountId}.`);
|
|
123
113
|
const session = {
|
|
@@ -126,7 +116,6 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
126
116
|
consumptionServices: services.consumptionServices,
|
|
127
117
|
transportServices: services.transportServices,
|
|
128
118
|
expander: services.dataViewExpander,
|
|
129
|
-
appServices: services.appServices,
|
|
130
119
|
accountController,
|
|
131
120
|
consumptionController
|
|
132
121
|
};
|
|
@@ -145,34 +134,22 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
145
134
|
await this._multiAccountController.init();
|
|
146
135
|
this._accountServices = new multiAccount_1.AccountServices(this._multiAccountController);
|
|
147
136
|
}
|
|
148
|
-
static async create(
|
|
149
|
-
// TODO: JSSNMSHDD-2524 (validate app config)
|
|
150
|
-
if (!nativeBootstrapper.isInitialized) {
|
|
151
|
-
const result = await nativeBootstrapper.init();
|
|
152
|
-
if (!result.isSuccess) {
|
|
153
|
-
throw AppRuntimeErrors_1.AppRuntimeErrors.startup.bootstrapError(result.error);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
137
|
+
static async create(appConfig = {}, loggerFactory, notificationAccess, appLanguageProvider, eventBus, databaseFactory) {
|
|
156
138
|
const mergedConfig = (0, AppConfig_1.createAppConfig)(appConfig);
|
|
157
|
-
const runtime = new AppRuntime(
|
|
139
|
+
const runtime = new AppRuntime(mergedConfig, loggerFactory, notificationAccess, appLanguageProvider, databaseFactory, eventBus);
|
|
158
140
|
await runtime.init();
|
|
159
141
|
runtime.logger.trace("Runtime initialized");
|
|
160
142
|
return runtime;
|
|
161
143
|
}
|
|
162
|
-
static async createAndStart(nativeBootstrapper, appConfig) {
|
|
163
|
-
const runtime = await this.create(nativeBootstrapper, appConfig);
|
|
164
|
-
await runtime.start();
|
|
165
|
-
runtime.logger.trace("Runtime started");
|
|
166
|
-
return runtime;
|
|
167
|
-
}
|
|
168
144
|
createDatabaseConnection() {
|
|
169
145
|
this.logger.trace("Creating DatabaseConnection to LokiJS");
|
|
170
|
-
const lokiConnection = new docdb_access_loki_1.LokiJsConnection(this.config.databaseFolder, this.
|
|
146
|
+
const lokiConnection = new docdb_access_loki_1.LokiJsConnection(this.config.databaseFolder, this.databaseFactory);
|
|
171
147
|
this.logger.trace("Finished initialization of LokiJS connection.");
|
|
172
148
|
return Promise.resolve(lokiConnection);
|
|
173
149
|
}
|
|
174
150
|
static { this.moduleRegistry = {
|
|
175
151
|
appSync: modules_1.AppSyncModule,
|
|
152
|
+
appLanguage: modules_1.AppLanguageModule,
|
|
176
153
|
identityDeletionProcessStatusChanged: modules_1.IdentityDeletionProcessStatusChangedModule,
|
|
177
154
|
mailReceived: modules_1.MailReceivedModule,
|
|
178
155
|
messageReceived: modules_1.MessageReceivedModule,
|
|
@@ -210,7 +187,7 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
210
187
|
async startAccounts() {
|
|
211
188
|
const accounts = await this._multiAccountController.getAccounts();
|
|
212
189
|
for (const account of accounts) {
|
|
213
|
-
const session = await this.
|
|
190
|
+
const session = await this.getOrCreateSession(account.id.toString());
|
|
214
191
|
session.accountController.authenticator.clear();
|
|
215
192
|
try {
|
|
216
193
|
await session.accountController.authenticator.getToken();
|
|
@@ -238,12 +215,6 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
238
215
|
this.logger.error(syncResult.error);
|
|
239
216
|
}
|
|
240
217
|
}
|
|
241
|
-
registerTranslationProvider(provider) {
|
|
242
|
-
this.translationProvider = provider;
|
|
243
|
-
}
|
|
244
|
-
async translate(key, ...values) {
|
|
245
|
-
return await this.translationProvider.translate(key, ...values);
|
|
246
|
-
}
|
|
247
218
|
}
|
|
248
219
|
exports.AppRuntime = AppRuntime;
|
|
249
220
|
//# sourceMappingURL=AppRuntime.js.map
|
package/dist/AppRuntime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRuntime.js","sourceRoot":"","sources":["../src/AppRuntime.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"AppRuntime.js","sourceRoot":"","sources":["../src/AppRuntime.ts"],"names":[],"mappings":";;;AACA,kEAAsF;AAEtF,gDAAqD;AACrD,oDAA2D;AAC3D,kDAAyD;AACzD,4CAA8F;AAC9F,2CAA6E;AAC7E,yDAAsD;AACtD,6DAA0D;AAC1D,qCAAgD;AAGhD,uCAamB;AACnB,iDAAkH;AAClH,qDAAkD;AAElD,MAAa,UAAW,SAAQ,iBAAkB;IAC9C,YACI,SAAoB,EACpB,aAA6B,EACb,kBAAuC,EACvC,mBAAyC,EACxC,eAAwC,EACzD,QAAmB;QAEnB,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;QAL1B,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,wBAAmB,GAAnB,mBAAmB,CAAsB;QACxC,oBAAe,GAAf,eAAe,CAAyB;QAmD5C,mBAAc,GAAG,IAAI,+BA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,OAAO;gBAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAChE,CAAC;IACL,CAAC;;AApRL,gCAqRC"}
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApplicationError } from "@js-soft/ts-utils";
|
|
2
|
+
declare class AppStringProcessor {
|
|
3
|
+
wrongURL(): ApplicationError;
|
|
4
|
+
wrongCode(): ApplicationError;
|
|
5
|
+
invalidReference(): ApplicationError;
|
|
6
|
+
notSupportedTokenContent(): ApplicationError;
|
|
7
|
+
deviceOnboardingNotAllowed(): ApplicationError;
|
|
8
|
+
passwordNotProvided(): ApplicationError;
|
|
9
|
+
passwordRetryLimitReached(): ApplicationError;
|
|
10
|
+
noDeviceOnboardingCode(): ApplicationError;
|
|
11
|
+
}
|
|
2
12
|
declare class General {
|
|
3
|
-
currentSessionUnavailable():
|
|
4
|
-
addressUnavailable():
|
|
5
|
-
appServicesUnavailable():
|
|
6
|
-
noAccountAvailable(error?: Error):
|
|
7
|
-
noAccountAvailableForIdentityTruncated():
|
|
13
|
+
currentSessionUnavailable(): ApplicationError;
|
|
14
|
+
addressUnavailable(): ApplicationError;
|
|
15
|
+
appServicesUnavailable(): ApplicationError;
|
|
16
|
+
noAccountAvailable(error?: Error): ApplicationError;
|
|
17
|
+
noAccountAvailableForIdentityTruncated(): ApplicationError;
|
|
8
18
|
}
|
|
9
19
|
declare class Startup {
|
|
10
|
-
|
|
11
|
-
bootstrapperNotInitialized(): UserfriendlyApplicationError;
|
|
12
|
-
uiBridgeAlreadyRegistered(): UserfriendlyApplicationError;
|
|
13
|
-
wrongURL(): UserfriendlyApplicationError;
|
|
14
|
-
wrongCode(): UserfriendlyApplicationError;
|
|
20
|
+
uiBridgeAlreadyRegistered(): ApplicationError;
|
|
15
21
|
}
|
|
16
22
|
declare class PushNotificationModule {
|
|
17
|
-
|
|
18
|
-
unsubscriptionNotPossible(details: string, rootError?: Error): UserfriendlyApplicationError;
|
|
19
|
-
tokenRegistrationNotPossible(details: string, rootError?: Error): UserfriendlyApplicationError;
|
|
23
|
+
tokenRegistrationNotPossible(details: string, rootError?: Error): ApplicationError;
|
|
20
24
|
}
|
|
21
25
|
declare class Modules {
|
|
22
26
|
readonly pushNotificationModule: PushNotificationModule;
|
|
23
27
|
}
|
|
24
28
|
export declare class AppRuntimeErrors {
|
|
29
|
+
static readonly appStringProcessor: AppStringProcessor;
|
|
25
30
|
static readonly general: General;
|
|
26
31
|
static readonly startup: Startup;
|
|
27
32
|
static readonly modules: Modules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRuntimeErrors.d.ts","sourceRoot":"","sources":["../src/AppRuntimeErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AppRuntimeErrors.d.ts","sourceRoot":"","sources":["../src/AppRuntimeErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,cAAM,kBAAkB;IACb,QAAQ,IAAI,gBAAgB;IAI5B,SAAS,IAAI,gBAAgB;IAI7B,gBAAgB,IAAI,gBAAgB;IAIpC,wBAAwB,IAAI,gBAAgB;IAI5C,0BAA0B,IAAI,gBAAgB;IAO9C,mBAAmB,IAAI,gBAAgB;IAIvC,yBAAyB,IAAI,gBAAgB;IAI7C,sBAAsB,IAAI,gBAAgB;CAMpD;AAED,cAAM,OAAO;IACF,yBAAyB,IAAI,gBAAgB;IAI7C,kBAAkB,IAAI,gBAAgB;IAOtC,sBAAsB,IAAI,gBAAgB;IAI1C,kBAAkB,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,gBAAgB;IAInD,sCAAsC,IAAI,gBAAgB;CAOpE;AAED,cAAM,OAAO;IACF,yBAAyB,IAAI,gBAAgB;CAGvD;AAED,cAAM,sBAAsB;IACjB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,gBAAgB;CAO5F;AAED,cAAM,OAAO;IACT,SAAgB,sBAAsB,yBAAgC;CACzE;AAED,qBAAa,gBAAgB;IACzB,gBAAuB,kBAAkB,qBAA4B;IACrE,gBAAuB,OAAO,UAAiB;IAC/C,gBAAuB,OAAO,UAAiB;IAC/C,gBAAuB,OAAO,UAAiB;CAClD"}
|
package/dist/AppRuntimeErrors.js
CHANGED
|
@@ -1,50 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AppRuntimeErrors = void 0;
|
|
4
|
-
const
|
|
4
|
+
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
5
|
+
class AppStringProcessor {
|
|
6
|
+
wrongURL() {
|
|
7
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.wrongURL", "The given URL is in a wrong format.");
|
|
8
|
+
}
|
|
9
|
+
wrongCode() {
|
|
10
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.wrongCode", "The given code is in a wrong format.");
|
|
11
|
+
}
|
|
12
|
+
invalidReference() {
|
|
13
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.invalidReference", "The given code does not contain a valid truncated reference.");
|
|
14
|
+
}
|
|
15
|
+
notSupportedTokenContent() {
|
|
16
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.notSupportedTokenContent", "The scanned code is not supported in this context.");
|
|
17
|
+
}
|
|
18
|
+
deviceOnboardingNotAllowed() {
|
|
19
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.deviceOnboardingNotAllowed", "The Token contains a device onboarding info, but this is not allowed in this context.");
|
|
20
|
+
}
|
|
21
|
+
passwordNotProvided() {
|
|
22
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.passwordNotProvided", "No password was provided.");
|
|
23
|
+
}
|
|
24
|
+
passwordRetryLimitReached() {
|
|
25
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.passwordRetryLimitReached", "The maximum number of attempts to enter the password was reached.");
|
|
26
|
+
}
|
|
27
|
+
noDeviceOnboardingCode() {
|
|
28
|
+
return new ts_utils_1.ApplicationError("error.appruntime.appStringProcessor.noDeviceOnboardingCode", "The scanned code does not contain a device onboarding info, but this scanner is only able to process device onboarding codes.");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
5
31
|
class General {
|
|
6
32
|
currentSessionUnavailable() {
|
|
7
|
-
return new
|
|
33
|
+
return new ts_utils_1.ApplicationError("error.appruntime.general.currentSessionUnavailable", "The currentSession is not available. Try to execute login before this operation.");
|
|
8
34
|
}
|
|
9
35
|
addressUnavailable() {
|
|
10
|
-
return new
|
|
36
|
+
return new ts_utils_1.ApplicationError("error.appruntime.general.addressUnavailable", "The address of the account is not available. This might be a permanent problem caused by a failed login.");
|
|
11
37
|
}
|
|
12
38
|
appServicesUnavailable() {
|
|
13
|
-
return new
|
|
39
|
+
return new ts_utils_1.ApplicationError("error.appruntime.general.appServicesUnavailable", "The app services are not available. Try to execute login before this operation.");
|
|
14
40
|
}
|
|
15
41
|
noAccountAvailable(error) {
|
|
16
|
-
return new
|
|
42
|
+
return new ts_utils_1.ApplicationError("error.appruntime.general.noAccountAvailable", "There is no account available for this action.", error);
|
|
17
43
|
}
|
|
18
44
|
noAccountAvailableForIdentityTruncated() {
|
|
19
|
-
return new
|
|
45
|
+
return new ts_utils_1.ApplicationError("error.appruntime.general.noAccountAvailableForIdentityTruncated", "There is no account matching the given 'forIdentityTruncated'.", "It seems no eligible account is available for this action, because the scanned code is intended for a specific Identity that is not available on this device.");
|
|
20
46
|
}
|
|
21
47
|
}
|
|
22
48
|
class Startup {
|
|
23
|
-
bootstrapError(bootstrapError) {
|
|
24
|
-
return new UserfriendlyApplicationError_1.UserfriendlyApplicationError("error.runtime.startup.BootstrapError", "There was an error while bootstrapping.", undefined, bootstrapError);
|
|
25
|
-
}
|
|
26
|
-
bootstrapperNotInitialized() {
|
|
27
|
-
return new UserfriendlyApplicationError_1.UserfriendlyApplicationError("error.runtime.startup.BootstrapNotInitialized", "The given bootstrapper is not initialized.");
|
|
28
|
-
}
|
|
29
49
|
uiBridgeAlreadyRegistered() {
|
|
30
|
-
return new
|
|
31
|
-
}
|
|
32
|
-
wrongURL() {
|
|
33
|
-
return new UserfriendlyApplicationError_1.UserfriendlyApplicationError("error.appruntime.startup.WrongURL", "The given URL to start the app is in a wrong format.");
|
|
34
|
-
}
|
|
35
|
-
wrongCode() {
|
|
36
|
-
return new UserfriendlyApplicationError_1.UserfriendlyApplicationError("error.appruntime.startup.WrongCode", "The given code is in a wrong format.");
|
|
50
|
+
return new ts_utils_1.ApplicationError("error.appruntime.startup.uiBridgeAlreadyRegistered", "The UI bridge was already registered for this Runtime instance.");
|
|
37
51
|
}
|
|
38
52
|
}
|
|
39
53
|
class PushNotificationModule {
|
|
40
|
-
subscriptionNotPossible(details, rootError) {
|
|
41
|
-
return new UserfriendlyApplicationError_1.UserfriendlyApplicationError("error.runtime.module.PushNotificationModule.SubscriptionNotPossible", `Subscribing to the NativeEventBus was not possible. Root cause: '${details}'`, "The Backbone has no push connection with this app. You might have to refresh the app manually.", rootError);
|
|
42
|
-
}
|
|
43
|
-
unsubscriptionNotPossible(details, rootError) {
|
|
44
|
-
return new UserfriendlyApplicationError_1.UserfriendlyApplicationError("error.runtime.module.PushNotificationModule.UnsubscriptionNotPossible", `Unsubscribing from the NativeEventBus was not possible. Root cause: '${details}'`, "The Backbone still might have a push connection with this app. You might receive some unwanted notifications.", rootError);
|
|
45
|
-
}
|
|
46
54
|
tokenRegistrationNotPossible(details, rootError) {
|
|
47
|
-
return new
|
|
55
|
+
return new ts_utils_1.ApplicationError("error.runtime.module.PushNotificationModule.TokenRegistrationNotPossible", `Registering the Push Notification Token for the account was not possible. Root cause: '${details}'`, rootError);
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
class Modules {
|
|
@@ -53,6 +61,7 @@ class Modules {
|
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
class AppRuntimeErrors {
|
|
64
|
+
static { this.appStringProcessor = new AppStringProcessor(); }
|
|
56
65
|
static { this.general = new General(); }
|
|
57
66
|
static { this.startup = new Startup(); }
|
|
58
67
|
static { this.modules = new Modules(); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRuntimeErrors.js","sourceRoot":"","sources":["../src/AppRuntimeErrors.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"AppRuntimeErrors.js","sourceRoot":"","sources":["../src/AppRuntimeErrors.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAErD,MAAM,kBAAkB;IACb,QAAQ;QACX,OAAO,IAAI,2BAAgB,CAAC,8CAA8C,EAAE,qCAAqC,CAAC,CAAC;IACvH,CAAC;IAEM,SAAS;QACZ,OAAO,IAAI,2BAAgB,CAAC,+CAA+C,EAAE,sCAAsC,CAAC,CAAC;IACzH,CAAC;IAEM,gBAAgB;QACnB,OAAO,IAAI,2BAAgB,CAAC,sDAAsD,EAAE,8DAA8D,CAAC,CAAC;IACxJ,CAAC;IAEM,wBAAwB;QAC3B,OAAO,IAAI,2BAAgB,CAAC,8DAA8D,EAAE,oDAAoD,CAAC,CAAC;IACtJ,CAAC;IAEM,0BAA0B;QAC7B,OAAO,IAAI,2BAAgB,CACvB,gEAAgE,EAChE,uFAAuF,CAC1F,CAAC;IACN,CAAC;IAEM,mBAAmB;QACtB,OAAO,IAAI,2BAAgB,CAAC,yDAAyD,EAAE,2BAA2B,CAAC,CAAC;IACxH,CAAC;IAEM,yBAAyB;QAC5B,OAAO,IAAI,2BAAgB,CAAC,+DAA+D,EAAE,mEAAmE,CAAC,CAAC;IACtK,CAAC;IAEM,sBAAsB;QACzB,OAAO,IAAI,2BAAgB,CACvB,4DAA4D,EAC5D,+HAA+H,CAClI,CAAC;IACN,CAAC;CACJ;AAED,MAAM,OAAO;IACF,yBAAyB;QAC5B,OAAO,IAAI,2BAAgB,CAAC,oDAAoD,EAAE,kFAAkF,CAAC,CAAC;IAC1K,CAAC;IAEM,kBAAkB;QACrB,OAAO,IAAI,2BAAgB,CACvB,6CAA6C,EAC7C,0GAA0G,CAC7G,CAAC;IACN,CAAC;IAEM,sBAAsB;QACzB,OAAO,IAAI,2BAAgB,CAAC,iDAAiD,EAAE,iFAAiF,CAAC,CAAC;IACtK,CAAC;IAEM,kBAAkB,CAAC,KAAa;QACnC,OAAO,IAAI,2BAAgB,CAAC,6CAA6C,EAAE,gDAAgD,EAAE,KAAK,CAAC,CAAC;IACxI,CAAC;IAEM,sCAAsC;QACzC,OAAO,IAAI,2BAAgB,CACvB,iEAAiE,EACjE,gEAAgE,EAChE,+JAA+J,CAClK,CAAC;IACN,CAAC;CACJ;AAED,MAAM,OAAO;IACF,yBAAyB;QAC5B,OAAO,IAAI,2BAAgB,CAAC,oDAAoD,EAAE,iEAAiE,CAAC,CAAC;IACzJ,CAAC;CACJ;AAED,MAAM,sBAAsB;IACjB,4BAA4B,CAAC,OAAe,EAAE,SAAiB;QAClE,OAAO,IAAI,2BAAgB,CACvB,0EAA0E,EAC1E,0FAA0F,OAAO,GAAG,EACpG,SAAS,CACZ,CAAC;IACN,CAAC;CACJ;AAED,MAAM,OAAO;IAAb;QACoB,2BAAsB,GAAG,IAAI,sBAAsB,EAAE,CAAC;IAC1E,CAAC;CAAA;AAED,MAAa,gBAAgB;aACF,uBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;aAC9C,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;aACxB,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;aACxB,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;;AAJnD,4CAKC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { ILoggerFactory } from "@js-soft/logging-abstractions";
|
|
2
2
|
import { EventBus, Result } from "@js-soft/ts-utils";
|
|
3
3
|
import { ICoreAddress } from "@nmshd/core-types";
|
|
4
|
-
import { AnonymousServices } from "@nmshd/runtime";
|
|
5
|
-
import { AppRuntimeServices } from "./AppRuntimeServices";
|
|
4
|
+
import { AnonymousServices, RuntimeServices } from "@nmshd/runtime";
|
|
6
5
|
import { IUIBridge } from "./extensibility";
|
|
7
6
|
import { AccountServices, LocalAccountDTO, LocalAccountSession } from "./multiAccount";
|
|
8
|
-
import { UserfriendlyResult } from "./UserfriendlyResult";
|
|
9
7
|
export declare class AppStringProcessor {
|
|
10
8
|
protected readonly runtime: {
|
|
11
9
|
get anonymousServices(): AnonymousServices;
|
|
12
10
|
get accountServices(): AccountServices;
|
|
13
11
|
uiBridge(): Promise<IUIBridge> | IUIBridge;
|
|
14
|
-
getServices(accountReference: string | ICoreAddress): Promise<
|
|
15
|
-
translate(key: string, ...values: any[]): Promise<Result<string>>;
|
|
12
|
+
getServices(accountReference: string | ICoreAddress): Promise<RuntimeServices>;
|
|
16
13
|
get eventBus(): EventBus;
|
|
17
14
|
selectAccount(accountReference: string): Promise<LocalAccountSession>;
|
|
18
15
|
};
|
|
@@ -21,14 +18,15 @@ export declare class AppStringProcessor {
|
|
|
21
18
|
get anonymousServices(): AnonymousServices;
|
|
22
19
|
get accountServices(): AccountServices;
|
|
23
20
|
uiBridge(): Promise<IUIBridge> | IUIBridge;
|
|
24
|
-
getServices(accountReference: string | ICoreAddress): Promise<
|
|
25
|
-
translate(key: string, ...values: any[]): Promise<Result<string>>;
|
|
21
|
+
getServices(accountReference: string | ICoreAddress): Promise<RuntimeServices>;
|
|
26
22
|
get eventBus(): EventBus;
|
|
27
23
|
selectAccount(accountReference: string): Promise<LocalAccountSession>;
|
|
28
24
|
}, loggerFactory: ILoggerFactory);
|
|
29
|
-
processURL(url: string, account?: LocalAccountDTO): Promise<
|
|
30
|
-
|
|
25
|
+
processURL(url: string, account?: LocalAccountDTO): Promise<Result<void>>;
|
|
26
|
+
processReference(referenceString: string, account?: LocalAccountDTO): Promise<Result<void>>;
|
|
27
|
+
private _processReference;
|
|
31
28
|
private _handleReference;
|
|
29
|
+
processDeviceOnboardingReference(url: string): Promise<Result<void>>;
|
|
32
30
|
private parseTokenContent;
|
|
33
31
|
private _fetchPasswordProtectedItemWithRetry;
|
|
34
32
|
private selectAccount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppStringProcessor.d.ts","sourceRoot":"","sources":["../src/AppStringProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAuC,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"AppStringProcessor.d.ts","sourceRoot":"","sources":["../src/AppStringProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAuC,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAgB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGlF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAEvF,qBAAa,kBAAkB;IAIvB,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE;QACxB,IAAI,iBAAiB,IAAI,iBAAiB,CAAC;QAC3C,IAAI,eAAe,IAAI,eAAe,CAAC;QACvC,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;QAC3C,WAAW,CAAC,gBAAgB,EAAE,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;QAC/E,IAAI,QAAQ,I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