@nmshd/app-runtime 7.0.0-alpha.4 → 7.0.0-alpha.41
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/README.md +1 -1
- package/dist/AppConfig.d.ts.map +1 -1
- package/dist/AppConfig.js +13 -75
- 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 +18 -48
- 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 +75 -49
- package/dist/AppStringProcessor.js.map +1 -1
- package/dist/buildInformation.js +5 -5
- 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 +2 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +2 -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/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 +2 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/{extensibility/facades → infrastructure}/index.js +1 -1
- package/dist/infrastructure/index.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 +0 -2
- package/dist/modules/PushNotificationModule.d.ts.map +1 -1
- package/dist/modules/PushNotificationModule.js +11 -14
- package/dist/modules/PushNotificationModule.js.map +1 -1
- package/dist/modules/SSEModule.js +3 -3
- 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/runtimeEvents/IdentityDeletionProcessStatusChangedModule.d.ts +0 -3
- package/dist/modules/runtimeEvents/IdentityDeletionProcessStatusChangedModule.d.ts.map +1 -1
- package/dist/modules/runtimeEvents/IdentityDeletionProcessStatusChangedModule.js +1 -5
- 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/MultiAccountController.d.ts.map +1 -1
- package/dist/multiAccount/MultiAccountController.js +6 -6
- 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 +5 -5
- 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 +0 -3
- 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
@@ -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,YA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,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;KACzE,EACD,aAAa,EAAE,cAAc;IAKpB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAUzE,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAS1F,iBAAiB;YA4DjB,gBAAgB;IAsCjB,gCAAgC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAqCjF,OAAO,CAAC,iBAAiB;YASX,oCAAoC;YAmCpC,aAAa;YAgBb,6BAA6B;CAU9C"}
|
@@ -2,11 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.AppStringProcessor = void 0;
|
4
4
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
5
|
+
const ts_utils_1 = require("@js-soft/ts-utils");
|
6
|
+
const core_types_1 = require("@nmshd/core-types");
|
5
7
|
const runtime_1 = require("@nmshd/runtime");
|
6
8
|
const transport_1 = require("@nmshd/transport");
|
7
9
|
const AppRuntimeErrors_1 = require("./AppRuntimeErrors");
|
8
|
-
const UserfriendlyApplicationError_1 = require("./UserfriendlyApplicationError");
|
9
|
-
const UserfriendlyResult_1 = require("./UserfriendlyResult");
|
10
10
|
class AppStringProcessor {
|
11
11
|
constructor(runtime, loggerFactory) {
|
12
12
|
this.runtime = runtime;
|
@@ -14,67 +14,65 @@ class AppStringProcessor {
|
|
14
14
|
}
|
15
15
|
async processURL(url, account) {
|
16
16
|
url = url.trim();
|
17
|
-
const
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
return
|
17
|
+
const parsed = new URL(url);
|
18
|
+
const allowedProtocols = ["http:", "https:"];
|
19
|
+
if (!allowedProtocols.includes(parsed.protocol))
|
20
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.wrongURL());
|
21
|
+
return await this.processReference(url, account);
|
22
22
|
}
|
23
|
-
async
|
24
|
-
let reference;
|
23
|
+
async processReference(referenceString, account) {
|
25
24
|
try {
|
26
|
-
reference =
|
25
|
+
const reference = core_types_1.Reference.from(referenceString);
|
26
|
+
return await this._processReference(reference, account);
|
27
27
|
}
|
28
28
|
catch (_) {
|
29
|
-
return
|
29
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.invalidReference());
|
30
30
|
}
|
31
|
+
}
|
32
|
+
async _processReference(reference, account) {
|
31
33
|
if (account)
|
32
34
|
return await this._handleReference(reference, account);
|
33
35
|
// process Files and RelationshipTemplates and ask for an account
|
34
|
-
if (
|
36
|
+
if (reference.id.toString().startsWith("FIL") || reference.id.toString().startsWith("RLT")) {
|
35
37
|
const result = await this.selectAccount(reference.forIdentityTruncated);
|
36
38
|
if (result.isError) {
|
37
39
|
this.logger.info("Could not query account", result.error);
|
38
|
-
return
|
40
|
+
return ts_utils_1.Result.fail(result.error);
|
39
41
|
}
|
40
42
|
if (!result.value) {
|
41
43
|
this.logger.info("User cancelled account selection");
|
42
|
-
return
|
44
|
+
return ts_utils_1.Result.ok(undefined);
|
43
45
|
}
|
44
46
|
return await this._handleReference(reference, result.value);
|
45
47
|
}
|
46
|
-
if (!
|
47
|
-
const error = AppRuntimeErrors_1.AppRuntimeErrors.
|
48
|
-
return
|
48
|
+
if (!reference.id.toString().startsWith("TOK")) {
|
49
|
+
const error = AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.wrongCode();
|
50
|
+
return ts_utils_1.Result.fail(error);
|
49
51
|
}
|
50
|
-
const uiBridge = await this.runtime.uiBridge();
|
51
52
|
const tokenResultHolder = reference.passwordProtection
|
52
|
-
? await this._fetchPasswordProtectedItemWithRetry(async (password) => await this.runtime.anonymousServices.tokens.loadPeerToken({ reference:
|
53
|
-
: { result: await this.runtime.anonymousServices.tokens.loadPeerToken({ reference:
|
54
|
-
if (tokenResultHolder.result.isError && tokenResultHolder.result.error.
|
55
|
-
return
|
56
|
-
}
|
57
|
-
if (tokenResultHolder.result.isError) {
|
58
|
-
return UserfriendlyResult_1.UserfriendlyResult.fail(UserfriendlyApplicationError_1.UserfriendlyApplicationError.fromError(tokenResultHolder.result.error));
|
53
|
+
? await this._fetchPasswordProtectedItemWithRetry(async (password) => await this.runtime.anonymousServices.tokens.loadPeerToken({ reference: reference.truncate(), password }), reference.passwordProtection)
|
54
|
+
: { result: await this.runtime.anonymousServices.tokens.loadPeerToken({ reference: reference.truncate() }) };
|
55
|
+
if (tokenResultHolder.result.isError && tokenResultHolder.result.error.equals(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.passwordNotProvided())) {
|
56
|
+
return ts_utils_1.Result.ok(undefined);
|
59
57
|
}
|
58
|
+
if (tokenResultHolder.result.isError)
|
59
|
+
return ts_utils_1.Result.fail(tokenResultHolder.result.error);
|
60
60
|
const tokenDTO = tokenResultHolder.result.value;
|
61
61
|
const tokenContent = this.parseTokenContent(tokenDTO.content);
|
62
62
|
if (!tokenContent) {
|
63
|
-
const error = AppRuntimeErrors_1.AppRuntimeErrors.
|
64
|
-
return
|
65
|
-
}
|
66
|
-
if (tokenContent instanceof transport_1.TokenContentDeviceSharedSecret) {
|
67
|
-
await uiBridge.showDeviceOnboarding(runtime_1.DeviceMapper.toDeviceOnboardingInfoDTO(tokenContent.sharedSecret));
|
68
|
-
return UserfriendlyResult_1.UserfriendlyResult.ok(undefined);
|
63
|
+
const error = AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.wrongCode();
|
64
|
+
return ts_utils_1.Result.fail(error);
|
69
65
|
}
|
66
|
+
if (tokenContent instanceof transport_1.TokenContentDeviceSharedSecret)
|
67
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.deviceOnboardingNotAllowed());
|
70
68
|
const accountSelectionResult = await this.selectAccount(reference.forIdentityTruncated);
|
71
69
|
if (accountSelectionResult.isError) {
|
72
|
-
return
|
70
|
+
return ts_utils_1.Result.fail(accountSelectionResult.error);
|
73
71
|
}
|
74
72
|
const selectedAccount = accountSelectionResult.value;
|
75
73
|
if (!selectedAccount) {
|
76
74
|
this.logger.info("User cancelled account selection");
|
77
|
-
return
|
75
|
+
return ts_utils_1.Result.ok(undefined);
|
78
76
|
}
|
79
77
|
return await this._handleReference(reference, selectedAccount, tokenResultHolder.password);
|
80
78
|
}
|
@@ -82,13 +80,13 @@ class AppStringProcessor {
|
|
82
80
|
const services = await this.runtime.getServices(account.id);
|
83
81
|
const uiBridge = await this.runtime.uiBridge();
|
84
82
|
const result = reference.passwordProtection
|
85
|
-
? (await this._fetchPasswordProtectedItemWithRetry(async (password) => await services.transportServices.account.
|
86
|
-
: await services.transportServices.account.
|
87
|
-
if (result.isError && result.error.
|
88
|
-
return
|
83
|
+
? (await this._fetchPasswordProtectedItemWithRetry(async (password) => await services.transportServices.account.loadItemFromReference({ reference: reference.truncate(), password }), reference.passwordProtection)).result
|
84
|
+
: await services.transportServices.account.loadItemFromReference({ reference: reference.truncate(), password: existingPassword });
|
85
|
+
if (result.isError && result.error.equals(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.passwordNotProvided())) {
|
86
|
+
return ts_utils_1.Result.ok(undefined);
|
89
87
|
}
|
90
88
|
if (result.isError) {
|
91
|
-
return
|
89
|
+
return ts_utils_1.Result.fail(result.error);
|
92
90
|
}
|
93
91
|
switch (result.value.type) {
|
94
92
|
case "File":
|
@@ -99,11 +97,39 @@ class AppStringProcessor {
|
|
99
97
|
// RelationshipTemplates are processed by the RequestModule
|
100
98
|
break;
|
101
99
|
case "Token":
|
102
|
-
return
|
100
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.notSupportedTokenContent());
|
103
101
|
case "DeviceOnboardingInfo":
|
104
|
-
return
|
102
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.deviceOnboardingNotAllowed());
|
105
103
|
}
|
106
|
-
return
|
104
|
+
return ts_utils_1.Result.ok(undefined);
|
105
|
+
}
|
106
|
+
async processDeviceOnboardingReference(url) {
|
107
|
+
url = url.trim();
|
108
|
+
let reference;
|
109
|
+
try {
|
110
|
+
reference = core_types_1.Reference.from(url);
|
111
|
+
}
|
112
|
+
catch (_) {
|
113
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.invalidReference());
|
114
|
+
}
|
115
|
+
if (!reference.id.toString().startsWith("TOK"))
|
116
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.noDeviceOnboardingCode());
|
117
|
+
const tokenResultHolder = reference.passwordProtection
|
118
|
+
? await this._fetchPasswordProtectedItemWithRetry(async (password) => await this.runtime.anonymousServices.tokens.loadPeerToken({ reference: reference.truncate(), password }), reference.passwordProtection)
|
119
|
+
: { result: await this.runtime.anonymousServices.tokens.loadPeerToken({ reference: reference.truncate() }) };
|
120
|
+
if (tokenResultHolder.result.isError && tokenResultHolder.result.error.equals(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.passwordNotProvided())) {
|
121
|
+
return ts_utils_1.Result.ok(undefined);
|
122
|
+
}
|
123
|
+
if (tokenResultHolder.result.isError) {
|
124
|
+
return ts_utils_1.Result.fail(tokenResultHolder.result.error);
|
125
|
+
}
|
126
|
+
const tokenDTO = tokenResultHolder.result.value;
|
127
|
+
const tokenContent = this.parseTokenContent(tokenDTO.content);
|
128
|
+
if (!(tokenContent instanceof transport_1.TokenContentDeviceSharedSecret))
|
129
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.noDeviceOnboardingCode());
|
130
|
+
const uiBridge = await this.runtime.uiBridge();
|
131
|
+
await uiBridge.showDeviceOnboarding(runtime_1.DeviceMapper.toDeviceOnboardingInfoDTO(tokenContent.sharedSecret));
|
132
|
+
return ts_utils_1.Result.ok(undefined);
|
107
133
|
}
|
108
134
|
parseTokenContent(content) {
|
109
135
|
try {
|
@@ -119,9 +145,9 @@ class AppStringProcessor {
|
|
119
145
|
const uiBridge = await this.runtime.uiBridge();
|
120
146
|
const maxRetries = 1000;
|
121
147
|
while (attempt <= maxRetries) {
|
122
|
-
const passwordResult = await uiBridge.enterPassword(passwordProtection.passwordType === "pw" ? "pw" : "pin", passwordProtection.passwordType.startsWith("pin") ? parseInt(passwordProtection.passwordType.substring(3)) : undefined, attempt);
|
148
|
+
const passwordResult = await uiBridge.enterPassword(passwordProtection.passwordType === "pw" ? "pw" : "pin", passwordProtection.passwordType.startsWith("pin") ? parseInt(passwordProtection.passwordType.substring(3)) : undefined, attempt, passwordProtection.passwordLocationIndicator);
|
123
149
|
if (passwordResult.isError) {
|
124
|
-
return { result:
|
150
|
+
return { result: ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.passwordNotProvided()) };
|
125
151
|
}
|
126
152
|
const password = passwordResult.value;
|
127
153
|
const result = await fetchFunction(password);
|
@@ -133,20 +159,20 @@ class AppStringProcessor {
|
|
133
159
|
return { result };
|
134
160
|
}
|
135
161
|
return {
|
136
|
-
result:
|
162
|
+
result: ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.appStringProcessor.passwordRetryLimitReached())
|
137
163
|
};
|
138
164
|
}
|
139
165
|
async selectAccount(forIdentityTruncated) {
|
140
|
-
const accounts = await this.runtime.accountServices.
|
166
|
+
const accounts = await this.runtime.accountServices.getAccountsNotInDeletion();
|
141
167
|
const title = "i18n://uibridge.accountSelection.title";
|
142
168
|
const description = "i18n://uibridge.accountSelection.description";
|
143
169
|
if (!forIdentityTruncated)
|
144
170
|
return await this.requestManualAccountSelection(accounts, title, description);
|
145
171
|
const accountsWithPostfix = accounts.filter((account) => account.address?.endsWith(forIdentityTruncated));
|
146
172
|
if (accountsWithPostfix.length === 0)
|
147
|
-
return
|
173
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.general.noAccountAvailableForIdentityTruncated());
|
148
174
|
if (accountsWithPostfix.length === 1)
|
149
|
-
return
|
175
|
+
return ts_utils_1.Result.ok(accountsWithPostfix[0]);
|
150
176
|
// This catches the extremely rare case where two accounts are available that have the same last 4 characters in their address. In that case
|
151
177
|
// the user will have to decide which account to use, which could not work because it is not the exactly same address specified when personalizing the object.
|
152
178
|
return await this.requestManualAccountSelection(accountsWithPostfix, title, description);
|
@@ -155,11 +181,11 @@ class AppStringProcessor {
|
|
155
181
|
const uiBridge = await this.runtime.uiBridge();
|
156
182
|
const accountSelectionResult = await uiBridge.requestAccountSelection(accounts, title, description);
|
157
183
|
if (accountSelectionResult.isError) {
|
158
|
-
return
|
184
|
+
return ts_utils_1.Result.fail(AppRuntimeErrors_1.AppRuntimeErrors.general.noAccountAvailable(accountSelectionResult.error));
|
159
185
|
}
|
160
186
|
if (accountSelectionResult.value)
|
161
187
|
await this.runtime.selectAccount(accountSelectionResult.value.id);
|
162
|
-
return
|
188
|
+
return ts_utils_1.Result.ok(accountSelectionResult.value);
|
163
189
|
}
|
164
190
|
}
|
165
191
|
exports.AppStringProcessor = AppStringProcessor;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AppStringProcessor.js","sourceRoot":"","sources":["../src/AppStringProcessor.ts"],"names":[],"mappings":";;;AACA,kDAAkD;
|
1
|
+
{"version":3,"file":"AppStringProcessor.js","sourceRoot":"","sources":["../src/AppStringProcessor.ts"],"names":[],"mappings":";;;AACA,kDAAkD;AAClD,gDAAqD;AACrD,kDAAsF;AACtF,4CAAkF;AAClF,gDAAkE;AAClE,yDAAsD;AAItD,MAAa,kBAAkB;IAG3B,YACuB,OAOlB,EACD,aAA6B;QARV,YAAO,GAAP,OAAO,CAOzB;QAGD,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,S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C,6BAA6B,CAAC,QAA2B,EAAE,KAAa,EAAE,WAAmB;QACvG,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/C,MAAM,sBAAsB,GAAG,MAAM,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QACpG,IAAI,sBAAsB,CAAC,OAAO,EAAE,CAAC;YACjC,OAAO,iBAAM,CAAC,IAAI,CAAC,mCAAgB,CAAC,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;QAClG,CAAC;QAED,IAAI,sBAAsB,CAAC,KAAK;YAAE,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpG,OAAO,iBAAM,CAAC,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;CACJ;AAjPD,gDAiPC"}
|
package/dist/buildInformation.js
CHANGED
@@ -8,11 +8,11 @@ const crypto_1 = require("@nmshd/crypto");
|
|
8
8
|
const runtime_1 = require("@nmshd/runtime");
|
9
9
|
const transport_1 = require("@nmshd/transport");
|
10
10
|
exports.buildInformation = {
|
11
|
-
version: "7.0.0-alpha.
|
12
|
-
build: "
|
13
|
-
date: "2025-
|
14
|
-
commit: "
|
15
|
-
dependencies: {"@js-soft/docdb-access-loki":"^1.2.0","@nmshd/runtime":"*","eventsource":"^
|
11
|
+
version: "7.0.0-alpha.41",
|
12
|
+
build: "285",
|
13
|
+
date: "2025-06-03T14:40:50+00:00",
|
14
|
+
commit: "046bed3a02070f2377fe732bbb5db9ef91000079",
|
15
|
+
dependencies: {"@js-soft/docdb-access-loki":"^1.2.0","@nmshd/runtime":"*","eventsource":"^4.0.0","lodash":"^4.17.21"},
|
16
16
|
libraries: {
|
17
17
|
serval: ts_serval_1.buildInformation,
|
18
18
|
crypto: crypto_1.buildInformation,
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { Event } from "@js-soft/ts-utils";
|
2
2
|
export interface RemoteNotification {
|
3
3
|
content: any;
|
4
4
|
id?: string;
|
5
5
|
foreground?: boolean;
|
6
6
|
limitedProcessingTime?: string;
|
7
7
|
}
|
8
|
-
export declare class RemoteNotificationEvent extends
|
8
|
+
export declare class RemoteNotificationEvent extends Event {
|
9
9
|
readonly notification: RemoteNotification;
|
10
10
|
static namespace: string;
|
11
11
|
constructor(notification: RemoteNotification);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RemoteNotificationEvent.d.ts","sourceRoot":"","sources":["../../src/events/RemoteNotificationEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,GAAG,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,qBAAa,uBAAwB,SAAQ,KAAK;aAEX,YAAY,EAAE,kBAAkB;IADnE,OAAc,SAAS,SAAwB;gBACZ,YAAY,EAAE,kBAAkB;CAGtE"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.RemoteNotificationEvent = void 0;
|
4
|
-
const
|
5
|
-
class RemoteNotificationEvent extends
|
4
|
+
const ts_utils_1 = require("@js-soft/ts-utils");
|
5
|
+
class RemoteNotificationEvent extends ts_utils_1.Event {
|
6
6
|
static { this.namespace = "RemoteNotification"; }
|
7
7
|
constructor(notification) {
|
8
8
|
super(RemoteNotificationEvent.namespace);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RemoteNotificationEvent.js","sourceRoot":"","sources":["../../src/events/RemoteNotificationEvent.ts"],"names":[],"mappings":";;;AAAA,gDAA0C;AAS1C,MAAa,uBAAwB,SAAQ,gBAAK;aAChC,cAAS,GAAG,oBAAoB,CAAC;IAC/C,YAAmC,YAAgC;QAC/D,KAAK,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;QADV,iBAAY,GAAZ,YAAY,CAAoB;IAEnE,CAAC;;AAJL,0DAKC"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
export declare class RemoteNotificationRegistrationEvent extends
|
1
|
+
import { Event } from "@js-soft/ts-utils";
|
2
|
+
export declare class RemoteNotificationRegistrationEvent extends Event {
|
3
3
|
readonly token: string;
|
4
4
|
static namespace: string;
|
5
5
|
constructor(token: string);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RemoteNotificationRegistrationEvent.d.ts","sourceRoot":"","sources":["../../src/events/RemoteNotificationRegistrationEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,qBAAa,mCAAoC,SAAQ,KAAK;aAEvB,KAAK,EAAE,MAAM;IADhD,OAAc,SAAS,SAAoC;gBACxB,KAAK,EAAE,MAAM;CAGnD"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.RemoteNotificationRegistrationEvent = void 0;
|
4
|
-
const
|
5
|
-
class RemoteNotificationRegistrationEvent extends
|
4
|
+
const ts_utils_1 = require("@js-soft/ts-utils");
|
5
|
+
class RemoteNotificationRegistrationEvent extends ts_utils_1.Event {
|
6
6
|
static { this.namespace = "RemoteNotificationRegistration"; }
|
7
7
|
constructor(token) {
|
8
8
|
super(RemoteNotificationRegistrationEvent.namespace);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RemoteNotificationRegistrationEvent.js","sourceRoot":"","sources":["../../src/events/RemoteNotificationRegistrationEvent.ts"],"names":[],"mappings":";;;AAAA,gDAA0C;AAE1C,MAAa,mCAAoC,SAAQ,gBAAK;aAC5C,cAAS,GAAG,gCAAgC,CAAC;IAC3D,YAAmC,KAAa;QAC5C,KAAK,CAAC,mCAAmC,CAAC,SAAS,CAAC,CAAC;QADtB,UAAK,GAAL,KAAK,CAAQ;IAEhD,CAAC;;AAJL,kFAKC"}
|
package/dist/events/index.d.ts
CHANGED
@@ -4,4 +4,6 @@ export * from "./LocalAccountDeletionDateChangedEvent";
|
|
4
4
|
export * from "./MailReceivedEvent";
|
5
5
|
export * from "./OnboardingChangeReceivedEvent";
|
6
6
|
export * from "./RelationshipSelectedEvent";
|
7
|
+
export * from "./RemoteNotificationEvent";
|
8
|
+
export * from "./RemoteNotificationRegistrationEvent";
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC"}
|
package/dist/events/index.js
CHANGED
@@ -20,4 +20,6 @@ __exportStar(require("./LocalAccountDeletionDateChangedEvent"), exports);
|
|
20
20
|
__exportStar(require("./MailReceivedEvent"), exports);
|
21
21
|
__exportStar(require("./OnboardingChangeReceivedEvent"), exports);
|
22
22
|
__exportStar(require("./RelationshipSelectedEvent"), exports);
|
23
|
+
__exportStar(require("./RemoteNotificationEvent"), exports);
|
24
|
+
__exportStar(require("./RemoteNotificationRegistrationEvent"), exports);
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/dist/events/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,+DAA6C;AAC7C,yEAAuD;AACvD,sDAAoC;AACpC,kEAAgD;AAChD,8DAA4C"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,+DAA6C;AAC7C,yEAAuD;AACvD,sDAAoC;AACpC,kEAAgD;AAChD,8DAA4C;AAC5C,4DAA0C;AAC1C,wEAAsD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensibility/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensibility/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./AppServices"), exports);
|
18
17
|
__exportStar(require("./ui/IUIBridge"), exports);
|
19
18
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extensibility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extensibility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
1
|
+
import { ApplicationError, Result } from "@js-soft/ts-utils";
|
2
2
|
import { DeviceOnboardingInfoDTO, FileDVO, IdentityDVO, LocalRequestDVO, MailDVO, MessageDVO, RequestMessageDVO } from "@nmshd/runtime";
|
3
|
-
import { UserfriendlyApplicationError } from "../../UserfriendlyApplicationError";
|
4
3
|
import { LocalAccountDTO } from "../../multiAccount";
|
5
4
|
export interface IUIBridge {
|
6
5
|
showMessage(account: LocalAccountDTO, relationship: IdentityDVO, message: MessageDVO | MailDVO | RequestMessageDVO): Promise<Result<void>>;
|
@@ -8,8 +7,8 @@ export interface IUIBridge {
|
|
8
7
|
showFile(account: LocalAccountDTO, file: FileDVO): Promise<Result<void>>;
|
9
8
|
showDeviceOnboarding(deviceOnboardingInfo: DeviceOnboardingInfoDTO): Promise<Result<void>>;
|
10
9
|
showRequest(account: LocalAccountDTO, request: LocalRequestDVO): Promise<Result<void>>;
|
11
|
-
showError(error:
|
10
|
+
showError(error: ApplicationError, account?: LocalAccountDTO): Promise<Result<void>>;
|
12
11
|
requestAccountSelection(possibleAccounts: LocalAccountDTO[], title?: string, description?: string): Promise<Result<LocalAccountDTO | undefined>>;
|
13
|
-
enterPassword(passwordType: "pw" | "pin", pinLength?: number, attempt?: number): Promise<Result<string>>;
|
12
|
+
enterPassword(passwordType: "pw" | "pin", pinLength?: number, attempt?: number, passwordLocationIndicator?: number): Promise<Result<string>>;
|
14
13
|
}
|
15
14
|
//# sourceMappingURL=IUIBridge.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IUIBridge.d.ts","sourceRoot":"","sources":["../../../src/extensibility/ui/IUIBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"IUIBridge.d.ts","sourceR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jJ,aAAa,CAAC,YAAY,EAAE,IAAI,GAAG,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,yBAAyB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;CAChJ"}
|
package/dist/index.d.ts
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
export * from "./AppConfig";
|
2
2
|
export * from "./AppRuntime";
|
3
|
-
export * from "./AppRuntimeError";
|
4
3
|
export * from "./AppRuntimeErrors";
|
5
|
-
export * from "./AppRuntimeServices";
|
6
4
|
export * from "./buildInformation";
|
7
5
|
export * from "./events";
|
8
6
|
export * from "./extensibility";
|
7
|
+
export * from "./infrastructure";
|
9
8
|
export * from "./modules";
|
10
9
|
export * from "./multiAccount";
|
11
|
-
export * from "./natives";
|
12
|
-
export * from "./UserfriendlyApplicationError";
|
13
|
-
export * from "./UserfriendlyResult";
|
14
10
|
//# 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,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
@@ -16,15 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./AppConfig"), exports);
|
18
18
|
__exportStar(require("./AppRuntime"), exports);
|
19
|
-
__exportStar(require("./AppRuntimeError"), exports);
|
20
19
|
__exportStar(require("./AppRuntimeErrors"), exports);
|
21
|
-
__exportStar(require("./AppRuntimeServices"), exports);
|
22
20
|
__exportStar(require("./buildInformation"), exports);
|
23
21
|
__exportStar(require("./events"), exports);
|
24
22
|
__exportStar(require("./extensibility"), exports);
|
23
|
+
__exportStar(require("./infrastructure"), exports);
|
25
24
|
__exportStar(require("./modules"), exports);
|
26
25
|
__exportStar(require("./multiAccount"), exports);
|
27
|
-
__exportStar(require("./natives"), exports);
|
28
|
-
__exportStar(require("./UserfriendlyApplicationError"), exports);
|
29
|
-
__exportStar(require("./UserfriendlyResult"), exports);
|
30
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,+CAA6B;AAC7B,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,+CAA6B;AAC7B,qDAAmC;AACnC,qDAAmC;AACnC,2CAAyB;AACzB,kDAAgC;AAChC,mDAAiC;AACjC,4CAA0B;AAC1B,iDAA+B"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Result } from "@js-soft/ts-utils";
|
2
|
+
export interface INotificationAction {
|
3
|
+
title: string;
|
4
|
+
callback: Function;
|
5
|
+
}
|
6
|
+
export interface INotificationScheduleOptions {
|
7
|
+
buttonInput?: INotificationAction[];
|
8
|
+
textInput?: INotificationAction[];
|
9
|
+
callback?: Function;
|
10
|
+
data?: any;
|
11
|
+
id?: number;
|
12
|
+
}
|
13
|
+
export interface INotificationAccess {
|
14
|
+
getPushToken(): Promise<Result<string>>;
|
15
|
+
schedule(title: string, body: string, options?: INotificationScheduleOptions): Promise<Result<number>>;
|
16
|
+
update(id: number, title: string, body: string, options?: INotificationScheduleOptions): Promise<Result<void>>;
|
17
|
+
clear(id: number): Promise<Result<void>>;
|
18
|
+
clearAll(): Promise<Result<void>>;
|
19
|
+
getAll(): Promise<Result<number[]>>;
|
20
|
+
init(): Promise<Result<void>>;
|
21
|
+
}
|
22
|
+
//# sourceMappingURL=INotificationAccess.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"INotificationAccess.d.ts","sourceRoot":"","sources":["../../src/infrastructure/INotificationAccess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IACzC,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAChC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACvG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/G,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAClC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACpC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;CACjC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"INotificationAccess.js","sourceRoot":"","sources":["../../src/infrastructure/INotificationAccess.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/infrastructure/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./
|
17
|
+
__exportStar(require("./INotificationAccess"), exports);
|
18
18
|
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/infrastructure/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC"}
|