@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.
- package/README.md +22 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/src/modules/_shared/domain/contexts/data-provider-context.d.ts +2 -0
- package/dist/src/modules/_shared/domain/contexts/service-provider-context.d.ts +2 -0
- package/dist/src/modules/_shared/domain/contexts/utils-provider-context.d.ts +5 -0
- package/dist/src/modules/_shared/domain/errors/getErrorMessage.d.ts +1 -0
- package/dist/src/modules/_shared/domain/hooks/resources/use-create.d.ts +18 -0
- package/dist/src/modules/_shared/domain/hooks/resources/use-delete.d.ts +19 -0
- package/dist/src/modules/_shared/domain/hooks/resources/use-get-list.d.ts +25 -0
- package/dist/src/modules/_shared/domain/hooks/resources/use-get-one.d.ts +17 -0
- package/dist/src/modules/_shared/domain/hooks/use-data-provider.d.ts +2 -0
- package/dist/src/modules/_shared/domain/hooks/use-repository.d.ts +1 -0
- package/dist/src/modules/_shared/domain/hooks/use-service-provider.d.ts +2 -0
- package/dist/src/modules/_shared/domain/hooks/use-service.d.ts +1 -0
- package/dist/src/modules/_shared/domain/hooks/utils-hooks.d.ts +4 -0
- package/dist/src/modules/_shared/domain/models/app-utils.d.ts +10 -0
- package/dist/src/modules/_shared/domain/models/currency-price.d.ts +39 -0
- package/dist/src/modules/_shared/domain/models/currency.d.ts +24 -0
- package/dist/src/modules/_shared/domain/models/euro-currency.d.ts +3 -0
- package/dist/src/modules/_shared/domain/models/mutation-options.d.ts +8 -0
- package/dist/src/modules/_shared/domain/models/mutation.d.ts +5 -0
- package/dist/src/modules/_shared/domain/models/pagination-options.d.ts +4 -0
- package/dist/src/modules/_shared/domain/models/query-options.d.ts +6 -0
- package/dist/src/modules/_shared/domain/models/query.d.ts +5 -0
- package/dist/src/modules/_shared/domain/models/resource-count.d.ts +3 -0
- package/dist/src/modules/_shared/domain/models/sort-options.d.ts +4 -0
- package/dist/src/modules/_shared/domain/models/use-mutation-value.d.ts +13 -0
- package/dist/src/modules/_shared/domain/models/use-query-value.d.ts +11 -0
- package/dist/src/modules/_shared/domain/services/mutation-creator.d.ts +6 -0
- package/dist/src/modules/_shared/domain/services/query-creator.d.ts +6 -0
- package/dist/src/modules/_shared/domain/utils/misc/array-utils.d.ts +48 -0
- package/dist/src/modules/_shared/domain/utils/misc/datetime-utils.d.ts +40 -0
- package/dist/src/modules/_shared/domain/utils/misc/encrypt-utils.d.ts +17 -0
- package/dist/src/modules/_shared/domain/utils/misc/number-utils.d.ts +4 -0
- package/dist/src/modules/_shared/domain/utils/misc/object-utils.d.ts +76 -0
- package/dist/src/modules/_shared/domain/utils/misc/text-utils.d.ts +7 -0
- package/dist/src/modules/_shared/domain/utils/misc/uuid-utils.d.ts +6 -0
- package/dist/src/modules/_shared/infrastructure/api/api-repository.d.ts +36 -0
- package/dist/src/modules/_shared/infrastructure/api/app-payload-encrypter.d.ts +9 -0
- package/dist/src/modules/_shared/infrastructure/http/HttpError.d.ts +7 -0
- package/dist/src/modules/_shared/infrastructure/http/fetch.d.ts +48 -0
- package/dist/src/modules/_shared/infrastructure/local-storage/browser-local-storage.d.ts +9 -0
- package/dist/src/modules/_shared/infrastructure/providers/app-data-provider.d.ts +20 -0
- package/dist/src/modules/_shared/infrastructure/providers/app-provider.d.ts +15 -0
- package/dist/src/modules/_shared/infrastructure/providers/app-service-provider.d.ts +28 -0
- package/dist/src/modules/_shared/infrastructure/providers/app-utils-provider.d.ts +175 -0
- package/dist/src/modules/_shared/infrastructure/providers/inheriti-client-provider.d.ts +46 -0
- package/dist/src/modules/_shared/infrastructure/secure-storage/app-secure-storage.d.ts +8 -0
- package/dist/src/modules/_shared/infrastructure/services/hexEncoder.d.ts +4 -0
- package/dist/src/modules/_shared/infrastructure/services/react-q-query-creator.d.ts +7 -0
- package/dist/src/modules/_shared/infrastructure/services/react-query-mutation-creator.d.ts +7 -0
- package/dist/src/modules/_shared/infrastructure/services/safeshareLegacy.d.ts +29 -0
- package/dist/src/modules/_shared/infrastructure/session-storage/browser-session-storage.d.ts +12 -0
- package/dist/src/modules/_shared/infrastructure/utils/context-selector.d.ts +2 -0
- package/dist/src/modules/_shared/infrastructure/utils/get-api-url.d.ts +1 -0
- package/dist/src/modules/_shared/infrastructure/utils/set-query-params.d.ts +5 -0
- package/dist/src/modules/auth/application/use-auth-dispatch.d.ts +1 -0
- package/dist/src/modules/auth/application/use-auth-provider.d.ts +4 -0
- package/dist/src/modules/auth/application/use-auth-state.d.ts +1 -0
- package/dist/src/modules/auth/application/use-client.d.ts +27 -0
- package/dist/src/modules/auth/application/use-ensure-connected-client.d.ts +3 -0
- package/dist/src/modules/auth/application/use-get-identity.d.ts +36 -0
- package/dist/src/modules/auth/application/use-is-logged-in.d.ts +8 -0
- package/dist/src/modules/auth/application/use-login-client.d.ts +6 -0
- package/dist/src/modules/auth/application/use-logout-client.d.ts +5 -0
- package/dist/src/modules/auth/domain/contexts/auth-provider-context.d.ts +2 -0
- package/dist/src/modules/auth/domain/models/auth-credentials.d.ts +3 -0
- package/dist/src/modules/auth/domain/models/user-identity.d.ts +28 -0
- package/dist/src/modules/auth/domain/services/auth-provider.d.ts +16 -0
- package/dist/src/modules/auth/index.d.ts +6 -0
- package/dist/src/modules/auth/infrastructure/providers/app-auth-provider.d.ts +30 -0
- package/dist/src/modules/auth/infrastructure/providers/app-identity-service.d.ts +9 -0
- package/dist/src/modules/auth/infrastructure/providers/auth-constants.d.ts +6 -0
- package/dist/src/modules/beneficiary/domain/models/beneficiary-device.d.ts +28 -0
- package/dist/src/modules/beneficiary/domain/models/beneficiary-relation.d.ts +13 -0
- package/dist/src/modules/beneficiary/domain/models/beneficiary-type.d.ts +16 -0
- package/dist/src/modules/beneficiary/domain/models/beneficiary.d.ts +54 -0
- package/dist/src/modules/beneficiary/index.d.ts +1 -0
- package/dist/src/modules/beneficiary/infrastructure/mappers/beneficiary-mapper.d.ts +6 -0
- package/dist/src/modules/protection-plan/application/configuration-process/blockchain/use-create-smart-contract.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-backup-shares.d.ts +6 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-cold-shares.d.ts +6 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-mobile-shares.d.ts +6 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/creation/use-create-validator-shares.d.ts +6 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-backup-shares.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-cold-share.d.ts +8 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-mobile-shares.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/configuration-process/plan-shares/distribution/use-distribute-validator-shares.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/configuration-process/use-configure-plan.d.ts +12 -0
- package/dist/src/modules/protection-plan/application/configuration-process/use-delete-plan-configuration-process.d.ts +8 -0
- package/dist/src/modules/protection-plan/application/configuration-process/use-get-plan-configuration-process.d.ts +12 -0
- package/dist/src/modules/protection-plan/application/configuration-process/use-save-plan-creation-process.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/creation/use-create-protection-plan.d.ts +24 -0
- package/dist/src/modules/protection-plan/application/creation/use-get-available-plan-triggers.d.ts +3 -0
- package/dist/src/modules/protection-plan/application/creation/use-get-protection-plan-security-level.d.ts +47 -0
- package/dist/src/modules/protection-plan/application/creation/use-persist-protection-plan.d.ts +10 -0
- package/dist/src/modules/protection-plan/application/listing/use-find-protection-plan-summary-by-criteria.d.ts +13 -0
- package/dist/src/modules/protection-plan/application/listing/use-find-protection-plans-by-criteria.d.ts +15 -0
- package/dist/src/modules/protection-plan/application/listing/use-get-protection-plan-summary.d.ts +13 -0
- package/dist/src/modules/protection-plan/application/listing/use-is-merge-authority-mode.d.ts +3 -0
- package/dist/src/modules/protection-plan/application/listing/use-protection-plan-listener.d.ts +25 -0
- package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-authorize-merge-authority.d.ts +13 -0
- package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-get-merge-authority-protection-plan.d.ts +12 -0
- package/dist/src/modules/protection-plan/application/merging-process/merge-authority/use-merge-authority-merge-process-events.d.ts +6 -0
- package/dist/src/modules/protection-plan/application/merging-process/merge-triggers/use-retry-active-merge-trigger.d.ts +10 -0
- package/dist/src/modules/protection-plan/application/merging-process/merge-triggers/use-validate-merge-trigger.d.ts +12 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-backup-shares.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-cold-share.d.ts +8 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-mobile-shares.d.ts +5 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-released-mobile-shares.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/collection/use-collect-validator-shares.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-check-can-collect-shares.d.ts +2 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-save-release-mobile-share-request.d.ts +11 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-send-plan-share-merge-status-event.d.ts +15 -0
- package/dist/src/modules/protection-plan/application/merging-process/plan-shares/use-send-plan-shares-merged.d.ts +10 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-close-protection-plan.d.ts +10 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-create-merging-process.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-delete-merging-process-by-criteria.d.ts +11 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-delete-merging-process.d.ts +10 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-get-merging-process-by-plan.d.ts +23 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-merge-plan-beneficiary-selection.d.ts +27 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-persist-merge-process.d.ts +12 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-reveal-plan-data.d.ts +13 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-save-merging-process.d.ts +9 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-scan-plans-from-merge-authority-device.d.ts +10 -0
- package/dist/src/modules/protection-plan/application/merging-process/use-shareholder-merge-process-events.d.ts +2 -0
- package/dist/src/modules/protection-plan/domain/dto/plan-dto.d.ts +68 -0
- package/dist/src/modules/protection-plan/domain/dto/protection-plan-input.d.ts +173 -0
- package/dist/src/modules/protection-plan/domain/models/app-process.d.ts +29 -0
- package/dist/src/modules/protection-plan/domain/models/backup/backup-plan.d.ts +18 -0
- package/dist/src/modules/protection-plan/domain/models/backup/backup-shareholder.d.ts +9 -0
- package/dist/src/modules/protection-plan/domain/models/client/protection-plan-summary.d.ts +218 -0
- package/dist/src/modules/protection-plan/domain/models/data-asset.d.ts +113 -0
- package/dist/src/modules/protection-plan/domain/models/device-share-info.d.ts +10 -0
- package/dist/src/modules/protection-plan/domain/models/inheritance/heir.d.ts +9 -0
- package/dist/src/modules/protection-plan/domain/models/inheritance/inheritance-plan.d.ts +16 -0
- package/dist/src/modules/protection-plan/domain/models/merging-process/active-merge-process.d.ts +15 -0
- package/dist/src/modules/protection-plan/domain/models/merging-process/merging-process.d.ts +135 -0
- package/dist/src/modules/protection-plan/domain/models/plan-creation-proccess/plan-creation-process.d.ts +69 -0
- package/dist/src/modules/protection-plan/domain/models/plan-share.d.ts +69 -0
- package/dist/src/modules/protection-plan/domain/models/proccess-step.d.ts +21 -0
- package/dist/src/modules/protection-plan/domain/models/protection-plan-details.d.ts +70 -0
- package/dist/src/modules/protection-plan/domain/models/protection-plan-passphrase.d.ts +18 -0
- package/dist/src/modules/protection-plan/domain/models/protection-plan.d.ts +238 -0
- package/dist/src/modules/protection-plan/domain/models/shareholder.d.ts +32 -0
- package/dist/src/modules/protection-plan/domain/models/storage-option.d.ts +29 -0
- package/dist/src/modules/protection-plan/domain/models/trigger-settings-info.d.ts +6 -0
- package/dist/src/modules/protection-plan/domain/models/trigger.d.ts +46 -0
- package/dist/src/modules/protection-plan/domain/repositories/merge-authority-protection-plan-repository.d.ts +13 -0
- package/dist/src/modules/protection-plan/domain/repositories/merging-process-repository.d.ts +62 -0
- package/dist/src/modules/protection-plan/domain/repositories/plan-creation-repository.d.ts +7 -0
- package/dist/src/modules/protection-plan/domain/repositories/plan-security-repository.d.ts +7 -0
- package/dist/src/modules/protection-plan/domain/repositories/plan-triggers-repository.d.ts +4 -0
- package/dist/src/modules/protection-plan/domain/repositories/protection-plan-repository.d.ts +24 -0
- package/dist/src/modules/protection-plan/domain/services/blockchain-service.d.ts +32 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/PlanTypeInputValidator.d.ts +4 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/plan-beneficiaries-input-validator.d.ts +240 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/plan-data-assets-input-validator.d.ts +1108 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/plan-details-input-validator.d.ts +23 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/plan-shares-configuration-input-validator.d.ts +13 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/plan-storage-configuration-input-validator.d.ts +25 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/plan-triggers-input-validator.d.ts +105 -0
- package/dist/src/modules/protection-plan/domain/services/input-validation/utils/index.d.ts +3 -0
- package/dist/src/modules/protection-plan/domain/services/merge-authorization-handler.d.ts +14 -0
- package/dist/src/modules/protection-plan/domain/services/merge-process-event-listener.d.ts +14 -0
- package/dist/src/modules/protection-plan/domain/services/plan-data-assets-manager.d.ts +69 -0
- package/dist/src/modules/protection-plan/domain/services/plan-data-revealer.d.ts +5 -0
- package/dist/src/modules/protection-plan/domain/services/plan-event-listener.d.ts +10 -0
- package/dist/src/modules/protection-plan/domain/services/plan-merge-threshold-range-calculator.d.ts +8 -0
- package/dist/src/modules/protection-plan/domain/services/plan-recovery-shares-range-calculator.d.ts +8 -0
- package/dist/src/modules/protection-plan/domain/services/plan-shares-generator.d.ts +18 -0
- package/dist/src/modules/protection-plan/domain/services/vault-service.d.ts +10 -0
- package/dist/src/modules/protection-plan/domain/utils/plan-details-mapper.d.ts +12 -0
- package/dist/src/modules/protection-plan/domain/utils/plan-shares-details-mapper.d.ts +10 -0
- package/dist/src/modules/protection-plan/domain/utils/plan-triggers-details-mapper.d.ts +5 -0
- package/dist/src/modules/protection-plan/domain/utils/protection-plan-internal-mapper.d.ts +5 -0
- package/dist/src/modules/protection-plan/index.d.ts +28 -0
- package/dist/src/modules/protection-plan/infrastructure/mappers/backup-shareholder-mapper.d.ts +7 -0
- package/dist/src/modules/protection-plan/infrastructure/mappers/draft-protection-plan-mapper.d.ts +8 -0
- package/dist/src/modules/protection-plan/infrastructure/mappers/heir-mapper.d.ts +7 -0
- package/dist/src/modules/protection-plan/infrastructure/mappers/merging-process-mapper.d.ts +5 -0
- package/dist/src/modules/protection-plan/infrastructure/mappers/plan-creation-mapper.d.ts +5 -0
- package/dist/src/modules/protection-plan/infrastructure/mappers/protection-plan-filters-mapper.d.ts +4 -0
- package/dist/src/modules/protection-plan/infrastructure/mappers/protection-plan-mapper.d.ts +10 -0
- package/dist/src/modules/protection-plan/infrastructure/repositories/app-merging-process-repository.d.ts +65 -0
- package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-creation-repository.d.ts +12 -0
- package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-security-repository.d.ts +11 -0
- package/dist/src/modules/protection-plan/infrastructure/repositories/app-plan-triggers-repository.d.ts +10 -0
- package/dist/src/modules/protection-plan/infrastructure/repositories/protection-plan/app-merge-authority-protection-plan-repository.d.ts +17 -0
- package/dist/src/modules/protection-plan/infrastructure/repositories/protection-plan/app-protection-plan-repository.d.ts +13 -0
- package/dist/src/modules/protection-plan/infrastructure/services/app-blockchain-service.d.ts +42 -0
- package/dist/src/modules/protection-plan/infrastructure/services/app-plan-data-revealer.d.ts +14 -0
- package/dist/src/modules/protection-plan/infrastructure/services/app-plan-shares-generator.d.ts +5 -0
- package/dist/src/modules/protection-plan/infrastructure/services/constants/device-constants.d.ts +1 -0
- package/dist/src/modules/protection-plan/infrastructure/services/inheriti-vault-service.d.ts +15 -0
- package/dist/src/modules/protection-plan/infrastructure/services/socket-io-merge-authorization-handler.d.ts +17 -0
- package/dist/src/modules/protection-plan/infrastructure/services/socket-io-merge-process-event-listener.d.ts +14 -0
- package/dist/src/modules/protection-plan/infrastructure/services/socket-io-plan-event-listener.d.ts +14 -0
- package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-distribute-cold-shares-process.d.ts +15 -0
- package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-get-active-plan-configuration-process.d.ts +11 -0
- package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-plan-configuration-process-steps.d.ts +16 -0
- package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-plan-configuration-process.d.ts +25 -0
- package/dist/src/modules/protection-plan/ui/plan-creation-process/hooks/use-start-protection-plan-configuration-process.d.ts +10 -0
- package/dist/src/modules/protection-plan/ui/plan-creation-process/view-models/plan-configuration-process-view.d.ts +55 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/merge-athority/use-merge-authority-sk-mobile-plan-detection.d.ts +13 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/merge-athority/use-merge-authority-sk-pro-plan-detection.d.ts +12 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-abort-merge-process.d.ts +6 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-active-merge-process-listener.d.ts +9 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-collect-plan-cold-share-process.d.ts +13 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-count-down.d.ts +7 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-initialize-merging-process.d.ts +21 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-merge-process-controller.d.ts +13 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-merge-process-release-shares-controller.d.ts +9 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-plan-merge-process.d.ts +55 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-process-plan-merge-steps.d.ts +11 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-reveal-data-controller.d.ts +26 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-start-merge-process.d.ts +20 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/hooks/use-trigger-countdown.d.ts +18 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/utils/merge-process-utils.d.ts +3 -0
- package/dist/src/modules/protection-plan/ui/plan-merge-process/view-models/plan-merge-process-view.d.ts +173 -0
- package/dist/src/modules/protection-plan/ui/protection-plan/utils/plan-beneficiary-builder.d.ts +12 -0
- package/dist/src/modules/protection-plan/ui/protection-plan/utils/plan-data-asset-builder.d.ts +35 -0
- package/dist/src/modules/protection-plan/ui/protection-plan/utils/protection-plan-code.d.ts +7 -0
- package/dist/src/modules/protection-plan/ui/protection-plan/utils/protection-plan-id.d.ts +7 -0
- package/dist/src/modules/protection-plan/ui/protection-plan/utils/trigger-builder.d.ts +24 -0
- package/dist/src/modules/safekey/application/use-connect-safekey-pro-device.d.ts +10 -0
- package/dist/src/modules/safekey/application/use-disconnect-safekey-device.d.ts +8 -0
- package/dist/src/modules/safekey/application/use-safekey-device.d.ts +16 -0
- package/dist/src/modules/safekey/application/use-validate-safekey-device-pin.d.ts +12 -0
- package/dist/src/modules/safekey/domain/services/cold-storage-service.d.ts +55 -0
- package/dist/src/modules/safekey/index.d.ts +4 -0
- package/dist/src/modules/safekey/infrastructure/services/safekey-cold-storage-service.d.ts +45 -0
- package/dist/src/modules/safekey/infrastructure/services/safekey-service.d.ts +9 -0
- package/dist/test/index.js +14 -0
- package/dist/tests/modules/_shared/domain/models/FinancialMother.d.ts +11 -0
- package/dist/tests/modules/_shared/domain/models/date-mother.d.ts +6 -0
- package/dist/tests/modules/_shared/domain/models/email-mother.d.ts +3 -0
- package/dist/tests/modules/_shared/domain/models/id-mother.d.ts +3 -0
- package/dist/tests/modules/_shared/domain/models/internet-mother.d.ts +11 -0
- package/dist/tests/modules/_shared/domain/models/mother-creator.d.ts +3 -0
- package/dist/tests/modules/_shared/domain/models/name-mother.d.ts +5 -0
- package/dist/tests/modules/_shared/domain/models/number-mother.d.ts +7 -0
- package/dist/tests/modules/_shared/domain/models/random-element-picker-mother.d.ts +3 -0
- package/dist/tests/modules/_shared/domain/models/uuid-mother.d.ts +3 -0
- package/dist/tests/modules/_shared/domain/models/word-mother.d.ts +5 -0
- package/dist/tests/modules/index.d.ts +6 -0
- package/dist/tests/modules/protection-plan/domain/plan-beneficiary-input-generator.d.ts +18 -0
- package/dist/tests/modules/protection-plan/domain/plan-data-asset-input-generator.d.ts +13 -0
- package/dist/tests/modules/protection-plan/domain/plan-details-input-generator.d.ts +7 -0
- package/dist/tests/modules/protection-plan/domain/plan-shares-configuration-input-generator.d.ts +20 -0
- package/dist/tests/modules/protection-plan/domain/plan-storage-configuration-input-generator.d.ts +4 -0
- package/dist/tests/modules/protection-plan/domain/plan-trigger-input-generator.d.ts +27 -0
- package/dist/tests/modules/protection-plan/domain/protection-plan-input-generator.d.ts +4 -0
- package/dist/tests/modules/protection-plan/index.d.ts +8 -0
- package/index.ts +6 -0
- package/package.json +78 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
declare const AppUtilsProvider: {
|
|
2
|
+
object: {
|
|
3
|
+
get: {
|
|
4
|
+
<TObject extends object, TKey extends keyof TObject>(object: TObject, path: TKey | [TKey]): TObject[TKey];
|
|
5
|
+
<TObject extends object, TKey extends keyof TObject>(object: TObject | null | undefined, path: TKey | [TKey]): TObject[TKey] | undefined;
|
|
6
|
+
<TObject extends object, TKey extends keyof TObject, TDefault>(object: TObject | null | undefined, path: TKey | [TKey], defaultValue: TDefault): Exclude<TObject[TKey], undefined> | TDefault;
|
|
7
|
+
<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1]>(object: TObject, path: [TKey1, TKey2]): TObject[TKey1][TKey2];
|
|
8
|
+
<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;
|
|
9
|
+
<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;
|
|
10
|
+
<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];
|
|
11
|
+
<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;
|
|
12
|
+
<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;
|
|
13
|
+
<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];
|
|
14
|
+
<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;
|
|
15
|
+
<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;
|
|
16
|
+
<T>(object: import("lodash").NumericDictionary<T>, path: number): T;
|
|
17
|
+
<T>(object: import("lodash").NumericDictionary<T> | null | undefined, path: number): T | undefined;
|
|
18
|
+
<T, TDefault>(object: import("lodash").NumericDictionary<T> | null | undefined, path: number, defaultValue: TDefault): T | TDefault;
|
|
19
|
+
<TDefault>(object: null | undefined, path: import("lodash").PropertyPath, defaultValue: TDefault): TDefault;
|
|
20
|
+
(object: null | undefined, path: import("lodash").PropertyPath): undefined;
|
|
21
|
+
<TObject, TPath extends string>(data: TObject, path: TPath): string extends TPath ? any : import("lodash").GetFieldType<TObject, TPath>;
|
|
22
|
+
<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;
|
|
23
|
+
(object: any, path: import("lodash").PropertyPath, defaultValue?: any): any;
|
|
24
|
+
};
|
|
25
|
+
isNull: (value: any) => value is null;
|
|
26
|
+
omit: {
|
|
27
|
+
<T extends object, K extends import("lodash").PropertyName[]>(object: T | null | undefined, ...paths: K): Pick<T, Exclude<keyof T, K[number]>>;
|
|
28
|
+
<T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<import("lodash").Many<K>>): import("lodash").Omit<T, K>;
|
|
29
|
+
<T extends object>(object: T | null | undefined, ...paths: Array<import("lodash").Many<import("lodash").PropertyName>>): import("lodash").PartialObject<T>;
|
|
30
|
+
};
|
|
31
|
+
mapValues: {
|
|
32
|
+
<TResult>(obj: string | null | undefined, callback: import("lodash").StringIterator<TResult>): import("lodash").NumericDictionary<TResult>;
|
|
33
|
+
<T, TResult>(array: T[], callback: import("lodash").ArrayIterator<T, TResult>): import("lodash").NumericDictionary<TResult>;
|
|
34
|
+
<T extends object, TResult>(obj: T | null | undefined, callback: import("lodash").ObjectIterator<T, TResult>): { [P in keyof T]: TResult; };
|
|
35
|
+
<T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined, iteratee: object): import("lodash").Dictionary<boolean>;
|
|
36
|
+
<T extends object>(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean; };
|
|
37
|
+
<T, TKey extends keyof T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined, iteratee: TKey): import("lodash").Dictionary<T[TKey]>;
|
|
38
|
+
<T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined, iteratee: string): import("lodash").Dictionary<any>;
|
|
39
|
+
<T extends object>(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any; };
|
|
40
|
+
(obj: string | null | undefined): import("lodash").NumericDictionary<string>;
|
|
41
|
+
<T>(obj: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T> | null | undefined): import("lodash").Dictionary<T>;
|
|
42
|
+
<T extends object>(obj: T): T;
|
|
43
|
+
<T extends object>(obj: T | null | undefined): import("lodash").PartialObject<T>;
|
|
44
|
+
};
|
|
45
|
+
omitUnknown: (object: any) => Partial<any>;
|
|
46
|
+
omitBy: {
|
|
47
|
+
<T>(object: import("lodash").Dictionary<T> | null | undefined, predicate?: import("lodash").ValueKeyIteratee<T>): import("lodash").Dictionary<T>;
|
|
48
|
+
<T>(object: import("lodash").NumericDictionary<T> | null | undefined, predicate?: import("lodash").ValueKeyIteratee<T>): import("lodash").NumericDictionary<T>;
|
|
49
|
+
<T extends object>(object: T | null | undefined, predicate: import("lodash").ValueKeyIteratee<T[keyof T]>): import("lodash").PartialObject<T>;
|
|
50
|
+
};
|
|
51
|
+
pick: {
|
|
52
|
+
<T extends object, U extends keyof T>(object: T, ...props: Array<import("lodash").Many<U>>): Pick<T, U>;
|
|
53
|
+
<T>(object: T | null | undefined, ...props: Array<import("lodash").Many<import("lodash").PropertyPath>>): import("lodash").PartialObject<T>;
|
|
54
|
+
};
|
|
55
|
+
find: {
|
|
56
|
+
<T, S extends T>(collection: import("lodash").List<T> | null | undefined, predicate: import("lodash").ListIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
|
|
57
|
+
<T>(collection: import("lodash").List<T> | null | undefined, predicate?: import("lodash").ListIterateeCustom<T, boolean>, fromIndex?: number): T | undefined;
|
|
58
|
+
<T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: import("lodash").ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
|
|
59
|
+
<T extends object>(collection: T | null | undefined, predicate?: import("lodash").ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T] | undefined;
|
|
60
|
+
};
|
|
61
|
+
isEmpty: (value: any) => value is null;
|
|
62
|
+
merge: {
|
|
63
|
+
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
|
|
64
|
+
<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
|
|
65
|
+
<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
|
|
66
|
+
<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
|
|
67
|
+
(object: any, ...otherArgs: any[]): any;
|
|
68
|
+
};
|
|
69
|
+
convertStringToObject: (inputString: any) => {};
|
|
70
|
+
compress(json: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}, keys: string[]): any[];
|
|
73
|
+
decompress(compressedArray: any[], keys: string[]): {
|
|
74
|
+
[key: string]: any;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
date: {
|
|
78
|
+
differenceInDays: (a: Date, b: Date) => number;
|
|
79
|
+
differenceInMinutes: (a: Date, b: Date) => number;
|
|
80
|
+
differenceInSeconds: (a: Date, b: Date) => number;
|
|
81
|
+
addMonths: (a: Date, months: number) => Date;
|
|
82
|
+
subtractMonths: (a: Date, months: number) => Date;
|
|
83
|
+
addYears: (a: Date, years: number) => Date;
|
|
84
|
+
subtractYears: (a: Date, years: number) => Date;
|
|
85
|
+
addDays: (a: Date, days: number) => Date;
|
|
86
|
+
addMinutes: (a: Date, minutes: number) => Date;
|
|
87
|
+
addHours: (a: Date, hours: number) => Date;
|
|
88
|
+
ago(date: Date): string;
|
|
89
|
+
subtractDays: (a: Date, days: number) => Date;
|
|
90
|
+
subtractMinutes: (a: Date, minutes: number) => Date;
|
|
91
|
+
subtractWeeks: (a: Date, weeks: number) => Date;
|
|
92
|
+
utc(a: Date): Date;
|
|
93
|
+
utcOffset(timezone?: string): number;
|
|
94
|
+
toTimezone(date: Date, timezone: string): Date;
|
|
95
|
+
hoursOffSet(timezone: string): number;
|
|
96
|
+
guessTimezone(): string;
|
|
97
|
+
format: (date: Date, format: string, utc?: boolean) => string;
|
|
98
|
+
isPast: (date: Date) => boolean;
|
|
99
|
+
age: (date: Date) => number;
|
|
100
|
+
fromTime(time: string, format?: string | undefined): Date;
|
|
101
|
+
fromString(date: string, format?: string | undefined, utc?: boolean): Date;
|
|
102
|
+
isAfter(a: Date, b: Date): boolean;
|
|
103
|
+
getDateOnly(a: Date): Date;
|
|
104
|
+
timezoneList(): string[];
|
|
105
|
+
startOfMonth: (date: Date) => Date;
|
|
106
|
+
endOfMonth: (date: Date) => Date;
|
|
107
|
+
startOfDay: (date: Date) => Date;
|
|
108
|
+
endOfDay: (date: Date) => Date;
|
|
109
|
+
startOfWeek: (date: Date) => Date;
|
|
110
|
+
endOfWeek: (date: Date) => Date;
|
|
111
|
+
timezones(): string[];
|
|
112
|
+
daysRange(count: number, interval?: number): Date[];
|
|
113
|
+
isDate(value: any): value is Date;
|
|
114
|
+
isEqual(date1: Date, date2: Date): boolean;
|
|
115
|
+
};
|
|
116
|
+
array: {
|
|
117
|
+
groupBy: {
|
|
118
|
+
<T>(collection: import("lodash").List<T> | null | undefined, iteratee?: import("lodash").ValueIteratee<T>): import("lodash").Dictionary<T[]>;
|
|
119
|
+
<T extends object>(collection: T | null | undefined, iteratee?: import("lodash").ValueIteratee<T[keyof T]>): import("lodash").Dictionary<Array<T[keyof T]>>;
|
|
120
|
+
};
|
|
121
|
+
orderBy: {
|
|
122
|
+
<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[];
|
|
123
|
+
<T>(collection: import("lodash").List<T> | null | undefined, iteratees?: import("lodash").Many<import("lodash").ListIteratee<T>>, orders?: import("lodash").Many<boolean | "asc" | "desc">): T[];
|
|
124
|
+
<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]>;
|
|
125
|
+
<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]>;
|
|
126
|
+
};
|
|
127
|
+
isArray: {
|
|
128
|
+
(value?: any): value is any[];
|
|
129
|
+
<T>(value?: any): value is any[];
|
|
130
|
+
};
|
|
131
|
+
isEqual: (value: any, other: any) => boolean;
|
|
132
|
+
filter: {
|
|
133
|
+
(collection: string | null | undefined, predicate?: import("lodash").StringIterator<boolean>): string[];
|
|
134
|
+
<T, S extends T>(collection: import("lodash").List<T> | null | undefined, predicate: import("lodash").ListIteratorTypeGuard<T, S>): S[];
|
|
135
|
+
<T>(collection: import("lodash").List<T> | null | undefined, predicate?: import("lodash").ListIterateeCustom<T, boolean>): T[];
|
|
136
|
+
<T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: import("lodash").ObjectIteratorTypeGuard<T, S>): S[];
|
|
137
|
+
<T extends object>(collection: T | null | undefined, predicate?: import("lodash").ObjectIterateeCustom<T, boolean>): Array<T[keyof T]>;
|
|
138
|
+
};
|
|
139
|
+
find: {
|
|
140
|
+
<T, S extends T>(collection: import("lodash").List<T> | null | undefined, predicate: import("lodash").ListIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
|
|
141
|
+
<T>(collection: import("lodash").List<T> | null | undefined, predicate?: import("lodash").ListIterateeCustom<T, boolean>, fromIndex?: number): T | undefined;
|
|
142
|
+
<T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: import("lodash").ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S | undefined;
|
|
143
|
+
<T extends object>(collection: T | null | undefined, predicate?: import("lodash").ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T] | undefined;
|
|
144
|
+
};
|
|
145
|
+
differenceWith: {
|
|
146
|
+
<T1, T2>(array: import("lodash").List<T1> | null | undefined, values: import("lodash").List<T2>, comparator: import("lodash").Comparator2<T1, T2>): T1[];
|
|
147
|
+
<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[];
|
|
148
|
+
<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[];
|
|
149
|
+
<T>(array: import("lodash").List<T> | null | undefined, ...values: Array<import("lodash").List<T>>): T[];
|
|
150
|
+
};
|
|
151
|
+
combine(arr1: any[], arr2: any[]): any[];
|
|
152
|
+
xor: <T>(...arrays: Array<import("lodash").List<T> | null | undefined>) => T[];
|
|
153
|
+
replaceByKey: (arr: any[], newValue: any, keyName: string) => any[];
|
|
154
|
+
replaceWhere<T = any>(arr: T[], condition: (params: T) => boolean, newValue: any): T[];
|
|
155
|
+
toggleAdd<T = any>(array: T[], element: T, predicate: any): T[];
|
|
156
|
+
keyBy<T = any>(array: T[], predicate: any): import("lodash").Dictionary<T>;
|
|
157
|
+
uniq<T = any>(array: T[]): T[];
|
|
158
|
+
uniqBy<T = any>(array: T[], criteria: any): T[];
|
|
159
|
+
findIndex<T = any>(array: T[], predicate: any): number;
|
|
160
|
+
concat<T = any>(array: T[], ...rest: T[]): T[];
|
|
161
|
+
filterLike(arr1: any[], fieldName: string, like: string): any[];
|
|
162
|
+
};
|
|
163
|
+
text: {
|
|
164
|
+
truncate(text: string, max: number): string;
|
|
165
|
+
insertAt(str: string | undefined, sub: any, pos: any): string;
|
|
166
|
+
capitalize(str: string): string;
|
|
167
|
+
generateFakeBlockchainAddress(): string;
|
|
168
|
+
};
|
|
169
|
+
uuid: {
|
|
170
|
+
generate(): string;
|
|
171
|
+
code(length?: number, includeLetters?: boolean): string;
|
|
172
|
+
validate(id: string): boolean;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
export default AppUtilsProvider;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { JSX } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Environment options the SDK can run in.
|
|
4
|
+
* - `local`: Local development environment
|
|
5
|
+
* - `development`: Internal dev environment
|
|
6
|
+
* - `staging`: Staging/pre-production
|
|
7
|
+
* - `production`: Live production environment
|
|
8
|
+
*/
|
|
9
|
+
export type ValidEnv = "local" | "development" | "staging" | "production";
|
|
10
|
+
/**
|
|
11
|
+
* Props for the `InheritiClientProvider` component.
|
|
12
|
+
*/
|
|
13
|
+
export interface InheritiClientProviderProps {
|
|
14
|
+
/**
|
|
15
|
+
* React children nodes to be wrapped by the provider.
|
|
16
|
+
*/
|
|
17
|
+
children: React.ReactNode | JSX;
|
|
18
|
+
/**
|
|
19
|
+
* The client ID used to authenticate or identify the consumer of the SDK.
|
|
20
|
+
*/
|
|
21
|
+
clientId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Additional configuration options.
|
|
24
|
+
*/
|
|
25
|
+
options?: {
|
|
26
|
+
/**
|
|
27
|
+
* The environment in which the SDK should operate.
|
|
28
|
+
*/
|
|
29
|
+
env: ValidEnv;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface AuthClientProps {
|
|
33
|
+
key: string;
|
|
34
|
+
options?: {
|
|
35
|
+
env: ValidEnv;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Provides the Inheriti SDK context to all children components.
|
|
40
|
+
*
|
|
41
|
+
* This should be placed near the root of your application to ensure
|
|
42
|
+
* the SDK client is properly initialized and available throughout your app.
|
|
43
|
+
*
|
|
44
|
+
* @param props - The provider props including children, clientId, and options.
|
|
45
|
+
*/
|
|
46
|
+
export default function InheritiClientProvider({ children, clientId, options, }: InheritiClientProviderProps): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Query from '../../domain/models/query';
|
|
2
|
+
import QueryOptions from '../../domain/models/query-options';
|
|
3
|
+
import UseQueryValue from '../../domain/models/use-query-value';
|
|
4
|
+
import QueryCreator from '../../domain/services/query-creator';
|
|
5
|
+
export default class ReactQQueryCreator implements QueryCreator {
|
|
6
|
+
execute(query: Query, queryFn: any, options?: QueryOptions): UseQueryValue;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Mutation from '../../../_shared/domain/models/mutation';
|
|
2
|
+
import MutationOptions from '../../../_shared/domain/models/mutation-options';
|
|
3
|
+
import { UseMutationValue } from '../../../_shared/domain/models/use-mutation-value';
|
|
4
|
+
import MutationCreator from '../../../_shared/domain/services/mutation-creator';
|
|
5
|
+
export default class ReactQueryMutationCreator implements MutationCreator {
|
|
6
|
+
execute(query: Mutation, queryFn: any, options?: MutationOptions): UseMutationValue;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare function SafeshareLegacy(): {
|
|
2
|
+
init: (bits: any, rngType: any) => void;
|
|
3
|
+
seedRNG: (data: any, estimatedEntropy: any, source: any) => void;
|
|
4
|
+
combine: (shares: any, at: any) => string;
|
|
5
|
+
getConfig: () => {};
|
|
6
|
+
extractShareComponents: (share: any) => {};
|
|
7
|
+
setRNG: (rng: any) => boolean;
|
|
8
|
+
str2hex: (str: any, bytesPerChar: any) => string;
|
|
9
|
+
hex2str: (str: any, bytesPerChar: any) => string;
|
|
10
|
+
random: (bits: any) => string;
|
|
11
|
+
share: (secret: any, numShares: any, threshold: any, padLength: any) => any[];
|
|
12
|
+
newShare: (id: any, shares: any) => any;
|
|
13
|
+
_reset: () => void;
|
|
14
|
+
_padLeft: (str: any, multipleOfBits: any) => any;
|
|
15
|
+
_hex2bin: (str: any) => string;
|
|
16
|
+
_bin2hex: (str: any) => string;
|
|
17
|
+
_hasCryptoGetRandomValues: () => boolean;
|
|
18
|
+
_hasCryptoRandomBytes: () => boolean;
|
|
19
|
+
_hasSJCL: () => boolean;
|
|
20
|
+
_getRNG: (type: any) => ((bits: any) => null) | undefined;
|
|
21
|
+
_isSetRNG: () => boolean;
|
|
22
|
+
_splitNumStringToIntArray: (str: any, padLength: any) => never[];
|
|
23
|
+
_horner: (x: any, coeffs: any) => number;
|
|
24
|
+
_lagrange: (at: any, x: any, y: any) => number;
|
|
25
|
+
_getShares: (secret: any, numShares: any, threshold: any) => never[];
|
|
26
|
+
_constructPublicShareString: (bits: any, id: any, data: any) => any;
|
|
27
|
+
};
|
|
28
|
+
export declare function splitSecret(secret: any, numShares: any, threshold: any): any[];
|
|
29
|
+
export declare function combineShares(shares: any): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class BrowserSessionStorage {
|
|
2
|
+
private storage;
|
|
3
|
+
constructor(options?: {
|
|
4
|
+
secure?: boolean;
|
|
5
|
+
secretKey?: string;
|
|
6
|
+
});
|
|
7
|
+
removeItem(path: string): Promise<void>;
|
|
8
|
+
getItem(path: string): Promise<any>;
|
|
9
|
+
setItem(path: string, data: any): Promise<void>;
|
|
10
|
+
clean(root?: string): Promise<void>;
|
|
11
|
+
searchItem<T = any>(root: string, callback: (item: T) => boolean): Promise<T | undefined>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getApiUrl(path: string, env?: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import PaginationOptions from '../../../_shared/domain/models/pagination-options';
|
|
2
|
+
import SortOptions from '../../../_shared/domain/models/sort-options';
|
|
3
|
+
export declare function setWhere(url: URL, filter: any, initKey?: string): void;
|
|
4
|
+
export declare function setLimitAndOffset(url: URL, pagination?: PaginationOptions): void;
|
|
5
|
+
export declare function setOrder(url: URL, ordering?: SortOptions): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useAuthDispatch(): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useAuthState(selector: any): any;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AuthClientProps } from '../../_shared/infrastructure/providers/inheriti-client-provider';
|
|
2
|
+
import { LoginReturn } from './use-login-client';
|
|
3
|
+
import { LogoutReturn } from './use-logout-client';
|
|
4
|
+
/**
|
|
5
|
+
* Custom hook to access the current authenticated client and connection utilities.
|
|
6
|
+
*
|
|
7
|
+
* This hook provides:
|
|
8
|
+
* - The current client object (with `id` and `env`) if connected, or `undefined` otherwise.
|
|
9
|
+
* - A `connect` function to initiate the client connection.
|
|
10
|
+
* - A `disconnect` function to terminate the client session.
|
|
11
|
+
* - A `loading` boolean indicating if a connection or disconnection is in progress.
|
|
12
|
+
* - An `isConnected` boolean indicating whether a client is currently connected.
|
|
13
|
+
*
|
|
14
|
+
* @returns An object containing:
|
|
15
|
+
* - `client`: `{ id, env }` if connected, or `undefined`.
|
|
16
|
+
* - `connect`: Function to initiate client connection.
|
|
17
|
+
* - `disconnect`: Function to disconnect the client.
|
|
18
|
+
* - `loading`: Boolean indicating connection or disconnection state.
|
|
19
|
+
* - `isConnected`: Boolean that is `true` if a client is connected, otherwise `false`.
|
|
20
|
+
*/
|
|
21
|
+
export default function useClient(): ClientReturn;
|
|
22
|
+
type ClientReturn = LogoutReturn & LoginReturn & {
|
|
23
|
+
isConnected: boolean;
|
|
24
|
+
} & {
|
|
25
|
+
client: AuthClientProps | undefined;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import UserIdentity from '../domain/models/user-identity';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to fetch the identity of the current user from the authentication provider.
|
|
4
|
+
*
|
|
5
|
+
* It handles loading and error states, providing the identity once it is fetched.
|
|
6
|
+
* The hook returns an object with:
|
|
7
|
+
* - `loading`: Boolean indicating if the identity is being fetched.
|
|
8
|
+
* - `loaded`: Boolean indicating if the fetching is complete (success or failure).
|
|
9
|
+
* - `identity`: The identity of the user if fetched successfully.
|
|
10
|
+
* - `error`: Any error that occurred during the fetching process.
|
|
11
|
+
*
|
|
12
|
+
* @returns The current state, including loading, loaded, identity, and error states.
|
|
13
|
+
*/
|
|
14
|
+
export default function useGetIdentity(): GetIdentityState;
|
|
15
|
+
/**
|
|
16
|
+
* State object returned by `useGetIdentity` hook.
|
|
17
|
+
* Contains information about the loading, identity, and error states.
|
|
18
|
+
*/
|
|
19
|
+
export interface GetIdentityState {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the identity is still being fetched.
|
|
22
|
+
*/
|
|
23
|
+
loading: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the identity has finished loading (success or failure).
|
|
26
|
+
*/
|
|
27
|
+
loaded: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The user identity, if fetched successfully.
|
|
30
|
+
*/
|
|
31
|
+
identity?: UserIdentity;
|
|
32
|
+
/**
|
|
33
|
+
* The error, if an error occurred while fetching the identity.
|
|
34
|
+
*/
|
|
35
|
+
error?: any;
|
|
36
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface UserIdentityProfile {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
profilePictureUrl?: string;
|
|
7
|
+
code: string;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
}
|
|
10
|
+
export interface UserIdentityProps {
|
|
11
|
+
profile?: UserIdentityProfile;
|
|
12
|
+
}
|
|
13
|
+
export interface UserIdentityPrimitiveProps extends UserIdentityProps {
|
|
14
|
+
}
|
|
15
|
+
export default class UserIdentity {
|
|
16
|
+
private props;
|
|
17
|
+
constructor(props: UserIdentityProps);
|
|
18
|
+
get id(): string | undefined;
|
|
19
|
+
get code(): string | undefined;
|
|
20
|
+
get createdAt(): Date | undefined;
|
|
21
|
+
get firstName(): string | undefined;
|
|
22
|
+
get lastName(): string | undefined;
|
|
23
|
+
get profilePictureUrl(): string | undefined;
|
|
24
|
+
get fullName(): string;
|
|
25
|
+
get email(): string | undefined;
|
|
26
|
+
static fromPrimitives(props: UserIdentityPrimitiveProps): UserIdentity;
|
|
27
|
+
toPrimitives(): UserIdentityPrimitiveProps;
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import UserIdentity from '../models/user-identity';
|
|
2
|
+
import AuthCredentials from '../models/auth-credentials';
|
|
3
|
+
import { AuthClientProps } from "../../../_shared/infrastructure/providers/inheriti-client-provider";
|
|
4
|
+
export default interface AuthProvider {
|
|
5
|
+
state: any;
|
|
6
|
+
dispatch: any;
|
|
7
|
+
login(client: AuthClientProps): Promise<any>;
|
|
8
|
+
logout(params: any): Promise<void | false | string>;
|
|
9
|
+
checkAuth(params: any): Promise<{
|
|
10
|
+
token: string;
|
|
11
|
+
refreshToken: string;
|
|
12
|
+
}>;
|
|
13
|
+
checkIdentity(credentials: AuthCredentials): Promise<any>;
|
|
14
|
+
getIdentity?(): Promise<UserIdentity | null>;
|
|
15
|
+
updateIdentity(params: any): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Authentication
|
|
3
|
+
*/
|
|
4
|
+
export { default as useClient } from './application/use-client';
|
|
5
|
+
export { default as InheritiClientProvider, type InheritiClientProviderProps, type ValidEnv } from '../_shared/infrastructure/providers/inheriti-client-provider';
|
|
6
|
+
export { default as useGetIdentity, type GetIdentityState } from './application/use-get-identity';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import AuthCredentials from '../../../auth/domain/models/auth-credentials';
|
|
2
|
+
import UserIdentity from '../../../auth/domain/models/user-identity';
|
|
3
|
+
import AuthProvider from '../../../auth/domain/services/auth-provider';
|
|
4
|
+
import { ValidEnv } from "../../../_shared/infrastructure/providers/inheriti-client-provider";
|
|
5
|
+
export default class AppAuthProvider implements AuthProvider {
|
|
6
|
+
private authProps;
|
|
7
|
+
state: any;
|
|
8
|
+
dispatch: any;
|
|
9
|
+
private identityService;
|
|
10
|
+
private sessionStorage;
|
|
11
|
+
private localStorage;
|
|
12
|
+
constructor(authProps: {
|
|
13
|
+
client: {
|
|
14
|
+
key: string;
|
|
15
|
+
options: {
|
|
16
|
+
env: ValidEnv;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
login(client: any): Promise<any>;
|
|
21
|
+
checkAuth(params: any): Promise<{
|
|
22
|
+
token: string;
|
|
23
|
+
refreshToken: string;
|
|
24
|
+
}>;
|
|
25
|
+
getIdentity(): Promise<UserIdentity | null>;
|
|
26
|
+
updateIdentity(values: any): Promise<void>;
|
|
27
|
+
checkIdentity(credentials: AuthCredentials): Promise<any>;
|
|
28
|
+
logout(params: any): Promise<void | false | string>;
|
|
29
|
+
private saveUserSession;
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import UserIdentity from '../../../auth/domain/models/user-identity';
|
|
2
|
+
import AuthCredentials from '../../../auth/domain/models/auth-credentials';
|
|
3
|
+
export default class AppIdentityService {
|
|
4
|
+
private localStorage;
|
|
5
|
+
constructor();
|
|
6
|
+
checkIdentity(credentials: AuthCredentials): Promise<any>;
|
|
7
|
+
updateIdentity(values: any): Promise<void>;
|
|
8
|
+
getIdentity(): Promise<UserIdentity | null>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const userDataKeyName = "inheriti_client_data";
|
|
2
|
+
export declare const apiTokenName = "inheriti_client_token";
|
|
3
|
+
export declare const apiRefreshTokenName = "inheriti_client_refresh_token";
|
|
4
|
+
export declare const mergeAuthorityToken = "inheriti_client_merge_authority_token";
|
|
5
|
+
export declare const mergingProcessKey = "inheriti_client_merging_process";
|
|
6
|
+
export declare const userSkProReadPlansIdsName = "inheriti_client_sk_pro_read_plans_ids";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface BeneficiaryDeviceProps {
|
|
2
|
+
id: string;
|
|
3
|
+
code: string;
|
|
4
|
+
beneficiaryId: string;
|
|
5
|
+
type: string;
|
|
6
|
+
plans: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
11
|
+
export interface BeneficiaryDevicePrimitiveProps extends Omit<BeneficiaryDeviceProps, 'id' | 'beneficiaryId'> {
|
|
12
|
+
id: string;
|
|
13
|
+
beneficiaryId: string;
|
|
14
|
+
}
|
|
15
|
+
export default class BeneficiaryDevice {
|
|
16
|
+
private props;
|
|
17
|
+
constructor(props: BeneficiaryDeviceProps);
|
|
18
|
+
get id(): string;
|
|
19
|
+
get code(): string;
|
|
20
|
+
get type(): "SAFEKEY_PRO" | "SAFEKEY_MOBILE";
|
|
21
|
+
get plans(): {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
}[];
|
|
25
|
+
get name(): "SafeKey Pro" | "SafeKey Mobile";
|
|
26
|
+
static fromPrimitives(props: BeneficiaryDevicePrimitiveProps): BeneficiaryDevice;
|
|
27
|
+
toPrimitives(): BeneficiaryDevicePrimitiveProps;
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BeneficiaryRelationProps {
|
|
2
|
+
id: string;
|
|
3
|
+
}
|
|
4
|
+
export interface BeneficiaryRelationPrimitiveProps extends BeneficiaryRelationProps {
|
|
5
|
+
}
|
|
6
|
+
export default class BeneficiaryRelation {
|
|
7
|
+
private props;
|
|
8
|
+
constructor(props: BeneficiaryRelationProps);
|
|
9
|
+
get id(): string;
|
|
10
|
+
get name(): "" | "Wife" | "Husband" | "Spouse" | "Child" | "Grandchild" | "Parent" | "Grandparent" | "Family member" | "Friend" | "Business Partner" | "Colleague" | "Lawyer" | "Notary" | "Trustee" | "Executor" | "Other";
|
|
11
|
+
static fromPrimitives(props: BeneficiaryRelationPrimitiveProps): BeneficiaryRelation;
|
|
12
|
+
toPrimitives(): BeneficiaryRelationPrimitiveProps;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type BeneficiaryTypeKey = 'HEIR' | 'SHAREHOLDER';
|
|
2
|
+
export interface BeneficiaryTypeProps {
|
|
3
|
+
id: BeneficiaryTypeKey;
|
|
4
|
+
}
|
|
5
|
+
export interface BeneficiaryTypePrimitiveProps extends BeneficiaryTypeProps {
|
|
6
|
+
}
|
|
7
|
+
export default class BeneficiaryType {
|
|
8
|
+
private props;
|
|
9
|
+
constructor(props: BeneficiaryTypeProps);
|
|
10
|
+
get id(): BeneficiaryTypeKey;
|
|
11
|
+
get name(): "Unknown Name" | "Heir" | "Shareholder";
|
|
12
|
+
get isHeir(): boolean;
|
|
13
|
+
get isShareholder(): boolean;
|
|
14
|
+
static fromPrimitives(props: BeneficiaryTypePrimitiveProps): BeneficiaryType;
|
|
15
|
+
toPrimitives(): BeneficiaryTypePrimitiveProps;
|
|
16
|
+
}
|