@lifeready/core 1.0.21 → 1.0.23

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.
Files changed (277) hide show
  1. package/bundles/lifeready-core.umd.js +10612 -10527
  2. package/bundles/lifeready-core.umd.js.map +1 -1
  3. package/bundles/lifeready-core.umd.min.js +1 -15
  4. package/bundles/lifeready-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/_common/ast.js +2 -1
  6. package/esm2015/lib/_common/deferred-promise.js +1 -1
  7. package/esm2015/lib/_common/exceptions.js +1 -1
  8. package/esm2015/lib/_common/queries.gql.js +1 -1
  9. package/esm2015/lib/_common/run-outside-angular.js +3 -2
  10. package/esm2015/lib/_common/types.js +2 -1
  11. package/esm2015/lib/_common/utils.js +2 -1
  12. package/esm2015/lib/api/lr-apollo.service.js +4 -3
  13. package/esm2015/lib/api/lr-graphql/index.js +1 -1
  14. package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +9 -8
  15. package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +5 -6
  16. package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +1 -1
  17. package/esm2015/lib/api/lr-graphql/lr-mutation.js +3 -3
  18. package/esm2015/lib/api/lr-graphql/lr.service.js +1 -1
  19. package/esm2015/lib/api/query-processor/common-processors.service.js +4 -3
  20. package/esm2015/lib/api/query-processor/index.js +1 -1
  21. package/esm2015/lib/api/query-processor/query-processor.service.js +5 -4
  22. package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +8 -7
  23. package/esm2015/lib/api/types/graphql.types.js +2 -1
  24. package/esm2015/lib/api/types/index.js +1 -1
  25. package/esm2015/lib/api/types/lr-graphql.types.js +1 -1
  26. package/esm2015/lib/auth/auth.config.js +1 -1
  27. package/esm2015/lib/auth/auth.gql.js +1 -28
  28. package/esm2015/lib/auth/auth.types.js +1 -1
  29. package/esm2015/lib/auth/life-ready-auth.service.js +36 -32
  30. package/esm2015/lib/category/category-meta.service.js +1 -1
  31. package/esm2015/lib/category/category.gql.js +3 -2
  32. package/esm2015/lib/category/category.service.js +9 -8
  33. package/esm2015/lib/category/category.types.js +1 -1
  34. package/esm2015/lib/contact-card/contact-card.gql.js +79 -0
  35. package/esm2015/lib/contact-card/contact-card.service.js +156 -0
  36. package/esm2015/lib/contact-card/contact-card2.gql.js +29 -0
  37. package/esm2015/lib/contact-card/contact-card2.service.js +103 -0
  38. package/esm2015/lib/encryption/encryption.service.js +190 -0
  39. package/esm2015/lib/file-upload/file-upload.service.js +74 -0
  40. package/esm2015/lib/file-upload/file-upload.types.js +2 -0
  41. package/esm2015/lib/idle/idle.service.js +168 -0
  42. package/esm2015/lib/idle/idle.types.js +7 -0
  43. package/esm2015/lib/item2/item2.gql.js +127 -0
  44. package/esm2015/lib/item2/item2.gql.private.js +23 -0
  45. package/esm2015/lib/item2/item2.service.js +519 -0
  46. package/esm2015/lib/item2/item2.types.js +2 -0
  47. package/esm2015/lib/key/key-factory.service.js +237 -0
  48. package/esm2015/lib/key/key-graph.service.js +300 -0
  49. package/esm2015/lib/key/key-meta.service.js +201 -0
  50. package/esm2015/lib/{cryptography → key}/key.service.js +4 -4
  51. package/esm2015/lib/key/key.types.js +11 -0
  52. package/esm2015/lib/key-exchange/key-exchange.gql.js +188 -0
  53. package/esm2015/lib/key-exchange/key-exchange.service.js +441 -0
  54. package/esm2015/lib/key-exchange/key-exchange.types.js +7 -0
  55. package/esm2015/lib/key-exchange/key-exchange2.gql.js +171 -0
  56. package/esm2015/lib/key-exchange/key-exchange2.service.js +500 -0
  57. package/esm2015/lib/lbop/lbop.service.js +357 -0
  58. package/esm2015/lib/life-ready.config.js +2 -1
  59. package/esm2015/lib/life-ready.module.js +2 -27
  60. package/esm2015/lib/lock/lock.gql.js +40 -0
  61. package/esm2015/lib/lock/lock.service.js +64 -0
  62. package/esm2015/lib/message/message.gql.js +32 -0
  63. package/esm2015/lib/message/message.service.js +118 -0
  64. package/esm2015/lib/message/message.types.js +2 -0
  65. package/esm2015/lib/notification/notification.gql.js +1 -1
  66. package/esm2015/lib/notification/notification.service.js +2 -2
  67. package/esm2015/lib/password/password.gql.js +28 -0
  68. package/esm2015/lib/password/password.service.js +316 -0
  69. package/esm2015/lib/persist/persist.service.js +181 -0
  70. package/esm2015/lib/plan/plan.gql.js +1 -1
  71. package/esm2015/lib/plan/plan.service.js +3 -2
  72. package/esm2015/lib/plan/plan.types.js +1 -1
  73. package/esm2015/lib/profile/profile-details.service.js +215 -0
  74. package/esm2015/lib/profile/profile.gql.js +98 -0
  75. package/esm2015/lib/profile/profile.service.js +170 -0
  76. package/esm2015/lib/profile/profile.types.js +34 -0
  77. package/esm2015/lib/record/record-attachment.service.js +16 -15
  78. package/esm2015/lib/record/record.gql.js +1 -1
  79. package/esm2015/lib/record/record.service.js +8 -8
  80. package/esm2015/lib/record/record.types.js +1 -1
  81. package/esm2015/lib/record-type/record-type.service.js +1 -1
  82. package/esm2015/lib/record-type/record-type.types.js +1 -1
  83. package/esm2015/lib/register/register.service.js +173 -0
  84. package/esm2015/lib/scenario/scenario.constants.js +1 -1
  85. package/esm2015/lib/scenario/scenario.controller.js +2 -2
  86. package/esm2015/lib/scenario/scenario.gql.js +1 -1
  87. package/esm2015/lib/scenario/scenario.private.gql.js +198 -0
  88. package/esm2015/lib/scenario/scenario.service.js +19 -17
  89. package/esm2015/lib/scenario/scenario.types.js +2 -1
  90. package/esm2015/lib/shared-contact-card/shared-contact-card.service.js +119 -0
  91. package/esm2015/lib/shared-contact-card/shared-contact-card2.gql.js +41 -0
  92. package/esm2015/lib/shared-contact-card/shared-contact-card2.service.js +117 -0
  93. package/esm2015/lib/slip39/slip39.service.js +167 -0
  94. package/esm2015/lib/time/time.service.js +146 -0
  95. package/esm2015/lib/tp-assembly/tp-assembly.js +365 -0
  96. package/esm2015/lib/tp-assembly/tp-assembly.private.gql.js +22 -0
  97. package/esm2015/lib/tp-assembly/tp-assembly.types.js +2 -0
  98. package/esm2015/lib/tp-password-reset/tp-password-reset-request.service.js +100 -0
  99. package/esm2015/lib/tp-password-reset/tp-password-reset-user.service.js +118 -0
  100. package/esm2015/lib/tp-password-reset/tp-password-reset.constants.js +4 -0
  101. package/esm2015/lib/tp-password-reset/tp-password-reset.controller.js +34 -0
  102. package/esm2015/lib/tp-password-reset/tp-password-reset.gql.js +74 -0
  103. package/esm2015/lib/tp-password-reset/tp-password-reset.private.gql.js +165 -0
  104. package/esm2015/lib/tp-password-reset/tp-password-reset.private.service.js +54 -0
  105. package/esm2015/lib/tp-password-reset/tp-password-reset.service.js +92 -0
  106. package/esm2015/lib/tp-password-reset/tp-password-reset.types.js +2 -0
  107. package/esm2015/lib/trusted-party/trusted-party.gql.js +148 -0
  108. package/esm2015/lib/trusted-party/trusted-party.service.js +327 -0
  109. package/esm2015/lib/trusted-party/trusted-party.types.js +41 -0
  110. package/esm2015/lib/trusted-party/trusted-party2.gql.js +64 -0
  111. package/esm2015/lib/trusted-party/trusted-party2.gql.private.js +25 -0
  112. package/esm2015/lib/trusted-party/trusted-party2.service.js +224 -0
  113. package/esm2015/lib/trusted-party/trusted-party2.types.js +2 -0
  114. package/esm2015/lib/two-factor/two-factor.service.js +74 -0
  115. package/esm2015/lib/user/user.gql.js +60 -0
  116. package/esm2015/lib/user/user.service.js +80 -0
  117. package/esm2015/lib/user/user.types.js +2 -0
  118. package/esm2015/lib/web-crypto/web-crypto.service.js +29 -0
  119. package/esm2015/lifeready-core.js +15 -13
  120. package/esm2015/public-api.js +49 -51
  121. package/fesm2015/lifeready-core.js +8764 -8737
  122. package/fesm2015/lifeready-core.js.map +1 -1
  123. package/lib/_common/types.d.ts +3 -1
  124. package/lib/_common/utils.d.ts +2 -2
  125. package/lib/api/lr-apollo.service.d.ts +2 -2
  126. package/lib/api/lr-graphql/lr-graphql.service.d.ts +26 -8
  127. package/lib/api/lr-graphql/lr-merged-mutation.d.ts +22 -4
  128. package/lib/api/lr-graphql/lr-mutation.d.ts +1 -2
  129. package/lib/api/query-processor/common-processors.service.d.ts +1 -1
  130. package/lib/api/query-processor/query-processor.service.d.ts +1 -1
  131. package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +2 -2
  132. package/lib/api/types/lr-graphql.types.d.ts +14 -3
  133. package/lib/auth/auth.gql.d.ts +0 -3
  134. package/lib/auth/auth.types.d.ts +5 -5
  135. package/lib/auth/life-ready-auth.service.d.ts +13 -13
  136. package/lib/category/category.gql.d.ts +1 -1
  137. package/lib/category/category.service.d.ts +3 -3
  138. package/lib/{api → contact-card}/contact-card.service.d.ts +9 -9
  139. package/lib/contact-card/contact-card2.gql.d.ts +25 -0
  140. package/lib/contact-card/contact-card2.service.d.ts +64 -0
  141. package/lib/{cryptography → encryption}/encryption.service.d.ts +10 -9
  142. package/lib/{api/file.service.d.ts → file-upload/file-upload.service.d.ts} +5 -8
  143. package/lib/file-upload/file-upload.types.d.ts +5 -0
  144. package/lib/{auth → idle}/idle.service.d.ts +6 -6
  145. package/lib/{items2 → item2}/item2.gql.d.ts +16 -16
  146. package/lib/{items2 → item2}/item2.service.d.ts +34 -35
  147. package/lib/{cryptography → key}/key-factory.service.d.ts +4 -3
  148. package/lib/{cryptography → key}/key-graph.service.d.ts +6 -6
  149. package/lib/{cryptography → key}/key-meta.service.d.ts +1 -1
  150. package/lib/{cryptography → key}/key.service.d.ts +2 -2
  151. package/lib/{cryptography/cryptography.types.d.ts → key/key.types.d.ts} +13 -17
  152. package/lib/{api → key-exchange}/key-exchange.service.d.ts +5 -5
  153. package/lib/{api → key-exchange}/key-exchange.types.d.ts +4 -4
  154. package/lib/{api → key-exchange}/key-exchange2.gql.d.ts +1 -1
  155. package/lib/{api → key-exchange}/key-exchange2.service.d.ts +82 -29
  156. package/lib/{auth → lbop}/lbop.service.d.ts +7 -7
  157. package/lib/life-ready.config.d.ts +1 -1
  158. package/lib/{api → lock}/lock.gql.d.ts +1 -1
  159. package/lib/{api → lock}/lock.service.d.ts +1 -1
  160. package/lib/message/message.gql.d.ts +13 -0
  161. package/lib/message/message.service.d.ts +36 -0
  162. package/lib/message/message.types.d.ts +12 -0
  163. package/lib/notification/notification.service.d.ts +3 -2
  164. package/lib/password/password.gql.d.ts +3 -0
  165. package/lib/{auth → password}/password.service.d.ts +9 -9
  166. package/lib/{api → persist}/persist.service.d.ts +3 -3
  167. package/lib/plan/plan.service.d.ts +3 -2
  168. package/lib/plan/plan.types.d.ts +2 -1
  169. package/lib/{users → profile}/profile-details.service.d.ts +3 -3
  170. package/lib/{users → profile}/profile.gql.d.ts +2 -2
  171. package/lib/{users → profile}/profile.service.d.ts +6 -6
  172. package/lib/{users → profile}/profile.types.d.ts +3 -2
  173. package/lib/record/record-attachment.service.d.ts +6 -6
  174. package/lib/record/record.service.d.ts +3 -3
  175. package/lib/{auth → register}/register.service.d.ts +4 -4
  176. package/lib/scenario/scenario.controller.d.ts +1 -1
  177. package/lib/scenario/scenario.service.d.ts +105 -5
  178. package/lib/scenario/scenario.types.d.ts +1 -1
  179. package/lib/{api → shared-contact-card}/shared-contact-card.service.d.ts +9 -9
  180. package/lib/{api → shared-contact-card}/shared-contact-card2.gql.d.ts +1 -1
  181. package/lib/{api → shared-contact-card}/shared-contact-card2.service.d.ts +6 -6
  182. package/lib/{cryptography → slip39}/slip39.service.d.ts +0 -1
  183. package/lib/{trusted-parties → tp-assembly}/tp-assembly.d.ts +7 -7
  184. package/lib/{trusted-parties → tp-assembly}/tp-assembly.types.d.ts +3 -3
  185. package/lib/{trusted-parties → tp-password-reset}/tp-password-reset-request.service.d.ts +5 -9
  186. package/lib/{trusted-parties → tp-password-reset}/tp-password-reset-user.service.d.ts +7 -13
  187. package/lib/{trusted-parties → tp-password-reset}/tp-password-reset.controller.d.ts +1 -1
  188. package/lib/tp-password-reset/tp-password-reset.gql.d.ts +63 -0
  189. package/lib/{trusted-parties/tp-password-reset.gql.d.ts → tp-password-reset/tp-password-reset.private.gql.d.ts} +1 -63
  190. package/lib/tp-password-reset/tp-password-reset.private.service.d.ts +59 -0
  191. package/lib/{trusted-parties → tp-password-reset}/tp-password-reset.service.d.ts +6 -89
  192. package/lib/tp-password-reset/tp-password-reset.types.d.ts +40 -0
  193. package/lib/{trusted-parties → trusted-party}/trusted-party.service.d.ts +7 -7
  194. package/lib/{trusted-parties → trusted-party}/trusted-party.types.d.ts +2 -3
  195. package/lib/{trusted-parties → trusted-party}/trusted-party2.gql.d.ts +0 -22
  196. package/lib/trusted-party/trusted-party2.gql.private.d.ts +23 -0
  197. package/lib/{trusted-parties → trusted-party}/trusted-party2.service.d.ts +11 -35
  198. package/lib/trusted-party/trusted-party2.types.d.ts +12 -0
  199. package/lib/{users → user}/user.gql.d.ts +1 -1
  200. package/lib/{users → user}/user.service.d.ts +1 -1
  201. package/lib/{users → user}/user.types.d.ts +1 -1
  202. package/lifeready-core.d.ts +14 -12
  203. package/lifeready-core.metadata.json +1 -1
  204. package/package.json +2 -2
  205. package/public-api.d.ts +48 -50
  206. package/esm2015/lib/api/contact-card.gql.js +0 -79
  207. package/esm2015/lib/api/contact-card.service.js +0 -154
  208. package/esm2015/lib/api/contact-card2.gql.js +0 -60
  209. package/esm2015/lib/api/contact-card2.service.js +0 -103
  210. package/esm2015/lib/api/file.service.js +0 -74
  211. package/esm2015/lib/api/key-exchange.gql.js +0 -188
  212. package/esm2015/lib/api/key-exchange.service.js +0 -442
  213. package/esm2015/lib/api/key-exchange.types.js +0 -7
  214. package/esm2015/lib/api/key-exchange2.gql.js +0 -171
  215. package/esm2015/lib/api/key-exchange2.service.js +0 -480
  216. package/esm2015/lib/api/lock.gql.js +0 -40
  217. package/esm2015/lib/api/lock.service.js +0 -64
  218. package/esm2015/lib/api/message.service.js +0 -138
  219. package/esm2015/lib/api/persist.service.js +0 -181
  220. package/esm2015/lib/api/shared-contact-card.service.js +0 -119
  221. package/esm2015/lib/api/shared-contact-card2.gql.js +0 -41
  222. package/esm2015/lib/api/shared-contact-card2.service.js +0 -117
  223. package/esm2015/lib/api/time.service.js +0 -146
  224. package/esm2015/lib/auth/idle.service.js +0 -168
  225. package/esm2015/lib/auth/idle.types.js +0 -7
  226. package/esm2015/lib/auth/lbop.service.js +0 -355
  227. package/esm2015/lib/auth/password.service.js +0 -315
  228. package/esm2015/lib/auth/register.service.js +0 -172
  229. package/esm2015/lib/auth/two-factor.service.js +0 -74
  230. package/esm2015/lib/cryptography/cryptography.types.js +0 -11
  231. package/esm2015/lib/cryptography/encryption.service.js +0 -189
  232. package/esm2015/lib/cryptography/key-factory.service.js +0 -237
  233. package/esm2015/lib/cryptography/key-graph.service.js +0 -299
  234. package/esm2015/lib/cryptography/key-meta.service.js +0 -200
  235. package/esm2015/lib/cryptography/slip39.service.js +0 -169
  236. package/esm2015/lib/cryptography/web-crypto.service.js +0 -29
  237. package/esm2015/lib/items2/item2.gql.js +0 -127
  238. package/esm2015/lib/items2/item2.gql.private.js +0 -23
  239. package/esm2015/lib/items2/item2.service.js +0 -516
  240. package/esm2015/lib/items2/item2.types.js +0 -1
  241. package/esm2015/lib/scenario/scenario.gql.private.js +0 -198
  242. package/esm2015/lib/trusted-parties/tp-assembly.gql.private.js +0 -22
  243. package/esm2015/lib/trusted-parties/tp-assembly.js +0 -365
  244. package/esm2015/lib/trusted-parties/tp-assembly.types.js +0 -1
  245. package/esm2015/lib/trusted-parties/tp-password-reset-request.service.js +0 -113
  246. package/esm2015/lib/trusted-parties/tp-password-reset-user.service.js +0 -129
  247. package/esm2015/lib/trusted-parties/tp-password-reset.constants.js +0 -4
  248. package/esm2015/lib/trusted-parties/tp-password-reset.controller.js +0 -34
  249. package/esm2015/lib/trusted-parties/tp-password-reset.gql.js +0 -237
  250. package/esm2015/lib/trusted-parties/tp-password-reset.service.js +0 -95
  251. package/esm2015/lib/trusted-parties/trusted-party.gql.js +0 -148
  252. package/esm2015/lib/trusted-parties/trusted-party.service.js +0 -326
  253. package/esm2015/lib/trusted-parties/trusted-party.types.js +0 -41
  254. package/esm2015/lib/trusted-parties/trusted-party2.gql.js +0 -87
  255. package/esm2015/lib/trusted-parties/trusted-party2.service.js +0 -218
  256. package/esm2015/lib/users/profile-details.service.js +0 -214
  257. package/esm2015/lib/users/profile.gql.js +0 -97
  258. package/esm2015/lib/users/profile.service.js +0 -169
  259. package/esm2015/lib/users/profile.types.js +0 -34
  260. package/esm2015/lib/users/user.gql.js +0 -60
  261. package/esm2015/lib/users/user.service.js +0 -79
  262. package/esm2015/lib/users/user.types.js +0 -1
  263. package/lib/api/contact-card2.gql.d.ts +0 -34
  264. package/lib/api/contact-card2.service.d.ts +0 -50
  265. package/lib/api/message.service.d.ts +0 -59
  266. /package/lib/{api → contact-card}/contact-card.gql.d.ts +0 -0
  267. /package/lib/{auth → idle}/idle.types.d.ts +0 -0
  268. /package/lib/{items2 → item2}/item2.gql.private.d.ts +0 -0
  269. /package/lib/{items2 → item2}/item2.types.d.ts +0 -0
  270. /package/lib/{api → key-exchange}/key-exchange.gql.d.ts +0 -0
  271. /package/lib/scenario/{scenario.gql.private.d.ts → scenario.private.gql.d.ts} +0 -0
  272. /package/lib/{api → time}/time.service.d.ts +0 -0
  273. /package/lib/{trusted-parties/tp-assembly.gql.private.d.ts → tp-assembly/tp-assembly.private.gql.d.ts} +0 -0
  274. /package/lib/{trusted-parties → tp-password-reset}/tp-password-reset.constants.d.ts +0 -0
  275. /package/lib/{trusted-parties → trusted-party}/trusted-party.gql.d.ts +0 -0
  276. /package/lib/{auth → two-factor}/two-factor.service.d.ts +0 -0
  277. /package/lib/{cryptography → web-crypto}/web-crypto.service.d.ts +0 -0
@@ -1,22 +1,21 @@
1
1
  import { Injector, NgZone } from '@angular/core';
2
- import { KeyFactoryService } from '../cryptography/key-factory.service';
3
- import { KeyGraphService } from '../cryptography/key-graph.service';
4
- import { KeyService } from '../cryptography/key.service';
5
- import { FileService } from '../api/file.service';
6
- import { CreateDirectoryMutation, DeleteDirectoryMutation, CreateFileMutation, DeleteFileMutation, UpdateFileMutation, UpdateDirectoryMutation, ArchiveDirectoryMutation, UnarchiveDirectoryMutation } from './item2.gql';
7
- import { ChangeFileParentsOptions, ChangeDirectoryParentsOptions, CreateDirectoryOptions, CreateFileOptions, DownloadFileContentOptions, FileParentDirectoryInput, ParentDirectoryInput, ParentRootDirectoryInput, UpdateDirectoryOptions, UpdateFileOptions, BeginDeleteChildItemLinksWindowOptions, CreateDirectoryTreeOptions, RevertFileOptions } from './item2.types';
8
2
  import { LrMutation, LrService } from '../api/lr-graphql';
9
3
  import { DirectoryNode, ID, LrRelayIdInput } from '../api/types';
10
- import { LockService } from '../api/lock.service';
4
+ import { FileUploadService } from '../file-upload/file-upload.service';
5
+ import { KeyFactoryService } from '../key/key-factory.service';
6
+ import { KeyGraphService } from '../key/key-graph.service';
7
+ import { KeyService } from '../key/key.service';
8
+ import { LockService } from '../lock/lock.service';
9
+ import { BeginDeleteChildItemLinksWindowOptions, ChangeDirectoryParentsOptions, ChangeFileParentsOptions, CreateDirectoryOptions, CreateDirectoryTreeOptions, CreateFileOptions, DownloadFileContentOptions, FileParentDirectoryInput, ParentDirectoryInput, ParentRootDirectoryInput, RevertFileOptions, UpdateDirectoryOptions, UpdateFileOptions } from './item2.types';
11
10
  export declare class Item2Service extends LrService {
12
11
  private ngZone;
13
12
  private injector;
14
- private fileService;
13
+ private fileUploadService;
15
14
  private keyService;
16
15
  private keyFactory;
17
16
  private keyGraph;
18
17
  private lockService;
19
- constructor(ngZone: NgZone, injector: Injector, fileService: FileService, keyService: KeyService, keyFactory: KeyFactoryService, keyGraph: KeyGraphService, lockService: LockService);
18
+ constructor(ngZone: NgZone, injector: Injector, fileUploadService: FileUploadService, keyService: KeyService, keyFactory: KeyFactoryService, keyGraph: KeyGraphService, lockService: LockService);
20
19
  static TEMP_DIRECTORY_PLAIN_META: {
21
20
  kcType: string;
22
21
  };
@@ -24,10 +23,10 @@ export declare class Item2Service extends LrService {
24
23
  downloadFileContent(options: DownloadFileContentOptions): Promise<ArrayBuffer>;
25
24
  getDirectoryKeyId(directoryId: LrRelayIdInput): Promise<string>;
26
25
  getFileKeyId(fileId: LrRelayIdInput): Promise<string>;
27
- getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../cryptography/cryptography.types").Key>;
28
- getFileKey(fileId: LrRelayIdInput, fileKeyId?: LrRelayIdInput): Promise<import("../cryptography/cryptography.types").Key>;
29
- createDirectoryExec(options: CreateDirectoryOptions): Promise<CreateDirectoryMutation>;
30
- createDirectory(options: CreateDirectoryOptions): Promise<LrMutation<CreateDirectoryMutation, {
26
+ getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
27
+ getFileKey(fileId: LrRelayIdInput, fileKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
28
+ createDirectoryExec(options: CreateDirectoryOptions): Promise<import("./item2.gql").CreateDirectoryMutationResult>;
29
+ createDirectory(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
31
30
  input: {
32
31
  parentDirectories: ParentDirectoryInput[];
33
32
  parentRootDirectory: ParentRootDirectoryInput;
@@ -35,7 +34,7 @@ export declare class Item2Service extends LrService {
35
34
  cipherMeta: string;
36
35
  };
37
36
  }>>;
38
- createDirectoryMutation(options: CreateDirectoryOptions): Promise<LrMutation<CreateDirectoryMutation, {
37
+ createDirectoryMutation(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
39
38
  input: {
40
39
  parentDirectories: ParentDirectoryInput[];
41
40
  parentRootDirectory: ParentRootDirectoryInput;
@@ -43,34 +42,34 @@ export declare class Item2Service extends LrService {
43
42
  cipherMeta: string;
44
43
  };
45
44
  }>>;
46
- updateDirectoryExec(options: UpdateDirectoryOptions): Promise<UpdateDirectoryMutation>;
47
- updateDirectory(options: UpdateDirectoryOptions): Promise<LrMutation<UpdateDirectoryMutation, {
45
+ updateDirectoryExec(options: UpdateDirectoryOptions): Promise<import("./item2.gql").UpdateDirectoryMutationResult>;
46
+ updateDirectory(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
48
47
  input: {
49
48
  directoryId: string;
50
49
  plainMeta: string;
51
50
  cipherMeta: string;
52
51
  };
53
52
  }>>;
54
- updateDirectoryMutation(options: UpdateDirectoryOptions): Promise<LrMutation<UpdateDirectoryMutation, {
53
+ updateDirectoryMutation(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
55
54
  input: {
56
55
  directoryId: string;
57
56
  plainMeta: string;
58
57
  cipherMeta: string;
59
58
  };
60
59
  }>>;
61
- deleteDirectoryExec(id: ID): Promise<DeleteDirectoryMutation>;
62
- deleteDirectory(id: ID): LrMutation<DeleteDirectoryMutation, {
60
+ deleteDirectoryExec(id: ID): Promise<import("./item2.gql").DeleteDirectoryMutationResult>;
61
+ deleteDirectory(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
63
62
  input: {
64
63
  directoryId: string;
65
64
  };
66
65
  }>;
67
- deleteDirectoryMutation(id: ID): LrMutation<DeleteDirectoryMutation, {
66
+ deleteDirectoryMutation(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
68
67
  input: {
69
68
  directoryId: string;
70
69
  };
71
70
  }>;
72
- createFileExec(options: CreateFileOptions): Promise<CreateFileMutation>;
73
- createFile(options: CreateFileOptions): Promise<LrMutation<CreateFileMutation, {
71
+ createFileExec(options: CreateFileOptions): Promise<import("./item2.gql").CreateFileMutationResult>;
72
+ createFile(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
74
73
  input: {
75
74
  parentDirectories: FileParentDirectoryInput[];
76
75
  wrappedStateKey: string;
@@ -79,7 +78,7 @@ export declare class Item2Service extends LrService {
79
78
  cipherMeta: string;
80
79
  };
81
80
  }>>;
82
- createFileMutation(options: CreateFileOptions): Promise<LrMutation<CreateFileMutation, {
81
+ createFileMutation(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
83
82
  input: {
84
83
  parentDirectories: FileParentDirectoryInput[];
85
84
  wrappedStateKey: string;
@@ -88,8 +87,8 @@ export declare class Item2Service extends LrService {
88
87
  cipherMeta: string;
89
88
  };
90
89
  }>>;
91
- updateFileExec(options: UpdateFileOptions): Promise<UpdateFileMutation>;
92
- updateFile(options: UpdateFileOptions): Promise<LrMutation<UpdateFileMutation, {
90
+ updateFileExec(options: UpdateFileOptions): Promise<import("./item2.gql").UpdateFileMutationResult>;
91
+ updateFile(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
93
92
  input: {
94
93
  fileId: string;
95
94
  wrappedStateKey: string;
@@ -98,7 +97,7 @@ export declare class Item2Service extends LrService {
98
97
  cipherMeta: string;
99
98
  };
100
99
  }>>;
101
- updateFileMutation(options: UpdateFileOptions): Promise<LrMutation<UpdateFileMutation, {
100
+ updateFileMutation(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
102
101
  input: {
103
102
  fileId: string;
104
103
  wrappedStateKey: string;
@@ -114,38 +113,38 @@ export declare class Item2Service extends LrService {
114
113
  revertFileMutation(options: RevertFileOptions): Promise<LrMutation<import("./item2.gql").RevertFileMutationResult, {
115
114
  input: RevertFileOptions;
116
115
  }>>;
117
- deleteFileExec(id: ID): Promise<DeleteFileMutation>;
118
- deleteFile(id: ID): LrMutation<DeleteFileMutation, {
116
+ deleteFileExec(id: ID): Promise<import("./item2.gql").DeleteFileMutationResult>;
117
+ deleteFile(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
119
118
  input: {
120
119
  fileId: string;
121
120
  };
122
121
  }>;
123
- deleteFileMutation(id: ID): LrMutation<DeleteFileMutation, {
122
+ deleteFileMutation(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
124
123
  input: {
125
124
  fileId: string;
126
125
  };
127
126
  }>;
128
- archiveDirectoryExec(directoryId: string, recursive: boolean): Promise<ArchiveDirectoryMutation>;
129
- archiveDirectory(directoryId: string, recursive: boolean): LrMutation<ArchiveDirectoryMutation, {
127
+ archiveDirectoryExec(directoryId: string, recursive: boolean): Promise<import("./item2.gql").ArchiveDirectoryMutationResult>;
128
+ archiveDirectory(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
130
129
  input: {
131
130
  directoryId: string;
132
131
  recursive: boolean;
133
132
  };
134
133
  }>;
135
- archiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<ArchiveDirectoryMutation, {
134
+ archiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
136
135
  input: {
137
136
  directoryId: string;
138
137
  recursive: boolean;
139
138
  };
140
139
  }>;
141
- unarchiveDirectoryExec(directoryId: string, recursive: boolean): Promise<UnarchiveDirectoryMutation>;
142
- unarchiveDirectory(directoryId: string, recursive: boolean): LrMutation<UnarchiveDirectoryMutation, {
140
+ unarchiveDirectoryExec(directoryId: string, recursive: boolean): Promise<import("./item2.gql").UnarchiveDirectoryMutationResult>;
141
+ unarchiveDirectory(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
143
142
  input: {
144
143
  directoryId: string;
145
144
  recursive: boolean;
146
145
  };
147
146
  }>;
148
- unarchiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<UnarchiveDirectoryMutation, {
147
+ unarchiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
149
148
  input: {
150
149
  directoryId: string;
151
150
  recursive: boolean;
@@ -1,7 +1,8 @@
1
1
  /// <reference types="node" />
2
2
  import { JWK } from 'node-jose';
3
- import { LbopKeyParams, PassIdpParams, PassKeyParams, DeriveKeyResult, DerivePassIdpParams, DerivePassKeyParams, DeriveLbopKeyParams } from './cryptography.types';
4
- import { WebCryptoService } from './web-crypto.service';
3
+ import { JSONObject } from '../api/types';
4
+ import { WebCryptoService } from '../web-crypto/web-crypto.service';
5
+ import { DeriveKeyResult, DeriveLbopKeyParams, DerivePassIdpParams, DerivePassKeyParams, LbopKeyParams, PassIdpParams, PassKeyParams } from './key.types';
5
6
  export declare function sha256(message: any): Promise<string>;
6
7
  export declare class KeyFactoryService {
7
8
  private webCryptoService;
@@ -13,7 +14,7 @@ export declare class KeyFactoryService {
13
14
  readonly DEFAULT_PASS_IDP_PBKDF_ITER = 100000;
14
15
  readonly DEFAULT_PASS_KEY_PBKDF_ITER = 100000;
15
16
  readonly DEFAULT_LBOP_KEY_PBKDF_ITER = 100000;
16
- static asKey(key: string | Buffer | object | JWK.RawKey, form?: 'json' | 'private' | 'pkcs8' | 'public' | 'spki' | 'pkix' | 'x509' | 'pem', extras?: Record<string, unknown>): Promise<JWK.Key>;
17
+ static asKey(key: string | Buffer | Record<string, JSONObject> | JWK.RawKey, form?: 'json' | 'private' | 'pkcs8' | 'public' | 'spki' | 'pkix' | 'x509' | 'pem', extras?: Record<string, unknown>): Promise<JWK.Key>;
17
18
  randomString(digits: number): string;
18
19
  randomDigitsNoZeros(digits: number): string;
19
20
  randomChoices<T>(array: T[], chooseN: number): T[];
@@ -1,10 +1,10 @@
1
1
  import { JWK } from 'node-jose';
2
2
  import { JSONObject } from '../api/types';
3
- import { CurrentUserKey } from '../users/profile.types';
4
- import { Edge, Key, KeyGraphResponse, PassKey } from './cryptography.types';
5
- import { DecryptOptions, EncryptionService } from './encryption.service';
3
+ import { DecryptOptions, EncryptionService } from '../encryption/encryption.service';
4
+ import { CurrentUserKey } from '../profile/profile.types';
6
5
  import { KeyFactoryService } from './key-factory.service';
7
6
  import { KeyService } from './key.service';
7
+ import { Key, KeyGraphEdge, KeyGraphResponse, PassKey } from './key.types';
8
8
  export interface GraphKey extends Key {
9
9
  task?: Promise<any>;
10
10
  }
@@ -21,8 +21,8 @@ export declare class KeyGraphService {
21
21
  key(id: any): GraphKey;
22
22
  passKey(id: any): PassKey;
23
23
  addKeys(src: KeyGraphResponse): void;
24
- tracePath(distances: any, keyId: string): Edge[];
25
- getPath(knownKeyId: string, keyId: string): Edge[];
24
+ tracePath(distances: any, keyId: string): KeyGraphEdge[];
25
+ getPath(knownKeyId: string, keyId: string): KeyGraphEdge[];
26
26
  getJwkKey(keyOrId: string | Key, getKeyIdCallback?: () => Promise<string> | string): Promise<JWK.Key>;
27
27
  getKey(keyOrId: string | Key, getKeyIdCallback?: () => Promise<string> | string): Promise<Key>;
28
28
  private _unwrapLink;
@@ -32,7 +32,7 @@ export declare class KeyGraphService {
32
32
  decryptFromString<T>(keyOrId: string | Key, cipherData: string, options?: DecryptOptions): Promise<T>;
33
33
  decryptFile(keyId: string, file: any): Promise<any>;
34
34
  encryptToString(key: string | Key | JWK.Key, content: any): Promise<string>;
35
- wrapKey<T>(wrappingKey: string | Key | JWK.Key, key: JWK.Key): Promise<string>;
35
+ wrapKey(wrappingKey: string | Key | JWK.Key, key: JWK.Key): Promise<string>;
36
36
  encryptWithNewKey(wrappingKeyId: string, cipherClearJson: JSONObject): Promise<{
37
37
  key: JWK.Key;
38
38
  wrappingKeyId: string;
@@ -1,6 +1,6 @@
1
1
  import { JWK } from 'node-jose';
2
2
  import { LrApolloService } from '../api/lr-apollo.service';
3
- import { EncryptionService } from './encryption.service';
3
+ import { EncryptionService } from '../encryption/encryption.service';
4
4
  import { KeyFactoryService } from './key-factory.service';
5
5
  import { KeyGraphService } from './key-graph.service';
6
6
  import { KeyService } from './key.service';
@@ -1,6 +1,6 @@
1
- import { Key, PassKey } from './cryptography.types';
2
- import { PersistService } from '../api/persist.service';
3
1
  import { LifeReadyConfig } from '../life-ready.config';
2
+ import { PersistService } from '../persist/persist.service';
3
+ import { Key, PassKey } from './key.types';
4
4
  export declare class UserKeys {
5
5
  passKey: PassKey;
6
6
  masterKey: Key;
@@ -1,4 +1,6 @@
1
1
  import { JWK } from 'node-jose';
2
+ import { JSONObject, PassKeyNode } from '../api/types';
3
+ import { SomeRequired } from '../_common/types';
2
4
  export interface Key {
3
5
  id: string;
4
6
  pbk?: string;
@@ -19,20 +21,14 @@ export interface LbopKeyParams {
19
21
  iterations: number;
20
22
  }
21
23
  export interface PassIdpVerifier {
22
- wrappedPrK: object;
23
- pbk: object;
24
+ wrappedPrK: Record<string, JSONObject>;
25
+ pbk: Record<string, JSONObject>;
24
26
  }
25
27
  export interface LbopKeyVerifier {
26
- wrappedKey: object;
27
- key: object;
28
- }
29
- export interface PassKey {
30
- id: string;
31
- passKeyParams?: PassKeyParams;
32
- passIdpParams?: PassIdpParams;
33
- wrappedPassIdpVerifierPrk?: object;
34
- created?: string;
28
+ wrappedKey: Record<string, JSONObject>;
29
+ key: Record<string, JSONObject>;
35
30
  }
31
+ export declare type PassKey = SomeRequired<PassKeyNode, 'id'>;
36
32
  export interface KeyLink {
37
33
  keyId: string;
38
34
  wrappingKeyId: string;
@@ -43,20 +39,20 @@ export interface PassKeyLink {
43
39
  passKeyId: string;
44
40
  wrappedKey: string;
45
41
  }
46
- export declare enum NodeType {
42
+ export declare enum KeyGraphNodeType {
47
43
  Key = "key",
48
44
  PassKey = "passKey"
49
45
  }
50
- export interface Node {
51
- type: NodeType;
46
+ export interface KeyGraphNode {
47
+ type: KeyGraphNodeType;
52
48
  data: Key | PassKey;
53
49
  }
54
- export declare enum EdgeType {
50
+ export declare enum KeyGraphEdgeType {
55
51
  KeyLink = "keyLink",
56
52
  PassKeyLink = "passKeyLink"
57
53
  }
58
- export interface Edge {
59
- type: EdgeType;
54
+ export interface KeyGraphEdge {
55
+ type: KeyGraphEdgeType;
60
56
  data: KeyLink | PassKeyLink;
61
57
  }
62
58
  export interface KeyGraphResponse {
@@ -1,10 +1,10 @@
1
+ import { LrApolloService } from '../api/lr-apollo.service';
1
2
  import { LifeReadyAuthService } from '../auth/life-ready-auth.service';
2
- import { EncryptionService } from '../cryptography/encryption.service';
3
- import { KeyService } from '../cryptography/key.service';
4
- import { UserService } from './../users/user.service';
3
+ import { EncryptionService } from '../encryption/encryption.service';
4
+ import { KeyFactoryService as KFS } from '../key/key-factory.service';
5
+ import { KeyService } from '../key/key.service';
6
+ import { UserService } from '../user/user.service';
5
7
  import { CompleteOtk, DecryptedKeyExchange, GetKeyExchangeListOptions, GetKeyExchangeOptions, InitiateOtkInput, KeyExchange, RespondOtk, RespondOtkInput, UserSharedKey } from './key-exchange.types';
6
- import { LrApolloService } from './lr-apollo.service';
7
- import { KeyFactoryService as KFS } from '../cryptography/key-factory.service';
8
8
  export declare class KeyExchangeService {
9
9
  private keyFactory;
10
10
  private keyService;
@@ -1,8 +1,8 @@
1
- import { Key } from '../cryptography/cryptography.types';
2
- import { AccessLevel } from '../category/category.types';
3
1
  import { JWK } from 'node-jose';
4
- import { ContactCardName, TrustedPartyDetails } from '../users/profile.types';
5
- import { JSONObject, KeyExchangeMode, KeyExchangeState } from './types';
2
+ import { JSONObject, KeyExchangeMode, KeyExchangeState } from '../api/types';
3
+ import { AccessLevel } from '../category/category.types';
4
+ import { Key } from '../key/key.types';
5
+ import { ContactCardName, TrustedPartyDetails } from '../profile/profile.types';
6
6
  export interface PlainInitiatorRootKeyCipher {
7
7
  nonce: string;
8
8
  oneTimePrk: object;
@@ -1,5 +1,5 @@
1
1
  import { JWK } from 'node-jose';
2
- import { Connection, DateTime, ID, JSONObject, LrEmail, OtKeyCipherClearJson2 } from './types';
2
+ import { Connection, DateTime, ID, JSONObject, LrEmail, OtKeyCipherClearJson2 } from '../api/types';
3
3
  export declare type KeyExchangeState2 = 'IN_PROGRESS' | 'COMPLETED' | 'DECLINED' | 'CANCELLED' | 'DELETED';
4
4
  export interface KeyExchangeFragment {
5
5
  id: ID;
@@ -1,14 +1,13 @@
1
- import { NgZone } from '@angular/core';
1
+ import { Injector, NgZone } from '@angular/core';
2
2
  import { JWK } from 'node-jose';
3
- import { EncryptionService } from '../cryptography/encryption.service';
4
- import { KeyFactoryService } from '../cryptography/key-factory.service';
5
- import { KeyGraphService } from '../cryptography/key-graph.service';
6
- import { KeyService } from '../cryptography/key.service';
7
- import { UserService } from './../users/user.service';
8
- import { OwnerPlainDataJson } from './contact-card2.service';
3
+ import { LrMutation, LrService } from '../api/lr-graphql';
4
+ import { ContactCardSharedCipherData, JSONObject, OtKeyCipherClearJson2 } from '../api/types';
5
+ import { OwnerPlainDataJson } from '../contact-card/contact-card2.service';
6
+ import { EncryptionService } from '../encryption/encryption.service';
7
+ import { KeyFactoryService } from '../key/key-factory.service';
8
+ import { KeyGraphService } from '../key/key-graph.service';
9
+ import { KeyService } from '../key/key.service';
9
10
  import { CancelKeyExchangeMutation, CompleteKeyExchangeOtkMutation, CurrentUserSharedKeyQuery2, DeclineKeyExchangeMutation, InitiateKeyExchangeOtkMutation, KeyExchangeFragment, KeyExchangeState2, RespondKeyExchangeOtkMutation } from './key-exchange2.gql';
10
- import { LrGraphQLService, LrMutation } from './lr-graphql';
11
- import { ContactCardSharedCipherData, JSONObject, OtKeyCipherClearJson2 } from './types';
12
11
  /**
13
12
  * The decrypted content of the one-time key cipher;
14
13
  * When user supplies this information the lib doesn't need to do another API call
@@ -35,7 +34,7 @@ export interface ContactCardOwnerCipherData {
35
34
  export declare type SendContactCardInput = ContactCardOwnerPlainData & ContactCardOwnerCipherData & ContactCardSharedCipherData;
36
35
  export interface InitiateOtkInput2 {
37
36
  email?: string;
38
- message?: any;
37
+ message?: JSONObject;
39
38
  contactCard?: SendContactCardInput;
40
39
  upgrade?: boolean;
41
40
  }
@@ -43,7 +42,7 @@ export interface RespondOtkInput2 {
43
42
  keyExchangeId: string;
44
43
  token: string;
45
44
  decryptedOtk: DecryptedOtk2;
46
- message?: any;
45
+ message?: JSONObject;
47
46
  initiatorContactCard?: ContactCardReceiverCipherData;
48
47
  responderContactCard?: SendContactCardInput;
49
48
  }
@@ -56,24 +55,24 @@ export interface CompleteOtkInput2 {
56
55
  }
57
56
  export interface InitiatorRootKeyCipherClearJson2 {
58
57
  nonce: string;
59
- oneTimePrk: object;
60
- otKey: object;
58
+ oneTimePrk: Record<string, JSONObject>;
59
+ otKey: Record<string, JSONObject>;
61
60
  initiatorContactCard?: ContactCardOwnerCipherData & ContactCardSharedCipherData;
62
61
  initiator: {
63
- message?: any;
62
+ message?: JSONObject;
64
63
  contactCard?: ContactCardSharedCipherData;
65
64
  };
66
65
  }
67
66
  export interface InitiatorOneTimePbkCipherClearJson {
68
67
  nonce: string;
69
- sharedKey: object;
70
- mkSharedKey: object;
68
+ sharedKey: Record<string, JSONObject>;
69
+ mkSharedKey: Record<string, JSONObject>;
71
70
  responder: {
72
- pbk: object;
73
- sigPbk: object;
74
- message?: any;
71
+ pbk: Record<string, JSONObject>;
72
+ sigPbk: Record<string, JSONObject>;
73
+ message?: JSONObject;
75
74
  contactCard?: ContactCardSharedCipherData & {
76
- sharedCipherKey: object;
75
+ sharedCipherKey: Record<string, JSONObject>;
77
76
  };
78
77
  };
79
78
  }
@@ -81,16 +80,15 @@ export interface GetKeyExchangeOptions2 {
81
80
  otKeyK?: string;
82
81
  token?: string;
83
82
  }
84
- export declare class KeyExchange2Service {
83
+ export declare class KeyExchange2Service extends LrService {
85
84
  private ngZone;
85
+ private injector;
86
86
  private keyFactory;
87
87
  private keyService;
88
88
  private encryptionService;
89
- private userService;
90
89
  private keyGraph;
91
- private lrGraphQL;
92
90
  private readonly CLIENT_NONCE_LENGTH;
93
- constructor(ngZone: NgZone, keyFactory: KeyFactoryService, keyService: KeyService, encryptionService: EncryptionService, userService: UserService, keyGraph: KeyGraphService, lrGraphQL: LrGraphQLService);
91
+ constructor(ngZone: NgZone, injector: Injector, keyFactory: KeyFactoryService, keyService: KeyService, encryptionService: EncryptionService, keyGraph: KeyGraphService);
94
92
  private getOtKey;
95
93
  private decryptOtk;
96
94
  private decryptResponseCipher;
@@ -121,19 +119,21 @@ export declare class KeyExchange2Service {
121
119
  id: string;
122
120
  };
123
121
  }>;
124
- declineKeyExchange(id: string, token: string): Promise<LrMutation<DeclineKeyExchangeMutation, {
122
+ declineKeyExchangeExec(id: string, token: string): Promise<DeclineKeyExchangeMutation>;
123
+ declineKeyExchange(id: string, token: string): LrMutation<DeclineKeyExchangeMutation, {
125
124
  input: {
126
125
  id: string;
127
126
  token: string;
128
127
  };
129
- }>>;
128
+ }>;
130
129
  declineKeyExchangeMutation(id: string, token: string): LrMutation<DeclineKeyExchangeMutation, {
131
130
  input: {
132
131
  id: string;
133
132
  token: string;
134
133
  };
135
134
  }>;
136
- initiateOtk({ message, email, contactCard, upgrade, }?: InitiateOtkInput2): Promise<{
135
+ initiateOtkExec(input?: InitiateOtkInput2): Promise<InitiateKeyExchangeOtkMutation>;
136
+ initiateOtk(input?: InitiateOtkInput2): Promise<{
137
137
  lrMutation: LrMutation<InitiateKeyExchangeOtkMutation, {
138
138
  input: {
139
139
  initiatorRootKeyCipher: string;
@@ -152,7 +152,44 @@ export declare class KeyExchange2Service {
152
152
  }>;
153
153
  otKeyK: string;
154
154
  }>;
155
- respondOtk({ keyExchangeId, token, decryptedOtk, message, initiatorContactCard, responderContactCard, }: RespondOtkInput2): Promise<LrMutation<RespondKeyExchangeOtkMutation, {
155
+ initiateOtkMutation({ message, email, contactCard, upgrade, }?: InitiateOtkInput2): Promise<{
156
+ lrMutation: LrMutation<InitiateKeyExchangeOtkMutation, {
157
+ input: {
158
+ initiatorRootKeyCipher: string;
159
+ initiatorPxkId: string;
160
+ initiatorSigPxkId: string;
161
+ otKeyParams: string;
162
+ otKeyCipher: string;
163
+ sendEmail: {
164
+ email: string;
165
+ rawOtKey: string;
166
+ };
167
+ createTp: boolean;
168
+ initiatorPlainDataSig: string;
169
+ upgrade: boolean;
170
+ };
171
+ }>;
172
+ otKeyK: string;
173
+ }>;
174
+ respondOtkExec(input: RespondOtkInput2): Promise<RespondKeyExchangeOtkMutation>;
175
+ respondOtk(input: RespondOtkInput2): Promise<LrMutation<RespondKeyExchangeOtkMutation, {
176
+ input: {
177
+ keyExchangeId: string;
178
+ keyExchangeToken: string;
179
+ rootKeyId: string;
180
+ masterKeyId: string;
181
+ responderPxkId: string;
182
+ responderSigPxkId: string;
183
+ signedInitiatorPbk: string;
184
+ signedInitiatorSigPbk: string;
185
+ rkWrappedSharedKey: string;
186
+ mkWrappedMkSharedKey: string;
187
+ initiatorOneTimePbkCipher: string;
188
+ initiatorContactCard: any;
189
+ responderContactCard: any;
190
+ };
191
+ }>>;
192
+ respondOtkMutation({ keyExchangeId, token, decryptedOtk, message, initiatorContactCard, responderContactCard, }: RespondOtkInput2): Promise<LrMutation<RespondKeyExchangeOtkMutation, {
156
193
  input: {
157
194
  keyExchangeId: string;
158
195
  keyExchangeToken: string;
@@ -169,7 +206,23 @@ export declare class KeyExchange2Service {
169
206
  responderContactCard: any;
170
207
  };
171
208
  }>>;
172
- completeOtk({ keyExchangeId, initiatorRootKeyCipher, initiatorOneTimePbkCipher, responderContactCard, initiatorContactCard, }: CompleteOtkInput2): Promise<LrMutation<CompleteKeyExchangeOtkMutation, {
209
+ completeOtkExec(input: CompleteOtkInput2): Promise<CompleteKeyExchangeOtkMutation>;
210
+ completeOtk(input: CompleteOtkInput2): Promise<LrMutation<CompleteKeyExchangeOtkMutation, {
211
+ input: {
212
+ keyExchangeId: string;
213
+ rootKeyId: string;
214
+ masterKeyId: string;
215
+ initiatorSigPxkId: string;
216
+ signedResponderPbk: string;
217
+ signedResponderSigPbk: string;
218
+ rkWrappedSharedKey: string;
219
+ mkWrappedMkSharedKey: string;
220
+ responderContactCardCipher: any;
221
+ initiatorContactCardCipher: any;
222
+ initiatorContactCardSharedCipher: any;
223
+ };
224
+ }>>;
225
+ completeOtkMutation({ keyExchangeId, initiatorRootKeyCipher, initiatorOneTimePbkCipher, responderContactCard, initiatorContactCard, }: CompleteOtkInput2): Promise<LrMutation<CompleteKeyExchangeOtkMutation, {
173
226
  input: {
174
227
  keyExchangeId: string;
175
228
  rootKeyId: string;
@@ -1,14 +1,14 @@
1
- import { LrApolloService } from '../api/lr-apollo.service';
2
1
  import { HttpClient } from '@angular/common/http';
3
2
  import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
4
3
  import { JWK } from 'node-jose';
5
- import { EncryptionService } from '../cryptography/encryption.service';
6
- import { KeyGraphService } from '../cryptography/key-graph.service';
7
- import { KeyService } from '../cryptography/key.service';
4
+ import { LrApolloService } from '../api/lr-apollo.service';
5
+ import { LifeReadyAuthService } from '../auth/life-ready-auth.service';
6
+ import { EncryptionService } from '../encryption/encryption.service';
7
+ import { KeyFactoryService as KFS } from '../key/key-factory.service';
8
+ import { KeyGraphService } from '../key/key-graph.service';
9
+ import { KeyService } from '../key/key.service';
8
10
  import { LifeReadyConfig } from '../life-ready.config';
9
- import { LifeReadyAuthService } from './life-ready-auth.service';
10
- import { PasswordService } from './password.service';
11
- import { KeyFactoryService as KFS } from '../cryptography/key-factory.service';
11
+ import { PasswordService } from '../password/password.service';
12
12
  export interface SetPasswordParams {
13
13
  lbopId: string;
14
14
  newPassword: string;
@@ -1,6 +1,6 @@
1
1
  import { InjectionToken } from '@angular/core';
2
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
3
2
  import { ApolloClientOptions } from '@apollo/client/core';
3
+ import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
4
4
  export declare const LR_CONFIG: InjectionToken<LifeReadyConfig>;
5
5
  export interface LifeReadyConfig {
6
6
  authUrl: string;
@@ -1,4 +1,4 @@
1
- import { DateTime, LockState, UUID } from './types';
1
+ import { DateTime, LockState, UUID } from '../api/types';
2
2
  export interface LockFragmentResult {
3
3
  created: DateTime;
4
4
  modified: DateTime;
@@ -1,5 +1,5 @@
1
1
  import { Injector, NgZone } from '@angular/core';
2
- import { LrMutation, LrService } from './lr-graphql';
2
+ import { LrMutation, LrService } from '../api/lr-graphql';
3
3
  export declare class LockService extends LrService {
4
4
  private ngZone;
5
5
  private injector;
@@ -0,0 +1,13 @@
1
+ import { ID, MessageNode } from '../api/types';
2
+ export interface SendMessageMutationResult {
3
+ sendMessage: {
4
+ message: {
5
+ id: ID;
6
+ };
7
+ };
8
+ }
9
+ export declare const SendMessageMutation: import("../_common/ast").TypedDocumentNode<SendMessageMutationResult>;
10
+ export interface MessageQueryResult {
11
+ message: MessageNode;
12
+ }
13
+ export declare const MessageQuery: import("../_common/ast").TypedDocumentNode<MessageQueryResult>;
@@ -0,0 +1,36 @@
1
+ import { Injector, NgZone } from '@angular/core';
2
+ import { JWK } from 'node-jose';
3
+ import { LrMutation, LrService } from '../api/lr-graphql';
4
+ import { MessageNode } from '../api/types';
5
+ import { EncryptionService } from '../encryption/encryption.service';
6
+ import { KeyExchangeService } from '../key-exchange/key-exchange.service';
7
+ import { KeyGraphService } from '../key/key-graph.service';
8
+ import { SendMessageInput } from './message.types';
9
+ export declare class MessageService extends LrService {
10
+ private ngZone;
11
+ private injector;
12
+ private keyGraph;
13
+ private encryptionService;
14
+ private keyExchangeService;
15
+ private readonly encrypt;
16
+ private readonly decrypt;
17
+ private readonly sign;
18
+ private readonly verify;
19
+ constructor(ngZone: NgZone, injector: Injector, keyGraph: KeyGraphService, encryptionService: EncryptionService, keyExchangeService: KeyExchangeService);
20
+ sendMessage(input: SendMessageInput): Promise<import("./message.gql").SendMessageMutationResult>;
21
+ sendMessageMutation({ username, userId, plainMessageJson, plainCipherMessageJson, }: SendMessageInput): Promise<LrMutation<import("./message.gql").SendMessageMutationResult, {
22
+ input: {
23
+ receiverUsername: string;
24
+ receiverId: string;
25
+ sharedKeyId: string;
26
+ senderSigPbkId: string;
27
+ signedCipherMessage: string;
28
+ plainMessage: string;
29
+ };
30
+ }>>;
31
+ decryptMessage(message: MessageNode, options: {
32
+ sharedKey: JWK.Key;
33
+ senderSigPbk: JWK.Key;
34
+ }): Promise<void>;
35
+ getMessage(id: string): Promise<MessageNode>;
36
+ }