@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,42 @@
1
+ import BlockchainService from '../../../protection-plan/domain/services/blockchain-service';
2
+ import APIRepository from '../../../_shared/infrastructure/api/api-repository';
3
+ import { BlockChainStorageOption } from '../../../protection-plan/domain/models/storage-option';
4
+ import AppPayloadEncrypter from '../../../_shared/infrastructure/api/app-payload-encrypter';
5
+ export default class AppBlockchainService extends APIRepository implements BlockchainService {
6
+ private sessionStorage;
7
+ private localStorage;
8
+ constructor(props: any);
9
+ protected get mergeAuthorityToken(): Promise<any>;
10
+ getRequestPayloadEncrypter(): Promise<AppPayloadEncrypter>;
11
+ createSmartContract(planId: string, walletConnectionContext?: any): Promise<any>;
12
+ addValidatorShare(data: {
13
+ planId: string;
14
+ shareData: any[];
15
+ }, contractAddress?: string): Promise<{
16
+ passphrase: string;
17
+ privateKey: string;
18
+ }>;
19
+ addBackupShares(data: {
20
+ planId: string;
21
+ sharesData: string[][];
22
+ }, contractAddress?: string): Promise<{
23
+ passphrase: string;
24
+ privateKey: string;
25
+ }>;
26
+ getValidatorShare(data: {
27
+ processId: string;
28
+ chain: BlockChainStorageOption;
29
+ }): Promise<any>;
30
+ getBackupShares(data: {
31
+ processId: string;
32
+ chain: BlockChainStorageOption;
33
+ }): Promise<any>;
34
+ getActiveChains(): Promise<{
35
+ id: BlockChainStorageOption;
36
+ name: string;
37
+ }[]>;
38
+ getKeys(data: {
39
+ processId: string;
40
+ }): Promise<any>;
41
+ private getSecureStorageKey;
42
+ }
@@ -0,0 +1,14 @@
1
+ import PlanDataRevealer from '../../../protection-plan/domain/services/plan-data-revealer';
2
+ import MergingProcess from '../../../protection-plan/domain/models/merging-process/merging-process';
3
+ import { DataAsset } from '../../../protection-plan/domain/models/data-asset';
4
+ export default class AppPlanDataRevealer implements PlanDataRevealer {
5
+ private planRepo;
6
+ private dataAssetsManager;
7
+ constructor(props: any);
8
+ reveal(process: MergingProcess): Promise<DataAsset[] | null>;
9
+ private getDecryptedValidatorShares;
10
+ private getDecryptedBackupShares;
11
+ private decryptBlockchainShares;
12
+ private getDecryptedMobileShares;
13
+ private getCollectedShareStrings;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { PlanSharesGenerator, SharesResponse } from '../../../protection-plan/domain/services/plan-shares-generator';
2
+ import PlanShare from '../../../protection-plan/domain/models/plan-share';
3
+ export default class AppPlanSharesGenerator implements PlanSharesGenerator {
4
+ create(planShares: PlanShare[], mergeThreshold: number, dataHex: string): Promise<SharesResponse>;
5
+ }
@@ -0,0 +1 @@
1
+ export declare const CONNECTED_DEVICE = "inheriti_connected_device";
@@ -0,0 +1,15 @@
1
+ import VaultService from '../../../protection-plan/domain/services/vault-service';
2
+ import APIRepository from '../../../_shared/infrastructure/api/api-repository';
3
+ import { DeviceShareInfo } from '../../../protection-plan/domain/models/device-share-info';
4
+ export default class InheritiVaultService extends APIRepository implements VaultService {
5
+ private sessionStorage;
6
+ constructor(props: any);
7
+ protected get mergeAuthorityToken(): Promise<any>;
8
+ distribute(data: {
9
+ planId: string;
10
+ sharesData: DeviceShareInfo[];
11
+ }): Promise<{
12
+ encryptionPassphrase: string;
13
+ }>;
14
+ collectReleased(processId: string): Promise<any>;
15
+ }
@@ -0,0 +1,17 @@
1
+ import { Socket } from 'socket.io-client';
2
+ import MergeAuthorizationHandler, { MergeAuthorizationHandlerParams } from '../../../protection-plan/domain/services/merge-authorization-handler';
3
+ interface Props {
4
+ socket: Socket;
5
+ }
6
+ export default class SocketIoMergeAuthorizationHandler implements MergeAuthorizationHandler {
7
+ private props;
8
+ constructor(props: Props);
9
+ get socket(): Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
10
+ subscribe: (data: MergeAuthorizationHandlerParams) => void;
11
+ requestToken: (data: {
12
+ clientId: string;
13
+ }) => void;
14
+ unsubscribe: (data: Pick<MergeAuthorizationHandlerParams, "clientId">) => any;
15
+ private onConnect;
16
+ }
17
+ export {};
@@ -0,0 +1,14 @@
1
+ import MergeProcessEventListener, { MergeProcessSubscriptionParams } from '../../../protection-plan/domain/services/merge-process-event-listener';
2
+ import { Socket } from 'socket.io-client';
3
+ interface Props {
4
+ socket: Socket;
5
+ }
6
+ export default class SocketIoMergeProcessEventListener implements MergeProcessEventListener {
7
+ private props;
8
+ constructor(props: Props);
9
+ get socket(): Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
10
+ subscribe: (data: MergeProcessSubscriptionParams) => void;
11
+ unsubscribe: (data: Pick<MergeProcessSubscriptionParams, "planId" | "processId">) => any;
12
+ private onConnect;
13
+ }
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Socket } from 'socket.io-client';
2
+ import PlanEventListener, { PlanEventListenerSubscriptionParams } from '../../../protection-plan/domain/services/plan-event-listener';
3
+ interface Props {
4
+ socket: Socket;
5
+ }
6
+ export default class SocketIoPlanEventListener implements PlanEventListener {
7
+ private props;
8
+ constructor(props: Props);
9
+ get socket(): Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
10
+ subscribe: (data: PlanEventListenerSubscriptionParams) => void;
11
+ unsubscribe: (data: Pick<PlanEventListenerSubscriptionParams, "planId">) => any;
12
+ private onConnect;
13
+ }
14
+ export {};
@@ -0,0 +1,15 @@
1
+ import PlanCreationProcess from '../../../../protection-plan/domain/models/plan-creation-proccess/plan-creation-process';
2
+ type COLD_SHARES_DISTRIBUTION_STATUS = 'CONNECT_DEVICE' | 'CONNECTING_DEVICE' | 'TOUCH_DEVICE_BUTTON' | 'WRITING_DATA' | 'ERROR' | 'SUCCESS';
3
+ export declare function useDistributeColdSharesProcess({ process, publish, enabled }: {
4
+ process?: PlanCreationProcess;
5
+ publish?: any;
6
+ enabled: boolean;
7
+ }): {
8
+ step: COLD_SHARES_DISTRIBUTION_STATUS;
9
+ currentBeneficiary: import("../../../domain/models/shareholder").default | undefined;
10
+ writeCurrentBeneficiaryShare: (devicePin: string) => Promise<void>;
11
+ writeProgress: number | undefined;
12
+ connectDeviceTimeout: number | undefined;
13
+ error: string | undefined;
14
+ };
15
+ export {};
@@ -0,0 +1,11 @@
1
+ import QueryOptions from '../../../../_shared/domain/models/query-options';
2
+ export default function useGetActivePlanConfigurationProcess(id: string, options?: QueryOptions): {
3
+ error?: any;
4
+ isIdle: boolean;
5
+ loading: boolean;
6
+ loaded: boolean;
7
+ refetch: any;
8
+ isFetching: boolean;
9
+ isRefetching: boolean;
10
+ data?: import("../../../domain/models/plan-creation-proccess/plan-creation-process").default | undefined;
11
+ };
@@ -0,0 +1,16 @@
1
+ declare const PLAN_CREATION_PROCESS_EVENTS: {
2
+ readonly PROCESS_INITIALIZED: "PROCESS_INITIALIZED";
3
+ readonly PROCESS_INITIALIZING: "PROCESS_INITIALIZING";
4
+ readonly STEP_COMPLETED: "STEP_COMPLETED";
5
+ readonly FINALIZED: "FINALIZED";
6
+ };
7
+ export default function usePlanConfigurationProcessSteps(planId?: string): {
8
+ state: any;
9
+ publish: (eventName: keyof typeof PLAN_CREATION_PROCESS_EVENTS, payload?: any) => void;
10
+ retryStep: () => Promise<void>;
11
+ };
12
+ export declare function useProcessStep(planId: string): {
13
+ completeStep: (step: any, publish: any) => Promise<null | undefined>;
14
+ processStep(publish: any): Promise<void>;
15
+ };
16
+ export {};
@@ -0,0 +1,25 @@
1
+ import { StartConfigurationProcessProps } from '../../../../protection-plan/ui/plan-creation-process/hooks/use-start-protection-plan-configuration-process';
2
+ import { PlanConfigurationProcessView } from '../../../../protection-plan/ui/plan-creation-process/view-models/plan-configuration-process-view';
3
+ export declare function usePlanConfigurationProcess(planId?: string): {
4
+ start: {
5
+ execute: (props: Omit<StartConfigurationProcessProps, "planId">) => Promise<void>;
6
+ error: string | undefined;
7
+ loading: boolean;
8
+ };
9
+ coldShareDistribution: {
10
+ writeCurrentBeneficiaryShare: {
11
+ execute: (devicePin: string) => Promise<void>;
12
+ progress: number | undefined;
13
+ error: string | undefined;
14
+ connectDeviceTimeout: number | undefined;
15
+ status: "ERROR" | "CONNECT_DEVICE" | "TOUCH_DEVICE_BUTTON" | "SUCCESS" | "CONNECTING_DEVICE" | "WRITING_DATA";
16
+ };
17
+ };
18
+ currentStep: {
19
+ retry: {
20
+ execute: () => Promise<void>;
21
+ };
22
+ };
23
+ process: PlanConfigurationProcessView;
24
+ error: string | undefined;
25
+ };
@@ -0,0 +1,10 @@
1
+ import { DataAsset } from '../../../../protection-plan/domain/models/data-asset';
2
+ export interface StartConfigurationProcessProps {
3
+ dataAssets: DataAsset[];
4
+ planId: string;
5
+ }
6
+ export declare function useStartProtectionPlanConfigurationProcess(publish: any): {
7
+ start({ dataAssets, planId }: StartConfigurationProcessProps): Promise<void>;
8
+ loading: boolean;
9
+ error: any;
10
+ };
@@ -0,0 +1,55 @@
1
+ import { ShareCreationStatus, ShareType } from '../../../../protection-plan/domain/models/plan-share';
2
+ type CONFIGURATION_STATUS = 'NOT_STARTED' | 'LOADING' | 'PLAN_CONFIGURATION' | 'SMART_CONTRACT_CREATION' | 'SHARES_CREATION' | 'VALIDATOR_SHARE_LINK' | 'BACKUP_SHARES_LINK' | 'MOBILE_SHARES_DISTRIBUTION' | 'COLD_SHARES_DISTRIBUTION' | 'FINALIZED';
3
+ interface PlanConfigurationBeneficiary {
4
+ id: string;
5
+ firstName: string;
6
+ lastName: string | undefined;
7
+ email: string | undefined;
8
+ profilePictureUrl: string | undefined;
9
+ }
10
+ interface PlanConfigurationShare {
11
+ id: string;
12
+ type: ShareType;
13
+ storage: string;
14
+ status: ShareCreationStatus;
15
+ beneficiary?: PlanConfigurationBeneficiary;
16
+ }
17
+ type PlanConfigurationBeneficiaryShare = Omit<PlanConfigurationShare, "beneficiary"> & {
18
+ beneficiary: PlanConfigurationBeneficiary;
19
+ };
20
+ interface PlanConfigurationProcessViewProps {
21
+ status: CONFIGURATION_STATUS;
22
+ shares: PlanConfigurationShare[];
23
+ steps: {
24
+ id: string;
25
+ status: 'IN_PROCESS' | 'COMPLETE' | 'INCOMPLETE' | 'ERROR';
26
+ errorMessage?: string;
27
+ }[];
28
+ }
29
+ export declare class PlanConfigurationProcessView {
30
+ private props;
31
+ constructor(props: PlanConfigurationProcessViewProps);
32
+ get status(): CONFIGURATION_STATUS;
33
+ get steps(): {
34
+ id: string;
35
+ status: "IN_PROCESS" | "COMPLETE" | "INCOMPLETE" | "ERROR";
36
+ errorMessage?: string;
37
+ }[];
38
+ get activeStepId(): string | undefined;
39
+ get completeProgress(): number;
40
+ get completedSteps(): {
41
+ id: string;
42
+ status: "IN_PROCESS" | "COMPLETE" | "INCOMPLETE" | "ERROR";
43
+ errorMessage?: string;
44
+ }[];
45
+ get isInProgress(): boolean;
46
+ get isFinalized(): boolean;
47
+ get allShares(): PlanConfigurationShare[];
48
+ get coldShares(): PlanConfigurationShare[];
49
+ get mobileShares(): PlanConfigurationShare[];
50
+ get isStarted(): boolean;
51
+ get inProgressCreationShare(): PlanConfigurationShare | undefined;
52
+ get inProgressDistributionShare(): PlanConfigurationShare | undefined;
53
+ get currentBeneficiaryShare(): PlanConfigurationBeneficiaryShare | undefined;
54
+ }
55
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ProtectionPlanSummary } from '../../../../../protection-plan/domain/models/client/protection-plan-summary';
2
+ type MERGE_STATE = 'SCAN_QR' | 'SCANNING' | 'FOUND_PLANS' | 'ERROR';
3
+ export default function useMergeAuthoritySkMobilePlanDetection(options?: {
4
+ enabled: boolean;
5
+ }): {
6
+ data: ProtectionPlanSummary[];
7
+ deviceId: string | undefined;
8
+ loading: boolean;
9
+ state: MERGE_STATE;
10
+ token: null;
11
+ requestTimeoutPercentage: number;
12
+ };
13
+ export {};
@@ -0,0 +1,12 @@
1
+ type MERGE_STATE = 'CONNECT_DEVICE' | 'CONNECTING_DEVICE' | 'TOUCH_DEVICE_BUTTON' | 'SCANNING' | 'FOUND_PLANS' | 'ERROR';
2
+ export default function useMergeAuthoritySkProPlanDetection(): {
3
+ detect: (devicePin: string) => Promise<void>;
4
+ deviceId: any;
5
+ connectDeviceTimeout: number | undefined;
6
+ data: import("../../../..").ProtectionPlanSummary[];
7
+ readProgress: number | undefined;
8
+ loading: boolean;
9
+ error: string | undefined;
10
+ state: MERGE_STATE;
11
+ };
12
+ export {};
@@ -0,0 +1,6 @@
1
+ import MergingProcess from '../../../../protection-plan/domain/models/merging-process/merging-process';
2
+ export default function useAbortMergeProcess(): {
3
+ abort(process: MergingProcess): Promise<void>;
4
+ loading: boolean;
5
+ error: any;
6
+ };
@@ -0,0 +1,9 @@
1
+ import MergingProcess from '../../../../protection-plan/domain/models/merging-process/merging-process';
2
+ export declare function useActiveMergeProcessListener(planId: string, options?: {
3
+ isMergeAuthority?: boolean;
4
+ enabled?: boolean;
5
+ }): {
6
+ loading: boolean;
7
+ plan: import("../../../domain/models/protection-plan").default<any> | undefined;
8
+ process: MergingProcess | undefined;
9
+ };
@@ -0,0 +1,13 @@
1
+ import Shareholder from '../../../../protection-plan/domain/models/shareholder';
2
+ import MergingProcess from '../../../../protection-plan/domain/models/merging-process/merging-process';
3
+ type COLD_SHARES_COLLECTION_STATUS = 'CONNECT_DEVICE' | 'CONNECTING_DEVICE' | 'TOUCH_DEVICE_BUTTON' | 'COLLECTING_DATA' | 'ERROR' | 'SUCCESS';
4
+ export default function useCollectPlanColdShareProcess(process?: MergingProcess): {
5
+ step: COLD_SHARES_COLLECTION_STATUS;
6
+ collectCurrentBeneficiaryShare: (devicePin: string) => Promise<void>;
7
+ isInProgress: boolean;
8
+ currentBeneficiary: Shareholder;
9
+ collectProgress: number | undefined;
10
+ connectDeviceTimeout: number | undefined;
11
+ error: string | number;
12
+ };
13
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare function useCountDown(initialValue: any, onTimeout: any, options: {
2
+ enabled: boolean;
3
+ interval: number;
4
+ }): {
5
+ value: number;
6
+ formatedValue: string;
7
+ };
@@ -0,0 +1,21 @@
1
+ import MergingProcess from '../../../../protection-plan/domain/models/merging-process/merging-process';
2
+ import ProtectionPlan from '../../../../protection-plan/domain/models/protection-plan';
3
+ export default function useInitializeMergingProcess(): {
4
+ error: any;
5
+ loading: boolean;
6
+ init: (plan: ProtectionPlan<any>, params: {
7
+ id: string;
8
+ selectedBeneficiariesIds: string[];
9
+ mergeAuthorityId: string;
10
+ requestDate: Date;
11
+ }) => Promise<{
12
+ id: string;
13
+ planId: string;
14
+ process: MergingProcess;
15
+ } | undefined>;
16
+ build: (plan: ProtectionPlan<any>) => Promise<{
17
+ id: string;
18
+ planId: string;
19
+ process: MergingProcess;
20
+ } | undefined>;
21
+ };
@@ -0,0 +1,13 @@
1
+ import MergingProcess from '../../../../protection-plan/domain/models/merging-process/merging-process';
2
+ export default function useMergeProcessController({ process, enabled }: {
3
+ process?: MergingProcess;
4
+ enabled?: boolean;
5
+ }): {
6
+ isCompleted: boolean | undefined;
7
+ loading: boolean;
8
+ stepError: {
9
+ stepId: string;
10
+ message: string;
11
+ } | undefined;
12
+ error: any;
13
+ };
@@ -0,0 +1,9 @@
1
+ import MergingProcess from '../../../../protection-plan/domain/models/merging-process/merging-process';
2
+ export default function useMergeProcessReleaseSharesController(process: MergingProcess): {
3
+ sendMaRequest(): Promise<void>;
4
+ send(): Promise<void>;
5
+ sent: boolean;
6
+ maRequestSent: boolean;
7
+ loading: boolean;
8
+ error: any;
9
+ };
@@ -0,0 +1,55 @@
1
+ import { StartMergeProcessProps } from '../../../../protection-plan/ui/plan-merge-process/hooks/use-start-merge-process';
2
+ import { PlanMergeProcessView } from '../../../../protection-plan/ui/plan-merge-process/view-models/plan-merge-process-view';
3
+ export default function usePlanMergeProcess(planId?: string): {
4
+ start: {
5
+ execute: (props: Omit<StartMergeProcessProps, "planId">) => Promise<void>;
6
+ loading: boolean;
7
+ error: string | undefined;
8
+ };
9
+ abort: {
10
+ execute: () => Promise<void>;
11
+ loading: boolean;
12
+ error: string | undefined;
13
+ };
14
+ close: {
15
+ execute: () => Promise<void>;
16
+ loading: boolean;
17
+ error: string | undefined;
18
+ };
19
+ shareCollection: {
20
+ cold: {
21
+ collectCurrentBeneficiaryShare: {
22
+ execute: (devicePin: string) => Promise<void>;
23
+ progress: number | undefined;
24
+ error: string | undefined;
25
+ connectDeviceTimeout: number | undefined;
26
+ status: "ERROR" | "CONNECT_DEVICE" | "TOUCH_DEVICE_BUTTON" | "SUCCESS" | "CONNECTING_DEVICE" | "COLLECTING_DATA";
27
+ };
28
+ };
29
+ mobile: {
30
+ sendReleaseShareRequest: {
31
+ execute: () => Promise<void>;
32
+ loading: boolean;
33
+ error: string | undefined;
34
+ sent: boolean;
35
+ };
36
+ };
37
+ };
38
+ currentTrigger: {
39
+ validate: {
40
+ execute: ({ code }: {
41
+ code: string;
42
+ }) => Promise<any>;
43
+ error: string | undefined;
44
+ loading: boolean;
45
+ };
46
+ retry: {
47
+ execute: () => Promise<any>;
48
+ error: string | undefined;
49
+ loading: boolean;
50
+ };
51
+ };
52
+ process: PlanMergeProcessView;
53
+ loading: boolean;
54
+ error: string | undefined;
55
+ };
@@ -0,0 +1,11 @@
1
+ import MergingProcess from '../../../../protection-plan/domain/models/merging-process/merging-process';
2
+ export default function useProcessPlanMergeSteps({ process, enabled }: {
3
+ process?: MergingProcess;
4
+ enabled: boolean;
5
+ }): {
6
+ stepError: {
7
+ stepId: string;
8
+ message: string;
9
+ } | undefined;
10
+ error: any;
11
+ };
@@ -0,0 +1,26 @@
1
+ import ProtectionPlan from '../../../../protection-plan/domain/models/protection-plan';
2
+ import MergingProcess, { RevealOptions } from '../../../../protection-plan/domain/models/merging-process/merging-process';
3
+ export declare const REVEAL_OPTIONS: {
4
+ id: number;
5
+ name: string;
6
+ }[];
7
+ export declare const DEFAULT_REVEAL_OPTION: {
8
+ id: number;
9
+ name: string;
10
+ };
11
+ export declare function useRevealDataController({ plan, process, revealOptions, enabled }: {
12
+ process?: MergingProcess;
13
+ plan?: ProtectionPlan<any>;
14
+ revealOptions: RevealOptions;
15
+ enabled?: boolean;
16
+ }): {
17
+ retry: any;
18
+ timeoutMinutesForClose: number;
19
+ remainingTime: number;
20
+ error: any;
21
+ planData: import("../../..").DataAsset[] | null | undefined;
22
+ processId: string | undefined;
23
+ plan: ProtectionPlan<any> | undefined;
24
+ loading: boolean;
25
+ revealing: boolean;
26
+ };
@@ -0,0 +1,20 @@
1
+ export interface StartMergeProcessProps {
2
+ id?: string;
3
+ planId: string;
4
+ selectedBeneficiaries: OnlyOne<{
5
+ id: string;
6
+ email: string;
7
+ code: string;
8
+ }>[];
9
+ selectedMergeAuthority: OnlyOne<{
10
+ id: string;
11
+ email: string;
12
+ code: string;
13
+ deviceId: string;
14
+ }>;
15
+ }
16
+ export declare function useStartMergeProcess(): {
17
+ start: ({ id, planId, selectedMergeAuthority, selectedBeneficiaries, }: StartMergeProcessProps) => Promise<void>;
18
+ loading: boolean;
19
+ error: string | undefined;
20
+ };
@@ -0,0 +1,18 @@
1
+ interface Countdown {
2
+ days: number;
3
+ hours: number;
4
+ minutes: number;
5
+ seconds: number;
6
+ }
7
+ export default function useTriggerCountDown({ startedAt, countdownConfiguration, onTimeout, options }: {
8
+ startedAt?: Date;
9
+ onTimeout?: any;
10
+ countdownConfiguration: Countdown;
11
+ options?: {
12
+ enabled?: boolean;
13
+ };
14
+ }): {
15
+ value: Countdown;
16
+ formatedValue: string;
17
+ };
18
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const MergeProcessUtils: {
2
+ generateId(): string;
3
+ };