@safetech/inheriti-client-sdk 1.0.0 → 1.16.0

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 (262) hide show
  1. package/dist/index.d.ts +7 -4
  2. package/dist/index.js +36 -2
  3. package/dist/inheriti-client-sdk.umd.js +156 -0
  4. package/dist/sdk-types.d.ts +59 -0
  5. package/dist/src/auth/error-handling-strategy.d.ts +2 -0
  6. package/dist/src/auth/get-available-envs.d.ts +7 -0
  7. package/dist/src/{modules/_shared/infrastructure/providers → auth}/inheriti-client-provider.d.ts +5 -17
  8. package/dist/src/auth/use-client.d.ts +12 -0
  9. package/dist/test/index.js +1 -14
  10. package/dist/test.d.ts +184 -0
  11. package/index.ts +7 -5
  12. package/package.json +21 -22
  13. package/dist/src/modules/_shared/domain/contexts/data-provider-context.d.ts +0 -2
  14. package/dist/src/modules/_shared/domain/contexts/service-provider-context.d.ts +0 -2
  15. package/dist/src/modules/_shared/domain/contexts/utils-provider-context.d.ts +0 -5
  16. package/dist/src/modules/_shared/domain/errors/getErrorMessage.d.ts +0 -1
  17. package/dist/src/modules/_shared/domain/hooks/resources/use-create.d.ts +0 -18
  18. package/dist/src/modules/_shared/domain/hooks/resources/use-delete.d.ts +0 -19
  19. package/dist/src/modules/_shared/domain/hooks/resources/use-get-list.d.ts +0 -25
  20. package/dist/src/modules/_shared/domain/hooks/resources/use-get-one.d.ts +0 -17
  21. package/dist/src/modules/_shared/domain/hooks/use-data-provider.d.ts +0 -2
  22. package/dist/src/modules/_shared/domain/hooks/use-repository.d.ts +0 -1
  23. package/dist/src/modules/_shared/domain/hooks/use-service-provider.d.ts +0 -2
  24. package/dist/src/modules/_shared/domain/hooks/use-service.d.ts +0 -1
  25. package/dist/src/modules/_shared/domain/hooks/utils-hooks.d.ts +0 -4
  26. package/dist/src/modules/_shared/domain/models/app-utils.d.ts +0 -10
  27. package/dist/src/modules/_shared/domain/models/currency-price.d.ts +0 -39
  28. package/dist/src/modules/_shared/domain/models/currency.d.ts +0 -24
  29. package/dist/src/modules/_shared/domain/models/euro-currency.d.ts +0 -3
  30. package/dist/src/modules/_shared/domain/models/mutation-options.d.ts +0 -8
  31. package/dist/src/modules/_shared/domain/models/mutation.d.ts +0 -5
  32. package/dist/src/modules/_shared/domain/models/pagination-options.d.ts +0 -4
  33. package/dist/src/modules/_shared/domain/models/query-options.d.ts +0 -6
  34. package/dist/src/modules/_shared/domain/models/query.d.ts +0 -5
  35. package/dist/src/modules/_shared/domain/models/resource-count.d.ts +0 -3
  36. package/dist/src/modules/_shared/domain/models/sort-options.d.ts +0 -4
  37. package/dist/src/modules/_shared/domain/models/use-mutation-value.d.ts +0 -13
  38. package/dist/src/modules/_shared/domain/models/use-query-value.d.ts +0 -11
  39. package/dist/src/modules/_shared/domain/services/mutation-creator.d.ts +0 -6
  40. package/dist/src/modules/_shared/domain/services/query-creator.d.ts +0 -6
  41. package/dist/src/modules/_shared/domain/utils/misc/array-utils.d.ts +0 -48
  42. package/dist/src/modules/_shared/domain/utils/misc/datetime-utils.d.ts +0 -40
  43. package/dist/src/modules/_shared/domain/utils/misc/encrypt-utils.d.ts +0 -17
  44. package/dist/src/modules/_shared/domain/utils/misc/number-utils.d.ts +0 -4
  45. package/dist/src/modules/_shared/domain/utils/misc/object-utils.d.ts +0 -76
  46. package/dist/src/modules/_shared/domain/utils/misc/text-utils.d.ts +0 -7
  47. package/dist/src/modules/_shared/domain/utils/misc/uuid-utils.d.ts +0 -6
  48. package/dist/src/modules/_shared/infrastructure/api/api-repository.d.ts +0 -36
  49. package/dist/src/modules/_shared/infrastructure/api/app-payload-encrypter.d.ts +0 -9
  50. package/dist/src/modules/_shared/infrastructure/http/HttpError.d.ts +0 -7
  51. package/dist/src/modules/_shared/infrastructure/http/fetch.d.ts +0 -48
  52. package/dist/src/modules/_shared/infrastructure/local-storage/browser-local-storage.d.ts +0 -9
  53. package/dist/src/modules/_shared/infrastructure/providers/app-data-provider.d.ts +0 -20
  54. package/dist/src/modules/_shared/infrastructure/providers/app-provider.d.ts +0 -15
  55. package/dist/src/modules/_shared/infrastructure/providers/app-service-provider.d.ts +0 -28
  56. package/dist/src/modules/_shared/infrastructure/providers/app-utils-provider.d.ts +0 -175
  57. package/dist/src/modules/_shared/infrastructure/secure-storage/app-secure-storage.d.ts +0 -8
  58. package/dist/src/modules/_shared/infrastructure/services/hexEncoder.d.ts +0 -4
  59. package/dist/src/modules/_shared/infrastructure/services/react-q-query-creator.d.ts +0 -7
  60. package/dist/src/modules/_shared/infrastructure/services/react-query-mutation-creator.d.ts +0 -7
  61. package/dist/src/modules/_shared/infrastructure/services/safeshareLegacy.d.ts +0 -29
  62. package/dist/src/modules/_shared/infrastructure/session-storage/browser-session-storage.d.ts +0 -12
  63. package/dist/src/modules/_shared/infrastructure/utils/context-selector.d.ts +0 -2
  64. package/dist/src/modules/_shared/infrastructure/utils/set-query-params.d.ts +0 -5
  65. package/dist/src/modules/auth/application/use-auth-dispatch.d.ts +0 -1
  66. package/dist/src/modules/auth/application/use-auth-provider.d.ts +0 -4
  67. package/dist/src/modules/auth/application/use-auth-state.d.ts +0 -1
  68. package/dist/src/modules/auth/application/use-client.d.ts +0 -27
  69. package/dist/src/modules/auth/application/use-ensure-connected-client.d.ts +0 -3
  70. package/dist/src/modules/auth/application/use-get-identity.d.ts +0 -36
  71. package/dist/src/modules/auth/application/use-is-logged-in.d.ts +0 -8
  72. package/dist/src/modules/auth/application/use-login-client.d.ts +0 -6
  73. package/dist/src/modules/auth/application/use-logout-client.d.ts +0 -5
  74. package/dist/src/modules/auth/domain/contexts/auth-provider-context.d.ts +0 -2
  75. package/dist/src/modules/auth/domain/models/auth-credentials.d.ts +0 -3
  76. package/dist/src/modules/auth/domain/models/user-identity.d.ts +0 -28
  77. package/dist/src/modules/auth/domain/services/auth-provider.d.ts +0 -16
  78. package/dist/src/modules/auth/index.d.ts +0 -6
  79. package/dist/src/modules/auth/infrastructure/providers/app-auth-provider.d.ts +0 -30
  80. package/dist/src/modules/auth/infrastructure/providers/app-identity-service.d.ts +0 -9
  81. package/dist/src/modules/auth/infrastructure/providers/auth-constants.d.ts +0 -6
  82. package/dist/src/modules/beneficiary/domain/models/beneficiary-device.d.ts +0 -28
  83. package/dist/src/modules/beneficiary/domain/models/beneficiary-relation.d.ts +0 -13
  84. package/dist/src/modules/beneficiary/domain/models/beneficiary-type.d.ts +0 -16
  85. package/dist/src/modules/beneficiary/domain/models/beneficiary.d.ts +0 -54
  86. package/dist/src/modules/beneficiary/index.d.ts +0 -1
  87. package/dist/src/modules/beneficiary/infrastructure/mappers/beneficiary-mapper.d.ts +0 -6
  88. package/dist/src/modules/protection-plan/application/configuration-process/blockchain/use-create-smart-contract.d.ts +0 -9
  89. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-backup-shares.d.ts +0 -6
  90. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-cold-shares.d.ts +0 -6
  91. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-mobile-shares.d.ts +0 -6
  92. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-validator-shares.d.ts +0 -6
  93. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-backup-shares.d.ts +0 -9
  94. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-cold-share.d.ts +0 -8
  95. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-mobile-shares.d.ts +0 -9
  96. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-validator-shares.d.ts +0 -9
  97. package/dist/src/modules/protection-plan/application/configuration-process/use-configure-plan.d.ts +0 -12
  98. package/dist/src/modules/protection-plan/application/configuration-process/use-delete-plan-configuration-process.d.ts +0 -8
  99. package/dist/src/modules/protection-plan/application/configuration-process/use-get-plan-configuration-process.d.ts +0 -12
  100. package/dist/src/modules/protection-plan/application/configuration-process/use-save-plan-creation-process.d.ts +0 -9
  101. package/dist/src/modules/protection-plan/application/creation/use-create-protection-plan.d.ts +0 -24
  102. package/dist/src/modules/protection-plan/application/creation/use-get-available-plan-triggers.d.ts +0 -3
  103. package/dist/src/modules/protection-plan/application/creation/use-get-protection-plan-security-level.d.ts +0 -47
  104. package/dist/src/modules/protection-plan/application/creation/use-persist-protection-plan.d.ts +0 -10
  105. package/dist/src/modules/protection-plan/application/listing/use-find-protection-plan-summary-by-criteria.d.ts +0 -13
  106. package/dist/src/modules/protection-plan/application/listing/use-find-protection-plans-by-criteria.d.ts +0 -15
  107. package/dist/src/modules/protection-plan/application/listing/use-get-protection-plan-summary.d.ts +0 -13
  108. package/dist/src/modules/protection-plan/application/listing/use-is-merge-authority-mode.d.ts +0 -3
  109. package/dist/src/modules/protection-plan/application/listing/use-protection-plan-listener.d.ts +0 -25
  110. package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-authorize-merge-authority.d.ts +0 -13
  111. package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-get-merge-authority-protection-plan.d.ts +0 -12
  112. package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-merge-authority-merge-process-events.d.ts +0 -6
  113. package/dist/src/modules/protection-plan/application/merging-process/merge-triggers/use-retry-active-merge-trigger.d.ts +0 -10
  114. package/dist/src/modules/protection-plan/application/merging-process/merge-triggers/use-validate-merge-trigger.d.ts +0 -12
  115. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-backup-shares.d.ts +0 -9
  116. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-cold-share.d.ts +0 -8
  117. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-mobile-shares.d.ts +0 -5
  118. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-released-mobile-shares.d.ts +0 -9
  119. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-validator-shares.d.ts +0 -9
  120. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-check-can-collect-shares.d.ts +0 -2
  121. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-save-release-mobile-share-request.d.ts +0 -11
  122. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-send-plan-share-merge-status-event.d.ts +0 -15
  123. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-send-plan-shares-merged.d.ts +0 -10
  124. package/dist/src/modules/protection-plan/application/merging-process/use-close-protection-plan.d.ts +0 -10
  125. package/dist/src/modules/protection-plan/application/merging-process/use-create-merging-process.d.ts +0 -9
  126. package/dist/src/modules/protection-plan/application/merging-process/use-delete-merging-process-by-criteria.d.ts +0 -11
  127. package/dist/src/modules/protection-plan/application/merging-process/use-delete-merging-process.d.ts +0 -10
  128. package/dist/src/modules/protection-plan/application/merging-process/use-get-merging-process-by-plan.d.ts +0 -23
  129. package/dist/src/modules/protection-plan/application/merging-process/use-merge-plan-beneficiary-selection.d.ts +0 -27
  130. package/dist/src/modules/protection-plan/application/merging-process/use-persist-merge-process.d.ts +0 -12
  131. package/dist/src/modules/protection-plan/application/merging-process/use-reveal-plan-data.d.ts +0 -13
  132. package/dist/src/modules/protection-plan/application/merging-process/use-save-merging-process.d.ts +0 -9
  133. package/dist/src/modules/protection-plan/application/merging-process/use-scan-plans-from-merge-authority-device.d.ts +0 -10
  134. package/dist/src/modules/protection-plan/application/merging-process/use-shareholder-merge-process-events.d.ts +0 -2
  135. package/dist/src/modules/protection-plan/domain/dto/plan-dto.d.ts +0 -68
  136. package/dist/src/modules/protection-plan/domain/dto/protection-plan-input.d.ts +0 -173
  137. package/dist/src/modules/protection-plan/domain/models/app-process.d.ts +0 -29
  138. package/dist/src/modules/protection-plan/domain/models/backup/backup-plan.d.ts +0 -18
  139. package/dist/src/modules/protection-plan/domain/models/backup/backup-shareholder.d.ts +0 -9
  140. package/dist/src/modules/protection-plan/domain/models/client/protection-plan-summary.d.ts +0 -218
  141. package/dist/src/modules/protection-plan/domain/models/data-asset.d.ts +0 -113
  142. package/dist/src/modules/protection-plan/domain/models/device-share-info.d.ts +0 -10
  143. package/dist/src/modules/protection-plan/domain/models/inheritance/heir.d.ts +0 -9
  144. package/dist/src/modules/protection-plan/domain/models/inheritance/inheritance-plan.d.ts +0 -16
  145. package/dist/src/modules/protection-plan/domain/models/merging-process/active-merge-process.d.ts +0 -15
  146. package/dist/src/modules/protection-plan/domain/models/merging-process/merging-process.d.ts +0 -135
  147. package/dist/src/modules/protection-plan/domain/models/plan-creation-proccess/plan-creation-process.d.ts +0 -69
  148. package/dist/src/modules/protection-plan/domain/models/plan-share.d.ts +0 -69
  149. package/dist/src/modules/protection-plan/domain/models/proccess-step.d.ts +0 -21
  150. package/dist/src/modules/protection-plan/domain/models/protection-plan-details.d.ts +0 -70
  151. package/dist/src/modules/protection-plan/domain/models/protection-plan-passphrase.d.ts +0 -18
  152. package/dist/src/modules/protection-plan/domain/models/protection-plan.d.ts +0 -238
  153. package/dist/src/modules/protection-plan/domain/models/shareholder.d.ts +0 -32
  154. package/dist/src/modules/protection-plan/domain/models/storage-option.d.ts +0 -29
  155. package/dist/src/modules/protection-plan/domain/models/trigger-settings-info.d.ts +0 -6
  156. package/dist/src/modules/protection-plan/domain/models/trigger.d.ts +0 -46
  157. package/dist/src/modules/protection-plan/domain/repositories/merge-authority-protection-plan-repository.d.ts +0 -13
  158. package/dist/src/modules/protection-plan/domain/repositories/merging-process-repository.d.ts +0 -62
  159. package/dist/src/modules/protection-plan/domain/repositories/plan-creation-repository.d.ts +0 -7
  160. package/dist/src/modules/protection-plan/domain/repositories/plan-security-repository.d.ts +0 -7
  161. package/dist/src/modules/protection-plan/domain/repositories/plan-triggers-repository.d.ts +0 -4
  162. package/dist/src/modules/protection-plan/domain/repositories/protection-plan-repository.d.ts +0 -24
  163. package/dist/src/modules/protection-plan/domain/services/blockchain-service.d.ts +0 -32
  164. package/dist/src/modules/protection-plan/domain/services/input-validation/PlanTypeInputValidator.d.ts +0 -4
  165. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-beneficiaries-input-validator.d.ts +0 -240
  166. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-data-assets-input-validator.d.ts +0 -1108
  167. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-details-input-validator.d.ts +0 -23
  168. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-shares-configuration-input-validator.d.ts +0 -13
  169. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-storage-configuration-input-validator.d.ts +0 -25
  170. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-triggers-input-validator.d.ts +0 -105
  171. package/dist/src/modules/protection-plan/domain/services/input-validation/utils/index.d.ts +0 -3
  172. package/dist/src/modules/protection-plan/domain/services/merge-authorization-handler.d.ts +0 -14
  173. package/dist/src/modules/protection-plan/domain/services/merge-process-event-listener.d.ts +0 -14
  174. package/dist/src/modules/protection-plan/domain/services/plan-data-assets-manager.d.ts +0 -69
  175. package/dist/src/modules/protection-plan/domain/services/plan-data-revealer.d.ts +0 -5
  176. package/dist/src/modules/protection-plan/domain/services/plan-event-listener.d.ts +0 -10
  177. package/dist/src/modules/protection-plan/domain/services/plan-merge-threshold-range-calculator.d.ts +0 -8
  178. package/dist/src/modules/protection-plan/domain/services/plan-recovery-shares-range-calculator.d.ts +0 -8
  179. package/dist/src/modules/protection-plan/domain/services/plan-shares-generator.d.ts +0 -18
  180. package/dist/src/modules/protection-plan/domain/services/vault-service.d.ts +0 -10
  181. package/dist/src/modules/protection-plan/domain/utils/plan-details-mapper.d.ts +0 -12
  182. package/dist/src/modules/protection-plan/domain/utils/plan-shares-details-mapper.d.ts +0 -10
  183. package/dist/src/modules/protection-plan/domain/utils/plan-triggers-details-mapper.d.ts +0 -5
  184. package/dist/src/modules/protection-plan/domain/utils/protection-plan-internal-mapper.d.ts +0 -5
  185. package/dist/src/modules/protection-plan/index.d.ts +0 -28
  186. package/dist/src/modules/protection-plan/infrastructure/mappers/backup-shareholder-mapper.d.ts +0 -7
  187. package/dist/src/modules/protection-plan/infrastructure/mappers/draft-protection-plan-mapper.d.ts +0 -8
  188. package/dist/src/modules/protection-plan/infrastructure/mappers/heir-mapper.d.ts +0 -7
  189. package/dist/src/modules/protection-plan/infrastructure/mappers/merging-process-mapper.d.ts +0 -5
  190. package/dist/src/modules/protection-plan/infrastructure/mappers/plan-creation-mapper.d.ts +0 -5
  191. package/dist/src/modules/protection-plan/infrastructure/mappers/protection-plan-filters-mapper.d.ts +0 -4
  192. package/dist/src/modules/protection-plan/infrastructure/mappers/protection-plan-mapper.d.ts +0 -10
  193. package/dist/src/modules/protection-plan/infrastructure/repositories/app-merging-process-repository.d.ts +0 -65
  194. package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-creation-repository.d.ts +0 -12
  195. package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-security-repository.d.ts +0 -11
  196. package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-triggers-repository.d.ts +0 -10
  197. package/dist/src/modules/protection-plan/infrastructure/repositories/protection-plan/app-merge-authority-protection-plan-repository.d.ts +0 -17
  198. package/dist/src/modules/protection-plan/infrastructure/repositories/protection-plan/app-protection-plan-repository.d.ts +0 -13
  199. package/dist/src/modules/protection-plan/infrastructure/services/app-blockchain-service.d.ts +0 -42
  200. package/dist/src/modules/protection-plan/infrastructure/services/app-plan-data-revealer.d.ts +0 -14
  201. package/dist/src/modules/protection-plan/infrastructure/services/app-plan-shares-generator.d.ts +0 -5
  202. package/dist/src/modules/protection-plan/infrastructure/services/constants/device-constants.d.ts +0 -1
  203. package/dist/src/modules/protection-plan/infrastructure/services/inheriti-vault-service.d.ts +0 -15
  204. package/dist/src/modules/protection-plan/infrastructure/services/socket-io-merge-authorization-handler.d.ts +0 -17
  205. package/dist/src/modules/protection-plan/infrastructure/services/socket-io-merge-process-event-listener.d.ts +0 -14
  206. package/dist/src/modules/protection-plan/infrastructure/services/socket-io-plan-event-listener.d.ts +0 -14
  207. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-distribute-cold-shares-process.d.ts +0 -15
  208. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-get-active-plan-configuration-process.d.ts +0 -11
  209. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-plan-configuration-process-steps.d.ts +0 -16
  210. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-plan-configuration-process.d.ts +0 -25
  211. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-start-protection-plan-configuration-process.d.ts +0 -10
  212. package/dist/src/modules/protection-plan/ui/plan-creation-process/view-models/plan-configuration-process-view.d.ts +0 -55
  213. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/merge-athority/use-merge-authority-sk-mobile-plan-detection.d.ts +0 -13
  214. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/merge-athority/use-merge-authority-sk-pro-plan-detection.d.ts +0 -12
  215. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-abort-merge-process.d.ts +0 -6
  216. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-active-merge-process-listener.d.ts +0 -9
  217. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-collect-plan-cold-share-process.d.ts +0 -13
  218. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-count-down.d.ts +0 -7
  219. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-initialize-merging-process.d.ts +0 -21
  220. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-merge-process-controller.d.ts +0 -13
  221. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-merge-process-release-shares-controller.d.ts +0 -9
  222. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-plan-merge-process.d.ts +0 -55
  223. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-process-plan-merge-steps.d.ts +0 -11
  224. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-reveal-data-controller.d.ts +0 -26
  225. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-start-merge-process.d.ts +0 -20
  226. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-trigger-countdown.d.ts +0 -18
  227. package/dist/src/modules/protection-plan/ui/plan-merge-process/utils/merge-process-utils.d.ts +0 -3
  228. package/dist/src/modules/protection-plan/ui/plan-merge-process/view-models/plan-merge-process-view.d.ts +0 -173
  229. package/dist/src/modules/protection-plan/ui/protection-plan/utils/plan-beneficiary-builder.d.ts +0 -12
  230. package/dist/src/modules/protection-plan/ui/protection-plan/utils/plan-data-asset-builder.d.ts +0 -35
  231. package/dist/src/modules/protection-plan/ui/protection-plan/utils/protection-plan-code.d.ts +0 -7
  232. package/dist/src/modules/protection-plan/ui/protection-plan/utils/protection-plan-id.d.ts +0 -7
  233. package/dist/src/modules/protection-plan/ui/protection-plan/utils/trigger-builder.d.ts +0 -24
  234. package/dist/src/modules/safekey/application/use-connect-safekey-pro-device.d.ts +0 -10
  235. package/dist/src/modules/safekey/application/use-disconnect-safekey-device.d.ts +0 -8
  236. package/dist/src/modules/safekey/application/use-safekey-device.d.ts +0 -16
  237. package/dist/src/modules/safekey/application/use-validate-safekey-device-pin.d.ts +0 -12
  238. package/dist/src/modules/safekey/domain/services/cold-storage-service.d.ts +0 -55
  239. package/dist/src/modules/safekey/index.d.ts +0 -4
  240. package/dist/src/modules/safekey/infrastructure/services/safekey-cold-storage-service.d.ts +0 -45
  241. package/dist/src/modules/safekey/infrastructure/services/safekey-service.d.ts +0 -9
  242. package/dist/tests/modules/_shared/domain/models/FinancialMother.d.ts +0 -11
  243. package/dist/tests/modules/_shared/domain/models/date-mother.d.ts +0 -6
  244. package/dist/tests/modules/_shared/domain/models/email-mother.d.ts +0 -3
  245. package/dist/tests/modules/_shared/domain/models/id-mother.d.ts +0 -3
  246. package/dist/tests/modules/_shared/domain/models/internet-mother.d.ts +0 -11
  247. package/dist/tests/modules/_shared/domain/models/mother-creator.d.ts +0 -3
  248. package/dist/tests/modules/_shared/domain/models/name-mother.d.ts +0 -5
  249. package/dist/tests/modules/_shared/domain/models/number-mother.d.ts +0 -7
  250. package/dist/tests/modules/_shared/domain/models/random-element-picker-mother.d.ts +0 -3
  251. package/dist/tests/modules/_shared/domain/models/uuid-mother.d.ts +0 -3
  252. package/dist/tests/modules/_shared/domain/models/word-mother.d.ts +0 -5
  253. package/dist/tests/modules/index.d.ts +0 -6
  254. package/dist/tests/modules/protection-plan/domain/plan-beneficiary-input-generator.d.ts +0 -18
  255. package/dist/tests/modules/protection-plan/domain/plan-data-asset-input-generator.d.ts +0 -13
  256. package/dist/tests/modules/protection-plan/domain/plan-details-input-generator.d.ts +0 -7
  257. package/dist/tests/modules/protection-plan/domain/plan-shares-configuration-input-generator.d.ts +0 -20
  258. package/dist/tests/modules/protection-plan/domain/plan-storage-configuration-input-generator.d.ts +0 -4
  259. package/dist/tests/modules/protection-plan/domain/plan-trigger-input-generator.d.ts +0 -27
  260. package/dist/tests/modules/protection-plan/domain/protection-plan-input-generator.d.ts +0 -4
  261. package/dist/tests/modules/protection-plan/index.d.ts +0 -8
  262. /package/dist/src/{modules/_shared/infrastructure/utils → auth}/get-api-url.d.ts +0 -0
@@ -1,218 +0,0 @@
1
- import { ShareStatus, ShareType } from '../../../../protection-plan/domain/models/plan-share';
2
- import ProtectionPlan, { ProtectionPlanStatus } from '../../../../protection-plan/domain/models/protection-plan';
3
- import { MergeTriggerStatus, TriggerStatus, TriggerType } from '../../../../protection-plan/domain/models/trigger';
4
- import { BlockChainStorageOption, PlanStorageOption } from '../../../../protection-plan/domain/models/storage-option';
5
- export interface PlanTriggerView {
6
- id: TriggerType;
7
- countdown?: {
8
- days: number;
9
- hours: number;
10
- minutes: number;
11
- seconds?: number;
12
- };
13
- settings?: {
14
- email?: string;
15
- phone?: string;
16
- };
17
- status: TriggerStatus | MergeTriggerStatus;
18
- }
19
- export type PlanBeneficiaryRelationView = 'WIFE' | 'HUSBAND' | 'SPOUSE' | 'CHILD' | 'GRANDCHILD' | 'PARENT' | 'GRANDPARENT' | 'FAMILY_MEMBER' | 'FRIEND' | 'BUSINESS_PARTNER' | 'COLLEAGUE' | 'LAWYER' | 'NOTARY' | 'TRUSTEE' | 'EXECUTOR' | 'OTHER';
20
- export interface PlanBeneficiaryView {
21
- id: string;
22
- firstName: string;
23
- lastName?: string;
24
- email?: string;
25
- code?: string;
26
- relation?: PlanBeneficiaryRelationView;
27
- profilePictureUrl?: string;
28
- }
29
- export interface ShareholderView {
30
- id: string;
31
- beneficiary: PlanBeneficiaryView;
32
- storage: PlanStorageOption;
33
- deviceId?: string;
34
- isMergeAuthority: boolean;
35
- isOwner?: boolean;
36
- }
37
- export interface PlanShareView {
38
- id: string;
39
- shareholder?: ShareholderView;
40
- identifiers: string[];
41
- type: ShareType;
42
- storage: PlanStorageOption;
43
- status: ShareStatus;
44
- claimedAt?: Date;
45
- verifiedAt?: Date;
46
- mobileShareVerification?: string;
47
- }
48
- export interface PlanStorageLayer {
49
- id: string;
50
- name: string;
51
- }
52
- /**
53
- * Summary representation of a protection plan
54
- *
55
- */
56
- export interface ProtectionPlanSummaryProps {
57
- id: string;
58
- code: string;
59
- mergeThreshold: number;
60
- owner: {
61
- id: string;
62
- firstName: string;
63
- lastName: string;
64
- profilePictureUrl?: string;
65
- };
66
- details: {
67
- name: string;
68
- description?: string;
69
- privateNotes?: string;
70
- };
71
- shares: PlanShareView[];
72
- status: ProtectionPlanStatus;
73
- triggers: PlanTriggerView[];
74
- contractAddress?: string;
75
- storage?: BlockChainStorageOption | 'HSM';
76
- network?: 'TESTNET' | 'MAINNET';
77
- createdAt: Date;
78
- configuredAt?: Date;
79
- lastReleasedAt?: Date;
80
- mergeCount: number;
81
- type: 'BACKUP' | 'INHERITANCE';
82
- beneficiaries: PlanBeneficiaryView[];
83
- storageLayers: PlanStorageLayer[];
84
- }
85
- type BeneficiaryShare = Omit<PlanShareView, 'shareholder'> & {
86
- shareholder: Omit<ShareholderView, 'beneficiary'> & {
87
- beneficiary: PlanBeneficiaryView;
88
- };
89
- };
90
- export interface ProtectionPlanSummaryPrimitiveProps extends Omit<ProtectionPlanSummaryProps, 'type'> {
91
- type: string;
92
- }
93
- /**
94
- * Class that represents a protection plan summary.
95
- *
96
- */
97
- export declare class ProtectionPlanSummary {
98
- private props;
99
- /** @ignore */
100
- constructor(props: ProtectionPlanSummaryProps);
101
- /**
102
- * Unique identifier of the protection plan.
103
- */
104
- get id(): string;
105
- /**
106
- * Type
107
- */
108
- get type(): "BACKUP" | "INHERITANCE";
109
- /**
110
- * Type
111
- */
112
- get isConfigured(): boolean;
113
- /**
114
- * Status
115
- */
116
- get status(): ProtectionPlanStatus;
117
- /**
118
- * Merge threshold
119
- */
120
- get mergeThreshold(): number;
121
- /**
122
- * Storage layers
123
- */
124
- get storageLayers(): PlanStorageLayer[];
125
- /**
126
- * Human-readable code associated with the plan.
127
- */
128
- get code(): string;
129
- /**
130
- * Plan owner details.
131
- */
132
- get owner(): {
133
- id: string;
134
- firstName: string;
135
- lastName: string;
136
- profilePictureUrl?: string;
137
- };
138
- /**
139
- * Details describing the plan (e.g., name, description).
140
- */
141
- get details(): {
142
- name: string;
143
- description?: string;
144
- privateNotes?: string;
145
- };
146
- /**
147
- * Share allocations defined in the plan.
148
- */
149
- get shares(): PlanShareView[];
150
- /**
151
- * Storage type
152
- */
153
- get storageType(): "VAULT" | "HSM" | "BLOCKCHAIN";
154
- /**
155
- * Beneficiary shares
156
- */
157
- get beneficiaryShares(): BeneficiaryShare[];
158
- /**
159
- * Conditions or events that trigger the plan execution.
160
- */
161
- get triggers(): PlanTriggerView[];
162
- /**
163
- * On-chain contract address where the plan is deployed (if any).
164
- */
165
- get contractAddress(): string | undefined;
166
- /**
167
- * Main storage
168
- */
169
- get storage(): "HSM" | BlockChainStorageOption | undefined;
170
- /**
171
- * Recovery shares amount
172
- */
173
- get recoverySharesAmount(): number;
174
- /**
175
- * Merge Authority beneficiaries
176
- */
177
- get mergeAuthorityBeneficiaries(): BeneficiaryShare[];
178
- /**
179
- * Network
180
- */
181
- get network(): "TESTNET" | "MAINNET" | undefined;
182
- /**
183
- * Date when the plan was created.
184
- */
185
- get createdAt(): Date;
186
- /**
187
- * Fully-resolved list of beneficiaries involved in the plan.
188
- */
189
- get beneficiaries(): PlanBeneficiaryView[];
190
- get validatorSharesCount(): number;
191
- get mobileSharesCount(): number;
192
- get coldSharesCount(): number;
193
- get recoverySharesCount(): number;
194
- /** @ignore */
195
- static fromPrimitives(props: ProtectionPlanSummaryPrimitiveProps): ProtectionPlanSummary;
196
- /** @ignore */
197
- static fromProtectionPlan(plan: ProtectionPlan<any>): ProtectionPlanSummary;
198
- private static mapShareholder;
199
- private static mapBeneficiary;
200
- /**
201
- * Return class object to pure JSON
202
- */
203
- toPrimitives(): ProtectionPlanSummaryPrimitiveProps;
204
- findShareByDeviceId(deviceId: string): PlanShareView | undefined;
205
- findBeneficiaryBy(beneficiary: OnlyOne<{
206
- id: string;
207
- email: string;
208
- code: string;
209
- }>): PlanBeneficiaryView | undefined;
210
- findShareholderBy(beneficiary: OnlyOne<{
211
- id: string;
212
- email: string;
213
- code: string;
214
- }>): (Omit<ShareholderView, "beneficiary"> & {
215
- beneficiary: PlanBeneficiaryView;
216
- }) | undefined;
217
- }
218
- export {};
@@ -1,113 +0,0 @@
1
- /**
2
- * Union of all supported secret types that can be stored in a data asset.
3
- */
4
- export type SecretData = PlainTextAsset | OnlineAccountAsset | RecoveryCodeAsset | PINCodeAsset | ApiKeyAsset | PrivateKeyAsset | SeedPhraseAsset | PaymentDebitCardAsset | PaymentCreditCardAsset;
5
- /**
6
- * Enumerates all possible asset types.
7
- */
8
- export type DataAssetType = 'PLAIN-TEXT' | 'ONLINE-ACCOUNT' | 'RECOVERY-CODE' | 'PIN-CODE' | 'API-KEY' | 'PRIVATE-KEY' | 'SEED-PHRASE' | 'PAYMENT-DEBIT-CARD' | 'PAYMENT-CREDIT-CARD';
9
- /**
10
- * A secure, named asset that contains sensitive information such as passwords, keys, or account details.
11
- */
12
- export type DataAsset = {
13
- /**
14
- * Unique identifier of the asset.
15
- */
16
- id: string;
17
- /**
18
- * The type of secret stored. Used to determine how to parse and display the `secret` field.
19
- */
20
- type: DataAssetType;
21
- /**
22
- * Metadata describing the asset (e.g., name, notes).
23
- */
24
- meta: {
25
- /**
26
- * Display name for the asset.
27
- */
28
- name: string;
29
- /**
30
- * Optional notes or context for the asset.
31
- */
32
- notes?: string;
33
- };
34
- /**
35
- * The actual sensitive data, varying by asset type.
36
- */
37
- secret: SecretData;
38
- };
39
- /**
40
- * A simple plain text asset.
41
- */
42
- export type PlainTextAsset = {
43
- text: string;
44
- };
45
- /**
46
- * Credentials for logging into an app or website.
47
- */
48
- export type OnlineAccountAsset = {
49
- appOrWebsite: string;
50
- email: string;
51
- username?: string;
52
- password: string;
53
- };
54
- /**
55
- * Backup recovery code for 2FA apps or websites.
56
- */
57
- export type RecoveryCodeAsset = {
58
- appOrWebsite: string;
59
- code: string;
60
- };
61
- /**
62
- * PIN code for a device or app.
63
- */
64
- export type PINCodeAsset = {
65
- deviceOrApp: string;
66
- code: string;
67
- };
68
- /**
69
- * API key for external services or apps.
70
- */
71
- export type ApiKeyAsset = {
72
- app: string;
73
- apiKey: string;
74
- };
75
- /**
76
- * Cryptocurrency private key and its associated public address.
77
- */
78
- export type PrivateKeyAsset = {
79
- publicAddress: string;
80
- privateKey: string;
81
- };
82
- /**
83
- * A seed phrase (mnemonic words) used to recover a crypto wallet.
84
- */
85
- export type SeedPhraseAsset = {
86
- words: string[];
87
- };
88
- /**
89
- * Sensitive information related to a debit card.
90
- */
91
- export type PaymentDebitCardAsset = {
92
- cardNumber: string;
93
- bank?: string;
94
- accountNumber?: string;
95
- cardHolderName?: string;
96
- expiryDate?: string;
97
- pinCode?: string;
98
- code?: string;
99
- clientId?: string;
100
- };
101
- /**
102
- * Sensitive information related to a credit card.
103
- */
104
- export type PaymentCreditCardAsset = {
105
- cardNumber: string;
106
- bank?: string;
107
- accountNumber?: string;
108
- cardHolderName?: string;
109
- expiryDate?: string;
110
- pinCode?: string;
111
- code?: string;
112
- clientId?: string;
113
- };
@@ -1,10 +0,0 @@
1
- export interface DeviceShareInfo {
2
- id: string;
3
- shares: string[];
4
- planId: string;
5
- isMergeAuthority: boolean;
6
- validatorSharePrivateKey: string;
7
- backupSharesPrivateKey?: string;
8
- mobileSharePassphrase?: string;
9
- [prop: string]: any;
10
- }
@@ -1,9 +0,0 @@
1
- import Shareholder, { ShareholderPrimitiveProps, ShareholderProps } from '../../../../protection-plan/domain/models/shareholder';
2
- export interface HeirProps extends ShareholderProps {
3
- }
4
- export interface HeirPrimitiveProps extends ShareholderPrimitiveProps {
5
- }
6
- export default class Heir extends Shareholder {
7
- constructor(props: HeirProps);
8
- toPrimitives(): HeirPrimitiveProps;
9
- }
@@ -1,16 +0,0 @@
1
- import Heir, { HeirPrimitiveProps } from '../../../../protection-plan/domain/models/inheritance/heir';
2
- import ProtectionPlanDetails from '../../../../protection-plan/domain/models/protection-plan-details';
3
- import ProtectionPlan, { ProtectionPlanPrimitiveProps, ProtectionPlanProps } from '../../../../protection-plan/domain/models/protection-plan';
4
- export interface InheritancePlanProps extends Omit<ProtectionPlanProps, 'type'> {
5
- heirs: Heir[];
6
- }
7
- export interface InheritancePlanPrimitiveProps extends ProtectionPlanPrimitiveProps {
8
- heirs: HeirPrimitiveProps[];
9
- }
10
- export default class InheritancePlan extends ProtectionPlan<InheritancePlanProps> {
11
- constructor(props: InheritancePlanProps);
12
- get details(): ProtectionPlanDetails;
13
- get heirs(): Heir[];
14
- static fromPrimitives(props: InheritancePlanPrimitiveProps): InheritancePlan;
15
- toPrimitives(): InheritancePlanPrimitiveProps;
16
- }
@@ -1,15 +0,0 @@
1
- export interface ActiveMergeProcess {
2
- id: string;
3
- requestedAt: Date;
4
- selectedBeneficiariesIds: string[];
5
- activeTrigger?: {
6
- id: string;
7
- startedAt: Date;
8
- expiresAt: Date;
9
- lastRetryAt?: Date;
10
- retryAttempts: number;
11
- canRetry: boolean;
12
- timeframeForRetryInSecs: number;
13
- };
14
- mergeAuthorityId: string;
15
- }
@@ -1,135 +0,0 @@
1
- import AppProcess, { AppProcessPrimitiveProps, AppProcessProps } from '../../../../protection-plan/domain/models/app-process';
2
- import ProcessStep from '../../../../protection-plan/domain/models/proccess-step';
3
- import ProtectionPlan, { ProtectionPlanPrimitiveProps } from '../../../../protection-plan/domain/models/protection-plan';
4
- import PlanShare from '../../../../protection-plan/domain/models/plan-share';
5
- import { DeviceShareInfo } from '../../../../protection-plan/domain/models/device-share-info';
6
- interface LoadedShareData {
7
- type: string;
8
- data: string[] | DeviceShareInfo;
9
- isBackup: boolean;
10
- }
11
- export type CollectedSharesData = LoadedShareData & {
12
- id: string;
13
- };
14
- export interface RevealOptions {
15
- timeoutMinutes: number;
16
- }
17
- export interface MergingProcessProps extends AppProcessProps<any> {
18
- plan: ProtectionPlan<any>;
19
- planType: 'BACKUP' | 'INHERITANCE';
20
- backupStore?: any[];
21
- loadedShares?: {
22
- [shareId: string]: LoadedShareData;
23
- };
24
- activated: boolean;
25
- triggersRequestedAt?: Date | null;
26
- selectedBeneficiariesIds: string[];
27
- mergeAuthorityId: string;
28
- revealOptions?: RevealOptions;
29
- expiresAt?: Date;
30
- pendingTrigger?: {
31
- id: string;
32
- startedAt: Date;
33
- expiresAt: Date;
34
- };
35
- }
36
- export interface MergingProcessPrimitiveProps extends Omit<AppProcessPrimitiveProps<any>, 'plan'> {
37
- plan: ProtectionPlanPrimitiveProps;
38
- planType: 'BACKUP' | 'INHERITANCE';
39
- backupStore?: any[];
40
- loadedShares?: {
41
- [shareId: string]: LoadedShareData;
42
- };
43
- activated: boolean;
44
- triggersRequestedAt?: Date | null;
45
- selectedBeneficiariesIds: string[];
46
- mergeAuthorityId: string;
47
- revealOptions?: RevealOptions;
48
- expiresAt?: Date;
49
- pendingTrigger?: {
50
- id: string;
51
- startedAt: Date;
52
- expiresAt: Date;
53
- };
54
- }
55
- interface MergingProcessParam {
56
- id: string;
57
- plan: ProtectionPlan<any>;
58
- planType: 'BACKUP' | 'INHERITANCE';
59
- triggersRequestedAt?: Date | null;
60
- selectedBeneficiariesIds: string[];
61
- mergeAuthorityId: string;
62
- expiresAt?: Date;
63
- }
64
- export default class MergingProcess extends AppProcess<MergingProcessProps, any> {
65
- constructor(props: MergingProcessProps);
66
- get allSharesLoaded(): boolean;
67
- get requiresSmartContract(): boolean;
68
- get selectedBeneficiariesIds(): string[];
69
- get isCollectingMaShare(): boolean;
70
- get currentStep(): ProcessStep<any>;
71
- get planIsReleased(): boolean;
72
- get hasLoadedShares(): boolean;
73
- get plan(): ProtectionPlan<any>;
74
- get planRequiresMobileEndToEndEncryption(): boolean;
75
- get isActivated(): boolean;
76
- get ownerId(): string;
77
- get remainingColdShares(): PlanShare[] | undefined;
78
- get mergeAuthorityColdShare(): PlanShare | undefined;
79
- get remainingAdditionalColdShares(): PlanShare[];
80
- get remainingAdditionalMobileShareholdersIds(): string[];
81
- get planValidatorShares(): PlanShare[];
82
- get planMainChain(): import("../storage-option").PlanStorageOption;
83
- get isCollectingColdShares(): boolean;
84
- get selectedAdditionalPlanColdShares(): PlanShare[];
85
- get selectedAdditionalPlanMobileShares(): PlanShare[];
86
- get mobileShareInvitationSent(): boolean;
87
- get selectedAdditionalPlanMobileSharesAmount(): number;
88
- get selectedAdditionalPlanColdSharesAmount(): number;
89
- get planTitle(): string;
90
- get planCode(): string;
91
- get planType(): "BACKUP" | "INHERITANCE";
92
- get isBackupPlan(): boolean;
93
- get isInheritancePlan(): boolean;
94
- get planId(): string;
95
- get canBeMerged(): boolean;
96
- get planContractAddress(): string | undefined;
97
- get isPlanFree(): boolean | undefined;
98
- get allAdditionalColdSharesLoaded(): boolean;
99
- get mergeAuthorityShare(): PlanShare | undefined;
100
- get mergeAuthorityShareLoaded(): boolean;
101
- get allAdditionalMobileSharesLoaded(): boolean;
102
- get collectedShares(): CollectedSharesData[];
103
- get triggersRequestedAt(): Date | undefined;
104
- get backupStore(): any[] | undefined;
105
- get pendingTrigger(): {
106
- startedAt: Date;
107
- expiresAt: Date;
108
- id: string;
109
- } | undefined;
110
- private get activeStepIndex();
111
- static create(props: MergingProcessParam): MergingProcess;
112
- static fromPrimitives(props: MergingProcessPrimitiveProps): MergingProcess;
113
- reset(): void;
114
- completeStep(step: ProcessStep<any>): void;
115
- completeStepById(stepId: string): void;
116
- markAsInProgress(stepId: string): void;
117
- isStepCompleted(stepId: string): boolean;
118
- complete(): void;
119
- setBackupSharesCollecting(): void;
120
- setBackupSharesCollected(shareData: any[]): void;
121
- setValidatorShareCollecting(): void;
122
- setValidatorShareCollected(shareData: any): void;
123
- setMobileShareCollected(share: PlanShare, shareData: any): void;
124
- setColdShareCollecting(share: PlanShare): void;
125
- setColdShareCollected(share: PlanShare, shareData: any): void;
126
- isShareCollected(share: PlanShare): boolean;
127
- toPrimitives(): MergingProcessPrimitiveProps;
128
- activate(): void;
129
- setMergeExpiration(mergeExpiresAt: Date): void;
130
- filterSelectedShares(shares: PlanShare[]): PlanShare[];
131
- private ensureAllParamsAreValid;
132
- private markNextAsInProgress;
133
- private setLoadedShare;
134
- }
135
- export {};
@@ -1,69 +0,0 @@
1
- import AppProcess, { AppProcessPrimitiveProps, AppProcessProps } from '../../../../protection-plan/domain/models/app-process';
2
- import ProcessStep from '../../../../protection-plan/domain/models/proccess-step';
3
- import ProtectionPlan, { PlanPrivateKeys, ProtectionPlanPrimitiveProps } from '../../../../protection-plan/domain/models/protection-plan';
4
- import { ShareCreationStatus, ShareType } from '../../../../protection-plan/domain/models/plan-share';
5
- import { ProtectionPlanPassphraseProps } from '../../../../protection-plan/domain/models/protection-plan-passphrase';
6
- export interface PlanCreationProcessProps extends AppProcessProps<any> {
7
- plan: ProtectionPlan<any>;
8
- planType: 'BACKUP' | 'INHERITANCE';
9
- stepErrors?: Record<string, string>;
10
- stepsAttempts?: Record<string, number>;
11
- mobileSharesPassphrase?: string;
12
- }
13
- export interface PlanCreationProcessPrimitiveProps extends Omit<AppProcessPrimitiveProps<any>, 'plan' | 'payment'> {
14
- plan: ProtectionPlanPrimitiveProps;
15
- planType: 'BACKUP' | 'INHERITANCE';
16
- stepErrors?: Record<string, string>;
17
- stepsAttempts?: Record<string, number>;
18
- mobileSharesPassphrase?: string;
19
- }
20
- interface PlanCreationProcessParam {
21
- plan: ProtectionPlan<any>;
22
- planType: 'BACKUP' | 'INHERITANCE';
23
- }
24
- export default class PlanCreationProcess extends AppProcess<PlanCreationProcessProps, any> {
25
- constructor(props: PlanCreationProcessProps);
26
- get isDistributingColdShares(): boolean;
27
- get currentStep(): ProcessStep<any>;
28
- get plan(): ProtectionPlan<any>;
29
- get allPlanShares(): import("../../../../protection-plan/domain/models/plan-share").default[];
30
- get planColdShares(): import("../../../../protection-plan/domain/models/plan-share").default[];
31
- get planBackupShares(): import("../../../../protection-plan/domain/models/plan-share").default[];
32
- get planValidatorShares(): import("../../../../protection-plan/domain/models/plan-share").default[];
33
- get planType(): "BACKUP" | "INHERITANCE";
34
- get planId(): string;
35
- get planRequiresMobileEndToEndEncryption(): boolean;
36
- get mobileSharesPassphrase(): string | undefined;
37
- get activeStepIndex(): number;
38
- get planPrivateKeys(): PlanPrivateKeys | undefined;
39
- get hasErrors(): boolean;
40
- static create(props: PlanCreationProcessParam): PlanCreationProcess;
41
- static fromPrimitives(props: PlanCreationProcessPrimitiveProps): PlanCreationProcess;
42
- start(): void;
43
- isAfter(id: string): boolean;
44
- getStepByIndex(index: number): ProcessStep<any>;
45
- reset(): void;
46
- completeStep(step: ProcessStep<any>): void;
47
- completeStepById(stepId: string): void;
48
- setPlanContractAddress(address: string): void;
49
- updatePlanPassphrase(passphrase: ProtectionPlanPassphraseProps): void;
50
- setMobileSharesPassPhrase(passphrase: string): void;
51
- updatePlanPrivateKeys(keys: PlanPrivateKeys): void;
52
- toPrimitives(): PlanCreationProcessPrimitiveProps;
53
- setStepError(id: string, message: string): void;
54
- updateStepAttempt(id: string): void;
55
- getStepAttempt(id: string): number;
56
- cleanStepError(id: string): void;
57
- getStepError(id: string): string | undefined;
58
- isStepProcessing(id: string): boolean;
59
- updatePlanSharesCreationStatus(type: ShareType, status: ShareCreationStatus, shareId?: string): void;
60
- updateUpdateShareDeviceInfo(shareId: string, data: {
61
- deviceId: string;
62
- devicePassword?: string;
63
- }): void;
64
- updatePlanSharesAddresses(type: ShareType, shares: {
65
- [p: string]: string[];
66
- }): void;
67
- stepCompleted(id: string): boolean | undefined;
68
- }
69
- export {};
@@ -1,69 +0,0 @@
1
- import StorageOption, { StorageOptionPrimitiveProps } from '../../../protection-plan/domain/models/storage-option';
2
- import Shareholder, { ShareholderPrimitiveProps } from '../../../protection-plan/domain/models/shareholder';
3
- export type ShareType = 'VALIDATOR' | 'COLD' | 'MOBILE' | 'BACKUP';
4
- export type ShareStatus = 'DISTRIBUTED' | 'PENDING' | 'CLAIMED' | 'RELEASED' | 'COLLECTED' | "PENDING_CLAIM" | "PENDING_VERIFICATION";
5
- export type ShareCreationStatus = 'UNCREATED' | 'CREATING' | 'CREATED' | 'DISTRIBUTING' | 'DISTRIBUTED';
6
- export interface PlanShareProps {
7
- id: string;
8
- shareholder?: Shareholder;
9
- addresses: string[];
10
- shareData?: string[];
11
- type: ShareType;
12
- storage: StorageOption;
13
- status: ShareStatus;
14
- creationStatus: ShareCreationStatus;
15
- claimedAt?: Date;
16
- verifiedAt?: Date;
17
- mobileShareVerification?: string;
18
- }
19
- export interface PlanSharePrimitiveProps extends Omit<PlanShareProps, 'shareholder' | 'storage'> {
20
- shareholder?: ShareholderPrimitiveProps;
21
- storage: StorageOptionPrimitiveProps;
22
- }
23
- export default class PlanShare {
24
- private props;
25
- constructor(props: PlanShareProps);
26
- get id(): string;
27
- get endToEndEncrypted(): boolean;
28
- get deviceId(): string | undefined;
29
- get shareholderEmail(): string | undefined;
30
- get shareholder(): Shareholder | undefined;
31
- get addressesCount(): number;
32
- get addresses(): string[];
33
- get shareData(): string[] | undefined;
34
- get isValidator(): boolean;
35
- get isInBlockchain(): boolean;
36
- get isInVault(): boolean;
37
- get typeName(): "" | "Merge Authority shares" | "Recovery shares" | "Validator share";
38
- get storageName(): "HSM" | "SafeKey Pro" | "SafeKey Mobile" | "vechain" | "Ethereum" | "Optimism" | "Inheriti® Chain" | "Vault" | "Unknown Name";
39
- get status(): ShareStatus;
40
- get creationStatus(): ShareCreationStatus;
41
- get isCreating(): boolean;
42
- get isDistributing(): boolean;
43
- get isCollecting(): boolean;
44
- get isCollected(): boolean;
45
- get isDistributed(): boolean;
46
- get type(): ShareType;
47
- get isBackup(): boolean;
48
- get isMobile(): boolean;
49
- get isCold(): boolean;
50
- get isMergeAuthority(): boolean;
51
- get storage(): StorageOption;
52
- get claimedAt(): Date | null;
53
- get isClaimed(): boolean;
54
- get isVerified(): boolean;
55
- get isPending(): boolean;
56
- get shareholderId(): string | undefined;
57
- /** @ignore */
58
- static fromPrimitives(props: PlanSharePrimitiveProps): PlanShare;
59
- reset(): void;
60
- updateStatus(status: ShareStatus): void;
61
- updateCreationStatus(status: ShareCreationStatus): void;
62
- updateAddresses(addresses: string[]): void;
63
- setShareData(data: string[]): void;
64
- setCollecting(): void;
65
- setDeviceId(id: string): void;
66
- setDevicePassword(password: string): void;
67
- /** @ignore */
68
- toPrimitives(): PlanSharePrimitiveProps;
69
- }
@@ -1,21 +0,0 @@
1
- export interface ProcessStepProps {
2
- id: string;
3
- status: 'COMPLETE' | 'INCOMPLETE' | 'IN_PROCESS';
4
- }
5
- export interface ProcessStepPrimitiveProps extends ProcessStepProps {
6
- }
7
- export default class ProcessStep<T> {
8
- private props;
9
- constructor(props: ProcessStepProps & T);
10
- get id(): string;
11
- get isComplete(): boolean;
12
- get status(): "COMPLETE" | "INCOMPLETE" | "IN_PROCESS";
13
- get isPending(): boolean;
14
- get isInProcess(): boolean;
15
- static fromPrimitives(props: ProcessStepPrimitiveProps): ProcessStep<unknown>;
16
- reset(): void;
17
- markAsComplete(): void;
18
- markAsInProgress(): void;
19
- markAsIncomplete(): void;
20
- toPrimitives(): ProcessStepPrimitiveProps;
21
- }