@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,2 @@
1
+ declare const useServiceProvider: (selector?: (v: any) => any) => any;
2
+ export default useServiceProvider;
@@ -0,0 +1 @@
1
+ export default function useService<T>(serviceName: string): T;
@@ -0,0 +1,4 @@
1
+ export declare function useSafeSetState<T>(initialState?: T): [T, React.Dispatch<React.SetStateAction<T>>];
2
+ export declare function usePrevious(value: any): undefined;
3
+ export declare function useDeepCompareEffect(callback: any, inputs: any): void;
4
+ export declare function useTimeout(ms?: number): boolean;
@@ -0,0 +1,10 @@
1
+ import DateTimeUtils from '../../../_shared/domain/utils/misc/datetime-utils';
2
+ import ObjectUtils from '../../../_shared/domain/utils/misc/object-utils';
3
+ import UuidUtils from '../utils/misc/uuid-utils';
4
+ import TextUtils from '../utils/misc/text-utils';
5
+ export interface AppUtils {
6
+ uuid: typeof UuidUtils;
7
+ object: typeof ObjectUtils;
8
+ date: typeof DateTimeUtils;
9
+ text: typeof TextUtils;
10
+ }
@@ -0,0 +1,39 @@
1
+ import Currency, { CurrencyPrimitiveProps } from './currency';
2
+ interface CurrencyPriceProps {
3
+ value: number;
4
+ formattedValue?: string;
5
+ currency: Currency;
6
+ }
7
+ export interface CurrencyPricePrimitiveProps {
8
+ value: number;
9
+ formattedValue?: string;
10
+ currency: CurrencyPrimitiveProps;
11
+ }
12
+ export interface CurrencyPriceSimplifiedPrimitiveProps {
13
+ value: number;
14
+ currency: string;
15
+ }
16
+ export default class CurrencyPrice {
17
+ private props;
18
+ constructor(props: CurrencyPriceProps);
19
+ get value(): number;
20
+ get formattedValue(): string;
21
+ get isCrypto(): boolean;
22
+ get currency(): Currency;
23
+ get isZero(): boolean;
24
+ static sum(priceA: CurrencyPrice, priceB: CurrencyPrice): CurrencyPrice;
25
+ static subtract(priceA: CurrencyPrice, priceB: CurrencyPrice): CurrencyPrice;
26
+ static times(currencyPrice: CurrencyPrice, times: number, totalCurrency?: Currency): CurrencyPrice;
27
+ static div(currencyPrice: CurrencyPrice, times: number, totalCurrency?: Currency): CurrencyPrice;
28
+ static getAcc(prices: CurrencyPrice[]): CurrencyPrice;
29
+ static fromPrimitives(props: CurrencyPricePrimitiveProps): CurrencyPrice;
30
+ static fromSimplifiedPrimitives(props: CurrencyPriceSimplifiedPrimitiveProps): CurrencyPrice;
31
+ static isEqual(priceA: CurrencyPrice, priceB: CurrencyPrice): boolean;
32
+ static equalPrices(pricesA: CurrencyPrice[], pricesB: CurrencyPrice[]): boolean;
33
+ static fromZero(currency: Currency): CurrencyPrice;
34
+ static percentage(price: CurrencyPrice, percentage: number): CurrencyPrice;
35
+ static fromPrimitiveArray(items: CurrencyPricePrimitiveProps[]): CurrencyPrice[];
36
+ getFormattedValue(format?: string): string;
37
+ toPrimitives(): CurrencyPricePrimitiveProps;
38
+ }
39
+ export {};
@@ -0,0 +1,24 @@
1
+ export declare const euroAbbr = "eur";
2
+ export declare const euroFormat: (value: number, pattern?: string) => string;
3
+ interface CurrencyProps {
4
+ name: string;
5
+ abbr: string;
6
+ format?: (value: number) => string;
7
+ }
8
+ export interface CurrencyPrimitiveProps {
9
+ name: string;
10
+ abbr: string;
11
+ format?: (value: number, pattern?: string) => string;
12
+ }
13
+ export default class Currency {
14
+ private props;
15
+ constructor(props: CurrencyProps);
16
+ get name(): string;
17
+ get abbr(): string;
18
+ static fromPrimitives(props: CurrencyPrimitiveProps): Currency;
19
+ static fromAbbr(abbr: string): any;
20
+ isEqual(otherCurrency: Currency): boolean;
21
+ format(value: number, format?: string): string;
22
+ toPrimitives(): CurrencyPrimitiveProps;
23
+ }
24
+ export {};
@@ -0,0 +1,3 @@
1
+ import Currency from './currency';
2
+ declare const EuroCurrency: Currency;
3
+ export default EuroCurrency;
@@ -0,0 +1,8 @@
1
+ import { QueryClient } from "react-query";
2
+ export default interface MutationOptions {
3
+ action?: string;
4
+ undoable?: boolean;
5
+ onSuccess?: (response: any, queryClient: QueryClient, params: any) => any | Object;
6
+ onFailure?: (error?: any) => any | Object;
7
+ withDeclarativeSideEffectsSupport?: boolean;
8
+ }
@@ -0,0 +1,5 @@
1
+ export default interface Mutation {
2
+ id: string;
3
+ type: string;
4
+ payload: object;
5
+ }
@@ -0,0 +1,4 @@
1
+ export default interface PaginationOptions {
2
+ page?: number;
3
+ perPage?: number;
4
+ }
@@ -0,0 +1,6 @@
1
+ export default interface QueryOptions {
2
+ keepPreviousData?: boolean;
3
+ enabled?: boolean;
4
+ cacheTime?: number;
5
+ staleTime?: number;
6
+ }
@@ -0,0 +1,5 @@
1
+ export default interface Query {
2
+ id: string;
3
+ type: string;
4
+ payload: object;
5
+ }
@@ -0,0 +1,3 @@
1
+ export type ResourceCount = {
2
+ count: number;
3
+ };
@@ -0,0 +1,4 @@
1
+ export default interface SortOptions {
2
+ field?: string;
3
+ order?: string;
4
+ }
@@ -0,0 +1,13 @@
1
+ import Mutation from './mutation';
2
+ import MutationOptions from './mutation-options';
3
+ export type UseMutationValue<T = any> = [
4
+ (query?: Partial<Mutation>, options?: Partial<MutationOptions>) => any,
5
+ {
6
+ data?: T;
7
+ total?: number;
8
+ error?: any;
9
+ loading: boolean;
10
+ loaded: boolean;
11
+ reset: () => any;
12
+ }
13
+ ];
@@ -0,0 +1,11 @@
1
+ export default interface UseQueryValue<T = any> {
2
+ data?: T;
3
+ total?: number;
4
+ error?: any;
5
+ isIdle: boolean;
6
+ loading: boolean;
7
+ loaded: boolean;
8
+ refetch: any;
9
+ isFetching: boolean;
10
+ isRefetching: boolean;
11
+ }
@@ -0,0 +1,6 @@
1
+ import Mutation from "../models/mutation";
2
+ import MutationOptions from "../models/mutation-options";
3
+ import { UseMutationValue } from "../models/use-mutation-value";
4
+ export default interface MutationCreator {
5
+ execute(query: Mutation, queryFn: any, options?: MutationOptions): UseMutationValue;
6
+ }
@@ -0,0 +1,6 @@
1
+ import Query from "../models/query";
2
+ import QueryOptions from "../models/query-options";
3
+ import UseQueryValue from "../models/use-query-value";
4
+ export default interface QueryCreator {
5
+ execute(query: Query, queryFn: any, options: QueryOptions): UseQueryValue;
6
+ }
@@ -0,0 +1,48 @@
1
+ declare const ArrayUtils: {
2
+ groupBy: {
3
+ <T>(collection: import("lodash").List<T> | null | undefined, iteratee?: import("lodash").ValueIteratee<T>): import("lodash").Dictionary<T[]>;
4
+ <T extends object>(collection: T | null | undefined, iteratee?: import("lodash").ValueIteratee<T[keyof T]>): import("lodash").Dictionary<Array<T[keyof T]>>;
5
+ };
6
+ orderBy: {
7
+ <T>(collection: import("lodash").List<T> | null | undefined, iteratees?: import("lodash").Many<import("lodash").ListIterator<T, import("lodash").NotVoid>>, orders?: import("lodash").Many<boolean | "asc" | "desc">): T[];
8
+ <T>(collection: import("lodash").List<T> | null | undefined, iteratees?: import("lodash").Many<import("lodash").ListIteratee<T>>, orders?: import("lodash").Many<boolean | "asc" | "desc">): T[];
9
+ <T extends object>(collection: T | null | undefined, iteratees?: import("lodash").Many<import("lodash").ObjectIterator<T, import("lodash").NotVoid>>, orders?: import("lodash").Many<boolean | "asc" | "desc">): Array<T[keyof T]>;
10
+ <T extends object>(collection: T | null | undefined, iteratees?: import("lodash").Many<import("lodash").ObjectIteratee<T>>, orders?: import("lodash").Many<boolean | "asc" | "desc">): Array<T[keyof T]>;
11
+ };
12
+ isArray: {
13
+ (value?: any): value is any[];
14
+ <T>(value?: any): value is any[];
15
+ };
16
+ isEqual: (value: any, other: any) => boolean;
17
+ filter: {
18
+ (collection: string | null | undefined, predicate?: import("lodash").StringIterator<boolean>): string[];
19
+ <T, S extends T>(collection: import("lodash").List<T> | null | undefined, predicate: import("lodash").ListIteratorTypeGuard<T, S>): S[];
20
+ <T>(collection: import("lodash").List<T> | null | undefined, predicate?: import("lodash").ListIterateeCustom<T, boolean>): T[];
21
+ <T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: import("lodash").ObjectIteratorTypeGuard<T, S>): S[];
22
+ <T extends object>(collection: T | null | undefined, predicate?: import("lodash").ObjectIterateeCustom<T, boolean>): Array<T[keyof T]>;
23
+ };
24
+ find: {
25
+ <T, S extends T>(collection: import("lodash").List<T> | null | undefined, predicate: import("lodash").ListIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
26
+ <T>(collection: import("lodash").List<T> | null | undefined, predicate?: import("lodash").ListIterateeCustom<T, boolean>, fromIndex?: number): T | undefined;
27
+ <T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: import("lodash").ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
28
+ <T extends object>(collection: T | null | undefined, predicate?: import("lodash").ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T] | undefined;
29
+ };
30
+ differenceWith: {
31
+ <T1, T2>(array: import("lodash").List<T1> | null | undefined, values: import("lodash").List<T2>, comparator: import("lodash").Comparator2<T1, T2>): T1[];
32
+ <T1, T2, T3>(array: import("lodash").List<T1> | null | undefined, values1: import("lodash").List<T2>, values2: import("lodash").List<T3>, comparator: import("lodash").Comparator2<T1, T2 | T3>): T1[];
33
+ <T1, T2, T3, T4>(array: import("lodash").List<T1> | null | undefined, values1: import("lodash").List<T2>, values2: import("lodash").List<T3>, ...values: Array<import("lodash").List<T4> | import("lodash").Comparator2<T1, T2 | T3 | T4>>): T1[];
34
+ <T>(array: import("lodash").List<T> | null | undefined, ...values: Array<import("lodash").List<T>>): T[];
35
+ };
36
+ combine(arr1: any[], arr2: any[]): any[];
37
+ xor: <T>(...arrays: Array<import("lodash").List<T> | null | undefined>) => T[];
38
+ replaceByKey: (arr: any[], newValue: any, keyName: string) => any[];
39
+ replaceWhere<T = any>(arr: T[], condition: (params: T) => boolean, newValue: any): T[];
40
+ toggleAdd<T = any>(array: T[], element: T, predicate: any): T[];
41
+ keyBy<T = any>(array: T[], predicate: any): import("lodash").Dictionary<T>;
42
+ uniq<T = any>(array: T[]): T[];
43
+ uniqBy<T = any>(array: T[], criteria: any): T[];
44
+ findIndex<T = any>(array: T[], predicate: any): number;
45
+ concat<T = any>(array: T[], ...rest: T[]): T[];
46
+ filterLike(arr1: any[], fieldName: string, like: string): any[];
47
+ };
48
+ export default ArrayUtils;
@@ -0,0 +1,40 @@
1
+ declare const DateTimeUtils: {
2
+ differenceInDays: (a: Date, b: Date) => number;
3
+ differenceInMinutes: (a: Date, b: Date) => number;
4
+ differenceInSeconds: (a: Date, b: Date) => number;
5
+ addMonths: (a: Date, months: number) => Date;
6
+ subtractMonths: (a: Date, months: number) => Date;
7
+ addYears: (a: Date, years: number) => Date;
8
+ subtractYears: (a: Date, years: number) => Date;
9
+ addDays: (a: Date, days: number) => Date;
10
+ addMinutes: (a: Date, minutes: number) => Date;
11
+ addHours: (a: Date, hours: number) => Date;
12
+ ago(date: Date): string;
13
+ subtractDays: (a: Date, days: number) => Date;
14
+ subtractMinutes: (a: Date, minutes: number) => Date;
15
+ subtractWeeks: (a: Date, weeks: number) => Date;
16
+ utc(a: Date): Date;
17
+ utcOffset(timezone?: string): number;
18
+ toTimezone(date: Date, timezone: string): Date;
19
+ hoursOffSet(timezone: string): number;
20
+ guessTimezone(): string;
21
+ format: (date: Date, format: string, utc?: boolean) => string;
22
+ isPast: (date: Date) => boolean;
23
+ age: (date: Date) => number;
24
+ fromTime(time: string, format?: string | undefined): Date;
25
+ fromString(date: string, format?: string | undefined, utc?: boolean): Date;
26
+ isAfter(a: Date, b: Date): boolean;
27
+ getDateOnly(a: Date): Date;
28
+ timezoneList(): string[];
29
+ startOfMonth: (date: Date) => Date;
30
+ endOfMonth: (date: Date) => Date;
31
+ startOfDay: (date: Date) => Date;
32
+ endOfDay: (date: Date) => Date;
33
+ startOfWeek: (date: Date) => Date;
34
+ endOfWeek: (date: Date) => Date;
35
+ timezones(): string[];
36
+ daysRange(count: number, interval?: number): Date[];
37
+ isDate(value: any): value is Date;
38
+ isEqual(date1: Date, date2: Date): boolean;
39
+ };
40
+ export default DateTimeUtils;
@@ -0,0 +1,17 @@
1
+ import * as openpgp from 'openpgp/lightweight';
2
+ declare const EncryptUtils: {
3
+ createPassphrase(length?: number): string;
4
+ generateKey(passphrase: string): Promise<{
5
+ publicKeyArmored: string;
6
+ privateKeyArmored: string;
7
+ }>;
8
+ asymmetricEncrypt(data: string, publicKeyArmored: string, privateKeyArmored: string, passphrase: string): Promise<string>;
9
+ symmetricEncrypt(data: string, passphrase: string): Promise<string>;
10
+ decryptPrivateKey({ privateKeyArmored, passphrase }: {
11
+ privateKeyArmored: any;
12
+ passphrase: any;
13
+ }): Promise<openpgp.PrivateKey>;
14
+ keyToBase64(key: string, passphrase: string): Promise<string>;
15
+ keyFromBase64(base64D: string, passphrase: string): Promise<openpgp.PrivateKey>;
16
+ };
17
+ export default EncryptUtils;
@@ -0,0 +1,4 @@
1
+ declare const NumberUtils: {
2
+ format: (value: number, formatString: string) => string;
3
+ };
4
+ export default NumberUtils;
@@ -0,0 +1,76 @@
1
+ type JSONObject = {
2
+ [key: string]: any;
3
+ };
4
+ declare const ObjectUtils: {
5
+ get: {
6
+ <TObject extends object, TKey extends keyof TObject>(object: TObject, path: TKey | [TKey]): TObject[TKey];
7
+ <TObject extends object, TKey extends keyof TObject>(object: TObject | null | undefined, path: TKey | [TKey]): TObject[TKey] | undefined;
8
+ <TObject extends object, TKey extends keyof TObject, TDefault>(object: TObject | null | undefined, path: TKey | [TKey], defaultValue: TDefault): Exclude<TObject[TKey], undefined> | TDefault;
9
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1]>(object: TObject, path: [TKey1, TKey2]): TObject[TKey1][TKey2];
10
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>>(object: TObject | null | undefined, path: [TKey1, TKey2]): NonNullable<TObject[TKey1]>[TKey2] | undefined;
11
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2], defaultValue: TDefault): Exclude<NonNullable<TObject[TKey1]>[TKey2], undefined> | TDefault;
12
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2]>(object: TObject, path: [TKey1, TKey2, TKey3]): TObject[TKey1][TKey2][TKey3];
13
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3]): NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3] | undefined;
14
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3], undefined> | TDefault;
15
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2], TKey4 extends keyof TObject[TKey1][TKey2][TKey3]>(object: TObject, path: [TKey1, TKey2, TKey3, TKey4]): TObject[TKey1][TKey2][TKey3][TKey4];
16
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4]): NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4] | undefined;
17
+ <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude<NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4], undefined> | TDefault;
18
+ <T>(object: import("lodash").NumericDictionary<T>, path: number): T;
19
+ <T>(object: import("lodash").NumericDictionary<T> | null | undefined, path: number): T | undefined;
20
+ <T, TDefault>(object: import("lodash").NumericDictionary<T> | null | undefined, path: number, defaultValue: TDefault): T | TDefault;
21
+ <TDefault>(object: null | undefined, path: import("lodash").PropertyPath, defaultValue: TDefault): TDefault;
22
+ (object: null | undefined, path: import("lodash").PropertyPath): undefined;
23
+ <TObject, TPath extends string>(data: TObject, path: TPath): string extends TPath ? any : import("lodash").GetFieldType<TObject, TPath>;
24
+ <TObject, TPath extends string, TDefault = import("lodash").GetFieldType<TObject, TPath, "Path">>(data: TObject, path: TPath, defaultValue: TDefault): Exclude<import("lodash").GetFieldType<TObject, TPath>, null | undefined> | TDefault;
25
+ (object: any, path: import("lodash").PropertyPath, defaultValue?: any): any;
26
+ };
27
+ isNull: (value: any) => value is null;
28
+ omit: {
29
+ <T extends object, K extends import("lodash").PropertyName[]>(object: T | null | undefined, ...paths: K): Pick<T, Exclude<keyof T, K[number]>>;
30
+ <T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<import("lodash").Many<K>>): import("lodash").Omit<T, K>;
31
+ <T extends object>(object: T | null | undefined, ...paths: Array<import("lodash").Many<import("lodash").PropertyName>>): import("lodash").PartialObject<T>;
32
+ };
33
+ mapValues: {
34
+ <TResult>(obj: string | null | undefined, callback: import("lodash").StringIterator<TResult>): import("lodash").NumericDictionary<TResult>;
35
+ <T, TResult>(array: T[], callback: import("lodash").ArrayIterator<T, TResult>): import("lodash").NumericDictionary<TResult>;
36
+ <T extends object, TResult>(obj: T | null | undefined, callback: import("lodash").ObjectIterator<T, TResult>): { [P in keyof T]: TResult; };
37
+ <T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined, iteratee: object): import("lodash").Dictionary<boolean>;
38
+ <T extends object>(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean; };
39
+ <T, TKey extends keyof T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined, iteratee: TKey): import("lodash").Dictionary<T[TKey]>;
40
+ <T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined, iteratee: string): import("lodash").Dictionary<any>;
41
+ <T extends object>(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any; };
42
+ (obj: string | null | undefined): import("lodash").NumericDictionary<string>;
43
+ <T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined): import("lodash").Dictionary<T>;
44
+ <T extends object>(obj: T): T;
45
+ <T extends object>(obj: T | null | undefined): import("lodash").PartialObject<T>;
46
+ };
47
+ omitUnknown: (object: any) => Partial<any>;
48
+ omitBy: {
49
+ <T>(object: import("lodash").Dictionary<T> | null | undefined, predicate?: import("lodash").ValueKeyIteratee<T>): import("lodash").Dictionary<T>;
50
+ <T>(object: import("lodash").NumericDictionary<T> | null | undefined, predicate?: import("lodash").ValueKeyIteratee<T>): import("lodash").NumericDictionary<T>;
51
+ <T extends object>(object: T | null | undefined, predicate: import("lodash").ValueKeyIteratee<T[keyof T]>): import("lodash").PartialObject<T>;
52
+ };
53
+ pick: {
54
+ <T extends object, U extends keyof T>(object: T, ...props: Array<import("lodash").Many<U>>): Pick<T, U>;
55
+ <T>(object: T | null | undefined, ...props: Array<import("lodash").Many<import("lodash").PropertyPath>>): import("lodash").PartialObject<T>;
56
+ };
57
+ find: {
58
+ <T, S extends T>(collection: import("lodash").List<T> | null | undefined, predicate: import("lodash").ListIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
59
+ <T>(collection: import("lodash").List<T> | null | undefined, predicate?: import("lodash").ListIterateeCustom<T, boolean>, fromIndex?: number): T | undefined;
60
+ <T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: import("lodash").ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
61
+ <T extends object>(collection: T | null | undefined, predicate?: import("lodash").ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T] | undefined;
62
+ };
63
+ isEmpty: (value: any) => value is null;
64
+ merge: {
65
+ <TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
66
+ <TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
67
+ <TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
68
+ <TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
69
+ (object: any, ...otherArgs: any[]): any;
70
+ };
71
+ convertStringToObject: typeof convertStringToObject;
72
+ compress(json: JSONObject, keys: string[]): any[];
73
+ decompress(compressedArray: any[], keys: string[]): JSONObject;
74
+ };
75
+ declare function convertStringToObject(inputString: any): {};
76
+ export default ObjectUtils;
@@ -0,0 +1,7 @@
1
+ declare const TextUtils: {
2
+ truncate(text: string, max: number): string;
3
+ insertAt(str: string | undefined, sub: any, pos: any): string;
4
+ capitalize(str: string): string;
5
+ generateFakeBlockchainAddress(): string;
6
+ };
7
+ export default TextUtils;
@@ -0,0 +1,6 @@
1
+ declare const UuidUtils: {
2
+ generate(): string;
3
+ code(length?: number, includeLetters?: boolean): string;
4
+ validate(id: string): boolean;
5
+ };
6
+ export default UuidUtils;
@@ -0,0 +1,36 @@
1
+ import PaginationOptions from '../../../_shared/domain/models/pagination-options';
2
+ import SortOptions from '../../../_shared/domain/models/sort-options';
3
+ export interface APIRepositoryProps {
4
+ tokenId: string;
5
+ refreshTokenId: string;
6
+ client: any;
7
+ }
8
+ interface RequestOptions {
9
+ autoRefreshToken?: boolean;
10
+ token?: string;
11
+ refreshToken?: string;
12
+ }
13
+ export default abstract class APIRepository {
14
+ protected readonly props: APIRepositoryProps;
15
+ private storage;
16
+ constructor(props: APIRepositoryProps);
17
+ protected get tokenId(): string;
18
+ protected get refreshTokenId(): string;
19
+ protected get userToken(): any;
20
+ protected get refreshToken(): any;
21
+ findByCriteriaRequest<T>(resource: string, filter?: any, pagination?: PaginationOptions, sort?: SortOptions, withAuth?: boolean, options?: RequestOptions): Promise<T[]>;
22
+ countRequest<T>(resource: string, where?: any, withAuth?: boolean, options?: RequestOptions): Promise<any>;
23
+ findOneById<T>(resource: string, id: string, withAuth?: boolean, options?: RequestOptions): Promise<T | undefined>;
24
+ create<T>(resource: string, data: any, withAuth?: boolean, options?: {
25
+ autoRefreshToken?: boolean;
26
+ token?: string;
27
+ refreshToken?: string;
28
+ }): Promise<any>;
29
+ updateById<T>(resource: string, id: string, changes: any, withAuth?: boolean, options?: RequestOptions): Promise<any>;
30
+ deleteById<T>(resource: string, id: string, withAuth?: boolean, options?: RequestOptions): Promise<void>;
31
+ get<T>(path: string, withAuth?: boolean, options?: RequestOptions): Promise<T>;
32
+ post<T>(path: string, data: any, withAuth?: boolean, options?: RequestOptions): Promise<any>;
33
+ patch<T>(resource: string, changes: any, withAuth?: boolean, options?: RequestOptions): Promise<any>;
34
+ private getClientApiUrl;
35
+ }
36
+ export {};
@@ -0,0 +1,9 @@
1
+ export default class AppPayloadEncrypter {
2
+ private readonly secretKey;
3
+ private readonly header;
4
+ constructor({ secretKey }: {
5
+ secretKey: string;
6
+ });
7
+ encrypt(data: any): any;
8
+ decrypt(data: string): any;
9
+ }
@@ -0,0 +1,7 @@
1
+ declare class HttpError extends Error {
2
+ readonly message: string;
3
+ readonly status: string;
4
+ readonly body: null;
5
+ constructor(message: string, status: string, body?: null);
6
+ }
7
+ export default HttpError;
@@ -0,0 +1,48 @@
1
+ export interface TokenPayload {
2
+ exp: number;
3
+ [key: string]: any;
4
+ }
5
+ export interface AuthTokens {
6
+ token: string;
7
+ refreshToken: string;
8
+ }
9
+ export interface ApiResponse<T = any> {
10
+ status: number;
11
+ headers: Headers;
12
+ body: T;
13
+ rawBody: any;
14
+ json: any;
15
+ }
16
+ export interface ApiClient {
17
+ options?: {
18
+ env?: string;
19
+ [key: string]: any;
20
+ };
21
+ }
22
+ export interface Options extends RequestInit {
23
+ token?: string;
24
+ refreshToken?: string;
25
+ autoRefreshToken?: boolean;
26
+ client?: ApiClient;
27
+ skipErrorToast?: boolean;
28
+ }
29
+ /**
30
+ * Creates headers from options
31
+ */
32
+ export declare const createHeadersFromOptions: (options: Options) => Headers;
33
+ /**
34
+ * Main fetch function with error handling and response interception
35
+ */
36
+ export declare const fetchJson: <T = any>(url: string, options?: Options) => Promise<ApiResponse<T>>;
37
+ /**
38
+ * Fetch data without JSON parsing (for blob, text, etc.)
39
+ */
40
+ export declare const fetchData: (url: string, options?: Options) => Promise<Response>;
41
+ /**
42
+ * Flatten a nested object
43
+ */
44
+ export declare const flattenObject: (value: any, path?: any[]) => any;
45
+ /**
46
+ * Convert a JSON object to a query string
47
+ */
48
+ export declare function jsonToQueryString(json: Record<string, any>): string;
@@ -0,0 +1,9 @@
1
+ export default class BrowserLocalStorage {
2
+ removeItem(path: string): void;
3
+ getItem<T = any>(path: string): T | null;
4
+ setItem(path: string, data: any): void;
5
+ clean(root: string): void;
6
+ searchItem<T = any>(root: string, callback: (item: T) => boolean): T | undefined;
7
+ searchItems<T = any>(root: string, callback: (item: T) => boolean): T[];
8
+ multiRemove(root: string, keys: string[]): void;
9
+ }
@@ -0,0 +1,20 @@
1
+ import AppPlanTriggersRepository from '../../../protection-plan/infrastructure/repositories/app-plan-triggers-repository';
2
+ import AppPlanSecurityRepository from '../../../protection-plan/infrastructure/repositories/app-plan-security-repository';
3
+ import AppMergingProcessRepository from '../../../protection-plan/infrastructure/repositories/app-merging-process-repository';
4
+ import AppPlanCreationRepository from '../../../protection-plan/infrastructure/repositories/app-plan-creation-repository';
5
+ import AppMergeAuthorityProtectionPlanRepository from '../../../protection-plan/infrastructure/repositories/protection-plan/app-merge-authority-protection-plan-repository';
6
+ import AppProtectionPlanRepository from '../../../protection-plan/infrastructure/repositories/protection-plan/app-protection-plan-repository';
7
+ import { AuthClientProps } from '../../infrastructure/providers/inheriti-client-provider';
8
+ export interface AppDataProviderProps {
9
+ userTokenId: string;
10
+ userRefreshTokenId: string;
11
+ client: AuthClientProps;
12
+ }
13
+ export default function AppDataProvider({ client, userRefreshTokenId, userTokenId }: AppDataProviderProps): {
14
+ ProtectionPlanRepository: AppProtectionPlanRepository;
15
+ MergeAuthorityProtectionPlanRepository: AppMergeAuthorityProtectionPlanRepository;
16
+ PlanCreationRepository: AppPlanCreationRepository;
17
+ MergingProcessRepository: AppMergingProcessRepository;
18
+ PlanSecurityRepository: AppPlanSecurityRepository;
19
+ PlanTriggersRepository: AppPlanTriggersRepository;
20
+ };
@@ -0,0 +1,15 @@
1
+ import { AppUtils } from '../../../_shared/domain/models/app-utils';
2
+ import React from 'react';
3
+ import { AuthClientProps } from "../../infrastructure/providers/inheriti-client-provider";
4
+ import { AppDataProviderProps } from "../../infrastructure/providers/app-data-provider";
5
+ import { AppServiceProviderProps } from "../../infrastructure/providers/app-service-provider";
6
+ interface AppProviderProps {
7
+ children: React.ReactNode;
8
+ dataProvider: (props: AppDataProviderProps) => object;
9
+ serviceProvider: (props: AppServiceProviderProps) => object;
10
+ utilsProvider: AppUtils;
11
+ authProvider: any;
12
+ client: AuthClientProps;
13
+ }
14
+ export default function AppProvider({ children, utilsProvider, dataProvider, authProvider, serviceProvider, client, }: AppProviderProps): React.JSX.Element;
15
+ export {};
@@ -0,0 +1,28 @@
1
+ import ReactQQueryCreator from '../services/react-q-query-creator';
2
+ import ReactQueryMutationCreator from '../services/react-query-mutation-creator';
3
+ import SocketIoMergeProcessEventListener from '../../../protection-plan/infrastructure/services/socket-io-merge-process-event-listener';
4
+ import InheritiVaultService from '../../../protection-plan/infrastructure/services/inheriti-vault-service';
5
+ import SafekeyColdStorageService from '../../../safekey/infrastructure/services/safekey-cold-storage-service';
6
+ import AppPlanSharesGenerator from '../../../protection-plan/infrastructure/services/app-plan-shares-generator';
7
+ import AppPlanDataRevealer from '../../../protection-plan/infrastructure/services/app-plan-data-revealer';
8
+ import SocketIoPlanEventListener from "../../../protection-plan/infrastructure/services/socket-io-plan-event-listener";
9
+ import SocketIoMergeAuthorizationHandler from "../../../protection-plan/infrastructure/services/socket-io-merge-authorization-handler";
10
+ import { AuthClientProps } from "../../infrastructure/providers/inheriti-client-provider";
11
+ import AppBlockchainService from "../../../protection-plan/infrastructure/services/app-blockchain-service";
12
+ export interface AppServiceProviderProps {
13
+ userTokenId: string;
14
+ userRefreshTokenId: string;
15
+ client: AuthClientProps;
16
+ }
17
+ export default function AppServiceProvider({ client }: AppServiceProviderProps): {
18
+ QueryCreator: ReactQQueryCreator;
19
+ MutationCreator: ReactQueryMutationCreator;
20
+ ColdStorageService: SafekeyColdStorageService;
21
+ PlanSharesGenerator: AppPlanSharesGenerator;
22
+ PlanDataRevealer: AppPlanDataRevealer;
23
+ VaultService: InheritiVaultService;
24
+ MergeProcessEventListener: SocketIoMergeProcessEventListener;
25
+ PlanEventListener: SocketIoPlanEventListener;
26
+ MergeAuthorizationHandler: SocketIoMergeAuthorizationHandler;
27
+ BlockchainService: AppBlockchainService;
28
+ };