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.

27 lines (26 loc) 1.16 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] = "f2022c8a-ea95-4b17-a673-a45d96ad2ce2", e._sentryDebugIdIdentifier = "sentry-dbid-f2022c8a-ea95-4b17-a673-a45d96ad2ce2"); } catch (e) {} import { n as httpGet, s as useApiContext } from "./http-D1NDkBxF.js"; import { useQuery } from "@tanstack/preact-query"; //#region src/api/pci/usePciQuestionnaireList.ts /** * Returns a list of questionnaires for the legalEntity */ var getPciQuestionnaireList = async (legalEntityId, baseUrl) => { return httpGet({ baseUrl, path: `legalEntities/${legalEntityId}/pci/questionnaires` }); }; var usePciQuestionnaireList = (options) => { const { rootLegalEntityId, baseUrl } = useApiContext(); return useQuery({ queryKey: ["pciQuestionnaireList"], queryFn: () => getPciQuestionnaireList(rootLegalEntityId.value, baseUrl.value), ...options }); }; //#endregion export { usePciQuestionnaireList as n, getPciQuestionnaireList as t };