@safetech/inheriti-client-sdk 1.0.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 (257) hide show
  1. package/README.md +22 -0
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.js +2 -0
  4. package/dist/src/modules/_shared/domain/contexts/data-provider-context.d.ts +2 -0
  5. package/dist/src/modules/_shared/domain/contexts/service-provider-context.d.ts +2 -0
  6. package/dist/src/modules/_shared/domain/contexts/utils-provider-context.d.ts +5 -0
  7. package/dist/src/modules/_shared/domain/errors/getErrorMessage.d.ts +1 -0
  8. package/dist/src/modules/_shared/domain/hooks/resources/use-create.d.ts +18 -0
  9. package/dist/src/modules/_shared/domain/hooks/resources/use-delete.d.ts +19 -0
  10. package/dist/src/modules/_shared/domain/hooks/resources/use-get-list.d.ts +25 -0
  11. package/dist/src/modules/_shared/domain/hooks/resources/use-get-one.d.ts +17 -0
  12. package/dist/src/modules/_shared/domain/hooks/use-data-provider.d.ts +2 -0
  13. package/dist/src/modules/_shared/domain/hooks/use-repository.d.ts +1 -0
  14. package/dist/src/modules/_shared/domain/hooks/use-service-provider.d.ts +2 -0
  15. package/dist/src/modules/_shared/domain/hooks/use-service.d.ts +1 -0
  16. package/dist/src/modules/_shared/domain/hooks/utils-hooks.d.ts +4 -0
  17. package/dist/src/modules/_shared/domain/models/app-utils.d.ts +10 -0
  18. package/dist/src/modules/_shared/domain/models/currency-price.d.ts +39 -0
  19. package/dist/src/modules/_shared/domain/models/currency.d.ts +24 -0
  20. package/dist/src/modules/_shared/domain/models/euro-currency.d.ts +3 -0
  21. package/dist/src/modules/_shared/domain/models/mutation-options.d.ts +8 -0
  22. package/dist/src/modules/_shared/domain/models/mutation.d.ts +5 -0
  23. package/dist/src/modules/_shared/domain/models/pagination-options.d.ts +4 -0
  24. package/dist/src/modules/_shared/domain/models/query-options.d.ts +6 -0
  25. package/dist/src/modules/_shared/domain/models/query.d.ts +5 -0
  26. package/dist/src/modules/_shared/domain/models/resource-count.d.ts +3 -0
  27. package/dist/src/modules/_shared/domain/models/sort-options.d.ts +4 -0
  28. package/dist/src/modules/_shared/domain/models/use-mutation-value.d.ts +13 -0
  29. package/dist/src/modules/_shared/domain/models/use-query-value.d.ts +11 -0
  30. package/dist/src/modules/_shared/domain/services/mutation-creator.d.ts +6 -0
  31. package/dist/src/modules/_shared/domain/services/query-creator.d.ts +6 -0
  32. package/dist/src/modules/_shared/domain/utils/misc/array-utils.d.ts +48 -0
  33. package/dist/src/modules/_shared/domain/utils/misc/datetime-utils.d.ts +40 -0
  34. package/dist/src/modules/_shared/domain/utils/misc/encrypt-utils.d.ts +17 -0
  35. package/dist/src/modules/_shared/domain/utils/misc/number-utils.d.ts +4 -0
  36. package/dist/src/modules/_shared/domain/utils/misc/object-utils.d.ts +76 -0
  37. package/dist/src/modules/_shared/domain/utils/misc/text-utils.d.ts +7 -0
  38. package/dist/src/modules/_shared/domain/utils/misc/uuid-utils.d.ts +6 -0
  39. package/dist/src/modules/_shared/infrastructure/api/api-repository.d.ts +36 -0
  40. package/dist/src/modules/_shared/infrastructure/api/app-payload-encrypter.d.ts +9 -0
  41. package/dist/src/modules/_shared/infrastructure/http/HttpError.d.ts +7 -0
  42. package/dist/src/modules/_shared/infrastructure/http/fetch.d.ts +48 -0
  43. package/dist/src/modules/_shared/infrastructure/local-storage/browser-local-storage.d.ts +9 -0
  44. package/dist/src/modules/_shared/infrastructure/providers/app-data-provider.d.ts +20 -0
  45. package/dist/src/modules/_shared/infrastructure/providers/app-provider.d.ts +15 -0
  46. package/dist/src/modules/_shared/infrastructure/providers/app-service-provider.d.ts +28 -0
  47. package/dist/src/modules/_shared/infrastructure/providers/app-utils-provider.d.ts +175 -0
  48. package/dist/src/modules/_shared/infrastructure/providers/inheriti-client-provider.d.ts +46 -0
  49. package/dist/src/modules/_shared/infrastructure/secure-storage/app-secure-storage.d.ts +8 -0
  50. package/dist/src/modules/_shared/infrastructure/services/hexEncoder.d.ts +4 -0
  51. package/dist/src/modules/_shared/infrastructure/services/react-q-query-creator.d.ts +7 -0
  52. package/dist/src/modules/_shared/infrastructure/services/react-query-mutation-creator.d.ts +7 -0
  53. package/dist/src/modules/_shared/infrastructure/services/safeshareLegacy.d.ts +29 -0
  54. package/dist/src/modules/_shared/infrastructure/session-storage/browser-session-storage.d.ts +12 -0
  55. package/dist/src/modules/_shared/infrastructure/utils/context-selector.d.ts +2 -0
  56. package/dist/src/modules/_shared/infrastructure/utils/get-api-url.d.ts +1 -0
  57. package/dist/src/modules/_shared/infrastructure/utils/set-query-params.d.ts +5 -0
  58. package/dist/src/modules/auth/application/use-auth-dispatch.d.ts +1 -0
  59. package/dist/src/modules/auth/application/use-auth-provider.d.ts +4 -0
  60. package/dist/src/modules/auth/application/use-auth-state.d.ts +1 -0
  61. package/dist/src/modules/auth/application/use-client.d.ts +27 -0
  62. package/dist/src/modules/auth/application/use-ensure-connected-client.d.ts +3 -0
  63. package/dist/src/modules/auth/application/use-get-identity.d.ts +36 -0
  64. package/dist/src/modules/auth/application/use-is-logged-in.d.ts +8 -0
  65. package/dist/src/modules/auth/application/use-login-client.d.ts +6 -0
  66. package/dist/src/modules/auth/application/use-logout-client.d.ts +5 -0
  67. package/dist/src/modules/auth/domain/contexts/auth-provider-context.d.ts +2 -0
  68. package/dist/src/modules/auth/domain/models/auth-credentials.d.ts +3 -0
  69. package/dist/src/modules/auth/domain/models/user-identity.d.ts +28 -0
  70. package/dist/src/modules/auth/domain/services/auth-provider.d.ts +16 -0
  71. package/dist/src/modules/auth/index.d.ts +6 -0
  72. package/dist/src/modules/auth/infrastructure/providers/app-auth-provider.d.ts +30 -0
  73. package/dist/src/modules/auth/infrastructure/providers/app-identity-service.d.ts +9 -0
  74. package/dist/src/modules/auth/infrastructure/providers/auth-constants.d.ts +6 -0
  75. package/dist/src/modules/beneficiary/domain/models/beneficiary-device.d.ts +28 -0
  76. package/dist/src/modules/beneficiary/domain/models/beneficiary-relation.d.ts +13 -0
  77. package/dist/src/modules/beneficiary/domain/models/beneficiary-type.d.ts +16 -0
  78. package/dist/src/modules/beneficiary/domain/models/beneficiary.d.ts +54 -0
  79. package/dist/src/modules/beneficiary/index.d.ts +1 -0
  80. package/dist/src/modules/beneficiary/infrastructure/mappers/beneficiary-mapper.d.ts +6 -0
  81. package/dist/src/modules/protection-plan/application/configuration-process/blockchain/use-create-smart-contract.d.ts +9 -0
  82. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-backup-shares.d.ts +6 -0
  83. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-cold-shares.d.ts +6 -0
  84. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-mobile-shares.d.ts +6 -0
  85. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-validator-shares.d.ts +6 -0
  86. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-backup-shares.d.ts +9 -0
  87. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-cold-share.d.ts +8 -0
  88. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-mobile-shares.d.ts +9 -0
  89. package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-validator-shares.d.ts +9 -0
  90. package/dist/src/modules/protection-plan/application/configuration-process/use-configure-plan.d.ts +12 -0
  91. package/dist/src/modules/protection-plan/application/configuration-process/use-delete-plan-configuration-process.d.ts +8 -0
  92. package/dist/src/modules/protection-plan/application/configuration-process/use-get-plan-configuration-process.d.ts +12 -0
  93. package/dist/src/modules/protection-plan/application/configuration-process/use-save-plan-creation-process.d.ts +9 -0
  94. package/dist/src/modules/protection-plan/application/creation/use-create-protection-plan.d.ts +24 -0
  95. package/dist/src/modules/protection-plan/application/creation/use-get-available-plan-triggers.d.ts +3 -0
  96. package/dist/src/modules/protection-plan/application/creation/use-get-protection-plan-security-level.d.ts +47 -0
  97. package/dist/src/modules/protection-plan/application/creation/use-persist-protection-plan.d.ts +10 -0
  98. package/dist/src/modules/protection-plan/application/listing/use-find-protection-plan-summary-by-criteria.d.ts +13 -0
  99. package/dist/src/modules/protection-plan/application/listing/use-find-protection-plans-by-criteria.d.ts +15 -0
  100. package/dist/src/modules/protection-plan/application/listing/use-get-protection-plan-summary.d.ts +13 -0
  101. package/dist/src/modules/protection-plan/application/listing/use-is-merge-authority-mode.d.ts +3 -0
  102. package/dist/src/modules/protection-plan/application/listing/use-protection-plan-listener.d.ts +25 -0
  103. package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-authorize-merge-authority.d.ts +13 -0
  104. package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-get-merge-authority-protection-plan.d.ts +12 -0
  105. package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-merge-authority-merge-process-events.d.ts +6 -0
  106. package/dist/src/modules/protection-plan/application/merging-process/merge-triggers/use-retry-active-merge-trigger.d.ts +10 -0
  107. package/dist/src/modules/protection-plan/application/merging-process/merge-triggers/use-validate-merge-trigger.d.ts +12 -0
  108. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-backup-shares.d.ts +9 -0
  109. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-cold-share.d.ts +8 -0
  110. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-mobile-shares.d.ts +5 -0
  111. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-released-mobile-shares.d.ts +9 -0
  112. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-validator-shares.d.ts +9 -0
  113. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-check-can-collect-shares.d.ts +2 -0
  114. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-save-release-mobile-share-request.d.ts +11 -0
  115. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-send-plan-share-merge-status-event.d.ts +15 -0
  116. package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-send-plan-shares-merged.d.ts +10 -0
  117. package/dist/src/modules/protection-plan/application/merging-process/use-close-protection-plan.d.ts +10 -0
  118. package/dist/src/modules/protection-plan/application/merging-process/use-create-merging-process.d.ts +9 -0
  119. package/dist/src/modules/protection-plan/application/merging-process/use-delete-merging-process-by-criteria.d.ts +11 -0
  120. package/dist/src/modules/protection-plan/application/merging-process/use-delete-merging-process.d.ts +10 -0
  121. package/dist/src/modules/protection-plan/application/merging-process/use-get-merging-process-by-plan.d.ts +23 -0
  122. package/dist/src/modules/protection-plan/application/merging-process/use-merge-plan-beneficiary-selection.d.ts +27 -0
  123. package/dist/src/modules/protection-plan/application/merging-process/use-persist-merge-process.d.ts +12 -0
  124. package/dist/src/modules/protection-plan/application/merging-process/use-reveal-plan-data.d.ts +13 -0
  125. package/dist/src/modules/protection-plan/application/merging-process/use-save-merging-process.d.ts +9 -0
  126. package/dist/src/modules/protection-plan/application/merging-process/use-scan-plans-from-merge-authority-device.d.ts +10 -0
  127. package/dist/src/modules/protection-plan/application/merging-process/use-shareholder-merge-process-events.d.ts +2 -0
  128. package/dist/src/modules/protection-plan/domain/dto/plan-dto.d.ts +68 -0
  129. package/dist/src/modules/protection-plan/domain/dto/protection-plan-input.d.ts +173 -0
  130. package/dist/src/modules/protection-plan/domain/models/app-process.d.ts +29 -0
  131. package/dist/src/modules/protection-plan/domain/models/backup/backup-plan.d.ts +18 -0
  132. package/dist/src/modules/protection-plan/domain/models/backup/backup-shareholder.d.ts +9 -0
  133. package/dist/src/modules/protection-plan/domain/models/client/protection-plan-summary.d.ts +218 -0
  134. package/dist/src/modules/protection-plan/domain/models/data-asset.d.ts +113 -0
  135. package/dist/src/modules/protection-plan/domain/models/device-share-info.d.ts +10 -0
  136. package/dist/src/modules/protection-plan/domain/models/inheritance/heir.d.ts +9 -0
  137. package/dist/src/modules/protection-plan/domain/models/inheritance/inheritance-plan.d.ts +16 -0
  138. package/dist/src/modules/protection-plan/domain/models/merging-process/active-merge-process.d.ts +15 -0
  139. package/dist/src/modules/protection-plan/domain/models/merging-process/merging-process.d.ts +135 -0
  140. package/dist/src/modules/protection-plan/domain/models/plan-creation-proccess/plan-creation-process.d.ts +69 -0
  141. package/dist/src/modules/protection-plan/domain/models/plan-share.d.ts +69 -0
  142. package/dist/src/modules/protection-plan/domain/models/proccess-step.d.ts +21 -0
  143. package/dist/src/modules/protection-plan/domain/models/protection-plan-details.d.ts +70 -0
  144. package/dist/src/modules/protection-plan/domain/models/protection-plan-passphrase.d.ts +18 -0
  145. package/dist/src/modules/protection-plan/domain/models/protection-plan.d.ts +238 -0
  146. package/dist/src/modules/protection-plan/domain/models/shareholder.d.ts +32 -0
  147. package/dist/src/modules/protection-plan/domain/models/storage-option.d.ts +29 -0
  148. package/dist/src/modules/protection-plan/domain/models/trigger-settings-info.d.ts +6 -0
  149. package/dist/src/modules/protection-plan/domain/models/trigger.d.ts +46 -0
  150. package/dist/src/modules/protection-plan/domain/repositories/merge-authority-protection-plan-repository.d.ts +13 -0
  151. package/dist/src/modules/protection-plan/domain/repositories/merging-process-repository.d.ts +62 -0
  152. package/dist/src/modules/protection-plan/domain/repositories/plan-creation-repository.d.ts +7 -0
  153. package/dist/src/modules/protection-plan/domain/repositories/plan-security-repository.d.ts +7 -0
  154. package/dist/src/modules/protection-plan/domain/repositories/plan-triggers-repository.d.ts +4 -0
  155. package/dist/src/modules/protection-plan/domain/repositories/protection-plan-repository.d.ts +24 -0
  156. package/dist/src/modules/protection-plan/domain/services/blockchain-service.d.ts +32 -0
  157. package/dist/src/modules/protection-plan/domain/services/input-validation/PlanTypeInputValidator.d.ts +4 -0
  158. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-beneficiaries-input-validator.d.ts +240 -0
  159. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-data-assets-input-validator.d.ts +1108 -0
  160. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-details-input-validator.d.ts +23 -0
  161. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-shares-configuration-input-validator.d.ts +13 -0
  162. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-storage-configuration-input-validator.d.ts +25 -0
  163. package/dist/src/modules/protection-plan/domain/services/input-validation/plan-triggers-input-validator.d.ts +105 -0
  164. package/dist/src/modules/protection-plan/domain/services/input-validation/utils/index.d.ts +3 -0
  165. package/dist/src/modules/protection-plan/domain/services/merge-authorization-handler.d.ts +14 -0
  166. package/dist/src/modules/protection-plan/domain/services/merge-process-event-listener.d.ts +14 -0
  167. package/dist/src/modules/protection-plan/domain/services/plan-data-assets-manager.d.ts +69 -0
  168. package/dist/src/modules/protection-plan/domain/services/plan-data-revealer.d.ts +5 -0
  169. package/dist/src/modules/protection-plan/domain/services/plan-event-listener.d.ts +10 -0
  170. package/dist/src/modules/protection-plan/domain/services/plan-merge-threshold-range-calculator.d.ts +8 -0
  171. package/dist/src/modules/protection-plan/domain/services/plan-recovery-shares-range-calculator.d.ts +8 -0
  172. package/dist/src/modules/protection-plan/domain/services/plan-shares-generator.d.ts +18 -0
  173. package/dist/src/modules/protection-plan/domain/services/vault-service.d.ts +10 -0
  174. package/dist/src/modules/protection-plan/domain/utils/plan-details-mapper.d.ts +12 -0
  175. package/dist/src/modules/protection-plan/domain/utils/plan-shares-details-mapper.d.ts +10 -0
  176. package/dist/src/modules/protection-plan/domain/utils/plan-triggers-details-mapper.d.ts +5 -0
  177. package/dist/src/modules/protection-plan/domain/utils/protection-plan-internal-mapper.d.ts +5 -0
  178. package/dist/src/modules/protection-plan/index.d.ts +28 -0
  179. package/dist/src/modules/protection-plan/infrastructure/mappers/backup-shareholder-mapper.d.ts +7 -0
  180. package/dist/src/modules/protection-plan/infrastructure/mappers/draft-protection-plan-mapper.d.ts +8 -0
  181. package/dist/src/modules/protection-plan/infrastructure/mappers/heir-mapper.d.ts +7 -0
  182. package/dist/src/modules/protection-plan/infrastructure/mappers/merging-process-mapper.d.ts +5 -0
  183. package/dist/src/modules/protection-plan/infrastructure/mappers/plan-creation-mapper.d.ts +5 -0
  184. package/dist/src/modules/protection-plan/infrastructure/mappers/protection-plan-filters-mapper.d.ts +4 -0
  185. package/dist/src/modules/protection-plan/infrastructure/mappers/protection-plan-mapper.d.ts +10 -0
  186. package/dist/src/modules/protection-plan/infrastructure/repositories/app-merging-process-repository.d.ts +65 -0
  187. package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-creation-repository.d.ts +12 -0
  188. package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-security-repository.d.ts +11 -0
  189. package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-triggers-repository.d.ts +10 -0
  190. package/dist/src/modules/protection-plan/infrastructure/repositories/protection-plan/app-merge-authority-protection-plan-repository.d.ts +17 -0
  191. package/dist/src/modules/protection-plan/infrastructure/repositories/protection-plan/app-protection-plan-repository.d.ts +13 -0
  192. package/dist/src/modules/protection-plan/infrastructure/services/app-blockchain-service.d.ts +42 -0
  193. package/dist/src/modules/protection-plan/infrastructure/services/app-plan-data-revealer.d.ts +14 -0
  194. package/dist/src/modules/protection-plan/infrastructure/services/app-plan-shares-generator.d.ts +5 -0
  195. package/dist/src/modules/protection-plan/infrastructure/services/constants/device-constants.d.ts +1 -0
  196. package/dist/src/modules/protection-plan/infrastructure/services/inheriti-vault-service.d.ts +15 -0
  197. package/dist/src/modules/protection-plan/infrastructure/services/socket-io-merge-authorization-handler.d.ts +17 -0
  198. package/dist/src/modules/protection-plan/infrastructure/services/socket-io-merge-process-event-listener.d.ts +14 -0
  199. package/dist/src/modules/protection-plan/infrastructure/services/socket-io-plan-event-listener.d.ts +14 -0
  200. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-distribute-cold-shares-process.d.ts +15 -0
  201. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-get-active-plan-configuration-process.d.ts +11 -0
  202. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-plan-configuration-process-steps.d.ts +16 -0
  203. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-plan-configuration-process.d.ts +25 -0
  204. package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-start-protection-plan-configuration-process.d.ts +10 -0
  205. package/dist/src/modules/protection-plan/ui/plan-creation-process/view-models/plan-configuration-process-view.d.ts +55 -0
  206. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/merge-athority/use-merge-authority-sk-mobile-plan-detection.d.ts +13 -0
  207. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/merge-athority/use-merge-authority-sk-pro-plan-detection.d.ts +12 -0
  208. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-abort-merge-process.d.ts +6 -0
  209. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-active-merge-process-listener.d.ts +9 -0
  210. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-collect-plan-cold-share-process.d.ts +13 -0
  211. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-count-down.d.ts +7 -0
  212. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-initialize-merging-process.d.ts +21 -0
  213. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-merge-process-controller.d.ts +13 -0
  214. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-merge-process-release-shares-controller.d.ts +9 -0
  215. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-plan-merge-process.d.ts +55 -0
  216. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-process-plan-merge-steps.d.ts +11 -0
  217. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-reveal-data-controller.d.ts +26 -0
  218. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-start-merge-process.d.ts +20 -0
  219. package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-trigger-countdown.d.ts +18 -0
  220. package/dist/src/modules/protection-plan/ui/plan-merge-process/utils/merge-process-utils.d.ts +3 -0
  221. package/dist/src/modules/protection-plan/ui/plan-merge-process/view-models/plan-merge-process-view.d.ts +173 -0
  222. package/dist/src/modules/protection-plan/ui/protection-plan/utils/plan-beneficiary-builder.d.ts +12 -0
  223. package/dist/src/modules/protection-plan/ui/protection-plan/utils/plan-data-asset-builder.d.ts +35 -0
  224. package/dist/src/modules/protection-plan/ui/protection-plan/utils/protection-plan-code.d.ts +7 -0
  225. package/dist/src/modules/protection-plan/ui/protection-plan/utils/protection-plan-id.d.ts +7 -0
  226. package/dist/src/modules/protection-plan/ui/protection-plan/utils/trigger-builder.d.ts +24 -0
  227. package/dist/src/modules/safekey/application/use-connect-safekey-pro-device.d.ts +10 -0
  228. package/dist/src/modules/safekey/application/use-disconnect-safekey-device.d.ts +8 -0
  229. package/dist/src/modules/safekey/application/use-safekey-device.d.ts +16 -0
  230. package/dist/src/modules/safekey/application/use-validate-safekey-device-pin.d.ts +12 -0
  231. package/dist/src/modules/safekey/domain/services/cold-storage-service.d.ts +55 -0
  232. package/dist/src/modules/safekey/index.d.ts +4 -0
  233. package/dist/src/modules/safekey/infrastructure/services/safekey-cold-storage-service.d.ts +45 -0
  234. package/dist/src/modules/safekey/infrastructure/services/safekey-service.d.ts +9 -0
  235. package/dist/test/index.js +14 -0
  236. package/dist/tests/modules/_shared/domain/models/FinancialMother.d.ts +11 -0
  237. package/dist/tests/modules/_shared/domain/models/date-mother.d.ts +6 -0
  238. package/dist/tests/modules/_shared/domain/models/email-mother.d.ts +3 -0
  239. package/dist/tests/modules/_shared/domain/models/id-mother.d.ts +3 -0
  240. package/dist/tests/modules/_shared/domain/models/internet-mother.d.ts +11 -0
  241. package/dist/tests/modules/_shared/domain/models/mother-creator.d.ts +3 -0
  242. package/dist/tests/modules/_shared/domain/models/name-mother.d.ts +5 -0
  243. package/dist/tests/modules/_shared/domain/models/number-mother.d.ts +7 -0
  244. package/dist/tests/modules/_shared/domain/models/random-element-picker-mother.d.ts +3 -0
  245. package/dist/tests/modules/_shared/domain/models/uuid-mother.d.ts +3 -0
  246. package/dist/tests/modules/_shared/domain/models/word-mother.d.ts +5 -0
  247. package/dist/tests/modules/index.d.ts +6 -0
  248. package/dist/tests/modules/protection-plan/domain/plan-beneficiary-input-generator.d.ts +18 -0
  249. package/dist/tests/modules/protection-plan/domain/plan-data-asset-input-generator.d.ts +13 -0
  250. package/dist/tests/modules/protection-plan/domain/plan-details-input-generator.d.ts +7 -0
  251. package/dist/tests/modules/protection-plan/domain/plan-shares-configuration-input-generator.d.ts +20 -0
  252. package/dist/tests/modules/protection-plan/domain/plan-storage-configuration-input-generator.d.ts +4 -0
  253. package/dist/tests/modules/protection-plan/domain/plan-trigger-input-generator.d.ts +27 -0
  254. package/dist/tests/modules/protection-plan/domain/protection-plan-input-generator.d.ts +4 -0
  255. package/dist/tests/modules/protection-plan/index.d.ts +8 -0
  256. package/index.ts +6 -0
  257. package/package.json +78 -0
@@ -0,0 +1,13 @@
1
+ import MergingProcess, { RevealOptions } from '../../../protection-plan/domain/models/merging-process/merging-process';
2
+ import { DataAsset } from '../../../protection-plan/domain/models/data-asset';
3
+ import QueryOptions from '../../../_shared/domain/models/query-options';
4
+ export default function useRevealPlanData(process: MergingProcess, revealOptions: RevealOptions, options?: QueryOptions): {
5
+ error?: any;
6
+ isIdle: boolean;
7
+ loading: boolean;
8
+ loaded: boolean;
9
+ refetch: any;
10
+ isFetching: boolean;
11
+ isRefetching: boolean;
12
+ data?: DataAsset[] | null;
13
+ };
@@ -0,0 +1,9 @@
1
+ import MergingProcess from '../../../protection-plan/domain/models/merging-process/merging-process';
2
+ export default function useSaveMergingProcess(invalidate?: boolean): {
3
+ save: (newInstanceData?: MergingProcess | undefined) => Promise<any>;
4
+ reset: () => any;
5
+ loading: boolean;
6
+ loaded: boolean;
7
+ data: any;
8
+ error: any;
9
+ };
@@ -0,0 +1,10 @@
1
+ import { IOResponse } from '../../../safekey/domain/services/cold-storage-service';
2
+ import { ProtectionPlanSummary } from '../../../protection-plan/domain/models/client/protection-plan-summary';
3
+ export default function useScanPlansFromMergeAuthorityDevice(): {
4
+ find(devicePin: string): Promise<void>;
5
+ deviceId: any;
6
+ data: ProtectionPlanSummary[];
7
+ ioResponse: IOResponse | undefined;
8
+ error: string | undefined;
9
+ loading: boolean;
10
+ };
@@ -0,0 +1,2 @@
1
+ import { MergeProcessSubscriptionParams } from '../../../protection-plan/domain/services/merge-process-event-listener';
2
+ export declare function useShareholderMergeProcessEvents(): MergeProcessSubscriptionParams['handlers'];
@@ -0,0 +1,68 @@
1
+ import { PlanStorageOption } from '../../../protection-plan/domain/models/storage-option';
2
+ import { DataAsset } from '../../../protection-plan/domain/models/data-asset';
3
+ import { PlanBeneficiaryInput } from '../../../protection-plan';
4
+ import UserIdentity from '../../../auth/domain/models/user-identity';
5
+ interface PlanFormDetails {
6
+ title: string;
7
+ description: string;
8
+ privateNotes: string;
9
+ }
10
+ interface TriggerCountdown {
11
+ days: string;
12
+ hours: string;
13
+ minutes: string;
14
+ }
15
+ interface TriggerSettings {
16
+ useAccountEmail?: boolean;
17
+ externalEmail?: string;
18
+ phone?: string;
19
+ }
20
+ type TriggerConfig = {
21
+ enabled: true;
22
+ settings: TriggerSettings;
23
+ countdown: TriggerCountdown;
24
+ } | {
25
+ enabled: false;
26
+ settings?: undefined;
27
+ countdown?: undefined;
28
+ };
29
+ type TriggersFormValues = Record<string, TriggerConfig>;
30
+ interface StorageOwner {
31
+ option: PlanStorageOption;
32
+ }
33
+ interface StorageAdditional {
34
+ option: PlanStorageOption;
35
+ email?: string;
36
+ }
37
+ interface StorageFormValues {
38
+ owner: StorageOwner;
39
+ additional: StorageAdditional[];
40
+ option?: string;
41
+ mobileShareVerification?: 'INHERITI' | 'MOBILE_E2EE';
42
+ }
43
+ interface ShareholdersForm {
44
+ owner: {
45
+ mergeAuthority: boolean;
46
+ };
47
+ additional: string[];
48
+ additionalMergeAuthority: string[];
49
+ mergeThreshold: number;
50
+ backupSharesAmount: number;
51
+ }
52
+ export interface BasePlanDto {
53
+ id?: string;
54
+ code?: string;
55
+ isFree?: boolean;
56
+ details: PlanFormDetails;
57
+ assetsMode: string;
58
+ assets: DataAsset[];
59
+ shareholders: ShareholdersForm;
60
+ owner: UserIdentity;
61
+ storage: StorageFormValues;
62
+ triggers: TriggersFormValues;
63
+ beneficiariesData?: PlanBeneficiaryInput[];
64
+ }
65
+ export interface ProtectionPlanDto extends BasePlanDto {
66
+ type: 'BACKUP' | 'INHERITANCE';
67
+ }
68
+ export {};
@@ -0,0 +1,173 @@
1
+ import { DataAsset } from '../../../protection-plan/domain/models/data-asset';
2
+ /**
3
+ * Props used to create a new protection plan.
4
+ */
5
+ export interface ProtectionPlanInput {
6
+ /**
7
+ * Optional ID for the plan. Usually used for updates or internal references.
8
+ */
9
+ id?: string;
10
+ /**
11
+ * Plan type
12
+ */
13
+ type: 'BACKUP' | 'INHERITANCE';
14
+ /**
15
+ * Optional code to identify the plan in a human-readable way.
16
+ */
17
+ code?: string;
18
+ /**
19
+ * Details such as the plan title and description.
20
+ */
21
+ details: PlanDetailsInput;
22
+ /**
23
+ * List of beneficiaries with their storage and identity information.
24
+ */
25
+ beneficiaries: PlanBeneficiaryInput[];
26
+ /**
27
+ * Configuration for how shares are distributed and recovered.
28
+ */
29
+ sharesConfiguration: PlanSharesConfigurationInput;
30
+ /**
31
+ * Configuration for storage options including blockchain and verification methods.
32
+ */
33
+ storageConfiguration: PlanStorageConfigurationInput;
34
+ /**
35
+ * List of triggers that initiate the plan.
36
+ */
37
+ triggers: PlanTriggerInput[];
38
+ /**
39
+ * Data assets associated with the plan.
40
+ */
41
+ assets: (DataAsset | Omit<DataAsset, "id"> & {
42
+ id?: string;
43
+ })[];
44
+ }
45
+ /**
46
+ * Metadata describing the protection plan.
47
+ */
48
+ export interface PlanDetailsInput {
49
+ /**
50
+ * Title of the plan.
51
+ */
52
+ title: string;
53
+ /**
54
+ * Optional public description of the plan.
55
+ */
56
+ description?: string;
57
+ /**
58
+ * Optional private notes, only visible to the plan owner.
59
+ */
60
+ privateNotes?: string;
61
+ }
62
+ /**
63
+ * Blockchain options for storing plan data.
64
+ */
65
+ export type BlockChainStorageOption = 'VECHAIN' | 'ETHEREUM' | 'OPTIMISM' | 'INHERITI_CHAIN';
66
+ /**
67
+ * Storage methods for beneficiary shares.
68
+ */
69
+ export type BeneficiaryShareStorage = 'SAFEKEY_PRO' | 'SAFEKEY_MOBILE';
70
+ /**
71
+ * Verification options for mobile shares.
72
+ */
73
+ export type MobileShareVerificationOption = 'INHERITI' | 'MOBILE_E2EE';
74
+ /**
75
+ * Base details shared by all beneficiaries.
76
+ */
77
+ export interface BaseBeneficiaryDetails {
78
+ id?: string;
79
+ firstName: string;
80
+ lastName: string;
81
+ code?: string;
82
+ }
83
+ /**
84
+ * SAFEKEY_PRO beneficiary with optional email.
85
+ */
86
+ export interface SafeKeyProBeneficiary extends BaseBeneficiaryDetails {
87
+ email?: string;
88
+ }
89
+ /**
90
+ * SAFEKEY_MOBILE beneficiary with required email.
91
+ */
92
+ export interface SafeKeyMobileBeneficiary extends BaseBeneficiaryDetails {
93
+ email: string;
94
+ }
95
+ /**
96
+ * Base input for all plan beneficiaries.
97
+ */
98
+ interface BasePlanBeneficiaryInput {
99
+ /**
100
+ * Whether this beneficiary is a merge authority.
101
+ */
102
+ isMergeAuthority: boolean;
103
+ }
104
+ /**
105
+ * Beneficiary input for the plan, which includes either SAFEKEY_PRO or SAFEKEY_MOBILE options.
106
+ */
107
+ export type PlanBeneficiaryInput = (BasePlanBeneficiaryInput & {
108
+ storage: 'SAFEKEY_PRO';
109
+ details: SafeKeyProBeneficiary;
110
+ }) | (BasePlanBeneficiaryInput & {
111
+ storage: 'SAFEKEY_MOBILE';
112
+ details: SafeKeyMobileBeneficiary;
113
+ });
114
+ /**
115
+ * Countdown timer configuration for a trigger.
116
+ */
117
+ interface TriggerCountdown {
118
+ days: number;
119
+ hours: number;
120
+ minutes: number;
121
+ }
122
+ /**
123
+ * Email-based trigger settings.
124
+ */
125
+ type EmailTrigger = {
126
+ id: 'LOGIN' | 'CLICK_LINK';
127
+ countdown: TriggerCountdown;
128
+ settings: {
129
+ email: string;
130
+ };
131
+ };
132
+ /**
133
+ * Phone-based trigger settings.
134
+ */
135
+ type PhoneTrigger = {
136
+ id: 'SMS' | 'PHONE_CALL';
137
+ countdown: TriggerCountdown;
138
+ settings: {
139
+ phone: string;
140
+ };
141
+ };
142
+ export type MainStorage = BlockChainStorageOption | 'HSM' | "VAULT";
143
+ /**
144
+ * Union of all supported trigger types.
145
+ */
146
+ export type PlanTriggerInput = EmailTrigger | PhoneTrigger;
147
+ /**
148
+ * Configuration for where and how plan data is stored.
149
+ */
150
+ export interface PlanStorageConfigurationInput {
151
+ /**
152
+ * Option for the protection plan to store validator & recovery shares
153
+ */
154
+ option: MainStorage;
155
+ /**
156
+ * Method to verify shares stored in Safekey Mobile App
157
+ */
158
+ mobileShareVerification?: MobileShareVerificationOption;
159
+ }
160
+ /**
161
+ * Configuration for how many shares are created and how many are needed to merge.
162
+ */
163
+ export interface PlanSharesConfigurationInput {
164
+ /**
165
+ * Recovery shares to overpass missing shares
166
+ */
167
+ recoverySharesAmount: number;
168
+ /**
169
+ * Min amount of shares needed to open the plan
170
+ */
171
+ mergeThreshold: number;
172
+ }
173
+ export {};
@@ -0,0 +1,29 @@
1
+ import ProcessStep, { ProcessStepPrimitiveProps } from '../../../protection-plan/domain/models/proccess-step';
2
+ export interface AppProcessProps<ChildStepProps> {
3
+ id: string;
4
+ steps: ProcessStep<ChildStepProps>[];
5
+ activeStep: number;
6
+ }
7
+ export interface AppProcessPrimitiveProps<StepProps> extends Omit<AppProcessProps<StepProps>, 'steps'> {
8
+ steps: ProcessStepPrimitiveProps[];
9
+ }
10
+ export default class AppProcess<ChildProcessProps, ChildStepProps> {
11
+ protected props: AppProcessProps<ChildStepProps> & ChildProcessProps;
12
+ constructor(props: AppProcessProps<ChildStepProps> & ChildProcessProps);
13
+ get id(): string;
14
+ get completedStepCount(): number;
15
+ get pendingStepCount(): number;
16
+ get inProgressStep(): ProcessStep<ChildStepProps> | undefined;
17
+ get stepCount(): number;
18
+ get steps(): ProcessStep<ChildStepProps>[];
19
+ get isCompleted(): boolean;
20
+ get currentStep(): ProcessStep<ChildStepProps>;
21
+ static fromPrimitives<ChildStepProps>(props: AppProcessPrimitiveProps<ChildStepProps>): AppProcess<{
22
+ steps: ProcessStep<unknown>[];
23
+ id: string;
24
+ activeStep: number;
25
+ }, unknown>;
26
+ findStep(id: string): ProcessStep<ChildStepProps> | undefined;
27
+ addStep(step: ProcessStep<ChildStepProps>): void;
28
+ toPrimitives(): AppProcessPrimitiveProps<ChildStepProps>;
29
+ }
@@ -0,0 +1,18 @@
1
+ import BackupShareholder, { BackupShareholderPrimitiveProps } from '../../../../protection-plan/domain/models/backup/backup-shareholder';
2
+ import ProtectionPlanDetails from '../../../../protection-plan/domain/models/protection-plan-details';
3
+ import ProtectionPlan, { ProtectionPlanPrimitiveProps, ProtectionPlanProps } from '../../../../protection-plan/domain/models/protection-plan';
4
+ import Shareholder from '../../../../protection-plan/domain/models/shareholder';
5
+ export interface BackupPlanProps extends Omit<ProtectionPlanProps, 'type'> {
6
+ shareholders: BackupShareholder[];
7
+ }
8
+ export interface BackupPlanPrimitiveProps extends ProtectionPlanPrimitiveProps {
9
+ shareholders: BackupShareholderPrimitiveProps[];
10
+ }
11
+ export default class BackupPlan extends ProtectionPlan<BackupPlanProps> {
12
+ constructor(props: BackupPlanProps);
13
+ get details(): ProtectionPlanDetails;
14
+ get shareholders(): BackupShareholder[];
15
+ get shareholdersWithOwner(): Shareholder[];
16
+ static fromPrimitives(props: BackupPlanPrimitiveProps): BackupPlan;
17
+ toPrimitives(): BackupPlanPrimitiveProps;
18
+ }
@@ -0,0 +1,9 @@
1
+ import Shareholder, { ShareholderPrimitiveProps, ShareholderProps } from '../../../../protection-plan/domain/models/shareholder';
2
+ export interface BackupShareholderProps extends ShareholderProps {
3
+ }
4
+ export interface BackupShareholderPrimitiveProps extends ShareholderPrimitiveProps {
5
+ }
6
+ export default class BackupShareholder extends Shareholder {
7
+ constructor(props: BackupShareholderProps);
8
+ toPrimitives(): BackupShareholderPrimitiveProps;
9
+ }
@@ -0,0 +1,218 @@
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 {};
@@ -0,0 +1,113 @@
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
+ };
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,9 @@
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
+ }