@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,72 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { User, GetUserInput, UserDelete } from './user.types';
|
|
3
|
+
import {
|
|
4
|
+
UserQuery,
|
|
5
|
+
UserQueryType,
|
|
6
|
+
RequestUserDeleteMutation,
|
|
7
|
+
CancelUserDeleteMutation,
|
|
8
|
+
LoginHistoryQuery,
|
|
9
|
+
} from './user.gql';
|
|
10
|
+
import { LrApolloService } from '../api/lr-apollo.service';
|
|
11
|
+
|
|
12
|
+
@Injectable({
|
|
13
|
+
providedIn: 'root',
|
|
14
|
+
})
|
|
15
|
+
export class UserService {
|
|
16
|
+
constructor(private lrApollo: LrApolloService) {}
|
|
17
|
+
|
|
18
|
+
async getUserByEmail(email: string): Promise<User> {
|
|
19
|
+
return this.getUser({ email });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async getUserByUsername(username: string): Promise<User> {
|
|
23
|
+
return this.getUser({ username });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async getUser({ email, username }: GetUserInput): Promise<User> {
|
|
27
|
+
const { user } = await this.lrApollo.query<UserQueryType>({
|
|
28
|
+
query: UserQuery,
|
|
29
|
+
variables: {
|
|
30
|
+
email,
|
|
31
|
+
username,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
return user;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async requestUserDelete(): Promise<UserDelete> {
|
|
38
|
+
const res = await this.lrApollo.mutate<{ requestUserDelete: any }>({
|
|
39
|
+
mutation: RequestUserDeleteMutation,
|
|
40
|
+
variables: {
|
|
41
|
+
input: {},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return res.requestUserDelete.userDelete;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async cancelUserDelete(): Promise<string> {
|
|
49
|
+
const res = await this.lrApollo.mutate<{ cancelUserDelete: any }>({
|
|
50
|
+
mutation: CancelUserDeleteMutation,
|
|
51
|
+
variables: {
|
|
52
|
+
input: {},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
return res.cancelUserDelete.id;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async loginHistory(first: number = null, after: string = null): Promise<any> {
|
|
60
|
+
// first: return first n entries
|
|
61
|
+
// after: pass in the pageInfo.endCursor to paginate
|
|
62
|
+
const res = await this.lrApollo.query<{ loginHistory: any }>({
|
|
63
|
+
query: LoginHistoryQuery,
|
|
64
|
+
variables: {
|
|
65
|
+
first,
|
|
66
|
+
after,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
return res.loginHistory;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Key } from '../cryptography/cryptography.types';
|
|
2
|
+
|
|
3
|
+
export interface GetUserInput {
|
|
4
|
+
email?: string;
|
|
5
|
+
username?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface User {
|
|
9
|
+
id?: string;
|
|
10
|
+
username?: string;
|
|
11
|
+
haveTp: boolean;
|
|
12
|
+
isCurrentUser: boolean;
|
|
13
|
+
contactCards?: any;
|
|
14
|
+
currentUserKey: {
|
|
15
|
+
sigPxk?: Key;
|
|
16
|
+
pxk?: Key;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum UserDeleteState {
|
|
21
|
+
REQUESTED = 'REQUESTED',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface UserDelete {
|
|
25
|
+
created?: string;
|
|
26
|
+
state: UserDeleteState;
|
|
27
|
+
}
|
|
@@ -1,77 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './lib/
|
|
6
|
-
|
|
7
|
-
export * from './lib/api/
|
|
8
|
-
export * from './lib/api/
|
|
9
|
-
export * from './lib/
|
|
10
|
-
export * from './lib/
|
|
11
|
-
export * from './lib/
|
|
12
|
-
export * from './lib/
|
|
13
|
-
export * from './lib/
|
|
14
|
-
export * from './lib/
|
|
15
|
-
|
|
16
|
-
export * from './lib/auth/
|
|
17
|
-
export * from './lib/auth/
|
|
18
|
-
export * from './lib/auth/
|
|
19
|
-
export * from './lib/
|
|
20
|
-
export * from './lib/
|
|
21
|
-
export * from './lib/
|
|
22
|
-
export * from './lib/
|
|
23
|
-
export * from './lib/
|
|
24
|
-
export * from './lib/
|
|
25
|
-
|
|
26
|
-
export * from './lib/cryptography/
|
|
27
|
-
export * from './lib/
|
|
28
|
-
export * from './lib/
|
|
29
|
-
export * from './lib/
|
|
30
|
-
export * from './lib/
|
|
31
|
-
export * from './lib/
|
|
32
|
-
export * from './lib/
|
|
33
|
-
export * from './lib/
|
|
34
|
-
|
|
35
|
-
export * from './lib/
|
|
36
|
-
export * from './lib/
|
|
37
|
-
export * from './lib/
|
|
38
|
-
export * from './lib/
|
|
39
|
-
|
|
40
|
-
export * from './lib/
|
|
41
|
-
export * from './lib/
|
|
42
|
-
export * from './lib/
|
|
43
|
-
export * from './lib/
|
|
44
|
-
|
|
45
|
-
export * from './lib/
|
|
46
|
-
export * from './lib/
|
|
47
|
-
|
|
48
|
-
export * from './lib/
|
|
49
|
-
export * from './lib/
|
|
50
|
-
export * from './lib/
|
|
51
|
-
|
|
52
|
-
export * from './lib/scenario/
|
|
53
|
-
export * from './lib/
|
|
54
|
-
export * from './lib/
|
|
55
|
-
export * from './lib/
|
|
56
|
-
|
|
57
|
-
export * from './lib/
|
|
58
|
-
export * from './lib/
|
|
59
|
-
export * from './lib/
|
|
60
|
-
|
|
61
|
-
export * from './lib/
|
|
62
|
-
export * from './lib/
|
|
63
|
-
export * from './lib/
|
|
64
|
-
|
|
65
|
-
export * from './lib/
|
|
66
|
-
export
|
|
67
|
-
export * from './lib/
|
|
68
|
-
|
|
69
|
-
export * from './lib/
|
|
70
|
-
export * from './lib/
|
|
71
|
-
export * from './lib/
|
|
72
|
-
export * from './lib/
|
|
73
|
-
export * from './lib/
|
|
74
|
-
export * from './lib/
|
|
75
|
-
export * from './lib/
|
|
76
|
-
|
|
77
|
-
export * from './lib/
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of lr-auth
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './lib/_common/exceptions';
|
|
6
|
+
|
|
7
|
+
export * from './lib/api/file.service';
|
|
8
|
+
export * from './lib/api/key-exchange.service';
|
|
9
|
+
export * from './lib/api/key-exchange.types';
|
|
10
|
+
export * from './lib/api/key-exchange.gql';
|
|
11
|
+
export * from './lib/api/lr-apollo.service';
|
|
12
|
+
export * from './lib/api/persist.service';
|
|
13
|
+
export * from './lib/api/message.service';
|
|
14
|
+
export * from './lib/_common/queries.gql';
|
|
15
|
+
|
|
16
|
+
export * from './lib/auth/auth.types';
|
|
17
|
+
export * from './lib/auth/auth.config';
|
|
18
|
+
export * from './lib/auth/lbop.service';
|
|
19
|
+
export * from './lib/auth/life-ready-auth.service';
|
|
20
|
+
export * from './lib/auth/password.service';
|
|
21
|
+
export * from './lib/auth/register.service';
|
|
22
|
+
export * from './lib/auth/two-factor.service';
|
|
23
|
+
export * from './lib/auth/idle.types';
|
|
24
|
+
export * from './lib/auth/idle.service';
|
|
25
|
+
|
|
26
|
+
export * from './lib/cryptography/encryption.service';
|
|
27
|
+
export * from './lib/cryptography/key.service';
|
|
28
|
+
export * from './lib/cryptography/key-factory.service';
|
|
29
|
+
export * from './lib/cryptography/key-graph.service';
|
|
30
|
+
export * from './lib/cryptography/key-meta.service';
|
|
31
|
+
export * from './lib/cryptography/cryptography.types';
|
|
32
|
+
export * from './lib/cryptography/slip39.service';
|
|
33
|
+
export * from './lib/cryptography/web-crypto.service';
|
|
34
|
+
|
|
35
|
+
export * from './lib/category/category-meta.service';
|
|
36
|
+
export * from './lib/category/category.types';
|
|
37
|
+
export * from './lib/category/category.gql';
|
|
38
|
+
export * from './lib/category/category.service';
|
|
39
|
+
|
|
40
|
+
export * from './lib/record/record-attachment.service';
|
|
41
|
+
export * from './lib/record/record.types';
|
|
42
|
+
export * from './lib/record/record.gql';
|
|
43
|
+
export * from './lib/record/record.service';
|
|
44
|
+
|
|
45
|
+
export * from './lib/record-type/record-type.types';
|
|
46
|
+
export * from './lib/record-type/record-type.service';
|
|
47
|
+
|
|
48
|
+
export * from './lib/trusted-parties/trusted-party.types';
|
|
49
|
+
export * from './lib/trusted-parties/trusted-party.gql';
|
|
50
|
+
export * from './lib/trusted-parties/trusted-party.service';
|
|
51
|
+
|
|
52
|
+
export * from './lib/scenario/scenario.types';
|
|
53
|
+
export * from './lib/scenario/scenario.gql';
|
|
54
|
+
export * from './lib/scenario/scenario.service';
|
|
55
|
+
export * from './lib/scenario/scenario-setup.service';
|
|
56
|
+
|
|
57
|
+
export * from './lib/scenario/approvals/scenario-approval.types';
|
|
58
|
+
export * from './lib/scenario/approvals/scenario-approval.gql';
|
|
59
|
+
export * from './lib/scenario/approvals/scenario-approver.service';
|
|
60
|
+
|
|
61
|
+
export * from './lib/scenario/claimants/scenario-claimant.types';
|
|
62
|
+
export * from './lib/scenario/claimants/scenario-claimant.gql';
|
|
63
|
+
export * from './lib/scenario/claimants/scenario-claimant.service';
|
|
64
|
+
|
|
65
|
+
export * from './lib/scenario/receivers/scenario-receiver.types';
|
|
66
|
+
export * from './lib/scenario/receivers/scenario-receiver.gql';
|
|
67
|
+
export * from './lib/scenario/receivers/scenario-receiver.service';
|
|
68
|
+
|
|
69
|
+
export * from './lib/users/profile.gql';
|
|
70
|
+
export * from './lib/users/profile.service';
|
|
71
|
+
export * from './lib/users/profile-details.service';
|
|
72
|
+
export * from './lib/users/profile.types';
|
|
73
|
+
export * from './lib/users/user.gql';
|
|
74
|
+
export * from './lib/users/user.service';
|
|
75
|
+
export * from './lib/users/user.types';
|
|
76
|
+
|
|
77
|
+
export * from './lib/life-ready.config';
|
|
78
|
+
export * from './lib/life-ready.module';
|
|
79
|
+
export * from './lib/plan/plan.types';
|
|
80
|
+
export * from './lib/plan/plan.service';
|
|
81
|
+
export * from './lib/search/search.types';
|
|
82
|
+
export * from './lib/search/search.service';
|
|
83
|
+
|
|
84
|
+
export { gqlTyped } from './lib/_common/ast';
|
|
85
|
+
|
|
86
|
+
export * from './lib/api/lr-graphql';
|
|
87
|
+
export * from './lib/api/query-processor';
|
|
88
|
+
export * from './lib/api/contact-card2.service';
|
|
89
|
+
export * from './lib/api/item2.service';
|
|
90
|
+
export * from './lib/api/key-exchange2.service';
|
|
91
|
+
export * from './lib/api/shared-contact-card2.service';
|
|
92
|
+
export * from './lib/api/lock.service';
|
|
93
|
+
export * from './lib/trusted-parties/trusted-party2.service';
|
|
94
|
+
export * from './lib/trusted-parties/tp-password-reset.service';
|
|
95
|
+
export * from './lib/trusted-parties/tp-password-reset-user.service';
|
|
96
|
+
export * from './lib/trusted-parties/tp-password-reset-request.service';
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/dist/zone';
|
|
4
|
+
import 'zone.js/dist/zone-testing';
|
|
5
|
+
import { getTestBed } from '@angular/core/testing';
|
|
6
|
+
import {
|
|
7
|
+
BrowserDynamicTestingModule,
|
|
8
|
+
platformBrowserDynamicTesting,
|
|
9
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
10
|
+
|
|
11
|
+
declare const require: any;
|
|
12
|
+
|
|
13
|
+
// First, initialize the Angular testing environment.
|
|
14
|
+
getTestBed().initTestEnvironment(
|
|
15
|
+
BrowserDynamicTestingModule,
|
|
16
|
+
platformBrowserDynamicTesting()
|
|
17
|
+
);
|
|
18
|
+
// Then we find all the tests.
|
|
19
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
20
|
+
// And load the modules.
|
|
21
|
+
context.keys().map(context);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../out-tsc/lib",
|
|
5
|
+
"target": "es2015",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"inlineSources": true,
|
|
8
|
+
"types": [],
|
|
9
|
+
"lib": ["dom", "es2018"],
|
|
10
|
+
"allowSyntheticDefaultImports": true
|
|
11
|
+
},
|
|
12
|
+
"angularCompilerOptions": {
|
|
13
|
+
"skipTemplateCodegen": true,
|
|
14
|
+
"strictMetadataEmit": true,
|
|
15
|
+
"fullTemplateTypeCheck": true,
|
|
16
|
+
"strictInjectionParameters": true,
|
|
17
|
+
"enableResourceInlining": true,
|
|
18
|
+
"enableIvy": false
|
|
19
|
+
},
|
|
20
|
+
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
|
21
|
+
}
|