@redocly/replay 0.25.0-next.0 → 0.25.0-next.2
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/{replay-index-Rphjv5Z8.js → replay-index-B4edQ5YN.js} +48756 -44051
- package/dist/{replay-index-D-JykHId.js → replay-index-BgCsG6Au.js} +1 -1
- package/dist/{replay-index-DzNs80cU.js → replay-index-DFcCXBA9.js} +1438 -1306
- package/dist/{replay-index-mc-neUR_.js → replay-index-byoOD4Us.js} +1 -1
- package/dist/{replay-respect-run-Cxjfgz4J.js → replay-respect-run-B9p973V5.js} +1 -1
- package/dist/{replay-respect-run-Bw8QD3z1.js → replay-respect-run-KHwao_YG.js} +1 -1
- package/dist/{replay-tauri-path-BTfIkxuC.js → replay-tauri-path-D3i9ibeK.js} +1 -1
- package/dist/{replay-tauri-path-Bu0WKRZN.js → replay-tauri-path-KddJ7fnk.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +9 -483
- package/dist/replay.js +1 -1
- package/package.json +13 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-DFcCXBA9.js");async function a(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|open",{options:t})}async function o(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|save",{options:t})}async function l(t,n){const e=typeof n=="string"?{title:n}:n;await i.invoke("plugin:dialog|message",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()})}async function r(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|ask",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Yes",cancelButtonLabel:e?.cancelLabel?.toString()??"No"})}async function c(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|confirm",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Ok",cancelButtonLabel:e?.cancelLabel?.toString()??"Cancel"})}exports.ask=r;exports.confirm=c;exports.message=l;exports.open=a;exports.save=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./replay-index-DFcCXBA9.js"),{env:E0={},argv:Ai=[],platform:ho=""}=typeof process>"u"?{}:process,go="NO_COLOR"in E0||Ai.includes("--no-color"),po="FORCE_COLOR"in E0||Ai.includes("--color"),vo=ho==="win32",bo=E0.TERM==="dumb",Bo=K.tty&&void 0,Ao="CI"in E0&&("GITHUB_ACTIONS"in E0||"GITLAB_CI"in E0||"CIRCLECI"in E0),yo=!go&&(po||vo&&!bo||Bo||Ao),yi=(u,e,a,i,r=e.substring(0,u)+i,n=e.substring(u+a.length),o=n.indexOf(a))=>r+(o<0?n:yi(o,n,a,i)),fo=(u,e,a,i,r)=>u<0?a+e+i:a+yi(u,e,i,r)+i,zo=(u,e,a=u,i=u.length+1)=>r=>r||!(r===""||r===void 0)?fo((""+r).indexOf(e,i),r,u,e,a):"",I=(u,e,a)=>zo(`\x1B[${u}m`,`\x1B[${e}m`,a),ja={reset:I(0,0),bold:I(1,22,"\x1B[22m\x1B[1m"),dim:I(2,22,"\x1B[22m\x1B[2m"),italic:I(3,23),underline:I(4,24),inverse:I(7,27),hidden:I(8,28),strikethrough:I(9,29),black:I(30,39),red:I(31,39),green:I(32,39),yellow:I(33,39),blue:I(34,39),magenta:I(35,39),cyan:I(36,39),white:I(37,39),gray:I(90,39),bgBlack:I(40,49),bgRed:I(41,49),bgGreen:I(42,49),bgYellow:I(43,49),bgBlue:I(44,49),bgMagenta:I(45,49),bgCyan:I(46,49),bgWhite:I(47,49),blackBright:I(90,39),redBright:I(91,39),greenBright:I(92,39),yellowBright:I(93,39),blueBright:I(94,39),magentaBright:I(95,39),cyanBright:I(96,39),whiteBright:I(97,39),bgBlackBright:I(100,49),bgRedBright:I(101,49),bgGreenBright:I(102,49),bgYellowBright:I(103,49),bgBlueBright:I(104,49),bgMagentaBright:I(105,49),bgCyanBright:I(106,49),bgWhiteBright:I(107,49)},So=({useColor:u=yo}={})=>u?ja:Object.keys(ja).reduce((e,a)=>({...e,[a]:String}),{}),{reset:HZ,bold:Uu,dim:Mo,italic:GZ,underline:jo,inverse:fi,hidden:VZ,strikethrough:JZ,black:_Z,red:iu,green:m0,yellow:Yu,blue:Eu,magenta:$Z,cyan:IZ,white:Pa,gray:du,bgBlack:OZ,bgRed:q0,bgGreen:WZ,bgYellow:qZ,bgBlue:ZZ,bgMagenta:UZ,bgCyan:YZ,bgWhite:QZ,blackBright:XZ,redBright:uU,greenBright:eU,yellowBright:aU,blueBright:iU,magentaBright:rU,cyanBright:nU,whiteBright:oU,bgBlackBright:tU,bgRedBright:sU,bgGreenBright:lU,bgYellowBright:EU,bgBlueBright:DU,bgMagentaBright:xU,bgCyanBright:cU,bgWhiteBright:dU}=So(),Po=u=>/\{.*?\}/.test(u);function Hu({value:u,ctx:e,logger:a}){if(!u)return u;if(K.isPlainObject(u)){const i={};for(const r in u)i[r]=Hu({value:u[r],ctx:e,logger:a});return i}else if(Array.isArray(u))return u.map(i=>Hu({value:i,ctx:e,logger:a}));return typeof u!="string"?u:u.startsWith("$faker.")?P0({pointer:u.slice(1),ctx:e,logger:a}):Po(u)?To(u,e,a):No(u,e,a)}function wo(u,e,a){const i=u.indexOf("{");if(i!==-1){const n=u.substring(i+1).slice(0,-1),o=P0({pointer:n.slice(1),ctx:e,logger:a});return o&&u.replace(/{(.*)}/,o)}else return u}function Ko(u,e){const a=Object.keys(e),i=Object.values(e);return new Function(...a,`return ${u}`)(...i)}function To(u,e,a){const i=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let r=u;return r=r.replace(i,(n,o)=>Lo(n,e,a)),r}function Lo(u,e,a){if(!u.includes("$"))return u;if(u.includes("$faker."))return wo(u,e,a);const i=S0(e)(Ro(u));return i!==void 0?i:""}const No=(u,e,a)=>{if(!u)return u;const i=u.toString();if(!i.includes("$"))return u;if(i.startsWith("$file(")&&i.endsWith(")"))return i.slice(7,-2);if(i.startsWith("$sourceDescriptions.")&&i.includes(".workflows.")){const r=i.split("."),n=r[1],o=r[3];if(!n||!o)return;const s=S0(e)("$sourceDescriptions");return s[n]?s[n].workflows.find(l=>l.workflowId===o):void 0}return i&&i.trim().startsWith("faker.")?P0({pointer:i,ctx:e,logger:a}):i?S0(e)(wa(i)):i.replace(/\$\{([^}]+)}/g,(r,n)=>S0(e)(wa(n)))};function Ro(u){return u.replace(/\{(.*)\}/,"$1")}function wa(u){return u.replace(/\['(.*?)'\]/g,".$1")}const S0=(u,e="")=>a=>{if(e||(e=a),!a)return u;const[i,...r]=a.split(".");if(!u)throw Error(`Cannot get ${iu(i)} from ${iu(e)}`);if(u?.[i]===void 0){const n=` Undefined ${iu(i)} at ${iu(e)}.`,o=Object.keys(u).length?`Did you mean to use another key? Available keys:
|
|
2
2
|
${Object.keys(u).join(", ")}.
|
|
3
3
|
`:"",s=`${n} ${o}`;throw Error(s)}return S0(u[i],e)(r.join("."))};function P0({pointer:u,ctx:e,logger:a}){const i=u.split("."),r={ctx:{faker:e.$faker}};try{const n=i.map(o=>o.trim()).map((o,s)=>o.endsWith(")")?`${s==0?"":"."}${o}`:`["${o}"]`).join("");return Ko(`ctx${n}`,r)}catch(n){a.error(iu(n.toString()));return}}function zi(u,e,a){if(typeof u=="string"&&u)return Hu({value:u,ctx:e,logger:a});if(!(typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Blob||u===null))for(const i in u)typeof u[i]=="string"?u[i]&&(u[i]=Hu({value:u[i],ctx:e,logger:a})):zi(u[i],e,a)}function Ka(u,e,a){return zi(u,e,a)||u}function Ta(u,e){if(!u)return;const a={};for(const i in e)a[`{${i}}`]=String(e[i]);return u.split(/(\{[a-zA-Z0-9_.-]+\}+)/g).map(i=>a[i]?a[i]:i).join("")}function Ho(u){return K.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function He(u){return K.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const Go=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Si(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const La=async(u,e,a,i,r)=>{const n=K.pathBrowserifyExports.dirname(i),o=K.pathBrowserifyExports.resolve(n,Si(a));u.append(e,await r.options.requestFileLoader.getFileBody(o))},Mi=(u,e,a,i,r,n)=>{Object.entries(a).forEach(([o,s])=>{const l=n?`${n}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(La(e,l,s,i,r)):Array.isArray(s)?s.forEach(E=>{typeof E=="string"&&E.startsWith("$file(")&&E.endsWith(")")?u.push(La(e,l,E,i,r)):e.append(l,E.toString())}):K.isPlainObject(s)?Mi(u,e,s,i,r,l):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.append(l,s.toString())})},Vo=async(u,e,a,i)=>{if(K.isPlainObject(u)){const r=[];Mi(r,e,u,a,i),await Promise.all(r)}},Jo=async(u,e)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const a=K.pathBrowserifyExports.resolve(K.pathBrowserifyExports.dirname(e.options.filePath),Si(u));return e.options.requestFileLoader.getFileBody(a)}else return u};async function _o(u,e){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:a,contentType:i}=u;if(i==="multipart/form-data"){const r=new FormData,n=K.pathBrowserifyExports.resolve(e.options.filePath);return await Vo(a,r,n,e),{...u,payload:r}}else{if(i==="application/octet-stream"||typeof i=="string"&&Go.test(i))return{...u,payload:await Jo(a,e),contentType:"application/octet-stream"};if(i==="application/x-www-form-urlencoded"&&typeof a=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(a).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function $o({payload:u,replacements:e,expressionContext:a,logger:i}){for(const r of e){const{target:n,value:o}=r;if(typeof n!="string")throw new Error(`Invalid JSON Pointer: ${n}`);try{const s=K.JsonPointerLib.get(u,n),l=Ku({payload:o,context:a,logger:i});s!==void 0&&K.JsonPointerLib.set(u,n,l)}catch{throw new Error(`Invalid JSON Pointer: ${n}`)}}}const Io=["parameters","failureActions","successActions"];function Oo(u,e){const{reference:a,value:i}=u;if(!Io.some(n=>a.includes(`$components.${n}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const r=Hu({value:a,ctx:e,logger:e.options.logger});return K.isPlainObject(r)&&"value"in r&&i?{...r,value:i}:r}function f0(u,e){return"reference"in u?Oo(u,e):u}function ji(u){try{return K.parseRuntimeExpression(u)}catch{throw new Error(`Runtime expression is not valid: ${u}`)}}function Wo(u,e){const a=[{pattern:/\$response\.body#\/([\w/-]+)/g,ctxFunction:(r,n)=>v0(e.$response?.body,n,r)},{pattern:/\$request\.body#\/([\w/-]+)/g,ctxFunction:(r,n)=>v0(e.$request?.body,n,r)},{pattern:/\$outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o)=>v0(e.$outputs?.[n],o,r)},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o,s)=>v0(e.$workflows?.[n]?.outputs?.[o],s,r)},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o,s)=>v0(e.$steps?.[n]?.outputs?.[o],s,r)}];let i=u;for(const{pattern:r,ctxFunction:n}of a)i=i.replaceAll(r,n);return i}function v0(u,e,a){if(u)try{const i=K.JsonPointerLib.get(u,`/${e}`);return typeof i=="string"||Array.isArray(i)||K.isPlainObject(i)?JSON.stringify(i):i!==void 0?i:a}catch{return a}return a}function Ku({payload:u,context:e,contentType:a,logger:i}){if(a?.includes("application/octet-stream"))return Ka(u,e,i);if(a?.includes("multipart/form-data")){if(u instanceof FormData){const r=new FormData;for(const[n,o]of u.entries())if(o instanceof File)r.append(n,o);else{const s=Ku({payload:o,context:e,logger:i});r.append(n,s)}return r}return Ka(u,e,i)}return typeof u=="string"?e4(u)?Zu(u,e,i):u4(u,e,i):K.isPlainObject(u)?Object.entries(u).reduce((r,[n,o])=>(r[n]=Ku({payload:o,context:e,logger:i}),r),{}):Array.isArray(u)?u.map(r=>Ku({payload:r,context:e,logger:i})):u}function Zu(u,e,a){return typeof u=="string"?qo(u,e,a):K.isPlainObject(u)?Object.entries(u).reduce((i,[r,n])=>(i[r]=n&&Zu(n,e,a),i),{}):Array.isArray(u)?u.map(i=>Zu(i,e,a)):u}function qo(u,e,a){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(u))return P0({pointer:u.slice(1),ctx:e,logger:a});if(u.includes("$faker.")){const n=/\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?/g;u=u.replace(n,o=>P0({pointer:o.slice(1),ctx:e,logger:a})).replace(/{(.*?)}/g,"$1")}if(!u.includes("$")&&!/[=<>]/.test(u))return u;ji(u);const i=Uo(u,e),r=Yo(e);try{return new Function(...Object.keys(r),`return ${i};`)(...Object.values(r))}catch{throw new Error(`Error in resolving runtime expression '${u}'.
|
|
4
4
|
This could be because the expression references a value from a previous failed step, or is trying to reference a variable that hasn't been set.`)}}function Zo(u){return u.replace(/\$([a-zA-Z0-9._-]+)/g,(e,a)=>`$${a.replace(/-/g,"_")}`)}function Uo(u,e){const a=Wo(u,e);let r=Zo(a);if(r.startsWith("{")&&r.endsWith("}")){const l=r.slice(1,-1);!l.trim().startsWith("{")&&!l.trim().startsWith("[")&&(r=l)}const n=Xo(r),o=/\.header\.([a-zA-Z0-9._-]+)/g;return n.replace(o,(l,E)=>`.header.${E.toLowerCase()}`)}function Yo(u){const e={};for(const[a,i]of Object.entries(u)){const r=a.replace(/-/g,"_");e[r]=Pi(i)}return e}function Pi(u){return Array.isArray(u)?u:K.isPlainObject(u)?Qo(u):u}function Qo(u){return Object.keys(u).reduce((e,a)=>{const i=a.replace(/-/g,"_");return e[i]=Pi(u[a]),e},{})}function Xo(u){return u.replace(/\.(\d+)/g,(e,a,i,r)=>{const n=r[i-1];return/\d/.test(n)?e:`[${a}]`})}function u4(u,e,a){const i=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return u.replace(i,r=>{const n=r.trim();if(!wi(n)&&!n.includes("$faker."))return r;const o=Zu(n,e,a);return o!==void 0?o:r})}function e4(u){const e=u.trim();return e.startsWith("$faker.")?!0:e.startsWith("$")&&!/\s/.test(e)||e.startsWith("{")&&e.endsWith("}")?wi(e):!1}function wi(u){try{return ji(u),!0}catch{return!1}}const tu={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class Ki extends Error{}class Ti extends Ki{}class Li extends Ki{}async function a4(u){const{descriptionPath:e,externalRefResolver:a,base:i}=u,r=await K.bundle({base:i,ref:e,config:u.config,dereference:!0,externalRefResolver:a});if(!r)throw new Error(`Could not find source description file '${e}'.`);return r.bundle.parsed}const i4={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},we=Symbol("skip");function b0(u){return u<10?"0"+u:u}function r4(u,e,a,i){var r=a?"":u.getUTCFullYear()+"-"+b0(u.getUTCMonth()+1)+"-"+b0(u.getUTCDate());return e||(r+="T"+b0(u.getUTCHours())+":"+b0(u.getUTCMinutes())+":"+b0(u.getUTCSeconds())+"Z"),r}function Ni(u,e){return e>u.length?u.repeat(Math.trunc(e/u.length)+1).substring(0,e):u}function X0(...u){const e=a=>a&&typeof a=="object";return u.reduce((a,i)=>(Object.keys(i||{}).forEach(r=>{const n=a[r],o=i[r];e(n)&&e(o)?a[r]=X0(n,o):a[r]=o}),a),Array.isArray(u[u.length-1])?[]:{})}function n4(u){var e=s4(u),a=l4(e,e,e,e),i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{var n=a()*16%16|0;return(r=="x"?n:n&3|8).toString(16)});return i}function Ce(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Ou(u,e){e&&u.pop()}function o4(u){return{name:u?.xml?.name||"",prefix:u?.xml?.prefix||"",namespace:u?.xml?.namespace||null,attribute:u?.xml?.attribute??!1,wrapped:u?.xml?.wrapped??!1}}function t4(u){const e=u?.xml;return e?.nodeType?e.nodeType:e?.attribute===!0?"attribute":e?.wrapped===!0&&u?.type==="array"?"element":u?.$ref||u?.$dynamicRef||u?.type==="array"||u?.oneOf||u?.anyOf||u?.allOf?"none":"element"}function ue(u,e={},a={}){const{value:i}=u,{propertyName:r}=a,{name:n,prefix:o,namespace:s}=o4(e),l=t4(e);let E=n||r?`${o?o+":":""}${n||r}`:null,D=typeof i=="object"?Array.isArray(i)?[...i]:{...i}:i;switch(l){case"attribute":E&&(E=`$${E}`);break;case"text":E="#text";break;case"cdata":E="#cdata";break;case"none":e.type==="array"?(E=null,e.example!==void 0&&(E=e.items?.xml?.name||E)):E=null;break;default:e.type==="array"&&Array.isArray(D)&&(D={[E]:[...D]});break}return s&&l!=="text"&&l!=="cdata"&&l!=="none"&&(typeof D=="object"?D[`$xmlns${o?":"+o:""}`]=s:D={[`$xmlns${o?":"+o:""}`]:s,"#text":D}),{propertyName:E,value:D}}function s4(u){var e=0;if(u.length==0)return e;for(var a=0;a<u.length;a++){var i=u.charCodeAt(a);e=(e<<5)-e+i,e=e&e}return e}function l4(u,e,a,i){return function(){u|=0,e|=0,a|=0,i|=0;var r=u-(e<<27|e>>>5)|0;return u=e^(a<<17|a>>>15),e=a+i|0,a=i+r|0,i=u+r|0,(i>>>0)/4294967296}}function E4(u,e,a,i,r){let n=wu(u,a,i);const o=[];for(let s of e){const{type:l,readOnly:E,writeOnly:D,value:d}=wu({type:n.type,...s},a,i,{...r,isAllOfChild:!0});n.type&&l&&l!==n.type&&(console.warn("allOf: schemas with different types can't be merged"),n.type=l),n.type=n.type||l,n.readOnly=n.readOnly||E,n.writeOnly=n.writeOnly||D,d!=null&&o.push(d)}if(n.type==="object"){n.value=X0(n.value||{},...o.filter(s=>typeof s=="object"));for(const s in n.value)n.value[s]===we&&delete n.value[s];return n}else{n.type==="array"&&(a.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=o[o.length-1];return n.value=s??n.value,n}}const Na={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function H0(u){if(u.type!==void 0)return Array.isArray(u.type)?u.type.length===0?null:u.type[0]:u.type;const e=Object.keys(Na);for(var a=0;a<e.length;a++){let i=e[a],r=Na[i];if(u[i]!==void 0)return r}return null}let Z0={},Pu=[];function D4(){Z0={},Pu=[]}function Ri(u){let e;return u.const!==void 0?e=u.const:u.examples!==void 0&&u.examples.length?e=u.examples[0]:u.enum!==void 0&&u.enum.length?e=u.enum[0]:u.default!==void 0&&(e=u.default),e}function Ra(u){const e=Ri(u);if(e!==void 0)return{value:e,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function wu(u,e,a,i){if(i){if(Pu.includes(u))return Ce(H0(u));Pu.push(u)}if(i&&i.depth>e.maxSampleDepth)return Ou(Pu,i),Ce(H0(u));if(u.$ref){if(!a)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(u.$ref);s.startsWith("#")&&(s=s.substring(1));const l=K.JsonPointerLib.get(a,s);let E;if(Z0[s]!==!0){Z0[s]=!0;const D=wu(l,e,a,i);if(e.format==="xml"){const d=s.split("/").pop(),F={...i,propertyName:i?.propertyName||d},{propertyName:k,value:b}=ue(D,l,F);E={...D,value:{[k||"root"]:b}}}else E=D;Z0[s]=!1}else{const D=H0(l);E=Ce(D)}return Ou(Pu,i),E}if(u.example!==void 0)return Ou(Pu,i),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return Ou(Pu,i),Ra(u)||E4({...u,allOf:void 0},u.allOf,e,a,i);if(u.oneOf&&u.oneOf.length){u.anyOf&&(e.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Ou(Pu,i);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return o(u,s)}if(u.anyOf&&u.anyOf.length){Ou(Pu,i);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return o(u,s)}if(u.if&&u.then){Ou(Pu,i);const{if:s,then:l,...E}=u;return wu(X0(E,s,l),e,a,i)}let r=Ri(u),n=null;if(r===void 0){r=null,n=u.type,Array.isArray(n)&&u.type.length>0&&(n=u.type[0]),n||(n=H0(u));let s=Vi[n];s&&(r=s(u,e,a,i))}return Ou(Pu,i),{value:r,readOnly:u.readOnly,writeOnly:u.writeOnly,type:n};function o(s,l){const E=Ra(s);if(E!==void 0)return E;const D=wu({...s,oneOf:void 0,anyOf:void 0},e,a,i),d=wu(l,e,a,i);if(typeof D.value=="object"&&typeof d.value=="object"){const F=X0(D.value,d.value);return{...d,value:F}}return d}}function x4(u,e={},a,i){const r=i&&i.depth||1;let n=Math.min(u.maxItems!=null?u.maxItems:1/0,u.minItems||1);const o=u.prefixItems||u.items||u.contains;Array.isArray(o)&&(n=Math.max(n,o.length));let s=E=>Array.isArray(o)?o[E]||{}:o||{},l=[];if(!o)return l;for(let E=0;E<n;E++){let D=s(E),{value:d}=wu(D,e,a,{depth:r+1});if(e?.format==="xml"){const{value:F,propertyName:k}=ue({value:d},D,i);k?(l?.[k]||(l={...l,[k]:[]}),l[k].push(F)):l={...l,...F}}else l.push(d)}if(e?.format==="xml"&&r===1){const{value:E,propertyName:D}=ue({value:null},u,i);D&&(E?l=Array.isArray(l)?{[D]:{...E,...l.map(d=>({"#text":{...d}}))}}:{[D]:{...l,...E}}:l={[D]:l})}return l}function c4(u){return!0}function Hi(u){let e=0;if(u.type==="number"&&(u.format==="float"||u.format==="double")&&(e=.1),typeof u.exclusiveMinimum=="boolean"||typeof u.exclusiveMaximum=="boolean"){if(u.maximum&&u.minimum)return e=u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum,(u.exclusiveMaximum&&e>=u.maximum||!u.exclusiveMaximum&&e>u.maximum)&&(e=(u.maximum+u.minimum)/2),e;if(u.minimum)return u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum;if(u.maximum)return u.exclusiveMaximum?u.maximum>0?0:Math.floor(u.maximum)-1:u.maximum>0?0:u.maximum}else{if(u.minimum)return u.minimum;u.exclusiveMinimum?(e=Math.floor(u.exclusiveMinimum)+1,e===u.exclusiveMaximum&&(e=(e+Math.floor(u.exclusiveMaximum)-1)/2)):u.exclusiveMaximum?e=Math.floor(u.exclusiveMaximum)-1:u.maximum&&(e=u.maximum)}return e}function d4(u,e={},a,i){let r={};const n=i&&i.depth||1;if(u&&typeof u.properties=="object"){const o=Array.isArray(u.required)?u.required:[],s={};for(const l of o)s[l]=!0;Object.keys(u.properties).forEach(l=>{if(e.skipNonRequired&&!s.hasOwnProperty(l))return;const E=wu(u.properties[l],e,a,{propertyName:l,depth:n+1});if(e.skipReadOnly&&E.readOnly){i?.isAllOfChild&&(r[l]=we);return}if(e.skipWriteOnly&&E.writeOnly){i?.isAllOfChild&&(r[l]=we);return}if(e?.format==="xml"){const{propertyName:D,value:d}=ue(E,u.properties[l],{propertyName:l});D?r[D]=d:d!==null&&typeof d=="object"&&(r={...r,...d})}else r[l]=E.value})}if(u&&typeof u.additionalProperties=="object"){const o=u.additionalProperties["x-additionalPropertiesName"]||"property";r[`${String(o)}1`]=wu(u.additionalProperties,e,a,{depth:n+1}).value,r[`${String(o)}2`]=wu(u.additionalProperties,e,a,{depth:n+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(r).length>u.maxProperties){const o={};let s=0;(Array.isArray(u.required)?u.required:[]).forEach(E=>{r[E]!==void 0&&(o[E]=r[E],s++)}),Object.keys(r).forEach(E=>{s<u.maxProperties&&!o.hasOwnProperty(E)&&(o[E]=r[E],s++)}),r=o}return r}function M0(u,e){return u}function Ha(u,e,a){let i=1;if(u)switch(u){case"?":{i=0;break}case"*":{i=M0(0);break}case"+":{i=M0(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else e!=null&&a!=null?i=M0(parseInt(e)):e!=null&&a==null&&(i=parseInt(e));return i}function m4(u){let e=!1;u instanceof RegExp&&(e=u.flags.includes("i"),u=u.toString(),u=u.match(/\/(.+?)\//)?.[1]??""),u=u.replace(/^(\^)?(.*?)(\$)?$/,"$2");let a,i,r;const n=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=u.match(n);for(;o!=null;){const d=o[2],F=o[3],k=o[4];r=Ha(k,d,F),u=u.slice(0,o.index)+o[1].repeat(r)+u.slice(o.index+o[0].length),o=u.match(n)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=u.match(l);o!=null;){const d=o[1]==="^",F=o[2]==="-",k=o[4],b=o[5],A=o[6],w=[];let G=o[3],R=G.match(s);for(F&&w.push(45);R!=null;){if(R[0].indexOf("-")===-1)e&&isNaN(Number(R[0]))?(w.push(R[0].toUpperCase().charCodeAt(0)),w.push(R[0].toLowerCase().charCodeAt(0))):w.push(R[0].charCodeAt(0));else{const p=R[0].split("-").map(C=>C.charCodeAt(0));if(a=p[0],i=p[1],a>i)throw new Error("Character range provided is out of order.");for(let C=a;C<=i;C++)if(e&&isNaN(Number(String.fromCharCode(C)))){const f=String.fromCharCode(C);w.push(f.toUpperCase().charCodeAt(0)),w.push(f.toLowerCase().charCodeAt(0))}else w.push(C)}G=G.substring(R[0].length),R=G.match(s)}if(r=Ha(A,k,b),d){let p=-1;for(let C=48;C<=57;C++){if(p=w.indexOf(C),p>-1){w.splice(p,1);continue}w.push(C)}for(let C=65;C<=90;C++){if(p=w.indexOf(C),p>-1){w.splice(p,1);continue}w.push(C)}for(let C=97;C<=122;C++){if(p=w.indexOf(C),p>-1){w.splice(p,1);continue}w.push(C)}}const V=Array.from({length:r},()=>String.fromCharCode(w[M0(0)])).join("");u=u.slice(0,o.index)+V+u.slice(o.index+o[0].length),o=u.match(l)}const E=/(.)\{(\d+)\,(\d+)\}/;for(o=u.match(E);o!=null;){if(a=parseInt(o[2]),i=parseInt(o[3]),a>i)throw new Error("Numbers out of order in {} quantifier.");r=M0(a),u=u.slice(0,o.index)+o[1].repeat(r)+u.slice(o.index+o[0].length),o=u.match(E)}const D=/(.)\{(\d+)\}/;for(o=u.match(D);o!=null;)r=parseInt(o[2]),u=u.slice(0,o.index)+o[1].repeat(r)+u.slice(o.index+o[0].length),o=u.match(D);return u}const F4="qwerty!@#$%^123456";function k4(){return"user@example.com"}function C4(){return"пошта@укр.нет"}function h4(u,e){let a="pa$$word";return u>a.length&&(a+="_",a+=Ni(F4,u-a.length).substring(0,u-a.length)),a}function Ge({min:u,max:e,omitTime:a,omitDate:i}){let r=r4(new Date("2019-08-24T14:15:22.123Z"),a,i);return r.length<u&&console.warn(`Using minLength = ${u} is incorrect with format "date-time"`),e&&r.length>e&&console.warn(`Using maxLength = ${e} is incorrect with format "date-time"`),r}function g4(u,e){return Ge({min:u,max:e,omitTime:!1,omitDate:!1})}function p4(u,e){return Ge({min:u,max:e,omitTime:!0,omitDate:!1})}function v4(u,e){return Ge({min:u,max:e,omitTime:!1,omitDate:!0}).slice(1)}function Gi(u,e,a,i,r=!1){if(i&&r)return m4(i);let n=Ni("string",u);return e&&n.length>e&&(n=n.substring(0,e)),n}function b4(){return"192.168.0.1"}function B4(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function A4(){return"example.com"}function y4(){return"приклад.укр"}function f4(){return"http://example.com"}function z4(){return"../dictionary"}function S4(){return"http://example.com/{endpoint}"}function M4(){return"http://example.com/entity/1"}function j4(){return"/entity/1"}function P4(u,e,a){return n4(a||"id")}function w4(){return"/json/pointer"}function K4(){return"1/relative/json/pointer"}function T4(){return"/regex/"}const L4={email:k4,"idn-email":C4,password:h4,"date-time":g4,date:p4,time:v4,ipv4:b4,ipv6:B4,hostname:A4,"idn-hostname":y4,iri:M4,"iri-reference":j4,uri:f4,"uri-reference":z4,"uri-template":S4,uuid:P4,default:Gi,"json-pointer":w4,"relative-json-pointer":K4,regex:T4};function N4(u,e,a,i){let r=u.format||"default",n=L4[r]||Gi,o=i&&i.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,e?.enablePatterns)}var Vi={};const R4={skipReadOnly:!1,maxSampleDepth:15};function H4(u,e){if(!u)throw new Error("Unknown format output for building XML.");return(Array.isArray(u)||Object.keys(u).length>1)&&(u={[e?.xml?.name||"root"]:u}),new K.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(u)}function G4(u,e,a){let i=Object.assign({},R4,e);D4();let r=wu(u,i,a).value;return i?.format==="xml"?H4(r,u):r}function C0(u,e){Vi[u]=e}C0("array",x4);C0("boolean",c4);C0("integer",Hi);C0("number",Hi);C0("object",d4);C0("string",N4);function Ji(u,e){if(u)try{return G4(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(a){e.error(q0(" Error while generating test data from JSON Schema ")+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as fo, b as iu, p as ju, J as Uu, c as zo, f as ji, B as So, g as j0, h as Ta, k as La, m as Mo, l as jo, n as Po, o as wo, q as Ko, u as To, A as Pi, v as Je } from "./replay-index-
|
|
1
|
+
import { t as fo, b as iu, p as ju, J as Uu, c as zo, f as ji, B as So, g as j0, h as Ta, k as La, m as Mo, l as jo, n as Po, o as wo, q as Ko, u as To, A as Pi, v as Je } from "./replay-index-B4edQ5YN.js";
|
|
2
2
|
const {
|
|
3
3
|
env: x0 = {},
|
|
4
4
|
argv: wi = [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-DFcCXBA9.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),i=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),m=Math.min(a.length,i.length);let s=0;for(let o=0;o<m&&a[o]===i[o];o++)s++;const p=a.slice(s).map(()=>".."),f=i.slice(s);return[...p,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.dirname=e.dirname;exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as h, s as x, r as i } from "./replay-index-
|
|
2
|
-
import { d as j, a as b, j as d } from "./replay-index-
|
|
1
|
+
import { e as h, s as x, r as i } from "./replay-index-B4edQ5YN.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-B4edQ5YN.js";
|
|
3
3
|
async function u(n, e) {
|
|
4
4
|
const t = x(), l = await i(n), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), r = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), m = Math.min(o.length, r.length);
|
|
5
5
|
let s = 0;
|
package/dist/replay.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-DFcCXBA9.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.js");exports.AgentLoop=e.AgentLoop;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
|
package/dist/replay.d.ts
CHANGED
|
@@ -3,19 +3,17 @@ import { ConfigureRequestValues } from '../../node_modules/@redocly/theme/src/ex
|
|
|
3
3
|
import { ConfigureServerRequestValues } from '../../node_modules/@redocly/theme/src/ext/configure';
|
|
4
4
|
import { Context } from 'react';
|
|
5
5
|
import { ImmutableObject } from '@redocly/hookstate-core';
|
|
6
|
-
import { InferToolInput } from 'ai';
|
|
7
|
-
import { InferToolOutput } from 'ai';
|
|
8
6
|
import { JSX } from 'react/jsx-runtime';
|
|
9
7
|
import { NamedExoticComponent } from 'react';
|
|
10
8
|
import { ReactElement } from 'react';
|
|
11
9
|
import { SpanStatusCode } from '@opentelemetry/api';
|
|
12
10
|
import { SystemModelMessage } from 'ai';
|
|
13
11
|
import { Context as TelemetryContext } from '@opentelemetry/api';
|
|
14
|
-
import { Tool } from 'ai';
|
|
15
12
|
import { ToolLoopAgent } from 'ai';
|
|
16
13
|
import { ToolLoopAgentOnFinishCallback } from 'ai';
|
|
17
14
|
import { ToolLoopAgentOnStepFinishCallback } from 'ai';
|
|
18
15
|
import { ToolLoopAgentSettings } from 'ai';
|
|
16
|
+
import { ToolSet } from 'ai';
|
|
19
17
|
|
|
20
18
|
export declare class AgentLoop {
|
|
21
19
|
private model;
|
|
@@ -27,9 +25,9 @@ export declare class AgentLoop {
|
|
|
27
25
|
constructor(config: AgentRuntimeConfig);
|
|
28
26
|
private createModel;
|
|
29
27
|
setModel(model: Model): void;
|
|
30
|
-
getAgent(): ToolLoopAgent<never,
|
|
28
|
+
getAgent(): ToolLoopAgent<never, ToolSet, never>;
|
|
31
29
|
addContext(context: SystemModelMessage[]): void;
|
|
32
|
-
registerTools(tools:
|
|
30
|
+
registerTools(tools: ToolSet): void;
|
|
33
31
|
generateTitle(prompt: string, abortSignal?: AbortSignal): Promise<string>;
|
|
34
32
|
private prepareMessages;
|
|
35
33
|
private preparePrompt;
|
|
@@ -38,14 +36,14 @@ export declare class AgentLoop {
|
|
|
38
36
|
declare type AgentRuntimeConfig = {
|
|
39
37
|
activeConversationId: string;
|
|
40
38
|
model: Model;
|
|
41
|
-
tools:
|
|
39
|
+
tools: ToolSet;
|
|
42
40
|
sendEvent: AiChatTelemetrySendEvent;
|
|
43
41
|
parentCtx?: TelemetryContext;
|
|
44
42
|
maxSteps?: number;
|
|
45
43
|
maxOutputTokens?: ToolLoopAgentConfig['maxOutputTokens'];
|
|
46
44
|
maxRetries?: ToolLoopAgentConfig['maxRetries'];
|
|
47
|
-
onStepFinish?: ToolLoopAgentOnStepFinishCallback<
|
|
48
|
-
onFinish?: ToolLoopAgentOnFinishCallback<
|
|
45
|
+
onStepFinish?: ToolLoopAgentOnStepFinishCallback<ToolSet>;
|
|
46
|
+
onFinish?: ToolLoopAgentOnFinishCallback<ToolSet>;
|
|
49
47
|
};
|
|
50
48
|
|
|
51
49
|
declare type AiChatTelemetrySendEvent = TelemetryMethods['sendEvent'];
|
|
@@ -128,457 +126,6 @@ export declare function createResource<O extends string = string>(object: O, id:
|
|
|
128
126
|
uri: string;
|
|
129
127
|
};
|
|
130
128
|
|
|
131
|
-
declare const definitions: {
|
|
132
|
-
open_tab: Tool< {
|
|
133
|
-
action: "focus_tab" | "open_operation" | "open_collection" | "open_workflow" | "open_step" | "open_workflow_run" | "open_new_request";
|
|
134
|
-
tabIndex?: number | undefined;
|
|
135
|
-
workflowId?: string | undefined;
|
|
136
|
-
stepId?: string | undefined;
|
|
137
|
-
operationId?: string | undefined;
|
|
138
|
-
collectionId?: string | undefined;
|
|
139
|
-
requestUrl?: string | undefined;
|
|
140
|
-
requestMethod?: string | undefined;
|
|
141
|
-
}, {
|
|
142
|
-
error: {
|
|
143
|
-
message: string;
|
|
144
|
-
details?: unknown;
|
|
145
|
-
};
|
|
146
|
-
isError: true;
|
|
147
|
-
data?: undefined;
|
|
148
|
-
} | {
|
|
149
|
-
data: {
|
|
150
|
-
outcome: "focused" | "opened";
|
|
151
|
-
activeTabIndex: number;
|
|
152
|
-
tabId: string;
|
|
153
|
-
tabType: TabDataType;
|
|
154
|
-
};
|
|
155
|
-
isError: false;
|
|
156
|
-
error?: undefined;
|
|
157
|
-
}>;
|
|
158
|
-
report_status: Tool< {
|
|
159
|
-
message: string;
|
|
160
|
-
}, {
|
|
161
|
-
error: {
|
|
162
|
-
message: string;
|
|
163
|
-
details?: unknown;
|
|
164
|
-
};
|
|
165
|
-
isError: true;
|
|
166
|
-
data?: undefined;
|
|
167
|
-
} | {
|
|
168
|
-
data: {
|
|
169
|
-
acknowledged: true;
|
|
170
|
-
};
|
|
171
|
-
isError: false;
|
|
172
|
-
error?: undefined;
|
|
173
|
-
}>;
|
|
174
|
-
run_request: Tool< {
|
|
175
|
-
workflowId: string;
|
|
176
|
-
stepId: string;
|
|
177
|
-
collectionId: string;
|
|
178
|
-
}, {
|
|
179
|
-
error: {
|
|
180
|
-
message: string;
|
|
181
|
-
details?: unknown;
|
|
182
|
-
};
|
|
183
|
-
isError: true;
|
|
184
|
-
data?: undefined;
|
|
185
|
-
} | {
|
|
186
|
-
data: {
|
|
187
|
-
body?: string | undefined;
|
|
188
|
-
url?: string | undefined;
|
|
189
|
-
status?: number | undefined;
|
|
190
|
-
size?: number | undefined;
|
|
191
|
-
duration?: number | undefined;
|
|
192
|
-
headers?: [string, string][] | undefined;
|
|
193
|
-
cookies?: [string, string][] | undefined;
|
|
194
|
-
};
|
|
195
|
-
isError: false;
|
|
196
|
-
error?: undefined;
|
|
197
|
-
}>;
|
|
198
|
-
get_current_tab: Tool< {
|
|
199
|
-
sections: ("security" | "result" | "response" | "info" | "workflows" | "sourceDescriptions" | "inputs" | "steps" | "parameters" | "outputs" | "successCriteria" | "requestBody" | "severity")[];
|
|
200
|
-
}, {
|
|
201
|
-
error: {
|
|
202
|
-
message: string;
|
|
203
|
-
details?: unknown;
|
|
204
|
-
};
|
|
205
|
-
isError: true;
|
|
206
|
-
data?: undefined;
|
|
207
|
-
} | {
|
|
208
|
-
data: {
|
|
209
|
-
message: string;
|
|
210
|
-
};
|
|
211
|
-
isError: false;
|
|
212
|
-
error?: undefined;
|
|
213
|
-
}>;
|
|
214
|
-
search: Tool< {
|
|
215
|
-
path?: string | undefined;
|
|
216
|
-
type?: "workflow" | "collection" | "api" | "step" | "api_operation" | undefined;
|
|
217
|
-
method?: string | undefined;
|
|
218
|
-
query?: string | undefined;
|
|
219
|
-
apiId?: string | undefined;
|
|
220
|
-
workflowId?: string | undefined;
|
|
221
|
-
stepId?: string | undefined;
|
|
222
|
-
operationId?: string | undefined;
|
|
223
|
-
collectionId?: string | undefined;
|
|
224
|
-
}, unknown>;
|
|
225
|
-
update_security: Tool< {
|
|
226
|
-
workflowId: string;
|
|
227
|
-
stepId: string;
|
|
228
|
-
collectionId: string;
|
|
229
|
-
changes: ({
|
|
230
|
-
type: import("../../../../types/security").SecurityTypes.BasicAuth;
|
|
231
|
-
action: "add" | "update";
|
|
232
|
-
approved: boolean;
|
|
233
|
-
data?: {
|
|
234
|
-
password?: string | undefined;
|
|
235
|
-
username?: string | undefined;
|
|
236
|
-
} | undefined;
|
|
237
|
-
index?: number | undefined;
|
|
238
|
-
schemeId?: string | undefined;
|
|
239
|
-
} | {
|
|
240
|
-
type: import("../../../../types/security").SecurityTypes.DigestAuth;
|
|
241
|
-
action: "add" | "update";
|
|
242
|
-
approved: boolean;
|
|
243
|
-
data?: {
|
|
244
|
-
password?: string | undefined;
|
|
245
|
-
username?: string | undefined;
|
|
246
|
-
} | undefined;
|
|
247
|
-
index?: number | undefined;
|
|
248
|
-
schemeId?: string | undefined;
|
|
249
|
-
} | {
|
|
250
|
-
type: import("../../../../types/security").SecurityTypes.JWT;
|
|
251
|
-
action: "add" | "update";
|
|
252
|
-
approved: boolean;
|
|
253
|
-
data?: {
|
|
254
|
-
token?: string | undefined;
|
|
255
|
-
} | undefined;
|
|
256
|
-
index?: number | undefined;
|
|
257
|
-
schemeId?: string | undefined;
|
|
258
|
-
} | {
|
|
259
|
-
type: import("../../../../types/security").SecurityTypes.APIKey;
|
|
260
|
-
action: "add" | "update";
|
|
261
|
-
approved: boolean;
|
|
262
|
-
data?: {
|
|
263
|
-
key?: string | undefined;
|
|
264
|
-
name?: string | undefined;
|
|
265
|
-
location?: "header" | "query" | "cookie" | undefined;
|
|
266
|
-
} | undefined;
|
|
267
|
-
index?: number | undefined;
|
|
268
|
-
schemeId?: string | undefined;
|
|
269
|
-
} | {
|
|
270
|
-
type: import("../../../../types/security").SecurityTypes.OAuth2;
|
|
271
|
-
action: "add" | "update";
|
|
272
|
-
approved: boolean;
|
|
273
|
-
data?: {
|
|
274
|
-
password?: string | undefined;
|
|
275
|
-
username?: string | undefined;
|
|
276
|
-
clientId?: string | undefined;
|
|
277
|
-
clientSecret?: string | undefined;
|
|
278
|
-
grantType?: "password" | "implicit" | "clientCredentials" | "authorizationCode" | "clientCredentialsWithJwtAssertion" | "authorizationCodeWithPkce" | undefined;
|
|
279
|
-
tokenUrl?: string | undefined;
|
|
280
|
-
accessToken?: string | undefined;
|
|
281
|
-
authorizationUrl?: string | undefined;
|
|
282
|
-
callbackUrl?: string | undefined;
|
|
283
|
-
} | undefined;
|
|
284
|
-
index?: number | undefined;
|
|
285
|
-
schemeId?: string | undefined;
|
|
286
|
-
} | {
|
|
287
|
-
type: import("../../../../types/security").SecurityTypes.OpenIDConnect;
|
|
288
|
-
action: "add" | "update";
|
|
289
|
-
approved: boolean;
|
|
290
|
-
data?: {
|
|
291
|
-
password?: string | undefined;
|
|
292
|
-
username?: string | undefined;
|
|
293
|
-
clientId?: string | undefined;
|
|
294
|
-
clientSecret?: string | undefined;
|
|
295
|
-
openIdConnectUrl?: string | undefined;
|
|
296
|
-
grantType?: "password" | "implicit" | "clientCredentials" | "authorizationCode" | "clientCredentialsWithJwtAssertion" | "authorizationCodeWithPkce" | undefined;
|
|
297
|
-
tokenUrl?: string | undefined;
|
|
298
|
-
accessToken?: string | undefined;
|
|
299
|
-
authorizationUrl?: string | undefined;
|
|
300
|
-
callbackUrl?: string | undefined;
|
|
301
|
-
userInfoUrl?: string | undefined;
|
|
302
|
-
} | undefined;
|
|
303
|
-
index?: number | undefined;
|
|
304
|
-
schemeId?: string | undefined;
|
|
305
|
-
} | {
|
|
306
|
-
action: "remove";
|
|
307
|
-
approved: boolean;
|
|
308
|
-
index: number;
|
|
309
|
-
})[];
|
|
310
|
-
}, {
|
|
311
|
-
error: {
|
|
312
|
-
message: string;
|
|
313
|
-
details?: unknown;
|
|
314
|
-
};
|
|
315
|
-
isError: true;
|
|
316
|
-
data?: undefined;
|
|
317
|
-
} | {
|
|
318
|
-
data: {
|
|
319
|
-
applied: {
|
|
320
|
-
status: "failed" | "applied";
|
|
321
|
-
summary?: string | undefined;
|
|
322
|
-
}[];
|
|
323
|
-
totalChanges: number;
|
|
324
|
-
approvedChanges: number;
|
|
325
|
-
};
|
|
326
|
-
isError: false;
|
|
327
|
-
error?: undefined;
|
|
328
|
-
}>;
|
|
329
|
-
update_step: Tool< {
|
|
330
|
-
workflowId: string;
|
|
331
|
-
stepId: string;
|
|
332
|
-
collectionId: string;
|
|
333
|
-
changes: ({
|
|
334
|
-
data: string;
|
|
335
|
-
field: "url";
|
|
336
|
-
action: "add" | "remove" | "update";
|
|
337
|
-
approved: boolean;
|
|
338
|
-
id?: string | undefined;
|
|
339
|
-
} | {
|
|
340
|
-
data: string;
|
|
341
|
-
field: "description";
|
|
342
|
-
action: "add" | "remove" | "update";
|
|
343
|
-
approved: boolean;
|
|
344
|
-
id?: string | undefined;
|
|
345
|
-
} | {
|
|
346
|
-
data: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
347
|
-
field: "method";
|
|
348
|
-
action: "add" | "remove" | "update";
|
|
349
|
-
approved: boolean;
|
|
350
|
-
id?: string | undefined;
|
|
351
|
-
} | {
|
|
352
|
-
field: "parameters";
|
|
353
|
-
action: "add" | "remove" | "update";
|
|
354
|
-
approved: boolean;
|
|
355
|
-
data?: {
|
|
356
|
-
name: string;
|
|
357
|
-
in: "header" | "path" | "query" | "cookie";
|
|
358
|
-
value: string;
|
|
359
|
-
} | undefined;
|
|
360
|
-
id?: string | undefined;
|
|
361
|
-
} | {
|
|
362
|
-
field: "outputs";
|
|
363
|
-
action: "add" | "remove" | "update";
|
|
364
|
-
approved: boolean;
|
|
365
|
-
data?: {
|
|
366
|
-
name: string;
|
|
367
|
-
expression: string;
|
|
368
|
-
} | undefined;
|
|
369
|
-
id?: string | undefined;
|
|
370
|
-
} | {
|
|
371
|
-
field: "successCriteria";
|
|
372
|
-
action: "add" | "remove" | "update";
|
|
373
|
-
approved: boolean;
|
|
374
|
-
data?: {
|
|
375
|
-
condition: string;
|
|
376
|
-
type?: "regex" | "simple" | "jsonpath" | "xpath" | undefined;
|
|
377
|
-
context?: string | undefined;
|
|
378
|
-
} | undefined;
|
|
379
|
-
id?: string | undefined;
|
|
380
|
-
} | {
|
|
381
|
-
data: {
|
|
382
|
-
content: string;
|
|
383
|
-
contentType?: string | undefined;
|
|
384
|
-
};
|
|
385
|
-
field: "body";
|
|
386
|
-
action: "add" | "remove" | "update";
|
|
387
|
-
approved: boolean;
|
|
388
|
-
id?: string | undefined;
|
|
389
|
-
})[];
|
|
390
|
-
}, {
|
|
391
|
-
error: {
|
|
392
|
-
message: string;
|
|
393
|
-
details?: unknown;
|
|
394
|
-
};
|
|
395
|
-
isError: true;
|
|
396
|
-
data?: undefined;
|
|
397
|
-
} | {
|
|
398
|
-
data: {
|
|
399
|
-
applied: {
|
|
400
|
-
status: "failed" | "applied";
|
|
401
|
-
summary?: string | undefined;
|
|
402
|
-
}[];
|
|
403
|
-
totalChanges: number;
|
|
404
|
-
approvedChanges: number;
|
|
405
|
-
};
|
|
406
|
-
isError: false;
|
|
407
|
-
error?: undefined;
|
|
408
|
-
}>;
|
|
409
|
-
manage_collection: Tool< {
|
|
410
|
-
payload: {
|
|
411
|
-
title: string;
|
|
412
|
-
action: "create_collection";
|
|
413
|
-
} | {
|
|
414
|
-
collectionId: string;
|
|
415
|
-
action: "delete_collection";
|
|
416
|
-
} | {
|
|
417
|
-
name: string;
|
|
418
|
-
collectionId: string;
|
|
419
|
-
action: "create_workflow";
|
|
420
|
-
} | {
|
|
421
|
-
workflowId: string;
|
|
422
|
-
collectionId: string;
|
|
423
|
-
action: "delete_workflow";
|
|
424
|
-
} | {
|
|
425
|
-
workflowId: string;
|
|
426
|
-
collectionId: string;
|
|
427
|
-
action: "create_step";
|
|
428
|
-
body?: {
|
|
429
|
-
content: string;
|
|
430
|
-
contentType?: string | undefined;
|
|
431
|
-
} | undefined;
|
|
432
|
-
description?: string | undefined;
|
|
433
|
-
parameters?: {
|
|
434
|
-
name: string;
|
|
435
|
-
in: "header" | "path" | "query" | "cookie";
|
|
436
|
-
value: string;
|
|
437
|
-
}[] | undefined;
|
|
438
|
-
outputs?: {
|
|
439
|
-
name: string;
|
|
440
|
-
expression: string;
|
|
441
|
-
}[] | undefined;
|
|
442
|
-
successCriteria?: {
|
|
443
|
-
condition: string;
|
|
444
|
-
type?: "regex" | "simple" | "jsonpath" | "xpath" | undefined;
|
|
445
|
-
context?: string | undefined;
|
|
446
|
-
}[] | undefined;
|
|
447
|
-
operation?: {
|
|
448
|
-
path: string;
|
|
449
|
-
method: string;
|
|
450
|
-
apiId: string;
|
|
451
|
-
operationId?: string | undefined;
|
|
452
|
-
} | undefined;
|
|
453
|
-
xOperation?: {
|
|
454
|
-
url: string;
|
|
455
|
-
method: string;
|
|
456
|
-
} | undefined;
|
|
457
|
-
stepName?: string | undefined;
|
|
458
|
-
} | {
|
|
459
|
-
workflowId: string;
|
|
460
|
-
stepId: string;
|
|
461
|
-
collectionId: string;
|
|
462
|
-
action: "delete_step";
|
|
463
|
-
} | {
|
|
464
|
-
action: "save_tab_to_collection";
|
|
465
|
-
targetCollectionId: string;
|
|
466
|
-
targetWorkflowId: string;
|
|
467
|
-
newStepName: string;
|
|
468
|
-
};
|
|
469
|
-
}, {
|
|
470
|
-
error: {
|
|
471
|
-
message: string;
|
|
472
|
-
details?: unknown;
|
|
473
|
-
};
|
|
474
|
-
isError: true;
|
|
475
|
-
data?: undefined;
|
|
476
|
-
} | {
|
|
477
|
-
data: {
|
|
478
|
-
summary: string;
|
|
479
|
-
workflowId?: string | undefined;
|
|
480
|
-
stepId?: string | undefined;
|
|
481
|
-
collectionId?: string | undefined;
|
|
482
|
-
};
|
|
483
|
-
isError: false;
|
|
484
|
-
error?: undefined;
|
|
485
|
-
}>;
|
|
486
|
-
manage_environment: Tool< {
|
|
487
|
-
payload: {
|
|
488
|
-
action: "get_environments";
|
|
489
|
-
} | {
|
|
490
|
-
action: "get_active_environment";
|
|
491
|
-
} | {
|
|
492
|
-
action: "get_inputs";
|
|
493
|
-
environment?: string | undefined;
|
|
494
|
-
} | {
|
|
495
|
-
action: "get_servers";
|
|
496
|
-
environment?: string | undefined;
|
|
497
|
-
} | {
|
|
498
|
-
action: "get_input";
|
|
499
|
-
inputName: string;
|
|
500
|
-
environment?: string | undefined;
|
|
501
|
-
} | {
|
|
502
|
-
name: string;
|
|
503
|
-
value: string;
|
|
504
|
-
action: "upsert_input";
|
|
505
|
-
environment?: string | undefined;
|
|
506
|
-
isSecret?: boolean | undefined;
|
|
507
|
-
} | {
|
|
508
|
-
action: "remove_input";
|
|
509
|
-
inputName: string;
|
|
510
|
-
environment?: string | undefined;
|
|
511
|
-
} | {
|
|
512
|
-
value: string;
|
|
513
|
-
apiId: string;
|
|
514
|
-
action: "upsert_server";
|
|
515
|
-
environment?: string | undefined;
|
|
516
|
-
variables?: {
|
|
517
|
-
name: string;
|
|
518
|
-
value: string;
|
|
519
|
-
}[] | undefined;
|
|
520
|
-
} | {
|
|
521
|
-
environment: string;
|
|
522
|
-
action: "add_environment";
|
|
523
|
-
inputs?: {
|
|
524
|
-
name: string;
|
|
525
|
-
value: string;
|
|
526
|
-
isSecret?: boolean | undefined;
|
|
527
|
-
}[] | undefined;
|
|
528
|
-
servers?: {
|
|
529
|
-
value: string;
|
|
530
|
-
apiId: string;
|
|
531
|
-
variables?: {
|
|
532
|
-
name: string;
|
|
533
|
-
value: string;
|
|
534
|
-
}[] | undefined;
|
|
535
|
-
}[] | undefined;
|
|
536
|
-
setActive?: boolean | undefined;
|
|
537
|
-
} | {
|
|
538
|
-
apiId: string;
|
|
539
|
-
action: "remove_server";
|
|
540
|
-
environment?: string | undefined;
|
|
541
|
-
} | {
|
|
542
|
-
environment: string;
|
|
543
|
-
action: "set_active_environment";
|
|
544
|
-
};
|
|
545
|
-
}, {
|
|
546
|
-
error: {
|
|
547
|
-
message: string;
|
|
548
|
-
details?: unknown;
|
|
549
|
-
};
|
|
550
|
-
isError: true;
|
|
551
|
-
data?: undefined;
|
|
552
|
-
} | {
|
|
553
|
-
data: {
|
|
554
|
-
summary: string;
|
|
555
|
-
input?: {
|
|
556
|
-
name: string;
|
|
557
|
-
value: string;
|
|
558
|
-
isSecret: boolean;
|
|
559
|
-
} | undefined;
|
|
560
|
-
environment?: string | undefined;
|
|
561
|
-
apiId?: string | undefined;
|
|
562
|
-
inputs?: {
|
|
563
|
-
name: string;
|
|
564
|
-
value: string;
|
|
565
|
-
isSecret: boolean;
|
|
566
|
-
}[] | undefined;
|
|
567
|
-
servers?: {
|
|
568
|
-
value: string;
|
|
569
|
-
apiId: string;
|
|
570
|
-
variables: {
|
|
571
|
-
name: string;
|
|
572
|
-
value: string;
|
|
573
|
-
}[];
|
|
574
|
-
}[] | undefined;
|
|
575
|
-
environmentNames?: string[] | undefined;
|
|
576
|
-
};
|
|
577
|
-
isError: false;
|
|
578
|
-
error?: undefined;
|
|
579
|
-
}>;
|
|
580
|
-
};
|
|
581
|
-
|
|
582
129
|
export declare function EmbeddedReplay(props: ReplayAppProps): JSX.Element;
|
|
583
130
|
|
|
584
131
|
declare type EndpointModel = {
|
|
@@ -1206,22 +753,6 @@ declare type ReplayOverlayProps = {
|
|
|
1206
753
|
onRequestChange?: (props: ReplayOnChangeParams) => void;
|
|
1207
754
|
} & ReplayAppProps;
|
|
1208
755
|
|
|
1209
|
-
declare type ReplayTool<T extends ReplayToolNames> = Tool<ReplayToolInput<T>, ReplayToolOutput<T>>;
|
|
1210
|
-
|
|
1211
|
-
declare type ReplayToolDefinition<T extends ReplayToolNames> = ReplayToolDefinitions[T];
|
|
1212
|
-
|
|
1213
|
-
declare type ReplayToolDefinitions = typeof definitions;
|
|
1214
|
-
|
|
1215
|
-
declare type ReplayToolInput<T extends ReplayToolNames> = InferToolInput<ReplayToolDefinition<T>>;
|
|
1216
|
-
|
|
1217
|
-
declare type ReplayToolNames = keyof ReplayToolDefinitions;
|
|
1218
|
-
|
|
1219
|
-
declare type ReplayToolOutput<T extends ReplayToolNames> = InferToolOutput<ReplayToolDefinition<T>>;
|
|
1220
|
-
|
|
1221
|
-
declare type ReplayToolSet = {
|
|
1222
|
-
[K in ReplayToolNames]: ReplayTool<K>;
|
|
1223
|
-
};
|
|
1224
|
-
|
|
1225
756
|
export declare type ResolvedTheme = 'light' | 'dark';
|
|
1226
757
|
|
|
1227
758
|
export declare function resolveTheme(theme: Theme): ResolvedTheme;
|
|
@@ -1274,13 +805,6 @@ declare type SettingsTab = 'appearance' | 'certificates' | 'ai-providers';
|
|
|
1274
805
|
|
|
1275
806
|
export { SpanStatusCode }
|
|
1276
807
|
|
|
1277
|
-
declare enum TabDataType {
|
|
1278
|
-
Workflow = "workflow",
|
|
1279
|
-
WorkflowRun = "workflowRun",
|
|
1280
|
-
Collection = "collection",
|
|
1281
|
-
Step = "step"
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
808
|
export declare class TelemetryClient {
|
|
1285
809
|
private _client;
|
|
1286
810
|
private _isInitialized;
|
|
@@ -1292,6 +816,7 @@ export declare class TelemetryClient {
|
|
|
1292
816
|
get client(): AsyncApiReplay.Telemetry;
|
|
1293
817
|
awaitInit(): Promise<TelemetryClient>;
|
|
1294
818
|
updateCloudEventData(useCloudEventData: () => AsyncApiReplay.CloudEventBaseData): void;
|
|
819
|
+
setCloudEventData(cloudEventData?: Omit<AsyncApiReplay.CloudEventBaseData, 'env'>): void;
|
|
1295
820
|
enrichGlobalAttributes(attributes: Partial<TelemetryGlobalAttributes>): void;
|
|
1296
821
|
getGlobalAttributes(): Readonly<TelemetryGlobalAttributes>;
|
|
1297
822
|
clearGlobalAttributes(): void;
|
|
@@ -1308,6 +833,7 @@ export declare type TelemetryConfig = {
|
|
|
1308
833
|
collectorUrl?: string;
|
|
1309
834
|
isProd?: boolean;
|
|
1310
835
|
enableErrorInstrumentation?: boolean;
|
|
836
|
+
cloudEventData?: Omit<AsyncApiReplay.CloudEventBaseData, 'env'>;
|
|
1311
837
|
};
|
|
1312
838
|
|
|
1313
839
|
export { TelemetryContext }
|
|
@@ -1324,7 +850,7 @@ export declare type TelemetryMethods = {
|
|
|
1324
850
|
|
|
1325
851
|
export declare type Theme = 'light' | 'dark' | 'auto';
|
|
1326
852
|
|
|
1327
|
-
declare type ToolLoopAgentConfig = ToolLoopAgentSettings<never,
|
|
853
|
+
declare type ToolLoopAgentConfig = ToolLoopAgentSettings<never, ToolSet, never>;
|
|
1328
854
|
|
|
1329
855
|
declare type TracerName = 'try-it' | 'replay-openapi' | 'desktop' | 'reunite-tab';
|
|
1330
856
|
|