UNPKG

@adyen/kyc-components

Version:

This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.

40 lines (39 loc) 1.71 kB
try { let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e930c45a-24fa-46dd-afdc-d6da10c23643", e._sentryDebugIdIdentifier = "sentry-dbid-e930c45a-24fa-46dd-afdc-d6da10c23643"); } catch (e) {} import { n as httpGet, s as useApiContext } from "./http-D1NDkBxF.js"; import { useQuery } from "@tanstack/preact-query"; //#region src/api/termsOfService/useTermsOfServiceAcceptanceInfos.ts var getTermsOfServiceAcceptanceInfos = async (legalEntityId, baseUrl) => { return httpGet({ baseUrl, path: `legalEntities/${legalEntityId}/termsOfService/termsOfServiceAcceptanceInfos` }); }; var useTermsOfServiceAcceptanceInfos = (options) => { const { rootLegalEntityId, baseUrl } = useApiContext(); return useQuery({ queryKey: ["termsOfServiceAcceptanceInfos"], queryFn: () => getTermsOfServiceAcceptanceInfos(rootLegalEntityId.value, baseUrl.value), ...options }); }; //#endregion //#region src/api/termsOfService/useTermsOfServiceStatus.ts var getTermsOfServiceStatus = async (legalEntityId, baseUrl) => { return httpGet({ baseUrl, path: `legalEntities/${legalEntityId}/termsOfService/termsOfServiceStatus` }); }; var useTermsOfServiceStatus = (options) => { const { rootLegalEntityId, baseUrl } = useApiContext(); return useQuery({ queryKey: ["termsOfServiceStatus"], queryFn: () => getTermsOfServiceStatus(rootLegalEntityId.value, baseUrl.value), ...options }); }; //#endregion export { useTermsOfServiceAcceptanceInfos as n, useTermsOfServiceStatus as t };