export type GetApiBapiV1WalletCertProjIdUserIdArgs = {userId: string, projId: number}; export type GetApiBapiV1WalletCertProjIdUserIdOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 유저의 Cert Detail * * GET /bapi/v1/wallet/cert/{projId}/{userId} */ export const getApiBapiV1WalletCertProjIdUserId = async (args: GetApiBapiV1WalletCertProjIdUserIdArgs, options?: GetApiBapiV1WalletCertProjIdUserIdOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v1/wallet/cert/${encodeURIComponent(String(args.projId))}/${encodeURIComponent(String(args.userId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };