export type DT000InterfaceID = 'IF-001' | 'IF-002' | 'IF-003' | 'IF-004' | 'IF-005' | 'IF-006' | 'IF-007' | 'IF-008' | 'IF-009' | 'IF-013' | 'IF-014' | 'IF-015' | 'IF-016' | 'IF-018' | 'IF-019' | 'IF-020' | 'IF-021' | 'IF-022' | 'IF-023' | 'IF-024' | 'IF-025' | 'IF-026' | 'IF-027' | 'IF-028' | 'IF-031' | 'IF-032' | 'IF-033' | 'IF-034' | 'IF-035' | 'IF-036' | 'IF-037' | 'IF-038' | 'IF-039' | 'IF-040' | 'IF-041' | 'IF-043' | 'IF-044' | 'IF-045' | 'IF-047' | 'IF-050' | 'IF-051' | 'IF-061' | 'IF-062' | 'IF-063' | 'IF-064' | 'IF-065' | 'REP-002' | 'REP-002A' | 'REP-002B' | 'REP-003' | 'REP-003A' | 'REP-004' | 'REP-006' | 'REP-007' | 'REP-008' | 'REP-009' | 'REP-900' | 'REP-901'; export type DT006DIPParticipantID = string; export type DeleteApiDipChannelIdPubconfigRecipientIdArgs = {id: DT000InterfaceID, 'recipient-id': DT006DIPParticipantID, 'X-DIP-Signature': string, 'X-DIP-Signature-Date': string, 'X-DIP-Content-Hash': string, 'X-DIP-Signature-Certificate': string}; export type DeleteApiDipChannelIdPubconfigRecipientIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete existing Publication configuration * * DELETE /dip-channel/{id}/pubconfig/{recipient-id} */ export const deleteApiDipChannelIdPubconfigRecipientId = async (args: DeleteApiDipChannelIdPubconfigRecipientIdArgs, options?: DeleteApiDipChannelIdPubconfigRecipientIdOptions) => { const {baseUrl = "https://dip-api-documentation.elexon.co.uk", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-DIP-Signature'] != null) headers.set("X-DIP-Signature", String(args['X-DIP-Signature'])) if (args['X-DIP-Signature-Date'] != null) headers.set("X-DIP-Signature-Date", String(args['X-DIP-Signature-Date'])) if (args['X-DIP-Content-Hash'] != null) headers.set("X-DIP-Content-Hash", String(args['X-DIP-Content-Hash'])) if (args['X-DIP-Signature-Certificate'] != null) headers.set("X-DIP-Signature-Certificate", String(args['X-DIP-Signature-Certificate'])) if (ApiKeyAuth !== undefined) headers.set("X-API-Key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/dip-channel/${encodeURIComponent(String(args.id))}/pubconfig/${encodeURIComponent(String(args['recipient-id']))}${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 };