export type RewardIssued = {createdAt?: string | undefined, deliveredAt?: string | undefined, deliveryType?: ('OFFLINE' | 'ONLINE') | undefined, id?: string | undefined, orderId?: string | undefined, sentAt?: string | undefined, sentTo?: string | undefined, status?: ('CANCELLED' | 'DELIVERED' | 'ISSUED' | 'SENT') | undefined}; export type UpdateApiApiV3RewardsInternalIssuancesIdArgs = {id: string, body: RewardIssued}; export type UpdateApiApiV3RewardsInternalIssuancesIdOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 나(기업)의 리워드 상품 발급 기록 수정 * * PUT /api/v3/rewards/internal/issuances/{id} */ export const updateApiApiV3RewardsInternalIssuancesId = async (args: UpdateApiApiV3RewardsInternalIssuancesIdArgs, options?: UpdateApiApiV3RewardsInternalIssuancesIdOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v3/rewards/internal/issuances/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };