export type DeleteApiV1ApplicationsApplicationIdStoresStoreIdArgs = {applicationId: number, storeId: string}; export type DeleteApiV1ApplicationsApplicationIdStoresStoreIdOptions = {baseUrl?: string | undefined, managerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete store * * DELETE /v1/applications/{applicationId}/stores/{storeId} * * Also accepts auth: management_key */ export const deleteApiV1ApplicationsApplicationIdStoresStoreId = async (args: DeleteApiV1ApplicationsApplicationIdStoresStoreIdArgs, options?: DeleteApiV1ApplicationsApplicationIdStoresStoreIdOptions) => { const {baseUrl = "https://yourbaseurl.talon.one", fetch: fetchFn = fetch, managerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (managerAuth !== undefined) headers.set("Authorization", managerAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/applications/${encodeURIComponent(String(args.applicationId))}/stores/${encodeURIComponent(String(args.storeId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };