@lifeready/core 1.0.0 → 1.0.1
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/karma.conf.js +32 -0
- package/ng-package.json +26 -0
- package/package.json +21 -29
- package/src/lib/_common/ast.ts +75 -0
- package/src/lib/_common/deferred-promise.ts +35 -0
- package/src/lib/_common/exceptions.ts +189 -0
- package/src/lib/_common/queries.gql.ts +200 -0
- package/src/lib/_common/run-outside-angular.ts +125 -0
- package/src/lib/_common/tests.ts +82 -0
- package/{lib/_common/types.d.ts → src/lib/_common/types.ts} +13 -10
- package/src/lib/_common/utils.ts +57 -0
- package/src/lib/api/api-mutation.spec.ts +547 -0
- package/src/lib/api/api-query.spec.ts +40 -0
- package/src/lib/api/contact-card.gql.ts +85 -0
- package/src/lib/api/contact-card.service.spec.ts +249 -0
- package/src/lib/api/contact-card.service.ts +228 -0
- package/src/lib/api/contact-card2.gql.ts +93 -0
- package/src/lib/api/contact-card2.service.spec.ts +297 -0
- package/src/lib/api/contact-card2.service.ts +139 -0
- package/src/lib/api/file.service.spec.ts +14 -0
- package/src/lib/api/file.service.ts +81 -0
- package/src/lib/api/item2.gql.ts +211 -0
- package/src/lib/api/item2.service.spec.ts +1043 -0
- package/src/lib/api/item2.service.ts +481 -0
- package/src/lib/api/key-exchange.gql.ts +196 -0
- package/src/lib/api/key-exchange.service.spec.ts +470 -0
- package/src/lib/api/key-exchange.service.ts +731 -0
- package/src/lib/api/key-exchange.types.ts +235 -0
- package/src/lib/api/key-exchange2.gql.ts +310 -0
- package/src/lib/api/key-exchange2.service.spec.ts +892 -0
- package/src/lib/api/key-exchange2.service.ts +875 -0
- package/src/lib/api/lock.gql.ts +67 -0
- package/src/lib/api/lock.service.spec.ts +549 -0
- package/src/lib/api/lock.service.ts +57 -0
- package/src/lib/api/lr-apollo.service.spec.ts +27 -0
- package/src/lib/api/lr-apollo.service.ts +43 -0
- package/{lib/api/lr-graphql/index.d.ts → src/lib/api/lr-graphql/index.ts} +5 -5
- package/src/lib/api/lr-graphql/lr-graphql.service.ts +313 -0
- package/src/lib/api/lr-graphql/lr-merged-mutation.ts +377 -0
- package/src/lib/api/lr-graphql/lr-mutation-base.ts +67 -0
- package/src/lib/api/lr-graphql/lr-mutation.ts +74 -0
- package/src/lib/api/lr-graphql/lr.service.ts +28 -0
- package/src/lib/api/message.service.spec.ts +20 -0
- package/src/lib/api/message.service.ts +210 -0
- package/src/lib/api/persist.service.spec.ts +209 -0
- package/src/lib/api/persist.service.ts +220 -0
- package/src/lib/api/query-processor/common-processors.service.ts +148 -0
- package/{lib/api/query-processor/index.d.ts → src/lib/api/query-processor/index.ts} +2 -2
- package/src/lib/api/query-processor/query-processor.service.ts +240 -0
- package/src/lib/api/query-processor/tp-password-reset-processor.service.ts +177 -0
- package/src/lib/api/shared-contact-card.service.ts +156 -0
- package/src/lib/api/shared-contact-card2.gql.ts +76 -0
- package/src/lib/api/shared-contact-card2.service.ts +154 -0
- package/src/lib/api/time.service.spec.ts +48 -0
- package/src/lib/api/time.service.ts +155 -0
- package/src/lib/api/types/graphql.types.ts +48 -0
- package/{lib/api/types/index.d.ts → src/lib/api/types/index.ts} +2 -2
- package/src/lib/api/types/lr-graphql.types.ts +467 -0
- package/src/lib/auth/auth.config.ts +83 -0
- package/src/lib/auth/auth.gql.ts +62 -0
- package/src/lib/auth/auth.types.ts +79 -0
- package/src/lib/auth/idle.service.spec.ts +119 -0
- package/src/lib/auth/idle.service.ts +208 -0
- package/src/lib/auth/idle.types.ts +11 -0
- package/src/lib/auth/lbop.service.spec.ts +56 -0
- package/src/lib/auth/lbop.service.ts +539 -0
- package/src/lib/auth/life-ready-auth.service.spec.ts +70 -0
- package/src/lib/auth/life-ready-auth.service.ts +454 -0
- package/src/lib/auth/password.service.spec.ts +51 -0
- package/src/lib/auth/password.service.ts +438 -0
- package/src/lib/auth/register.service.spec.ts +31 -0
- package/src/lib/auth/register.service.ts +181 -0
- package/src/lib/auth/two-factor.service.spec.ts +21 -0
- package/src/lib/auth/two-factor.service.ts +69 -0
- package/src/lib/category/category-meta.service.spec.ts +28 -0
- package/src/lib/category/category-meta.service.ts +125 -0
- package/src/lib/category/category.gql.ts +449 -0
- package/src/lib/category/category.service.spec.ts +26 -0
- package/src/lib/category/category.service.ts +498 -0
- package/src/lib/category/category.types.ts +89 -0
- package/src/lib/cryptography/cryptography.types.ts +108 -0
- package/src/lib/cryptography/encryption.service.spec.ts +125 -0
- package/src/lib/cryptography/encryption.service.ts +243 -0
- package/src/lib/cryptography/key-factory.service.spec.ts +15 -0
- package/src/lib/cryptography/key-factory.service.ts +303 -0
- package/src/lib/cryptography/key-graph.service.spec.ts +16 -0
- package/src/lib/cryptography/key-graph.service.ts +354 -0
- package/src/lib/cryptography/key-meta.service.spec.ts +40 -0
- package/src/lib/cryptography/key-meta.service.ts +254 -0
- package/src/lib/cryptography/key.service.spec.ts +16 -0
- package/src/lib/cryptography/key.service.ts +154 -0
- package/src/lib/cryptography/slip39.service.spec.ts +44 -0
- package/src/lib/cryptography/slip39.service.ts +204 -0
- package/src/lib/cryptography/web-crypto.service.ts +22 -0
- package/src/lib/life-ready.config.ts +127 -0
- package/src/lib/life-ready.module.ts +81 -0
- package/src/lib/plan/plan.gql.ts +133 -0
- package/src/lib/plan/plan.service.spec.ts +294 -0
- package/src/lib/plan/plan.service.ts +198 -0
- package/src/lib/plan/plan.types.ts +37 -0
- package/src/lib/record/record-attachment.service.spec.ts +31 -0
- package/src/lib/record/record-attachment.service.ts +101 -0
- package/src/lib/record/record.gql.ts +192 -0
- package/src/lib/record/record.service.spec.ts +598 -0
- package/src/lib/record/record.service.ts +236 -0
- package/src/lib/record/record.types.ts +86 -0
- package/src/lib/record-type/record-type.service.spec.ts +16 -0
- package/src/lib/record-type/record-type.service.ts +71 -0
- package/src/lib/record-type/record-type.types.ts +58 -0
- package/src/lib/scenario/approvals/scenario-approval.gql.ts +112 -0
- package/src/lib/scenario/approvals/scenario-approval.types.ts +85 -0
- package/src/lib/scenario/approvals/scenario-approver.service.spec.ts +16 -0
- package/src/lib/scenario/approvals/scenario-approver.service.ts +422 -0
- package/src/lib/scenario/claimants/scenario-claimant.gql.ts +56 -0
- package/src/lib/scenario/claimants/scenario-claimant.service.spec.ts +16 -0
- package/src/lib/scenario/claimants/scenario-claimant.service.ts +100 -0
- package/src/lib/scenario/claimants/scenario-claimant.types.ts +21 -0
- package/src/lib/scenario/receivers/scenario-receiver.gql.ts +157 -0
- package/src/lib/scenario/receivers/scenario-receiver.service.spec.ts +16 -0
- package/src/lib/scenario/receivers/scenario-receiver.service.ts +278 -0
- package/src/lib/scenario/receivers/scenario-receiver.types.ts +66 -0
- package/src/lib/scenario/scenario-setup.service.spec.ts +22 -0
- package/src/lib/scenario/scenario-setup.service.ts +369 -0
- package/src/lib/scenario/scenario.gql.ts +404 -0
- package/src/lib/scenario/scenario.service.spec.ts +1586 -0
- package/src/lib/scenario/scenario.service.ts +811 -0
- package/src/lib/scenario/scenario.types.ts +258 -0
- package/src/lib/search/search.gql.ts +62 -0
- package/src/lib/search/search.service.spec.ts +57 -0
- package/src/lib/search/search.service.ts +174 -0
- package/src/lib/search/search.types.ts +24 -0
- package/src/lib/trusted-parties/tp-password-reset-request.service.ts +140 -0
- package/src/lib/trusted-parties/tp-password-reset-user.service.ts +359 -0
- package/src/lib/trusted-parties/tp-password-reset.gql.ts +453 -0
- package/src/lib/trusted-parties/tp-password-reset.service.spec.ts +602 -0
- package/src/lib/trusted-parties/tp-password-reset.service.ts +482 -0
- package/src/lib/trusted-parties/trusted-party.gql.ts +159 -0
- package/src/lib/trusted-parties/trusted-party.service.spec.ts +1008 -0
- package/src/lib/trusted-parties/trusted-party.service.ts +394 -0
- package/src/lib/trusted-parties/trusted-party.types.ts +119 -0
- package/src/lib/trusted-parties/trusted-party2.gql.ts +165 -0
- package/src/lib/trusted-parties/trusted-party2.service.spec.ts +1782 -0
- package/src/lib/trusted-parties/trusted-party2.service.ts +272 -0
- package/src/lib/users/profile-details.service.spec.ts +45 -0
- package/src/lib/users/profile-details.service.ts +278 -0
- package/src/lib/users/profile.gql.ts +108 -0
- package/src/lib/users/profile.service.spec.ts +97 -0
- package/src/lib/users/profile.service.ts +224 -0
- package/src/lib/users/profile.types.ts +101 -0
- package/src/lib/users/user.gql.ts +69 -0
- package/src/lib/users/user.service.spec.ts +161 -0
- package/src/lib/users/user.service.ts +72 -0
- package/src/lib/users/user.types.ts +27 -0
- package/{public-api.d.ts → src/public-api.ts} +96 -77
- package/src/test.ts +21 -0
- package/tsconfig.lib.json +21 -0
- package/tsconfig.lib.prod.json +6 -0
- package/tsconfig.spec.json +10 -0
- package/tslint.json +17 -0
- package/bundles/lifeready-core.umd.js +0 -15876
- package/bundles/lifeready-core.umd.js.map +0 -1
- package/bundles/lifeready-core.umd.min.js +0 -16
- package/bundles/lifeready-core.umd.min.js.map +0 -1
- package/esm2015/lib/_common/ast.js +0 -40
- package/esm2015/lib/_common/deferred-promise.js +0 -24
- package/esm2015/lib/_common/exceptions.js +0 -157
- package/esm2015/lib/_common/queries.gql.js +0 -190
- package/esm2015/lib/_common/run-outside-angular.js +0 -79
- package/esm2015/lib/_common/types.js +0 -1
- package/esm2015/lib/_common/utils.js +0 -44
- package/esm2015/lib/api/contact-card.gql.js +0 -79
- package/esm2015/lib/api/contact-card.service.js +0 -154
- package/esm2015/lib/api/contact-card2.gql.js +0 -60
- package/esm2015/lib/api/contact-card2.service.js +0 -103
- package/esm2015/lib/api/file.service.js +0 -74
- package/esm2015/lib/api/item2.gql.js +0 -110
- package/esm2015/lib/api/item2.service.js +0 -311
- package/esm2015/lib/api/key-exchange.gql.js +0 -188
- package/esm2015/lib/api/key-exchange.service.js +0 -442
- package/esm2015/lib/api/key-exchange.types.js +0 -18
- package/esm2015/lib/api/key-exchange2.gql.js +0 -171
- package/esm2015/lib/api/key-exchange2.service.js +0 -479
- package/esm2015/lib/api/lock.gql.js +0 -40
- package/esm2015/lib/api/lock.service.js +0 -64
- package/esm2015/lib/api/lr-apollo.service.js +0 -46
- package/esm2015/lib/api/lr-graphql/index.js +0 -6
- package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +0 -155
- package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +0 -213
- package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +0 -51
- package/esm2015/lib/api/lr-graphql/lr-mutation.js +0 -48
- package/esm2015/lib/api/lr-graphql/lr.service.js +0 -18
- package/esm2015/lib/api/message.service.js +0 -138
- package/esm2015/lib/api/persist.service.js +0 -181
- package/esm2015/lib/api/query-processor/common-processors.service.js +0 -93
- package/esm2015/lib/api/query-processor/index.js +0 -3
- package/esm2015/lib/api/query-processor/query-processor.service.js +0 -192
- package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +0 -109
- package/esm2015/lib/api/shared-contact-card.service.js +0 -119
- package/esm2015/lib/api/shared-contact-card2.gql.js +0 -41
- package/esm2015/lib/api/shared-contact-card2.service.js +0 -117
- package/esm2015/lib/api/time.service.js +0 -146
- package/esm2015/lib/api/types/graphql.types.js +0 -7
- package/esm2015/lib/api/types/index.js +0 -3
- package/esm2015/lib/api/types/lr-graphql.types.js +0 -71
- package/esm2015/lib/auth/auth.config.js +0 -57
- package/esm2015/lib/auth/auth.gql.js +0 -48
- package/esm2015/lib/auth/auth.types.js +0 -27
- package/esm2015/lib/auth/idle.service.js +0 -168
- package/esm2015/lib/auth/idle.types.js +0 -7
- package/esm2015/lib/auth/lbop.service.js +0 -355
- package/esm2015/lib/auth/life-ready-auth.service.js +0 -333
- package/esm2015/lib/auth/password.service.js +0 -320
- package/esm2015/lib/auth/register.service.js +0 -172
- package/esm2015/lib/auth/two-factor.service.js +0 -74
- package/esm2015/lib/category/category-meta.service.js +0 -99
- package/esm2015/lib/category/category.gql.js +0 -406
- package/esm2015/lib/category/category.service.js +0 -390
- package/esm2015/lib/category/category.types.js +0 -29
- package/esm2015/lib/cryptography/cryptography.types.js +0 -11
- package/esm2015/lib/cryptography/encryption.service.js +0 -189
- package/esm2015/lib/cryptography/key-factory.service.js +0 -237
- package/esm2015/lib/cryptography/key-graph.service.js +0 -280
- package/esm2015/lib/cryptography/key-meta.service.js +0 -200
- package/esm2015/lib/cryptography/key.service.js +0 -124
- package/esm2015/lib/cryptography/slip39.service.js +0 -169
- package/esm2015/lib/cryptography/web-crypto.service.js +0 -29
- package/esm2015/lib/life-ready.config.js +0 -84
- package/esm2015/lib/life-ready.module.js +0 -74
- package/esm2015/lib/plan/plan.gql.js +0 -123
- package/esm2015/lib/plan/plan.service.js +0 -149
- package/esm2015/lib/plan/plan.types.js +0 -11
- package/esm2015/lib/record/record-attachment.service.js +0 -101
- package/esm2015/lib/record/record.gql.js +0 -179
- package/esm2015/lib/record/record.service.js +0 -206
- package/esm2015/lib/record/record.types.js +0 -15
- package/esm2015/lib/record-type/record-type.service.js +0 -75
- package/esm2015/lib/record-type/record-type.types.js +0 -28
- package/esm2015/lib/scenario/approvals/scenario-approval.gql.js +0 -105
- package/esm2015/lib/scenario/approvals/scenario-approval.types.js +0 -1
- package/esm2015/lib/scenario/approvals/scenario-approver.service.js +0 -300
- package/esm2015/lib/scenario/claimants/scenario-claimant.gql.js +0 -52
- package/esm2015/lib/scenario/claimants/scenario-claimant.service.js +0 -97
- package/esm2015/lib/scenario/claimants/scenario-claimant.types.js +0 -1
- package/esm2015/lib/scenario/receivers/scenario-receiver.gql.js +0 -150
- package/esm2015/lib/scenario/receivers/scenario-receiver.service.js +0 -229
- package/esm2015/lib/scenario/receivers/scenario-receiver.types.js +0 -1
- package/esm2015/lib/scenario/scenario-setup.service.js +0 -269
- package/esm2015/lib/scenario/scenario.gql.js +0 -368
- package/esm2015/lib/scenario/scenario.service.js +0 -611
- package/esm2015/lib/scenario/scenario.types.js +0 -64
- package/esm2015/lib/search/search.gql.js +0 -62
- package/esm2015/lib/search/search.service.js +0 -156
- package/esm2015/lib/search/search.types.js +0 -6
- package/esm2015/lib/trusted-parties/tp-password-reset-request.service.js +0 -112
- package/esm2015/lib/trusted-parties/tp-password-reset-user.service.js +0 -266
- package/esm2015/lib/trusted-parties/tp-password-reset.gql.js +0 -232
- package/esm2015/lib/trusted-parties/tp-password-reset.service.js +0 -300
- package/esm2015/lib/trusted-parties/trusted-party.gql.js +0 -148
- package/esm2015/lib/trusted-parties/trusted-party.service.js +0 -326
- package/esm2015/lib/trusted-parties/trusted-party.types.js +0 -41
- package/esm2015/lib/trusted-parties/trusted-party2.gql.js +0 -87
- package/esm2015/lib/trusted-parties/trusted-party2.service.js +0 -215
- package/esm2015/lib/users/profile-details.service.js +0 -214
- package/esm2015/lib/users/profile.gql.js +0 -97
- package/esm2015/lib/users/profile.service.js +0 -169
- package/esm2015/lib/users/profile.types.js +0 -34
- package/esm2015/lib/users/user.gql.js +0 -60
- package/esm2015/lib/users/user.service.js +0 -79
- package/esm2015/lib/users/user.types.js +0 -5
- package/esm2015/lifeready-core.js +0 -10
- package/esm2015/public-api.js +0 -81
- package/fesm2015/lifeready-core.js +0 -13282
- package/fesm2015/lifeready-core.js.map +0 -1
- package/lib/_common/ast.d.ts +0 -11
- package/lib/_common/deferred-promise.d.ts +0 -12
- package/lib/_common/exceptions.d.ts +0 -109
- package/lib/_common/queries.gql.d.ts +0 -10
- package/lib/_common/run-outside-angular.d.ts +0 -14
- package/lib/_common/utils.d.ts +0 -3
- package/lib/api/contact-card.gql.d.ts +0 -7
- package/lib/api/contact-card.service.d.ts +0 -52
- package/lib/api/contact-card2.gql.d.ts +0 -34
- package/lib/api/contact-card2.service.d.ts +0 -49
- package/lib/api/file.service.d.ts +0 -18
- package/lib/api/item2.gql.d.ts +0 -96
- package/lib/api/item2.service.d.ts +0 -177
- package/lib/api/key-exchange.gql.d.ts +0 -9
- package/lib/api/key-exchange.service.d.ts +0 -39
- package/lib/api/key-exchange.types.d.ts +0 -196
- package/lib/api/key-exchange2.gql.d.ts +0 -125
- package/lib/api/key-exchange2.service.d.ts +0 -187
- package/lib/api/lock.gql.d.ts +0 -27
- package/lib/api/lock.service.d.ts +0 -25
- package/lib/api/lr-apollo.service.d.ts +0 -15
- package/lib/api/lr-graphql/lr-graphql.service.d.ts +0 -60
- package/lib/api/lr-graphql/lr-merged-mutation.d.ts +0 -27
- package/lib/api/lr-graphql/lr-mutation-base.d.ts +0 -28
- package/lib/api/lr-graphql/lr-mutation.d.ts +0 -8
- package/lib/api/lr-graphql/lr.service.d.ts +0 -9
- package/lib/api/message.service.d.ts +0 -58
- package/lib/api/persist.service.d.ts +0 -31
- package/lib/api/query-processor/common-processors.service.d.ts +0 -36
- package/lib/api/query-processor/query-processor.service.d.ts +0 -18
- package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +0 -15
- package/lib/api/shared-contact-card.service.d.ts +0 -33
- package/lib/api/shared-contact-card2.gql.d.ts +0 -36
- package/lib/api/shared-contact-card2.service.d.ts +0 -45
- package/lib/api/time.service.d.ts +0 -16
- package/lib/api/types/graphql.types.d.ts +0 -29
- package/lib/api/types/lr-graphql.types.d.ts +0 -385
- package/lib/auth/auth.config.d.ts +0 -5
- package/lib/auth/auth.gql.d.ts +0 -15
- package/lib/auth/auth.types.d.ts +0 -66
- package/lib/auth/idle.service.d.ts +0 -40
- package/lib/auth/idle.types.d.ts +0 -10
- package/lib/auth/lbop.service.d.ts +0 -91
- package/lib/auth/life-ready-auth.service.d.ts +0 -46
- package/lib/auth/password.service.d.ts +0 -78
- package/lib/auth/register.service.d.ts +0 -25
- package/lib/auth/two-factor.service.d.ts +0 -15
- package/lib/category/category-meta.service.d.ts +0 -23
- package/lib/category/category.gql.d.ts +0 -45
- package/lib/category/category.service.d.ts +0 -67
- package/lib/category/category.types.d.ts +0 -79
- package/lib/cryptography/cryptography.types.d.ts +0 -83
- package/lib/cryptography/encryption.service.d.ts +0 -41
- package/lib/cryptography/key-factory.service.d.ts +0 -38
- package/lib/cryptography/key-graph.service.d.ts +0 -33
- package/lib/cryptography/key-meta.service.d.ts +0 -44
- package/lib/cryptography/key.service.d.ts +0 -36
- package/lib/cryptography/slip39.service.d.ts +0 -43
- package/lib/cryptography/web-crypto.service.d.ts +0 -5
- package/lib/life-ready.config.d.ts +0 -14
- package/lib/life-ready.module.d.ts +0 -5
- package/lib/plan/plan.gql.d.ts +0 -11
- package/lib/plan/plan.service.d.ts +0 -33
- package/lib/plan/plan.types.d.ts +0 -31
- package/lib/record/record-attachment.service.d.ts +0 -16
- package/lib/record/record.gql.d.ts +0 -14
- package/lib/record/record.service.d.ts +0 -25
- package/lib/record/record.types.d.ts +0 -57
- package/lib/record-type/record-type.service.d.ts +0 -11
- package/lib/record-type/record-type.types.d.ts +0 -50
- package/lib/scenario/approvals/scenario-approval.gql.d.ts +0 -7
- package/lib/scenario/approvals/scenario-approval.types.d.ts +0 -63
- package/lib/scenario/approvals/scenario-approver.service.d.ts +0 -32
- package/lib/scenario/claimants/scenario-claimant.gql.d.ts +0 -5
- package/lib/scenario/claimants/scenario-claimant.service.d.ts +0 -17
- package/lib/scenario/claimants/scenario-claimant.types.d.ts +0 -18
- package/lib/scenario/receivers/scenario-receiver.gql.d.ts +0 -8
- package/lib/scenario/receivers/scenario-receiver.service.d.ts +0 -30
- package/lib/scenario/receivers/scenario-receiver.types.d.ts +0 -54
- package/lib/scenario/scenario-setup.service.d.ts +0 -22
- package/lib/scenario/scenario.gql.d.ts +0 -34
- package/lib/scenario/scenario.service.d.ts +0 -58
- package/lib/scenario/scenario.types.d.ts +0 -217
- package/lib/search/search.gql.d.ts +0 -1
- package/lib/search/search.service.d.ts +0 -25
- package/lib/search/search.types.d.ts +0 -20
- package/lib/trusted-parties/tp-password-reset-request.service.d.ts +0 -20
- package/lib/trusted-parties/tp-password-reset-user.service.d.ts +0 -41
- package/lib/trusted-parties/tp-password-reset.gql.d.ts +0 -218
- package/lib/trusted-parties/tp-password-reset.service.d.ts +0 -131
- package/lib/trusted-parties/trusted-party.gql.d.ts +0 -9
- package/lib/trusted-parties/trusted-party.service.d.ts +0 -44
- package/lib/trusted-parties/trusted-party.types.d.ts +0 -102
- package/lib/trusted-parties/trusted-party2.gql.d.ts +0 -79
- package/lib/trusted-parties/trusted-party2.service.d.ts +0 -114
- package/lib/users/profile-details.service.d.ts +0 -21
- package/lib/users/profile.gql.d.ts +0 -11
- package/lib/users/profile.service.d.ts +0 -35
- package/lib/users/profile.types.d.ts +0 -96
- package/lib/users/user.gql.d.ts +0 -9
- package/lib/users/user.service.d.ts +0 -12
- package/lib/users/user.types.d.ts +0 -23
- package/lifeready-core.d.ts +0 -9
- package/lifeready-core.metadata.json +0 -1
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import { Time } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
Connection,
|
|
4
|
+
DateTime,
|
|
5
|
+
GenericScalar,
|
|
6
|
+
ID,
|
|
7
|
+
JSONString,
|
|
8
|
+
LrEmail,
|
|
9
|
+
Node,
|
|
10
|
+
TimeStamped,
|
|
11
|
+
} from './graphql.types';
|
|
12
|
+
|
|
13
|
+
// TODO: fill these types
|
|
14
|
+
export type UserStripeNode = any;
|
|
15
|
+
export type UserPlanNode = any;
|
|
16
|
+
export type UserDeleteNode = any;
|
|
17
|
+
export type FeaturesNode = any;
|
|
18
|
+
export type ScenarioNode = any;
|
|
19
|
+
export type SharedScenarioNode = any;
|
|
20
|
+
|
|
21
|
+
export type TpPasswordResetRequestNode = any;
|
|
22
|
+
|
|
23
|
+
export interface PassKeyNode extends Node, TimeStamped {
|
|
24
|
+
passKeyParams?: GenericScalar;
|
|
25
|
+
passIdpParams?: GenericScalar;
|
|
26
|
+
wrappedPassIdpVerifierPrk?: GenericScalar;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CurrentUserKeyNode extends Node, TimeStamped {
|
|
30
|
+
passKeys?: PassKeyNode[];
|
|
31
|
+
passKey?: PassKeyNode;
|
|
32
|
+
rootKey?: KeyNode;
|
|
33
|
+
masterKey?: KeyNode;
|
|
34
|
+
pxk?: KeyNode;
|
|
35
|
+
sigPxk?: KeyNode;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ------------------------------------------------------
|
|
39
|
+
// Node types
|
|
40
|
+
// ------------------------------------------------------
|
|
41
|
+
export interface UserNode extends Node {
|
|
42
|
+
username?: string;
|
|
43
|
+
contactCards?: Connection<ContactCardNode>;
|
|
44
|
+
currentUserKey?: CurrentUserKeyNode;
|
|
45
|
+
ownedContactCard?: SharedContactCardNode;
|
|
46
|
+
receivedContactCard?: SharedContactCardNode;
|
|
47
|
+
isCurrentUser?: boolean;
|
|
48
|
+
haveTp?: boolean;
|
|
49
|
+
stripe?: UserStripeNode;
|
|
50
|
+
userPlans?: Connection<UserPlanNode>;
|
|
51
|
+
userDelete?: UserDeleteNode;
|
|
52
|
+
features?: FeaturesNode;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ServerTime {
|
|
56
|
+
timestamp?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface KeyNode extends Node, TimeStamped {
|
|
60
|
+
pbk?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ContactCardNode extends Node, TimeStamped {
|
|
64
|
+
owner?: UserNode;
|
|
65
|
+
publicDataSig?: string;
|
|
66
|
+
publicSearchableSig?: string;
|
|
67
|
+
sigPxk?: KeyNode;
|
|
68
|
+
defaultFrom?: DateTime;
|
|
69
|
+
publicData?: string;
|
|
70
|
+
publicSearchable?: string;
|
|
71
|
+
cipherData?: string;
|
|
72
|
+
cipherDataClearJson?: any;
|
|
73
|
+
key?: KeyNode;
|
|
74
|
+
plainData?: string;
|
|
75
|
+
plainDataSig?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface DirectoryNode extends Node, TimeStamped {
|
|
79
|
+
plainMeta?: JSONString;
|
|
80
|
+
plainMetaJson?: any;
|
|
81
|
+
cipherMeta?: string;
|
|
82
|
+
cipherMetaClearJson?: any;
|
|
83
|
+
archived?: boolean;
|
|
84
|
+
keyId?: ID;
|
|
85
|
+
childFileLinks?: Connection<FileLinkNode>;
|
|
86
|
+
childDirectoryLinks?: Connection<DirectoryLinkNode>;
|
|
87
|
+
parentDirectoryLinks?: Connection<DirectoryLinkNode>;
|
|
88
|
+
nParentDirectoryLinks?: DirectoryLinkNodeLrNList;
|
|
89
|
+
descendants?: Descendants;
|
|
90
|
+
accessRoles?: AccessRole[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface FileNode extends Node, TimeStamped {
|
|
94
|
+
currentVersion?: FileVersionNode;
|
|
95
|
+
archived?: boolean;
|
|
96
|
+
versions?: Connection<FileVersionNode>;
|
|
97
|
+
keyId?: ID;
|
|
98
|
+
parentDirectoryLinks?: Connection<FileLinkNode>;
|
|
99
|
+
nParentDirectoryLinks?: FileLinkNodeLrNList;
|
|
100
|
+
accessRoles?: AccessRole[];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface DirectoryLinkNode extends Node, TimeStamped {
|
|
104
|
+
parentDirectory?: DirectoryNode;
|
|
105
|
+
childDirectory?: DirectoryNode;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface FileLinkNode extends Node, TimeStamped {
|
|
109
|
+
parentDirectory?: DirectoryNode;
|
|
110
|
+
childFile?: FileNode;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface DirectoryLinkNodeLrNList {
|
|
114
|
+
list?: DirectoryLinkNode[];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface FileLinkNodeLrNList {
|
|
118
|
+
list?: FileLinkNode[];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface Descendants {
|
|
122
|
+
directories?: Connection<DirectoryNode>;
|
|
123
|
+
files?: Connection<FileNode>;
|
|
124
|
+
directoriesCount?: number;
|
|
125
|
+
filesCount?: number;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export enum AccessRoleChoice {
|
|
129
|
+
READER = 'READER',
|
|
130
|
+
WRITER = 'WRITER',
|
|
131
|
+
ADMIN = 'ADMIN',
|
|
132
|
+
DENY = 'DENY',
|
|
133
|
+
OWNER = 'OWNER',
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export enum AccessRoleMethod {
|
|
137
|
+
inherited = 'inherited',
|
|
138
|
+
direct = 'direct',
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface AccessRole {
|
|
142
|
+
issuer?: UserNode;
|
|
143
|
+
subject?: UserNode;
|
|
144
|
+
role?: AccessRoleChoice;
|
|
145
|
+
method?: AccessRoleMethod;
|
|
146
|
+
inheritedFrom?: DirectoryNode;
|
|
147
|
+
trustedParty?: TpNode;
|
|
148
|
+
isIssuer?: boolean;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export enum FileVersionOperation {
|
|
152
|
+
CREATE = 'CREATE',
|
|
153
|
+
READ = 'READ',
|
|
154
|
+
UPDATE = 'UPDATE',
|
|
155
|
+
REVERT = 'REVERT',
|
|
156
|
+
DELETE = 'DELETE',
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface FileVersionNode extends Node, TimeStamped {
|
|
160
|
+
file?: FileNode;
|
|
161
|
+
state?: FileStateNode;
|
|
162
|
+
operation?: FileVersionOperation;
|
|
163
|
+
author?: UserNode;
|
|
164
|
+
}
|
|
165
|
+
export interface FileStateNode extends Node, TimeStamped {
|
|
166
|
+
plainMeta?: JSONString;
|
|
167
|
+
plainMetaJson?: any;
|
|
168
|
+
cipherMeta?: string;
|
|
169
|
+
cipherMetaClearJson?: any;
|
|
170
|
+
contentResource?: string;
|
|
171
|
+
versions?: Connection<FileVersionNode>;
|
|
172
|
+
keyId: ID;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export enum KeyExchangeOtkState {
|
|
176
|
+
OTK_INITIATED = 'OTK_INITIATED',
|
|
177
|
+
OTK_ACCEPTED = 'OTK_ACCEPTED',
|
|
178
|
+
OTK_COMPLETED = 'OTK_COMPLETED',
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface ContactCardSharedCipherData {
|
|
182
|
+
// Shared read access between initiator and responder. But only the initiator has write access.
|
|
183
|
+
sharedCipherDataClearJson: any;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The contents of the one-time key cipher
|
|
188
|
+
*/
|
|
189
|
+
export interface OtKeyCipherClearJson2 {
|
|
190
|
+
// Used to confirm to the initiator that the responder has access to the one-time key.
|
|
191
|
+
nonce: string;
|
|
192
|
+
// Data sent from initiator to the responder
|
|
193
|
+
initiator: {
|
|
194
|
+
oneTimePbk: object; // one-time public encryption key the responder will use to send data back to the initiator
|
|
195
|
+
pbk: object; // public encryption key
|
|
196
|
+
sigPbk: object; // public signing key
|
|
197
|
+
message?: any;
|
|
198
|
+
contactCard?: ContactCardSharedCipherData;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface KeyExchangeOtkNode extends Node, TimeStamped {
|
|
203
|
+
state?: KeyExchangeOtkState;
|
|
204
|
+
sharedKey?: KeyNode;
|
|
205
|
+
mkSharedKey?: KeyNode;
|
|
206
|
+
initiatorSigPxk?: KeyNode;
|
|
207
|
+
responderSigPxk?: KeyNode;
|
|
208
|
+
initiatorOneTimePbkCipher?: string;
|
|
209
|
+
otKeyParams?: string;
|
|
210
|
+
otKeyCipher?: string;
|
|
211
|
+
otKeyCipherClearJson?: OtKeyCipherClearJson2;
|
|
212
|
+
responderPbkCipher?: string;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export enum KeyExchangeState {
|
|
216
|
+
IN_PROGRESS = 'IN_PROGRESS',
|
|
217
|
+
COMPLETED = 'COMPLETED',
|
|
218
|
+
DECLINED = 'DECLINED',
|
|
219
|
+
CANCELLED = 'CANCELLED',
|
|
220
|
+
DELETED = 'DELETED',
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export enum KeyExchangeMode {
|
|
224
|
+
OTK = 'OTK',
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface KeyExchangeNode extends Node, TimeStamped {
|
|
228
|
+
expiryTime?: DateTime;
|
|
229
|
+
token?: string;
|
|
230
|
+
tokenExpiryTime?: DateTime;
|
|
231
|
+
state?: KeyExchangeState;
|
|
232
|
+
mode?: KeyExchangeMode;
|
|
233
|
+
initiator?: UserNode;
|
|
234
|
+
responder?: UserNode;
|
|
235
|
+
initiatorRootKeyCipher?: string;
|
|
236
|
+
responderRootKeyCipher?: string;
|
|
237
|
+
initiatorActionRequired?: boolean;
|
|
238
|
+
responderActionRequired?: boolean;
|
|
239
|
+
createTp?: boolean;
|
|
240
|
+
otk?: KeyExchangeOtkNode;
|
|
241
|
+
isInitiator?: boolean;
|
|
242
|
+
isExpired?: boolean;
|
|
243
|
+
responderEmailAddress?: LrEmail;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface SharedItems {
|
|
247
|
+
directories?: Connection<DirectoryNode>;
|
|
248
|
+
files?: Connection<FileNode>;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface SharedContactCardNode extends Node, TimeStamped {
|
|
252
|
+
owner?: UserNode;
|
|
253
|
+
receiver?: UserNode;
|
|
254
|
+
sharedKey?: KeyNode;
|
|
255
|
+
sharedCipherData?: string;
|
|
256
|
+
sharedCipherDataClearJson?: any;
|
|
257
|
+
sharedCipherDataSig?: string;
|
|
258
|
+
sharedCipherDataSigPxk?: KeyNode;
|
|
259
|
+
ownerCipherData?: string;
|
|
260
|
+
ownerCipherDataClearJson?: any;
|
|
261
|
+
ownerKey?: KeyNode;
|
|
262
|
+
ownerPlainData?: string;
|
|
263
|
+
ownerPlainDataJson?: any;
|
|
264
|
+
ownerPlainDataSig?: string;
|
|
265
|
+
receiverCipherData?: string;
|
|
266
|
+
receiverCipherDataClearJson?: any;
|
|
267
|
+
receiverKey?: KeyNode;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface UserSharedKeyNode extends Node, TimeStamped {
|
|
271
|
+
keyExchange?: KeyExchangeNode;
|
|
272
|
+
user?: UserNode;
|
|
273
|
+
userPrk?: KeyNode;
|
|
274
|
+
userSigPrk?: KeyNode;
|
|
275
|
+
other?: UserNode;
|
|
276
|
+
otherPbk?: KeyNode;
|
|
277
|
+
otherSigPbk?: KeyNode;
|
|
278
|
+
sharedKey?: KeyNode;
|
|
279
|
+
mkSharedKey?: KeyNode;
|
|
280
|
+
mkPxk?: KeyNode;
|
|
281
|
+
mkReshareRequestCipher?: string;
|
|
282
|
+
mkReshareResponseCipher?: string;
|
|
283
|
+
mkReshareRequestCipherClearJson?: any;
|
|
284
|
+
mkReshareResponseCipherClearJson?: any;
|
|
285
|
+
mkReshareRequestSent?: boolean;
|
|
286
|
+
mkReshareResponseSent?: boolean;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface CurrentUserSharedKeyNode extends Node, TimeStamped {
|
|
290
|
+
user?: UserNode;
|
|
291
|
+
other?: UserNode;
|
|
292
|
+
userSharedKey?: UserSharedKeyNode;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface TpNode extends Node, TimeStamped {
|
|
296
|
+
user?: UserNode;
|
|
297
|
+
other?: UserNode;
|
|
298
|
+
currentUserSharedKey?: CurrentUserSharedKeyNode;
|
|
299
|
+
isCompleted?: boolean;
|
|
300
|
+
sharedKey?: KeyNode;
|
|
301
|
+
sharedContactCard?: SharedContactCardNode;
|
|
302
|
+
myContactCard?: SharedContactCardNode;
|
|
303
|
+
myItems?: SharedItems;
|
|
304
|
+
sharedItems?: SharedItems;
|
|
305
|
+
myScenarios?: Connection<ScenarioNode>;
|
|
306
|
+
sharedScenarios?: Connection<SharedScenarioNode>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export enum TpAssemblyState {
|
|
310
|
+
DISABLED = 'DISABLED',
|
|
311
|
+
ENABLED = 'ENABLED',
|
|
312
|
+
CLAIMED = 'CLAIMED',
|
|
313
|
+
APPROVED = 'APPROVED',
|
|
314
|
+
REJECTED = 'REJECTED',
|
|
315
|
+
EXPIRED = 'EXPIRED',
|
|
316
|
+
CANCELLED = 'CANCELLED',
|
|
317
|
+
RESET = 'RESET',
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export enum TpClaimState {
|
|
321
|
+
CLAIMED = 'CLAIMED',
|
|
322
|
+
APPROVED = 'APPROVED',
|
|
323
|
+
REJECTED = 'REJECTED',
|
|
324
|
+
EXPIRED = 'EXPIRED',
|
|
325
|
+
CANCELLED = 'CANCELLED',
|
|
326
|
+
RESET = 'RESET',
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export enum TpClaimApproverState {
|
|
330
|
+
CLAIMED = 'CLAIMED',
|
|
331
|
+
APPROVED = 'APPROVED',
|
|
332
|
+
REJECTED = 'REJECTED',
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface TpPasswordResetApproval extends Node, TimeStamped {
|
|
336
|
+
approverEmail?: string;
|
|
337
|
+
receiverCipher?: string;
|
|
338
|
+
receiverCipherClearJson?: any;
|
|
339
|
+
receiverCipherPartialAssemblyKey?: string;
|
|
340
|
+
receiverCipherPartialAssemblyKeyClearJson?: any;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// export interface TpPasswordResetUser {
|
|
344
|
+
// username?: string;
|
|
345
|
+
// resetUsername?: string;
|
|
346
|
+
// state?: TpAssemblyState;
|
|
347
|
+
// passKey?: PassKeyNode;
|
|
348
|
+
// masterKey?: KeyNode;
|
|
349
|
+
// pxk?: KeyNode;
|
|
350
|
+
// approvals?: TpPasswordResetApproval[];
|
|
351
|
+
// assemblyCipherData?: string;
|
|
352
|
+
// wrappedAssemblyKeyVerifierPrk?: string;
|
|
353
|
+
// }
|
|
354
|
+
|
|
355
|
+
export interface TpPasswordResetUserApprovalNode extends Node, TimeStamped {
|
|
356
|
+
receiverCipher?: string;
|
|
357
|
+
receiverCipherClearJson?: any;
|
|
358
|
+
receiverCipherPartialAssemblyKey?: string;
|
|
359
|
+
receiverCipherPartialAssemblyKeyClearJson?: any;
|
|
360
|
+
approverEmail?: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface TpPasswordResetUserApprover {
|
|
364
|
+
name?: string;
|
|
365
|
+
email?: string;
|
|
366
|
+
state?: TpClaimApproverState;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export interface TpPasswordResetUserSubAssembly {
|
|
370
|
+
singleReject?: boolean;
|
|
371
|
+
quorum?: number;
|
|
372
|
+
approvers?: TpPasswordResetUserApprover[];
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface TpPasswordResetUserAssembly {
|
|
376
|
+
singleReject?: boolean;
|
|
377
|
+
quorum?: number;
|
|
378
|
+
subAssemblies?: TpPasswordResetUserSubAssembly[];
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export interface TpPasswordResetUserNode {
|
|
382
|
+
username?: string;
|
|
383
|
+
resetUsername?: string;
|
|
384
|
+
state?: TpClaimState;
|
|
385
|
+
passKey?: PassKeyNode;
|
|
386
|
+
masterKey?: KeyNode;
|
|
387
|
+
pxk?: KeyNode;
|
|
388
|
+
sessionEncryptionKey?: string;
|
|
389
|
+
approvals?: TpPasswordResetUserApprovalNode[];
|
|
390
|
+
assemblyCipherData?: string;
|
|
391
|
+
wrappedAssemblyKeyVerifierPrk?: string;
|
|
392
|
+
assembly?: TpPasswordResetUserAssembly;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface TpPasswordResetNode extends Node, TimeStamped {
|
|
396
|
+
assembly?: TpAssemblyNode;
|
|
397
|
+
request?: TpPasswordResetRequestNode;
|
|
398
|
+
applied?: boolean;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export interface TpAssemblyNode extends Node, TimeStamped {
|
|
402
|
+
id?: ID;
|
|
403
|
+
singleReject?: boolean;
|
|
404
|
+
quorum?: number;
|
|
405
|
+
subjectKey?: KeyNode;
|
|
406
|
+
assemblyKey?: KeyNode;
|
|
407
|
+
assemblyCipherData?: string;
|
|
408
|
+
assemblyCipherDataClearJson?: any;
|
|
409
|
+
subAssemblies?: Connection<TpSubAssemblyNode>;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface TpSubAssemblyNode extends Node, TimeStamped {
|
|
413
|
+
singleReject?: boolean;
|
|
414
|
+
quorum?: number;
|
|
415
|
+
subjectCipherData?: string;
|
|
416
|
+
subjectCipherDataClearJson?: string;
|
|
417
|
+
approvers?: Connection<TpAssemblyApproverNode>;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export interface TpAssemblyApproverNode extends Node, TimeStamped {
|
|
421
|
+
sharedKey?: KeyNode;
|
|
422
|
+
sharedCipherData?: string;
|
|
423
|
+
sharedCipherApprovalData?: string;
|
|
424
|
+
tp?: TpNode;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export interface SharedTpPasswordResetNode extends Node, TimeStamped {
|
|
428
|
+
assembly?: SharedTpAssemblyNode;
|
|
429
|
+
tp?: TpNode;
|
|
430
|
+
sharedRequest?: SharedTpPasswordResetRequestNode;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export interface SharedTpAssemblyNode extends Node, TimeStamped {
|
|
434
|
+
asApprovers?: Connection<TpAssemblyAsApproverNode>;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface TpAssemblyAsApproverNode extends Node, TimeStamped {
|
|
438
|
+
sharedKey?: KeyNode;
|
|
439
|
+
sharedCipherData?: string;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface SharedTpPasswordResetRequestNode extends Node, TimeStamped {
|
|
443
|
+
claim?: SharedTpClaimNode;
|
|
444
|
+
pxk?: KeyNode;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export interface SharedTpClaimNode extends Node, TimeStamped {
|
|
448
|
+
state?: TpClaimState;
|
|
449
|
+
asClaimApprovers?: Connection<SharedTpClaimApproverNode>;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface SharedTpClaimApproverNode extends Node, TimeStamped {
|
|
453
|
+
state?: TpClaimApproverState;
|
|
454
|
+
sharedKey?: KeyNode;
|
|
455
|
+
sharedCipherApprovalData?: string;
|
|
456
|
+
sharedCipherPartialAssemblyKey?: string;
|
|
457
|
+
receiverApprovals?: Connection<SharedTpClaimReceiverApprovalNode>;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface SharedTpClaimReceiverApprovalNode extends Node, TimeStamped {
|
|
461
|
+
pxk?: KeyNode;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export enum LockState {
|
|
465
|
+
UNLOCKED = 'UNLOCKED',
|
|
466
|
+
MUTEX_LOCKED = 'MUTEX_LOCKED',
|
|
467
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
2
|
+
import { LifeReadyConfig } from '../life-ready.config';
|
|
3
|
+
|
|
4
|
+
export function handleCognitoCallback<T>(
|
|
5
|
+
method: (callback: (err?: Error, result?: T) => void) => void
|
|
6
|
+
): Promise<T> {
|
|
7
|
+
return new Promise<T>((resolve, reject) =>
|
|
8
|
+
method((err, result) => (err ? reject(err) : resolve(result)))
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const awsFetch = (authUrl: string) => {
|
|
13
|
+
const fetch = window.fetch;
|
|
14
|
+
|
|
15
|
+
return (url, options) => {
|
|
16
|
+
const pass = () => fetch(url, options);
|
|
17
|
+
|
|
18
|
+
if (!options || !options.headers || !options.headers['X-Amz-Target']) {
|
|
19
|
+
return pass();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const operation = options.headers['X-Amz-Target'].split('.');
|
|
23
|
+
if (
|
|
24
|
+
operation.length < 2 ||
|
|
25
|
+
operation[0] !== 'AWSCognitoIdentityProviderService'
|
|
26
|
+
) {
|
|
27
|
+
return pass();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const body = JSON.parse(options.body);
|
|
31
|
+
|
|
32
|
+
if (body && body.ClientMetadata && body.ClientMetadata.noProxy === 'true') {
|
|
33
|
+
return pass();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let custom = false;
|
|
37
|
+
|
|
38
|
+
if (operation[1] === 'RespondToAuthChallenge') {
|
|
39
|
+
if (body && body.ChallengeName === 'NEW_PASSWORD_REQUIRED') {
|
|
40
|
+
return pass();
|
|
41
|
+
}
|
|
42
|
+
custom = true;
|
|
43
|
+
} else if (operation[1] === 'InitiateAuth') {
|
|
44
|
+
if (body.AuthFlow === 'REFRESH_TOKEN_AUTH') {
|
|
45
|
+
custom = true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!custom) {
|
|
50
|
+
return pass();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return fetch(`${authUrl}auth/proxy/`, {
|
|
54
|
+
...options,
|
|
55
|
+
credentials: 'include',
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const configureAmplifyAuth = (
|
|
61
|
+
{ authUrl: authUrl, userPoolId, userPoolWebClientId }: LifeReadyConfig,
|
|
62
|
+
auth: AuthClass
|
|
63
|
+
) => {
|
|
64
|
+
return () => {
|
|
65
|
+
const tokens = userPoolId.split('_');
|
|
66
|
+
if (tokens.length < 2) {
|
|
67
|
+
throw new Error('userPoolId should have this format: {aws-region}_xxxxx');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
window.fetch = awsFetch(authUrl);
|
|
71
|
+
|
|
72
|
+
auth.configure({
|
|
73
|
+
// REQUIRED - Amazon Cognito Region
|
|
74
|
+
region: tokens[0],
|
|
75
|
+
// OPTIONAL - Amazon Cognito User Pool ID
|
|
76
|
+
userPoolId,
|
|
77
|
+
// OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
|
|
78
|
+
userPoolWebClientId,
|
|
79
|
+
// OPTIONAL - Enforce user authentication prior to accessing AWS resources or not
|
|
80
|
+
mandatorySignIn: false,
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
import { gqlTyped } from '../_common/ast';
|
|
3
|
+
|
|
4
|
+
export const PasswordChangeRequestMutation = gql`
|
|
5
|
+
mutation {
|
|
6
|
+
passwordChangeRequest(input: {}) {
|
|
7
|
+
challenge
|
|
8
|
+
passKeys {
|
|
9
|
+
id
|
|
10
|
+
passIdpParams
|
|
11
|
+
wrappedPassIdpVerifierPrk
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export const PasswordChangeMutation = gql`
|
|
18
|
+
mutation PasswordChange($input: PasswordChangeInput!) {
|
|
19
|
+
passwordChange(input: $input) {
|
|
20
|
+
token
|
|
21
|
+
newPassKey {
|
|
22
|
+
id
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export const PasswordChangeConfigQuery = gql`
|
|
29
|
+
query PasswordChangeConfigQuery {
|
|
30
|
+
passwordChangeConfig {
|
|
31
|
+
maxAuthAgeSeconds
|
|
32
|
+
authTime
|
|
33
|
+
serverTime
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export interface SetSessionEncryptionKeyMutation {
|
|
39
|
+
setSessionEncryptionKey: {
|
|
40
|
+
sessionEncryptionKey: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export const SetSessionEncryptionKeyMutation = gqlTyped<SetSessionEncryptionKeyMutation>`
|
|
44
|
+
mutation SetSessionEncryptionKeyMutation($input: SetSessionEncryptionKeyInput!) {
|
|
45
|
+
setSessionEncryptionKey(input: $input) {
|
|
46
|
+
sessionEncryptionKey
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
export interface ClearSessionEncryptionKeyMutation {
|
|
52
|
+
clearSessionEncryptionKey: {
|
|
53
|
+
sessionEncryptionKey: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export const ClearSessionEncryptionKeyMutation = gqlTyped<ClearSessionEncryptionKeyMutation>`
|
|
57
|
+
mutation ClearSessionEncryptionKeyMutation {
|
|
58
|
+
clearSessionEncryptionKey(input: {}) {
|
|
59
|
+
sessionEncryptionKey
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CognitoUser } from '@aws-amplify/auth';
|
|
2
|
+
import { JWK } from 'node-jose';
|
|
3
|
+
import { TpPasswordResetUserNode } from '../api/types';
|
|
4
|
+
import {
|
|
5
|
+
PassIdpParams,
|
|
6
|
+
PassKeyParams,
|
|
7
|
+
} from '../cryptography/cryptography.types';
|
|
8
|
+
import { UserPlan } from '../plan/plan.types';
|
|
9
|
+
import { CurrentUserKey, MainContactCard } from '../users/profile.types';
|
|
10
|
+
import { UserDelete } from '../users/user.types';
|
|
11
|
+
|
|
12
|
+
export interface PassKeyBundle {
|
|
13
|
+
passKeyParams: PassKeyParams;
|
|
14
|
+
passKey: JWK.Key;
|
|
15
|
+
passIdpParams: PassIdpParams;
|
|
16
|
+
passIdp: JWK.Key;
|
|
17
|
+
passIdpVerifier: JWK.Key;
|
|
18
|
+
wrappedPassIdpVerifierPrk: object;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class CognitoChallengeUser extends CognitoUser {
|
|
22
|
+
recoveryStatus: RecoveryStatus;
|
|
23
|
+
challengeName: 'SMS_MFA' | 'SOFTWARE_TOKEN_MFA';
|
|
24
|
+
challengeParam: any;
|
|
25
|
+
isTpPasswordResetUser = false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum FeatureAction {
|
|
29
|
+
// Just the one for now
|
|
30
|
+
ACCESS = 'access',
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class Features {
|
|
34
|
+
myVault: FeatureAction[];
|
|
35
|
+
tpVault: FeatureAction[];
|
|
36
|
+
shareVault: FeatureAction[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export class CurrentUser {
|
|
40
|
+
id: string;
|
|
41
|
+
sub: string;
|
|
42
|
+
username: string;
|
|
43
|
+
currentUserKey: CurrentUserKey;
|
|
44
|
+
email: string;
|
|
45
|
+
emailVerified: boolean;
|
|
46
|
+
phone: string;
|
|
47
|
+
phoneVerified: boolean;
|
|
48
|
+
getAccessJwtToken: () => string;
|
|
49
|
+
contactCard: MainContactCard;
|
|
50
|
+
userDelete?: UserDelete;
|
|
51
|
+
userPlans: UserPlan[];
|
|
52
|
+
features: Features;
|
|
53
|
+
hasTPVaultAccess: boolean;
|
|
54
|
+
sessionEncryptionKey: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface TpPasswordResetUser extends TpPasswordResetUserNode {
|
|
58
|
+
sub: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class LoginResult {
|
|
62
|
+
hasChallenge: boolean;
|
|
63
|
+
challenge?: CognitoChallengeUser;
|
|
64
|
+
user?: CurrentUser;
|
|
65
|
+
resetUser?: TpPasswordResetUserNode;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class RegisterResult {
|
|
69
|
+
username: string;
|
|
70
|
+
userId: string;
|
|
71
|
+
preSignUpToken: string;
|
|
72
|
+
userSub: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export enum RecoveryStatus {
|
|
76
|
+
NONE = 'none',
|
|
77
|
+
NEW_PASSWORD = 'new-password',
|
|
78
|
+
OLD_PASSWORD = 'old-password',
|
|
79
|
+
}
|