[{"data":1,"prerenderedAt":3726,"buildId":3727},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-client\u002Fguides\u002Fwrite-your-client":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":3725,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-client\u002Fguides\u002Fwrite-your-client.md",{},"Write your client",{"type":8,"value":9,"toc":3711},"minimark",[10,19,3633,3637,3641,3654,3690],[11,12,13,14,18],"p",{},"Build the client module that every generated function imports through ",[15,16,17],"code",{},"importPath",". You own its transport, auth, and error handling.",[20,21,23,28,31,150,160,183,193,384,395,406,769,773,784,2804,2807,2813,2862,2951,2954,3230,3236,3278,3281,3296,3387,3423,3430,3434,3440,3616],"steps",{"level":22},"2",[24,25,27],"h2",{"id":26},"check-the-contract","Check the contract",[11,29,30],{},"Export the names the generated files import:",[32,33,34,47],"table",{},[35,36,37],"thead",{},[38,39,40,44],"tr",{},[41,42,43],"th",{},"Export",[41,45,46],{},"Needed when",[48,49,50,66,87,106,123,136],"tbody",{},[38,51,52,63],{},[53,54,55,58,59,62],"td",{},[15,56,57],{},"client"," function, ",[15,60,61],{},"Options"," type",[53,64,65],{},"Always.",[38,67,68,73],{},[53,69,70,62],{},[15,71,72],{},"RequestResult",[53,74,75,78,79,82,83,86],{},[15,76,77],{},"returnType"," is ",[15,80,81],{},"'plain'"," (default) or ",[15,84,85],{},"'full'",".",[38,88,89,101],{},[53,90,91,94,95,94,98],{},[15,92,93],{},"withUnwrap",", ",[15,96,97],{},"resolveThrowOnError",[15,99,100],{},"Unwrappable",[53,102,103,86],{},[15,104,105],{},"returnType: 'full'",[38,107,108,118],{},[53,109,110,94,113,94,115],{},[15,111,112],{},"unwrapResult",[15,114,97],{},[15,116,117],{},"UnwrappedResult",[53,119,120,86],{},[15,121,122],{},"returnType: 'data'",[38,124,125,131],{},[53,126,127,130],{},[15,128,129],{},"toHeadersStandardSchema"," function",[53,132,133,86],{},[15,134,135],{},"validator: { params: 'zod' }",[38,137,138,147],{},[53,139,140,94,143,146],{},[15,141,142],{},"RequestConfig",[15,144,145],{},"ResponseErrorConfig"," types",[53,148,149],{},"A query plugin calls the generated functions.",[11,151,152,153,156,157,86],{},"A generated function calls ",[15,154,155],{},"client\u003CTResponses, ThrowOnError>(config)",", which must return ",[15,158,159],{},"Promise\u003CRequestResult\u003CTResponses, ThrowOnError>>",[161,162,164,165,168,169,172,173,176,177,179,180,182],"blockquote",{"as":163},"note","The query plugins and ",[15,166,167],{},"@kubb\u002Fplugin-mcp"," call with ",[15,170,171],{},"throwOnError: true"," and read ",[15,174,175],{},"data"," off the result, so ",[15,178,72],{}," needs a ",[15,181,175],{}," field.",[11,184,185,186,189,190,192],{},"Declare each ",[15,187,188],{},"config"," field your spec produces on ",[15,191,142],{},", or the generated files fail to compile:",[32,194,195,208],{},[35,196,197],{},[38,198,199,202,205],{},[41,200,201],{},"Field",[41,203,204],{},"Passed when",[41,206,207],{},"Value",[48,209,210,236,264,280,298,327,350,365],{},[38,211,212,223,226],{},[53,213,214,94,217,94,220],{},[15,215,216],{},"method",[15,218,219],{},"url",[15,221,222],{},"throwOnError",[53,224,225],{},"Always",[53,227,228,229,232,233,235],{},"The upper-case method, the path template such as ",[15,230,231],{},"'\u002Fpet\u002F{petId}'",", and the caller's ",[15,234,222],{}," or the default.",[38,237,238,255,258],{},[53,239,240,94,243,94,246,94,249,94,252],{},[15,241,242],{},"path",[15,244,245],{},"query",[15,247,248],{},"headers",[15,250,251],{},"cookies",[15,253,254],{},"body",[53,256,257],{},"The caller passes them",[53,259,260,261,263],{},"Typed from the spec. ",[15,262,251],{}," holds name and value pairs.",[38,265,266,271,277],{},[53,267,268],{},[15,269,270],{},"baseURL",[53,272,273,274],{},"The path or operation declares its own ",[15,275,276],{},"servers",[53,278,279],{},"That server's URL. Use it when set.",[38,281,282,287,290],{},[53,283,284],{},[15,285,286],{},"security",[53,288,289],{},"The operation has security requirements",[53,291,292,293,86],{},"See ",[294,295,297],"a",{"href":296},"#authenticate","Authenticate",[38,299,300,305,321],{},[53,301,302],{},[15,303,304],{},"styles",[53,306,307,308,94,311,94,314,317,318],{},"A parameter sets ",[15,309,310],{},"style",[15,312,313],{},"explode",[15,315,316],{},"allowReserved",", or ",[15,319,320],{},"contentType",[53,322,292,323,86],{},[294,324,326],{"href":325},"#serialize-parameters","Serialize parameters",[38,328,329,333,336],{},[53,330,331],{},[15,332,320],{},[53,334,335],{},"The operation has a body or streams",[53,337,338,341,342,345,346,349],{},[15,339,340],{},"request"," is the body's media type, ",[15,343,344],{},"response"," the ",[15,347,348],{},"Accept"," value.",[38,351,352,357,360],{},[53,353,354],{},[15,355,356],{},"parseAs",[53,358,359],{},"Every success content type is binary",[53,361,362],{},[15,363,364],{},"'blob'",[38,366,367,372,378],{},[53,368,369],{},[15,370,371],{},"validator",[53,373,374,375,377],{},"The ",[15,376,371],{}," option is set",[53,379,292,380,86],{},[294,381,383],{"href":382},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-client\u002Fguides\u002Fvalidate-requests-and-responses","Validate requests and responses",[11,385,386,387,390,391,86],{},"A spec with Server-Sent Events or JSON Lines operations needs ",[15,388,389],{},"client.stream"," and more exports and fields. See ",[294,392,394],{"href":393},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-client\u002Fguides\u002Fstreaming","Stream Server-Sent Events and JSON Lines",[11,396,397,398,401,402,405],{},"Other keys the caller passes, such as ",[15,399,400],{},"signal",", arrive through ",[15,403,404],{},"...config",". A generated function looks like this:",[407,408,413],"pre",{"language":409,"filename":410,"code":411,"class":412},"typescript","src\u002Fgen\u002Fclients\u002Fpet\u002FgetPetById.ts","import type { Options, RequestResult } from '..\u002F..\u002F..\u002Fclient'\nimport type { GetPetByIdOptions, GetPetByIdResponses } from '..\u002F..\u002Ftypes\u002FGetPetById'\nimport { client } from '..\u002F..\u002F..\u002Fclient'\n\nexport function getPetById\u003CThrowOnError extends boolean = true>(\n options: Options\u003CGetPetByIdOptions, ThrowOnError>,\n): Promise\u003CRequestResult\u003CGetPetByIdResponses, ThrowOnError>> {\n const { client: apiClient = client, ...config } = options\n\n return apiClient\u003CGetPetByIdResponses, ThrowOnError>({\n method: 'GET',\n url: '\u002Fpet\u002F{petId}',\n security: [{ type: 'apiKey', name: 'api_key', in: 'header' }, { type: 'oauth2' }],\n ...config,\n throwOnError: config.throwOnError ?? true,\n })\n}","highlights",[15,414,416,451,452,451,475,451,490,451,492,451,527,451,554,451,583,451,617,451,619,451,642,451,656,451,668,451,726,451,736,451,758,451,765],{"class":415},"language-typescript",[417,418,421,425,429,433,436,438,441,444,447],"span",{"class":419,"style":420},"line","display: inline",[417,422,424],{"style":423},"color:#d73a49;--hls-dark:#f97583","import ",[417,426,428],{"style":427},"color:#24292e;--hls-dark:#e1e4e8","type ",[417,430,432],{"style":431},"color:#005cc5;--hls-dark:#79b8ff","{ ",[417,434,61],{"style":435},"color:#6f42c1;--hls-dark:#b392f0",[417,437,94],{"style":423},[417,439,440],{"style":435},"RequestResult ",[417,442,443],{"style":431},"} ",[417,445,446],{"style":423},"from ",[417,448,450],{"style":449},"color:#032f62;--hls-dark:#9ecbff","'..\u002F..\u002F..\u002Fclient'","\n",[417,453,454,456,458,460,463,465,468,470,472],{"class":419,"style":420},[417,455,424],{"style":423},[417,457,428],{"style":427},[417,459,432],{"style":431},[417,461,462],{"style":435},"GetPetByIdOptions",[417,464,94],{"style":423},[417,466,467],{"style":435},"GetPetByIdResponses ",[417,469,443],{"style":431},[417,471,446],{"style":423},[417,473,474],{"style":449},"'..\u002F..\u002Ftypes\u002FGetPetById'",[417,476,477,479,481,484,486,488],{"class":419,"style":420},[417,478,424],{"style":423},[417,480,432],{"style":431},[417,482,483],{"style":427},"client ",[417,485,443],{"style":431},[417,487,446],{"style":423},[417,489,450],{"style":449},[417,491],{"class":419,"style":420},[417,493,494,497,500,503,506,509,512,515,518,521,524],{"class":419,"style":420},[417,495,496],{"style":423},"export ",[417,498,499],{"style":423},"function ",[417,501,502],{"style":435},"getPetById",[417,504,505],{"style":423},"\u003C",[417,507,508],{"style":435},"ThrowOnError ",[417,510,511],{"style":423},"extends ",[417,513,514],{"style":435},"boolean ",[417,516,517],{"style":423},"= ",[417,519,520],{"style":431},"true",[417,522,523],{"style":423},">",[417,525,526],{"style":431},"(",[417,528,529,532,535,538,540,542,544,546,549,551],{"class":419,"style":420},[417,530,531],{"style":431}," ",[417,533,534],{"style":427},"options",[417,536,537],{"style":427},": ",[417,539,61],{"style":435},[417,541,505],{"style":423},[417,543,462],{"style":435},[417,545,94],{"style":423},[417,547,548],{"style":435},"ThrowOnError",[417,550,523],{"style":423},[417,552,553],{"style":423},",",[417,555,556,559,561,564,566,568,570,573,575,577,580],{"class":419,"style":420},[417,557,558],{"style":431},")",[417,560,537],{"style":427},[417,562,563],{"style":435},"Promise",[417,565,505],{"style":423},[417,567,72],{"style":435},[417,569,505],{"style":423},[417,571,572],{"style":435},"GetPetByIdResponses",[417,574,94],{"style":423},[417,576,548],{"style":435},[417,578,579],{"style":423},">> ",[417,581,582],{"style":431},"{",[417,584,585,587,590,592,594,596,599,601,603,605,608,611,613,615],{"class":419,"style":420},[417,586,531],{"style":431},[417,588,589],{"style":423},"const ",[417,591,432],{"style":431},[417,593,57],{"style":431},[417,595,537],{"style":423},[417,597,598],{"style":427},"apiClient ",[417,600,517],{"style":423},[417,602,57],{"style":427},[417,604,94],{"style":423},[417,606,607],{"style":423},"...",[417,609,610],{"style":427},"config ",[417,612,443],{"style":431},[417,614,517],{"style":423},[417,616,534],{"style":427},[417,618],{"class":419,"style":420},[417,620,621,623,626,629,631,633,635,637,639],{"class":419,"style":420},[417,622,531],{"style":427},[417,624,625],{"style":423},"return ",[417,627,628],{"style":427},"apiClient",[417,630,505],{"style":423},[417,632,572],{"style":435},[417,634,94],{"style":423},[417,636,548],{"style":435},[417,638,523],{"style":423},[417,640,641],{"style":431},"({",[417,643,644,647,649,651,654],{"class":419,"style":420},[417,645,646],{"style":431}," ",[417,648,216],{"style":431},[417,650,537],{"style":423},[417,652,653],{"style":449},"'GET'",[417,655,553],{"style":423},[417,657,658,660,662,664,666],{"class":419,"style":420},[417,659,646],{"style":423},[417,661,219],{"style":431},[417,663,537],{"style":423},[417,665,231],{"style":449},[417,667,553],{"style":423},[417,669,670,672,674,676,679,682,684,687,689,692,694,697,699,702,704,707,710,712,714,716,718,721,724],{"class":419,"style":420},[417,671,646],{"style":423},[417,673,286],{"style":431},[417,675,537],{"style":423},[417,677,678],{"style":431},"[{ ",[417,680,681],{"style":431},"type",[417,683,537],{"style":423},[417,685,686],{"style":449},"'apiKey'",[417,688,94],{"style":423},[417,690,691],{"style":431},"name",[417,693,537],{"style":423},[417,695,696],{"style":449},"'api_key'",[417,698,94],{"style":423},[417,700,701],{"style":423},"in",[417,703,537],{"style":423},[417,705,706],{"style":449},"'header' ",[417,708,709],{"style":431},"}",[417,711,94],{"style":423},[417,713,432],{"style":431},[417,715,681],{"style":431},[417,717,537],{"style":423},[417,719,720],{"style":449},"'oauth2' ",[417,722,723],{"style":431},"}]",[417,725,553],{"style":423},[417,727,728,730,732,734],{"class":419,"style":420},[417,729,646],{"style":423},[417,731,607],{"style":423},[417,733,188],{"style":427},[417,735,553],{"style":423},[417,737,738,740,742,744,746,748,751,754,756],{"class":419,"style":420},[417,739,646],{"style":423},[417,741,222],{"style":431},[417,743,537],{"style":423},[417,745,188],{"style":427},[417,747,86],{"style":423},[417,749,750],{"style":431},"throwOnError ",[417,752,753],{"style":423},"?? ",[417,755,520],{"style":431},[417,757,553],{"style":423},[417,759,760,762],{"class":419,"style":420},[417,761,531],{"style":423},[417,763,764],{"style":431},"})",[417,766,767],{"class":419,"style":420},[417,768,709],{"style":431},[24,770,772],{"id":771},"write-the-client","Write the client",[11,774,775,776,779,780,783],{},"Write the module from scratch, or build it on the runtime that ",[15,777,778],{},"@kubb\u002Fplugin-fetch"," and ",[15,781,782],{},"@kubb\u002Fplugin-axios"," use.",[785,786,787,2676],"tabs",{},[788,789,791,802,2669],"tabs-item",{"label":790},"From scratch",[11,792,793,794,797,798,801],{},"This client uses ",[15,795,796],{},"fetch"," and reads JSON. Replace ",[15,799,800],{},"send"," with your HTTP library.",[407,803,806],{"language":409,"filename":804,"code":805,"class":412},"src\u002Fclient.ts","export type Auth = {\n type: string\n scheme?: string\n name?: string\n in?: string\n scopes?: Array\u003Cstring>\n flows?: Record\u003Cstring, Record\u003Cstring, string>>\n metadataUrl?: string\n url?: string\n}\n\nexport type RequestConfig = {\n method: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD'\n url: string\n baseURL?: string\n headers?: object\n path?: object\n query?: object\n cookies?: object\n body?: unknown\n signal?: AbortSignal\n parseAs?: 'json' | 'text' | 'blob' | 'arrayBuffer' | 'stream'\n contentType?: string | { request?: string; response?: string }\n throwOnError?: boolean\n security?: Array\u003CAuth | Array\u003CAuth>>\n styles?: object\n client?: typeof client\n}\n\ntype DataShape = { body?: unknown; cookies?: unknown; headers?: unknown; path?: unknown; query?: unknown }\n\nexport type Options\u003CTData extends DataShape, ThrowOnError extends boolean = true> = Omit\u003CRequestConfig, keyof DataShape | 'url' | 'method'> &\n TData & { throwOnError?: ThrowOnError }\n\nexport type RequestResult\u003CTResponses, ThrowOnError extends boolean = true> = ThrowOnError extends true\n ? { data: TResponses[keyof TResponses]; error: undefined; response: Response }\n : { data: TResponses[keyof TResponses]; error: undefined; response: Response } | { data: undefined; error: {}; response: Response }\n\n\u002F\u002F Only needed by the query plugins: what a failed hook rejects with.\nexport type ResponseErrorConfig\u003CTError = unknown> = Error & { body?: TError }\n\n\u002F\u002F Set this to your API host. `new URL()` needs an absolute URL.\nexport const settings = { baseURL: 'https:\u002F\u002Fpetstore3.swagger.io\u002Fapi\u002Fv3' }\n\nasync function send(config: RequestConfig) {\n const path: Record\u003Cstring, unknown> = { ...config.path }\n const url = new URL((config.baseURL ?? settings.baseURL) + config.url.replace(\u002F\\{(\\w+)\\}\u002Fg, (_, key) => encodeURIComponent(String(path[key]))))\n \u002F\u002F The default `form` style repeats the key for each array item and sends each object property as its own parameter. Other styles: see Serialize parameters.\n for (const [key, value] of Object.entries(config.query ?? {})) {\n const isObject = typeof value === 'object' && value !== null && !Array.isArray(value) && !(value instanceof Date)\n for (const [name, entry] of isObject ? Object.entries(value) : [[key, value]]) {\n for (const item of Array.isArray(entry) ? entry : [entry]) {\n if (item !== undefined) url.searchParams.append(name, String(item))\n }\n }\n }\n const cookie = Object.entries(config.cookies ?? {})\n .filter(([, value]) => value != null)\n .map(([name, value]) => `${name}=${encodeURIComponent(String(value))}`)\n .join('; ')\n \u002F\u002F `Headers` matches names in any case, so a caller's `content-type` or `authorization` still wins.\n const headers = new Headers(config.headers as Record\u003Cstring, string>)\n if (config.body !== undefined && !headers.has('Content-Type')) headers.set('Content-Type', 'application\u002Fjson')\n \u002F\u002F On the server this adds to the caller's cookies. Browsers drop a script-set `Cookie` header and send their own.\n if (cookie) headers.set('Cookie', [headers.get('Cookie'), cookie].filter(Boolean).join('; '))\n\n const response = await fetch(url, {\n method: config.method,\n headers,\n body: config.body === undefined ? undefined : JSON.stringify(config.body),\n signal: config.signal,\n })\n const body = await response.json().catch(() => undefined)\n\n if (response.ok) return { data: body, error: undefined, response }\n if (config.throwOnError ?? true) throw new Error(`Request failed with status ${response.status}`)\n return { data: undefined, error: body ?? { status: response.status }, response }\n}\n\n\u002F\u002F Generated functions pass their responses type and `ThrowOnError`.\nexport const client = \u003CTResponses, ThrowOnError extends boolean = true>(config: RequestConfig) =>\n send(config) as Promise\u003CRequestResult\u003CTResponses, ThrowOnError>>",[15,807,808,451,821,451,832,451,844,451,854,451,864,451,882,451,913,451,924,451,934,451,938,451,940,451,953,451,995,451,1005,451,1015,451,1026,451,1036,451,1046,451,1056,451,1067,451,1078,451,1112,451,1144,451,1155,451,1180,451,1190,451,1205,451,1209,451,1211,451,1263,451,1265,451,1325,451,1344,451,1346,451,1379,451,1425,451,1494,451,1496,451,1502,451,1536,451,1538,451,1543,451,1565,451,1567,451,1587,451,1622,451,1716,451,1723,451,1771,451,1834,451,1887,451,1929,451,1975,451,1980,451,1985,451,1990,451,2021,451,2052,451,2106,451,2122,451,2129,451,2170,451,2225,451,2232,451,2300,451,2302,451,2326,451,2342,451,2350,451,2394,451,2410,451,2416,451,2452,451,2454,451,2495,451,2543,451,2588,451,2592,451,2594,451,2599,451,2639],{"class":415},[417,809,810,812,814,817,819],{"class":419,"style":420},[417,811,496],{"style":423},[417,813,428],{"style":423},[417,815,816],{"style":435},"Auth ",[417,818,517],{"style":423},[417,820,582],{"style":431},[417,822,823,825,827,829],{"class":419,"style":420},[417,824,531],{"style":431},[417,826,681],{"style":431},[417,828,537],{"style":427},[417,830,831],{"style":435},"string",[417,833,834,836,839,842],{"class":419,"style":420},[417,835,531],{"style":435},[417,837,838],{"style":427},"scheme",[417,840,841],{"style":427},"?: ",[417,843,831],{"style":435},[417,845,846,848,850,852],{"class":419,"style":420},[417,847,531],{"style":435},[417,849,691],{"style":427},[417,851,841],{"style":427},[417,853,831],{"style":435},[417,855,856,858,860,862],{"class":419,"style":420},[417,857,531],{"style":435},[417,859,701],{"style":423},[417,861,841],{"style":427},[417,863,831],{"style":435},[417,865,866,868,871,873,876,878,880],{"class":419,"style":420},[417,867,531],{"style":435},[417,869,870],{"style":427},"scopes",[417,872,841],{"style":427},[417,874,875],{"style":435},"Array",[417,877,505],{"style":423},[417,879,831],{"style":427},[417,881,523],{"style":423},[417,883,884,886,889,891,894,896,898,900,902,904,906,908,910],{"class":419,"style":420},[417,885,531],{"style":423},[417,887,888],{"style":427},"flows",[417,890,841],{"style":427},[417,892,893],{"style":435},"Record",[417,895,505],{"style":423},[417,897,831],{"style":427},[417,899,94],{"style":423},[417,901,893],{"style":435},[417,903,505],{"style":423},[417,905,831],{"style":427},[417,907,94],{"style":423},[417,909,831],{"style":427},[417,911,912],{"style":423},">>",[417,914,915,917,920,922],{"class":419,"style":420},[417,916,531],{"style":423},[417,918,919],{"style":427},"metadataUrl",[417,921,841],{"style":427},[417,923,831],{"style":435},[417,925,926,928,930,932],{"class":419,"style":420},[417,927,531],{"style":435},[417,929,219],{"style":427},[417,931,841],{"style":427},[417,933,831],{"style":435},[417,935,936],{"class":419,"style":420},[417,937,709],{"style":431},[417,939],{"class":419,"style":420},[417,941,942,944,946,949,951],{"class":419,"style":420},[417,943,496],{"style":423},[417,945,428],{"style":423},[417,947,948],{"style":435},"RequestConfig ",[417,950,517],{"style":423},[417,952,582],{"style":431},[417,954,955,957,959,961,964,967,970,972,975,977,980,982,985,987,990,992],{"class":419,"style":420},[417,956,531],{"style":431},[417,958,216],{"style":431},[417,960,537],{"style":423},[417,962,963],{"style":449},"'GET' ",[417,965,966],{"style":423},"| ",[417,968,969],{"style":449},"'PUT' ",[417,971,966],{"style":423},[417,973,974],{"style":449},"'PATCH' ",[417,976,966],{"style":423},[417,978,979],{"style":449},"'POST' ",[417,981,966],{"style":423},[417,983,984],{"style":449},"'DELETE' ",[417,986,966],{"style":423},[417,988,989],{"style":449},"'OPTIONS' ",[417,991,966],{"style":423},[417,993,994],{"style":449},"'HEAD'",[417,996,997,999,1001,1003],{"class":419,"style":420},[417,998,531],{"style":449},[417,1000,219],{"style":427},[417,1002,537],{"style":427},[417,1004,831],{"style":435},[417,1006,1007,1009,1011,1013],{"class":419,"style":420},[417,1008,531],{"style":435},[417,1010,270],{"style":427},[417,1012,841],{"style":427},[417,1014,831],{"style":435},[417,1016,1017,1019,1021,1023],{"class":419,"style":420},[417,1018,531],{"style":435},[417,1020,248],{"style":427},[417,1022,841],{"style":427},[417,1024,1025],{"style":435},"object",[417,1027,1028,1030,1032,1034],{"class":419,"style":420},[417,1029,531],{"style":435},[417,1031,242],{"style":427},[417,1033,841],{"style":427},[417,1035,1025],{"style":435},[417,1037,1038,1040,1042,1044],{"class":419,"style":420},[417,1039,531],{"style":435},[417,1041,245],{"style":427},[417,1043,841],{"style":427},[417,1045,1025],{"style":435},[417,1047,1048,1050,1052,1054],{"class":419,"style":420},[417,1049,531],{"style":435},[417,1051,251],{"style":427},[417,1053,841],{"style":427},[417,1055,1025],{"style":435},[417,1057,1058,1060,1062,1064],{"class":419,"style":420},[417,1059,531],{"style":435},[417,1061,254],{"style":427},[417,1063,841],{"style":427},[417,1065,1066],{"style":435},"unknown",[417,1068,1069,1071,1073,1075],{"class":419,"style":420},[417,1070,531],{"style":435},[417,1072,400],{"style":427},[417,1074,841],{"style":427},[417,1076,1077],{"style":435},"AbortSignal",[417,1079,1080,1082,1084,1087,1089,1092,1094,1097,1099,1102,1104,1107,1109],{"class":419,"style":420},[417,1081,531],{"style":435},[417,1083,356],{"style":427},[417,1085,1086],{"style":427},"?",[417,1088,537],{"style":423},[417,1090,1091],{"style":449},"'json' ",[417,1093,966],{"style":423},[417,1095,1096],{"style":449},"'text' ",[417,1098,966],{"style":423},[417,1100,1101],{"style":449},"'blob' ",[417,1103,966],{"style":423},[417,1105,1106],{"style":449},"'arrayBuffer' ",[417,1108,966],{"style":423},[417,1110,1111],{"style":449},"'stream'",[417,1113,1114,1116,1118,1120,1123,1125,1127,1129,1131,1133,1136,1138,1140,1142],{"class":419,"style":420},[417,1115,531],{"style":449},[417,1117,320],{"style":427},[417,1119,841],{"style":427},[417,1121,1122],{"style":435},"string ",[417,1124,966],{"style":423},[417,1126,432],{"style":431},[417,1128,340],{"style":431},[417,1130,841],{"style":427},[417,1132,831],{"style":435},[417,1134,1135],{"style":423},"; ",[417,1137,344],{"style":431},[417,1139,841],{"style":427},[417,1141,1122],{"style":435},[417,1143,709],{"style":431},[417,1145,1146,1148,1150,1152],{"class":419,"style":420},[417,1147,531],{"style":431},[417,1149,222],{"style":427},[417,1151,841],{"style":427},[417,1153,1154],{"style":435},"boolean",[417,1156,1157,1159,1161,1163,1165,1167,1169,1171,1173,1175,1178],{"class":419,"style":420},[417,1158,531],{"style":435},[417,1160,286],{"style":427},[417,1162,841],{"style":427},[417,1164,875],{"style":435},[417,1166,505],{"style":423},[417,1168,816],{"style":435},[417,1170,966],{"style":423},[417,1172,875],{"style":435},[417,1174,505],{"style":423},[417,1176,1177],{"style":435},"Auth",[417,1179,912],{"style":423},[417,1181,1182,1184,1186,1188],{"class":419,"style":420},[417,1183,531],{"style":423},[417,1185,304],{"style":427},[417,1187,841],{"style":427},[417,1189,1025],{"style":435},[417,1191,1192,1194,1196,1198,1200,1203],{"class":419,"style":420},[417,1193,531],{"style":435},[417,1195,57],{"style":427},[417,1197,1086],{"style":427},[417,1199,537],{"style":423},[417,1201,1202],{"style":423},"typeof ",[417,1204,57],{"style":427},[417,1206,1207],{"class":419,"style":420},[417,1208,709],{"style":431},[417,1210],{"class":419,"style":420},[417,1212,1213,1215,1218,1220,1222,1224,1226,1228,1230,1232,1234,1236,1238,1240,1242,1244,1246,1248,1250,1252,1254,1256,1258,1261],{"class":419,"style":420},[417,1214,428],{"style":423},[417,1216,1217],{"style":435},"DataShape ",[417,1219,517],{"style":423},[417,1221,432],{"style":431},[417,1223,254],{"style":431},[417,1225,841],{"style":427},[417,1227,1066],{"style":435},[417,1229,1135],{"style":423},[417,1231,251],{"style":431},[417,1233,841],{"style":427},[417,1235,1066],{"style":435},[417,1237,1135],{"style":423},[417,1239,248],{"style":431},[417,1241,841],{"style":427},[417,1243,1066],{"style":435},[417,1245,1135],{"style":423},[417,1247,242],{"style":431},[417,1249,841],{"style":427},[417,1251,1066],{"style":435},[417,1253,1135],{"style":423},[417,1255,245],{"style":431},[417,1257,841],{"style":427},[417,1259,1260],{"style":435},"unknown ",[417,1262,709],{"style":431},[417,1264],{"class":419,"style":420},[417,1266,1267,1269,1271,1273,1275,1278,1280,1283,1285,1287,1289,1291,1293,1295,1298,1301,1303,1305,1307,1310,1312,1314,1317,1319,1322],{"class":419,"style":420},[417,1268,496],{"style":423},[417,1270,428],{"style":423},[417,1272,61],{"style":435},[417,1274,505],{"style":423},[417,1276,1277],{"style":435},"TData ",[417,1279,511],{"style":423},[417,1281,1282],{"style":435},"DataShape",[417,1284,94],{"style":423},[417,1286,508],{"style":435},[417,1288,511],{"style":423},[417,1290,514],{"style":435},[417,1292,517],{"style":423},[417,1294,520],{"style":431},[417,1296,1297],{"style":423},"> = ",[417,1299,1300],{"style":435},"Omit",[417,1302,505],{"style":423},[417,1304,142],{"style":435},[417,1306,94],{"style":423},[417,1308,1309],{"style":423},"keyof ",[417,1311,1217],{"style":435},[417,1313,966],{"style":423},[417,1315,1316],{"style":449},"'url' ",[417,1318,966],{"style":423},[417,1320,1321],{"style":449},"'method'",[417,1323,1324],{"style":423},"> &",[417,1326,1327,1329,1331,1334,1336,1338,1340,1342],{"class":419,"style":420},[417,1328,531],{"style":423},[417,1330,1277],{"style":435},[417,1332,1333],{"style":423},"& ",[417,1335,432],{"style":431},[417,1337,222],{"style":431},[417,1339,841],{"style":427},[417,1341,508],{"style":435},[417,1343,709],{"style":431},[417,1345],{"class":419,"style":420},[417,1347,1348,1350,1352,1354,1356,1359,1361,1363,1365,1367,1369,1371,1373,1375,1377],{"class":419,"style":420},[417,1349,496],{"style":423},[417,1351,428],{"style":423},[417,1353,72],{"style":435},[417,1355,505],{"style":423},[417,1357,1358],{"style":435},"TResponses",[417,1360,94],{"style":423},[417,1362,508],{"style":435},[417,1364,511],{"style":423},[417,1366,514],{"style":435},[417,1368,517],{"style":423},[417,1370,520],{"style":431},[417,1372,1297],{"style":423},[417,1374,508],{"style":435},[417,1376,511],{"style":423},[417,1378,520],{"style":431},[417,1380,1381,1383,1386,1388,1390,1392,1394,1397,1399,1401,1404,1406,1409,1411,1414,1416,1418,1420,1423],{"class":419,"style":420},[417,1382,531],{"style":431},[417,1384,1385],{"style":423},"? ",[417,1387,432],{"style":431},[417,1389,175],{"style":431},[417,1391,537],{"style":427},[417,1393,1358],{"style":435},[417,1395,1396],{"style":431},"[",[417,1398,1309],{"style":423},[417,1400,1358],{"style":435},[417,1402,1403],{"style":431},"]",[417,1405,1135],{"style":423},[417,1407,1408],{"style":431},"error",[417,1410,537],{"style":423},[417,1412,1413],{"style":431},"undefined",[417,1415,1135],{"style":423},[417,1417,344],{"style":431},[417,1419,537],{"style":427},[417,1421,1422],{"style":435},"Response ",[417,1424,709],{"style":431},[417,1426,1427,1429,1431,1433,1435,1437,1439,1441,1443,1445,1447,1449,1451,1453,1455,1457,1459,1461,1463,1465,1467,1469,1471,1473,1475,1477,1479,1481,1484,1486,1488,1490,1492],{"class":419,"style":420},[417,1428,531],{"style":431},[417,1430,537],{"style":423},[417,1432,432],{"style":431},[417,1434,175],{"style":431},[417,1436,537],{"style":427},[417,1438,1358],{"style":435},[417,1440,1396],{"style":431},[417,1442,1309],{"style":423},[417,1444,1358],{"style":435},[417,1446,1403],{"style":431},[417,1448,1135],{"style":423},[417,1450,1408],{"style":431},[417,1452,537],{"style":423},[417,1454,1413],{"style":431},[417,1456,1135],{"style":423},[417,1458,344],{"style":431},[417,1460,537],{"style":427},[417,1462,1422],{"style":435},[417,1464,443],{"style":431},[417,1466,966],{"style":423},[417,1468,432],{"style":431},[417,1470,175],{"style":431},[417,1472,537],{"style":423},[417,1474,1413],{"style":431},[417,1476,1135],{"style":423},[417,1478,1408],{"style":431},[417,1480,537],{"style":423},[417,1482,1483],{"style":431},"{}",[417,1485,1135],{"style":423},[417,1487,344],{"style":431},[417,1489,537],{"style":427},[417,1491,1422],{"style":435},[417,1493,709],{"style":431},[417,1495],{"class":419,"style":420},[417,1497,1498],{"class":419,"style":420},[417,1499,1501],{"style":1500},"color:#6a737d;--hls-dark:#6a737d","\u002F\u002F Only needed by the query plugins: what a failed hook rejects with.",[417,1503,1504,1506,1508,1510,1512,1515,1517,1519,1521,1524,1526,1528,1530,1532,1534],{"class":419,"style":420},[417,1505,496],{"style":423},[417,1507,428],{"style":423},[417,1509,145],{"style":435},[417,1511,505],{"style":423},[417,1513,1514],{"style":435},"TError ",[417,1516,517],{"style":423},[417,1518,1066],{"style":427},[417,1520,1297],{"style":423},[417,1522,1523],{"style":435},"Error ",[417,1525,1333],{"style":423},[417,1527,432],{"style":431},[417,1529,254],{"style":431},[417,1531,841],{"style":427},[417,1533,1514],{"style":435},[417,1535,709],{"style":431},[417,1537],{"class":419,"style":420},[417,1539,1540],{"class":419,"style":420},[417,1541,1542],{"style":1500},"\u002F\u002F Set this to your API host. `new URL()` needs an absolute URL.",[417,1544,1545,1547,1549,1552,1554,1556,1558,1560,1563],{"class":419,"style":420},[417,1546,496],{"style":423},[417,1548,589],{"style":423},[417,1550,1551],{"style":427},"settings ",[417,1553,517],{"style":423},[417,1555,432],{"style":431},[417,1557,270],{"style":431},[417,1559,537],{"style":423},[417,1561,1562],{"style":449},"'https:\u002F\u002Fpetstore3.swagger.io\u002Fapi\u002Fv3' ",[417,1564,709],{"style":431},[417,1566],{"class":419,"style":420},[417,1568,1569,1572,1574,1576,1578,1580,1582,1584],{"class":419,"style":420},[417,1570,1571],{"style":423},"async ",[417,1573,499],{"style":423},[417,1575,800],{"style":435},[417,1577,526],{"style":431},[417,1579,188],{"style":427},[417,1581,537],{"style":427},[417,1583,142],{"style":435},[417,1585,1586],{"style":431},") {",[417,1588,1589,1591,1593,1595,1597,1599,1601,1603,1605,1607,1609,1611,1613,1615,1617,1620],{"class":419,"style":420},[417,1590,531],{"style":431},[417,1592,589],{"style":423},[417,1594,242],{"style":427},[417,1596,537],{"style":427},[417,1598,893],{"style":435},[417,1600,505],{"style":423},[417,1602,831],{"style":427},[417,1604,94],{"style":423},[417,1606,1066],{"style":427},[417,1608,1297],{"style":423},[417,1610,432],{"style":431},[417,1612,607],{"style":423},[417,1614,188],{"style":427},[417,1616,86],{"style":423},[417,1618,1619],{"style":431},"path ",[417,1621,709],{"style":431},[417,1623,1624,1626,1628,1631,1633,1636,1639,1642,1644,1646,1649,1651,1654,1656,1658,1661,1664,1666,1668,1670,1672,1675,1677,1680,1682,1684,1687,1689,1692,1694,1697,1700,1702,1705,1707,1709,1711,1713],{"class":419,"style":420},[417,1625,531],{"style":431},[417,1627,589],{"style":423},[417,1629,1630],{"style":427},"url ",[417,1632,517],{"style":423},[417,1634,1635],{"style":423},"new ",[417,1637,1638],{"style":435},"URL",[417,1640,1641],{"style":431},"((",[417,1643,188],{"style":427},[417,1645,86],{"style":423},[417,1647,1648],{"style":431},"baseURL ",[417,1650,753],{"style":423},[417,1652,1653],{"style":427},"settings",[417,1655,86],{"style":423},[417,1657,270],{"style":431},[417,1659,1660],{"style":431},") ",[417,1662,1663],{"style":423},"+ ",[417,1665,188],{"style":427},[417,1667,86],{"style":423},[417,1669,219],{"style":431},[417,1671,86],{"style":423},[417,1673,1674],{"style":435},"replace",[417,1676,526],{"style":431},[417,1678,1679],{"style":449},"\u002F\\{(\\w+)\\}\u002Fg",[417,1681,94],{"style":423},[417,1683,526],{"style":431},[417,1685,1686],{"style":431},"_",[417,1688,94],{"style":423},[417,1690,1691],{"style":427},"key",[417,1693,1660],{"style":431},[417,1695,1696],{"style":423},"=> ",[417,1698,1699],{"style":435},"encodeURIComponent",[417,1701,526],{"style":431},[417,1703,1704],{"style":435},"String",[417,1706,526],{"style":431},[417,1708,242],{"style":427},[417,1710,1396],{"style":431},[417,1712,1691],{"style":427},[417,1714,1715],{"style":431},"]))))",[417,1717,1718,1720],{"class":419,"style":420},[417,1719,531],{"style":431},[417,1721,1722],{"style":1500},"\u002F\u002F The default `form` style repeats the key for each array item and sends each object property as its own parameter. Other styles: see Serialize parameters.",[417,1724,1725,1727,1730,1732,1734,1736,1738,1740,1743,1746,1749,1752,1754,1757,1759,1761,1763,1766,1768],{"class":419,"style":420},[417,1726,531],{"style":1500},[417,1728,1729],{"style":423},"for ",[417,1731,526],{"style":431},[417,1733,589],{"style":423},[417,1735,1396],{"style":431},[417,1737,1691],{"style":427},[417,1739,94],{"style":423},[417,1741,1742],{"style":427},"value",[417,1744,1745],{"style":431},"] ",[417,1747,1748],{"style":423},"of ",[417,1750,1751],{"style":435},"Object",[417,1753,86],{"style":423},[417,1755,1756],{"style":435},"entries",[417,1758,526],{"style":431},[417,1760,188],{"style":427},[417,1762,86],{"style":423},[417,1764,1765],{"style":431},"query ",[417,1767,753],{"style":423},[417,1769,1770],{"style":431},"{})) {",[417,1772,1773,1775,1777,1780,1782,1784,1787,1790,1793,1796,1798,1801,1804,1807,1809,1811,1814,1816,1818,1820,1822,1824,1826,1829,1832],{"class":419,"style":420},[417,1774,646],{"style":431},[417,1776,589],{"style":423},[417,1778,1779],{"style":427},"isObject ",[417,1781,517],{"style":423},[417,1783,1202],{"style":423},[417,1785,1786],{"style":427},"value ",[417,1788,1789],{"style":423},"=== ",[417,1791,1792],{"style":449},"'object' ",[417,1794,1795],{"style":423},"&& ",[417,1797,1786],{"style":427},[417,1799,1800],{"style":423},"!== ",[417,1802,1803],{"style":431},"null ",[417,1805,1806],{"style":423},"&& !",[417,1808,875],{"style":435},[417,1810,86],{"style":423},[417,1812,1813],{"style":435},"isArray",[417,1815,526],{"style":431},[417,1817,1742],{"style":427},[417,1819,1660],{"style":431},[417,1821,1806],{"style":423},[417,1823,526],{"style":431},[417,1825,1786],{"style":427},[417,1827,1828],{"style":423},"instanceof ",[417,1830,1831],{"style":435},"Date",[417,1833,558],{"style":431},[417,1835,1836,1838,1840,1842,1844,1846,1848,1850,1853,1855,1857,1859,1861,1863,1865,1867,1869,1871,1873,1875,1878,1880,1882,1884],{"class":419,"style":420},[417,1837,646],{"style":431},[417,1839,1729],{"style":423},[417,1841,526],{"style":431},[417,1843,589],{"style":423},[417,1845,1396],{"style":431},[417,1847,691],{"style":427},[417,1849,94],{"style":423},[417,1851,1852],{"style":427},"entry",[417,1854,1745],{"style":431},[417,1856,1748],{"style":423},[417,1858,1779],{"style":427},[417,1860,1385],{"style":423},[417,1862,1751],{"style":435},[417,1864,86],{"style":423},[417,1866,1756],{"style":435},[417,1868,526],{"style":431},[417,1870,1742],{"style":427},[417,1872,1660],{"style":431},[417,1874,537],{"style":423},[417,1876,1877],{"style":431},"[[",[417,1879,1691],{"style":427},[417,1881,94],{"style":423},[417,1883,1742],{"style":427},[417,1885,1886],{"style":431},"]]) {",[417,1888,1889,1892,1894,1896,1898,1901,1903,1905,1907,1909,1911,1913,1915,1917,1920,1922,1924,1926],{"class":419,"style":420},[417,1890,1891],{"style":431}," ",[417,1893,1729],{"style":423},[417,1895,526],{"style":431},[417,1897,589],{"style":423},[417,1899,1900],{"style":427},"item ",[417,1902,1748],{"style":423},[417,1904,875],{"style":435},[417,1906,86],{"style":423},[417,1908,1813],{"style":435},[417,1910,526],{"style":431},[417,1912,1852],{"style":427},[417,1914,1660],{"style":431},[417,1916,1385],{"style":423},[417,1918,1919],{"style":427},"entry ",[417,1921,537],{"style":423},[417,1923,1396],{"style":431},[417,1925,1852],{"style":427},[417,1927,1928],{"style":431},"]) {",[417,1930,1931,1934,1937,1939,1941,1943,1945,1947,1949,1951,1954,1956,1959,1961,1963,1965,1967,1969,1972],{"class":419,"style":420},[417,1932,1933],{"style":431}," ",[417,1935,1936],{"style":423},"if ",[417,1938,526],{"style":431},[417,1940,1900],{"style":427},[417,1942,1800],{"style":423},[417,1944,1413],{"style":431},[417,1946,1660],{"style":431},[417,1948,219],{"style":427},[417,1950,86],{"style":423},[417,1952,1953],{"style":431},"searchParams",[417,1955,86],{"style":423},[417,1957,1958],{"style":435},"append",[417,1960,526],{"style":431},[417,1962,691],{"style":427},[417,1964,94],{"style":423},[417,1966,1704],{"style":435},[417,1968,526],{"style":431},[417,1970,1971],{"style":427},"item",[417,1973,1974],{"style":431},"))",[417,1976,1977],{"class":419,"style":420},[417,1978,1979],{"style":431}," }",[417,1981,1982],{"class":419,"style":420},[417,1983,1984],{"style":431}," }",[417,1986,1987],{"class":419,"style":420},[417,1988,1989],{"style":431}," }",[417,1991,1992,1994,1996,1999,2001,2003,2005,2007,2009,2011,2013,2016,2018],{"class":419,"style":420},[417,1993,531],{"style":431},[417,1995,589],{"style":423},[417,1997,1998],{"style":427},"cookie ",[417,2000,517],{"style":423},[417,2002,1751],{"style":435},[417,2004,86],{"style":423},[417,2006,1756],{"style":435},[417,2008,526],{"style":431},[417,2010,188],{"style":427},[417,2012,86],{"style":423},[417,2014,2015],{"style":431},"cookies ",[417,2017,753],{"style":423},[417,2019,2020],{"style":431},"{})",[417,2022,2023,2025,2027,2030,2033,2035,2037,2040,2042,2044,2047,2050],{"class":419,"style":420},[417,2024,646],{"style":431},[417,2026,86],{"style":423},[417,2028,2029],{"style":435},"filter",[417,2031,2032],{"style":431},"(([",[417,2034,94],{"style":423},[417,2036,1742],{"style":427},[417,2038,2039],{"style":431},"]) ",[417,2041,1696],{"style":423},[417,2043,1786],{"style":427},[417,2045,2046],{"style":423},"!= ",[417,2048,2049],{"style":431},"null",[417,2051,558],{"style":431},[417,2053,2054,2056,2058,2061,2063,2065,2067,2069,2071,2073,2076,2079,2081,2083,2086,2088,2090,2092,2094,2096,2098,2100,2102,2104],{"class":419,"style":420},[417,2055,646],{"style":431},[417,2057,86],{"style":423},[417,2059,2060],{"style":435},"map",[417,2062,2032],{"style":431},[417,2064,691],{"style":427},[417,2066,94],{"style":423},[417,2068,1742],{"style":427},[417,2070,2039],{"style":431},[417,2072,1696],{"style":423},[417,2074,2075],{"style":449},"`",[417,2077,2078],{"style":427},"${",[417,2080,691],{"style":427},[417,2082,709],{"style":427},[417,2084,2085],{"style":449},"=",[417,2087,2078],{"style":427},[417,2089,1699],{"style":435},[417,2091,526],{"style":431},[417,2093,1704],{"style":435},[417,2095,526],{"style":431},[417,2097,1742],{"style":427},[417,2099,1974],{"style":431},[417,2101,709],{"style":427},[417,2103,2075],{"style":449},[417,2105,558],{"style":431},[417,2107,2108,2110,2112,2115,2117,2120],{"class":419,"style":420},[417,2109,646],{"style":431},[417,2111,86],{"style":423},[417,2113,2114],{"style":435},"join",[417,2116,526],{"style":431},[417,2118,2119],{"style":449},"'; '",[417,2121,558],{"style":431},[417,2123,2124,2126],{"class":419,"style":420},[417,2125,531],{"style":431},[417,2127,2128],{"style":1500},"\u002F\u002F `Headers` matches names in any case, so a caller's `content-type` or `authorization` still wins.",[417,2130,2131,2133,2135,2138,2140,2142,2145,2147,2149,2151,2153,2156,2158,2160,2162,2164,2166,2168],{"class":419,"style":420},[417,2132,531],{"style":1500},[417,2134,589],{"style":423},[417,2136,2137],{"style":427},"headers ",[417,2139,517],{"style":423},[417,2141,1635],{"style":423},[417,2143,2144],{"style":435},"Headers",[417,2146,526],{"style":431},[417,2148,188],{"style":427},[417,2150,86],{"style":423},[417,2152,2137],{"style":431},[417,2154,2155],{"style":423},"as ",[417,2157,893],{"style":435},[417,2159,505],{"style":423},[417,2161,831],{"style":427},[417,2163,94],{"style":423},[417,2165,831],{"style":427},[417,2167,523],{"style":423},[417,2169,558],{"style":431},[417,2171,2172,2174,2176,2178,2180,2182,2185,2187,2190,2192,2194,2196,2199,2201,2204,2207,2209,2211,2214,2216,2218,2220,2223],{"class":419,"style":420},[417,2173,531],{"style":431},[417,2175,1936],{"style":423},[417,2177,526],{"style":431},[417,2179,188],{"style":427},[417,2181,86],{"style":423},[417,2183,2184],{"style":431},"body ",[417,2186,1800],{"style":423},[417,2188,2189],{"style":431},"undefined ",[417,2191,1806],{"style":423},[417,2193,248],{"style":427},[417,2195,86],{"style":423},[417,2197,2198],{"style":435},"has",[417,2200,526],{"style":431},[417,2202,2203],{"style":449},"'Content-Type'",[417,2205,2206],{"style":431},")) ",[417,2208,248],{"style":427},[417,2210,86],{"style":423},[417,2212,2213],{"style":435},"set",[417,2215,526],{"style":431},[417,2217,2203],{"style":449},[417,2219,94],{"style":423},[417,2221,2222],{"style":449},"'application\u002Fjson'",[417,2224,558],{"style":431},[417,2226,2227,2229],{"class":419,"style":420},[417,2228,531],{"style":431},[417,2230,2231],{"style":1500},"\u002F\u002F On the server this adds to the caller's cookies. Browsers drop a script-set `Cookie` header and send their own.",[417,2233,2234,2236,2238,2240,2243,2245,2247,2249,2251,2253,2256,2258,2260,2262,2264,2267,2269,2271,2273,2275,2277,2279,2281,2283,2285,2288,2290,2292,2294,2296,2298],{"class":419,"style":420},[417,2235,531],{"style":1500},[417,2237,1936],{"style":423},[417,2239,526],{"style":431},[417,2241,2242],{"style":427},"cookie",[417,2244,1660],{"style":431},[417,2246,248],{"style":427},[417,2248,86],{"style":423},[417,2250,2213],{"style":435},[417,2252,526],{"style":431},[417,2254,2255],{"style":449},"'Cookie'",[417,2257,94],{"style":423},[417,2259,1396],{"style":431},[417,2261,248],{"style":427},[417,2263,86],{"style":423},[417,2265,2266],{"style":435},"get",[417,2268,526],{"style":431},[417,2270,2255],{"style":449},[417,2272,558],{"style":431},[417,2274,94],{"style":423},[417,2276,2242],{"style":427},[417,2278,1403],{"style":431},[417,2280,86],{"style":423},[417,2282,2029],{"style":435},[417,2284,526],{"style":431},[417,2286,2287],{"style":435},"Boolean",[417,2289,558],{"style":431},[417,2291,86],{"style":423},[417,2293,2114],{"style":435},[417,2295,526],{"style":431},[417,2297,2119],{"style":449},[417,2299,1974],{"style":431},[417,2301],{"class":419,"style":420},[417,2303,2304,2306,2308,2311,2313,2316,2318,2320,2322,2324],{"class":419,"style":420},[417,2305,531],{"style":431},[417,2307,589],{"style":423},[417,2309,2310],{"style":427},"response ",[417,2312,517],{"style":423},[417,2314,2315],{"style":423},"await ",[417,2317,796],{"style":435},[417,2319,526],{"style":431},[417,2321,219],{"style":427},[417,2323,94],{"style":423},[417,2325,582],{"style":431},[417,2327,2328,2330,2332,2334,2336,2338,2340],{"class":419,"style":420},[417,2329,646],{"style":431},[417,2331,216],{"style":431},[417,2333,537],{"style":423},[417,2335,188],{"style":427},[417,2337,86],{"style":423},[417,2339,216],{"style":431},[417,2341,553],{"style":423},[417,2343,2344,2346,2348],{"class":419,"style":420},[417,2345,646],{"style":423},[417,2347,248],{"style":427},[417,2349,553],{"style":423},[417,2351,2352,2354,2356,2358,2360,2362,2364,2366,2368,2370,2372,2374,2377,2379,2382,2384,2386,2388,2390,2392],{"class":419,"style":420},[417,2353,646],{"style":423},[417,2355,254],{"style":431},[417,2357,537],{"style":423},[417,2359,188],{"style":427},[417,2361,86],{"style":423},[417,2363,2184],{"style":431},[417,2365,1789],{"style":423},[417,2367,2189],{"style":431},[417,2369,1385],{"style":423},[417,2371,2189],{"style":431},[417,2373,537],{"style":423},[417,2375,2376],{"style":431},"JSON",[417,2378,86],{"style":423},[417,2380,2381],{"style":435},"stringify",[417,2383,526],{"style":431},[417,2385,188],{"style":427},[417,2387,86],{"style":423},[417,2389,254],{"style":431},[417,2391,558],{"style":431},[417,2393,553],{"style":423},[417,2395,2396,2398,2400,2402,2404,2406,2408],{"class":419,"style":420},[417,2397,646],{"style":423},[417,2399,400],{"style":431},[417,2401,537],{"style":423},[417,2403,188],{"style":427},[417,2405,86],{"style":423},[417,2407,400],{"style":431},[417,2409,553],{"style":423},[417,2411,2412,2414],{"class":419,"style":420},[417,2413,531],{"style":423},[417,2415,764],{"style":431},[417,2417,2418,2420,2422,2424,2426,2428,2430,2432,2435,2438,2440,2443,2446,2448,2450],{"class":419,"style":420},[417,2419,531],{"style":431},[417,2421,589],{"style":423},[417,2423,2184],{"style":427},[417,2425,517],{"style":423},[417,2427,2315],{"style":423},[417,2429,344],{"style":427},[417,2431,86],{"style":423},[417,2433,2434],{"style":435},"json",[417,2436,2437],{"style":431},"()",[417,2439,86],{"style":423},[417,2441,2442],{"style":435},"catch",[417,2444,2445],{"style":431},"(() ",[417,2447,1696],{"style":423},[417,2449,1413],{"style":431},[417,2451,558],{"style":431},[417,2453],{"class":419,"style":420},[417,2455,2456,2458,2460,2462,2464,2466,2469,2471,2473,2475,2477,2479,2481,2483,2485,2487,2489,2491,2493],{"class":419,"style":420},[417,2457,531],{"style":431},[417,2459,1936],{"style":423},[417,2461,526],{"style":431},[417,2463,344],{"style":427},[417,2465,86],{"style":423},[417,2467,2468],{"style":431},"ok",[417,2470,1660],{"style":431},[417,2472,625],{"style":423},[417,2474,432],{"style":431},[417,2476,175],{"style":431},[417,2478,537],{"style":423},[417,2480,254],{"style":427},[417,2482,94],{"style":423},[417,2484,1408],{"style":431},[417,2486,537],{"style":423},[417,2488,1413],{"style":431},[417,2490,94],{"style":423},[417,2492,2310],{"style":427},[417,2494,709],{"style":431},[417,2496,2497,2499,2501,2503,2505,2507,2509,2511,2513,2515,2518,2520,2523,2525,2528,2530,2532,2534,2537,2539,2541],{"class":419,"style":420},[417,2498,531],{"style":431},[417,2500,1936],{"style":423},[417,2502,526],{"style":431},[417,2504,188],{"style":427},[417,2506,86],{"style":423},[417,2508,750],{"style":431},[417,2510,753],{"style":423},[417,2512,520],{"style":431},[417,2514,1660],{"style":431},[417,2516,2517],{"style":423},"throw ",[417,2519,1635],{"style":423},[417,2521,2522],{"style":435},"Error",[417,2524,526],{"style":431},[417,2526,2527],{"style":449},"`Request failed with status ",[417,2529,2078],{"style":427},[417,2531,344],{"style":427},[417,2533,86],{"style":423},[417,2535,2536],{"style":431},"status",[417,2538,709],{"style":427},[417,2540,2075],{"style":449},[417,2542,558],{"style":431},[417,2544,2545,2547,2549,2551,2553,2555,2557,2559,2561,2563,2565,2567,2569,2571,2573,2575,2577,2580,2582,2584,2586],{"class":419,"style":420},[417,2546,531],{"style":431},[417,2548,625],{"style":423},[417,2550,432],{"style":431},[417,2552,175],{"style":431},[417,2554,537],{"style":423},[417,2556,1413],{"style":431},[417,2558,94],{"style":423},[417,2560,1408],{"style":431},[417,2562,537],{"style":423},[417,2564,2184],{"style":427},[417,2566,753],{"style":423},[417,2568,432],{"style":431},[417,2570,2536],{"style":431},[417,2572,537],{"style":423},[417,2574,344],{"style":427},[417,2576,86],{"style":423},[417,2578,2579],{"style":431},"status ",[417,2581,709],{"style":431},[417,2583,94],{"style":423},[417,2585,2310],{"style":427},[417,2587,709],{"style":431},[417,2589,2590],{"class":419,"style":420},[417,2591,709],{"style":431},[417,2593],{"class":419,"style":420},[417,2595,2596],{"class":419,"style":420},[417,2597,2598],{"style":1500},"\u002F\u002F Generated functions pass their responses type and `ThrowOnError`.",[417,2600,2601,2603,2605,2607,2610,2612,2614,2616,2618,2620,2622,2624,2626,2628,2630,2632,2634,2636],{"class":419,"style":420},[417,2602,496],{"style":423},[417,2604,589],{"style":423},[417,2606,483],{"style":427},[417,2608,2609],{"style":423},"= \u003C",[417,2611,1358],{"style":435},[417,2613,94],{"style":423},[417,2615,508],{"style":435},[417,2617,511],{"style":423},[417,2619,514],{"style":435},[417,2621,517],{"style":423},[417,2623,520],{"style":431},[417,2625,523],{"style":423},[417,2627,526],{"style":431},[417,2629,188],{"style":427},[417,2631,537],{"style":427},[417,2633,142],{"style":435},[417,2635,1660],{"style":431},[417,2637,2638],{"style":423},"=>",[417,2640,2641,2643,2645,2647,2649,2651,2653,2655,2657,2659,2661,2663,2665,2667],{"class":419,"style":420},[417,2642,531],{"style":423},[417,2644,800],{"style":435},[417,2646,526],{"style":431},[417,2648,188],{"style":427},[417,2650,1660],{"style":431},[417,2652,2155],{"style":423},[417,2654,563],{"style":435},[417,2656,505],{"style":423},[417,2658,72],{"style":435},[417,2660,505],{"style":423},[417,2662,1358],{"style":435},[417,2664,94],{"style":423},[417,2666,548],{"style":435},[417,2668,912],{"style":423},[11,2670,374,2671,2675],{},[294,2672,2674],{"href":2673},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Ftree\u002Fmain\u002Fexamples\u002Fclient","example project"," adds a base URL setter and an async auth hook.",[788,2677,2679,2682,2795],{"label":2678},"On the shared runtime",[11,2680,2681],{},"Reuse the request pipeline of the fetch and axios clients and write only the transport:",[2683,2684,2685,2719,2745,2766,2782],"ol",{},[2686,2687,2688,2689,94,2692,94,2695,94,2698,94,2701,2704,2705,779,2708,2711,2712,2715,2716,86],"li",{},"Copy ",[15,2690,2691],{},"core.ts",[15,2693,2694],{},"mediaTypes.ts",[15,2696,2697],{},"serializers.ts",[15,2699,2700],{},"standardSchema.ts",[15,2702,2703],{},"sse.ts",", and the ",[15,2706,2707],{},"mediaTypes\u002F",[15,2709,2710],{},"serializers\u002F"," files your spec needs from ",[15,2713,2714],{},"@kubb\u002Fplugin-client\u002Ftemplates"," next to your ",[15,2717,2718],{},"client.ts",[2686,2720,2721,2722,2724,2725,94,2728,2731,2732,2735,2736,94,2739,2731,2742,86],{},"In ",[15,2723,2718],{},", export the ",[15,2726,2727],{},"NativeRequest",[15,2729,2730],{},"NativeResponse",", and ",[15,2733,2734],{},"NativeOptions"," types the core imports. On fetch they are ",[15,2737,2738],{},"Request",[15,2740,2741],{},"Response",[15,2743,2744],{},"RequestInit",[2686,2746,2747,2748,2751,2752,2755,2756,2758,2759,2762,2763,2765],{},"Write a ",[15,2749,2750],{},"Transport"," function that sends a ",[15,2753,2754],{},"ResolvedRequest"," and returns a web ",[15,2757,2741],{},". Wrap other results in ",[15,2760,2761],{},"new Response(bytes, { status, headers })",". For a 204, 205, or 304 status, pass ",[15,2764,2049],{}," as the body, or the constructor throws.",[2686,2767,2768,2769,2772,2773,2775,2776,779,2779,86],{},"Export ",[15,2770,2771],{},"createLazyClient((config) => createClientCore({ defaultTransport, ...config }))"," as ",[15,2774,57],{},", and add ",[15,2777,2778],{},"export * from '.\u002Fcore.ts'",[15,2780,2781],{},"export * from '.\u002Fsse.ts'",[2686,2783,2784,2785,2788,2789,779,2792,2794],{},"Register what the core does not ship: ",[15,2786,2787],{},"client.setConfig({ mediaTypes: { 'multipart\u002Fform-data': multipartFormData, ...streamMediaTypes }, serializer: { query: serializeQuery, path: serializePath } })",". Add ",[15,2790,2791],{},"header",[15,2793,2242],{}," serializers when the spec has such parameters.",[11,2796,2797,2803],{},[294,2798,2800],{"href":2799},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Fblob\u002Fmain\u002Fpackages\u002Fplugin-fetch\u002Ftemplates\u002Fclient.ts",[15,2801,2802],{},"@kubb\u002Fplugin-fetch\u002Ftemplates\u002Fclient.ts"," is a complete example.",[24,2805,297],{"id":2806},"authenticate",[11,2808,2809,2810,2812],{},"The plugin sends no credentials. Each call passes the operation's security requirements as ",[15,2811,286],{},", and your client decides what to send:",[407,2814,2816],{"language":409,"code":2815,"class":412},"security: [{ type: 'apiKey', name: 'api_key', in: 'header' }, { type: 'oauth2' }]",[15,2817,2818],{"class":415},[417,2819,2820,2822,2824,2826,2828,2830,2832,2834,2836,2838,2840,2842,2844,2846,2848,2850,2852,2854,2856,2858,2860],{"class":419,"style":420},[417,2821,286],{"style":427},[417,2823,537],{"style":423},[417,2825,678],{"style":431},[417,2827,681],{"style":431},[417,2829,537],{"style":423},[417,2831,686],{"style":449},[417,2833,94],{"style":423},[417,2835,691],{"style":431},[417,2837,537],{"style":423},[417,2839,696],{"style":449},[417,2841,94],{"style":423},[417,2843,701],{"style":423},[417,2845,537],{"style":423},[417,2847,706],{"style":449},[417,2849,709],{"style":431},[417,2851,94],{"style":423},[417,2853,432],{"style":431},[417,2855,681],{"style":431},[417,2857,537],{"style":423},[417,2859,720],{"style":449},[417,2861,723],{"style":431},[32,2863,2864,2874],{},[35,2865,2866],{},[38,2867,2868,2871],{},[41,2869,2870],{},"Shape",[41,2872,2873],{},"Meaning",[48,2875,2876,2887,2895,2903,2925,2939],{},[38,2877,2878,2884],{},[53,2879,2880,2881,2883],{},"No ",[15,2882,286],{}," field",[53,2885,2886],{},"The operation is public. Skip auth.",[38,2888,2889,2892],{},[53,2890,2891],{},"One entry per requirement",[53,2893,2894],{},"Meeting one requirement is enough.",[38,2896,2897,2900],{},[53,2898,2899],{},"An array inside the list",[53,2901,2902],{},"One requirement needs these schemes together, such as an API key and a session cookie. Send all of them.",[38,2904,2905,2913],{},[53,2906,2907,2910,2911],{},[15,2908,2909],{},"type: 'http'"," with ",[15,2912,838],{},[53,2914,2915,2918,2919,2922,2923,86],{},[15,2916,2917],{},"'bearer'"," or ",[15,2920,2921],{},"'basic'",". Other HTTP schemes arrive as ",[15,2924,2917],{},[38,2926,2927,2936],{},[53,2928,2929,2910,2932,94,2934],{},[15,2930,2931],{},"type: 'oauth2'",[15,2933,888],{},[15,2935,919],{},[53,2937,2938],{},"The flow URLs to get a token.",[38,2940,2941,2948],{},[53,2942,2943,2910,2946],{},[15,2944,2945],{},"type: 'openIdConnect'",[15,2947,219],{},[53,2949,2950],{},"The discovery URL.",[11,2952,2953],{},"Await a token before the request, so it can come from a secrets store or a refresh call:",[2955,2956,2957,3188],"code-group",{},[407,2958,2960],{"language":409,"filename":804,"code":2959,"class":412},"type GetToken = () => Promise\u003Cstring | undefined>\n\nlet getToken: GetToken | undefined\n\nexport function setAuth(resolve: GetToken) {\n getToken = resolve\n}\n\n\u002F\u002F inside send(), after `headers` and before fetch(). This sends bearer tokens only, not API keys or basic credentials.\nconst bearer = config.security?.flat().some((auth) => auth.type !== 'apiKey' && auth.scheme !== 'basic')\nconst token = bearer ? await getToken?.() : undefined\nif (token && !headers.has('Authorization')) headers.set('Authorization', `Bearer ${token}`)",[15,2961,2962,451,2988,451,2990,451,3006,451,3008,451,3029,451,3040,451,3044,451,3046,451,3051,451,3114,451,3139],{"class":415},[417,2963,2964,2966,2969,2971,2974,2976,2978,2980,2982,2984,2986],{"class":419,"style":420},[417,2965,428],{"style":423},[417,2967,2968],{"style":435},"GetToken ",[417,2970,517],{"style":423},[417,2972,2973],{"style":431},"() ",[417,2975,1696],{"style":423},[417,2977,563],{"style":435},[417,2979,505],{"style":423},[417,2981,1122],{"style":427},[417,2983,966],{"style":423},[417,2985,1413],{"style":431},[417,2987,523],{"style":423},[417,2989],{"class":419,"style":420},[417,2991,2992,2995,2998,3000,3002,3004],{"class":419,"style":420},[417,2993,2994],{"style":423},"let ",[417,2996,2997],{"style":427},"getToken",[417,2999,537],{"style":427},[417,3001,2968],{"style":435},[417,3003,966],{"style":423},[417,3005,1413],{"style":431},[417,3007],{"class":419,"style":420},[417,3009,3010,3012,3014,3017,3019,3022,3024,3027],{"class":419,"style":420},[417,3011,496],{"style":423},[417,3013,499],{"style":423},[417,3015,3016],{"style":435},"setAuth",[417,3018,526],{"style":431},[417,3020,3021],{"style":427},"resolve",[417,3023,537],{"style":427},[417,3025,3026],{"style":435},"GetToken",[417,3028,1586],{"style":431},[417,3030,3031,3033,3036,3038],{"class":419,"style":420},[417,3032,531],{"style":431},[417,3034,3035],{"style":427},"getToken ",[417,3037,517],{"style":423},[417,3039,3021],{"style":427},[417,3041,3042],{"class":419,"style":420},[417,3043,709],{"style":431},[417,3045],{"class":419,"style":420},[417,3047,3048],{"class":419,"style":420},[417,3049,3050],{"style":1500},"\u002F\u002F inside send(), after `headers` and before fetch(). This sends bearer tokens only, not API keys or basic credentials.",[417,3052,3053,3055,3058,3060,3062,3064,3066,3069,3072,3074,3076,3079,3081,3084,3086,3088,3090,3092,3094,3096,3099,3101,3103,3105,3108,3110,3112],{"class":419,"style":420},[417,3054,589],{"style":423},[417,3056,3057],{"style":427},"bearer ",[417,3059,517],{"style":423},[417,3061,188],{"style":427},[417,3063,86],{"style":423},[417,3065,286],{"style":431},[417,3067,3068],{"style":423},"?.",[417,3070,3071],{"style":435},"flat",[417,3073,2437],{"style":431},[417,3075,86],{"style":423},[417,3077,3078],{"style":435},"some",[417,3080,1641],{"style":431},[417,3082,3083],{"style":427},"auth",[417,3085,1660],{"style":431},[417,3087,1696],{"style":423},[417,3089,3083],{"style":427},[417,3091,86],{"style":423},[417,3093,428],{"style":431},[417,3095,1800],{"style":423},[417,3097,3098],{"style":449},"'apiKey' ",[417,3100,1795],{"style":423},[417,3102,3083],{"style":427},[417,3104,86],{"style":423},[417,3106,3107],{"style":431},"scheme ",[417,3109,1800],{"style":423},[417,3111,2921],{"style":449},[417,3113,558],{"style":431},[417,3115,3116,3118,3121,3123,3125,3127,3129,3131,3133,3135,3137],{"class":419,"style":420},[417,3117,589],{"style":423},[417,3119,3120],{"style":427},"token ",[417,3122,517],{"style":423},[417,3124,3057],{"style":427},[417,3126,1385],{"style":423},[417,3128,2315],{"style":423},[417,3130,2997],{"style":427},[417,3132,3068],{"style":423},[417,3134,2973],{"style":431},[417,3136,537],{"style":423},[417,3138,1413],{"style":431},[417,3140,3141,3143,3145,3147,3149,3151,3153,3155,3157,3160,3162,3164,3166,3168,3170,3172,3174,3177,3179,3182,3184,3186],{"class":419,"style":420},[417,3142,1936],{"style":423},[417,3144,526],{"style":431},[417,3146,3120],{"style":427},[417,3148,1806],{"style":423},[417,3150,248],{"style":427},[417,3152,86],{"style":423},[417,3154,2198],{"style":435},[417,3156,526],{"style":431},[417,3158,3159],{"style":449},"'Authorization'",[417,3161,2206],{"style":431},[417,3163,248],{"style":427},[417,3165,86],{"style":423},[417,3167,2213],{"style":435},[417,3169,526],{"style":431},[417,3171,3159],{"style":449},[417,3173,94],{"style":423},[417,3175,3176],{"style":449},"`Bearer ",[417,3178,2078],{"style":427},[417,3180,3181],{"style":427},"token",[417,3183,709],{"style":427},[417,3185,2075],{"style":449},[417,3187,558],{"style":431},[407,3189,3192],{"language":409,"filename":3190,"code":3191,"class":412},"src\u002Findex.ts","import { setAuth } from '.\u002Fclient'\n\nsetAuth(async () => readTokenFromSecretsStore())",[15,3193,3194,451,3210,451,3212],{"class":415},[417,3195,3196,3198,3200,3203,3205,3207],{"class":419,"style":420},[417,3197,424],{"style":423},[417,3199,432],{"style":431},[417,3201,3202],{"style":427},"setAuth ",[417,3204,443],{"style":431},[417,3206,446],{"style":423},[417,3208,3209],{"style":449},"'.\u002Fclient'",[417,3211],{"class":419,"style":420},[417,3213,3214,3216,3218,3220,3222,3224,3227],{"class":419,"style":420},[417,3215,3016],{"style":435},[417,3217,526],{"style":431},[417,3219,1571],{"style":423},[417,3221,2973],{"style":431},[417,3223,1696],{"style":423},[417,3225,3226],{"style":435},"readTokenFromSecretsStore",[417,3228,3229],{"style":431},"())",[11,3231,3232,3233,3235],{},"For request signing, such as AWS SigV4, pass a different ",[15,3234,57],{}," on the call:",[407,3237,3239],{"language":409,"code":3238,"class":412},"await getPetById({ path: { petId: 1 }, client: createSignedClient() })",[15,3240,3241],{"class":415},[417,3242,3243,3245,3247,3250,3252,3254,3256,3259,3261,3264,3266,3268,3270,3272,3275],{"class":419,"style":420},[417,3244,2315],{"style":423},[417,3246,502],{"style":435},[417,3248,3249],{"style":431},"({ ",[417,3251,242],{"style":431},[417,3253,537],{"style":423},[417,3255,432],{"style":431},[417,3257,3258],{"style":431},"petId",[417,3260,537],{"style":423},[417,3262,3263],{"style":431},"1 ",[417,3265,709],{"style":431},[417,3267,94],{"style":423},[417,3269,57],{"style":431},[417,3271,537],{"style":423},[417,3273,3274],{"style":435},"createSignedClient",[417,3276,3277],{"style":431},"() })",[24,3279,326],{"id":3280},"serialize-parameters",[11,3282,3283,3284,94,3286,94,3288,317,3290,3292,3293,3295],{},"When the spec sets ",[15,3285,310],{},[15,3287,313],{},[15,3289,316],{},[15,3291,320],{}," on a parameter, the call passes ",[15,3294,304],{},", grouped by location and keyed by parameter name:",[407,3297,3299],{"language":409,"code":3298,"class":412},"styles: {\n path: { petId: { style: 'matrix', explode: true } },\n query: { tags: { style: 'pipeDelimited', explode: false } },\n}",[15,3300,3301,451,3309,451,3346,451,3383],{"class":415},[417,3302,3303,3305,3307],{"class":419,"style":420},[417,3304,304],{"style":431},[417,3306,537],{"style":423},[417,3308,582],{"style":431},[417,3310,3311,3313,3315,3317,3319,3321,3323,3325,3327,3329,3332,3334,3336,3338,3341,3344],{"class":419,"style":420},[417,3312,531],{"style":431},[417,3314,242],{"style":431},[417,3316,537],{"style":423},[417,3318,432],{"style":431},[417,3320,3258],{"style":431},[417,3322,537],{"style":423},[417,3324,432],{"style":431},[417,3326,310],{"style":431},[417,3328,537],{"style":423},[417,3330,3331],{"style":449},"'matrix'",[417,3333,94],{"style":423},[417,3335,313],{"style":431},[417,3337,537],{"style":423},[417,3339,3340],{"style":431},"true ",[417,3342,3343],{"style":431},"} }",[417,3345,553],{"style":423},[417,3347,3348,3350,3352,3354,3356,3359,3361,3363,3365,3367,3370,3372,3374,3376,3379,3381],{"class":419,"style":420},[417,3349,531],{"style":423},[417,3351,245],{"style":431},[417,3353,537],{"style":423},[417,3355,432],{"style":431},[417,3357,3358],{"style":431},"tags",[417,3360,537],{"style":423},[417,3362,432],{"style":431},[417,3364,310],{"style":431},[417,3366,537],{"style":423},[417,3368,3369],{"style":449},"'pipeDelimited'",[417,3371,94],{"style":423},[417,3373,313],{"style":431},[417,3375,537],{"style":423},[417,3377,3378],{"style":431},"false ",[417,3380,3343],{"style":431},[417,3382,553],{"style":423},[417,3384,3385],{"class":419,"style":420},[417,3386,709],{"style":431},[3388,3389,3390,3401,3407,3413],"ul",{},[2686,3391,3392,3393,3396,3397,3400],{},"A parameter without an entry uses its location's default: ",[15,3394,3395],{},"form"," for query and cookie, ",[15,3398,3399],{},"simple"," for path and header.",[2686,3402,3403,3404,3406],{},"The shared runtime's ",[15,3405,2697],{}," applies every style.",[2686,3408,3409,3410,3412],{},"A client written from scratch applies them itself, or ignores ",[15,3411,304],{}," when the spec only uses the defaults.",[2686,3414,292,3415,3419,3420,3422],{},[294,3416,3418],{"href":3417},"#cookie-parameters-with-the-cookie-style","Cookie parameters with the cookie style"," for the OpenAPI 3.2 ",[15,3421,2242],{}," style.",[11,3424,374,3425,3429],{},[294,3426,3428],{"href":3427},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserialization","plugin-fetch serialization guide"," shows the output of each style.",[24,3431,3433],{"id":3432},"register-it","Register it",[11,3435,3436,3437,3439],{},"Point ",[15,3438,17],{}," at the module, resolved from the generated files:",[407,3441,3444],{"language":409,"filename":3442,"code":3443,"class":412},"kubb.config.ts","import { defineConfig } from 'kubb\u002Fconfig'\nimport { pluginTs } from '@kubb\u002Fplugin-ts'\nimport { pluginClient } from '@kubb\u002Fplugin-client'\n\nexport default defineConfig({\n input: '.\u002FpetStore.yaml',\n output: { path: '.\u002Fsrc\u002Fgen' },\n plugins: [\n pluginTs(),\n pluginClient({ group: { type: 'tag' }, importPath: '..\u002F..\u002F..\u002Fclient' }),\n ],\n})",[15,3445,3446,451,3462,451,3478,451,3494,451,3496,451,3508,451,3522,451,3544,451,3555,451,3566,451,3604,451,3612],{"class":415},[417,3447,3448,3450,3452,3455,3457,3459],{"class":419,"style":420},[417,3449,424],{"style":423},[417,3451,432],{"style":431},[417,3453,3454],{"style":427},"defineConfig ",[417,3456,443],{"style":431},[417,3458,446],{"style":423},[417,3460,3461],{"style":449},"'kubb\u002Fconfig'",[417,3463,3464,3466,3468,3471,3473,3475],{"class":419,"style":420},[417,3465,424],{"style":423},[417,3467,432],{"style":431},[417,3469,3470],{"style":427},"pluginTs ",[417,3472,443],{"style":431},[417,3474,446],{"style":423},[417,3476,3477],{"style":449},"'@kubb\u002Fplugin-ts'",[417,3479,3480,3482,3484,3487,3489,3491],{"class":419,"style":420},[417,3481,424],{"style":423},[417,3483,432],{"style":431},[417,3485,3486],{"style":427},"pluginClient ",[417,3488,443],{"style":431},[417,3490,446],{"style":423},[417,3492,3493],{"style":449},"'@kubb\u002Fplugin-client'",[417,3495],{"class":419,"style":420},[417,3497,3498,3500,3503,3506],{"class":419,"style":420},[417,3499,496],{"style":423},[417,3501,3502],{"style":423},"default ",[417,3504,3505],{"style":435},"defineConfig",[417,3507,641],{"style":431},[417,3509,3510,3512,3515,3517,3520],{"class":419,"style":420},[417,3511,531],{"style":431},[417,3513,3514],{"style":431},"input",[417,3516,537],{"style":423},[417,3518,3519],{"style":449},"'.\u002FpetStore.yaml'",[417,3521,553],{"style":423},[417,3523,3524,3526,3529,3531,3533,3535,3537,3540,3542],{"class":419,"style":420},[417,3525,531],{"style":423},[417,3527,3528],{"style":431},"output",[417,3530,537],{"style":423},[417,3532,432],{"style":431},[417,3534,242],{"style":431},[417,3536,537],{"style":423},[417,3538,3539],{"style":449},"'.\u002Fsrc\u002Fgen' ",[417,3541,709],{"style":431},[417,3543,553],{"style":423},[417,3545,3546,3548,3551,3553],{"class":419,"style":420},[417,3547,531],{"style":423},[417,3549,3550],{"style":431},"plugins",[417,3552,537],{"style":423},[417,3554,1396],{"style":431},[417,3556,3557,3559,3562,3564],{"class":419,"style":420},[417,3558,646],{"style":431},[417,3560,3561],{"style":435},"pluginTs",[417,3563,2437],{"style":431},[417,3565,553],{"style":423},[417,3567,3568,3570,3573,3575,3578,3580,3582,3584,3586,3589,3591,3593,3595,3597,3600,3602],{"class":419,"style":420},[417,3569,646],{"style":423},[417,3571,3572],{"style":435},"pluginClient",[417,3574,3249],{"style":431},[417,3576,3577],{"style":431},"group",[417,3579,537],{"style":423},[417,3581,432],{"style":431},[417,3583,681],{"style":431},[417,3585,537],{"style":423},[417,3587,3588],{"style":449},"'tag' ",[417,3590,709],{"style":431},[417,3592,94],{"style":423},[417,3594,17],{"style":431},[417,3596,537],{"style":423},[417,3598,3599],{"style":449},"'..\u002F..\u002F..\u002Fclient' ",[417,3601,764],{"style":431},[417,3603,553],{"style":423},[417,3605,3606,3608,3610],{"class":419,"style":420},[417,3607,531],{"style":423},[417,3609,1403],{"style":431},[417,3611,553],{"style":423},[417,3613,3614],{"class":419,"style":420},[417,3615,764],{"style":431},[11,3617,3618,3619,3622,3623,3626,3627,3629,3630,3632],{},"Run ",[15,3620,3621],{},"npx kubb generate",", then ",[15,3624,3625],{},"npx tsc --noEmit",". A missing export or ",[15,3628,142],{}," field shows up as a compile error in the generated files. With a relative ",[15,3631,17],{},", the query plugins resolve it from the same generated file, so one path serves both.",[24,3634,3636],{"id":3635},"less-common-cases","Less common cases",[3638,3639,3418],"h3",{"id":3640},"cookie-parameters-with-the-cookie-style",[11,3642,3643,3644,3646,3647,3650,3651,3653],{},"When a cookie parameter sets the OpenAPI 3.2 ",[15,3645,2242],{}," style, the call passes ",[15,3648,3649],{},"style: 'cookie'"," in ",[15,3652,304],{},":",[407,3655,3657],{"language":409,"code":3656,"class":412},"styles: { cookie: { session: { style: 'cookie' } } }",[15,3658,3659],{"class":415},[417,3660,3661,3663,3665,3667,3669,3671,3673,3676,3678,3680,3682,3684,3687],{"class":419,"style":420},[417,3662,304],{"style":431},[417,3664,537],{"style":423},[417,3666,432],{"style":431},[417,3668,2242],{"style":431},[417,3670,537],{"style":423},[417,3672,432],{"style":431},[417,3674,3675],{"style":431},"session",[417,3677,537],{"style":423},[417,3679,432],{"style":431},[417,3681,310],{"style":431},[417,3683,537],{"style":423},[417,3685,3686],{"style":449},"'cookie' ",[417,3688,3689],{"style":431},"} } }",[3388,3691,3692,3695,3704],{},[2686,3693,3694],{},"Send its values without percent-encoding.",[2686,3696,3697,3698,3700,3701,3703],{},"OpenAPI 3.2 defaults ",[15,3699,313],{}," to ",[15,3702,520],{}," for this style.",[2686,3705,3706,3707,3710],{},"The shared runtime throws a ",[15,3708,3709],{},"TypeError"," when a value has characters a cookie cannot carry.",{"title":3712,"searchDepth":3713,"depth":3713,"links":3714},"",5,[3715,3717,3718,3719,3720,3721],{"id":26,"depth":3716,"text":27},2,{"id":771,"depth":3716,"text":772},{"id":2806,"depth":3716,"text":297},{"id":3280,"depth":3716,"text":326},{"id":3432,"depth":3716,"text":3433},{"id":3635,"depth":3716,"text":3636,"children":3722},[3723],{"id":3640,"depth":3724,"text":3418},3,"\u002Fextensions\u002Fkubb-labs\u002Fplugin-client\u002Fguides\u002Fwrite-your-client",1795727684114,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]