@lifeready/core 1.0.1 → 1.0.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/README.md +62 -62
- package/bundles/lifeready-core.umd.js +15939 -0
- package/bundles/lifeready-core.umd.js.map +1 -0
- package/bundles/lifeready-core.umd.min.js +16 -0
- package/bundles/lifeready-core.umd.min.js.map +1 -0
- package/esm2015/lib/_common/ast.js +40 -0
- package/esm2015/lib/_common/deferred-promise.js +24 -0
- package/esm2015/lib/_common/exceptions.js +157 -0
- package/esm2015/lib/_common/queries.gql.js +190 -0
- package/esm2015/lib/_common/run-outside-angular.js +79 -0
- package/esm2015/lib/_common/types.js +1 -0
- package/esm2015/lib/_common/utils.js +44 -0
- package/esm2015/lib/api/contact-card.gql.js +79 -0
- package/esm2015/lib/api/contact-card.service.js +154 -0
- package/esm2015/lib/api/contact-card2.gql.js +60 -0
- package/esm2015/lib/api/contact-card2.service.js +103 -0
- package/esm2015/lib/api/file.service.js +74 -0
- package/esm2015/lib/api/item2.gql.js +110 -0
- package/esm2015/lib/api/item2.service.js +311 -0
- package/esm2015/lib/api/key-exchange.gql.js +188 -0
- package/esm2015/lib/api/key-exchange.service.js +442 -0
- package/esm2015/lib/api/key-exchange.types.js +18 -0
- package/esm2015/lib/api/key-exchange2.gql.js +171 -0
- package/esm2015/lib/api/key-exchange2.service.js +479 -0
- package/esm2015/lib/api/lock.gql.js +40 -0
- package/esm2015/lib/api/lock.service.js +64 -0
- package/esm2015/lib/api/lr-apollo.service.js +46 -0
- package/esm2015/lib/api/lr-graphql/index.js +6 -0
- package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +155 -0
- package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +213 -0
- package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +51 -0
- package/esm2015/lib/api/lr-graphql/lr-mutation.js +48 -0
- package/esm2015/lib/api/lr-graphql/lr.service.js +18 -0
- package/esm2015/lib/api/message.service.js +138 -0
- package/esm2015/lib/api/persist.service.js +181 -0
- package/esm2015/lib/api/query-processor/common-processors.service.js +93 -0
- package/esm2015/lib/api/query-processor/index.js +3 -0
- package/esm2015/lib/api/query-processor/query-processor.service.js +192 -0
- package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +109 -0
- package/esm2015/lib/api/shared-contact-card.service.js +119 -0
- package/esm2015/lib/api/shared-contact-card2.gql.js +41 -0
- package/esm2015/lib/api/shared-contact-card2.service.js +117 -0
- package/esm2015/lib/api/time.service.js +146 -0
- package/esm2015/lib/api/types/graphql.types.js +7 -0
- package/esm2015/lib/api/types/index.js +3 -0
- package/esm2015/lib/api/types/lr-graphql.types.js +71 -0
- package/esm2015/lib/auth/auth.config.js +57 -0
- package/esm2015/lib/auth/auth.gql.js +48 -0
- package/esm2015/lib/auth/auth.types.js +27 -0
- package/esm2015/lib/auth/idle.service.js +168 -0
- package/esm2015/lib/auth/idle.types.js +7 -0
- package/esm2015/lib/auth/lbop.service.js +355 -0
- package/esm2015/lib/auth/life-ready-auth.service.js +500 -0
- package/esm2015/lib/auth/password.service.js +320 -0
- package/esm2015/lib/auth/register.service.js +172 -0
- package/esm2015/lib/auth/two-factor.service.js +74 -0
- package/esm2015/lib/category/category-meta.service.js +99 -0
- package/esm2015/lib/category/category.gql.js +406 -0
- package/esm2015/lib/category/category.service.js +390 -0
- package/esm2015/lib/category/category.types.js +29 -0
- package/esm2015/lib/cryptography/cryptography.types.js +11 -0
- package/esm2015/lib/cryptography/encryption.service.js +189 -0
- package/esm2015/lib/cryptography/key-factory.service.js +237 -0
- package/esm2015/lib/cryptography/key-graph.service.js +280 -0
- package/esm2015/lib/cryptography/key-meta.service.js +200 -0
- package/esm2015/lib/cryptography/key.service.js +124 -0
- package/esm2015/lib/cryptography/slip39.service.js +169 -0
- package/esm2015/lib/cryptography/web-crypto.service.js +29 -0
- package/esm2015/lib/life-ready.config.js +84 -0
- package/esm2015/lib/life-ready.module.js +74 -0
- package/esm2015/lib/plan/plan.gql.js +123 -0
- package/esm2015/lib/plan/plan.service.js +149 -0
- package/esm2015/lib/plan/plan.types.js +11 -0
- package/esm2015/lib/record/record-attachment.service.js +101 -0
- package/esm2015/lib/record/record.gql.js +179 -0
- package/esm2015/lib/record/record.service.js +206 -0
- package/esm2015/lib/record/record.types.js +15 -0
- package/esm2015/lib/record-type/record-type.service.js +75 -0
- package/esm2015/lib/record-type/record-type.types.js +28 -0
- package/esm2015/lib/scenario/approvals/scenario-approval.gql.js +105 -0
- package/esm2015/lib/scenario/approvals/scenario-approval.types.js +1 -0
- package/esm2015/lib/scenario/approvals/scenario-approver.service.js +300 -0
- package/esm2015/lib/scenario/claimants/scenario-claimant.gql.js +52 -0
- package/esm2015/lib/scenario/claimants/scenario-claimant.service.js +97 -0
- package/esm2015/lib/scenario/claimants/scenario-claimant.types.js +1 -0
- package/esm2015/lib/scenario/receivers/scenario-receiver.gql.js +150 -0
- package/esm2015/lib/scenario/receivers/scenario-receiver.service.js +229 -0
- package/esm2015/lib/scenario/receivers/scenario-receiver.types.js +1 -0
- package/esm2015/lib/scenario/scenario-setup.service.js +269 -0
- package/esm2015/lib/scenario/scenario.gql.js +368 -0
- package/esm2015/lib/scenario/scenario.service.js +611 -0
- package/esm2015/lib/scenario/scenario.types.js +64 -0
- package/esm2015/lib/search/search.gql.js +62 -0
- package/esm2015/lib/search/search.service.js +156 -0
- package/esm2015/lib/search/search.types.js +6 -0
- package/esm2015/lib/trusted-parties/tp-password-reset-request.service.js +112 -0
- package/esm2015/lib/trusted-parties/tp-password-reset-user.service.js +129 -0
- package/esm2015/lib/trusted-parties/tp-password-reset.constants.js +4 -0
- package/esm2015/lib/trusted-parties/tp-password-reset.gql.js +232 -0
- package/esm2015/lib/trusted-parties/tp-password-reset.service.js +299 -0
- package/esm2015/lib/trusted-parties/trusted-party.gql.js +148 -0
- package/esm2015/lib/trusted-parties/trusted-party.service.js +326 -0
- package/esm2015/lib/trusted-parties/trusted-party.types.js +41 -0
- package/esm2015/lib/trusted-parties/trusted-party2.gql.js +87 -0
- package/esm2015/lib/trusted-parties/trusted-party2.service.js +215 -0
- package/esm2015/lib/users/profile-details.service.js +214 -0
- package/esm2015/lib/users/profile.gql.js +97 -0
- package/esm2015/lib/users/profile.service.js +169 -0
- package/esm2015/lib/users/profile.types.js +34 -0
- package/esm2015/lib/users/user.gql.js +60 -0
- package/esm2015/lib/users/user.service.js +79 -0
- package/esm2015/lib/users/user.types.js +5 -0
- package/esm2015/lifeready-core.js +10 -0
- package/esm2015/public-api.js +81 -0
- package/fesm2015/lifeready-core.js +13314 -0
- package/fesm2015/lifeready-core.js.map +1 -0
- package/lib/_common/ast.d.ts +11 -0
- package/lib/_common/deferred-promise.d.ts +12 -0
- package/lib/_common/exceptions.d.ts +109 -0
- package/lib/_common/queries.gql.d.ts +10 -0
- package/lib/_common/run-outside-angular.d.ts +14 -0
- package/{src/lib/_common/types.ts → lib/_common/types.d.ts} +10 -13
- package/lib/_common/utils.d.ts +3 -0
- package/lib/api/contact-card.gql.d.ts +7 -0
- package/lib/api/contact-card.service.d.ts +52 -0
- package/lib/api/contact-card2.gql.d.ts +34 -0
- package/lib/api/contact-card2.service.d.ts +49 -0
- package/lib/api/file.service.d.ts +18 -0
- package/lib/api/item2.gql.d.ts +96 -0
- package/lib/api/item2.service.d.ts +177 -0
- package/lib/api/key-exchange.gql.d.ts +9 -0
- package/lib/api/key-exchange.service.d.ts +39 -0
- package/lib/api/key-exchange.types.d.ts +196 -0
- package/lib/api/key-exchange2.gql.d.ts +125 -0
- package/lib/api/key-exchange2.service.d.ts +187 -0
- package/lib/api/lock.gql.d.ts +27 -0
- package/lib/api/lock.service.d.ts +25 -0
- package/lib/api/lr-apollo.service.d.ts +15 -0
- package/{src/lib/api/lr-graphql/index.ts → lib/api/lr-graphql/index.d.ts} +5 -5
- package/lib/api/lr-graphql/lr-graphql.service.d.ts +60 -0
- package/lib/api/lr-graphql/lr-merged-mutation.d.ts +27 -0
- package/lib/api/lr-graphql/lr-mutation-base.d.ts +28 -0
- package/lib/api/lr-graphql/lr-mutation.d.ts +8 -0
- package/lib/api/lr-graphql/lr.service.d.ts +9 -0
- package/lib/api/message.service.d.ts +58 -0
- package/lib/api/persist.service.d.ts +31 -0
- package/lib/api/query-processor/common-processors.service.d.ts +36 -0
- package/{src/lib/api/query-processor/index.ts → lib/api/query-processor/index.d.ts} +2 -2
- package/lib/api/query-processor/query-processor.service.d.ts +18 -0
- package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +15 -0
- package/lib/api/shared-contact-card.service.d.ts +33 -0
- package/lib/api/shared-contact-card2.gql.d.ts +36 -0
- package/lib/api/shared-contact-card2.service.d.ts +45 -0
- package/lib/api/time.service.d.ts +16 -0
- package/lib/api/types/graphql.types.d.ts +29 -0
- package/{src/lib/api/types/index.ts → lib/api/types/index.d.ts} +2 -2
- package/lib/api/types/lr-graphql.types.d.ts +385 -0
- package/lib/auth/auth.config.d.ts +5 -0
- package/lib/auth/auth.gql.d.ts +15 -0
- package/lib/auth/auth.types.d.ts +66 -0
- package/lib/auth/idle.service.d.ts +40 -0
- package/lib/auth/idle.types.d.ts +10 -0
- package/lib/auth/lbop.service.d.ts +91 -0
- package/lib/auth/life-ready-auth.service.d.ts +59 -0
- package/lib/auth/password.service.d.ts +78 -0
- package/lib/auth/register.service.d.ts +25 -0
- package/lib/auth/two-factor.service.d.ts +15 -0
- package/lib/category/category-meta.service.d.ts +23 -0
- package/lib/category/category.gql.d.ts +45 -0
- package/lib/category/category.service.d.ts +67 -0
- package/lib/category/category.types.d.ts +79 -0
- package/lib/cryptography/cryptography.types.d.ts +83 -0
- package/lib/cryptography/encryption.service.d.ts +41 -0
- package/lib/cryptography/key-factory.service.d.ts +38 -0
- package/lib/cryptography/key-graph.service.d.ts +33 -0
- package/lib/cryptography/key-meta.service.d.ts +44 -0
- package/lib/cryptography/key.service.d.ts +36 -0
- package/lib/cryptography/slip39.service.d.ts +43 -0
- package/lib/cryptography/web-crypto.service.d.ts +5 -0
- package/lib/life-ready.config.d.ts +14 -0
- package/lib/life-ready.module.d.ts +5 -0
- package/lib/plan/plan.gql.d.ts +11 -0
- package/lib/plan/plan.service.d.ts +33 -0
- package/lib/plan/plan.types.d.ts +31 -0
- package/lib/record/record-attachment.service.d.ts +16 -0
- package/lib/record/record.gql.d.ts +14 -0
- package/lib/record/record.service.d.ts +25 -0
- package/lib/record/record.types.d.ts +57 -0
- package/lib/record-type/record-type.service.d.ts +11 -0
- package/lib/record-type/record-type.types.d.ts +50 -0
- package/lib/scenario/approvals/scenario-approval.gql.d.ts +7 -0
- package/lib/scenario/approvals/scenario-approval.types.d.ts +63 -0
- package/lib/scenario/approvals/scenario-approver.service.d.ts +32 -0
- package/lib/scenario/claimants/scenario-claimant.gql.d.ts +5 -0
- package/lib/scenario/claimants/scenario-claimant.service.d.ts +17 -0
- package/lib/scenario/claimants/scenario-claimant.types.d.ts +18 -0
- package/lib/scenario/receivers/scenario-receiver.gql.d.ts +8 -0
- package/lib/scenario/receivers/scenario-receiver.service.d.ts +30 -0
- package/lib/scenario/receivers/scenario-receiver.types.d.ts +54 -0
- package/lib/scenario/scenario-setup.service.d.ts +22 -0
- package/lib/scenario/scenario.gql.d.ts +34 -0
- package/lib/scenario/scenario.service.d.ts +58 -0
- package/lib/scenario/scenario.types.d.ts +217 -0
- package/lib/search/search.gql.d.ts +1 -0
- package/lib/search/search.service.d.ts +25 -0
- package/lib/search/search.types.d.ts +20 -0
- package/lib/trusted-parties/tp-password-reset-request.service.d.ts +20 -0
- package/lib/trusted-parties/tp-password-reset-user.service.d.ts +35 -0
- package/lib/trusted-parties/tp-password-reset.constants.d.ts +3 -0
- package/lib/trusted-parties/tp-password-reset.gql.d.ts +218 -0
- package/lib/trusted-parties/tp-password-reset.service.d.ts +130 -0
- package/lib/trusted-parties/trusted-party.gql.d.ts +9 -0
- package/lib/trusted-parties/trusted-party.service.d.ts +44 -0
- package/lib/trusted-parties/trusted-party.types.d.ts +102 -0
- package/lib/trusted-parties/trusted-party2.gql.d.ts +79 -0
- package/lib/trusted-parties/trusted-party2.service.d.ts +114 -0
- package/lib/users/profile-details.service.d.ts +21 -0
- package/lib/users/profile.gql.d.ts +11 -0
- package/lib/users/profile.service.d.ts +35 -0
- package/lib/users/profile.types.d.ts +96 -0
- package/lib/users/user.gql.d.ts +9 -0
- package/lib/users/user.service.d.ts +12 -0
- package/lib/users/user.types.d.ts +23 -0
- package/lifeready-core.d.ts +9 -0
- package/lifeready-core.metadata.json +1 -0
- package/package.json +29 -21
- package/{src/public-api.ts → public-api.d.ts} +77 -96
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -26
- package/src/lib/_common/ast.ts +0 -75
- package/src/lib/_common/deferred-promise.ts +0 -35
- package/src/lib/_common/exceptions.ts +0 -189
- package/src/lib/_common/queries.gql.ts +0 -200
- package/src/lib/_common/run-outside-angular.ts +0 -125
- package/src/lib/_common/tests.ts +0 -82
- package/src/lib/_common/utils.ts +0 -57
- package/src/lib/api/api-mutation.spec.ts +0 -547
- package/src/lib/api/api-query.spec.ts +0 -40
- package/src/lib/api/contact-card.gql.ts +0 -85
- package/src/lib/api/contact-card.service.spec.ts +0 -249
- package/src/lib/api/contact-card.service.ts +0 -228
- package/src/lib/api/contact-card2.gql.ts +0 -93
- package/src/lib/api/contact-card2.service.spec.ts +0 -297
- package/src/lib/api/contact-card2.service.ts +0 -139
- package/src/lib/api/file.service.spec.ts +0 -14
- package/src/lib/api/file.service.ts +0 -81
- package/src/lib/api/item2.gql.ts +0 -211
- package/src/lib/api/item2.service.spec.ts +0 -1043
- package/src/lib/api/item2.service.ts +0 -481
- package/src/lib/api/key-exchange.gql.ts +0 -196
- package/src/lib/api/key-exchange.service.spec.ts +0 -470
- package/src/lib/api/key-exchange.service.ts +0 -731
- package/src/lib/api/key-exchange.types.ts +0 -235
- package/src/lib/api/key-exchange2.gql.ts +0 -310
- package/src/lib/api/key-exchange2.service.spec.ts +0 -892
- package/src/lib/api/key-exchange2.service.ts +0 -875
- package/src/lib/api/lock.gql.ts +0 -67
- package/src/lib/api/lock.service.spec.ts +0 -549
- package/src/lib/api/lock.service.ts +0 -57
- package/src/lib/api/lr-apollo.service.spec.ts +0 -27
- package/src/lib/api/lr-apollo.service.ts +0 -43
- package/src/lib/api/lr-graphql/lr-graphql.service.ts +0 -313
- package/src/lib/api/lr-graphql/lr-merged-mutation.ts +0 -377
- package/src/lib/api/lr-graphql/lr-mutation-base.ts +0 -67
- package/src/lib/api/lr-graphql/lr-mutation.ts +0 -74
- package/src/lib/api/lr-graphql/lr.service.ts +0 -28
- package/src/lib/api/message.service.spec.ts +0 -20
- package/src/lib/api/message.service.ts +0 -210
- package/src/lib/api/persist.service.spec.ts +0 -209
- package/src/lib/api/persist.service.ts +0 -220
- package/src/lib/api/query-processor/common-processors.service.ts +0 -148
- package/src/lib/api/query-processor/query-processor.service.ts +0 -240
- package/src/lib/api/query-processor/tp-password-reset-processor.service.ts +0 -177
- package/src/lib/api/shared-contact-card.service.ts +0 -156
- package/src/lib/api/shared-contact-card2.gql.ts +0 -76
- package/src/lib/api/shared-contact-card2.service.ts +0 -154
- package/src/lib/api/time.service.spec.ts +0 -48
- package/src/lib/api/time.service.ts +0 -155
- package/src/lib/api/types/graphql.types.ts +0 -48
- package/src/lib/api/types/lr-graphql.types.ts +0 -467
- package/src/lib/auth/auth.config.ts +0 -83
- package/src/lib/auth/auth.gql.ts +0 -62
- package/src/lib/auth/auth.types.ts +0 -79
- package/src/lib/auth/idle.service.spec.ts +0 -119
- package/src/lib/auth/idle.service.ts +0 -208
- package/src/lib/auth/idle.types.ts +0 -11
- package/src/lib/auth/lbop.service.spec.ts +0 -56
- package/src/lib/auth/lbop.service.ts +0 -539
- package/src/lib/auth/life-ready-auth.service.spec.ts +0 -70
- package/src/lib/auth/life-ready-auth.service.ts +0 -454
- package/src/lib/auth/password.service.spec.ts +0 -51
- package/src/lib/auth/password.service.ts +0 -438
- package/src/lib/auth/register.service.spec.ts +0 -31
- package/src/lib/auth/register.service.ts +0 -181
- package/src/lib/auth/two-factor.service.spec.ts +0 -21
- package/src/lib/auth/two-factor.service.ts +0 -69
- package/src/lib/category/category-meta.service.spec.ts +0 -28
- package/src/lib/category/category-meta.service.ts +0 -125
- package/src/lib/category/category.gql.ts +0 -449
- package/src/lib/category/category.service.spec.ts +0 -26
- package/src/lib/category/category.service.ts +0 -498
- package/src/lib/category/category.types.ts +0 -89
- package/src/lib/cryptography/cryptography.types.ts +0 -108
- package/src/lib/cryptography/encryption.service.spec.ts +0 -125
- package/src/lib/cryptography/encryption.service.ts +0 -243
- package/src/lib/cryptography/key-factory.service.spec.ts +0 -15
- package/src/lib/cryptography/key-factory.service.ts +0 -303
- package/src/lib/cryptography/key-graph.service.spec.ts +0 -16
- package/src/lib/cryptography/key-graph.service.ts +0 -354
- package/src/lib/cryptography/key-meta.service.spec.ts +0 -40
- package/src/lib/cryptography/key-meta.service.ts +0 -254
- package/src/lib/cryptography/key.service.spec.ts +0 -16
- package/src/lib/cryptography/key.service.ts +0 -154
- package/src/lib/cryptography/slip39.service.spec.ts +0 -44
- package/src/lib/cryptography/slip39.service.ts +0 -204
- package/src/lib/cryptography/web-crypto.service.ts +0 -22
- package/src/lib/life-ready.config.ts +0 -127
- package/src/lib/life-ready.module.ts +0 -81
- package/src/lib/plan/plan.gql.ts +0 -133
- package/src/lib/plan/plan.service.spec.ts +0 -294
- package/src/lib/plan/plan.service.ts +0 -198
- package/src/lib/plan/plan.types.ts +0 -37
- package/src/lib/record/record-attachment.service.spec.ts +0 -31
- package/src/lib/record/record-attachment.service.ts +0 -101
- package/src/lib/record/record.gql.ts +0 -192
- package/src/lib/record/record.service.spec.ts +0 -598
- package/src/lib/record/record.service.ts +0 -236
- package/src/lib/record/record.types.ts +0 -86
- package/src/lib/record-type/record-type.service.spec.ts +0 -16
- package/src/lib/record-type/record-type.service.ts +0 -71
- package/src/lib/record-type/record-type.types.ts +0 -58
- package/src/lib/scenario/approvals/scenario-approval.gql.ts +0 -112
- package/src/lib/scenario/approvals/scenario-approval.types.ts +0 -85
- package/src/lib/scenario/approvals/scenario-approver.service.spec.ts +0 -16
- package/src/lib/scenario/approvals/scenario-approver.service.ts +0 -422
- package/src/lib/scenario/claimants/scenario-claimant.gql.ts +0 -56
- package/src/lib/scenario/claimants/scenario-claimant.service.spec.ts +0 -16
- package/src/lib/scenario/claimants/scenario-claimant.service.ts +0 -100
- package/src/lib/scenario/claimants/scenario-claimant.types.ts +0 -21
- package/src/lib/scenario/receivers/scenario-receiver.gql.ts +0 -157
- package/src/lib/scenario/receivers/scenario-receiver.service.spec.ts +0 -16
- package/src/lib/scenario/receivers/scenario-receiver.service.ts +0 -278
- package/src/lib/scenario/receivers/scenario-receiver.types.ts +0 -66
- package/src/lib/scenario/scenario-setup.service.spec.ts +0 -22
- package/src/lib/scenario/scenario-setup.service.ts +0 -369
- package/src/lib/scenario/scenario.gql.ts +0 -404
- package/src/lib/scenario/scenario.service.spec.ts +0 -1586
- package/src/lib/scenario/scenario.service.ts +0 -811
- package/src/lib/scenario/scenario.types.ts +0 -258
- package/src/lib/search/search.gql.ts +0 -62
- package/src/lib/search/search.service.spec.ts +0 -57
- package/src/lib/search/search.service.ts +0 -174
- package/src/lib/search/search.types.ts +0 -24
- package/src/lib/trusted-parties/tp-password-reset-request.service.ts +0 -140
- package/src/lib/trusted-parties/tp-password-reset-user.service.ts +0 -359
- package/src/lib/trusted-parties/tp-password-reset.gql.ts +0 -453
- package/src/lib/trusted-parties/tp-password-reset.service.spec.ts +0 -602
- package/src/lib/trusted-parties/tp-password-reset.service.ts +0 -482
- package/src/lib/trusted-parties/trusted-party.gql.ts +0 -159
- package/src/lib/trusted-parties/trusted-party.service.spec.ts +0 -1008
- package/src/lib/trusted-parties/trusted-party.service.ts +0 -394
- package/src/lib/trusted-parties/trusted-party.types.ts +0 -119
- package/src/lib/trusted-parties/trusted-party2.gql.ts +0 -165
- package/src/lib/trusted-parties/trusted-party2.service.spec.ts +0 -1782
- package/src/lib/trusted-parties/trusted-party2.service.ts +0 -272
- package/src/lib/users/profile-details.service.spec.ts +0 -45
- package/src/lib/users/profile-details.service.ts +0 -278
- package/src/lib/users/profile.gql.ts +0 -108
- package/src/lib/users/profile.service.spec.ts +0 -97
- package/src/lib/users/profile.service.ts +0 -224
- package/src/lib/users/profile.types.ts +0 -101
- package/src/lib/users/user.gql.ts +0 -69
- package/src/lib/users/user.service.spec.ts +0 -161
- package/src/lib/users/user.service.ts +0 -72
- package/src/lib/users/user.types.ts +0 -27
- package/src/test.ts +0 -21
- package/tsconfig.lib.json +0 -21
- package/tsconfig.lib.prod.json +0 -6
- package/tsconfig.spec.json +0 -10
- package/tslint.json +0 -17
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { JWK } from 'node-jose';
|
|
4
|
-
import { materialize } from 'rxjs/operators';
|
|
5
|
-
import { KeyExchangeService } from '../api/key-exchange.service';
|
|
6
|
-
import {
|
|
7
|
-
DecryptedKeyExchange,
|
|
8
|
-
RespondOtkInput,
|
|
9
|
-
} from '../api/key-exchange.types';
|
|
10
|
-
import { LrApolloService } from '../api/lr-apollo.service';
|
|
11
|
-
import { SharedContactCardService } from '../api/shared-contact-card.service';
|
|
12
|
-
import { LifeReadyAuthService } from '../auth/life-ready-auth.service';
|
|
13
|
-
import { AccessLevel } from '../category/category.types';
|
|
14
|
-
import { EncryptionService } from '../cryptography/encryption.service';
|
|
15
|
-
import { KeyGraphService } from '../cryptography/key-graph.service';
|
|
16
|
-
import { KeyService } from '../cryptography/key.service';
|
|
17
|
-
import { UserService } from '../users/user.service';
|
|
18
|
-
import { ContactCardName } from '../users/profile.types';
|
|
19
|
-
import {
|
|
20
|
-
CancelTrustedPartyInvitationMutation,
|
|
21
|
-
DeclineTrustedPartyInvitationMutation,
|
|
22
|
-
DeleteTrustedPartyMutation,
|
|
23
|
-
GetAllTrustedPartiesQuery,
|
|
24
|
-
GetTrustedPartiesQuery,
|
|
25
|
-
GetTrustedPartyQuery,
|
|
26
|
-
ShareCategoryMutation,
|
|
27
|
-
UnshareCategoryMutation,
|
|
28
|
-
} from './trusted-party.gql';
|
|
29
|
-
import {
|
|
30
|
-
AcceptTrustedPartyInvite,
|
|
31
|
-
ConfirmTrustedPartyInvite,
|
|
32
|
-
FoundTrustedParty,
|
|
33
|
-
InviteTrustedParty,
|
|
34
|
-
TrustedParties,
|
|
35
|
-
TrustedParty,
|
|
36
|
-
TrustedPartyInvite,
|
|
37
|
-
TrustedPartyInviteStatus,
|
|
38
|
-
TrustedPartyRole,
|
|
39
|
-
TrustedPartyType,
|
|
40
|
-
TrustedPartyRoleType,
|
|
41
|
-
} from './trusted-party.types';
|
|
42
|
-
import { KeyFactoryService } from '../cryptography/key-factory.service';
|
|
43
|
-
|
|
44
|
-
@Injectable({
|
|
45
|
-
providedIn: 'root',
|
|
46
|
-
})
|
|
47
|
-
export class TrustedPartyService {
|
|
48
|
-
private trustedPartyRoles: TrustedPartyRole[];
|
|
49
|
-
|
|
50
|
-
constructor(
|
|
51
|
-
private http: HttpClient,
|
|
52
|
-
private lrApollo: LrApolloService,
|
|
53
|
-
private sharedContactCardService: SharedContactCardService,
|
|
54
|
-
private userService: UserService,
|
|
55
|
-
private authService: LifeReadyAuthService,
|
|
56
|
-
private keyExchangeService: KeyExchangeService,
|
|
57
|
-
private keyGraphService: KeyGraphService,
|
|
58
|
-
private keyService: KeyService,
|
|
59
|
-
private keyFactory: KeyFactoryService,
|
|
60
|
-
private encryptionService: EncryptionService
|
|
61
|
-
) {}
|
|
62
|
-
|
|
63
|
-
public async getTrustedParties(): Promise<TrustedParty[]> {
|
|
64
|
-
const { tps } = await this.lrApollo.query<any>({
|
|
65
|
-
query: GetTrustedPartiesQuery,
|
|
66
|
-
});
|
|
67
|
-
return await Promise.all(
|
|
68
|
-
tps.edges.map((x) => this.mapTrustedParty(x.node))
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public async getAllTrustedParties(): Promise<TrustedParties> {
|
|
73
|
-
const user = await this.authService.getUser();
|
|
74
|
-
const { tps, invites, sentInvites } = await this.lrApollo.query<any>({
|
|
75
|
-
query: GetAllTrustedPartiesQuery,
|
|
76
|
-
variables: {
|
|
77
|
-
userId: user.id,
|
|
78
|
-
isExpired: false,
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
parties: (
|
|
84
|
-
await Promise.all<TrustedParty>(
|
|
85
|
-
tps.edges.map((x) => this.mapTrustedParty(x.node))
|
|
86
|
-
)
|
|
87
|
-
).filter((x) => x),
|
|
88
|
-
invites: (
|
|
89
|
-
await Promise.all<TrustedPartyInvite>(
|
|
90
|
-
invites.edges.map(async (x) =>
|
|
91
|
-
this.mapInvite(
|
|
92
|
-
await this.keyExchangeService.decryptKeyExchange(x.node)
|
|
93
|
-
)
|
|
94
|
-
)
|
|
95
|
-
)
|
|
96
|
-
)
|
|
97
|
-
.filter((x) => x.status !== TrustedPartyInviteStatus.Completed)
|
|
98
|
-
.filter(
|
|
99
|
-
(x) =>
|
|
100
|
-
x.status !== TrustedPartyInviteStatus.Invited || x.actionRequired
|
|
101
|
-
),
|
|
102
|
-
sentInvites: (
|
|
103
|
-
await Promise.all<TrustedPartyInvite>(
|
|
104
|
-
sentInvites.edges.map(async (x) =>
|
|
105
|
-
this.mapInvite(
|
|
106
|
-
await this.keyExchangeService.decryptKeyExchange(x.node)
|
|
107
|
-
)
|
|
108
|
-
)
|
|
109
|
-
)
|
|
110
|
-
).filter((x) => x.status !== TrustedPartyInviteStatus.Completed),
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
public async getTrustedParty(partyId: string): Promise<TrustedParty> {
|
|
115
|
-
const { tp } = await this.lrApollo.query<any>({
|
|
116
|
-
query: GetTrustedPartyQuery,
|
|
117
|
-
variables: { partyId },
|
|
118
|
-
});
|
|
119
|
-
return await this.mapTrustedParty(tp);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
public async getTrustedPartyRoles(
|
|
123
|
-
roleType: TrustedPartyRoleType = TrustedPartyRoleType.General
|
|
124
|
-
): Promise<TrustedPartyRole[]> {
|
|
125
|
-
if (!this.trustedPartyRoles) {
|
|
126
|
-
this.trustedPartyRoles = await this.http
|
|
127
|
-
.get<TrustedPartyRole[]>('/assets/meta/trusted-party-roles.json')
|
|
128
|
-
.toPromise();
|
|
129
|
-
}
|
|
130
|
-
return Promise.resolve(
|
|
131
|
-
this.trustedPartyRoles.filter((x) => x.roleType === roleType)
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
public async findByEmail(email: string): Promise<FoundTrustedParty> {
|
|
136
|
-
try {
|
|
137
|
-
const user = await this.userService.getUserByEmail(email);
|
|
138
|
-
|
|
139
|
-
return user
|
|
140
|
-
? {
|
|
141
|
-
id: user.id,
|
|
142
|
-
email,
|
|
143
|
-
username: user.username,
|
|
144
|
-
isTrustedParty: user.haveTp,
|
|
145
|
-
isMe: user.isCurrentUser,
|
|
146
|
-
}
|
|
147
|
-
: null;
|
|
148
|
-
} catch (e) {
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
public async inviteTrustedParty(invite: InviteTrustedParty): Promise<void> {
|
|
154
|
-
const params = {
|
|
155
|
-
responderUsername: invite.party.username,
|
|
156
|
-
email: invite.party.email,
|
|
157
|
-
message: {
|
|
158
|
-
name: invite.party.name,
|
|
159
|
-
email: invite.party.email,
|
|
160
|
-
message: invite.party.message,
|
|
161
|
-
permissions: invite.permissions,
|
|
162
|
-
},
|
|
163
|
-
contactCard: {
|
|
164
|
-
plainOwnerCipherDataJson: null,
|
|
165
|
-
plainSharedCipherDataJson: invite.mySharedDetails,
|
|
166
|
-
ownerPlainData: {
|
|
167
|
-
name: new ContactCardName(invite.mySharedDetails.name),
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
await this.keyExchangeService.initiateOtk(params);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
public async cancelInvitation(inviteId: string): Promise<void> {
|
|
175
|
-
await this.lrApollo.mutate({
|
|
176
|
-
mutation: CancelTrustedPartyInvitationMutation,
|
|
177
|
-
variables: {
|
|
178
|
-
input: {
|
|
179
|
-
id: inviteId,
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
public async getInvitation(
|
|
186
|
-
inviteId: string,
|
|
187
|
-
inviteToken: string,
|
|
188
|
-
key: string
|
|
189
|
-
): Promise<TrustedPartyInvite> {
|
|
190
|
-
const exchange = await this.keyExchangeService.getKeyExchange(inviteId, {
|
|
191
|
-
token: inviteToken,
|
|
192
|
-
otKeyK: key,
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
return this.mapInvite(exchange);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
public async acceptInvitation(
|
|
199
|
-
invite: AcceptTrustedPartyInvite
|
|
200
|
-
): Promise<string> {
|
|
201
|
-
const params: RespondOtkInput = {
|
|
202
|
-
id: invite.inviteId,
|
|
203
|
-
token: invite.inviteToken,
|
|
204
|
-
decryptedOtk: invite.decryptedOtk,
|
|
205
|
-
initiatorContactCard: null,
|
|
206
|
-
responderContactCard: {
|
|
207
|
-
plainOwnerCipherDataJson: null,
|
|
208
|
-
plainSharedCipherDataJson: invite.mySharedDetails,
|
|
209
|
-
ownerPlainData: {
|
|
210
|
-
name: new ContactCardName(invite.mySharedDetails.name),
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
const { tp } = await this.keyExchangeService.respondOtk(params);
|
|
216
|
-
|
|
217
|
-
return tp.id;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
public async declineInvitation(
|
|
221
|
-
inviteId: string,
|
|
222
|
-
inviteToken: string
|
|
223
|
-
): Promise<void> {
|
|
224
|
-
await this.lrApollo.mutate({
|
|
225
|
-
mutation: DeclineTrustedPartyInvitationMutation,
|
|
226
|
-
variables: {
|
|
227
|
-
input: {
|
|
228
|
-
id: inviteId,
|
|
229
|
-
token: inviteToken,
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
public async confirmInvitation(
|
|
236
|
-
confirm: ConfirmTrustedPartyInvite
|
|
237
|
-
): Promise<string> {
|
|
238
|
-
const { tp } = await this.keyExchangeService.completeOtk(
|
|
239
|
-
confirm.inviteId,
|
|
240
|
-
confirm.initiatorRootKeyCipher,
|
|
241
|
-
confirm.initiatorOneTimePbkCipher,
|
|
242
|
-
null
|
|
243
|
-
);
|
|
244
|
-
return tp.id;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
public async removeTrustedParty(partyId: string): Promise<void> {
|
|
248
|
-
await this.lrApollo.mutate({
|
|
249
|
-
mutation: DeleteTrustedPartyMutation,
|
|
250
|
-
variables: {
|
|
251
|
-
input: {
|
|
252
|
-
id: partyId,
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
public setCategoryAccessLevel(
|
|
259
|
-
categoryId: string,
|
|
260
|
-
keyId: string,
|
|
261
|
-
trustedParty: TrustedParty,
|
|
262
|
-
accessLevel?: AccessLevel
|
|
263
|
-
): Promise<void> {
|
|
264
|
-
return accessLevel
|
|
265
|
-
? this.shareDirectory(categoryId, keyId, trustedParty, accessLevel)
|
|
266
|
-
: this.unshareDirectory(categoryId, trustedParty.id);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
public setRecordAccessLevel(
|
|
270
|
-
recordId: string,
|
|
271
|
-
keyId: string,
|
|
272
|
-
trustedParty: TrustedParty,
|
|
273
|
-
accessLevel: AccessLevel
|
|
274
|
-
): Promise<void> {
|
|
275
|
-
return accessLevel
|
|
276
|
-
? this.shareDirectory(recordId, keyId, trustedParty, accessLevel)
|
|
277
|
-
: this.unshareDirectory(recordId, trustedParty.id);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
private async shareDirectory(
|
|
281
|
-
directoryId: string,
|
|
282
|
-
keyId: string,
|
|
283
|
-
trustedParty: TrustedParty,
|
|
284
|
-
accessLevel: AccessLevel
|
|
285
|
-
): Promise<void> {
|
|
286
|
-
const key = await this.keyGraphService.getKey(keyId);
|
|
287
|
-
const wrappingKey = await this.keyGraphService.getKey(
|
|
288
|
-
trustedParty.userSharedKey.sharedKey.id
|
|
289
|
-
);
|
|
290
|
-
const wrappedKey = await this.encryptionService.encrypt(
|
|
291
|
-
wrappingKey.jwk,
|
|
292
|
-
key.jwk.toJSON(true)
|
|
293
|
-
);
|
|
294
|
-
|
|
295
|
-
await this.lrApollo.mutate({
|
|
296
|
-
mutation: ShareCategoryMutation,
|
|
297
|
-
variables: {
|
|
298
|
-
input: {
|
|
299
|
-
id: directoryId,
|
|
300
|
-
tpId: trustedParty.id,
|
|
301
|
-
accessRole: accessLevel,
|
|
302
|
-
keyId: key.id,
|
|
303
|
-
wrappingKeyId: wrappingKey.id,
|
|
304
|
-
wrappedKey: JSON.stringify(wrappedKey),
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
private async unshareDirectory(
|
|
311
|
-
directoryId: string,
|
|
312
|
-
trustedPartyId: string
|
|
313
|
-
): Promise<void> {
|
|
314
|
-
await this.lrApollo.mutate({
|
|
315
|
-
mutation: UnshareCategoryMutation,
|
|
316
|
-
variables: {
|
|
317
|
-
input: {
|
|
318
|
-
id: directoryId,
|
|
319
|
-
tpId: trustedPartyId,
|
|
320
|
-
},
|
|
321
|
-
},
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
public async mapTrustedParty(tp: any): Promise<TrustedParty> {
|
|
326
|
-
try {
|
|
327
|
-
const contactCard =
|
|
328
|
-
tp.sharedContactCard &&
|
|
329
|
-
(await this.sharedContactCardService.decryptTrustedPartyDetails(
|
|
330
|
-
tp.sharedContactCard
|
|
331
|
-
));
|
|
332
|
-
const myContactCard =
|
|
333
|
-
tp.myContactCard &&
|
|
334
|
-
(await this.sharedContactCardService.decryptSharedTrustedPartyDetails(
|
|
335
|
-
tp.myContactCard
|
|
336
|
-
));
|
|
337
|
-
|
|
338
|
-
return {
|
|
339
|
-
id: tp.id,
|
|
340
|
-
type: TrustedPartyType.User, // TODO: when partners
|
|
341
|
-
hasScenarios: !!tp.sharedScenarios.edges.length,
|
|
342
|
-
hasSharedVault: !!tp.sharedItems.directories.edges.length,
|
|
343
|
-
name: contactCard && contactCard.name && contactCard.name.name,
|
|
344
|
-
details: contactCard,
|
|
345
|
-
mySharedDetails: myContactCard,
|
|
346
|
-
userSharedKey: tp.currentUserSharedKey.userSharedKey,
|
|
347
|
-
username: tp.other.username,
|
|
348
|
-
features: {
|
|
349
|
-
sharedVault: {
|
|
350
|
-
hasAccess:
|
|
351
|
-
(tp.other.features?.shareVault || ['noaccess'])[0] === 'access',
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
};
|
|
355
|
-
} catch (e) {
|
|
356
|
-
console.error('Failed to decrypt Trusted Party.', e, tp);
|
|
357
|
-
return null;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
private async mapInvite(
|
|
362
|
-
exchange: DecryptedKeyExchange
|
|
363
|
-
): Promise<TrustedPartyInvite> {
|
|
364
|
-
const contactCard = exchange.contactCard;
|
|
365
|
-
const name = exchange.isInitiator
|
|
366
|
-
? exchange.myMessage?.name
|
|
367
|
-
: contactCard && contactCard.name && contactCard.name.name;
|
|
368
|
-
const email = exchange.isInitiator
|
|
369
|
-
? exchange.myMessage?.email
|
|
370
|
-
: (contactCard && contactCard.email) || exchange.responderEmailAddress;
|
|
371
|
-
|
|
372
|
-
return {
|
|
373
|
-
id: exchange.id,
|
|
374
|
-
type: TrustedPartyType.User, // todo when partners
|
|
375
|
-
status: (exchange.state as unknown) as TrustedPartyInviteStatus,
|
|
376
|
-
token: exchange.token,
|
|
377
|
-
tokenExpiry: exchange.tokenExpiryTime,
|
|
378
|
-
decryptedOtk: exchange.decryptedOtk,
|
|
379
|
-
name,
|
|
380
|
-
email,
|
|
381
|
-
isSender: exchange.isInitiator,
|
|
382
|
-
actionRequired: exchange.isInitiator
|
|
383
|
-
? exchange.initiatorActionRequired
|
|
384
|
-
: exchange.responderActionRequired,
|
|
385
|
-
rootKeyCipher: exchange.initiatorRootKeyCipher,
|
|
386
|
-
pbkCipher: exchange.otk.initiatorOneTimePbkCipher,
|
|
387
|
-
isExpired: exchange.isExpired,
|
|
388
|
-
details: contactCard,
|
|
389
|
-
message: exchange.message,
|
|
390
|
-
mySharedDetails: exchange.myContactCard,
|
|
391
|
-
mySharedMessage: exchange.myMessage,
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DecryptedOtk,
|
|
3
|
-
PreparedPermissions,
|
|
4
|
-
UserSharedKey,
|
|
5
|
-
} from '../api/key-exchange.types';
|
|
6
|
-
import { KeyExchangeMessage } from './../api/key-exchange.types';
|
|
7
|
-
import { AccessLevel } from './../category/category.types';
|
|
8
|
-
import { TrustedPartyDetails } from './../users/profile.types';
|
|
9
|
-
import { FeatureAction } from '../auth/auth.types';
|
|
10
|
-
|
|
11
|
-
export class TrustedPartyRole {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
roleType: TrustedPartyRoleType;
|
|
15
|
-
categories: {
|
|
16
|
-
category: string[];
|
|
17
|
-
accessLevel: AccessLevel;
|
|
18
|
-
}[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export enum TrustedPartyRoleType {
|
|
22
|
-
General = 'general',
|
|
23
|
-
Scenario = 'scenario',
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export enum TrustedPartyType {
|
|
27
|
-
User = 'user',
|
|
28
|
-
Organisation = 'organisation',
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export enum TrustedPartyInviteStatus {
|
|
32
|
-
Invited = 'IN_PROGRESS',
|
|
33
|
-
Cancelled = 'CANCELLED',
|
|
34
|
-
Declined = 'DECLINED',
|
|
35
|
-
Completed = 'COMPLETED',
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class TrustedParties {
|
|
39
|
-
parties: TrustedParty[];
|
|
40
|
-
invites: TrustedPartyInvite[];
|
|
41
|
-
sentInvites: TrustedPartyInvite[];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export class SharedTrustedPartyDetails extends TrustedPartyDetails {
|
|
45
|
-
id: string;
|
|
46
|
-
ownedKeyId: string;
|
|
47
|
-
sharedKeyId: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export class TrustedPartyInvite {
|
|
51
|
-
id: string;
|
|
52
|
-
type: TrustedPartyType;
|
|
53
|
-
status: TrustedPartyInviteStatus;
|
|
54
|
-
token: string;
|
|
55
|
-
tokenExpiry: string | Date;
|
|
56
|
-
isExpired: boolean;
|
|
57
|
-
isSender: boolean;
|
|
58
|
-
actionRequired: boolean;
|
|
59
|
-
name: string;
|
|
60
|
-
email: string;
|
|
61
|
-
|
|
62
|
-
details?: TrustedPartyDetails;
|
|
63
|
-
message?: KeyExchangeMessage;
|
|
64
|
-
mySharedDetails?: TrustedPartyDetails;
|
|
65
|
-
mySharedMessage?: KeyExchangeMessage;
|
|
66
|
-
|
|
67
|
-
rootKeyCipher: string;
|
|
68
|
-
pbkCipher: string;
|
|
69
|
-
decryptedOtk: DecryptedOtk;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export class TPFeatures {
|
|
73
|
-
sharedVault: SharedVaultFeature;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export class SharedVaultFeature {
|
|
77
|
-
hasAccess: boolean;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export class TrustedParty {
|
|
81
|
-
id: string;
|
|
82
|
-
type: TrustedPartyType;
|
|
83
|
-
name: string;
|
|
84
|
-
|
|
85
|
-
hasScenarios: boolean;
|
|
86
|
-
hasSharedVault: boolean;
|
|
87
|
-
details: TrustedPartyDetails;
|
|
88
|
-
mySharedDetails: SharedTrustedPartyDetails;
|
|
89
|
-
userSharedKey: UserSharedKey;
|
|
90
|
-
username: string;
|
|
91
|
-
features: TPFeatures;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export class FoundTrustedParty {
|
|
95
|
-
id: string;
|
|
96
|
-
email: string;
|
|
97
|
-
username: string;
|
|
98
|
-
isTrustedParty: boolean;
|
|
99
|
-
isMe: boolean;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export class InviteTrustedParty {
|
|
103
|
-
party: { username?: string; email?: string; name?: string; message?: string };
|
|
104
|
-
permissions?: PreparedPermissions;
|
|
105
|
-
mySharedDetails: TrustedPartyDetails;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export class AcceptTrustedPartyInvite {
|
|
109
|
-
inviteId: string;
|
|
110
|
-
inviteToken: string;
|
|
111
|
-
decryptedOtk: DecryptedOtk;
|
|
112
|
-
mySharedDetails: TrustedPartyDetails;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export class ConfirmTrustedPartyInvite {
|
|
116
|
-
inviteId: string;
|
|
117
|
-
initiatorRootKeyCipher: string;
|
|
118
|
-
initiatorOneTimePbkCipher: string;
|
|
119
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { gqlTyped } from '../_common/ast';
|
|
2
|
-
import { ID } from '../api/types';
|
|
3
|
-
|
|
4
|
-
export interface DeleteTpMutation {
|
|
5
|
-
deleteTp: {
|
|
6
|
-
id: ID;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export const DeleteTpMutation = gqlTyped<DeleteTpMutation>`
|
|
10
|
-
mutation DeleteTpMutation($input: DeleteTpInput!) {
|
|
11
|
-
deleteTp(input: $input) {
|
|
12
|
-
id
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
export interface ShareDirectoryMutation {
|
|
18
|
-
shareDirectory: {
|
|
19
|
-
tpDirectory: {
|
|
20
|
-
id: ID;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export const ShareDirectoryMutation = gqlTyped<ShareDirectoryMutation>`
|
|
25
|
-
mutation ShareDirectoryMutation($input: ShareDirectoryInput!) {
|
|
26
|
-
shareDirectory(input: $input) {
|
|
27
|
-
tpDirectory {
|
|
28
|
-
id
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
export interface UnshareDirectoryMutation {
|
|
35
|
-
unshareDirectory: {
|
|
36
|
-
tpDirectory: {
|
|
37
|
-
id: ID;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export const UnshareDirectoryMutation = gqlTyped<UnshareDirectoryMutation>`
|
|
42
|
-
mutation UnshareDirectoryMutation($input: UnshareDirectoryInput!) {
|
|
43
|
-
unshareDirectory(input: $input) {
|
|
44
|
-
tpDirectory {
|
|
45
|
-
id
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
export interface ShareFileMutation {
|
|
52
|
-
shareFile: {
|
|
53
|
-
tpFile: {
|
|
54
|
-
id: ID;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export const ShareFileMutation = gqlTyped<ShareFileMutation>`
|
|
59
|
-
mutation ShareFileMutation($input: ShareFileInput!) {
|
|
60
|
-
shareFile(input: $input) {
|
|
61
|
-
tpFile {
|
|
62
|
-
id
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
export interface UnshareFileMutation {
|
|
69
|
-
unshareFile: {
|
|
70
|
-
tpFile: {
|
|
71
|
-
id: ID;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export const UnshareFileMutation = gqlTyped<UnshareFileMutation>`
|
|
76
|
-
mutation UnshareFileMutation($input: UnshareFileInput!) {
|
|
77
|
-
unshareFile(input: $input) {
|
|
78
|
-
tpFile {
|
|
79
|
-
id
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
|
|
85
|
-
export interface TpCurrentUserSharedKeyQuery {
|
|
86
|
-
tp: {
|
|
87
|
-
currentUserSharedKey: {
|
|
88
|
-
userSharedKey: {
|
|
89
|
-
sharedKey: {
|
|
90
|
-
id: ID;
|
|
91
|
-
};
|
|
92
|
-
mkSharedKey: {
|
|
93
|
-
id: ID;
|
|
94
|
-
};
|
|
95
|
-
mkPxk: {
|
|
96
|
-
id: ID;
|
|
97
|
-
};
|
|
98
|
-
mkReshareRequestCipher: string;
|
|
99
|
-
mkReshareRequestSent: boolean;
|
|
100
|
-
mkReshareResponseCipher: string;
|
|
101
|
-
mkReshareResponseSent: boolean;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
export const TpCurrentUserSharedKeyQuery = gqlTyped<TpCurrentUserSharedKeyQuery>`
|
|
107
|
-
query TpCurrentUserSharedKeyQuery($id: LrRelayIdInput!) {
|
|
108
|
-
tp(id: $id){
|
|
109
|
-
currentUserSharedKey {
|
|
110
|
-
userSharedKey {
|
|
111
|
-
sharedKey {
|
|
112
|
-
id
|
|
113
|
-
}
|
|
114
|
-
mkSharedKey {
|
|
115
|
-
id
|
|
116
|
-
}
|
|
117
|
-
mkPxk {
|
|
118
|
-
id
|
|
119
|
-
}
|
|
120
|
-
mkReshareRequestCipher
|
|
121
|
-
mkReshareRequestSent
|
|
122
|
-
mkReshareResponseCipher
|
|
123
|
-
mkReshareResponseSent
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
`;
|
|
129
|
-
|
|
130
|
-
export interface RequestTpMkReshareMutation {
|
|
131
|
-
requestTpMkReshare: {
|
|
132
|
-
id: ID;
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
export const RequestTpMkReshareMutation = gqlTyped<RequestTpMkReshareMutation>`
|
|
136
|
-
mutation RequestTpMkReshareMutation($input: RequestTpMkReshareInput!) {
|
|
137
|
-
requestTpMkReshare(input: $input) {
|
|
138
|
-
id
|
|
139
|
-
}
|
|
140
|
-
}`;
|
|
141
|
-
|
|
142
|
-
export interface RespondTpMkReshareMutation {
|
|
143
|
-
respondTpMkReshare: {
|
|
144
|
-
id: ID;
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
export const RespondTpMkReshareMutation = gqlTyped<RespondTpMkReshareMutation>`
|
|
148
|
-
mutation RespondTpMkReshareMutation($input: RespondTpMkReshareInput!) {
|
|
149
|
-
respondTpMkReshare(input: $input) {
|
|
150
|
-
id
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
`;
|
|
154
|
-
|
|
155
|
-
export interface CompleteTpMkReshareMutation {
|
|
156
|
-
completeTpMkReshare: {
|
|
157
|
-
id: ID;
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
export const CompleteTpMkReshareMutation = gqlTyped<CompleteTpMkReshareMutation>`
|
|
161
|
-
mutation CompleteTpMkReshareMutation($input: CompleteTpMkReshareInput!) {
|
|
162
|
-
completeTpMkReshare(input: $input) {
|
|
163
|
-
id
|
|
164
|
-
}
|
|
165
|
-
}`;
|