@aventurevc/aventure-cli 0.8.103 → 0.8.105
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.
- package/dist/aventure-cli/index.js +1 -1
- package/dist/aventure-cli/unified-operations.json +1 -1
- package/dist/chunks/{aventure-cli-BLyDOAeR.js → aventure-cli-Doa1r0o1.js} +2 -2
- package/dist/chunks/detail-CRrDl0B1.js +1 -0
- package/dist/chunks/detail-C_1SHx2h.js +1 -0
- package/dist/chunks/dist-C3Vg_DX8.js +114 -0
- package/dist/chunks/{oauth-bearer-credential-BtpEJVUj.js → oauth-bearer-credential-DgGbUA--.js} +2 -2
- package/dist/chunks/oauth-login-B2X2yyIO.js +1 -0
- package/dist/chunks/{oauth-login-DubgxmnV.js → oauth-login-CgMvKnfG.js} +1 -1
- package/dist/chunks/openapi-commands-LMKvHwm7.js +1 -0
- package/dist/chunks/provider-catalog-by-9rM8t.js +1 -0
- package/dist/chunks/text-field-Dmarnkra.js +3 -0
- package/dist/chunks/text-response-BPT_U3_Q.js +22 -0
- package/package.json +3 -3
- package/dist/chunks/detail-2bBb5-P6.js +0 -1
- package/dist/chunks/detail-5K840NEA.js +0 -1
- package/dist/chunks/dist-BXvJZlfk.js +0 -114
- package/dist/chunks/oauth-login-CC6PuNuw.js +0 -1
- package/dist/chunks/openapi-commands-jIUWkMb3.js +0 -1
- package/dist/chunks/provider-catalog-BEGjXNYR.js +0 -1
- package/dist/chunks/text-field-bUh4UEao.js +0 -3
- package/dist/chunks/text-response-DsIZf9jM.js +0 -22
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{da as e,di as t,li as n,vi as r,yi as i}from"../chunks/dist-
|
|
2
|
+
import{da as e,di as t,li as n,vi as r,yi as i}from"../chunks/dist-C3Vg_DX8.js";import{_ as a,t as o}from"../chunks/oauth-bearer-credential-DgGbUA--.js";import{i as s}from"../chunks/text-field-Dmarnkra.js";import{c,i as l,t as u}from"../chunks/openapi-commands-LMKvHwm7.js";var d=process.argv.slice(2);l(d)&&t(!1),d.includes(`--all-fields`)&&s(!0);try{if(i(),c(d,u)===`optional`)try{await o(),await a()}catch(e){n({component:r().bin[0],event:`optional_auth_materialization_failed`,message:`saved credential unavailable; continuing with credential-optional command`,error:e})}await import(`../chunks/aventure-cli-Doa1r0o1.js`)}catch(t){if(!(t instanceof e))throw t;process.stderr.write(`${t.message}\n`),process.exitCode=t.exitCode}export{};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"generatedFrom": "MCP_GENERATION_CONTRACT",
|
|
4
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"generatedAt": "2026-10-08T05:55:46.279Z",
|
|
5
5
|
"totalOperations": 140,
|
|
6
6
|
"note": "Projection of MCP_GENERATION_CONTRACT - see mcp/scripts/build-unified-operations.ts header for SSOT rules.",
|
|
7
7
|
"operations": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ai as e,Ci as t,Di as n,E as r,Ei as i,Mi as a,O as o,Si as s,T as c,Ti as l,_ as u,a as d,b as f,bi as p,c as m,ca as h,d as g,fa as _,g as v,gi as ee,i as te,ji as y,ki as ne,l as re,la as b,li as ie,m as ae,n as oe,o as se,r as ce,si as le,u as ue,ua as de,vi as x,w as fe,y as pe}from"./dist-BXvJZlfk.js";import{M as me,O as he,i as S,o as ge,v as _e,w as C,y as w}from"./person-owner-BJgNYLKX.js";import{A as ve,C as ye,D as be,E as xe,M as Se,N as Ce,O as T,S as we,T as Te,_ as Ee,a as De,b as Oe,c as ke,h as Ae,i as je,k as Me,l as Ne,o as Pe,p as Fe,s as Ie,t as Le,u as Re,v as ze,x as Be,y as Ve}from"./oauth-bearer-credential-BtpEJVUj.js";import{c as He,d as Ue,h as We,m as Ge,o as Ke,p as qe,s as Je,u as Ye}from"./text-field-bUh4UEao.js";import{a as Xe,c as Ze,d as Qe,f as $e,g as et,h as tt,l as nt,m as rt,n as it,o as E,p as at,r as D,s as ot,t as O,u as st}from"./openapi-commands-jIUWkMb3.js";import{a as ct,c as lt,d as ut,i as k,l as dt,m as ft,n as pt,o as mt,r as ht,s as gt,t as _t}from"./text-response-DsIZf9jM.js";import{n as vt,r as yt,t as bt}from"./oauth-login-DubgxmnV.js";import{spawnSync as xt}from"node:child_process";import{basename as St,dirname as A,resolve as j,sep as M}from"node:path";import{copyFileSync as Ct,existsSync as wt,lstatSync as Tt,mkdirSync as Et,mkdtempSync as Dt,readFileSync as Ot,readlinkSync as kt,realpathSync as At,renameSync as jt,rmdirSync as Mt,unlinkSync as Nt,writeFileSync as Pt}from"node:fs";import N,{stderr as P,stdin as Ft}from"node:process";import{TextDecoder as It,inspect as Lt}from"node:util";import{homedir as Rt,hostname as zt,platform as Bt}from"node:os";import{fileURLToPath as Vt}from"node:url";import{readFile as Ht}from"node:fs/promises";import{setTimeout as Ut}from"node:timers/promises";import{webcrypto as Wt}from"node:crypto";import{createInterface as Gt}from"node:readline/promises";function Kt(t,n,r){let i={...r};for(let r of n.parameter){let n=r.envName;if(n===void 0)continue;let a=process.env[n]?.trim();if(a===void 0||a.length===0)continue;let o=i[r.optionKey];if(o!==void 0&&(typeof o!=`string`||o!==a))return{...e(`${t} ${r.flag.split(` `)[0]??r.name} conflicts with ${n}; omit the flag or use ${a}.`),data:i};o===void 0&&(i[r.optionKey]=a)}return y(`Environment-bound options applied`,i)}function qt(e,t,n){if(!I(n))return null;for(let r of t.parameter){let t=r.envName,i=t===void 0?void 0:process.env[t]?.trim();if(t===void 0||i===void 0||i.length===0||!cn(n,r.name))continue;let a=sn(n,r.name);if(typeof a!=`string`||a!==i)return`${e} ${r.name} in --from-file conflicts with ${t}; omit the field or use ${i}.`}return null}function Jt(e){let t=new Set(e.parameter.map(({name:e})=>e));return e.kind===`multipart`?e.requiredPath:e.requiredPath.filter(e=>!t.has(e))}function Yt(e,t,n,r=!1){if(r||!F(t)||!Array.isArray(n))return fn(e,t,n);for(let[r,i]of n.entries()){let n=fn(e,t,i,r);if(!n.ok)return n}return y(`Body value assigned`,null)}function Xt(e,t,n,r){return fn(e,t,r,n)}function Zt(e){let t=[];for(let n of e.split(`.`)){let e=mn(n);if(t.push(e.key),e.isArray)return t.join(`.`)}return null}function Qt(e,t){let n=Zt(t);if(n===null)return null;let r=on(e,n.split(`.`));return Array.isArray(r)?{path:n,rowCount:r.length,firstHole:an(r)}:null}function $t(t,n){if(F(t.name)||t.schemaType===`array`)return y(`Repeated body option selected`,typeof n==`string`?[n]:n);if(!Array.isArray(n))return y(`Scalar body option selected`,n);let r=t.flag.split(` `)[0]??t.name;return n.length===1?y(`Scalar body option selected`,n[0]):e(`${r} was already given; pass it once.`)}var en=/^(?<row>\d+):(?<item>.*)$/su;function tn(e,t){let n=Zt(e.name);if(e.schemaType!==`array`||n===null||t===void 0||typeof t==`boolean`)return null;let r=new Map,i=[];for(let e of typeof t==`string`?[t]:t){let t=en.exec(e)?.groups,n=t?.row,a=t?.item;if(n===void 0||a===void 0){i.push(e);continue}let o=r.get(Number(n));o===void 0?r.set(Number(n),[a]):o.push(a)}return r.size===0?null:{container:n,rows:r,plain:i}}function nn(e,t,n){let r=0;for(let i of e.parameter){let e=t[i.optionKey];e!==void 0&&typeof e!=`boolean`&&Zt(i.name)===n&&(r=Math.max(r,typeof e==`string`?1:e.length))}return r}function rn(t,n,r,i){for(let a of n.parameter){let n=r[a.optionKey];if(n===void 0)continue;let o=Qt(i,a.name);if(o===null)continue;if(o.firstHole!==null)return e(`${t} has no ${o.path}[] row ${o.firstHole} — number ${o.path}[] rows from 0 with no gaps.`);if(a.schemaType!==`array`||o.rowCount<=1||tn(a,n)!==null)continue;let s=a.flag.split(` `)[0]??a.name;return e(`${s} fills one ${o.path}[] row's list, so ${t} cannot also build ${o.rowCount} ${o.path}[] rows from direct options — prefix each value with its 0-based ${o.path}[] row index, as 0:value, or pass the rows with --from-file.`)}return null}function an(e){for(let t=0;t<e.length;t+=1)if(e[t]===void 0)return t;return null}function on(e,t){let n=e;for(let e of t){if(!I(n))return;n=n[e]??null}return n}function sn(e,t){if(!F(t))return on(e,t.split(`.`))}function cn(e,t){return un(e,t.split(`.`))}function ln(e,t,n){if(!I(n))return null;let r=new Set(t.parameter.map(({name:e})=>e));for(let i of e)if(i!==t){for(let e of i.parameter)if(!r.has(e.name)&&cn(n,e.name))return`${e.name} in --from-file requires --content-type ${i.contentType}.`}return null}function un(e,t){let[n,...r]=t;if(n===void 0)return!0;let i=mn(n);if(!I(e)||!Object.hasOwn(e,i.key))return!1;let a=e[i.key]??null;return i.isArray?Array.isArray(a)&&a.every(e=>un(e,r)):un(a,r)}function F(e){return e.split(`.`).some(e=>mn(e).isArray)}function dn(e,t){return e.parameter.length===0||!I(t)?null:gn(t,[],hn(e.parameter))}function I(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fn(t,n,r,i=0){let a=n.split(`.`),o=t;for(let[t,s]of a.entries()){let c=mn(s),l=t===a.length-1,u=pn(o,c,n,l,r,i);if(!u.ok||u.data===null)return e(u.summary,u.warnings);if(l)return y(`Body value assigned`,null);o=u.data}return e(`${n} is not a valid body option path.`)}function pn(t,n,r,i,a,o){let s=()=>e(`${r} cannot be combined with another body option at ${n.key}.`),c=t[n.key];if(n.isArray){if(c!==void 0&&!Array.isArray(c))return s();let e=c??[];if(c===void 0&&(t[n.key]=e),i)return e[o]===void 0?(e[o]=a,y(`Body value assigned`,t)):s();let r=e[o];if(r===void 0){let t={};return e[o]=t,y(`Body path created`,t)}return I(r)?y(`Body path stepped`,r):s()}if(i)return c===void 0?(t[n.key]=a,y(`Body value assigned`,t)):s();if(c===void 0){let e={};return t[n.key]=e,y(`Body path created`,e)}return I(c)?y(`Body path stepped`,c):s()}function mn(e){let t=e.endsWith(`[]`);return{key:t?e.slice(0,-2):e,isArray:t}}function hn(e){let t=new Set,n=new Set;for(let r of e){let e=`${r.name}${r.schemaType===`array`?`[]`:``}`;t.add(e);let i=e.split(`.`);for(let e=1;e<i.length;e+=1)n.add(i.slice(0,e).join(`.`))}return{leaf:t,prefix:n}}function gn(e,t,n){if(Array.isArray(e)){if(e.length===0)return null;for(let r of e){let e=gn(r,t,n);if(e!==null)return e}return null}if(!I(e))return null;for(let[r,i]of Object.entries(e)){let e=[...t,Array.isArray(i)?`${r}[]`:r],a=e.join(`.`);if(!_n(a,n)){if(!vn(e))continue;return{path:a,suggestion:yn(e,n)}}let o=gn(i,e,n);if(o!==null)return o}return null}function _n(e,t){return t.prefix.has(e)||t.leaf.has(e)}function vn(e){return e.slice(0,-1).some(e=>e.endsWith(`[]`))}function yn(e,t){let n=e.slice(0,-1).join(`.`),r=e.at(-1)?.replace(/\[\]$/u,``).toLowerCase()??``;return[...t.leaf].filter(e=>e.split(`.`).slice(0,-1).join(`.`)===n).map(e=>({path:e,score:bn(r,e.split(`.`).at(-1)??``)})).filter(({score:e})=>e<1/0).toSorted((e,t)=>e.score-t.score||e.path.localeCompare(t.path))[0]?.path}function bn(e,t){let n=t.replace(/\[\]$/u,``).toLowerCase();return n===e?0:n.endsWith(e)||e.endsWith(n)?1:n.includes(e)||e.includes(n)?2:1/0}function xn(e,t){let n=new Map;for(let e of t){let t=e.flag?.split(` `)[0];t!==void 0&&n.set(t,t===`--from-file`?{...e,inputType:`file`}:e)}for(let t of e){let e=t.long===void 0?void 0:n.get(t.long);e!==void 0&&(t.helpGroup(Ge(e)),t.description=m(t.description,{...e,hasParseDefault:t.defaultValue!==void 0}))}e.sort((e,t)=>{let r=e.long===void 0?void 0:n.get(e.long),i=t.long===void 0?void 0:n.get(t.long);return r!==void 0&&i!==void 0?kn(r,i):r===void 0?i===void 0?0:1:-1})}function Sn(e){let t=new Map;for(let n of e)for(let e of n.parameter){let r=e.flag.split(` `)[0]??e.flag,i=t.get(r);i===void 0?t.set(r,{variant:[{descriptor:n,parameter:e}]}):t.set(r,{variant:[...i.variant,{descriptor:n,parameter:e}]})}return[...t.values()]}function Cn(e){let{flag:t}=e.variant[0].parameter;return e.variant.every(({parameter:e})=>e.flag===t)?t:`${t.split(` `)[0]??t} <value>`}function wn(e){let t=e.variant.map(({descriptor:e,parameter:t})=>({contentType:e.contentType,text:Dn(e,t)})),n=t[0];return n===void 0?``:t.every(({text:e})=>e===n.text)?`${n.text===``?``:`${n.text} `}Request content: ${t.map(({contentType:e})=>e).join(`, `)}.`:t.map(({contentType:e,text:t})=>`${e}: ${t}`).join(` `)}function Tn(e,t){return[...new Set((e.cliConflicts??[]).filter(e=>e.includes(t)).flatMap(e=>e.filter(e=>e!==t)))]}function En(e,t){let n=e.kind===`multipart`?`Read a JSON object keyed by multipart part name from a file, or use - for stdin`:`Read the JSON request body from a file, or use - for stdin`,r=t.filter(e=>!t.some(t=>t.startsWith(`${e}.`)||t.startsWith(`${e}[].`)));return r.length===0?We(n):`${We(n)} Required JSON paths: ${r.join(`, `)}.`}function Dn(e,t){let n=Ue(t.description,void 0),r=e.kind!==`multipart`&&F(t.name),i=e.kind!==`multipart`&&t.optionKey!==t.name&&/^\w+$/u.test(t.name);return`${n}${r?` Repeat to add another value.`:``}${i?` --from-file JSON key: ${t.name}.`:``}${On(e,t)}`}function On(e,t){if(e.kind===`multipart`||t.schemaType!==`array`)return``;let n=Zt(t.name);return n===null?``:` Prefix each value with its 0-based ${n}[] row index, as 0:value, to fill more than one ${n}[] row. A leading digits-and-colon is always read as that index, so name the row of a value that starts the same way, as 0:0:00 for the value 0:00.`}function kn(e,t){return qe(e)-qe(t)||Number(e.required!==!0)-Number(t.required!==!0)}async function An(t){let n;try{n=t===`-`?await jn():await Ht(t,`utf8`)}catch(n){return e(`Could not read input: ${n.message}`,[`path=${t}`])}try{if(n.trim().length===0)return y(`No input provided`,null);let e=JSON.parse(n);return y(`Input parsed`,e)}catch(t){return e(`Input is not valid JSON: ${t.message}`)}}async function jn(){if(process.stdin.isTTY)throw Error(`--from-file - requires JSON on stdin, but stdin is a TTY`);process.stdin.setEncoding(`utf8`);let e=``;for await(let t of process.stdin)e+=t;return e}var Mn=`--content-type`;function Nn(e,t,n){let r=e=>!n?.has(e)&&(n?.add(e),!0),i=t.requestBody??[];if(i.length>1&&r(Mn)){let t=i.map(({contentType:e})=>e);e.addOption(new b(`${Mn} <media-type>`,`Select the request content type; omit for ${t[0]}.`).choices(t).argParser(Fn(i)))}if($n(t)&&r(`--from-file`)){let n=i[0];if(n===void 0)throw Error(`${t.operationId} has no request body`);e.addOption(new b(`--from-file <path>`,En(n,n.requiredPath)).argParser(Ln(`--from-file`)))}let a=Sn(i).filter(e=>r(L(e.variant[0].parameter)));for(let t of a.toSorted((e,t)=>kn(e.variant[0].parameter,t.variant[0].parameter))){let{descriptor:n,parameter:r}=t.variant[0],a=new b(Cn(t),i.length>1?wn(t):Dn(n,r));i.length===1&&r.envName!==void 0&&a.env(r.envName);let o=i.length===1?Tn(n,r.optionKey):[];o.length>0&&a.conflicts(o),i.length>1?a.argParser(Pn):F(r.name)||r.schemaType===`array`?a.argParser(In):a.argParser(Ln(r.flag)),e.addOption(a),a.envVar!==void 0&&e.on(`optionEnv:${a.name()}`,()=>{let t=e.opts()[r.optionKey];typeof t==`string`&&t.trim()&&e.setOptionValueWithSource(r.optionKey,t.trim(),`env`)})}Qn(e,t,a)}function Pn(e,t){return t===void 0?e:typeof t==`string`?[t,e]:[...t,e]}function Fn(e){return(t,n)=>{if(n!==void 0)throw new _(`${Mn} was already given; pass it once.`);let r=o(e,t);if(!r.ok)throw new _(r.summary);return t}}function In(e,t){return[...t??[],e]}function Ln(e){let t=e.split(/\s+/u)[0]??e;return(e,n)=>{if(n!==void 0)throw new _(`${t} was already given; pass it once.`);return e}}async function Rn(t,n){let r=Qe(t,n),i=o(t.requestBody??[],r);if(!i.ok||i.data===null)return e(i.summary,i.warnings);let a=i.data;if(a===void 0)return y(`No body`,void 0);let s=zn(t,a,n);if(s!==null)return e(s);let c=Kt(t.operationId,a,n);if(!c.ok)return e(c.summary,c.warnings);n=c.data;let l=Bn(a,n);if(l!==null)return e(l);let u=await Wn(n);if(!u.ok)return e(u.summary,u.warnings);let d=ln(t.requestBody??[],a,u.data);if(d!==null)return e(d);let f=Un(t.operationId,a,u.data);if(!f.ok)return f;let p=qt(t.operationId,a,u.data);if(p!==null)return e(p);let m=Gn(t.operationId,a,n);if(!m.ok)return m;if(u.data===void 0&&m.data===void 0)return a.required?e(Zn(t.operationId,a)):y(`No body`,void 0);let h=qn(t.operationId,a,u.data,m.data);if(!h.ok||h.data===void 0)return h;if(a.schemaType===`array`&&!Array.isArray(h.data))return e(`${t.operationId} requires a JSON array body.`);if(a.parameter.length>0&&!I(h.data)){let n=a.kind===`multipart`?` keyed by multipart part name`:` body`;return e(`${t.operationId} requires a JSON object${n}.`)}let g=Hn(a,h.data);if(g.length>0)return e(`${t.operationId} requires body option(s): ${g.join(`, `)}`);let _=h.data,v=I(_)?Jt(a).filter(e=>!cn(_,e)):[];return v.length>0?e(Vn(t.operationId,a,v)):h}function zn(e,t,n){let r=new Set(t.parameter.map(({optionKey:e})=>e));for(let i of e.requestBody??[])if(i!==t)for(let t of i.parameter){if(r.has(t.optionKey)||n[t.optionKey]===void 0)continue;let i=(e.requestBody??[]).filter(e=>e.parameter.some(({optionKey:e})=>e===t.optionKey)).map(({contentType:e})=>e);return`${L(t)} requires ${Mn} ${i.join(` or `)}.`}return null}function Bn(e,t){for(let n of e.cliConflicts??[]){let e=n.filter(e=>t[e]!==void 0);if(e.length>1)return`Options ${e.join(`, `)} cannot be used together.`}return null}function Vn(e,t,n){let r=`${e} requires JSON body path(s): ${n.join(`, `)}`;return t.kind===`multipart`?`${r}. ${n.includes(`body`)?`For multipart --from-file, wrap the endpoint JSON under top-level "body".`:`For multipart --from-file, put the missing nested path(s) inside top-level "body".`}`:r}function Hn(e,t){return I(t)?e.parameter.filter(e=>e.required&&!cn(t,e.name)).map(L):[]}function Un(t,n,r){let i=dn(n,r);if(i===null)return y(`Body file paths validated`,null);let a=i.suggestion===void 0?``:` Use ${i.suggestion}.`;return e(`${t} --from-file contains unknown JSON path ${i.path}.${a}`)}async function Wn(t){let n=typeof t.fromFile==`string`?t.fromFile:void 0;if(n===void 0)return y(`No body file`,void 0);let r=await An(n);if(!r.ok)return e(r.summary,r.warnings);let i=a.safeParse(r.data);return i.success?y(`Input parsed`,i.data):e(`Input is not valid JSON value: ${i.error.message}`)}function Gn(t,n,r){let i={},a=!1;for(let t of n.parameter){let o=$t(t,r[t.optionKey]);if(!o.ok||o.data===null)return e(o.summary,o.warnings);let s=o.data;if(s===void 0)continue;let c=Kn(n,r,i,t,s);if(!c.ok)return e(c.summary,c.warnings);a=!0}if(!a)return y(`No direct body options`,void 0);let o=rn(t,n,r,i);return o===null?y(`Direct body options parsed`,i):o}function Kn(t,n,r,i,a){let o=tn(i,a);if(o===null){let t=Yn(i,a);return t.ok?Yt(r,i.name,t.data,i.schemaType===`array`):e(t.summary,t.warnings)}if(o.plain.length>0)return e(`${L(i)} mixes row-form values with plain value(s): ${o.plain.join(`, `)} — prefix every value with its 0-based ${o.container}[] row index, as 0:value.`);let s=nn(t,n,o.container);for(let t of o.rows.keys())if(!(t<s))return e(`${L(i)} names ${o.container}[] row ${t}, but these options build at most ${s} ${o.container}[] row(s) — number rows from 0, and name the row of a value that itself starts with digits and a colon, as 0:0:00 for the value 0:00.`);for(let[t,n]of o.rows){let a=[];for(let t of n){let n=Xn(i.name,i.itemSchemaType,t);if(!n.ok)return e(n.summary,n.warnings);a.push(n.data)}let o=Xt(r,i.name,t,a);if(!o.ok)return o}return y(`Body value assigned`,null)}var L=e=>e.flag.split(` `)[0]??e.name;function qn(t,n,r,i){if(r===void 0)return y(`Direct body parsed`,i);if(i===void 0)return y(`Input parsed`,r);if(I(r)&&I(i))try{return y(`Input parsed`,Jn(n,r,i))}catch(n){return e(`${t} ${n.message}`)}return e(`${t} cannot combine --from-file with direct body options unless the file body is an object.`)}function Jn(e,t,n,r=``){let i={...t};for(let[t,a]of Object.entries(n)){let n=i[t],o=`${r}${t}`;if(I(n)&&I(a))i[t]=Jn(e,n,a,`${o}.`);else if(n===void 0||n===a)i[t]=a;else throw Error(`sets JSON key '${o}' both in --from-file and with ${e.parameter.find(({name:e})=>e===o)?.flag.split(` `)[0]??`body options`} — set it in one place${Array.isArray(n)?`: move the per-item fields inside the matching '${o}[]' object(s) in the file body`:ct.test(o)?`; keep multi-line text in the --from-file body`:``}.`)}return i}function Yn(e,t){if(typeof t==`boolean`)return y(`Body value parsed`,t);if(t===void 0||typeof t==`string`)return Xn(e.name,e.schemaType,t??``);let n=[],r=F(e.name)&&e.schemaType!==`array`?e.schemaType:e.itemSchemaType;for(let i of t){let t=Xn(e.name,r,i);if(!t.ok)return t;n.push(t.data)}return y(`Body value parsed`,n)}function Xn(t,n,r){if(n===`boolean`)return r===`true`?y(`Body value parsed`,!0):r===`false`?y(`Body value parsed`,!1):e(`${t} must be true or false.`);if(n===`number`||n===`integer`){let i=r.trim(),a=Number(i);return i===``||!Number.isFinite(a)?e(`${t} must be a finite ${n}.`):n===`integer`&&!Number.isInteger(a)?e(`${t} must be an integer.`):y(`Body value parsed`,a)}return y(`Body value parsed`,r)}function Zn(e,t){let n=t.parameter.filter(e=>e.required);if(n.length>0&&t.requiredPath.every(e=>n.some(({name:t})=>t===e||t.startsWith(`${e}.`))))return`${e} requires body option(s): ${n.map(L).join(`, `)}`;let r=Jt(t);if(r.length>0)return`${e} requires --from-file with JSON body path(s): ${r.join(`, `)}`;let i=t.parameter.map(L).join(`, `);return i.length===0?`${e} requires --from-file`:`${e} requires --from-file or body option(s): ${i}`}function Qn(e,t,n){let r=[...t.parameters,...n.map(({variant:e})=>e[0].parameter)];(t.requestBody?.length??0)>1&&r.push({optionKey:`contentType`,flag:Mn,location:`body`}),$n(t)&&r.push({optionKey:`fromFile`,flag:`--from-file`,location:`body`}),xn(e.options,r)}function $n(e){return(e.requestBody??[]).some(e=>e.kind!==`multipart`||e.parameter.some(e=>e.schemaFormat!==`binary`))}function er(e){let t=ne(e);return lr(t),process.stdout.write(`${JSON.stringify(t)}\n`),t}function tr(e){let t=ne(e);lr(t);let n=_t(t.data,t.summary),r=[];if(t.ok&&n!==null){let e=nr(t);r.push(n.endsWith(`
|
|
1
|
+
import{Ai as e,Ci as t,Di as n,E as r,Ei as i,Mi as a,O as o,Si as s,T as c,Ti as l,_ as u,a as d,b as f,bi as p,c as m,ca as h,d as g,fa as _,g as v,gi as ee,i as te,ji as y,ki as ne,l as re,la as b,li as ie,m as ae,n as oe,o as se,r as ce,si as le,u as ue,ua as de,vi as x,w as fe,y as pe}from"./dist-C3Vg_DX8.js";import{M as me,O as he,i as S,o as ge,v as _e,w as C,y as w}from"./person-owner-BJgNYLKX.js";import{A as ve,C as ye,D as be,E as xe,M as Se,N as Ce,O as T,S as we,T as Te,_ as Ee,a as De,b as Oe,c as ke,h as Ae,i as je,k as Me,l as Ne,o as Pe,p as Fe,s as Ie,t as Le,u as Re,v as ze,x as Be,y as Ve}from"./oauth-bearer-credential-DgGbUA--.js";import{c as He,d as Ue,h as We,m as Ge,o as Ke,p as qe,s as Je,u as Ye}from"./text-field-Dmarnkra.js";import{a as Xe,c as Ze,d as Qe,f as $e,g as et,h as tt,l as nt,m as rt,n as it,o as E,p as at,r as D,s as ot,t as O,u as st}from"./openapi-commands-LMKvHwm7.js";import{a as ct,c as lt,d as ut,i as k,l as dt,m as ft,n as pt,o as mt,r as ht,s as gt,t as _t}from"./text-response-BPT_U3_Q.js";import{n as vt,r as yt,t as bt}from"./oauth-login-CgMvKnfG.js";import{spawnSync as xt}from"node:child_process";import{basename as St,dirname as A,resolve as j,sep as M}from"node:path";import{copyFileSync as Ct,existsSync as wt,lstatSync as Tt,mkdirSync as Et,mkdtempSync as Dt,readFileSync as Ot,readlinkSync as kt,realpathSync as At,renameSync as jt,rmdirSync as Mt,unlinkSync as Nt,writeFileSync as Pt}from"node:fs";import N,{stderr as P,stdin as Ft}from"node:process";import{TextDecoder as It,inspect as Lt}from"node:util";import{homedir as Rt,hostname as zt,platform as Bt}from"node:os";import{fileURLToPath as Vt}from"node:url";import{readFile as Ht}from"node:fs/promises";import{setTimeout as Ut}from"node:timers/promises";import{webcrypto as Wt}from"node:crypto";import{createInterface as Gt}from"node:readline/promises";function Kt(t,n,r){let i={...r};for(let r of n.parameter){let n=r.envName;if(n===void 0)continue;let a=process.env[n]?.trim();if(a===void 0||a.length===0)continue;let o=i[r.optionKey];if(o!==void 0&&(typeof o!=`string`||o!==a))return{...e(`${t} ${r.flag.split(` `)[0]??r.name} conflicts with ${n}; omit the flag or use ${a}.`),data:i};o===void 0&&(i[r.optionKey]=a)}return y(`Environment-bound options applied`,i)}function qt(e,t,n){if(!I(n))return null;for(let r of t.parameter){let t=r.envName,i=t===void 0?void 0:process.env[t]?.trim();if(t===void 0||i===void 0||i.length===0||!cn(n,r.name))continue;let a=sn(n,r.name);if(typeof a!=`string`||a!==i)return`${e} ${r.name} in --from-file conflicts with ${t}; omit the field or use ${i}.`}return null}function Jt(e){let t=new Set(e.parameter.map(({name:e})=>e));return e.kind===`multipart`?e.requiredPath:e.requiredPath.filter(e=>!t.has(e))}function Yt(e,t,n,r=!1){if(r||!F(t)||!Array.isArray(n))return fn(e,t,n);for(let[r,i]of n.entries()){let n=fn(e,t,i,r);if(!n.ok)return n}return y(`Body value assigned`,null)}function Xt(e,t,n,r){return fn(e,t,r,n)}function Zt(e){let t=[];for(let n of e.split(`.`)){let e=mn(n);if(t.push(e.key),e.isArray)return t.join(`.`)}return null}function Qt(e,t){let n=Zt(t);if(n===null)return null;let r=on(e,n.split(`.`));return Array.isArray(r)?{path:n,rowCount:r.length,firstHole:an(r)}:null}function $t(t,n){if(F(t.name)||t.schemaType===`array`)return y(`Repeated body option selected`,typeof n==`string`?[n]:n);if(!Array.isArray(n))return y(`Scalar body option selected`,n);let r=t.flag.split(` `)[0]??t.name;return n.length===1?y(`Scalar body option selected`,n[0]):e(`${r} was already given; pass it once.`)}var en=/^(?<row>\d+):(?<item>.*)$/su;function tn(e,t){let n=Zt(e.name);if(e.schemaType!==`array`||n===null||t===void 0||typeof t==`boolean`)return null;let r=new Map,i=[];for(let e of typeof t==`string`?[t]:t){let t=en.exec(e)?.groups,n=t?.row,a=t?.item;if(n===void 0||a===void 0){i.push(e);continue}let o=r.get(Number(n));o===void 0?r.set(Number(n),[a]):o.push(a)}return r.size===0?null:{container:n,rows:r,plain:i}}function nn(e,t,n){let r=0;for(let i of e.parameter){let e=t[i.optionKey];e!==void 0&&typeof e!=`boolean`&&Zt(i.name)===n&&(r=Math.max(r,typeof e==`string`?1:e.length))}return r}function rn(t,n,r,i){for(let a of n.parameter){let n=r[a.optionKey];if(n===void 0)continue;let o=Qt(i,a.name);if(o===null)continue;if(o.firstHole!==null)return e(`${t} has no ${o.path}[] row ${o.firstHole} — number ${o.path}[] rows from 0 with no gaps.`);if(a.schemaType!==`array`||o.rowCount<=1||tn(a,n)!==null)continue;let s=a.flag.split(` `)[0]??a.name;return e(`${s} fills one ${o.path}[] row's list, so ${t} cannot also build ${o.rowCount} ${o.path}[] rows from direct options — prefix each value with its 0-based ${o.path}[] row index, as 0:value, or pass the rows with --from-file.`)}return null}function an(e){for(let t=0;t<e.length;t+=1)if(e[t]===void 0)return t;return null}function on(e,t){let n=e;for(let e of t){if(!I(n))return;n=n[e]??null}return n}function sn(e,t){if(!F(t))return on(e,t.split(`.`))}function cn(e,t){return un(e,t.split(`.`))}function ln(e,t,n){if(!I(n))return null;let r=new Set(t.parameter.map(({name:e})=>e));for(let i of e)if(i!==t){for(let e of i.parameter)if(!r.has(e.name)&&cn(n,e.name))return`${e.name} in --from-file requires --content-type ${i.contentType}.`}return null}function un(e,t){let[n,...r]=t;if(n===void 0)return!0;let i=mn(n);if(!I(e)||!Object.hasOwn(e,i.key))return!1;let a=e[i.key]??null;return i.isArray?Array.isArray(a)&&a.every(e=>un(e,r)):un(a,r)}function F(e){return e.split(`.`).some(e=>mn(e).isArray)}function dn(e,t){return e.parameter.length===0||!I(t)?null:gn(t,[],hn(e.parameter))}function I(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fn(t,n,r,i=0){let a=n.split(`.`),o=t;for(let[t,s]of a.entries()){let c=mn(s),l=t===a.length-1,u=pn(o,c,n,l,r,i);if(!u.ok||u.data===null)return e(u.summary,u.warnings);if(l)return y(`Body value assigned`,null);o=u.data}return e(`${n} is not a valid body option path.`)}function pn(t,n,r,i,a,o){let s=()=>e(`${r} cannot be combined with another body option at ${n.key}.`),c=t[n.key];if(n.isArray){if(c!==void 0&&!Array.isArray(c))return s();let e=c??[];if(c===void 0&&(t[n.key]=e),i)return e[o]===void 0?(e[o]=a,y(`Body value assigned`,t)):s();let r=e[o];if(r===void 0){let t={};return e[o]=t,y(`Body path created`,t)}return I(r)?y(`Body path stepped`,r):s()}if(i)return c===void 0?(t[n.key]=a,y(`Body value assigned`,t)):s();if(c===void 0){let e={};return t[n.key]=e,y(`Body path created`,e)}return I(c)?y(`Body path stepped`,c):s()}function mn(e){let t=e.endsWith(`[]`);return{key:t?e.slice(0,-2):e,isArray:t}}function hn(e){let t=new Set,n=new Set;for(let r of e){let e=`${r.name}${r.schemaType===`array`?`[]`:``}`;t.add(e);let i=e.split(`.`);for(let e=1;e<i.length;e+=1)n.add(i.slice(0,e).join(`.`))}return{leaf:t,prefix:n}}function gn(e,t,n){if(Array.isArray(e)){if(e.length===0)return null;for(let r of e){let e=gn(r,t,n);if(e!==null)return e}return null}if(!I(e))return null;for(let[r,i]of Object.entries(e)){let e=[...t,Array.isArray(i)?`${r}[]`:r],a=e.join(`.`);if(!_n(a,n)){if(!vn(e))continue;return{path:a,suggestion:yn(e,n)}}let o=gn(i,e,n);if(o!==null)return o}return null}function _n(e,t){return t.prefix.has(e)||t.leaf.has(e)}function vn(e){return e.slice(0,-1).some(e=>e.endsWith(`[]`))}function yn(e,t){let n=e.slice(0,-1).join(`.`),r=e.at(-1)?.replace(/\[\]$/u,``).toLowerCase()??``;return[...t.leaf].filter(e=>e.split(`.`).slice(0,-1).join(`.`)===n).map(e=>({path:e,score:bn(r,e.split(`.`).at(-1)??``)})).filter(({score:e})=>e<1/0).toSorted((e,t)=>e.score-t.score||e.path.localeCompare(t.path))[0]?.path}function bn(e,t){let n=t.replace(/\[\]$/u,``).toLowerCase();return n===e?0:n.endsWith(e)||e.endsWith(n)?1:n.includes(e)||e.includes(n)?2:1/0}function xn(e,t){let n=new Map;for(let e of t){let t=e.flag?.split(` `)[0];t!==void 0&&n.set(t,t===`--from-file`?{...e,inputType:`file`}:e)}for(let t of e){let e=t.long===void 0?void 0:n.get(t.long);e!==void 0&&(t.helpGroup(Ge(e)),t.description=m(t.description,{...e,hasParseDefault:t.defaultValue!==void 0}))}e.sort((e,t)=>{let r=e.long===void 0?void 0:n.get(e.long),i=t.long===void 0?void 0:n.get(t.long);return r!==void 0&&i!==void 0?kn(r,i):r===void 0?i===void 0?0:1:-1})}function Sn(e){let t=new Map;for(let n of e)for(let e of n.parameter){let r=e.flag.split(` `)[0]??e.flag,i=t.get(r);i===void 0?t.set(r,{variant:[{descriptor:n,parameter:e}]}):t.set(r,{variant:[...i.variant,{descriptor:n,parameter:e}]})}return[...t.values()]}function Cn(e){let{flag:t}=e.variant[0].parameter;return e.variant.every(({parameter:e})=>e.flag===t)?t:`${t.split(` `)[0]??t} <value>`}function wn(e){let t=e.variant.map(({descriptor:e,parameter:t})=>({contentType:e.contentType,text:Dn(e,t)})),n=t[0];return n===void 0?``:t.every(({text:e})=>e===n.text)?`${n.text===``?``:`${n.text} `}Request content: ${t.map(({contentType:e})=>e).join(`, `)}.`:t.map(({contentType:e,text:t})=>`${e}: ${t}`).join(` `)}function Tn(e,t){return[...new Set((e.cliConflicts??[]).filter(e=>e.includes(t)).flatMap(e=>e.filter(e=>e!==t)))]}function En(e,t){let n=e.kind===`multipart`?`Read a JSON object keyed by multipart part name from a file, or use - for stdin`:`Read the JSON request body from a file, or use - for stdin`,r=t.filter(e=>!t.some(t=>t.startsWith(`${e}.`)||t.startsWith(`${e}[].`)));return r.length===0?We(n):`${We(n)} Required JSON paths: ${r.join(`, `)}.`}function Dn(e,t){let n=Ue(t.description,void 0),r=e.kind!==`multipart`&&F(t.name),i=e.kind!==`multipart`&&t.optionKey!==t.name&&/^\w+$/u.test(t.name);return`${n}${r?` Repeat to add another value.`:``}${i?` --from-file JSON key: ${t.name}.`:``}${On(e,t)}`}function On(e,t){if(e.kind===`multipart`||t.schemaType!==`array`)return``;let n=Zt(t.name);return n===null?``:` Prefix each value with its 0-based ${n}[] row index, as 0:value, to fill more than one ${n}[] row. A leading digits-and-colon is always read as that index, so name the row of a value that starts the same way, as 0:0:00 for the value 0:00.`}function kn(e,t){return qe(e)-qe(t)||Number(e.required!==!0)-Number(t.required!==!0)}async function An(t){let n;try{n=t===`-`?await jn():await Ht(t,`utf8`)}catch(n){return e(`Could not read input: ${n.message}`,[`path=${t}`])}try{if(n.trim().length===0)return y(`No input provided`,null);let e=JSON.parse(n);return y(`Input parsed`,e)}catch(t){return e(`Input is not valid JSON: ${t.message}`)}}async function jn(){if(process.stdin.isTTY)throw Error(`--from-file - requires JSON on stdin, but stdin is a TTY`);process.stdin.setEncoding(`utf8`);let e=``;for await(let t of process.stdin)e+=t;return e}var Mn=`--content-type`;function Nn(e,t,n){let r=e=>!n?.has(e)&&(n?.add(e),!0),i=t.requestBody??[];if(i.length>1&&r(Mn)){let t=i.map(({contentType:e})=>e);e.addOption(new b(`${Mn} <media-type>`,`Select the request content type; omit for ${t[0]}.`).choices(t).argParser(Fn(i)))}if($n(t)&&r(`--from-file`)){let n=i[0];if(n===void 0)throw Error(`${t.operationId} has no request body`);e.addOption(new b(`--from-file <path>`,En(n,n.requiredPath)).argParser(Ln(`--from-file`)))}let a=Sn(i).filter(e=>r(L(e.variant[0].parameter)));for(let t of a.toSorted((e,t)=>kn(e.variant[0].parameter,t.variant[0].parameter))){let{descriptor:n,parameter:r}=t.variant[0],a=new b(Cn(t),i.length>1?wn(t):Dn(n,r));i.length===1&&r.envName!==void 0&&a.env(r.envName);let o=i.length===1?Tn(n,r.optionKey):[];o.length>0&&a.conflicts(o),i.length>1?a.argParser(Pn):F(r.name)||r.schemaType===`array`?a.argParser(In):a.argParser(Ln(r.flag)),e.addOption(a),a.envVar!==void 0&&e.on(`optionEnv:${a.name()}`,()=>{let t=e.opts()[r.optionKey];typeof t==`string`&&t.trim()&&e.setOptionValueWithSource(r.optionKey,t.trim(),`env`)})}Qn(e,t,a)}function Pn(e,t){return t===void 0?e:typeof t==`string`?[t,e]:[...t,e]}function Fn(e){return(t,n)=>{if(n!==void 0)throw new _(`${Mn} was already given; pass it once.`);let r=o(e,t);if(!r.ok)throw new _(r.summary);return t}}function In(e,t){return[...t??[],e]}function Ln(e){let t=e.split(/\s+/u)[0]??e;return(e,n)=>{if(n!==void 0)throw new _(`${t} was already given; pass it once.`);return e}}async function Rn(t,n){let r=Qe(t,n),i=o(t.requestBody??[],r);if(!i.ok||i.data===null)return e(i.summary,i.warnings);let a=i.data;if(a===void 0)return y(`No body`,void 0);let s=zn(t,a,n);if(s!==null)return e(s);let c=Kt(t.operationId,a,n);if(!c.ok)return e(c.summary,c.warnings);n=c.data;let l=Bn(a,n);if(l!==null)return e(l);let u=await Wn(n);if(!u.ok)return e(u.summary,u.warnings);let d=ln(t.requestBody??[],a,u.data);if(d!==null)return e(d);let f=Un(t.operationId,a,u.data);if(!f.ok)return f;let p=qt(t.operationId,a,u.data);if(p!==null)return e(p);let m=Gn(t.operationId,a,n);if(!m.ok)return m;if(u.data===void 0&&m.data===void 0)return a.required?e(Zn(t.operationId,a)):y(`No body`,void 0);let h=qn(t.operationId,a,u.data,m.data);if(!h.ok||h.data===void 0)return h;if(a.schemaType===`array`&&!Array.isArray(h.data))return e(`${t.operationId} requires a JSON array body.`);if(a.parameter.length>0&&!I(h.data)){let n=a.kind===`multipart`?` keyed by multipart part name`:` body`;return e(`${t.operationId} requires a JSON object${n}.`)}let g=Hn(a,h.data);if(g.length>0)return e(`${t.operationId} requires body option(s): ${g.join(`, `)}`);let _=h.data,v=I(_)?Jt(a).filter(e=>!cn(_,e)):[];return v.length>0?e(Vn(t.operationId,a,v)):h}function zn(e,t,n){let r=new Set(t.parameter.map(({optionKey:e})=>e));for(let i of e.requestBody??[])if(i!==t)for(let t of i.parameter){if(r.has(t.optionKey)||n[t.optionKey]===void 0)continue;let i=(e.requestBody??[]).filter(e=>e.parameter.some(({optionKey:e})=>e===t.optionKey)).map(({contentType:e})=>e);return`${L(t)} requires ${Mn} ${i.join(` or `)}.`}return null}function Bn(e,t){for(let n of e.cliConflicts??[]){let e=n.filter(e=>t[e]!==void 0);if(e.length>1)return`Options ${e.join(`, `)} cannot be used together.`}return null}function Vn(e,t,n){let r=`${e} requires JSON body path(s): ${n.join(`, `)}`;return t.kind===`multipart`?`${r}. ${n.includes(`body`)?`For multipart --from-file, wrap the endpoint JSON under top-level "body".`:`For multipart --from-file, put the missing nested path(s) inside top-level "body".`}`:r}function Hn(e,t){return I(t)?e.parameter.filter(e=>e.required&&!cn(t,e.name)).map(L):[]}function Un(t,n,r){let i=dn(n,r);if(i===null)return y(`Body file paths validated`,null);let a=i.suggestion===void 0?``:` Use ${i.suggestion}.`;return e(`${t} --from-file contains unknown JSON path ${i.path}.${a}`)}async function Wn(t){let n=typeof t.fromFile==`string`?t.fromFile:void 0;if(n===void 0)return y(`No body file`,void 0);let r=await An(n);if(!r.ok)return e(r.summary,r.warnings);let i=a.safeParse(r.data);return i.success?y(`Input parsed`,i.data):e(`Input is not valid JSON value: ${i.error.message}`)}function Gn(t,n,r){let i={},a=!1;for(let t of n.parameter){let o=$t(t,r[t.optionKey]);if(!o.ok||o.data===null)return e(o.summary,o.warnings);let s=o.data;if(s===void 0)continue;let c=Kn(n,r,i,t,s);if(!c.ok)return e(c.summary,c.warnings);a=!0}if(!a)return y(`No direct body options`,void 0);let o=rn(t,n,r,i);return o===null?y(`Direct body options parsed`,i):o}function Kn(t,n,r,i,a){let o=tn(i,a);if(o===null){let t=Yn(i,a);return t.ok?Yt(r,i.name,t.data,i.schemaType===`array`):e(t.summary,t.warnings)}if(o.plain.length>0)return e(`${L(i)} mixes row-form values with plain value(s): ${o.plain.join(`, `)} — prefix every value with its 0-based ${o.container}[] row index, as 0:value.`);let s=nn(t,n,o.container);for(let t of o.rows.keys())if(!(t<s))return e(`${L(i)} names ${o.container}[] row ${t}, but these options build at most ${s} ${o.container}[] row(s) — number rows from 0, and name the row of a value that itself starts with digits and a colon, as 0:0:00 for the value 0:00.`);for(let[t,n]of o.rows){let a=[];for(let t of n){let n=Xn(i.name,i.itemSchemaType,t);if(!n.ok)return e(n.summary,n.warnings);a.push(n.data)}let o=Xt(r,i.name,t,a);if(!o.ok)return o}return y(`Body value assigned`,null)}var L=e=>e.flag.split(` `)[0]??e.name;function qn(t,n,r,i){if(r===void 0)return y(`Direct body parsed`,i);if(i===void 0)return y(`Input parsed`,r);if(I(r)&&I(i))try{return y(`Input parsed`,Jn(n,r,i))}catch(n){return e(`${t} ${n.message}`)}return e(`${t} cannot combine --from-file with direct body options unless the file body is an object.`)}function Jn(e,t,n,r=``){let i={...t};for(let[t,a]of Object.entries(n)){let n=i[t],o=`${r}${t}`;if(I(n)&&I(a))i[t]=Jn(e,n,a,`${o}.`);else if(n===void 0||n===a)i[t]=a;else throw Error(`sets JSON key '${o}' both in --from-file and with ${e.parameter.find(({name:e})=>e===o)?.flag.split(` `)[0]??`body options`} — set it in one place${Array.isArray(n)?`: move the per-item fields inside the matching '${o}[]' object(s) in the file body`:ct.test(o)?`; keep multi-line text in the --from-file body`:``}.`)}return i}function Yn(e,t){if(typeof t==`boolean`)return y(`Body value parsed`,t);if(t===void 0||typeof t==`string`)return Xn(e.name,e.schemaType,t??``);let n=[],r=F(e.name)&&e.schemaType!==`array`?e.schemaType:e.itemSchemaType;for(let i of t){let t=Xn(e.name,r,i);if(!t.ok)return t;n.push(t.data)}return y(`Body value parsed`,n)}function Xn(t,n,r){if(n===`boolean`)return r===`true`?y(`Body value parsed`,!0):r===`false`?y(`Body value parsed`,!1):e(`${t} must be true or false.`);if(n===`number`||n===`integer`){let i=r.trim(),a=Number(i);return i===``||!Number.isFinite(a)?e(`${t} must be a finite ${n}.`):n===`integer`&&!Number.isInteger(a)?e(`${t} must be an integer.`):y(`Body value parsed`,a)}return y(`Body value parsed`,r)}function Zn(e,t){let n=t.parameter.filter(e=>e.required);if(n.length>0&&t.requiredPath.every(e=>n.some(({name:t})=>t===e||t.startsWith(`${e}.`))))return`${e} requires body option(s): ${n.map(L).join(`, `)}`;let r=Jt(t);if(r.length>0)return`${e} requires --from-file with JSON body path(s): ${r.join(`, `)}`;let i=t.parameter.map(L).join(`, `);return i.length===0?`${e} requires --from-file`:`${e} requires --from-file or body option(s): ${i}`}function Qn(e,t,n){let r=[...t.parameters,...n.map(({variant:e})=>e[0].parameter)];(t.requestBody?.length??0)>1&&r.push({optionKey:`contentType`,flag:Mn,location:`body`}),$n(t)&&r.push({optionKey:`fromFile`,flag:`--from-file`,location:`body`}),xn(e.options,r)}function $n(e){return(e.requestBody??[]).some(e=>e.kind!==`multipart`||e.parameter.some(e=>e.schemaFormat!==`binary`))}function er(e){let t=ne(e);return lr(t),process.stdout.write(`${JSON.stringify(t)}\n`),t}function tr(e){let t=ne(e);lr(t);let n=_t(t.data,t.summary),r=[];if(t.ok&&n!==null){let e=nr(t);r.push(n.endsWith(`
|
|
2
2
|
`)?n.slice(0,-1):n),r.push(...e),process.stdout.write(pt(r.join(`
|
|
3
3
|
`),!0,!0,e.length));return}let i=t.ok?`OK`:`FAIL`;r.push(`[${i}] ${t.summary}`),!t.ok&&t.problem!==void 0&&r.push(...ar(t.problem)),r.push(...nr(t)),process.stdout.write(pt(r.join(`
|
|
4
4
|
`),!0))}function nr(e){let t=[];e.ids.length>0&&t.push(` ids: ${e.ids.join(`, `)}`);for(let[n,r]of Object.entries(e.counts))t.push(` ${n}: ${r}`);for(let n of e.references)t.push(` ref: ${n}`);if(e.truncation!==void 0){let n=e.truncation.omitted.join(`, `);t.push(` truncated: byteLength=${e.truncation.byteLength} maxBytes=${e.truncation.maxBytes} omitted=${n}`,` recovery: ${e.truncation.recovery}`)}for(let n of e.warnings)t.push(` warn: ${n}`);return t}function R(e,t){if(e.mode===`data`||e.mode===`data-full`){let n=e.mode===`data`?ne(t):t;lr(n),process.stdout.write(`${JSON.stringify(n.ok&&n.truncated!==!0?rr(n.data):n)}\n`),n.ok||(process.exitCode=1);return}let n=e.mode===`json`?er(t):t;e.mode===`text`&&tr(n),n.ok||(process.exitCode=1)}function rr(e){return typeof e!=`object`||!e||Array.isArray(e)||!Reflect.has(e,`method`)||!Reflect.has(e,`endpoint`)||!(`response`in e)||e.response===void 0?e:e.response}function ir(e,t){let n=ht(t);if(n===null){process.stderr.write(`explain: the response carried no search interpretation
|
|
@@ -27,7 +27,7 @@ import{Ai as e,Ci as t,Di as n,E as r,Ei as i,Mi as a,O as o,Si as s,T as c,Ti a
|
|
|
27
27
|
`).slice(-3).join(` | `);return e(`npm ${t.join(` `)} exited ${o.status}`,[n||`no stderr`])}return y(`npm ok`,o.stdout??``)}function Ja(e,t,n){let r=e===null?``:` --prefix ${JSON.stringify(e.installPrefix)}`;return[`Finish by hand: npm uninstall -g${r} ${ee}`,`then: npm install -g${r} ${t}@${n} --@aventurevc:registry=`]}function Ya(t,n,r){let i;try{let e=x(j(t,`lib`,`node_modules`,...n.split(`/`),`package.json`));i=j(t,`bin`,e.bin[0])}catch(t){return e(`updated ${n} verification failed: ${K(t)}`,[`invalid_package_metadata`])}let a=xt(process.execPath,[i,`--version`],{encoding:`utf8`});if(a.error)return e(`updated ${n} verification failed: ${a.error.message}`,[`spawn_error`]);let o=(a.stdout??``).trim();if(a.status!==0||o!==r){let t=(a.stderr??``).trim().split(`
|
|
28
28
|
`).slice(-3).join(` | `);return e(`updated ${n} verification expected ${r} but active bin reported ${o||`empty output`}`,[t||`active bin: ${i}`])}return y(`active CLI version verified`,o)}function Xa(e){let t=`${M}lib${M}node_modules${M}${e.name.replace(`/`,M)}`,n=e.packageRoot.lastIndexOf(t);return n<0?null:{installPrefix:e.packageRoot.slice(0,n)}}function Za(e,t){if(e.name!==`@aventurevc/mcp-server`)return{backup:[],backupDirectory:null};if(t===null)throw Error(`the running MCP package is not in a verifiable global npm prefix`);if(!e.entryPath.startsWith(`${e.packageRoot}${M}`))throw Error(`the running CLI entry is outside the MCP package root`);let n=e.bin.filter(e=>e===`aventure`||e===`aventure-cli`).flatMap(n=>{let r=j(t.installPrefix,`bin`,n),i=Tt(r,{throwIfNoEntry:!1});if(i===void 0)return[];if(!i.isSymbolicLink())throw Error(`${r} is not a symlink`);let a;try{a=At(r)}catch(e){throw Error(`${r} has a missing target`,{cause:e})}if(a!==e.entryPath)throw Error(`${r} is not owned by the running MCP CLI`);return{binPath:r,linkTarget:kt(r)}});if(n.length===0)return{backup:[],backupDirectory:null};let r=Dt(j(t.installPrefix,`bin`,`.aventure-cli-update-`)),i=n.map(({binPath:e,linkTarget:t})=>({backupPath:j(r,St(e)),binPath:e,linkTarget:t})),a=[];try{for(let e of i)if(jt(e.binPath,e.backupPath),a.push(e),kt(e.backupPath)!==e.linkTarget)throw Error(`${e.binPath} changed ownership while preparing the update`)}catch(e){let t=Qa({backup:a,backupDirectory:r},null);throw Error(`could not displace verified MCP CLI bins${t===null?``:`; restoration failed: ${t}`}`,{cause:e})}return{backup:a,backupDirectory:r}}function Qa(e,t){let n=[];for(let r of e.backup.toReversed())try{let e=Tt(r.binPath,{throwIfNoEntry:!1});if(e!==void 0){if(!e.isSymbolicLink())throw Error(`${r.binPath} is not a symlink`);let n=j(A(r.binPath),kt(r.binPath));if(t===null||n!==t&&!n.startsWith(`${t}${M}`))throw Error(`${r.binPath} is not owned by the standalone CLI package`);Nt(r.binPath)}jt(r.backupPath,r.binPath)}catch(e){n.push(K(e))}if(e.backupDirectory!==null)try{Mt(e.backupDirectory)}catch(e){n.push(K(e))}return n.length===0?null:n.join(`; `)}function $a(e){let t=[];for(let n of e.backup)try{Nt(n.backupPath)}catch(e){t.push(K(e))}if(e.backupDirectory!==null)try{Mt(e.backupDirectory)}catch(e){t.push(K(e))}return t.length===0?null:t.join(`; `)}function K(e){return e instanceof Error?e.message:String(e)}function eo(){try{return Da()}catch(e){return{refreshed:!1,message:e instanceof Error?e.message:String(e)}}}var to=[{name:`cli-version`,purpose:`running CLI against the latest published release`},{name:`api-schemas`,purpose:`the installed @aventurevc/api-schemas contracts resolve`},{name:`api-host`,purpose:`the selected API host answers its generated status operation`},{name:`auth`,purpose:`which credential scope materialized locally, never the secret`},{name:`catalog`,purpose:`this CLI knows every operation the API serves`}],no=`operationFingerprint`;function ro(e,t=x().bin[0]){D(e.command(`doctor`).summary(`One-call selftest: CLI version, schemas, API host, auth scope, command catalog`).description(["Run every environment check in one call and report `{ ok, check: [...] }`:",...to.map(e=>` - ${e.name}: ${e.purpose}`),``,`Exit code is 0 only when no check failed; a skipped check (no registry reachable)`,`does not fail the run. Each failing message names the command that fixes it.`,"--json always carries the report at `.data`; --data prints the report directly when",`every check passes and the result envelope when one fails, like every other command.`].join(`
|
|
29
29
|
`))).action(async function(e){let n=this.optsWithGlobals();n.environment!==void 0&&(process.env.API_ENV=n.environment),R({mode:E(e)},await io(t))})}async function io(t){let n=oo(),r=so(t),[i,a]=await Promise.all([co(t),lo(n,t)]),o=[r.check,i,a.check,await fo(t),vo(n,a.servedFingerprint,r.upgradeAvailable,t)],s={pass:ao(o,`pass`),fail:ao(o,`fail`),skip:ao(o,`skip`)},c=o.filter(e=>e.status===`fail`).map(e=>e.message),l={ok:c.length===0,check:o},u=[`doctor: ${s.pass} pass, ${s.fail} fail, ${s.skip} skip`,...o.map(e=>` ${e.name} ${e.status} — ${e.message}`)].join(`
|
|
30
|
-
`);return l.ok?y(u,l,{counts:s}):{...e(u,c,{counts:s}),data:l}}function ao(e,t){return e.filter(e=>e.status===t).length}function q(e,t,n){return{name:e,status:t,message:n}}function oo(){return O.find(e=>e.intent===`status`&&e.resource===`status`)}function so(e){let t=x(),n=Ka(t,`check`);if(!n.ok||n.data===null)return{check:q(`cli-version`,`skip`,`Could not compare ${t.version} against the registry (${n.summary}); rerun \`${e} update\` with registry access.`),upgradeAvailable:null};let{targetPackage:r,currentVersion:i,latestVersion:a,upgradeAvailable:o}=n.data;return{check:o?q(`cli-version`,`fail`,`Upgrade ${r} from ${i} to ${a}: run \`${e} update\`.`):q(`cli-version`,`pass`,`${r} ${i} matches the latest published release.`),upgradeAvailable:o}}async function co(e){try{let{EntityDetailSchema:e}=await import(`./detail-
|
|
30
|
+
`);return l.ok?y(u,l,{counts:s}):{...e(u,c,{counts:s}),data:l}}function ao(e,t){return e.filter(e=>e.status===t).length}function q(e,t,n){return{name:e,status:t,message:n}}function oo(){return O.find(e=>e.intent===`status`&&e.resource===`status`)}function so(e){let t=x(),n=Ka(t,`check`);if(!n.ok||n.data===null)return{check:q(`cli-version`,`skip`,`Could not compare ${t.version} against the registry (${n.summary}); rerun \`${e} update\` with registry access.`),upgradeAvailable:null};let{targetPackage:r,currentVersion:i,latestVersion:a,upgradeAvailable:o}=n.data;return{check:o?q(`cli-version`,`fail`,`Upgrade ${r} from ${i} to ${a}: run \`${e} update\`.`):q(`cli-version`,`pass`,`${r} ${i} matches the latest published release.`),upgradeAvailable:o}}async function co(e){try{let{EntityDetailSchema:e}=await import(`./detail-CRrDl0B1.js`);if(typeof e.safeParse!=`function`)throw Error(`EntityDetailSchema does not expose a Zod parser`);return q(`api-schemas`,`pass`,`Installed @aventurevc/api-schemas contracts resolve beyond the CLI startup path.`)}catch(t){return q(`api-schemas`,`fail`,`Reinstall the CLI: run \`${e} update\` — ${T(t)}.`)}}async function lo(t,r){if(t===void 0)return{check:q(`api-host`,`skip`,`No status operation resolved from the generated catalog; fix the catalog check first.`),servedFingerprint:null};let i;try{i=n().host}catch(e){return{check:q(`api-host`,`fail`,`Correct API_ENV or pass \`--environment <name>\` — ${T(e)}.`),servedFingerprint:null}}let a=await se({method:t.method,path:t.path,auth:t.auth,responseFormat:`json`}).catch(t=>e(T(t)));return a.ok?{check:q(`api-host`,`pass`,`${t.method} ${t.path} answered at ${i}.`),servedFingerprint:uo(a.data)}:{check:q(`api-host`,`fail`,a.httpStatus===401?`Replace or unset the credential ${i} rejected, or run \`${r} auth login\`, then rerun \`${r} auth doctor\` — ${t.method} ${t.path} returned ${a.summary}.`:`Point the CLI at a reachable API host with \`--environment <name>\` or API_URL, then rerun \`${r} auth doctor\` — ${t.method} ${t.path} at ${i} returned ${a.summary}.`),servedFingerprint:null}}function uo(e){if(typeof e!=`object`||!e||e instanceof Uint8Array)return null;let{response:t}=e;if(typeof t!=`object`||!t||Array.isArray(t))return null;let n=t[no];return typeof n==`string`&&n.length>0?n:null}async function fo(e){let t=be(),[n,r]=await Promise.all([po(),mo()]);if(r.state===`unavailable`&&r.cause===`environment`)return q(`auth`,`fail`,`Fix the environment configuration first — ${r.summary}.`);let i=t.present,a=r.state===`found`&&r.stored.activation===`active`;return!i&&n.state===`invalid`?q(`auth`,`fail`,`Saved OAuth credential is invalid; run \`${e} auth login\` to sign in again after verification — ${n.summary}.`):!i&&n.state===`found`&&Ie(n.stored.credential)&&n.stored.credential.tokens.refresh_token===void 0?q(`auth`,`fail`,`Saved OAuth access token is expired without a refresh token; run \`${e} auth login\` to sign in again.`):!i&&!a&&n.state===`unavailable`?q(`auth`,`fail`,`Make the OS keyring or the CLI config directory usable before \`${e} auth login\`, or inject ${p.authToken} through the environment — ${n.summary}.`):i||n.state===`found`||a?q(`auth`,`pass`,`Credential source available: ${ho(t,n,r)}.`):r.state===`unavailable`?q(`auth`,`fail`,`Make the OS keyring or the CLI config directory usable before \`${e} auth login --key\`, or inject ${p.authToken} through the environment — ${r.summary}.`):q(`auth`,`fail`,`Run \`${e} auth login\` for OAuth or \`${e} auth login --key\` for an API key. For non-interactive use, set ${p.authToken} in the environment.`)}async function po(){let e;try{e=Se(n().host)}catch(e){return{state:`unavailable`,summary:T(e)}}return await Pe(e)}async function mo(){let e;try{e=Se(n().host)}catch(e){return{state:`unavailable`,summary:T(e),cause:`environment`}}try{return await Ve(e)}catch(e){return{state:`unavailable`,summary:T(e),cause:`storage`}}}function ho(e,t,n){return[ya(e),`oauth=${_o(t)}`,`api-key=${go(n)}`].join(` `)}function go(e){if(e.state!==`found`)return e.state===`missing`?`unset`:`unavailable`;let t=Se(n().host);return`${e.stored.activation}${ia(t,e)}`}function _o(e){switch(e.state){case`found`:return Ie(e.stored.credential)?`expired`:`stored`;case`missing`:return`unset`;case`invalid`:return`invalid`;case`unavailable`:return`unavailable`;default:throw Error(`Unsupported OAuth credential state`)}}function vo(e,t,n,r){let i=O.length;if(e===void 0)return q(`catalog`,`fail`,`Regenerate the command catalog with \`make mcp-generate-contracts\` and reinstall: none of its ${i} operations is the status operation.`);if(t===null)return q(`catalog`,`skip`,`Could not read the served operation fingerprint, so drift is unproven; this catalog holds ${i} operations at ${it}.`);if(t===`81a5f338164e3228`)return q(`catalog`,`pass`,`${i} generated operations match the set the API serves (${it}).`);let a=`This catalog describes a different operation set than the API serves (${it} vs ${t})`;return n===!0?q(`catalog`,`fail`,`${a}: run \`${r} update\`.`):q(`catalog`,`skip`,n===!1?`${a}, and this CLI is already the latest published release: either the deployed API is older than this CLI, or a newer CLI has not been published yet.`:`${a}, and the registry did not answer, so it is unknown whether a newer release describes it: rerun \`${r} update\` with registry access.`)}var yo=k(B,`oauth`),bo=[k(B,`start`),k(B,`poll`),k(B,`acknowledge`)],xo=k(B,`revoke`);function So(t,n=x().bin[0]){let r=Eo(t);ro(r,n);let i=[`${yo.description} Default method: OAuth in your browser.`,`With --key: ${bo.map(({description:e})=>e).join(` `)}`].join(`
|
|
31
31
|
`);D(To(r,[yo,...bo],i)).action(Co),D(To(r,[xo],xo.description)).action(wo),D(r.command(`status`).summary(`Keep saved credentials current and report them with API build and uptime`).description([`Runs the same credential materialization every command runs, then reports:`,` - auth: whether AUTH_TOKEN was already set in this shell's environment`,` - oauth: the saved OAuth identity and access-token expiry for the selected API host;`,` an expired token is renewed with its refresh token and a token the sign-in service rejects is retired`,` - api-key: the saved aVenture API key, re-verified with aVenture sign-in and its cached metadata updated`,` - selected: the credential the next command sends`,` - providers: GET /v1/auth/providers (browser sign-in and the CLI OAuth client)`,` - api: running CLI package version plus GET /info build metadata`,` - system: GET /v1/status response (uptime SLA)`,``,`Saved credentials are sent only to the selected API host and aVenture sign-in, never printed.`,`--verify read|write additionally runs a live permission probe for that scope; it does not`,`execute or authorize an arbitrary API operation.`].join(`
|
|
32
32
|
`)).addOption(new b(`--verify <scope>`,`verify one permission-probe scope`).choices([`read`,`write`]))).action(async function(e){Do(this),R({mode:E(e)},await Oo(n,e.verify))}),r.command(`token`).summary(`Print the bearer token the next command sends`).description([`Runs the same credential materialization every command runs, then prints the selected`,`bearer token alone on stdout: ${p.authToken} when set, otherwise the saved OAuth`,`access token (renewed when expired) or the saved aVenture API key.`,`Use it where another client needs this CLI's sign-in, such as an MCP client's header helper.`].join(`
|
|
33
33
|
`)).action(async function(){Do(this);let t=await Xi(n),r=process.env[p.authToken]?.trim();if(t.failure===null&&r!==void 0&&r.length>0){process.stdout.write(`${r}\n`);return}R({mode:`text`},t.failure===null?Io(`auth token: no credentials resolved`,null,n,{oauth:!0,apiKey:!0}):e(`auth token: ${t.failure}`))})}async function Co(e){Do(this);let t=E(e);if(e.providers===!0){R({mode:t},await Ao());return}R({mode:t},e.key===!0?await zi({noBrowser:!e.browser,clientLabel:e.clientLabel}):await yt({noBrowser:!e.browser}))}async function wo(e){Do(this),R({mode:E(e)},await Oi({forgetLocal:e.forgetLocal===!0}))}function To(e,t,n){let[r]=t,i=e.command(r.command.slice(r.command.indexOf(` `)+1)).summary(r.summary).description(n),a=new Set;for(let e of t)for(let t of[...e.bodyOption,...e.localOption])a.has(t.flag)||(a.add(t.flag),`required`in t&&t.required?i.requiredOption(t.flag,t.description):i.option(t.flag,t.description));return i}function Eo(e){return(e.commands.find(e=>e.name()===`auth`)??e.command(`auth`)).summary(`Sign in, sign out, and check credentials`).description([`\`${yo.command}\`: ${yo.summary}; \`--key\` ${bo[0].summary.toLowerCase()}.`,`\`${xo.command}\`: ${xo.summary}.`,"`auth status` reports local credential provenance, sign-in providers, and CLI/API build and uptime.","`auth doctor` runs the one-call selftest and prints `{ ok, check: [...] }`.","`auth token` prints the bearer token the next command sends."].join(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./detail-C_1SHx2h.js";export{e as EntityDetailSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as e,T as t,i as n,l as r,m as i,n as a,o,p as s,r as c,t as l,u,v as d,w as f,y as p}from"./person-owner-BJgNYLKX.js";var ee=o([`domicile`,`dominant`,`origin`]),te=p({endDate:c().nullish(),id:s(),isCurrent:u(),role:ee.nullish(),startDate:c().nullish()}),ne=p({id:s().nullish(),name:f()}),re=p({countryCodeChar2:f().nullish(),countryCodeChar3:f().nullish(),id:s().nullish(),name:f(),unRegion:f().nullish(),unSubregion:f().nullish()}),ie=p({id:s().nullish(),name:f(),stateAbbrev:f().nullish()}),m=p({address:s().nullish(),addressLine1:f().nullish(),addressLine2:f().nullish(),association:r(te).optional(),city:ne.nullish(),country:re.nullish(),countryAbbrev:f().nullish(),createdAt:n({offset:!0}).nullish(),fullAddress:f().nullish(),id:s().nullish(),isCurrent:u().nullish(),isHq:u().nullish(),isPrimary:u().nullish(),latitude:d().nullish(),longitude:d().nullish(),postalCode:f().nullish(),state:ie.nullish(),stateAbbrev:f().nullish(),street:f().nullish(),updatedAt:n({offset:!0}).nullish()}),h=p({creatable:u(),isCurrent:u().nullish(),isPrimary:u().nullish(),name:f().max(255),writable:u()}),g=i(h,p({bucket:f().nullish(),classificationId:s().nullish(),creatable:u(),createdAt:n({offset:!0}).nullish(),id:s(),isCurrent:u().nullish(),isPrimary:u().nullish(),name:f().max(255),slug:f().regex(/^[a-z0-9_-]+$/).max(255).nullish(),type:f(),updatedAt:n({offset:!0}).nullish(),writable:u()})),_=i(h,p({category:f(),code:s().nullish(),creatable:u(),createdAt:n({offset:!0}).nullish(),entityClassificationId:s().nullish(),id:s(),isCurrent:u().nullish(),isPrimary:u().nullish(),level:s().nullish(),name:f().max(255),updatedAt:n({offset:!0}).nullish(),writable:u()})),ae=p({geoLocationExposure:r(g).default([]).optional(),industry:r(g).default([]).optional(),mainProduct:r(g).default([]).optional(),standardizedClassification:r(_).default([]).optional(),tag:r(g).default([]).optional(),typeCustomer:r(g).default([]).optional(),typeModel:r(g).default([]).optional(),typeOwnership:r(g).default([]).optional(),typeRevenue:r(g).default([]).optional(),typeTechnologyUsed:r(g).default([]).optional()}),v=t([o(`Angel.Pre-Seed.Seed.Series A.Series B.Series C.Series D.Series E.Series F.Series G.Series H.Series I.Series J.Series K.Series L.Series M.Series N.Series O.Series P.Series Q.Series R.Series S.Series T.Series U.Series V.Series W.Series X.Series Y.Series Z.Investment Firm.Fund.Nonprofit.Government.Public.Acquired.Acquired Subsidiary`.split(`.`)),f()]),y=p({currency:f().nullish(),fundingRoundCount:s(),investorCount:s(),latestValuation:d().nullish(),mostRecentAmount:d().nullish(),mostRecentDate:c().nullish(),stage:v.nullish(),totalRaised:d()}),b=p({expanded:f().nullish(),generatedDescription:f().nullish(),short:f().nullish()}),x=o([`cloudflare`,`akamai`,`fastly`,`awsCloudfront`,`vercel`,`netlify`,`sucuri`,`incapsula`,`bunny`,`keycdn`,`cdn77`,`gcore`,`cdnetworks`,`azureCdn`,`leaseweb`,`digitalocean`,`stackpath`,`googlecloudCdn`,`none`,`unknown`]),oe=o([`static`,`jsRequired`,`jsEnhanced`]),S=f(),C=p({crawlCdnProvider:x.nullish(),crawlRenderMode:oe.nullish(),createdAt:n({offset:!0}).nullish(),id:s().nullish(),isCurrent:u().nullish(),isPrimary:u().nullish(),owner:l.nullish(),sourceId:f().nullish(),status:f().nullish(),statusChecked:n({offset:!0}).nullish(),updatedAt:n({offset:!0}).nullish(),url:f(),urlType:S}),w=p({address:r(m),classification:ae,fundingDetail:y.nullish(),text:b,urlLink:r(C),urlLinkSuppressedCount:s()}),T=p({isMonogram:u(),logo:f().nullish(),logoSquare:f().nullish()}),se=o([`alternativeDba`,`relatedLegal`]),ce=p({displayable:u().nullish(),name:f(),type:se.nullish()}),E=p({hasAcquisitions:u().default(!1).optional(),hasAnalysis:u(),hasEmployees:u(),hasFundraising:u(),hasNews:u(),productServiceSlug:r(f())}),D=p({defaultCurrency:f().nullish(),foundedYear:s().nullish(),id:e(),image:T,lastModifiedAt:n({offset:!0}).nullish(),nameAlias:r(ce),nameBrand:f(),nameLegal:f().nullish(),operatingStatus:f().nullish(),publicId:f().regex(/^e[0-9A-Za-z]{11}$/).nullish(),publicUrl:f().nullish(),sitemap:E.nullish(),slug:f().regex(/^[a-z0-9_-]+$/).max(255),typeRecord:a,updatedAt:n({offset:!0}).nullish()}),O=p({core:D,fundingDetail:y.nullish()}),k=o([`High`,`Medium`,`Low`,`Verified`]),A=o([`direct`,`managedFund`]),j=p({round:f()}),M=p({amountInvested:d().nullish(),attributionType:A,beneficialEntityId:e().nullish(),fundManagerRelationshipId:s().nullish(),joinId:e(),leadInvestor:u(),recordedEntityId:e().nullish(),round:j.nullish(),transactionId:e()}),N=p({amountRaised:d().int().nullish(),createdAt:n({offset:!0}).nullish(),currency:f().nullish(),dataConfidence:k.nullish(),dateAnnounced:n({offset:!0}).nullish(),dateFundingComplete:n({offset:!0}).nullish(),dateInvestorExit:n({offset:!0}).nullish(),entity:O.nullish(),id:e(),investorAttribution:M.nullish(),investorCount:s().nullish(),round:f().nullish(),sourceAttribution:r(M),updatedAt:n({offset:!0}).nullish(),valuationPostMoney:d().int().nullish(),valuationPreMoney:d().int().nullish()}),le=p({fundingStage:v.nullish(),ownership:r(f()),pricingModel:r(f()),sellsTo:r(f()),totalRaised:d().nullish(),website:f().nullish()}),P=p({lastFetchedAt:n({offset:!0}).nullish(),publishedAt:n({offset:!0}).nullish(),recordedAt:n({offset:!0}),sourceDetail:f()}),F=p({asOf:c().nullish(),comparisonSignals:le.nullish(),createdAt:n({offset:!0}).nullish(),detail:f().nullish(),entity:D,id:s().nullish(),isCurrent:u().nullish(),isPrimary:u().nullish(),publicSource:P.nullish(),get relationship(){return r(F)},relationshipType:f(),sourceEntityId:e().nullish(),targetEntityId:e().nullish(),updatedAt:n({offset:!0}).nullish()}),I=F,L=p({accelerator:D,acceleratorName:f(),asOfDate:n({offset:!0}),batch:f().nullish(),id:f(),program:f().nullish(),status:f().nullish()}),R=o([`text`,`numeric`,`monetary`,`percentage`,`date`]),z=o([`pastDue`,`withinThreeMonths`,`threeToSixMonths`,`sixToTwelveMonths`,`twelveToTwentyFourMonths`,`beyondTwoYears`]),B=p({asOfDate:n({offset:!0}),bucket:z,monthsFromNow:s(),targetDate:n({offset:!0})}),V=p({asOfDate:n({offset:!0}).nullish(),derivedRange:B.nullish(),discreteValue:d().nullish(),entityId:e(),id:s(),publicSource:P.nullish(),textValue:f().nullish(),typeResearchDetail:f(),updatedAt:n({offset:!0}).nullish(),valueResearchDetail:f().nullish(),valueType:R}),H=p({characterCount:s(),meetsRequirements:u(),violation:r(f()),wordCount:s()}),U=p({compliance:H.nullish(),entityId:e(),id:s(),publicSource:P.nullish(),text:f(),textType:f(),updatedAt:n({offset:!0}).nullish()}),ue=p({acceleratorParticipation:r(L),detail:r(V),snippet:r(U)}),W=p({author:f().nullish(),category:f().nullish(),createdAt:n({offset:!0}).nullish(),excerpt:f().nullish(),externalNewsArticle:u().nullish(),id:s(),newsImageThumbnail:f().nullish(),newsUrlOriginal:f().nullish(),publication:f().nullish(),publishedAt:n({offset:!0}).nullish(),slug:f().regex(/^[a-z0-9_-]+$/).max(255).nullish(),title:f(),updatedAt:n({offset:!0}).nullish()}),de=o([`nickname`,`maidenName`,`formerName`,`stageName`]),G=p({displayable:u().nullish(),name:f(),type:de.nullish()}),K=p({isMonogram:u(),picture:f().nullish()}),q=p({associationId:s(),endDate:f().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-][0-9]{2}:[0-5][0-9]))?)?)?$/).nullish(),entityAddress:r(m),entityId:e(),entityLogo:T,entityName:f().nullish(),entityOperatingStatus:f().nullish(),entitySlug:f().regex(/^[a-z0-9_-]+$/).max(255),entityType:a.nullish(),entityUrlLink:r(C),isCurrent:u().nullish(),personAddress:r(m),personId:e(),personImage:K,personName:f(),personSlug:f().regex(/^[a-z0-9_-]+$/).max(255),personUrlLink:r(C),score:s().nullish(),startDate:f().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-][0-9]{2}:[0-5][0-9]))?)?)?$/).nullish(),titleFunction:f().nullish(),titleId:s().nullish(),titleLevel:f().nullish(),titleName:f().nullish()}),J=p({address:r(m),urlLink:r(C)}),fe=p({amountRaised:d().nullish(),dateAnnounced:n({offset:!0}).nullish(),id:e(),image:T,investorCount:s().nullish(),nameBrand:f(),round:f().nullish(),status:f().nullish(),valuationPostMoney:d().nullish()}),pe=p({entity:D,headquartersCity:f().nullish(),headquartersCountry:f().nullish(),headquartersRegion:f().nullish(),industry:f().nullish()}),Y=p({amount:d().nullish(),company:pe,date:n({offset:!0}).nullish(),fundraiseTransaction:fe.nullish(),fundraiseTransactionId:e(),id:f(),investmentDate:n({offset:!0}),investorAttribution:M.nullish(),round:f().nullish()}),me=t([o([`entity`,`person`,`newsArticle`,`blogPost`,`text`,`classificationTag`,`classificationCode`,`product`,`service`,`agentHelpDoc`,`researchSnippet`,`sourceDocument`]),f()]),X=p({computedAt:n({offset:!0}),cosineDistance:d(),cosineScore:d(),modelVersion:f(),rank:s(),sourceHash:f(),sourceId:f(),sourceType:me}),Z=p({createdAt:n({offset:!0}).nullish(),gender:f().nullish(),id:e(),image:K,lastModifiedAt:n({offset:!0}).nullish(),nameAlias:r(G),nameFirst:f().nullish(),nameFull:f(),nameLast:f().nullish(),nameMiddle:f().nullish(),nickname:f().nullish(),publicId:f().regex(/^p[0-9A-Za-z]{12}$/).nullish(),semanticMatch:X.nullish(),slug:f().regex(/^[a-z0-9_-]+$/).max(255),suffix:f().nullish(),text:b,updatedAt:n({offset:!0}).nullish()}),Q=p({articleCount:s().nullish(),association:r(q),core:Z,enrichment:J,investment:r(Y),nameAlias:r(G)}),he=o([`ein`,`secCik`,`ticker`,`lei`,`duns`,`isin`,`cusip`,`crd`,`orcid`]),$=p({createdAt:n({offset:!0}),id:s(),identifier:f(),idType:he,owner:l,source:f().nullish(),updatedAt:n({offset:!0})}),ge=p({core:D,enrichment:w,fundraiseRound:r(N),newsArticle:r(W),person:r(Q),publicUrl:f().nullish(),relationship:r(I),research:ue,sitemap:E,uniqueId:r($)});export{S as C,C as S,g as T,M as _,X as a,D as b,W as c,V as d,R as f,N as g,P as h,Z as i,U as l,I as m,$ as n,Y as o,L as p,Q as r,q as s,ge as t,H as u,j as v,_ as w,w as x,k as y};
|