@redocly/cli 2.53.0 → 2.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/lib/chunks/{WXEYD7NS.js → 4HUU5J27.js} +1 -1
  2. package/lib/chunks/{KURL24BE.js → 4NOPFMP4.js} +1 -1
  3. package/lib/chunks/{4C4UXCK4.js → 4RAXWSAO.js} +1 -1
  4. package/lib/chunks/{TAEKERG4.js → 5FFLTZ6L.js} +1 -1
  5. package/lib/chunks/{NGKTQKHT.js → 5JDWBBWV.js} +1 -1
  6. package/lib/chunks/{OMLOXL7A.js → 5NPDMO3J.js} +1 -1
  7. package/lib/chunks/{ERMGTRH2.js → 7IFNT3UE.js} +1 -1
  8. package/lib/chunks/{2B6GSF4H.js → 7L3XKM63.js} +1 -1
  9. package/lib/chunks/{ALSURPIO.js → A5EVSQCM.js} +1 -1
  10. package/lib/chunks/AVA66QDF.js +48 -0
  11. package/lib/chunks/{Q23LKMUF.js → B5L66Q7A.js} +1 -1
  12. package/lib/chunks/{PVJS33DH.js → BYAKG3UQ.js} +1 -1
  13. package/lib/chunks/{7BOICAID.js → COKBGZJC.js} +1 -1
  14. package/lib/chunks/{32VQQDJ3.js → D3QMBJ7F.js} +1 -1
  15. package/lib/chunks/{Q7NDZ7OM.js → DHG5G2WS.js} +1 -1
  16. package/lib/chunks/{3XHU56AF.js → HLKETLGO.js} +1 -1
  17. package/lib/chunks/{ZDOHFHBO.js → HP22AUQM.js} +1 -1
  18. package/lib/chunks/{S5TMFXGJ.js → KG3R3V6C.js} +1 -1
  19. package/lib/chunks/{HVDGOLNB.js → LKVLN23O.js} +1 -1
  20. package/lib/chunks/{5SQYAE7S.js → LWZVYHV3.js} +1 -1
  21. package/lib/chunks/{DKDWSUDO.js → OKE3CBRC.js} +1 -1
  22. package/lib/chunks/{O24NDKZ5.js → PG3YUEW2.js} +1 -1
  23. package/lib/chunks/{HJB3IMKI.js → QWDO5IDC.js} +1 -1
  24. package/lib/chunks/{7XKLR23N.js → SBPDYTA3.js} +1 -1
  25. package/lib/chunks/{ICWFBVOK.js → SGXQZAK5.js} +1 -1
  26. package/lib/chunks/{2TX3YF62.js → TCATLY4M.js} +1 -1
  27. package/lib/chunks/{2AQKABZE.js → U7FHAHPW.js} +1 -1
  28. package/lib/chunks/{ZHT6ML3F.js → V23P2ZD3.js} +1 -1
  29. package/lib/chunks/{QFGL6EQH.js → VK3Z4ATC.js} +1 -1
  30. package/lib/chunks/{KCLCOEXJ.js → WZOA4JEM.js} +1 -1
  31. package/lib/chunks/{VWXKJFAQ.js → Y7WOUHSW.js} +244 -244
  32. package/lib/chunks/{ME5BLHWL.js → YS566YFE.js} +1 -1
  33. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  34. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  35. package/lib/eject-assets/generators/cli/index.ts +2 -2
  36. package/lib/eject-assets/generators/cli/render.ts +1 -1
  37. package/lib/eject-assets/generators/go/client.ts +1 -1
  38. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  39. package/lib/eject-assets/generators/go/index.ts +2 -2
  40. package/lib/eject-assets/generators/go/models.ts +1 -1
  41. package/lib/eject-assets/generators/go/naming.ts +1 -1
  42. package/lib/eject-assets/generators/go/operations.ts +1 -1
  43. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  44. package/lib/eject-assets/generators/go/types.ts +1 -1
  45. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  46. package/lib/eject-assets/generators/mock/index.ts +2 -2
  47. package/lib/eject-assets/generators/mock/render.ts +1 -1
  48. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  49. package/lib/eject-assets/generators/mock/values.ts +1 -1
  50. package/lib/eject-assets/generators/php/client.ts +1 -1
  51. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  52. package/lib/eject-assets/generators/php/index.ts +2 -2
  53. package/lib/eject-assets/generators/php/models.ts +1 -1
  54. package/lib/eject-assets/generators/php/naming.ts +1 -1
  55. package/lib/eject-assets/generators/php/operations.ts +1 -1
  56. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  57. package/lib/eject-assets/generators/php/types.ts +1 -1
  58. package/lib/eject-assets/generators/python/client.ts +1 -1
  59. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  60. package/lib/eject-assets/generators/python/index.ts +2 -2
  61. package/lib/eject-assets/generators/python/models.ts +1 -1
  62. package/lib/eject-assets/generators/python/naming.ts +1 -1
  63. package/lib/eject-assets/generators/python/operations.ts +1 -1
  64. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  65. package/lib/eject-assets/generators/python/types.ts +1 -1
  66. package/lib/eject-assets/generators/swr/index.ts +2 -2
  67. package/lib/eject-assets/generators/swr/render.ts +1 -1
  68. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  69. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  70. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  71. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  72. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  73. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  74. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  75. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  76. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  77. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  78. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  79. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  80. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  81. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  82. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  83. package/lib/eject-assets/generators/zod/index.ts +2 -2
  84. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  85. package/lib/index.js +139 -141
  86. package/package.json +1 -1
  87. package/lib/chunks/OVEWHBE3.js +0 -47
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{h as g}from"./KURL24BE.js";import{k as u,l as m}from"./5SQYAE7S.js";import{c as C,d as j}from"./ERMGTRH2.js";import{W as b}from"./YD6ZIH2Z.js";import{a as S,b as k}from"./UW4UC7ZI.js";import{join as $}from"node:path";function h(r){return(r??"").replace(/\s+/g," ").trim().replace(/\\/g,"\\\\").replace(/\|/g,"\\|")}function v(r){return[r.group===void 0?void 0:u(r.group),r.name].filter(Boolean).join(" ")}function N(r,e){return[r,v(e),...e.positionals.map(o=>`<${o.name}>`),...e.flags.filter(o=>o.required).map(o=>`--${o.name} <${o.type}>`),...e.body?[e.body.required?"--json '<json>'":"[--json '<json>']"]:[]].filter(o=>o!=="").join(" ")}function T(r,e){r.line("| Flag | Type | Required | Description |"),r.line("| ---- | ---- | -------- | ----------- |");for(let n of e){let o=[h(n.description),n.enum===void 0?"":`One of ${n.enum.map(t=>`\`${t}\``).join(", ")}.`,n.type==="array"?"Repeat the flag for multiple values.":""].filter(t=>t!=="").join(" ");r.line(`| \`--${n.name}\` | ${n.type} | ${n.required?"yes":"no"} | ${o} |`)}r.blank()}function D(r,e,n){if(r.line(`### \`${v(e)}\``),r.blank(),e.summary!==void 0&&(r.line(h(e.summary)),r.blank()),r.line(`\`${e.method} ${e.path}\``),r.blank(),r.line("```sh"),r.line(N(n.name,e)),r.line("```"),r.blank(),e.positionals.length>0){r.line("| Argument | Description |"),r.line("| -------- | ----------- |");for(let t of e.positionals)r.line(`| \`<${t.name}>\` | ${h(t.description)} |`);r.blank()}e.flags.length>0&&T(r,e.flags);let o=[e.body===void 0?"":`Takes a JSON body${e.body.required?" (required)":""}: \`--json '<json>'\`, \`--json @file.json\`, or \`--json @-\` for stdin.`,e.unsupportedBody===void 0?"":`Takes a \`${e.unsupportedBody}\` body, which the CLI cannot build \u2014 call this operation through the generated client instead.`,e.paginated===!0?"Paginated: `--page-all` follows every page, printing one JSON page per line.":"",e.sse===!0?"Streams server-sent events as one JSON object per line.":"",e.blob===!0?"Returns binary content, so `--output <path>` is required.":""].filter(t=>t!=="");for(let t of o)r.line(t);o.length>0&&r.blank()}function w(r,e){let n=new S;e.frontmatter&&(n.line("---"),n.line(`title: ${e.title}`),n.line("---"),n.blank()),n.line(`# ${e.title}`),n.blank(),n.line(`Generated command-line reference for \`${e.name}\`, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line("## Usage"),n.blank(),n.line("```sh"),n.line(`${e.name} <command> [flags]`),n.line(`${e.name} --help`),n.line(`${e.name} schema <command> # request/response schemas`),n.line("```"),n.blank(),n.line("Install the file under any `bin` name: the command takes that name, and the credential variables below do not change."),n.blank(),n.line("## Global flags"),n.blank(),n.line("| Flag | Description |"),n.line("| ---- | ----------- |");let o=e.schemes.some(i=>i.kind==="bearer");for(let[i,s]of[["--server-url <url>","Override the server URL included in the client."],["--format <json\\|ndjson>","Output format."],["--dry-run","Print the prepared request, credentials redacted, without sending it."],["--page-all","Follow pagination, printing one JSON page per line."],["--output <path>","Write the response body to a file. Required for binary responses."],...o?[["--token <token>","Bearer token, overriding the environment."]]:[],["--json <json\\|@file\\|@->","Request body, inline or from a file or stdin."]])n.line(`| \`${i}\` | ${s} |`);n.blank();let t=m(e.name);if(n.line("## Credentials"),n.blank(),e.schemes.length===0)n.line("The description declares no security schemes, so no credentials are read.");else{n.line("Credentials come from the environment:"),n.blank(),n.line("| Scheme | Variable |"),n.line("| ------ | -------- |");for(let i of e.schemes){let s=i.kind==="bearer"?`\`${t}_TOKEN\` (or \`--token\`)`:i.kind==="basic"?`\`${t}_USERNAME\` and \`${t}_PASSWORD\``:`\`${t}_API_KEY_${m(i.key)}\``;n.line(`| ${i.kind} (\`${i.key}\`) | ${s} |`)}}n.blank(),n.line("## Exit codes"),n.blank(),n.line("| Code | Meaning |"),n.line("| ---- | ------- |");for(let[i,s]of[[0,"success"],[1,"API error (status other than 401 or 403)"],[2,"auth error (401 or 403)"],[3,"validation error"],[4,"usage error (unknown command or flag, bad `--json`)"]])n.line(`| ${i} | ${s} |`);n.blank(),n.line("Errors print one JSON object to stderr, so stdout stays clean for piping."),n.blank();let a=[...new Set(r.map(i=>i.group))];for(let i of a){let s=r.filter(l=>l.group===i);i===void 0?(n.line("## Commands"),n.blank()):(n.line(`## ${i}`),n.blank(),n.line(`Addressed as \`${e.name} ${u(i)} <command>\`.`),n.blank());for(let l of s)D(n,l,e)}return n.toString().replace(/\n{3,}/g,`
7
+ import{h as g}from"./4NOPFMP4.js";import{k as u,l as m}from"./LWZVYHV3.js";import{c as C,d as j}from"./7IFNT3UE.js";import{W as b}from"./YD6ZIH2Z.js";import{a as S,b as k}from"./UW4UC7ZI.js";import{join as $}from"node:path";function h(r){return(r??"").replace(/\s+/g," ").trim().replace(/\\/g,"\\\\").replace(/\|/g,"\\|")}function v(r){return[r.group===void 0?void 0:u(r.group),r.name].filter(Boolean).join(" ")}function N(r,e){return[r,v(e),...e.positionals.map(o=>`<${o.name}>`),...e.flags.filter(o=>o.required).map(o=>`--${o.name} <${o.type}>`),...e.body?[e.body.required?"--json '<json>'":"[--json '<json>']"]:[]].filter(o=>o!=="").join(" ")}function T(r,e){r.line("| Flag | Type | Required | Description |"),r.line("| ---- | ---- | -------- | ----------- |");for(let n of e){let o=[h(n.description),n.enum===void 0?"":`One of ${n.enum.map(t=>`\`${t}\``).join(", ")}.`,n.type==="array"?"Repeat the flag for multiple values.":""].filter(t=>t!=="").join(" ");r.line(`| \`--${n.name}\` | ${n.type} | ${n.required?"yes":"no"} | ${o} |`)}r.blank()}function D(r,e,n){if(r.line(`### \`${v(e)}\``),r.blank(),e.summary!==void 0&&(r.line(h(e.summary)),r.blank()),r.line(`\`${e.method} ${e.path}\``),r.blank(),r.line("```sh"),r.line(N(n.name,e)),r.line("```"),r.blank(),e.positionals.length>0){r.line("| Argument | Description |"),r.line("| -------- | ----------- |");for(let t of e.positionals)r.line(`| \`<${t.name}>\` | ${h(t.description)} |`);r.blank()}e.flags.length>0&&T(r,e.flags);let o=[e.body===void 0?"":`Takes a JSON body${e.body.required?" (required)":""}: \`--json '<json>'\`, \`--json @file.json\`, or \`--json @-\` for stdin.`,e.unsupportedBody===void 0?"":`Takes a \`${e.unsupportedBody}\` body, which the CLI cannot build \u2014 call this operation through the generated client instead.`,e.paginated===!0?"Paginated: `--page-all` follows every page, printing one JSON page per line.":"",e.sse===!0?"Streams server-sent events as one JSON object per line.":"",e.blob===!0?"Returns binary content, so `--output <path>` is required.":""].filter(t=>t!=="");for(let t of o)r.line(t);o.length>0&&r.blank()}function w(r,e){let n=new S;e.frontmatter&&(n.line("---"),n.line(`title: ${e.title}`),n.line("---"),n.blank()),n.line(`# ${e.title}`),n.blank(),n.line(`Generated command-line reference for \`${e.name}\`, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line("## Usage"),n.blank(),n.line("```sh"),n.line(`${e.name} <command> [flags]`),n.line(`${e.name} --help`),n.line(`${e.name} schema <command> # request/response schemas`),n.line("```"),n.blank(),n.line("Install the file under any `bin` name: the command takes that name, and the credential variables below do not change."),n.blank(),n.line("## Global flags"),n.blank(),n.line("| Flag | Description |"),n.line("| ---- | ----------- |");let o=e.schemes.some(i=>i.kind==="bearer");for(let[i,s]of[["--server-url <url>","Override the server URL included in the client."],["--format <json\\|ndjson>","Output format."],["--dry-run","Print the prepared request, credentials redacted, without sending it."],["--page-all","Follow pagination, printing one JSON page per line."],["--output <path>","Write the response body to a file. Required for binary responses."],...o?[["--token <token>","Bearer token, overriding the environment."]]:[],["--json <json\\|@file\\|@->","Request body, inline or from a file or stdin."]])n.line(`| \`${i}\` | ${s} |`);n.blank();let t=m(e.name);if(n.line("## Credentials"),n.blank(),e.schemes.length===0)n.line("The description declares no security schemes, so no credentials are read.");else{n.line("Credentials come from the environment:"),n.blank(),n.line("| Scheme | Variable |"),n.line("| ------ | -------- |");for(let i of e.schemes){let s=i.kind==="bearer"?`\`${t}_TOKEN\` (or \`--token\`)`:i.kind==="basic"?`\`${t}_USERNAME\` and \`${t}_PASSWORD\``:`\`${t}_API_KEY_${m(i.key)}\``;n.line(`| ${i.kind} (\`${i.key}\`) | ${s} |`)}}n.blank(),n.line("## Exit codes"),n.blank(),n.line("| Code | Meaning |"),n.line("| ---- | ------- |");for(let[i,s]of[[0,"success"],[1,"API error (status other than 401 or 403)"],[2,"auth error (401 or 403)"],[3,"validation error"],[4,"usage error (unknown command or flag, bad `--json`)"]])n.line(`| ${i} | ${s} |`);n.blank(),n.line("Errors print one JSON object to stderr, so stdout stays clean for piping."),n.blank();let a=[...new Set(r.map(i=>i.group))];for(let i of a){let s=r.filter(l=>l.group===i);i===void 0?(n.line("## Commands"),n.blank()):(n.line(`## ${i}`),n.blank(),n.line(`Addressed as \`${e.name} ${u(i)} <command>\`.`),n.blank());for(let l of s)D(n,l,e)}return n.toString().replace(/\n{3,}/g,`
8
8
 
9
9
  `).trimEnd()+`
10
10
  `}function R(){return j["cli.ts"]}function x(){return C["cli.ts"]}var O="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function q(r){return k.snake(r).replace(/_/g,"-")}function E(r){let e=r.schema,n=e.kind==="array"?"array":e.kind==="scalar"&&(e.scalar==="integer"||e.scalar==="number")?"number":e.kind==="scalar"&&e.scalar==="boolean"?"boolean":"string";return{name:q(r.name),param:r.name,type:n,required:r.required,...e.kind==="enum"?{enum:e.values.map(String)}:{},...r.description!==void 0?{description:r.description}:{}}}function F(r){let e=r.successResponses;return e.some(n=>n.contentType.toLowerCase().includes("json"))?!1:e.some(n=>n.contentType.startsWith("image/")||n.contentType==="application/octet-stream")}function M(r){return r.successResponses.find(e=>e.contentType.toLowerCase().includes("json"))?.schema}function U(r,e,n){if(n!=="flat")return{};let o=g(r,e.schemas);return"mergeBody"in o&&o.mergeBody?{merged:!0}:{}}function _(r,e,n){return n!=="flat"?{}:"collisions"in g(r,e.schemas)?{argsStyle:"grouped"}:{}}function f(r,e){let n=[];for(let o of r.services)for(let t of o.operations){let a=t.requestBody?.contentType.toLowerCase().includes("json")?t.requestBody:void 0,i=M(t);n.push({...t.tags.length>0?{group:t.tags[0]}:{},name:t.name,...t.summary!==void 0?{summary:t.summary}:{},method:t.method.toUpperCase(),path:t.path,positionals:t.pathParams.map(s=>({name:s.name,type:E(s).type,...s.description!==void 0?{description:s.description}:{}})),flags:t.queryParams.map(E),...a?{body:{required:a.required,...U(t,r,e.argsStyle)}}:{},...a===void 0&&t.requestBody!==void 0?{unsupportedBody:t.requestBody.contentType}:{},...e.pagination?.has(t.name)===!0?{paginated:!0}:{},..._(t,r,e.argsStyle),...t.sse!==void 0?{sse:!0}:{},...F(t)?{blob:!0}:{},...a!==void 0||i!==void 0?{schemas:{...a?{request:a.schema}:{},...i!==void 0?{response:i}:{}}}:{}})}return n}var P=`function isProcessEntry(): boolean {
@@ -8,4 +8,4 @@ import{a as m,m as l}from"./UW4UC7ZI.js";function d(e,t){let n=t??{},i=e.specNam
8
8
  `))e.line(c);e.line("```"),e.blank()}let s=[...t.pathParams,...t.queryParams,...t.headerParams];s.length>0&&h(e,s),t.requestBody!==void 0&&e.line(`Body: \`${t.requestBody.contentType}\`${t.requestBody.required?", required":", optional"}, of type ${o(t.requestBody.schema)}.`);let r=t.successResponses[0];e.line(r===void 0?"Returns no content.":`Returns \`${r.contentType}\`, of type ${o(r.schema)}.`),(n.paginated!==void 0?n.paginated.has(t.name):d(t,n.pagination)!==void 0)&&e.line("This operation is paginated, so the SDK gives it page and item iterators."),t.successResponses.some(c=>c.contentType==="text/event-stream")&&e.line("This operation streams server-sent events, so the SDK iterates the events."),g(t)&&e.line("This operation returns binary content."),e.blank()}function k(e,t){let n=new m;if(t.frontmatter&&(n.line("---"),n.line(`title: ${t.title}`),n.line("---"),n.blank()),n.line(`# ${t.title}`),n.blank(),n.line(`Generated reference for the ${t.language.label} SDK, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line(t.language.requires),n.blank(),n.line("## Authentication"),n.blank(),e.securitySchemes.length===0)n.line("The description declares no security schemes.");else{n.line("The description declares these schemes, which you pass to the client:"),n.blank(),n.line("| Scheme | Kind | Sent as |"),n.line("| ------ | ---- | ------- |");for(let r of e.securitySchemes){let a=r.kind==="bearer"?"`Authorization: Bearer <token>`":r.kind==="basic"?"`Authorization: Basic <base64>`":r.kind==="apiKeyHeader"?`the \`${r.headerName}\` header`:r.kind==="apiKeyQuery"?`the \`${r.paramName}\` query parameter`:`the \`${r.cookieName}\` cookie`;n.line(`| \`${r.key}\` | ${r.kind} | ${a} |`)}}n.blank();let i=e.services.flatMap(r=>r.operations),s=[...new Set(i.map(r=>r.tags[0]))];for(let r of s){n.line(r===void 0?"## Operations":`## ${r}`),n.blank();for(let a of i.filter(c=>c.tags[0]===r))x(n,a,t)}return n.toString().replace(/\n{3,}/g,`
9
9
 
10
10
  `).trimEnd()+`
11
- `}function b(e){return e.successResponses.find(t=>t.contentType.toLowerCase().includes("json"))?.schema}function R(e){return e.successResponses.find(t=>t.contentType.toLowerCase().includes("text/event-stream"))}function S(e){return e.requestBody?.contentType.toLowerCase().includes("multipart")??!1}function $(e){let t=new Set(e.variables.map(a=>a.name)),n=[],i="",s=e.url,r=/\{([^{}]+)\}/;for(let a=r.exec(s);a!==null;a=r.exec(s))i+=s.slice(0,a.index),t.has(a[1])?(i!==""&&n.push({kind:"literal",value:i}),i="",n.push({kind:"variable",name:a[1]})):i+=a[0],s=s.slice(a.index+a[0].length);return i+=s,(i!==""||n.length===0)&&n.push({kind:"literal",value:i}),n}function P(e,t){return e.security.map(n=>n.flatMap(i=>{let s=t.securitySchemes.find(r=>r.key===i);return s===void 0?[]:s.kind==="bearer"||s.kind==="basic"?[{scheme:i,kind:s.kind}]:s.kind==="apiKeyHeader"?[{scheme:i,kind:"apiKey",name:s.headerName,in:"header"}]:s.kind==="apiKeyQuery"?[{scheme:i,kind:"apiKey",name:s.paramName,in:"query"}]:[{scheme:i,kind:"apiKey",name:s.cookieName,in:"cookie"}]})).filter(n=>n.length>0)}function C(e,t,n){if(e===void 0||t===void 0)return;let i=l(e,t,n);return i?.kind==="array"?i.items:void 0}var J=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function v(e){return e}function N(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function q(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function A(e,t){let n={...e};for(let[i,s]of Object.entries(t))s!==void 0&&(n[i]=s);return n}function fe(e){return e}async function ge(e){return(await import("./7XKLR23N.js")).generateClient(e)}export{d as a,k as b,b as c,R as d,S as e,$ as f,P as g,C as h,J as i,v as j,N as k,q as l,A as m,fe as n,ge as o};
11
+ `}function b(e){return e.successResponses.find(t=>t.contentType.toLowerCase().includes("json"))?.schema}function R(e){return e.successResponses.find(t=>t.contentType.toLowerCase().includes("text/event-stream"))}function S(e){return e.requestBody?.contentType.toLowerCase().includes("multipart")??!1}function $(e){let t=new Set(e.variables.map(a=>a.name)),n=[],i="",s=e.url,r=/\{([^{}]+)\}/;for(let a=r.exec(s);a!==null;a=r.exec(s))i+=s.slice(0,a.index),t.has(a[1])?(i!==""&&n.push({kind:"literal",value:i}),i="",n.push({kind:"variable",name:a[1]})):i+=a[0],s=s.slice(a.index+a[0].length);return i+=s,(i!==""||n.length===0)&&n.push({kind:"literal",value:i}),n}function P(e,t){return e.security.map(n=>n.flatMap(i=>{let s=t.securitySchemes.find(r=>r.key===i);return s===void 0?[]:s.kind==="bearer"||s.kind==="basic"?[{scheme:i,kind:s.kind}]:s.kind==="apiKeyHeader"?[{scheme:i,kind:"apiKey",name:s.headerName,in:"header"}]:s.kind==="apiKeyQuery"?[{scheme:i,kind:"apiKey",name:s.paramName,in:"query"}]:[{scheme:i,kind:"apiKey",name:s.cookieName,in:"cookie"}]})).filter(n=>n.length>0)}function C(e,t,n){if(e===void 0||t===void 0)return;let i=l(e,t,n);return i?.kind==="array"?i.items:void 0}var J=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function v(e){return e}function N(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function q(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function A(e,t){let n={...e};for(let[i,s]of Object.entries(t))s!==void 0&&(n[i]=s);return n}function fe(e){return e}async function ge(e){return(await import("./SBPDYTA3.js")).generateClient(e)}export{d as a,k as b,b as c,R as d,S as e,$ as f,P as g,C as h,J as i,v as j,N as k,q as l,A as m,fe as n,ge as o};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as x,b as f,c as m,d}from"./2B6GSF4H.js";import{b as y,d as h,e as l}from"./LD5MEXEL.js";import{m as P}from"./UW4UC7ZI.js";import{join as E}from"node:path";function q(e,t){let n=x(e,"tanstack-query");if(n.length===0)return"";let r=t.pagination??new Map;return[j(n,t,r),...n.filter(f).map(i=>K(i,t.queryKeyPrefix)),Q(e,n,r,t.queryKeyPrefix,t.argsStyle),...R(n,r)].join(`
7
+ import{a as x,b as f,c as m,d}from"./7L3XKM63.js";import{b as y,d as h,e as l}from"./LD5MEXEL.js";import{m as P}from"./UW4UC7ZI.js";import{join as E}from"node:path";function q(e,t){let n=x(e,"tanstack-query");if(n.length===0)return"";let r=t.pagination??new Map;return[j(n,t,r),...n.filter(f).map(i=>K(i,t.queryKeyPrefix)),Q(e,n,r,t.queryKeyPrefix,t.argsStyle),...R(n,r)].join(`
8
8
  `)}function b(e,t){if(!f(e))return!1;let n=t.get(e.name);return n!==void 0&&n.spec.style!=="link"}function j(e,t,n){let r=[...e.some(a=>b(a,n))?["infiniteQueryOptions"]:[],...e.some(f)?["queryOptions"]:[]],s=[...e.filter(m).map(d),"RequestOptions"].sort().map(a=>`type ${a}`),i=[];return r.length>0&&i.push(`import { ${r.join(", ")} } from "@tanstack/${t.framework}-query";`),i.push(`import { client, ${s.join(", ")} } from "${t.sdkModule}";`),i.join(`
9
9
  `)}function K(e,t){let n=M(e,t);return m(e)?`export const ${e.name}QueryKey = (vars?: ${d(e)}) =>
10
10
  vars === undefined ? ([${n}] as const) : ([${n}, vars] as const);`:`export const ${e.name}QueryKey = () => [${n}] as const;`}function M(e,t){return t===void 0?`"${e.name}"`:`${h(t)}, "${e.name}"`}function Q(e,t,n,r,s){return`/**
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{b as S,c as E,d as w,f as A,g as M,h as q,i as D,j as B,k as F}from"./KURL24BE.js";import{b,g as T}from"./5SQYAE7S.js";import{a as f,c as R,d as v,e as k}from"./ERMGTRH2.js";import{d as I,f as N,h as P,i as j,m as C}from"./LD5MEXEL.js";import{join as Y}from"node:path";var y="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function $(e){return e.filter(t=>t.length>0).join(`
7
+ import{b as S,c as E,d as w,f as A,g as M,h as q,i as D,j as B,k as F}from"./4NOPFMP4.js";import{b,g as T}from"./LWZVYHV3.js";import{a as f,c as R,d as v,e as k}from"./7IFNT3UE.js";import{d as I,f as N,h as P,i as j,m as C}from"./LD5MEXEL.js";import{join as Y}from"node:path";var y="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function $(e){return e.filter(t=>t.length>0).join(`
8
8
 
9
9
  `)+`
10
10
  `}function O(e){let t=["/**",` * ${j(`${e.title} (v${e.version})`)}`];if(e.description)for(let n of C(j(e.description)))t.push(` * ${n}`.replace(/ +$/,""));return t.push(" */"),t.join(`
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as O}from"./RS5PUOTT.js";import{a as I}from"./BXI4SF2U.js";import{c as p}from"./P26PQ2RU.js";import{a as R}from"./S5TMFXGJ.js";import{O as T,Q as w,W as a}from"./YD6ZIH2Z.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
7
+ import{a as O}from"./RS5PUOTT.js";import{a as I}from"./BXI4SF2U.js";import{c as p}from"./P26PQ2RU.js";import{a as R}from"./KG3R3V6C.js";import{O as T,Q as w,W as a}from"./YD6ZIH2Z.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
8
8
 
9
9
  `):a.warn(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${r.toLocaleString()}. ${s}
10
10
 
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as a,d as b}from"./2AQKABZE.js";import"./ERMGTRH2.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{b as generateClient,a as runGenerators};
7
+ import{c as a,d as b}from"./U7FHAHPW.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{b as generateClient,a as runGenerators};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b,c,d,e}from"./QFGL6EQH.js";import"./2U6O26CV.js";import"./5SQYAE7S.js";import"./ERMGTRH2.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
7
+ import{a,b,c,d,e}from"./VK3Z4ATC.js";import"./2U6O26CV.js";import"./LWZVYHV3.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b,c,d,e}from"./32VQQDJ3.js";import"./2U6O26CV.js";import"./5SQYAE7S.js";import"./ERMGTRH2.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
7
+ import{a,b,c,d,e}from"./D3QMBJ7F.js";import"./2U6O26CV.js";import"./LWZVYHV3.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as Z,b as ee,f as te,g as G,h as ne}from"./ERMGTRH2.js";import{a as y}from"./WZXA5XPB.js";import{C as J,H as V,W as b,Y as W,ba as Q,c as x,da as E,ka as Y,q as v,s as H}from"./YD6ZIH2Z.js";import{b as M,c as T,k as D}from"./LD5MEXEL.js";import{mkdir as at,readFile as ct,writeFile as ut}from"node:fs/promises";import{dirname as $e,parse as dt,resolve as R,sep as ft}from"node:path";function A(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./ZDOHFHBO.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./NGKTQKHT.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./KCLCOEXJ.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":A("react"),"tanstack-query-vue":A("vue"),"tanstack-query-svelte":A("svelte"),"tanstack-query-solid":A("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./3XHU56AF.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./7BOICAID.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./TAEKERG4.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./4C4UXCK4.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./ICWFBVOK.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./2TX3YF62.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function re(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
7
+ import{a as Z,b as ee,f as te,g as G,h as ne}from"./7IFNT3UE.js";import{a as y}from"./WZXA5XPB.js";import{C as J,H as V,W as b,Y as W,ba as Q,c as x,da as E,ka as Y,q as v,s as H}from"./YD6ZIH2Z.js";import{b as M,c as T,k as D}from"./LD5MEXEL.js";import{mkdir as at,readFile as ct,writeFile as ut}from"node:fs/promises";import{dirname as $e,parse as dt,resolve as R,sep as ft}from"node:path";function A(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./HP22AUQM.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./5JDWBBWV.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./WZOA4JEM.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":A("react"),"tanstack-query-vue":A("vue"),"tanstack-query-svelte":A("svelte"),"tanstack-query-solid":A("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./HLKETLGO.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./COKBGZJC.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./5FFLTZ6L.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./4RAXWSAO.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./SGXQZAK5.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./TCATLY4M.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function re(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
8
8
  `);let o=t.errorMode??"throw",i=t.dateType??"string";for(let a of e){let c=n.get(a);if(!c)throw new y(`Unknown generator: ${a}`);for(let d of c.requires??[])if(!s.has(d)){let f=[...new Set([d,...e])].map(h=>`--generator ${h}`).join(" ");throw new y(`The "${a}" generator requires the "${d}" generator. Add it, e.g. ${f}.`)}if(c.errorModes&&!c.errorModes.includes(o))throw new y(`The "${a}" generator does not support --error-mode "${o}" (supported: ${c.errorModes.join(", ")}).`);if(c.dateTypes&&!c.dateTypes.includes(i))throw new y(`The "${a}" generator requires --date-type ${c.dateTypes.join(" or ")} (got "${i}") so the runtime values match the generated types.`);let u={...t,outputMode:r};for(let[d,f]of Object.entries(c.notApplicable??{}))u[d]!==void 0&&b.warn(`generate-client: the "${a}" generator ignores ${d} \u2014 ${f}.
9
9
  `)}}function oe(e,t,n){let r=new Map;for(let s of e){let o=t.get(s)?.options,i=n?.[s];if(o===void 0){i!==void 0&&b.warn(`generate-client: the "${s}" generator declares no options, so client.options.${s} is ignored.
10
10
  `),r.set(s,{});continue}r.set(s,ke(s,o,i))}return r}function ke(e,t,n){if(n!==void 0&&!x(n))throw new y(`The "${e}" generator's options must be a map of option names to values.`);let r=n??{},s=Object.keys(t.properties);if(t.additionalProperties!==!0){for(let i of Object.keys(r))if(!s.includes(i))throw new y(`The "${e}" generator got an unknown option "${i}". Declared options: ${s.join(", ")||"(none)"}.`)}for(let i of t.required??[])if(r[i]===void 0)throw new y(`The "${e}" generator requires the "${i}" option.`);let o={...r};for(let[i,a]of Object.entries(t.properties)){if(o[i]===void 0){a.default!==void 0&&(o[i]=a.default);continue}let c=ve(a,o[i]);if(c!==void 0)throw new y(`The "${e}" generator's "${i}" ${c}.`)}return o}function ve(e,t){if("enum"in e)return e.enum.includes(t)?void 0:`must be one of: ${e.enum.join(", ")}`;if(e.type==="array"){let n=e.items.type;return Array.isArray(t)&&t.every(r=>typeof r===n)?void 0:`must be an array of ${n}`}return typeof t===e.type?void 0:`must be a ${e.type}`}import{isAbsolute as Oe,resolve as xe}from"node:path";import{pathToFileURL as qe}from"node:url";var Se=function(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,s,o,i){return r?t?".jsx":".js":s&&(!o||!i)?n:s+o+"."+i.toLowerCase()+"js"}):e};async function ie(e,t={}){let n=new Map;for(let a of t.customGenerators??[])ae(n,a);let r=[];for(let a of e)r.push(await se(a,n,t.configDir));let s=[],o=new Set,i=async a=>{if(!(s.includes(a)||o.has(a))){o.add(a);for(let c of n.get(a).requires??[])(n.has(c)||c in I)&&await i(await se(c,n,t.configDir));o.delete(a),s.push(a)}};for(let a of r)await i(a);return{selected:s,registry:n}}async function se(e,t,n){if(t.has(e))return e;let r=I[e];if(r!==void 0){let{load:o,...i}=r;return t.set(e,{...i,...await o()}),e}if(e==="sdk")throw new y('The "sdk" generator is now named "typescript". Update the `generators` list or the --generator flag.');let s=await Pe(e,n??process.cwd());return ae(t,s),s.name}function ae(e,t){if(!x(t)||typeof t.name!="string"||t.name===""||typeof t.run!="function")throw new y("Invalid custom generator: expected an object with a non-empty string `name` and a `run` function (build one with `defineGenerator`).");if(e.has(t.name))throw new y(`Generator name "${t.name}" collides with an existing generator. Rename the custom generator.`);if(t.requiresGenerator!==void 0){let n=ne(G,t.requiresGenerator);if(n===void 0)throw new y(`Generator "${t.name}" declares requiresGenerator "${t.requiresGenerator}", which is not a range we read. Use ^1.2.0, ~1.2.0, >=1.2.0, or an exact version.`);if(!n)throw new y(`Generator "${t.name}" needs @redocly/client-generator ${t.requiresGenerator}; this CLI ships ${G}. Upgrade @redocly/cli if the generator is newer, or update the generator \u2014 \`redocly eject-generator <name> --update\` for an ejected file, or upgrade its package.`)}t.name in I&&b.warn(`generate-client: custom generator "${t.name}" takes over the built-in generator of the same name.
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as g,b as h,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as B,l as C,m as D,n as F,o as G}from"./5SQYAE7S.js";import{a as z,e as A,g as E}from"./ERMGTRH2.js";import{a}from"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{x as AUTHORING_HELPER_NAMES,E as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,A as WIRING_NAMES,z as allOperations,c as casing,C as constantCase,y as defineClientSetup,F as defineGenerator,i as deref,k as discriminatorCases,o as docText,n as enumValues,j as flattenAllOf,G as generateClient,B as groupSlug,q as headerCoerceType,e as identifierFor,t as isMultipartBody,l as isNullable,r as jsonSuccessSchema,D as mergeConfig,w as paginationItemSchema,g as paginationRuleFor,h as renderReferencePage,p as resolveSchemaPointer,p as schemaAtPointer,v as securityRequirements,u as serverUrlParts,s as sseResponse,f as uniqueIdentifiers,m as unwrapNullable};
7
+ import{a as g,b as h,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as B,l as C,m as D,n as F,o as G}from"./LWZVYHV3.js";import{a as z,e as A,g as E}from"./7IFNT3UE.js";import{a}from"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{x as AUTHORING_HELPER_NAMES,E as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,A as WIRING_NAMES,z as allOperations,c as casing,C as constantCase,y as defineClientSetup,F as defineGenerator,i as deref,k as discriminatorCases,o as docText,n as enumValues,j as flattenAllOf,G as generateClient,B as groupSlug,q as headerCoerceType,e as identifierFor,t as isMultipartBody,l as isNullable,r as jsonSuccessSchema,D as mergeConfig,w as paginationItemSchema,g as paginationRuleFor,h as renderReferencePage,p as resolveSchemaPointer,p as schemaAtPointer,v as securityRequirements,u as serverUrlParts,s as sseResponse,f as uniqueIdentifiers,m as unwrapNullable};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as O}from"./2U6O26CV.js";import{b as B,c as j,d as N,e as V,f as Q,g as Z,h as Y}from"./5SQYAE7S.js";import{a as H}from"./WZXA5XPB.js";import{a as F,b as T,c as C,d as P,e as W,g as _,h as M,i as A,j as z,k as K,l as U,n as J}from"./UW4UC7ZI.js";var G=C.go,S=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return P(t,{style:"camel",reserved:G})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let s=d(o),a=s;for(let i=2;r.has(a);i++)a=`${s}${i}`;return r.add(a),a})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
7
+ import{a as O}from"./2U6O26CV.js";import{b as B,c as j,d as N,e as V,f as Q,g as Z,h as Y}from"./LWZVYHV3.js";import{a as H}from"./WZXA5XPB.js";import{a as F,b as T,c as C,d as P,e as W,g as _,h as M,i as A,j as z,k as K,l as U,n as J}from"./UW4UC7ZI.js";var G=C.go,S=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return P(t,{style:"camel",reserved:G})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let s=d(o),a=s;for(let i=2;r.has(a);i++)a=`${s}${i}`;return r.add(a),a})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
8
8
  `?n+="\\n":r==="\r"?n+="\\r":r===" "?n+="\\t":o<32||o===127?n+=`\\x${o.toString(16).padStart(2,"0")}`:o>=55296&&o<=57343?n+="\\uFFFD":n+=r}return n+'"'}literal(t){return t==null?"nil":typeof t=="boolean"||typeof t=="number"?String(t):typeof t=="string"?this.string(t):Array.isArray(t)?`[]any{${t.map(r=>this.literal(r)).join(", ")}}`:`map[string]any{${Object.entries(t).map(([r,o])=>`${this.string(r)}: ${this.literal(o)}`).join(", ")}}`}comment(t){for(let n of U(t))this.line(n===""?"//":`// ${n}`);return this}doc(t,n){let r=U(n);if(r.length===0)return this;this.line(`// ${t} \u2014 ${r[0]}`);let o=!1;for(let s of r.slice(1)){if(s===""){o||this.line("//"),o=!0;continue}this.line(`// ${s}`),o=!1}return this}layout(t){return ie(le(t))}toString(){return this.layout(super.toString())}};function d(e){let t=P(e,{style:"pascal",reserved:G});return t.startsWith("_")?`N${t.slice(1)}`:t}function ie(e){return`${e.replace(/\n{3,}/g,`
9
9
 
10
10
  `).trimEnd()}
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./ME5BLHWL.js";import"./5SQYAE7S.js";import"./ERMGTRH2.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};
7
+ import{a}from"./YS566YFE.js";import"./LWZVYHV3.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};