@lifeready/core 1.0.22 → 1.1.2
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/bundles/lifeready-core.umd.js +241 -201
- package/bundles/lifeready-core.umd.js.map +1 -1
- package/bundles/lifeready-core.umd.min.js +1 -15
- package/bundles/lifeready-core.umd.min.js.map +1 -1
- package/esm2015/lib/_common/ast.js +2 -1
- package/esm2015/lib/_common/deferred-promise.js +1 -1
- package/esm2015/lib/_common/exceptions.js +1 -1
- package/esm2015/lib/_common/queries.gql.js +1 -1
- package/esm2015/lib/_common/run-outside-angular.js +2 -1
- package/esm2015/lib/_common/types.js +2 -1
- package/esm2015/lib/_common/utils.js +2 -1
- package/esm2015/lib/api/lr-apollo.service.js +2 -1
- package/esm2015/lib/api/lr-graphql/index.js +1 -1
- package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +7 -6
- package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +5 -6
- package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +1 -1
- package/esm2015/lib/api/lr-graphql/lr-mutation.js +3 -3
- package/esm2015/lib/api/lr-graphql/lr.service.js +1 -1
- package/esm2015/lib/api/query-processor/common-processors.service.js +2 -1
- package/esm2015/lib/api/query-processor/index.js +1 -1
- package/esm2015/lib/api/query-processor/query-processor.service.js +2 -1
- package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +3 -3
- package/esm2015/lib/api/types/graphql.types.js +2 -1
- package/esm2015/lib/api/types/index.js +1 -1
- package/esm2015/lib/api/types/lr-graphql.types.js +1 -1
- package/esm2015/lib/auth/auth.config.js +1 -1
- package/esm2015/lib/auth/auth.gql.js +1 -1
- package/esm2015/lib/auth/auth.types.js +1 -1
- package/esm2015/lib/auth/life-ready-auth.service.js +5 -2
- package/esm2015/lib/category/category-meta.service.js +1 -1
- package/esm2015/lib/category/category.gql.js +3 -2
- package/esm2015/lib/category/category.service.js +5 -4
- package/esm2015/lib/category/category.types.js +1 -1
- package/esm2015/lib/contact-card/contact-card.gql.js +1 -1
- package/esm2015/lib/contact-card/contact-card.service.js +3 -1
- package/esm2015/lib/contact-card/contact-card2.gql.js +1 -1
- package/esm2015/lib/contact-card/contact-card2.service.js +1 -1
- package/esm2015/lib/encryption/encryption.service.js +2 -1
- package/esm2015/lib/file-upload/file-upload.service.js +2 -2
- package/esm2015/lib/file-upload/file-upload.types.js +2 -1
- package/esm2015/lib/idle/idle.service.js +1 -1
- package/esm2015/lib/idle/idle.types.js +1 -1
- package/esm2015/lib/item2/item2.gql.js +127 -0
- package/esm2015/lib/item2/item2.gql.private.js +23 -0
- package/esm2015/lib/item2/item2.service.js +519 -0
- package/esm2015/lib/item2/item2.types.js +2 -0
- package/esm2015/lib/key/key-factory.service.js +1 -1
- package/esm2015/lib/key/key-graph.service.js +2 -1
- package/esm2015/lib/key/key-meta.service.js +2 -1
- package/esm2015/lib/key/key.service.js +1 -1
- package/esm2015/lib/key/key.types.js +1 -1
- package/esm2015/lib/key-exchange/key-exchange.gql.js +1 -1
- package/esm2015/lib/key-exchange/key-exchange.service.js +2 -4
- package/esm2015/lib/key-exchange/key-exchange.types.js +1 -1
- package/esm2015/lib/key-exchange/key-exchange2.gql.js +1 -1
- package/esm2015/lib/key-exchange/key-exchange2.service.js +1 -1
- package/esm2015/lib/lbop/lbop.service.js +3 -1
- package/esm2015/lib/life-ready.config.js +2 -1
- package/esm2015/lib/life-ready.module.js +1 -1
- package/esm2015/lib/lock/lock.gql.js +1 -1
- package/esm2015/lib/lock/lock.service.js +1 -1
- package/esm2015/lib/message/message.gql.js +1 -1
- package/esm2015/lib/message/message.service.js +13 -11
- package/esm2015/lib/message/message.types.js +2 -1
- package/esm2015/lib/notification/notification.gql.js +1 -1
- package/esm2015/lib/notification/notification.service.js +2 -2
- package/esm2015/lib/password/password.gql.js +1 -1
- package/esm2015/lib/password/password.service.js +3 -2
- package/esm2015/lib/persist/persist.service.js +2 -1
- package/esm2015/lib/plan/plan.gql.js +1 -1
- package/esm2015/lib/plan/plan.service.js +3 -2
- package/esm2015/lib/plan/plan.types.js +1 -1
- package/esm2015/lib/profile/profile-details.service.js +3 -2
- package/esm2015/lib/profile/profile.gql.js +2 -1
- package/esm2015/lib/profile/profile.service.js +2 -1
- package/esm2015/lib/profile/profile.types.js +1 -1
- package/esm2015/lib/record/record-attachment.service.js +2 -1
- package/esm2015/lib/record/record.gql.js +1 -1
- package/esm2015/lib/record/record.service.js +6 -6
- package/esm2015/lib/record/record.types.js +1 -1
- package/esm2015/lib/record-type/record-type.service.js +1 -1
- package/esm2015/lib/record-type/record-type.types.js +1 -1
- package/esm2015/lib/register/register.service.js +2 -1
- package/esm2015/lib/scenario/scenario.constants.js +1 -1
- package/esm2015/lib/scenario/scenario.controller.js +1 -1
- package/esm2015/lib/scenario/scenario.gql.js +1 -1
- package/esm2015/lib/scenario/scenario.private.gql.js +1 -1
- package/esm2015/lib/scenario/scenario.service.js +12 -10
- package/esm2015/lib/scenario/scenario.types.js +2 -1
- package/esm2015/lib/shared-contact-card/shared-contact-card.service.js +1 -1
- package/esm2015/lib/shared-contact-card/shared-contact-card2.gql.js +1 -1
- package/esm2015/lib/shared-contact-card/shared-contact-card2.service.js +1 -1
- package/esm2015/lib/slip39/slip39.service.js +5 -7
- package/esm2015/lib/time/time.service.js +1 -1
- package/esm2015/lib/tp-assembly/tp-assembly.js +1 -1
- package/esm2015/lib/tp-assembly/tp-assembly.private.gql.js +1 -1
- package/esm2015/lib/tp-assembly/tp-assembly.types.js +2 -1
- package/esm2015/lib/tp-password-reset/tp-password-reset-request.service.js +2 -2
- package/esm2015/lib/tp-password-reset/tp-password-reset-user.service.js +4 -3
- package/esm2015/lib/tp-password-reset/tp-password-reset.constants.js +1 -1
- package/esm2015/lib/tp-password-reset/tp-password-reset.controller.js +1 -1
- package/esm2015/lib/tp-password-reset/tp-password-reset.gql.js +1 -1
- package/esm2015/lib/tp-password-reset/tp-password-reset.private.gql.js +1 -1
- package/esm2015/lib/tp-password-reset/tp-password-reset.private.service.js +1 -1
- package/esm2015/lib/tp-password-reset/tp-password-reset.service.js +1 -1
- package/esm2015/lib/tp-password-reset/tp-password-reset.types.js +2 -1
- package/esm2015/lib/trusted-party/trusted-party.gql.js +1 -1
- package/esm2015/lib/trusted-party/trusted-party.service.js +3 -2
- package/esm2015/lib/trusted-party/trusted-party.types.js +1 -1
- package/esm2015/lib/trusted-party/trusted-party2.gql.js +1 -1
- package/esm2015/lib/trusted-party/trusted-party2.gql.private.js +1 -1
- package/esm2015/lib/trusted-party/trusted-party2.service.js +3 -3
- package/esm2015/lib/trusted-party/trusted-party2.types.js +2 -1
- package/esm2015/lib/two-factor/two-factor.service.js +1 -1
- package/esm2015/lib/user/user.gql.js +1 -1
- package/esm2015/lib/user/user.service.js +3 -2
- package/esm2015/lib/user/user.types.js +2 -1
- package/esm2015/lib/web-crypto/web-crypto.service.js +1 -1
- package/esm2015/lifeready-core.js +1 -1
- package/esm2015/public-api.js +3 -3
- package/fesm2015/lifeready-core.js +93 -84
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/_common/utils.d.ts +2 -2
- package/lib/api/lr-apollo.service.d.ts +1 -1
- package/lib/api/lr-graphql/lr-graphql.service.d.ts +25 -7
- package/lib/api/lr-graphql/lr-merged-mutation.d.ts +22 -4
- package/lib/api/lr-graphql/lr-mutation.d.ts +1 -2
- package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +1 -1
- package/lib/api/types/lr-graphql.types.d.ts +3 -3
- package/lib/auth/auth.types.d.ts +3 -3
- package/lib/auth/life-ready-auth.service.d.ts +2 -2
- package/lib/category/category.service.d.ts +2 -2
- package/lib/contact-card/contact-card2.service.d.ts +17 -2
- package/lib/encryption/encryption.service.d.ts +8 -7
- package/lib/file-upload/file-upload.service.d.ts +2 -1
- package/lib/idle/idle.service.d.ts +2 -2
- package/lib/{items2 → item2}/item2.gql.d.ts +16 -16
- package/lib/{items2 → item2}/item2.service.d.ts +24 -25
- package/lib/key/key-factory.service.d.ts +2 -1
- package/lib/key/key-graph.service.d.ts +1 -1
- package/lib/key/key.types.d.ts +5 -5
- package/lib/key-exchange/key-exchange2.service.d.ts +11 -11
- package/lib/life-ready.config.d.ts +1 -1
- package/lib/message/message.service.d.ts +8 -1
- package/lib/notification/notification.service.d.ts +3 -2
- package/lib/password/password.service.d.ts +1 -1
- package/lib/plan/plan.service.d.ts +3 -2
- package/lib/plan/plan.types.d.ts +2 -1
- package/lib/profile/profile-details.service.d.ts +1 -1
- package/lib/profile/profile.types.d.ts +2 -1
- package/lib/record/record.service.d.ts +2 -2
- package/lib/scenario/scenario.service.d.ts +103 -3
- package/lib/slip39/slip39.service.d.ts +0 -1
- package/lib/tp-assembly/tp-assembly.types.d.ts +2 -2
- package/lib/tp-password-reset/tp-password-reset-request.service.d.ts +1 -1
- package/lib/tp-password-reset/tp-password-reset.gql.d.ts +2 -2
- package/lib/tp-password-reset/tp-password-reset.types.d.ts +2 -2
- package/lib/trusted-party/trusted-party.service.d.ts +1 -1
- package/lib/trusted-party/trusted-party2.service.d.ts +1 -1
- package/lib/user/user.service.d.ts +1 -1
- package/lifeready-core.metadata.json +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +2 -2
- package/esm2015/lib/items2/item2.gql.js +0 -127
- package/esm2015/lib/items2/item2.gql.private.js +0 -23
- package/esm2015/lib/items2/item2.service.js +0 -516
- package/esm2015/lib/items2/item2.types.js +0 -1
- /package/lib/{items2 → item2}/item2.gql.private.d.ts +0 -0
- /package/lib/{items2 → item2}/item2.types.d.ts +0 -0
package/lib/_common/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function promiseAllMayAsync(values: any[]): Promise<any> | any;
|
|
2
|
-
export declare function mapValuesMayAsync(obj:
|
|
3
|
-
export declare function mapValuesAsync(obj:
|
|
2
|
+
export declare function mapValuesMayAsync(obj: Record<string, any>, callback: (value: any, key: string, obj: Record<string, any>) => any | Promise<any>): Promise<any> | any;
|
|
3
|
+
export declare function mapValuesAsync(obj: Record<string, any>, callback?: (value: any, key: string, obj: Record<string, any>) => any | Promise<any>): Promise<any>;
|
|
4
4
|
/**
|
|
5
5
|
* Returns the defaultValue when value is undefined
|
|
6
6
|
* @param value The value to check
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { MutationOptions, QueryOptions } from '@apollo/client/core';
|
|
1
2
|
import { Apollo } from 'apollo-angular';
|
|
2
|
-
import { QueryOptions, MutationOptions } from '@apollo/client/core';
|
|
3
3
|
import { KeyGraphService } from '../key/key-graph.service';
|
|
4
4
|
export declare class LrApolloService {
|
|
5
5
|
private apollo;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { QueryOptions, MutationOptions, OperationVariables, FetchPolicy } from '@apollo/client/core';
|
|
2
|
+
import { FetchPolicy, MutationOptions, OperationVariables, QueryOptions } from '@apollo/client/core';
|
|
4
3
|
import { MutationBaseOptions } from '@apollo/client/core/watchQueryOptions';
|
|
4
|
+
import { Apollo } from 'apollo-angular';
|
|
5
5
|
import { KeyGraphService } from '../../key/key-graph.service';
|
|
6
6
|
import { TypedDocumentNode } from '../../_common/ast';
|
|
7
7
|
import { ProcessorOptions, QueryProcessorService } from '../query-processor';
|
|
8
|
-
import { LrMutationBase } from './lr-mutation-base';
|
|
9
8
|
import { LrMergedMutation } from './lr-merged-mutation';
|
|
9
|
+
import { LrMutationBase } from './lr-mutation-base';
|
|
10
10
|
export interface LrQueryOptions<T, TVariables> extends QueryOptions<TVariables> {
|
|
11
11
|
query: TypedDocumentNode<T>;
|
|
12
12
|
includeKeyGraph?: boolean;
|
|
@@ -45,10 +45,28 @@ export declare class LrGraphQLService {
|
|
|
45
45
|
statsSnapshot(): LrGraphQLServiceStats;
|
|
46
46
|
private addKeys;
|
|
47
47
|
private isIncludeKeyGraph;
|
|
48
|
-
lrMutate<T1, TVariables1, T2, TVariables2>(lrMutations: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
lrMutate<T1, TVariables1, T2, TVariables2>(lrMutations: [
|
|
49
|
+
LrMutationMayAsync<T1, TVariables1>,
|
|
50
|
+
LrMutationMayAsync<T2, TVariables2>
|
|
51
|
+
], options?: LrMutationOptions): Promise<[T1, T2]>;
|
|
52
|
+
lrMutate<T1, TVariables1, T2, TVariables2, T3, TVariables3>(lrMutations: [
|
|
53
|
+
LrMutationMayAsync<T1, TVariables1>,
|
|
54
|
+
LrMutationMayAsync<T2, TVariables2>,
|
|
55
|
+
LrMutationMayAsync<T3, TVariables3>
|
|
56
|
+
], options?: LrMutationOptions): Promise<[T1, T2, T3]>;
|
|
57
|
+
lrMutate<T1, TVariables1, T2, TVariables2, T3, TVariables3, T4, TVariables4>(lrMutations: [
|
|
58
|
+
LrMutationMayAsync<T1, TVariables1>,
|
|
59
|
+
LrMutationMayAsync<T2, TVariables2>,
|
|
60
|
+
LrMutationMayAsync<T3, TVariables3>,
|
|
61
|
+
LrMutationMayAsync<T4, TVariables4>
|
|
62
|
+
], options?: LrMutationOptions): Promise<[T1, T2, T3, T4]>;
|
|
63
|
+
lrMutate<T1, TVariables1, T2, TVariables2, T3, TVariables3, T4, TVariables4, T5, TVariables5>(lrMutations: [
|
|
64
|
+
LrMutationMayAsync<T1, TVariables1>,
|
|
65
|
+
LrMutationMayAsync<T2, TVariables2>,
|
|
66
|
+
LrMutationMayAsync<T3, TVariables3>,
|
|
67
|
+
LrMutationMayAsync<T4, TVariables4>,
|
|
68
|
+
LrMutationMayAsync<T5, TVariables5>
|
|
69
|
+
], options?: LrMutationOptions): Promise<[T1, T2, T3, T4, T5]>;
|
|
52
70
|
lrMutate<T, TVariables = {
|
|
53
71
|
[key: string]: any;
|
|
54
72
|
}>(lrMutation: LrMutationMayAsync<T, TVariables>, options?: LrMutationOptions<T, TVariables>): Promise<T>;
|
|
@@ -4,10 +4,28 @@ export declare class LrMergedMutation<T> extends LrMutationBase<T> {
|
|
|
4
4
|
readonly descendants: Set<LrMutationBase<any>>;
|
|
5
5
|
protected prefixes: string[];
|
|
6
6
|
constructor(lrMutations: LrMutationBase<any>[]);
|
|
7
|
-
static create<T1, T2>(lrMutations: [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
static create<T1, T2>(lrMutations: [
|
|
8
|
+
LrMutationBase<T1> | LrMergedMutation<T1>,
|
|
9
|
+
LrMutationBase<T2> | LrMergedMutation<T2>
|
|
10
|
+
]): LrMergedMutation<[T1, T2]>;
|
|
11
|
+
static create<T1, T2, T3>(lrMutations: [
|
|
12
|
+
LrMutationBase<T1> | LrMergedMutation<T1>,
|
|
13
|
+
LrMutationBase<T2> | LrMergedMutation<T2>,
|
|
14
|
+
LrMutationBase<T3> | LrMergedMutation<T3>
|
|
15
|
+
]): LrMergedMutation<[T1, T2, T3]>;
|
|
16
|
+
static create<T1, T2, T3, T4>(lrMutations: [
|
|
17
|
+
LrMutationBase<T1> | LrMergedMutation<T1>,
|
|
18
|
+
LrMutationBase<T2> | LrMergedMutation<T2>,
|
|
19
|
+
LrMutationBase<T3> | LrMergedMutation<T3>,
|
|
20
|
+
LrMutationBase<T4> | LrMergedMutation<T4>
|
|
21
|
+
]): LrMergedMutation<[T1, T2, T3, T4]>;
|
|
22
|
+
static create<T1, T2, T3, T4, T5>(lrMutations: [
|
|
23
|
+
LrMutationBase<T1> | LrMergedMutation<T1>,
|
|
24
|
+
LrMutationBase<T2> | LrMergedMutation<T2>,
|
|
25
|
+
LrMutationBase<T3> | LrMergedMutation<T3>,
|
|
26
|
+
LrMutationBase<T4> | LrMergedMutation<T4>,
|
|
27
|
+
LrMutationBase<T5> | LrMergedMutation<T5>
|
|
28
|
+
]): LrMergedMutation<[T1, T2, T3, T4, T5]>;
|
|
11
29
|
static create<T>(lrMutations: LrMutationBase<T>[]): LrMergedMutation<T[]>;
|
|
12
30
|
static create(lrMutations: LrMutationBase<any>[]): LrMergedMutation<any[]>;
|
|
13
31
|
private getDescendants;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { OperationVariables } from '@apollo/client/core';
|
|
2
2
|
import { TypedDocumentNode } from '../../_common/ast';
|
|
3
|
-
import { LrMutationData } from './lr-mutation-base';
|
|
4
|
-
import { LrMutationBase } from './lr-mutation-base';
|
|
3
|
+
import { LrMutationBase, LrMutationData } from './lr-mutation-base';
|
|
5
4
|
export declare class LrMutation<T extends any, TVariables = OperationVariables> extends LrMutationBase<T, TVariables> {
|
|
6
5
|
constructor(options: LrMutationData<T, TVariables>);
|
|
7
6
|
select<TResult>(fragments: TypedDocumentNode<TResult>): LrMutation<TResult, TVariables>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { KeyGraphService } from '../../key/key-graph.service';
|
|
3
|
+
import { TpPasswordResetNode, TpPasswordResetUserNode } from '../types';
|
|
3
4
|
import { ProcessorCallbackParams } from './common-processors.service';
|
|
4
|
-
import { TpPasswordResetUserNode, TpPasswordResetNode } from '../types';
|
|
5
5
|
export declare class TpPasswordResetProcessorService {
|
|
6
6
|
private ngZone;
|
|
7
7
|
private keyGraph;
|
|
@@ -187,9 +187,9 @@ export interface ContactCardSharedCipherData {
|
|
|
187
187
|
export interface OtKeyCipherClearJson2 {
|
|
188
188
|
nonce: string;
|
|
189
189
|
initiator: {
|
|
190
|
-
oneTimePbk:
|
|
191
|
-
pbk:
|
|
192
|
-
sigPbk:
|
|
190
|
+
oneTimePbk: Record<string, JSONObject>;
|
|
191
|
+
pbk: Record<string, JSONObject>;
|
|
192
|
+
sigPbk: Record<string, JSONObject>;
|
|
193
193
|
message?: JSONObject;
|
|
194
194
|
contactCard?: ContactCardSharedCipherData;
|
|
195
195
|
};
|
package/lib/auth/auth.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CognitoUser } from '@aws-amplify/auth';
|
|
2
2
|
import { JWK } from 'node-jose';
|
|
3
|
-
import { TpPasswordResetUserNode, UserDeleteNode } from '../api/types';
|
|
3
|
+
import { JSONObject, TpPasswordResetUserNode, UserDeleteNode } from '../api/types';
|
|
4
4
|
import { PassIdpParams, PassKeyParams } from '../key/key.types';
|
|
5
5
|
import { UserPlan } from '../plan/plan.types';
|
|
6
6
|
import { CurrentUserKey, MainContactCard } from '../profile/profile.types';
|
|
@@ -10,12 +10,12 @@ export interface PassKeyBundle {
|
|
|
10
10
|
passIdpParams: PassIdpParams;
|
|
11
11
|
passIdp: JWK.Key;
|
|
12
12
|
passIdpVerifier: JWK.Key;
|
|
13
|
-
wrappedPassIdpVerifierPrk:
|
|
13
|
+
wrappedPassIdpVerifierPrk: Record<string, JSONObject>;
|
|
14
14
|
}
|
|
15
15
|
export declare class CognitoChallengeUser extends CognitoUser {
|
|
16
16
|
recoveryStatus: RecoveryStatus;
|
|
17
17
|
challengeName: 'SMS_MFA' | 'SOFTWARE_TOKEN_MFA';
|
|
18
|
-
challengeParam:
|
|
18
|
+
challengeParam: JSONObject;
|
|
19
19
|
isTpPasswordResetUser: boolean;
|
|
20
20
|
}
|
|
21
21
|
export declare enum FeatureAction {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
2
|
-
import {
|
|
2
|
+
import { ReplaySubject } from 'rxjs';
|
|
3
3
|
import { LrGraphQLService } from '../api/lr-graphql';
|
|
4
4
|
import { TpPasswordResetProcessorService } from '../api/query-processor/tp-password-reset-processor.service';
|
|
5
5
|
import { EncryptionService } from '../encryption/encryption.service';
|
|
@@ -51,7 +51,7 @@ export declare class LifeReadyAuthService {
|
|
|
51
51
|
getUser(reload?: boolean): Promise<CurrentUser>;
|
|
52
52
|
private mapTPVaultAccess;
|
|
53
53
|
private loadUser;
|
|
54
|
-
watchAuth():
|
|
54
|
+
watchAuth(): ReplaySubject<any>;
|
|
55
55
|
logout(): Promise<void>;
|
|
56
56
|
private getUserAttribute;
|
|
57
57
|
loadResetUser(password?: string): Promise<TpPasswordResetUser>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LrApolloService } from '../api/lr-apollo.service';
|
|
2
|
-
import { KeyMetaService } from '../key/key-meta.service';
|
|
3
|
-
import { Category, NewCategory, UpdatedCategory, VaultCategory, VaultRecord, Vault } from './category.types';
|
|
4
2
|
import { KeyGraphService } from '../key/key-graph.service';
|
|
3
|
+
import { KeyMetaService } from '../key/key-meta.service';
|
|
4
|
+
import { Category, NewCategory, UpdatedCategory, Vault, VaultCategory, VaultRecord } from './category.types';
|
|
5
5
|
export declare class CategoryService {
|
|
6
6
|
private lrApollo;
|
|
7
7
|
private keyMetaService;
|
|
@@ -35,10 +35,25 @@ export declare class ContactCard2Service {
|
|
|
35
35
|
private ngZone;
|
|
36
36
|
constructor(keyFactory: KeyFactoryService, keyService: KeyService, encryptionService: EncryptionService, keyGraph: KeyGraphService, keyMetaService: KeyMetaService, ngZone: NgZone);
|
|
37
37
|
createContactCard(input: CreateContactCardInput2): Promise<LrMutation<import("./contact-card2.gql").CreateContactCardMutationResult, {
|
|
38
|
-
input:
|
|
38
|
+
input: {
|
|
39
|
+
wrappingKeyId: string;
|
|
40
|
+
wrappedKey: string;
|
|
41
|
+
cipherData: string;
|
|
42
|
+
sigPxkId: string;
|
|
43
|
+
publicDataSig: string;
|
|
44
|
+
publicSearchableSig: string;
|
|
45
|
+
plainDataSig: string;
|
|
46
|
+
};
|
|
39
47
|
}>>;
|
|
40
48
|
updateContactCard(input: UpdateContactCardInput2): Promise<LrMutation<import("./contact-card2.gql").UpdateContactCardMutationResult, {
|
|
41
|
-
input:
|
|
49
|
+
input: {
|
|
50
|
+
id: string;
|
|
51
|
+
cipherData: string;
|
|
52
|
+
sigPxkId: string;
|
|
53
|
+
publicDataSig: string;
|
|
54
|
+
publicSearchableSig: string;
|
|
55
|
+
plainDataSig: string;
|
|
56
|
+
};
|
|
42
57
|
}>>;
|
|
43
58
|
deleteContactCard(id: string): LrMutation<import("./contact-card2.gql").DeleteContactCardMutationResult, {
|
|
44
59
|
input: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { JWE, JWK } from 'node-jose';
|
|
3
|
+
import { JSONObject } from '../api/types';
|
|
3
4
|
import { Key, PayloadType } from '../key/key.types';
|
|
4
5
|
import { TimeService } from '../time/time.service';
|
|
5
6
|
export declare enum JoseSerialization {
|
|
@@ -23,17 +24,17 @@ export declare class EncryptionService {
|
|
|
23
24
|
private timeService;
|
|
24
25
|
constructor(timeService: TimeService);
|
|
25
26
|
decrypt(key: JWK.Key | Key, // string is assumed to be key.id, will unwrap key.
|
|
26
|
-
jwe:
|
|
27
|
+
jwe: Record<string, JSONObject> | string, // string will be JSON.parsed
|
|
27
28
|
options?: DecryptOptions): Promise<JWE.DecryptResult | any>;
|
|
28
|
-
encryptToString(key: JWK.Key, content: ArrayBuffer | string |
|
|
29
|
-
encrypt(key: JWK.Key, content: ArrayBuffer | string |
|
|
30
|
-
sign(key: JWK.Key, content: Buffer | string |
|
|
31
|
-
signToString(key: JWK.Key, content: Buffer | string |
|
|
32
|
-
verify(key: JWK.Key, jws:
|
|
29
|
+
encryptToString(key: JWK.Key, content: ArrayBuffer | string | Record<string, JSONObject>): Promise<string>;
|
|
30
|
+
encrypt(key: JWK.Key, content: ArrayBuffer | string | Record<string, JSONObject>): Promise<any>;
|
|
31
|
+
sign(key: JWK.Key, content: Buffer | string | Record<string, JSONObject>): Promise<any>;
|
|
32
|
+
signToString(key: JWK.Key, content: Buffer | string | Record<string, JSONObject>): Promise<string>;
|
|
33
|
+
verify(key: JWK.Key, jws: Record<string, JSONObject>, options?: VerifyOptions): Promise<any>;
|
|
33
34
|
encryptThenSign({ key, sigPrk, }: {
|
|
34
35
|
key: JWK.Key;
|
|
35
36
|
sigPrk: JWK.Key;
|
|
36
|
-
}, content: ArrayBuffer | string |
|
|
37
|
+
}, content: ArrayBuffer | string | Record<string, JSONObject>): Promise<{
|
|
37
38
|
cipher: string;
|
|
38
39
|
sig: string;
|
|
39
40
|
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { JSONObject } from '../api/types';
|
|
2
3
|
import { LifeReadyAuthService } from '../auth/life-ready-auth.service';
|
|
3
4
|
import { LifeReadyConfig } from '../life-ready.config';
|
|
4
5
|
import { UploadEncryptedFileOptions } from './file-upload.types';
|
|
@@ -7,7 +8,7 @@ export declare class FileUploadService {
|
|
|
7
8
|
private http;
|
|
8
9
|
private lrAuth;
|
|
9
10
|
constructor(config: LifeReadyConfig, http: HttpClient, lrAuth: LifeReadyAuthService);
|
|
10
|
-
downloadEncryptedFile(fileStateNodeId: string): Promise<
|
|
11
|
+
downloadEncryptedFile(fileStateNodeId: string): Promise<JSONObject>;
|
|
11
12
|
downloadEncryptedFile2(fileStateNodeId: string): Promise<string>;
|
|
12
13
|
loadFile(file: File): Promise<ArrayBuffer>;
|
|
13
14
|
uploadEncryptedFile(options: UploadEncryptedFileOptions): Promise<string>;
|
|
@@ -7,8 +7,8 @@ import { Key } from '../key/key.types';
|
|
|
7
7
|
import { LifeReadyConfig } from '../life-ready.config';
|
|
8
8
|
import { KeepaliveResult } from './idle.types';
|
|
9
9
|
export interface IdleServiceInit {
|
|
10
|
-
onTimeout?: (() =>
|
|
11
|
-
onKeepalive?: (() =>
|
|
10
|
+
onTimeout?: (() => void) | (() => Promise<void>) | null;
|
|
11
|
+
onKeepalive?: (() => void) | (() => Promise<void>) | null;
|
|
12
12
|
idleSec?: number;
|
|
13
13
|
timeoutSec?: number;
|
|
14
14
|
keepAliveIntervalSec?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DateTime, ID } from '../api/types';
|
|
2
|
-
export interface
|
|
2
|
+
export interface CreateDirectoryMutationResult {
|
|
3
3
|
createDirectory: {
|
|
4
4
|
directory: {
|
|
5
5
|
id: ID;
|
|
@@ -7,8 +7,8 @@ export interface CreateDirectoryMutation {
|
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
export declare const CreateDirectoryMutation: import("../_common/ast").TypedDocumentNode<
|
|
11
|
-
export interface
|
|
10
|
+
export declare const CreateDirectoryMutation: import("../_common/ast").TypedDocumentNode<CreateDirectoryMutationResult>;
|
|
11
|
+
export interface UpdateDirectoryMutationResult {
|
|
12
12
|
updateDirectory: {
|
|
13
13
|
directory: {
|
|
14
14
|
id: ID;
|
|
@@ -16,29 +16,29 @@ export interface UpdateDirectoryMutation {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
export declare const UpdateDirectoryMutation: import("../_common/ast").TypedDocumentNode<
|
|
20
|
-
export interface
|
|
19
|
+
export declare const UpdateDirectoryMutation: import("../_common/ast").TypedDocumentNode<UpdateDirectoryMutationResult>;
|
|
20
|
+
export interface DeleteDirectoryMutationResult {
|
|
21
21
|
deleteDirectory: {
|
|
22
22
|
id: ID;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
export declare const DeleteDirectoryMutation: import("../_common/ast").TypedDocumentNode<
|
|
26
|
-
export interface
|
|
25
|
+
export declare const DeleteDirectoryMutation: import("../_common/ast").TypedDocumentNode<DeleteDirectoryMutationResult>;
|
|
26
|
+
export interface CreateFileMutationResult {
|
|
27
27
|
createFile: {
|
|
28
28
|
file: {
|
|
29
29
|
id: ID;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
export declare const CreateFileMutation: import("../_common/ast").TypedDocumentNode<
|
|
34
|
-
export interface
|
|
33
|
+
export declare const CreateFileMutation: import("../_common/ast").TypedDocumentNode<CreateFileMutationResult>;
|
|
34
|
+
export interface UpdateFileMutationResult {
|
|
35
35
|
updateFile: {
|
|
36
36
|
file: {
|
|
37
37
|
id: ID;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
export declare const UpdateFileMutation: import("../_common/ast").TypedDocumentNode<
|
|
41
|
+
export declare const UpdateFileMutation: import("../_common/ast").TypedDocumentNode<UpdateFileMutationResult>;
|
|
42
42
|
export interface RevertFileMutationResult {
|
|
43
43
|
revertFile: {
|
|
44
44
|
file: {
|
|
@@ -47,28 +47,28 @@ export interface RevertFileMutationResult {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
export declare const RevertFileMutation: import("../_common/ast").TypedDocumentNode<RevertFileMutationResult>;
|
|
50
|
-
export interface
|
|
50
|
+
export interface DeleteFileMutationResult {
|
|
51
51
|
deleteFile: {
|
|
52
52
|
id: ID;
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
export declare const DeleteFileMutation: import("../_common/ast").TypedDocumentNode<
|
|
56
|
-
export interface
|
|
55
|
+
export declare const DeleteFileMutation: import("../_common/ast").TypedDocumentNode<DeleteFileMutationResult>;
|
|
56
|
+
export interface ArchiveDirectoryMutationResult {
|
|
57
57
|
archiveDirectory: {
|
|
58
58
|
directory: {
|
|
59
59
|
id: ID;
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
export declare const ArchiveDirectoryMutation: import("../_common/ast").TypedDocumentNode<
|
|
64
|
-
export interface
|
|
63
|
+
export declare const ArchiveDirectoryMutation: import("../_common/ast").TypedDocumentNode<ArchiveDirectoryMutationResult>;
|
|
64
|
+
export interface UnarchiveDirectoryMutationResult {
|
|
65
65
|
unarchiveDirectory: {
|
|
66
66
|
directory: {
|
|
67
67
|
id: ID;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
export declare const UnarchiveDirectoryMutation: import("../_common/ast").TypedDocumentNode<
|
|
71
|
+
export declare const UnarchiveDirectoryMutation: import("../_common/ast").TypedDocumentNode<UnarchiveDirectoryMutationResult>;
|
|
72
72
|
export interface ChangeDirectoryParentsMutationResult {
|
|
73
73
|
unarchiveDirectory: {
|
|
74
74
|
directory: {
|
|
@@ -6,7 +6,6 @@ import { KeyFactoryService } from '../key/key-factory.service';
|
|
|
6
6
|
import { KeyGraphService } from '../key/key-graph.service';
|
|
7
7
|
import { KeyService } from '../key/key.service';
|
|
8
8
|
import { LockService } from '../lock/lock.service';
|
|
9
|
-
import { ArchiveDirectoryMutation, CreateDirectoryMutation, CreateFileMutation, DeleteDirectoryMutation, DeleteFileMutation, UnarchiveDirectoryMutation, UpdateDirectoryMutation, UpdateFileMutation } from './item2.gql';
|
|
10
9
|
import { BeginDeleteChildItemLinksWindowOptions, ChangeDirectoryParentsOptions, ChangeFileParentsOptions, CreateDirectoryOptions, CreateDirectoryTreeOptions, CreateFileOptions, DownloadFileContentOptions, FileParentDirectoryInput, ParentDirectoryInput, ParentRootDirectoryInput, RevertFileOptions, UpdateDirectoryOptions, UpdateFileOptions } from './item2.types';
|
|
11
10
|
export declare class Item2Service extends LrService {
|
|
12
11
|
private ngZone;
|
|
@@ -26,8 +25,8 @@ export declare class Item2Service extends LrService {
|
|
|
26
25
|
getFileKeyId(fileId: LrRelayIdInput): Promise<string>;
|
|
27
26
|
getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
28
27
|
getFileKey(fileId: LrRelayIdInput, fileKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
29
|
-
createDirectoryExec(options: CreateDirectoryOptions): Promise<
|
|
30
|
-
createDirectory(options: CreateDirectoryOptions): Promise<LrMutation<
|
|
28
|
+
createDirectoryExec(options: CreateDirectoryOptions): Promise<import("./item2.gql").CreateDirectoryMutationResult>;
|
|
29
|
+
createDirectory(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
|
|
31
30
|
input: {
|
|
32
31
|
parentDirectories: ParentDirectoryInput[];
|
|
33
32
|
parentRootDirectory: ParentRootDirectoryInput;
|
|
@@ -35,7 +34,7 @@ export declare class Item2Service extends LrService {
|
|
|
35
34
|
cipherMeta: string;
|
|
36
35
|
};
|
|
37
36
|
}>>;
|
|
38
|
-
createDirectoryMutation(options: CreateDirectoryOptions): Promise<LrMutation<
|
|
37
|
+
createDirectoryMutation(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
|
|
39
38
|
input: {
|
|
40
39
|
parentDirectories: ParentDirectoryInput[];
|
|
41
40
|
parentRootDirectory: ParentRootDirectoryInput;
|
|
@@ -43,34 +42,34 @@ export declare class Item2Service extends LrService {
|
|
|
43
42
|
cipherMeta: string;
|
|
44
43
|
};
|
|
45
44
|
}>>;
|
|
46
|
-
updateDirectoryExec(options: UpdateDirectoryOptions): Promise<
|
|
47
|
-
updateDirectory(options: UpdateDirectoryOptions): Promise<LrMutation<
|
|
45
|
+
updateDirectoryExec(options: UpdateDirectoryOptions): Promise<import("./item2.gql").UpdateDirectoryMutationResult>;
|
|
46
|
+
updateDirectory(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
|
|
48
47
|
input: {
|
|
49
48
|
directoryId: string;
|
|
50
49
|
plainMeta: string;
|
|
51
50
|
cipherMeta: string;
|
|
52
51
|
};
|
|
53
52
|
}>>;
|
|
54
|
-
updateDirectoryMutation(options: UpdateDirectoryOptions): Promise<LrMutation<
|
|
53
|
+
updateDirectoryMutation(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
|
|
55
54
|
input: {
|
|
56
55
|
directoryId: string;
|
|
57
56
|
plainMeta: string;
|
|
58
57
|
cipherMeta: string;
|
|
59
58
|
};
|
|
60
59
|
}>>;
|
|
61
|
-
deleteDirectoryExec(id: ID): Promise<
|
|
62
|
-
deleteDirectory(id: ID): LrMutation<
|
|
60
|
+
deleteDirectoryExec(id: ID): Promise<import("./item2.gql").DeleteDirectoryMutationResult>;
|
|
61
|
+
deleteDirectory(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
|
|
63
62
|
input: {
|
|
64
63
|
directoryId: string;
|
|
65
64
|
};
|
|
66
65
|
}>;
|
|
67
|
-
deleteDirectoryMutation(id: ID): LrMutation<
|
|
66
|
+
deleteDirectoryMutation(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
|
|
68
67
|
input: {
|
|
69
68
|
directoryId: string;
|
|
70
69
|
};
|
|
71
70
|
}>;
|
|
72
|
-
createFileExec(options: CreateFileOptions): Promise<
|
|
73
|
-
createFile(options: CreateFileOptions): Promise<LrMutation<
|
|
71
|
+
createFileExec(options: CreateFileOptions): Promise<import("./item2.gql").CreateFileMutationResult>;
|
|
72
|
+
createFile(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
|
|
74
73
|
input: {
|
|
75
74
|
parentDirectories: FileParentDirectoryInput[];
|
|
76
75
|
wrappedStateKey: string;
|
|
@@ -79,7 +78,7 @@ export declare class Item2Service extends LrService {
|
|
|
79
78
|
cipherMeta: string;
|
|
80
79
|
};
|
|
81
80
|
}>>;
|
|
82
|
-
createFileMutation(options: CreateFileOptions): Promise<LrMutation<
|
|
81
|
+
createFileMutation(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
|
|
83
82
|
input: {
|
|
84
83
|
parentDirectories: FileParentDirectoryInput[];
|
|
85
84
|
wrappedStateKey: string;
|
|
@@ -88,8 +87,8 @@ export declare class Item2Service extends LrService {
|
|
|
88
87
|
cipherMeta: string;
|
|
89
88
|
};
|
|
90
89
|
}>>;
|
|
91
|
-
updateFileExec(options: UpdateFileOptions): Promise<
|
|
92
|
-
updateFile(options: UpdateFileOptions): Promise<LrMutation<
|
|
90
|
+
updateFileExec(options: UpdateFileOptions): Promise<import("./item2.gql").UpdateFileMutationResult>;
|
|
91
|
+
updateFile(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
|
|
93
92
|
input: {
|
|
94
93
|
fileId: string;
|
|
95
94
|
wrappedStateKey: string;
|
|
@@ -98,7 +97,7 @@ export declare class Item2Service extends LrService {
|
|
|
98
97
|
cipherMeta: string;
|
|
99
98
|
};
|
|
100
99
|
}>>;
|
|
101
|
-
updateFileMutation(options: UpdateFileOptions): Promise<LrMutation<
|
|
100
|
+
updateFileMutation(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
|
|
102
101
|
input: {
|
|
103
102
|
fileId: string;
|
|
104
103
|
wrappedStateKey: string;
|
|
@@ -114,38 +113,38 @@ export declare class Item2Service extends LrService {
|
|
|
114
113
|
revertFileMutation(options: RevertFileOptions): Promise<LrMutation<import("./item2.gql").RevertFileMutationResult, {
|
|
115
114
|
input: RevertFileOptions;
|
|
116
115
|
}>>;
|
|
117
|
-
deleteFileExec(id: ID): Promise<
|
|
118
|
-
deleteFile(id: ID): LrMutation<
|
|
116
|
+
deleteFileExec(id: ID): Promise<import("./item2.gql").DeleteFileMutationResult>;
|
|
117
|
+
deleteFile(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
|
|
119
118
|
input: {
|
|
120
119
|
fileId: string;
|
|
121
120
|
};
|
|
122
121
|
}>;
|
|
123
|
-
deleteFileMutation(id: ID): LrMutation<
|
|
122
|
+
deleteFileMutation(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
|
|
124
123
|
input: {
|
|
125
124
|
fileId: string;
|
|
126
125
|
};
|
|
127
126
|
}>;
|
|
128
|
-
archiveDirectoryExec(directoryId: string, recursive: boolean): Promise<
|
|
129
|
-
archiveDirectory(directoryId: string, recursive: boolean): LrMutation<
|
|
127
|
+
archiveDirectoryExec(directoryId: string, recursive: boolean): Promise<import("./item2.gql").ArchiveDirectoryMutationResult>;
|
|
128
|
+
archiveDirectory(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
|
|
130
129
|
input: {
|
|
131
130
|
directoryId: string;
|
|
132
131
|
recursive: boolean;
|
|
133
132
|
};
|
|
134
133
|
}>;
|
|
135
|
-
archiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<
|
|
134
|
+
archiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
|
|
136
135
|
input: {
|
|
137
136
|
directoryId: string;
|
|
138
137
|
recursive: boolean;
|
|
139
138
|
};
|
|
140
139
|
}>;
|
|
141
|
-
unarchiveDirectoryExec(directoryId: string, recursive: boolean): Promise<
|
|
142
|
-
unarchiveDirectory(directoryId: string, recursive: boolean): LrMutation<
|
|
140
|
+
unarchiveDirectoryExec(directoryId: string, recursive: boolean): Promise<import("./item2.gql").UnarchiveDirectoryMutationResult>;
|
|
141
|
+
unarchiveDirectory(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
|
|
143
142
|
input: {
|
|
144
143
|
directoryId: string;
|
|
145
144
|
recursive: boolean;
|
|
146
145
|
};
|
|
147
146
|
}>;
|
|
148
|
-
unarchiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<
|
|
147
|
+
unarchiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
|
|
149
148
|
input: {
|
|
150
149
|
directoryId: string;
|
|
151
150
|
recursive: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { JWK } from 'node-jose';
|
|
3
|
+
import { JSONObject } from '../api/types';
|
|
3
4
|
import { WebCryptoService } from '../web-crypto/web-crypto.service';
|
|
4
5
|
import { DeriveKeyResult, DeriveLbopKeyParams, DerivePassIdpParams, DerivePassKeyParams, LbopKeyParams, PassIdpParams, PassKeyParams } from './key.types';
|
|
5
6
|
export declare function sha256(message: any): Promise<string>;
|
|
@@ -13,7 +14,7 @@ export declare class KeyFactoryService {
|
|
|
13
14
|
readonly DEFAULT_PASS_IDP_PBKDF_ITER = 100000;
|
|
14
15
|
readonly DEFAULT_PASS_KEY_PBKDF_ITER = 100000;
|
|
15
16
|
readonly DEFAULT_LBOP_KEY_PBKDF_ITER = 100000;
|
|
16
|
-
static asKey(key: string | Buffer |
|
|
17
|
+
static asKey(key: string | Buffer | Record<string, JSONObject> | JWK.RawKey, form?: 'json' | 'private' | 'pkcs8' | 'public' | 'spki' | 'pkix' | 'x509' | 'pem', extras?: Record<string, unknown>): Promise<JWK.Key>;
|
|
17
18
|
randomString(digits: number): string;
|
|
18
19
|
randomDigitsNoZeros(digits: number): string;
|
|
19
20
|
randomChoices<T>(array: T[], chooseN: number): T[];
|
|
@@ -32,7 +32,7 @@ export declare class KeyGraphService {
|
|
|
32
32
|
decryptFromString<T>(keyOrId: string | Key, cipherData: string, options?: DecryptOptions): Promise<T>;
|
|
33
33
|
decryptFile(keyId: string, file: any): Promise<any>;
|
|
34
34
|
encryptToString(key: string | Key | JWK.Key, content: any): Promise<string>;
|
|
35
|
-
wrapKey
|
|
35
|
+
wrapKey(wrappingKey: string | Key | JWK.Key, key: JWK.Key): Promise<string>;
|
|
36
36
|
encryptWithNewKey(wrappingKeyId: string, cipherClearJson: JSONObject): Promise<{
|
|
37
37
|
key: JWK.Key;
|
|
38
38
|
wrappingKeyId: string;
|
package/lib/key/key.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JWK } from 'node-jose';
|
|
2
|
-
import { PassKeyNode } from '../api/types';
|
|
2
|
+
import { JSONObject, PassKeyNode } from '../api/types';
|
|
3
3
|
import { SomeRequired } from '../_common/types';
|
|
4
4
|
export interface Key {
|
|
5
5
|
id: string;
|
|
@@ -21,12 +21,12 @@ export interface LbopKeyParams {
|
|
|
21
21
|
iterations: number;
|
|
22
22
|
}
|
|
23
23
|
export interface PassIdpVerifier {
|
|
24
|
-
wrappedPrK:
|
|
25
|
-
pbk:
|
|
24
|
+
wrappedPrK: Record<string, JSONObject>;
|
|
25
|
+
pbk: Record<string, JSONObject>;
|
|
26
26
|
}
|
|
27
27
|
export interface LbopKeyVerifier {
|
|
28
|
-
wrappedKey:
|
|
29
|
-
key:
|
|
28
|
+
wrappedKey: Record<string, JSONObject>;
|
|
29
|
+
key: Record<string, JSONObject>;
|
|
30
30
|
}
|
|
31
31
|
export declare type PassKey = SomeRequired<PassKeyNode, 'id'>;
|
|
32
32
|
export interface KeyLink {
|
|
@@ -34,7 +34,7 @@ export interface ContactCardOwnerCipherData {
|
|
|
34
34
|
export declare type SendContactCardInput = ContactCardOwnerPlainData & ContactCardOwnerCipherData & ContactCardSharedCipherData;
|
|
35
35
|
export interface InitiateOtkInput2 {
|
|
36
36
|
email?: string;
|
|
37
|
-
message?:
|
|
37
|
+
message?: JSONObject;
|
|
38
38
|
contactCard?: SendContactCardInput;
|
|
39
39
|
upgrade?: boolean;
|
|
40
40
|
}
|
|
@@ -42,7 +42,7 @@ export interface RespondOtkInput2 {
|
|
|
42
42
|
keyExchangeId: string;
|
|
43
43
|
token: string;
|
|
44
44
|
decryptedOtk: DecryptedOtk2;
|
|
45
|
-
message?:
|
|
45
|
+
message?: JSONObject;
|
|
46
46
|
initiatorContactCard?: ContactCardReceiverCipherData;
|
|
47
47
|
responderContactCard?: SendContactCardInput;
|
|
48
48
|
}
|
|
@@ -55,24 +55,24 @@ export interface CompleteOtkInput2 {
|
|
|
55
55
|
}
|
|
56
56
|
export interface InitiatorRootKeyCipherClearJson2 {
|
|
57
57
|
nonce: string;
|
|
58
|
-
oneTimePrk:
|
|
59
|
-
otKey:
|
|
58
|
+
oneTimePrk: Record<string, JSONObject>;
|
|
59
|
+
otKey: Record<string, JSONObject>;
|
|
60
60
|
initiatorContactCard?: ContactCardOwnerCipherData & ContactCardSharedCipherData;
|
|
61
61
|
initiator: {
|
|
62
|
-
message?:
|
|
62
|
+
message?: JSONObject;
|
|
63
63
|
contactCard?: ContactCardSharedCipherData;
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
export interface InitiatorOneTimePbkCipherClearJson {
|
|
67
67
|
nonce: string;
|
|
68
|
-
sharedKey:
|
|
69
|
-
mkSharedKey:
|
|
68
|
+
sharedKey: Record<string, JSONObject>;
|
|
69
|
+
mkSharedKey: Record<string, JSONObject>;
|
|
70
70
|
responder: {
|
|
71
|
-
pbk:
|
|
72
|
-
sigPbk:
|
|
73
|
-
message?:
|
|
71
|
+
pbk: Record<string, JSONObject>;
|
|
72
|
+
sigPbk: Record<string, JSONObject>;
|
|
73
|
+
message?: JSONObject;
|
|
74
74
|
contactCard?: ContactCardSharedCipherData & {
|
|
75
|
-
sharedCipherKey:
|
|
75
|
+
sharedCipherKey: Record<string, JSONObject>;
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
78
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
3
2
|
import { ApolloClientOptions } from '@apollo/client/core';
|
|
3
|
+
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
4
4
|
export declare const LR_CONFIG: InjectionToken<LifeReadyConfig>;
|
|
5
5
|
export interface LifeReadyConfig {
|
|
6
6
|
authUrl: string;
|