@us-legal-tools/courtlistener-sdk
Version:
TypeScript SDK and MCP server for CourtListener API
5 lines • 136 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../src/mcp/http-client.ts", "../src/mcp/handlers.ts", "../src/mcp/http-schemas/courtJurisdiction.ts", "../src/mcp/http-schemas/getCourtsJurisdiction.ts", "../src/mcp/http-schemas/getSearchHighlight.ts", "../src/mcp/http-schemas/getSearchOrderBy.ts", "../src/mcp/http-schemas/getSearchType.ts", "../src/mcp/http-schemas/postAlertsBodyAlertType.ts", "../src/mcp/http-schemas/postAlertsBodyRate.ts", "../src/mcp/http-schemas/postDocketAlertsBodyAlertType.ts"],
"sourcesContent": [
"/**\n * Generated by orval v7.11.2 🍺\n * Do not edit manually.\n * CourtListener REST API\n * The CourtListener REST API provides access to a comprehensive database of legal documents, case law, judges, oral arguments, and citation lookups. This API supports advanced search capabilities, rate limiting, and token-based authentication.\n * OpenAPI spec version: 4.0.0\n */\n\nimport { Get200,\nSearchResults,\nGetSearchParams,\nCitationResult,\nRateLimitError,\nPostCitationLookupBody,\nPaginatedDockets,\nGetDocketsParams,\nDocket,\nPaginatedClusters,\nGetClustersParams,\nCluster,\nPaginatedOpinions,\nGetOpinionsParams,\nOpinion,\nPaginatedCourts,\nGetCourtsParams,\nCourt,\nPaginatedPeople,\nGetPeopleParams,\nPerson,\nPaginatedAudio,\nGetAudioParams,\nAudio,\nPaginatedFinancialDisclosures,\nGetFinancialDisclosuresParams,\nFinancialDisclosure,\nPaginatedInvestments,\nGetInvestmentsParams,\nInvestment,\nPaginatedPositions,\nGetPositionsParams,\nPosition,\nPaginatedAgreements,\nGetAgreementsParams,\nAgreement,\nPaginatedNonInvestmentIncome,\nGetNonInvestmentIncomeParams,\nNonInvestmentIncome,\nPaginatedSpouseIncome,\nGetSpouseIncomeParams,\nSpouseIncome,\nPaginatedReimbursements,\nGetReimbursementsParams,\nReimbursement,\nPaginatedGifts,\nGetGiftsParams,\nGift,\nPaginatedDebts,\nGetDebtsParams,\nDebt,\nPaginatedAlerts,\nGetAlertsParams,\nAlert,\nPostAlertsBody,\nPaginatedProcessingQueue,\nGetProcessingQueueParams,\nPaginatedRECAPDocuments,\nGetRecapParams,\nRECAPDocument,\nPaginatedPACERDocIDs,\nGetPacerDocIdsParams,\nRECAPFetchResponse,\nPostRecapFetchBody,\nPaginatedDocketAlerts,\nGetDocketAlertsParams,\nDocketAlert,\nPostDocketAlertsBody,\nPaginatedOriginalProceedingsPanels,\nGetOriginalProceedingsPanelsParams,\nPaginatedJudgePositions,\nGetJudgePositionsParams,\nJudgePosition,\nPaginatedSchools,\nGetSchoolsParams,\nSchool,\nPaginatedPoliticalAffiliations,\nGetPoliticalAffiliationsParams,\nPoliticalAffiliation,\nPaginatedCitations,\nGetCitationsParams,\nCitation,\nPaginatedVisualizations,\nGetVisualizationsParams,\nVisualization } from './http-schemas';\n\nexport type getResponse200 = {\n data: Get200\n status: 200\n}\n \nexport type getResponseComposite = getResponse200;\n \nexport type getResponse = getResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetUrl = () => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/`\n}\n\nexport const get = async ( options?: RequestInit): Promise<getResponse> => {\n \n const res = await fetch(getGetUrl(),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getResponse\n}\n\n\n\nexport type getSearchResponse200 = {\n data: SearchResults\n status: 200\n}\n\nexport type getSearchResponse400 = {\n data: null\n status: 400\n}\n \nexport type getSearchResponseComposite = getSearchResponse200 | getSearchResponse400;\n \nexport type getSearchResponse = getSearchResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetSearchUrl = (params?: GetSearchParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/search/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/search/`\n}\n\nexport const getSearch = async (params?: GetSearchParams, options?: RequestInit): Promise<getSearchResponse> => {\n \n const res = await fetch(getGetSearchUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getSearchResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getSearchResponse\n}\n\n\n\nexport type postCitationLookupResponse200 = {\n data: CitationResult\n status: 200\n}\n\nexport type postCitationLookupResponse300 = {\n data: null\n status: 300\n}\n\nexport type postCitationLookupResponse400 = {\n data: null\n status: 400\n}\n\nexport type postCitationLookupResponse404 = {\n data: null\n status: 404\n}\n\nexport type postCitationLookupResponse429 = {\n data: RateLimitError\n status: 429\n}\n \nexport type postCitationLookupResponseComposite = postCitationLookupResponse200 | postCitationLookupResponse300 | postCitationLookupResponse400 | postCitationLookupResponse404 | postCitationLookupResponse429;\n \nexport type postCitationLookupResponse = postCitationLookupResponseComposite & {\n headers: Headers;\n}\n\nexport const getPostCitationLookupUrl = () => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/citation-lookup/`\n}\n\nexport const postCitationLookup = async (postCitationLookupBody: PostCitationLookupBody, options?: RequestInit): Promise<postCitationLookupResponse> => {\n \n const res = await fetch(getPostCitationLookupUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n postCitationLookupBody,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: postCitationLookupResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as postCitationLookupResponse\n}\n\n\n\nexport type getDocketsResponse200 = {\n data: PaginatedDockets\n status: 200\n}\n \nexport type getDocketsResponseComposite = getDocketsResponse200;\n \nexport type getDocketsResponse = getDocketsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetDocketsUrl = (params?: GetDocketsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/dockets/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/dockets/`\n}\n\nexport const getDockets = async (params?: GetDocketsParams, options?: RequestInit): Promise<getDocketsResponse> => {\n \n const res = await fetch(getGetDocketsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getDocketsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getDocketsResponse\n}\n\n\n\nexport type getDocketsIdResponse200 = {\n data: Docket\n status: 200\n}\n\nexport type getDocketsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getDocketsIdResponseComposite = getDocketsIdResponse200 | getDocketsIdResponse404;\n \nexport type getDocketsIdResponse = getDocketsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetDocketsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/dockets/${id}/`\n}\n\nexport const getDocketsId = async (id: number, options?: RequestInit): Promise<getDocketsIdResponse> => {\n \n const res = await fetch(getGetDocketsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getDocketsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getDocketsIdResponse\n}\n\n\n\nexport type getClustersResponse200 = {\n data: PaginatedClusters\n status: 200\n}\n \nexport type getClustersResponseComposite = getClustersResponse200;\n \nexport type getClustersResponse = getClustersResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetClustersUrl = (params?: GetClustersParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/clusters/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/clusters/`\n}\n\nexport const getClusters = async (params?: GetClustersParams, options?: RequestInit): Promise<getClustersResponse> => {\n \n const res = await fetch(getGetClustersUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getClustersResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getClustersResponse\n}\n\n\n\nexport type getClustersIdResponse200 = {\n data: Cluster\n status: 200\n}\n\nexport type getClustersIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getClustersIdResponseComposite = getClustersIdResponse200 | getClustersIdResponse404;\n \nexport type getClustersIdResponse = getClustersIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetClustersIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/clusters/${id}/`\n}\n\nexport const getClustersId = async (id: number, options?: RequestInit): Promise<getClustersIdResponse> => {\n \n const res = await fetch(getGetClustersIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getClustersIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getClustersIdResponse\n}\n\n\n\nexport type getOpinionsResponse200 = {\n data: PaginatedOpinions\n status: 200\n}\n \nexport type getOpinionsResponseComposite = getOpinionsResponse200;\n \nexport type getOpinionsResponse = getOpinionsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetOpinionsUrl = (params?: GetOpinionsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/opinions/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/opinions/`\n}\n\nexport const getOpinions = async (params?: GetOpinionsParams, options?: RequestInit): Promise<getOpinionsResponse> => {\n \n const res = await fetch(getGetOpinionsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getOpinionsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getOpinionsResponse\n}\n\n\n\nexport type getOpinionsIdResponse200 = {\n data: Opinion\n status: 200\n}\n\nexport type getOpinionsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getOpinionsIdResponseComposite = getOpinionsIdResponse200 | getOpinionsIdResponse404;\n \nexport type getOpinionsIdResponse = getOpinionsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetOpinionsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/opinions/${id}/`\n}\n\nexport const getOpinionsId = async (id: number, options?: RequestInit): Promise<getOpinionsIdResponse> => {\n \n const res = await fetch(getGetOpinionsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getOpinionsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getOpinionsIdResponse\n}\n\n\n\nexport type getCourtsResponse200 = {\n data: PaginatedCourts\n status: 200\n}\n \nexport type getCourtsResponseComposite = getCourtsResponse200;\n \nexport type getCourtsResponse = getCourtsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetCourtsUrl = (params?: GetCourtsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/courts/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/courts/`\n}\n\nexport const getCourts = async (params?: GetCourtsParams, options?: RequestInit): Promise<getCourtsResponse> => {\n \n const res = await fetch(getGetCourtsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getCourtsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getCourtsResponse\n}\n\n\n\nexport type getCourtsIdResponse200 = {\n data: Court\n status: 200\n}\n\nexport type getCourtsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getCourtsIdResponseComposite = getCourtsIdResponse200 | getCourtsIdResponse404;\n \nexport type getCourtsIdResponse = getCourtsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetCourtsIdUrl = (id: string,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/courts/${id}/`\n}\n\nexport const getCourtsId = async (id: string, options?: RequestInit): Promise<getCourtsIdResponse> => {\n \n const res = await fetch(getGetCourtsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getCourtsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getCourtsIdResponse\n}\n\n\n\nexport type getPeopleResponse200 = {\n data: PaginatedPeople\n status: 200\n}\n \nexport type getPeopleResponseComposite = getPeopleResponse200;\n \nexport type getPeopleResponse = getPeopleResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetPeopleUrl = (params?: GetPeopleParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/people/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/people/`\n}\n\nexport const getPeople = async (params?: GetPeopleParams, options?: RequestInit): Promise<getPeopleResponse> => {\n \n const res = await fetch(getGetPeopleUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getPeopleResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getPeopleResponse\n}\n\n\n\nexport type getPeopleIdResponse200 = {\n data: Person\n status: 200\n}\n\nexport type getPeopleIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getPeopleIdResponseComposite = getPeopleIdResponse200 | getPeopleIdResponse404;\n \nexport type getPeopleIdResponse = getPeopleIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetPeopleIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/people/${id}/`\n}\n\nexport const getPeopleId = async (id: number, options?: RequestInit): Promise<getPeopleIdResponse> => {\n \n const res = await fetch(getGetPeopleIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getPeopleIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getPeopleIdResponse\n}\n\n\n\nexport type getAudioResponse200 = {\n data: PaginatedAudio\n status: 200\n}\n \nexport type getAudioResponseComposite = getAudioResponse200;\n \nexport type getAudioResponse = getAudioResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetAudioUrl = (params?: GetAudioParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/audio/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/audio/`\n}\n\nexport const getAudio = async (params?: GetAudioParams, options?: RequestInit): Promise<getAudioResponse> => {\n \n const res = await fetch(getGetAudioUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getAudioResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getAudioResponse\n}\n\n\n\nexport type getAudioIdResponse200 = {\n data: Audio\n status: 200\n}\n\nexport type getAudioIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getAudioIdResponseComposite = getAudioIdResponse200 | getAudioIdResponse404;\n \nexport type getAudioIdResponse = getAudioIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetAudioIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/audio/${id}/`\n}\n\nexport const getAudioId = async (id: number, options?: RequestInit): Promise<getAudioIdResponse> => {\n \n const res = await fetch(getGetAudioIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getAudioIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getAudioIdResponse\n}\n\n\n\nexport type getFinancialDisclosuresResponse200 = {\n data: PaginatedFinancialDisclosures\n status: 200\n}\n \nexport type getFinancialDisclosuresResponseComposite = getFinancialDisclosuresResponse200;\n \nexport type getFinancialDisclosuresResponse = getFinancialDisclosuresResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetFinancialDisclosuresUrl = (params?: GetFinancialDisclosuresParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/financial-disclosures/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/financial-disclosures/`\n}\n\nexport const getFinancialDisclosures = async (params?: GetFinancialDisclosuresParams, options?: RequestInit): Promise<getFinancialDisclosuresResponse> => {\n \n const res = await fetch(getGetFinancialDisclosuresUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getFinancialDisclosuresResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getFinancialDisclosuresResponse\n}\n\n\n\nexport type getFinancialDisclosuresIdResponse200 = {\n data: FinancialDisclosure\n status: 200\n}\n\nexport type getFinancialDisclosuresIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getFinancialDisclosuresIdResponseComposite = getFinancialDisclosuresIdResponse200 | getFinancialDisclosuresIdResponse404;\n \nexport type getFinancialDisclosuresIdResponse = getFinancialDisclosuresIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetFinancialDisclosuresIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/financial-disclosures/${id}/`\n}\n\nexport const getFinancialDisclosuresId = async (id: number, options?: RequestInit): Promise<getFinancialDisclosuresIdResponse> => {\n \n const res = await fetch(getGetFinancialDisclosuresIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getFinancialDisclosuresIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getFinancialDisclosuresIdResponse\n}\n\n\n\nexport type getInvestmentsResponse200 = {\n data: PaginatedInvestments\n status: 200\n}\n \nexport type getInvestmentsResponseComposite = getInvestmentsResponse200;\n \nexport type getInvestmentsResponse = getInvestmentsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetInvestmentsUrl = (params?: GetInvestmentsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/investments/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/investments/`\n}\n\nexport const getInvestments = async (params?: GetInvestmentsParams, options?: RequestInit): Promise<getInvestmentsResponse> => {\n \n const res = await fetch(getGetInvestmentsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getInvestmentsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getInvestmentsResponse\n}\n\n\n\nexport type getInvestmentsIdResponse200 = {\n data: Investment\n status: 200\n}\n\nexport type getInvestmentsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getInvestmentsIdResponseComposite = getInvestmentsIdResponse200 | getInvestmentsIdResponse404;\n \nexport type getInvestmentsIdResponse = getInvestmentsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetInvestmentsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/investments/${id}/`\n}\n\nexport const getInvestmentsId = async (id: number, options?: RequestInit): Promise<getInvestmentsIdResponse> => {\n \n const res = await fetch(getGetInvestmentsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getInvestmentsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getInvestmentsIdResponse\n}\n\n\n\nexport type getPositionsResponse200 = {\n data: PaginatedPositions\n status: 200\n}\n \nexport type getPositionsResponseComposite = getPositionsResponse200;\n \nexport type getPositionsResponse = getPositionsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetPositionsUrl = (params?: GetPositionsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/positions/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/positions/`\n}\n\nexport const getPositions = async (params?: GetPositionsParams, options?: RequestInit): Promise<getPositionsResponse> => {\n \n const res = await fetch(getGetPositionsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getPositionsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getPositionsResponse\n}\n\n\n\nexport type getPositionsIdResponse200 = {\n data: Position\n status: 200\n}\n\nexport type getPositionsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getPositionsIdResponseComposite = getPositionsIdResponse200 | getPositionsIdResponse404;\n \nexport type getPositionsIdResponse = getPositionsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetPositionsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/positions/${id}/`\n}\n\nexport const getPositionsId = async (id: number, options?: RequestInit): Promise<getPositionsIdResponse> => {\n \n const res = await fetch(getGetPositionsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getPositionsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getPositionsIdResponse\n}\n\n\n\nexport type getAgreementsResponse200 = {\n data: PaginatedAgreements\n status: 200\n}\n \nexport type getAgreementsResponseComposite = getAgreementsResponse200;\n \nexport type getAgreementsResponse = getAgreementsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetAgreementsUrl = (params?: GetAgreementsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/agreements/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/agreements/`\n}\n\nexport const getAgreements = async (params?: GetAgreementsParams, options?: RequestInit): Promise<getAgreementsResponse> => {\n \n const res = await fetch(getGetAgreementsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getAgreementsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getAgreementsResponse\n}\n\n\n\nexport type getAgreementsIdResponse200 = {\n data: Agreement\n status: 200\n}\n\nexport type getAgreementsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getAgreementsIdResponseComposite = getAgreementsIdResponse200 | getAgreementsIdResponse404;\n \nexport type getAgreementsIdResponse = getAgreementsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetAgreementsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/agreements/${id}/`\n}\n\nexport const getAgreementsId = async (id: number, options?: RequestInit): Promise<getAgreementsIdResponse> => {\n \n const res = await fetch(getGetAgreementsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getAgreementsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getAgreementsIdResponse\n}\n\n\n\nexport type getNonInvestmentIncomeResponse200 = {\n data: PaginatedNonInvestmentIncome\n status: 200\n}\n \nexport type getNonInvestmentIncomeResponseComposite = getNonInvestmentIncomeResponse200;\n \nexport type getNonInvestmentIncomeResponse = getNonInvestmentIncomeResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetNonInvestmentIncomeUrl = (params?: GetNonInvestmentIncomeParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/non-investment-income/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/non-investment-income/`\n}\n\nexport const getNonInvestmentIncome = async (params?: GetNonInvestmentIncomeParams, options?: RequestInit): Promise<getNonInvestmentIncomeResponse> => {\n \n const res = await fetch(getGetNonInvestmentIncomeUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getNonInvestmentIncomeResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getNonInvestmentIncomeResponse\n}\n\n\n\nexport type getNonInvestmentIncomeIdResponse200 = {\n data: NonInvestmentIncome\n status: 200\n}\n\nexport type getNonInvestmentIncomeIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getNonInvestmentIncomeIdResponseComposite = getNonInvestmentIncomeIdResponse200 | getNonInvestmentIncomeIdResponse404;\n \nexport type getNonInvestmentIncomeIdResponse = getNonInvestmentIncomeIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetNonInvestmentIncomeIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/non-investment-income/${id}/`\n}\n\nexport const getNonInvestmentIncomeId = async (id: number, options?: RequestInit): Promise<getNonInvestmentIncomeIdResponse> => {\n \n const res = await fetch(getGetNonInvestmentIncomeIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getNonInvestmentIncomeIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getNonInvestmentIncomeIdResponse\n}\n\n\n\nexport type getSpouseIncomeResponse200 = {\n data: PaginatedSpouseIncome\n status: 200\n}\n \nexport type getSpouseIncomeResponseComposite = getSpouseIncomeResponse200;\n \nexport type getSpouseIncomeResponse = getSpouseIncomeResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetSpouseIncomeUrl = (params?: GetSpouseIncomeParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/spouse-income/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/spouse-income/`\n}\n\nexport const getSpouseIncome = async (params?: GetSpouseIncomeParams, options?: RequestInit): Promise<getSpouseIncomeResponse> => {\n \n const res = await fetch(getGetSpouseIncomeUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getSpouseIncomeResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getSpouseIncomeResponse\n}\n\n\n\nexport type getSpouseIncomeIdResponse200 = {\n data: SpouseIncome\n status: 200\n}\n\nexport type getSpouseIncomeIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getSpouseIncomeIdResponseComposite = getSpouseIncomeIdResponse200 | getSpouseIncomeIdResponse404;\n \nexport type getSpouseIncomeIdResponse = getSpouseIncomeIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetSpouseIncomeIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/spouse-income/${id}/`\n}\n\nexport const getSpouseIncomeId = async (id: number, options?: RequestInit): Promise<getSpouseIncomeIdResponse> => {\n \n const res = await fetch(getGetSpouseIncomeIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getSpouseIncomeIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getSpouseIncomeIdResponse\n}\n\n\n\nexport type getReimbursementsResponse200 = {\n data: PaginatedReimbursements\n status: 200\n}\n \nexport type getReimbursementsResponseComposite = getReimbursementsResponse200;\n \nexport type getReimbursementsResponse = getReimbursementsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetReimbursementsUrl = (params?: GetReimbursementsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/reimbursements/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/reimbursements/`\n}\n\nexport const getReimbursements = async (params?: GetReimbursementsParams, options?: RequestInit): Promise<getReimbursementsResponse> => {\n \n const res = await fetch(getGetReimbursementsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getReimbursementsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getReimbursementsResponse\n}\n\n\n\nexport type getReimbursementsIdResponse200 = {\n data: Reimbursement\n status: 200\n}\n\nexport type getReimbursementsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getReimbursementsIdResponseComposite = getReimbursementsIdResponse200 | getReimbursementsIdResponse404;\n \nexport type getReimbursementsIdResponse = getReimbursementsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetReimbursementsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/reimbursements/${id}/`\n}\n\nexport const getReimbursementsId = async (id: number, options?: RequestInit): Promise<getReimbursementsIdResponse> => {\n \n const res = await fetch(getGetReimbursementsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getReimbursementsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getReimbursementsIdResponse\n}\n\n\n\nexport type getGiftsResponse200 = {\n data: PaginatedGifts\n status: 200\n}\n \nexport type getGiftsResponseComposite = getGiftsResponse200;\n \nexport type getGiftsResponse = getGiftsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetGiftsUrl = (params?: GetGiftsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/gifts/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/gifts/`\n}\n\nexport const getGifts = async (params?: GetGiftsParams, options?: RequestInit): Promise<getGiftsResponse> => {\n \n const res = await fetch(getGetGiftsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getGiftsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getGiftsResponse\n}\n\n\n\nexport type getGiftsIdResponse200 = {\n data: Gift\n status: 200\n}\n\nexport type getGiftsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getGiftsIdResponseComposite = getGiftsIdResponse200 | getGiftsIdResponse404;\n \nexport type getGiftsIdResponse = getGiftsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetGiftsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/gifts/${id}/`\n}\n\nexport const getGiftsId = async (id: number, options?: RequestInit): Promise<getGiftsIdResponse> => {\n \n const res = await fetch(getGetGiftsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getGiftsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getGiftsIdResponse\n}\n\n\n\nexport type getDebtsResponse200 = {\n data: PaginatedDebts\n status: 200\n}\n \nexport type getDebtsResponseComposite = getDebtsResponse200;\n \nexport type getDebtsResponse = getDebtsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetDebtsUrl = (params?: GetDebtsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/debts/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/debts/`\n}\n\nexport const getDebts = async (params?: GetDebtsParams, options?: RequestInit): Promise<getDebtsResponse> => {\n \n const res = await fetch(getGetDebtsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getDebtsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getDebtsResponse\n}\n\n\n\nexport type getDebtsIdResponse200 = {\n data: Debt\n status: 200\n}\n\nexport type getDebtsIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getDebtsIdResponseComposite = getDebtsIdResponse200 | getDebtsIdResponse404;\n \nexport type getDebtsIdResponse = getDebtsIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetDebtsIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/debts/${id}/`\n}\n\nexport const getDebtsId = async (id: number, options?: RequestInit): Promise<getDebtsIdResponse> => {\n \n const res = await fetch(getGetDebtsIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getDebtsIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getDebtsIdResponse\n}\n\n\n\nexport type getAlertsResponse200 = {\n data: PaginatedAlerts\n status: 200\n}\n \nexport type getAlertsResponseComposite = getAlertsResponse200;\n \nexport type getAlertsResponse = getAlertsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetAlertsUrl = (params?: GetAlertsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/alerts/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/alerts/`\n}\n\nexport const getAlerts = async (params?: GetAlertsParams, options?: RequestInit): Promise<getAlertsResponse> => {\n \n const res = await fetch(getGetAlertsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getAlertsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getAlertsResponse\n}\n\n\n\nexport type postAlertsResponse201 = {\n data: Alert\n status: 201\n}\n\nexport type postAlertsResponse400 = {\n data: null\n status: 400\n}\n \nexport type postAlertsResponseComposite = postAlertsResponse201 | postAlertsResponse400;\n \nexport type postAlertsResponse = postAlertsResponseComposite & {\n headers: Headers;\n}\n\nexport const getPostAlertsUrl = () => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/alerts/`\n}\n\nexport const postAlerts = async (postAlertsBody: PostAlertsBody, options?: RequestInit): Promise<postAlertsResponse> => {\n \n const res = await fetch(getPostAlertsUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n postAlertsBody,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: postAlertsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as postAlertsResponse\n}\n\n\n\nexport type getProcessingQueueResponse200 = {\n data: PaginatedProcessingQueue\n status: 200\n}\n \nexport type getProcessingQueueResponseComposite = getProcessingQueueResponse200;\n \nexport type getProcessingQueueResponse = getProcessingQueueResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetProcessingQueueUrl = (params?: GetProcessingQueueParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/processing-queue/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/processing-queue/`\n}\n\nexport const getProcessingQueue = async (params?: GetProcessingQueueParams, options?: RequestInit): Promise<getProcessingQueueResponse> => {\n \n const res = await fetch(getGetProcessingQueueUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getProcessingQueueResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getProcessingQueueResponse\n}\n\n\n\nexport type getRecapResponse200 = {\n data: PaginatedRECAPDocuments\n status: 200\n}\n \nexport type getRecapResponseComposite = getRecapResponse200;\n \nexport type getRecapResponse = getRecapResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetRecapUrl = (params?: GetRecapParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/recap/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/recap/`\n}\n\nexport const getRecap = async (params?: GetRecapParams, options?: RequestInit): Promise<getRecapResponse> => {\n \n const res = await fetch(getGetRecapUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getRecapResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getRecapResponse\n}\n\n\n\nexport type getRecapIdResponse200 = {\n data: RECAPDocument\n status: 200\n}\n\nexport type getRecapIdResponse404 = {\n data: null\n status: 404\n}\n \nexport type getRecapIdResponseComposite = getRecapIdResponse200 | getRecapIdResponse404;\n \nexport type getRecapIdResponse = getRecapIdResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetRecapIdUrl = (id: number,) => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/recap/${id}/`\n}\n\nexport const getRecapId = async (id: number, options?: RequestInit): Promise<getRecapIdResponse> => {\n \n const res = await fetch(getGetRecapIdUrl(id),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getRecapIdResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getRecapIdResponse\n}\n\n\n\nexport type getPacerDocIdsResponse200 = {\n data: PaginatedPACERDocIDs\n status: 200\n}\n \nexport type getPacerDocIdsResponseComposite = getPacerDocIdsResponse200;\n \nexport type getPacerDocIdsResponse = getPacerDocIdsResponseComposite & {\n headers: Headers;\n}\n\nexport const getGetPacerDocIdsUrl = (params?: GetPacerDocIdsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n \n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `https://www.courtlistener.com/api/rest/v4/pacer-doc-ids/?${stringifiedParams}` : `https://www.courtlistener.com/api/rest/v4/pacer-doc-ids/`\n}\n\nexport const getPacerDocIds = async (params?: GetPacerDocIdsParams, options?: RequestInit): Promise<getPacerDocIdsResponse> => {\n \n const res = await fetch(getGetPacerDocIdsUrl(params),\n { \n ...options,\n method: 'GET'\n \n \n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: getPacerDocIdsResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as getPacerDocIdsResponse\n}\n\n\n\nexport type postRecapFetchResponse200 = {\n data: RECAPFetchResponse\n status: 200\n}\n\nexport type postRecapFetchResponse400 = {\n data: null\n status: 400\n}\n \nexport type postRecapFetchResponseComposite = postRecapFetchResponse200 | postRecapFetchResponse400;\n \nexport type postRecapFetchResponse = postRecapFetchResponseComposite & {\n headers: Headers;\n}\n\nexport const getPostRecapFetchUrl = () => {\n\n\n \n\n return `https://www.courtlistener.com/api/rest/v4/recap-fetch/`\n}\n\nexport const postRecapFetch = async (postRecapFetchBody: PostRecapFetchBody, options?: RequestInit): Promise<postRecapFetchResponse> => {\n \n const res = await fetch(getPostRecapFetchUrl(),\n { \n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...options?.headers },\n body: JSON.stringify(\n postRecapFetchBody,)\n }\n)\n\n const body = [204, 205, 304].includes(res.status) ? null : await res.text()\n const data: postRecapFetchResponse['data'] = body ? JSON.parse(body) : {}\n\n return { data, status: res.status, headers: res.headers } as postRecapFetchResponse\n}\n\n\n\nexport type getD