export type DeleteApiCloudV2UniversesUniverseIdSecretsSecretIdArgs = {universeId: number, secretId: string}; export type DeleteApiCloudV2UniversesUniverseIdSecretsSecretIdOptions = {baseUrl?: string | undefined, robloxApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Secret * * DELETE /cloud/v2/universes/{universeId}/secrets/{secretId} * * Also accepts auth: roblox-oauth2 */ export const deleteApiCloudV2UniversesUniverseIdSecretsSecretId = async (args: DeleteApiCloudV2UniversesUniverseIdSecretsSecretIdArgs, options?: DeleteApiCloudV2UniversesUniverseIdSecretsSecretIdOptions) => { const {baseUrl = "https://apis.roblox.com", fetch: fetchFn = fetch, robloxApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (robloxApiKey !== undefined) headers.set("x-api-key", robloxApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/cloud/v2/universes/${encodeURIComponent(String(args.universeId))}/secrets/${encodeURIComponent(String(args.secretId))}${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 };