apify-client 3.0.0-beta.119 → 3.0.0-beta.120
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/bundle.js +1 -1
- package/package.json +5 -5
package/dist/bundle.js
CHANGED
|
@@ -60,7 +60,7 @@ ${JSON.stringify(e,null,2)}`}_parseLoggerException(e,t=1){let i=[];e.type&&i.pus
|
|
|
60
60
|
${o.map(e=>`${" ".repeat(2*t)}${e}`).join("\n")}`}};let oA=class Log{LEVELS=op;options;preferredFieldsMap;warningsOnceLogged=new Set;constructor(e={}){let t;if(this.options={...{level:(t=om.env.APIFY_LOG_LEVEL)?Number.isFinite(+t)?+t:op[t]?op[t]:+t:op.INFO,maxDepth:4,gradualLimitFactor:.5,maxStringLength:1e3,maxArrayLength:500,maxFields:20,preferredFields:[...r8],prefix:null,suffix:null,truncationSuffix:r6,truncationFlagKey:r3,logger:(e=>{switch(e){case od.JSON:return new ov;case od.TEXT:default:return new ox}})(function(){let e=om.env[rY]||od.TEXT;switch(e.toLowerCase()){case od.JSON.toLowerCase():return od.JSON;case od.TEXT.toLowerCase():return od.TEXT;default:return console.warn(`Unknown value for environment variable ${rY}: ${e}`),od.TEXT}}()),data:{}},...e},!op[this.options.level])throw Error('Options "level" must be one of log.LEVELS enum!');if("number"!=typeof this.options.maxDepth)throw Error('Options "maxDepth" must be a number!');if("number"!=typeof this.options.gradualLimitFactor)throw Error('Options "gradualLimitFactor" must be a number!');if("number"!=typeof this.options.maxStringLength)throw Error('Options "maxStringLength" must be a number!');if("number"!=typeof this.options.maxArrayLength)throw Error('Options "maxArrayLength" must be a number!');if("number"!=typeof this.options.maxFields)throw Error('Options "maxFields" must be a number!');if(!Array.isArray(this.options.preferredFields))throw Error('Options "preferredFields" must be an array!');if(this.options.prefix&&"string"!=typeof this.options.prefix)throw Error('Options "prefix" must be a string!');if(this.options.suffix&&"string"!=typeof this.options.suffix)throw Error('Options "suffix" must be a string!');if("string"!=typeof this.options.truncationSuffix)throw Error('Options "truncationSuffix" must be a string!');if("string"!=typeof this.options.truncationFlagKey)throw Error('Options "truncationFlagKey" must be a string!');if("object"!=typeof this.options.logger)throw Error('Options "logger" must be an object!');if("object"!=typeof this.options.data)throw Error('Options "data" must be an object!');this.preferredFieldsMap=Object.fromEntries(this.options.preferredFields.map((e,t)=>[e,t]))}_sanitizeData(e){return function e(t,i){let{maxDepth:n=1/0,gradualLimitFactor:r=1,maxStringLength:o=1/0,maxArrayLength:a=1/0,maxFields:s=1/0,preferredFieldsMap:l={},truncationSuffix:u=r6,truncationFlagKey:c=r3}=i;if("string"==typeof t)return t.length>o?function(e,t,i=r6){if(t=Math.floor(t),i.length>t)throw Error("suffix string cannot be longer than maxLength");return"string"==typeof e&&e.length>t&&(e=e.substr(0,t-i.length)+i),e}(t,o,u):t;if(["number","boolean","symbol","bigint"].includes(typeof t)||null==t||t instanceof Date)return t;if(t instanceof Error){let{name:e,message:i,stack:n,cause:r,...o}=t;t={name:e,message:i,stack:n,cause:r,...o,[r9]:!0}}let p=t=>e(t,{...i,maxDepth:n-1,maxStringLength:Math.max(Math.floor(o*r),u.length),maxArrayLength:Math.floor(a*r),maxFields:Math.floor(s*r)});if(Array.isArray(t)){if(n<=0)return"[array]";let e=t.slice(0,a).map(p);return t.length>a&&e.push(u),e}if("object"==typeof t&&null!==t){if(n<=0)return"[object]";let e=Reflect.ownKeys(t);e.sort((e,t)=>{let i=l[String(e)]??-1,n=l[String(t)]??-1;return -1===i&&-1===n?0:-1===i?1:-1===n?-1:i-n});let i={};return e.slice(0,s).forEach(e=>{i[e]=p(t[e])}),e.length>s&&(i[c]=!0),i}if("function"==typeof t)return"[function]";console.log(`WARNING: Object cannot be logged: ${t}`)}(e,{maxDepth:this.options.maxDepth,gradualLimitFactor:this.options.gradualLimitFactor,maxStringLength:this.options.maxStringLength,maxArrayLength:this.options.maxArrayLength,maxFields:this.options.maxFields,preferredFieldsMap:this.preferredFieldsMap,truncationSuffix:this.options.truncationSuffix,truncationFlagKey:this.options.truncationFlagKey})}getLevel(){return this.options.level}setLevel(e){if(!op[e])throw Error('Options "level" must be one of log.LEVELS enum!');this.options.level=e}internal(e,t,i,n){e>this.options.level||(i=Reflect.ownKeys(i={...this.options.data,...i}).length>0?this._sanitizeData(i):void 0,n=this._sanitizeData(n),this.options.logger.log(e,t,i,n,{prefix:this.options.prefix,suffix:this.options.suffix}))}setOptions(e){this.options={...this.options,...e}}getOptions(){return{...this.options}}child(e){let{prefix:t}=this.options;e.prefix&&(t=t?`${t}:${e.prefix}`:e.prefix);let i=e.data?{...this.options.data,...e.data}:this.options.data;return new Log({...this.options,...e,prefix:t,data:i})}error(e,t){this.internal(op.ERROR,e,t)}exception(e,t,i){this.internal(op.ERROR,t,i,e)}softFail(e,t){this.internal(op.SOFT_FAIL,e,t)}warning(e,t){this.internal(op.WARNING,e,t)}info(e,t){this.internal(op.INFO,e,t)}debug(e,t){this.internal(op.DEBUG,e,t)}perf(e,t){this.internal(op.PERF,e,t)}warningOnce(e){this.warningsOnceLogged.has(e)||(this.warningsOnceLogged.add(e),this.warning(e))}deprecated(e){this.warningOnce(e)}};let ok=new oA,oC={isNode:!1,fetchFailsWithCause:!1,platform:void 0,async compress(){throw Error("Request body compression is only available in Node.js.")},async createHttpAgents(){},streamToWeb(){throw Error("A Readable stream is only available in Node.js.")},unusedProxyHint(){},openBlobBody:e=>e,openStreamBody(e){if(!function(){if(/^(Cloudflare-Workers$|Deno\/|Bun\/)/.test(globalThis.navigator?.userAgent??""))return!0;let e=!1;try{let t=new Request("https://api.apify.com",{method:"POST",body:new ReadableStream,get duplex(){return e=!0,"half"}});return e&&!t.headers.has("content-type")}catch{return!1}}())throw TypeError("This runtime cannot send a ReadableStream as a request body. Read it into a Blob or bytes first, for example with `await new Response(stream).blob()`.");return e}};let oP=class ApifyClientError extends Error{};function oI(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}let oU=/at( async)? (?![A-Za-z]*HttpClient\.)([A-Za-z]+(Collection)?Client)\.(?!call \()([A-Za-z]+) \(/;let oz=class ApifyApiError extends oP{name;clientMethod;statusCode;type;attempt;httpMethod;path;originalStack;data;constructor(e,t){let i,n,r,o=e.data;if(ao(o)){let t=new TextDecoder().decode(e.data);try{o=JSON.parse(t)}catch{o=t}}if(o&&o.error){let{error:e}=o;i=e.message,n=e.type,r=e.data}else if(o){let e;try{e=JSON.stringify(o,null,2)}catch{e=`${o}`}i=`Unexpected error: ${e}`}super(i),this.name=this.constructor.name,this.clientMethod=this.#e(),this.statusCode=e.status,this.type=n,this.attempt=t,this.httpMethod=e.config?.method,this.path=this.#t(e);let a=this.stack;this.originalStack=a.slice(a.indexOf("\n")),this.stack=this.#i(),this.data=r}static fromResponse(e,t){return new(oF[e.status]??(e.status>=500?oB:ApifyApiError))(e,t)}#t(e){let t,i=e.config?.url;try{t=new URL(i)}catch{return i}return t.pathname+t.search}#e(){let e=this.stack.match(oU);return e?`${e[2]}.${e[4]}`:"unknown"}#i(){let{name:e,...t}=this,i=Object.entries(t).map(e=>{let[t,i]=e;return"originalStack"===t&&(t="stack"),` ${t}: ${i}`}).join("\n");return`${e}: ${this.message}
|
|
61
61
|
${i}`}};let oL=class InvalidRequestError extends oz{};let oN=class UnauthorizedError extends oz{};let o$=class ForbiddenError extends oz{};let oD=class NotFoundError extends oz{};let oM=class ConflictError extends oz{};let oj=class RateLimitError extends oz{};let oB=class ServerError extends oz{};let oF={400:oL,401:oN,403:o$,404:oD,409:oM,429:oj},{localeError:oq}=ne();function oZ(e){return null===e?"null":Array.isArray(e)?"array":typeof e}let oW=/^Invalid input: expected (an array of .+|a typed array|an object|object|array|function|number|string|boolean)$/;function oK(e){switch(typeof e){case"string":if(""===e)return"''";return e.length>200?`${e.slice(0,200)}… (${e.length-200} more characters)`:e;case"number":case"boolean":return String(e);case"bigint":return`${e}n`;default:return}}function oG(e){if("number"==typeof e&&Number.isNaN(e))return"received NaN";if(""===e)return"received an empty string";let t=oK(e);return void 0===t?`received ${oZ(e)}`:`received the ${oZ(e)} \`${t}\``}let oV=class ArgumentValidationError extends Error{issues;cause;constructor(e,t,i){super(function(e,t,i){let n=[],r={total:0};for(let i of e.issues)!function e(t,i,n,r,o){let a=[...n,...t.path];if("invalid_union"===t.code){let n=t.errors.map(e=>e.reduce((e,t)=>Math.max(e,function e(t,i){let n=i+t.path.length;if("invalid_union"===t.code){let i=-1;for(let r of t.errors)for(let t of r)i=Math.max(i,e(t,n));return i}return n}(t,a.length)),-1)),s=Math.max(...n);for(let[l,u]of t.errors.entries())if(n[l]===s)for(let t of u)e(t,i,a,r,o);return}if(o.total+=1,r.length>=10)return;let s=a.length?` at \`${function(e){let t="";for(let i of e)"number"==typeof i?t+=`[${i}]`:t+=t?`.${String(i)}`:String(i);return t}(a)}\``:"",l=function(e,t){let i=e;for(let e of t){if(null===i||"object"!=typeof i)return;i=i[e]}return i}(i,a),u=oK(l),c=function(e,t){if("invalid_type"===e.code){if("number"===e.expected&&"number"==typeof t)return"Invalid input: expected a finite number";if("date"===e.expected&&"[object Date]"===Object.prototype.toString.call(t))return"Invalid input: expected a valid date"}return e.message}(t,l),p="",d=oW.exec(c),f=/, received (\S+)$/.exec(c),h=d?.[1].startsWith("an array of")?"array":d?.[1];d&&h!==(Number.isNaN(l)?"NaN":oZ(l))?c+=`, ${oG(l)}`:f&&f[1]===oZ(l)&&void 0!==u?c=`${c.slice(0,f.index)}, ${oG(l)}`:void 0===u||c.endsWith(`received ${u}`)||(p=`, got \`${u}\``),r.push(`${c}${s}${p}`)}(i,t,[],n,r);let o=i?n.map(e=>`${e} in \`${i}\``):[...n],a=r.total-n.length;return a>0&&o.push(`... and ${a} more problem${1===a?"":"s"}`),o.join("\n")}(e,t,i),{cause:e}),this.name="ArgumentValidationError",this.issues=e.issues,this.cause=e}};function oH(e,t,i){let n=t.safeParse(e,{error:oq});if(!n.success)throw new oV(n.error,e,i);return n.data}rD(e=>"object"==typeof e&&null!==e,{error:"Invalid input: expected object"});let oJ=class ResponseValidationError extends oP{issues;method;url;constructor(e,t,i){let n=i.method.toUpperCase(),r=new oV(e,t).message;super(`Response from ${n} ${i.url} does not match the API schema:
|
|
62
62
|
${r}
|
|
63
|
-
The API returned something its OpenAPI specification does not describe. Please report this at https://github.com/apify/apify-client-js/issues.`,{cause:e}),this.name="ResponseValidationError",this.issues=e.issues,this.method=n,this.url=i.url}};var oY=JSON.parse('{"rE":"3.0.0-beta.
|
|
63
|
+
The API returned something its OpenAPI specification does not describe. Please report this at https://github.com/apify/apify-client-js/issues.`,{cause:e}),this.name="ResponseValidationError",this.issues=e.issues,this.method=n,this.url=i.url}};var oY=JSON.parse('{"rE":"3.0.0-beta.120"}'),oX=i("z");let oQ=new TextEncoder,{rE:o0}=oY,o1=["audio/","image/","video/"],o2=new Set(["application/epub+zip","application/gzip","application/java-archive","application/vnd.android.package-archive","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.rar","application/x-7z-compressed","application/x-bzip","application/x-bzip2","application/x-gzip","application/x-rar-compressed","application/x-xz","application/x-zip-compressed","application/zip","application/zstd","font/woff","font/woff2"]),o4=new Set(["audio/aiff","audio/basic","audio/l16","audio/l24","audio/midi","audio/vnd.wave","audio/wav","audio/wave","audio/x-aiff","audio/x-wav","image/bmp","image/tiff","image/vnd.adobe.photoshop","image/vnd.microsoft.icon","image/x-icon","image/x-ms-bmp"]),o9=["+json","+xml"];function o3(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let o6=rD(o3,{error:"Invalid input: expected an object"}),{localeError:o8}=ne(),o5=new rc({type:"object",shape:{data:rn()}??{},...L(void 0)});function o7(e,t){let{method:i="GET",url:n=""}=e.config,r=o5.safeParse(e.data,{error:o8});if(!r.success)throw new oJ(r.error,e.data,{method:i,url:n});let{data:o}=r.data,a=t.safeParse(o,{error:o8});if(!a.success)throw new oJ(a.error,o,{method:i,url:n});return a.data}function ae(e){if(!(e instanceof oD))throw e}function at(e,t){if(!t)throw e;ae(e)}function ai(e){if(e){var t=oQ.encode(JSON.stringify(e));let i="";for(let e=0;e<t.length;e+=32768)i+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(i)}}function an(e){return"string"==typeof e?oQ.encode(e):ao(e)?ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e):void 0}function ar(e){return void 0!==oX?oX.env?.[e]:void 0}function ao(e){return ArrayBuffer.isView(e)?!as(e,"DataView"):as(e,"ArrayBuffer")}function aa(e){return as(e,"Blob")||as(e,"File")}function as(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function al(e){return as(e,"ReadableStream")}function au(e){if(null===e||"object"!=typeof e)return!1;let{on:t,pipe:i}=e;return"function"==typeof t&&"function"==typeof i}function ac(e){return au(e)||al(e)}r5=function(e,t){if("object"!==oI(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==oI(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(Symbol.asyncIterator,"string"),r="symbol"===oI(r5)?r5:String(r5);let ap=class RequestQueuePaginationIterator{#n;#r;#o;#a;constructor(e){this.#n=e.maxPageLimit,this.#o=e.limit,this.#a=e.cursor,this.#r=e.getPage}async *[r](){let e=this.#a,t=0;for(;;){let i=this.#o?Math.min(this.#n,this.#o-t):this.#n,n=await this.#r({limit:i,cursor:e});if(0===n.items.length||(yield n,t+=n.items.length,this.#o&&t>=this.#o||!n.nextCursor))return;e=n.nextCursor}}};function ad(e,t){return(0===e&&(e=void 0),0===t&&(t=void 0),void 0===e)?t:void 0===t?e:Math.min(e,t)}let af={limit:n6().min(0).optional(),offset:n6().min(0).optional(),chunkSize:n6().positive().optional()};function ah(e,t){for(let[i,n]of Object.entries(t??{}))if(void 0!==n){if(Array.isArray(n)){e.searchParams.set(i,n.join(","));continue}e.searchParams.set(i,String(n))}return e}let am=nU().nonempty().refine(e=>"."!==e&&".."!==e,{error:"URL path must not contain dot segments"});function ag(e){return encodeURIComponent(oH(e,am))}function ay(e){return Array.isArray(e)?e.map(ag).join("/"):e}async function ab(e,t){return new Promise(i=>{if(t?.aborted)return void i();let n=()=>{clearTimeout(r),i()},r=setTimeout(()=>{t?.removeEventListener("abort",n),i()},e);t?.addEventListener("abort",n,{once:!0})})}let av=new Uint8Array(256);av[9]|=2,av[32]|=2,av[59]|=4,av[44]|=8;for(let e=128;e<=255;e++)av[e]|=1;for(let e of"!#$%&'*+-.^_`|~")av[e.charCodeAt(0)]|=16;for(let e=48;e<=57;e++)av[e]|=16;for(let e=65;e<=90;e++)av[e]|=17;for(let e=97;e<=122;e++)av[e]|=16;let a_=((f=function(){}).prototype=Object.create(null),f),aw="application/json",aE=[RegExp(`^${aw}`,"i"),/^application\/.*xml$/i,/^text\//i],aS=rD(e=>"object"==typeof e&&null!==e&&"string"==typeof e.contentEncoding&&"function"==typeof e.compress,{error:"Invalid input: expected an HttpCompressor"}),aT=rp({quality:n5().min(0).max(11).default(6)});let aR=class BrotliHttpCompressor{contentEncoding="br";#s;constructor(e={}){let{quality:t}=oH(e,aT,"BrotliHttpCompressorOptions");this.#s=t}async compress(e){return oC.compress(e,{algorithm:"br",quality:this.#s})}};let aO=rp({quality:n5().min(1).max(9).default(6)});let ax=class GzipHttpCompressor{contentEncoding="gzip";#s;constructor(e={}){let{quality:t}=oH(e,aO,"GzipHttpCompressorOptions");this.#s=t}async compress(e){return oC.compress(e,{algorithm:"gzip",quality:this.#s})}};let aA=rp({quality:n5().min(1).max(19).default(3)});let ak=class ZstdHttpCompressor{contentEncoding="zstd";#s;constructor(e={}){let{quality:t}=oH(e,aA,"ZstdHttpCompressorOptions");this.#s=t}async compress(e){return oC.compress(e,{algorithm:"zstd",quality:this.#s})}};let aC=rh([rw(["brotli","gzip","zstd"]),aS]);function aP(e){if("string"!=typeof e)return e;switch(e){case"gzip":return new ax;case"brotli":return new aR;case"zstd":return new ak}}let aI=class InvalidResponseBodyError extends oP{code;response;constructor(e,t){super(`Response body could not be parsed.
|
|
64
64
|
Cause:${t.message}`),this.name=this.constructor.name,this.code="invalid-response-body",this.response=e,this.cause=t}};let aU=n6().gt(0);let az=class Statistics{calls=0;requests=0;rateLimitErrors=[];addRateLimitError(e){oH(e,aU);let t=e-1;this.#l(t),this.rateLimitErrors[t]++}#l(e){if(this.rateLimitErrors.length<=e)for(let t=0;t<=e;t++)"number"!=typeof this.rateLimitErrors[t]&&(this.rateLimitErrors[t]=0)}};let aL=rh([rw(["short","medium","long","noTimeout"]),n6().positive()]).optional(),aN=rj(AbortSignal).optional(),a$={timeoutSecs:aL,signal:aN},aD=rp(a$);var aM=i("d").Buffer;let aj="application/json",aB="application/x-www-form-urlencoded",aF={maxRetries:n6().int().nonnegative(),minDelayBetweenRetriesMillis:n6().nonnegative(),timeoutShortSecs:n6().positive(),timeoutMediumSecs:n6().positive(),timeoutLongSecs:n6().positive(),timeoutMaxSecs:n6().positive()},aq=rd(aF).partial(),aZ=new Set(["FormData"]);let aW=class HttpClient{stats;logger;maxRetries;minDelayBetweenRetriesMillis;timeoutMillis;timeoutMaxMillis;httpCompressor;defaultHeaders;constructor(e={}){oH(e,aq,"HttpClientOptions"),this.stats=e.stats??new az,this.logger=e.logger??ok.child({prefix:"ApifyClient"}),this.maxRetries=e.maxRetries??8,this.minDelayBetweenRetriesMillis=e.minDelayBetweenRetriesMillis??500,this.timeoutMillis={short:(e.timeoutShortSecs??5)*1e3,medium:(e.timeoutMediumSecs??30)*1e3,long:(e.timeoutLongSecs??360)*1e3},this.timeoutMaxMillis=(e.timeoutMaxSecs??360)*1e3,this.httpCompressor=aP(e.compression??"brotli");let t={},i=e.workflowKey||ar("APIFY_WORKFLOW_KEY");if(i&&(t["X-Apify-Workflow-Key"]=i),oC.platform){var n;let i=!!ar("APIFY_IS_AT_HOME"),r=`ApifyClient/${o0} (${oC.platform}); isAtHome/${i}`;e.userAgentSuffix&&(r+=`; ${(Array.isArray(n=e.userAgentSuffix)?n:[n]).join("; ")}`),t["User-Agent"]=r}e.token&&(t.Authorization=`Bearer ${e.token}`),this.defaultHeaders=aG(t,e.headers)}setDefaultAuthorization(e){void 0===aK(this.defaultHeaders,"authorization")&&(this.defaultHeaders.Authorization=`Bearer ${e}`)}isTimeoutError(e){return e instanceof Error&&"TimeoutError"===e.name}isRetryableTransportError(e){return!1}async close(){}async sendRequest(e){throw Error(`Implement sendRequest() to send ${e.method} ${e.url}, or override call() entirely.`)}async call(e){e.signal?.throwIfAborted(),this.stats.calls++;let{headers:t,body:i}=await this.prepareRequest(e),n=this.buildUrl(e.url,e.params);try{return await this.#u(async(r,o)=>this.#c({config:e,url:n,headers:t,body:i,attempt:o,stopRetrying:r}),e.signal)}catch(t){throw al(e.data)&&au(i)&&i.destroy(),t}}async prepareRequest(e){let t=aG(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Authorization",i=aK(e,"authorization");if("Authorization"===t||void 0===i)return e;let n={...e};return aV(n,"authorization"),aG(n,{[t]:i})}(this.defaultHeaders,e.authorizationHeader),e.headers),i=function(e,t,i){if(null!=e){if(au(e))return e;if(al(e))return oC.openStreamBody(e);if(aa(e))return void 0===aK(t,"content-type")&&e.type&&(t["Content-Type"]=e.type),e;if(ao(e))return!oC.isNode||aM.isBuffer(e)?e:ArrayBuffer.isView(e)?aM.from(e.buffer,e.byteOffset,e.byteLength):aM.from(e);if("string"==typeof e)return e;if("object"==typeof e){var n,r;if(e instanceof URLSearchParams)return void 0===aK(t,"content-type")&&(t["Content-Type"]=`${aB};charset=utf-8`),e.toString();let o=(n=e,Object.prototype.toString.call(n).slice(8,-1));if(aZ.has(o))throw TypeError(`Unsupported request body type: ${o}`);void 0===aK(t,"content-type")&&(t["Content-Type"]=aj);let a=aK(t,"content-type");if(aH(a)===aB){let t,i;return r=e,t=new URLSearchParams,i=(e,n)=>{if(null!=n)if(n instanceof Date)t.append(e,n.toISOString());else if(ao(n)){var r;t.append(e,(ArrayBuffer.isView(r=n)?aM.from(r.buffer,r.byteOffset,r.byteLength):aM.from(r)).toString("base64"))}else if(Array.isArray(n)){let t=n.some(aY);n.forEach((n,r)=>i(t?`${e}[${r}]`:`${e}[]`,n))}else"object"==typeof n?Object.entries(n).forEach(t=>{let[n,r]=t;return i(`${e}[${n}]`,r)}):t.append(e,String(n))},Object.entries(r).forEach(e=>{let[t,n]=e;return i(t,n)}),t.toString()}return JSON.stringify(e,i&&aH(a)===aj?aJ:void 0)}throw TypeError(`Unsupported request body type: ${typeof e}`)}}(e.data,t,e.stringifyFunctions),n=e.compression??this.httpCompressor,r=n&&function(e,t){if(void 0===e||!oC.isNode||void 0!==aK(t,"content-encoding")||!function(e){if(!e)return!0;let t=e.split(";",1)[0].trim().toLowerCase();return!!(o4.has(t)||o9.some(e=>t.endsWith(e)))||!o2.has(t)&&!o1.some(e=>t.startsWith(e))}(aK(t,"content-type")))return;let i=an(e);return i&&i.byteLength>=1024?i:void 0}(i,t);return r&&(i=await n.compress(aM.from(r.buffer,r.byteOffset,r.byteLength)),aV(t=aG(t,{"Content-Encoding":n.contentEncoding}),"content-length")),aa(i)&&oC.isNode&&(t=aG(t,{"Content-Length":String(i.size)})),{headers:t,body:i}}buildUrl(e,t){let i=[];for(let[e,n]of Object.entries(t??{}))void 0!==n&&(n instanceof Date?i.push([e,n.toISOString()]):"boolean"==typeof n?i.push([e,String(Number(n))]):i.push([e,String(n)]));if(0===i.length)return e;let n=new URLSearchParams(i).toString();return`${e}${e.includes("?")?"&":"?"}${n}`}computeTimeoutMillis(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"medium";if("noTimeout"===t)return;let i="number"==typeof t?1e3*t:this.timeoutMillis[t];return i>this.timeoutMaxMillis&&this.logger.warningOnce(`The requested timeout of ${i/1e3}s exceeds timeoutMaxSecs (${this.timeoutMaxMillis/1e3}s) and is capped at it. Raise timeoutMaxSecs on the client to allow longer request timeouts.`),Math.min(i*2**(e-1),this.timeoutMaxMillis)}async #u(e,t){let i=!0,n=()=>{i=!1};for(let r=1;r<=this.maxRetries;r++){t?.throwIfAborted();try{return await e(n,r)}catch(e){if(t?.throwIfAborted(),!i)throw e;this.#p(e,r)}let o=this.minDelayBetweenRetriesMillis*2**(r-1)*(1+Math.random());await ab(o,t)}return t?.throwIfAborted(),e(n,this.maxRetries+1)}async #c(e){let t,i,n,{config:r,url:o,headers:a,body:s,attempt:l,stopRetrying:u}=e;this.stats.requests++;let c=ac(r.data),p=aa(s)?oC.openBlobBody(s,e=>{t={error:e}}):s;try{i=await this.sendRequest({method:r.method,url:o,headers:a,body:p,timeoutMillis:this.computeTimeoutMillis(l,r.timeoutSecs),stream:"stream"===r.responseType,followRedirects:r.followRedirects??!0,signal:r.signal})}catch(e){if(r.signal?.throwIfAborted(),t)throw u(),function(e,t){if(!(e instanceof Error)||void 0!==e.cause)return e;let i=new Set;for(let n=t;n instanceof Error&&!i.has(n);n=n.cause){if(n===e)return e;i.add(n)}return e.cause=t,e}(t.error,e);throw this.#d(e,r,u),e}finally{p!==s&&au(p)&&p.destroy()}let d=i.status>=300,f=d&&this.#f(i.status,r.retryStatusCodes),h=d&&!1===r.throwOnErrorStatus&&(!f||c||l>this.maxRetries);au(i.body)&&(i.body=oC.streamToWeb(i.body)),d&&!h&&al(i.body)&&(i.body=await new Response(i.body).arrayBuffer().catch(()=>void 0)),ao(i.body)&&(i.body=function(e){if(oC.isNode&&aM.isBuffer(e))return e;let t=an(e);return oC.isNode?aM.from(t.buffer,t.byteOffset,t.byteLength):t}(i.body));try{n=this.#h(i,r)}catch(e){if(!d)throw u(),e;n=i.body}let m={status:i.status,headers:i.headers,data:n,config:r};if(!d||(429===i.status&&!1!==r.throwOnErrorStatus&&this.stats.addRateLimitError(l),h))return m;let g=oz.fromResponse(m,l);throw f?c&&(this.#m(),u()):u(),g}#h(e,t){let{body:i}=e;if("stream"===t.responseType||"buffer"===t.responseType||void 0===i||!ao(i))return i;if(0!==i.byteLength)try{var n;return function(e,t){var i;let n,r;try{let e=function(e){let t=e.length,i=0;for(;(2&av[e.charCodeAt(i)])!=0;)i++;let n=i,r=0,o=-1,a=0;for(;n<t;){let t=e.charCodeAt(n),i=av[t];if((4&i)!=0){a|=8&i;break}(2&i)!=0?-1===o&&(o=n):o=-1,r|=65280&t|i,n++}let s=-1===o?n:o,l=e.slice(i,s),u=(65281&r)==0?l:l.toLowerCase();return n===t||0!==a?{type:u,index:n,parameters:new a_}:function(e,t,i,n){let r=new a_;e:for(;i<n;){for(i++;(2&av[e.charCodeAt(i)])!=0;)i++;let t=i,o=0,a=-1;for(;i<n;){let s=e.charCodeAt(i),l=av[s];if((4&l)!=0){if((8&l)!=0)break e;continue e}if(61===s){let s=-1===a?i:a,l=e.slice(t,s),u=(65281&o)==0?l:l.toLowerCase();for(i++;(2&av[e.charCodeAt(i)])!=0;)i++;if(i<n&&34===e.charCodeAt(i)){let t=++i,o=!1;for(;i<n;){let a=e.charCodeAt(i);if(34===a){void 0===r[u]&&(r[u]=o?function(e,t,i){let n="";for(let r=t;r<i;r++)92===e.charCodeAt(r)&&(n+=e.slice(t,r),t=++r);return n+e.slice(t,i)}(e,t,i):e.slice(t,i)),i++;let a=0;for(;i<n;){let t=av[e.charCodeAt(i)];if((4&t)!=0){a=8&t;break}i++}if(0!==a)break e;continue e}if(92===a&&i+1<n){o=!0,i+=2;continue}i++}continue e}let c=i,p=0,d=-1;for(;i<n;){let t=av[e.charCodeAt(i)];if((4&t)!=0){p=8&t;break}(2&t)!=0?-1===d&&(d=i):d=-1,i++}if(void 0===r[u]){let t=-1===d?i:d;r[u]=e.slice(c,t)}if(0!==p)break e;continue e}(2&l)!=0?-1===a&&(a=i):a=-1,o|=65280&s|l,i++}}return{type:t,index:i,parameters:r}}(e,u,n,t)}(t);n=e.type,r=e.parameters.charset}catch{return e}if(!((i=n)&&aE.some(e=>e.test(i))))return e;let o=function(e){try{return new TextDecoder(e,{ignoreBOM:!0})}catch{return}}(r);if(!o)return e;let a=o.decode(e);return n===aw?JSON.parse(a):a}(i,(n=e.headers["content-type"],(Array.isArray(n)?n[0]:n)??""))}catch(t){throw new aI(e,t)}}#d(e,t,i){t.doNotRetryTimeouts&&this.isTimeoutError(e)||!1===t.retryTransportErrors||!this.isRetryableTransportError(e)?i():ac(t.data)&&(this.#m(),i())}#f(e,t){return t?t.includes(e):429===e||e>=500}#m(){this.logger.warningOnce("Request body was a stream - retrying will not work, as part of it was already consumed."),this.logger.warningOnce("If you want Apify client to handle retries for you, collect the stream into a buffer before sending it.")}#p(e,t){if(t===Math.round(this.maxRetries/2)){let{stack:i,cause:n}=e,r=n instanceof Error?`
|
|
65
65
|
Caused by: ${n.stack??n}`:"";this.logger.warning(`API request failed ${t} times. Max attempts: ${this.maxRetries+1}.
|
|
66
66
|
Cause:${i??e}${r}`)}}};function aK(e,t){let i=t.toLowerCase(),n=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0===n?void 0:e[n]}function aG(e,t){let i={...e};for(let[e,n]of Object.entries(t??{})){for(let t of Object.keys(i))t.toLowerCase()===e.toLowerCase()&&delete i[t];i[e]=n}return i}function aV(e,t){let i=t.toLowerCase();for(let t of Object.keys(e))t.toLowerCase()===i&&delete e[t]}function aH(e){return e?.split(";",1)[0].trim().toLowerCase()}function aJ(e,t){return"function"==typeof t?t.toString():t}function aY(e){return!!Array.isArray(e)||"object"==typeof e&&null!==e&&!(e instanceof Date)&&!ao(e)}let aX=new Set(["ETIMEDOUT","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT"]),aQ=new Set(["ERR_INVALID_URL","ERR_INVALID_ARG_TYPE","ERR_INVALID_ARG_VALUE","UND_ERR_INVALID_ARG","UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"]);let a0=class FetchHttpClient extends aW{#g;constructor(e={}){super(e),this.#g=e.fetch}isTimeoutError(e){if(super.isTimeoutError(e))return!0;let t=a2(e);return void 0!==t&&aX.has(t)}isRetryableTransportError(e){if(this.isTimeoutError(e))return!0;let t=a2(e)??a4(e);return!(void 0!==t&&aQ.has(t))&&(oC.fetchFailsWithCause?e instanceof TypeError&&void 0!==e.cause:e instanceof TypeError||void 0!==t)}async sendRequest(e){let t,i,{method:n,url:r,headers:o,body:a,timeoutMillis:s,stream:l,followRedirects:u,signal:c}=e,p=new AbortController,d=!1,f=()=>{clearTimeout(t),void 0===s||d||(t=setTimeout(()=>p.abort(new DOMException(`timeout of ${s}ms exceeded`,"TimeoutError")),s))};f();try{var h,m,g,y,b;let e,t,s,d,v=globalThis.location?.href;if(!oC.fetchFailsWithCause&&!URL.canParse(r,v))throw Object.assign(TypeError(`Invalid URL: ${r}`),{code:"ERR_INVALID_URL"});h=a,m=f,i=al(h)?(g=h,y=m,t=g.getReader(),new ReadableStream({async pull(i){if(!e?.byteLength){let{done:n,value:r}=await t.read();if(n)return i.close();e=r}y(),i.enqueue(e.subarray(0,65536)),e=e.subarray(65536)},async cancel(e){await t.cancel(e)}},{highWaterMark:0})):au(h)&&!a1?async function*(e,t){for await(let i of e){let e="string"==typeof i?new TextEncoder().encode(i):i;if(!(e instanceof Uint8Array)||e.byteLength<=65536){t(),yield e;continue}for(let i=0;i<e.byteLength;i+=65536)t(),yield e.subarray(i,i+65536)}}(h,m):h;let _=await (this.#g??globalThis.fetch)(r,{method:n,headers:o,body:i,redirect:u&&!ac(a)?"follow":"manual",signal:c?AbortSignal.any([c,p.signal]):p.signal,...ac(a)?{duplex:"half"}:{}});if("opaqueredirect"===_.type)throw new oP(`${n} ${r} responded with a redirect, which the client does not follow.`);return{status:_.status,headers:(b=_.headers,s=Object.fromEntries(b),(d=b.getSetCookie?.()??[]).length>0&&(s["set-cookie"]=d),s),body:l?_.body??new Blob([]).stream():await async function(e,t){let i=[],n=0,r=e.body?.getReader();for(let e=await r?.read();e&&!e.done;e=await r?.read())t(),i.push(e.value),n+=e.value.byteLength;let o=new Uint8Array(n),a=0;for(let e of i)o.set(e,a),a+=e.byteLength;return o}(_,f)}}catch(e){throw al(i)&&!i.locked&&i.cancel(e).catch(()=>{}),!this.#g&&this.isRetryableTransportError(e)&&this.#y(),e}finally{d=!0,clearTimeout(t)}}#y(){let e=oC.unusedProxyHint();e&&this.logger.warningOnce(e)}};let a1="Bun"in globalThis;function a2(e){return a4(e instanceof Error?e.cause:void 0)}function a4(e){let t=e?.code;return"string"==typeof t?t:void 0}let a9=class ApiClient{id;safeId;baseUrl;publicBaseUrl;resourcePath;url;apifyClient;httpClient;params;constructor(e){let{baseUrl:t,publicBaseUrl:i,apifyClient:n,httpClient:r,resourcePath:o,id:a,params:s={}}=e;this.id=a,this.safeId=a&&this.toSafeId(a),this.baseUrl=t,this.publicBaseUrl=i,this.resourcePath=o,this.url=a?`${t}/${o}/${ag(this.safeId)}`:`${t}/${o}`,this.apifyClient=n,this.httpClient=r,this.params=s}subResourceOptions(e){return{...{baseUrl:this.buildUrl(),publicBaseUrl:this.publicBaseUrl,apifyClient:this.apifyClient,httpClient:this.httpClient,params:this.buildParams()},...e}}buildUrl(e){return e?`${this.url}/${ay(e)}`:this.url}buildPublicUrl(e){let t=this.id?`${this.publicBaseUrl}/${this.resourcePath}/${ag(this.safeId)}`:`${this.publicBaseUrl}/${this.resourcePath}`;return e?`${t}/${ay(e)}`:t}buildParams(e){return{...this.params,...e}}toSafeId(e){return e.replaceAll("/","~")}listPaginatedFromCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{chunkSize:i,...n}=t,r=ad(t.limit,i),o=e({...n,limit:r}),a=(e,t)=>{let i=Math.max(e.count??0,e.items.length);return t?Math.min(i,t):i};return Object.defineProperty(o,Symbol.asyncIterator,{value:async function*(){let s=await o;yield*s.items;let l=a(s,r),u=(t.offset??0)+l,c=t.limit?t.limit-l:void 0;for(;l>0&&(void 0===c||c>0);){let t=ad(c,i),r={...n,limit:t,offset:u};s=await e(r),yield*s.items,u+=l=a(s,t),void 0!==c&&(c-=l)}}})}};let a3=class ResourceClient extends a9{timeoutForWaitForFinish(e,t,i){if(void 0!==e)return e;if(void 0===i)return t;let n=Math.min(i,60);return n<=0?t:n+this.httpClient.timeoutMillis[t]/1e3}async getResource(e,t,i,n){let r={url:this.buildUrl(),method:"GET",params:this.buildParams(t),timeoutSecs:i,signal:n};try{let t=await this.httpClient.call(r);return o7(t,e)}catch(e){at(e,this.id)}}async updateResource(e,t,i,n){return o7(await this.httpClient.call({url:this.buildUrl(),method:"PUT",params:this.buildParams(),data:t,timeoutSecs:i,signal:n}),e)}async deleteResource(e,t){try{await this.httpClient.call({url:this.buildUrl(),method:"DELETE",params:this.buildParams(),timeoutSecs:e,signal:t})}catch(e){at(e,this.id)}}async waitForJobFinish(e){let t,i,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{waitSecs:o=999999,timeoutSecs:a="noTimeout",signal:s}=r,l=1e3*o,u=Date.now(),c=()=>{let e=Date.now();return!(e-u>=l)&&(void 0===i||!(e-i>=3e3))&&!(t&&rH.includes(t.status))};for(;;){let r=Math.max(0,Math.round((l-(Date.now()-u))/1e3)),o={url:this.buildUrl(),method:"GET",params:this.buildParams({waitForFinish:r}),timeoutSecs:a,signal:s};try{let n=await this.httpClient.call(o);t=o7(n,e),i=void 0}catch(e){ae(e),t=void 0,i??=Date.now(),n=e}if(!c())break;await ab(250,s),s?.throwIfAborted()}if(!t)throw n;return t}};function a6(e){return iE(nL,e)}function a8(e){return new ra({type:"date",coerce:!0,...L(e)})}function a5(e){let t;return()=>t??=e()}let a7=a5(()=>rd({total:n5().min(0),offset:n5().min(0),limit:n5().min(1),desc:re(),count:n5().min(0)})),se=a5(()=>rd({totalBuilds:n5().optional(),totalRuns:n5().optional(),totalUsers:n5().optional(),totalUsers7Days:n5().optional(),totalUsers30Days:n5().optional(),totalUsers90Days:n5().optional(),totalMetamorphs:n5().optional(),lastRunStartedAt:a6({offset:!0}).pipe(a8()).optional(),actorReviewCount:n5().optional(),actorReviewRating:n6().optional(),bookmarkCount:n5().optional(),publicActorRunStats30Days:rd({ABORTED:n5().optional(),FAILED:n5().optional(),SUCCEEDED:n5().optional(),"TIMED-OUT":n5().optional(),TOTAL:n5().optional()}).optional()})),st=a5(()=>rd({id:nU(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),name:nU(),username:nU(),title:nU().optional(),stats:se().nullable().optional()})),si=a5(()=>a7().extend({items:ru(st())})),sn=a5(()=>rw(["LIMITED_PERMISSIONS","FULL_PERMISSIONS"]).or(nU())),sr=a5(()=>rw(["BASE64","TEXT"]).or(nU())),so=a5(()=>rd({format:sr().optional(),content:nU().nullable().optional(),name:nU()})),sa=a5(()=>rd({name:nU(),folder:re()})),ss=a5(()=>ru(rh([so(),sa()]))),sl=a5(()=>rd({build:nU().optional(),timeoutSecs:n5().optional(),memoryMbytes:n5().optional(),restartOnError:re().nullable().optional(),maxItems:n5().nullable().optional(),maxTotalChargeUsd:n6().nullable().optional(),isMaxTotalChargeUsdSetByUser:re().nullable().optional(),forcePermissionLevel:sn().nullable().optional()})),su=a5(()=>rd({isEnabled:re().nullable().optional(),desiredRequestsPerActorRun:n5().nullable().optional(),maxRequestsPerActorRun:n5().nullable().optional(),idleTimeoutSecs:n5().nullable().optional(),build:nU().nullable().optional(),memoryMbytes:n5().nullable().optional(),disableStandbyFieldsOverride:re().nullable().optional(),shouldPassActorInput:re().nullable().optional(),tenancy:rw(["SINGLE_TENANT","MULTI_TENANT"]).or(nU()).nullable().optional(),isConsoleAuthEnabled:re().nullable().optional(),isTokenlessEnabled:re().nullable().optional()})),sc=a5(()=>rd({body:nU().optional(),contentType:nU().optional()})),sp=a5(()=>rw(["SOURCE_FILES","GIT_REPO","TARBALL","GITHUB_GIST","SOURCE_CODE"]).or(nU())),sd=a5(()=>rd({name:nU(),value:nU().optional(),isSecret:re().nullable().optional(),valueHash:nU().optional()})),sf=a5(()=>rd({versionNumber:nU().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),sourceType:sp().nullable(),envVars:ru(sd()).nullable().optional(),applyEnvVarsToBuild:re().nullable().optional(),buildTag:nU().nullable().optional(),sourceFiles:ss().optional(),gitRepoUrl:nU().nullable().optional(),tarballUrl:nU().nullable().optional(),gitHubGistUrl:nU().nullable().optional(),actorPath:nU().min(1).max(255).nullable().optional(),githubWebhookId:n5().nullable().optional(),gitlabWebhookId:n5().nullable().optional(),bitbucketWebhookId:nU().nullable().optional()})),sh=a5(()=>rd({apifyMarginPercentage:n6(),createdAt:a6({offset:!0}).pipe(a8()),startedAt:a6({offset:!0}).pipe(a8()),notifiedAboutFutureChangeAt:a6({offset:!0}).pipe(a8()).nullable().optional(),notifiedAboutChangeAt:a6({offset:!0}).pipe(a8()).nullable().optional(),notifiedAboutRentalToPpePriceChangeAt:a6({offset:!0}).pipe(a8()).nullable().optional(),reasonForChange:nU().nullable().optional(),isPriceChangeNotificationSuppressed:re().optional(),forceContainsSignificantPriceChange:re().optional()})),sm=a5(()=>rd({tieredEventPriceUsd:n6()})),sg=a5(()=>rv(nU(),sm())),sy=a5(()=>rd({eventTitle:nU(),eventDescription:nU(),eventPriceUsd:n6().optional(),eventTieredPricingUsd:sg().optional(),isPrimaryEvent:re().nullable().optional(),isOneTimeEvent:re().nullable().optional()})),sb=a5(()=>sh().extend({pricingModel:rS("PAY_PER_EVENT"),pricingPerEvent:rd({actorChargeEvents:rv(nU(),sy()).optional()}),minimalMaxTotalChargeUsd:n6().nullable().optional(),isPPEPlatformUsagePaidByUser:re().nullable().optional()})),sv=a5(()=>rd({tieredPricePerUnitUsd:n6()})),s_=a5(()=>rv(nU(),sv())),sw=a5(()=>sh().extend({pricingModel:rS("PRICE_PER_DATASET_ITEM"),unitName:nU(),pricePerUnitUsd:n6().optional(),tieredPricing:s_().optional()})),sE=a5(()=>sh().extend({pricingModel:rS("FLAT_PRICE_PER_MONTH"),trialMinutes:n5(),pricePerUnitUsd:n6()})),sS=a5(()=>sh().extend({pricingModel:rS("FREE")})),sT=a5(()=>rg("pricingModel",[sb(),sw(),sE(),sS()])),sR=a5(()=>rd({buildId:nU().optional(),buildNumber:nU().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),buildNumberInt:n5().optional(),finishedAt:a6({offset:!0}).pipe(a8()).nullable().optional()})),sO=a5(()=>rv(nU(),sR().nullable())),sx=a5(()=>rw(["NONE","RESIDENTIAL_PROXY_REQUIRED","UNDER_MAINTENANCE"]).or(nU()).nullable()),sA=a5(()=>rd({id:nU(),userId:nU(),name:nU(),username:nU(),description:nU().nullable().optional(),restartOnError:re().nullable().optional(),isPublic:re(),actorPermissionLevel:sn().optional(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),stats:se(),versions:ru(sf()),pricingInfos:ru(sT()).optional(),defaultRunOptions:sl(),exampleRunInput:sc().nullable().optional(),isDeprecated:re().nullable().optional(),deploymentKey:nU().optional(),title:nU().nullable().optional(),taggedBuilds:sO().nullable().optional(),actorStandby:su().nullable().optional(),readmeSummary:nU().optional(),seoTitle:nU().nullable().optional(),seoDescription:nU().nullable().optional(),pictureUrl:nU().nullable().optional(),standbyUrl:nU().nullable().optional(),notice:sx().optional(),categories:ru(nU()).nullable().optional(),isCritical:re().optional(),isGeneric:re().optional(),isSourceCodeHidden:re().optional(),hasNoDataset:re().optional()})),sk=a5(()=>rd({total:n5(),items:ru(sf())})),sC=a5(()=>rd({total:n5(),items:ru(sd())})),sP=a5(()=>rw(["ACTOR.BUILD.ABORTED","ACTOR.BUILD.CREATED","ACTOR.BUILD.FAILED","ACTOR.BUILD.SUCCEEDED","ACTOR.BUILD.TIMED_OUT","ACTOR.RUN.ABORTED","ACTOR.RUN.CREATED","ACTOR.RUN.FAILED","ACTOR.RUN.RESURRECTED","ACTOR.RUN.SUCCEEDED","ACTOR.RUN.TIMED_OUT","TEST"]).or(nU())),sI=a5(()=>rd({actorId:nU().nullable().optional(),actorTaskId:nU().nullable().optional(),actorRunId:nU().nullable().optional()})),sU=a5(()=>rd({userIntegrationId:nU().optional(),channelId:nU().optional(),messageTemplate:nU().optional()})),sz=a5(()=>rd({fields:ru(nU()).optional(),omit:ru(nU()).optional()})),sL=a5(()=>rd({userIntegrationId:nU().optional(),emailTo:ru(nU()).optional(),subject:nU().optional(),body:nU().optional(),attachmentFormat:nU().nullable().optional(),attachmentTransformation:sz().optional()})),sN=a5(()=>rd({userIntegrationId:nU().optional(),filename:nU().optional(),format:nU().nullable().optional(),transformation:sz().optional()})),s$=a5(()=>rd({userIntegrationId:nU().optional(),repository:nU().optional(),title:nU().optional(),body:nU().optional()})),sD=a5(()=>rw(["ACTIVE","SUCCEEDED","FAILED"]).or(nU())),sM=a5(()=>rd({status:sD(),finishedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),removedAt:a6({offset:!0}).pipe(a8()).nullable().optional()})),sj=a5(()=>rd({totalDispatches:n5().optional()})),sB=a5(()=>rd({id:nU(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),userId:nU(),isAdHoc:re().nullable().optional(),isEnabled:re().optional(),actionType:nU().optional(),isApifyIntegration:re().nullable().optional(),shouldInterpolateStrings:re().nullable().optional(),eventTypes:ru(sP()),condition:sI(),ignoreSslErrors:re(),doNotRetry:re().nullable().optional(),requestUrl:nq({normalize:!0}).nullable().optional(),payloadTemplate:nU().nullable().optional(),headersTemplate:nU().nullable().optional(),title:nU().nullable().optional(),description:nU().nullable().optional(),slackMessage:sU().optional(),googleMail:sL().optional(),googleDrive:sN().optional(),githubIssue:s$().optional(),lastDispatch:sM().nullable().optional(),stats:sj().nullable().optional()})),sF=a5(()=>rw(["READY","RUNNING","SUCCEEDED","FAILED","TIMING-OUT","TIMED-OUT","ABORTING","ABORTED"]).or(nU())),sq=a5(()=>rw(["DEVELOPMENT","WEB","API","SCHEDULER","TEST","WEBHOOK","ACTOR","CLI","CI","STANDBY","MCP","APIFY_AI"]).or(nU())),sZ=a5(()=>rd({origin:sq(),clientIp:nU().optional(),userAgent:nU().optional(),githubActionsRunUrl:nU().optional(),actorRunId:nU().optional(),webhookDispatchId:nU().optional()})),sW=a5(()=>rd({id:nU(),actId:nU().optional(),userId:nU().optional(),status:sF(),startedAt:a6({offset:!0}).pipe(a8()),finishedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),usageTotalUsd:n6().optional(),buildNumber:nU().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),buildNumberInt:n5().optional(),meta:sZ().optional()})),sK=a5(()=>a7().extend({items:ru(sW())})),sG=a5(()=>rd({durationMillis:n5().optional(),runTimeSecs:n6().optional(),computeUnits:n6().optional(),imageSizeBytes:n5().nullable().optional()})),sV=a5(()=>rd({useCache:re().nullable().optional(),betaPackages:re().nullable().optional(),memoryMbytes:n5().nullable().optional(),diskMbytes:n5().nullable().optional(),tag:nU().nullable().optional(),debug:re().nullable().optional()})),sH=a5(()=>rd({ACTOR_COMPUTE_UNITS:n6().nullable().optional()})),sJ=a5(()=>rd({templateId:nU().optional(),generatedBy:nU().optional()})),sY=a5(()=>rd({actorSpecification:rS(1).optional(),name:nU().optional(),title:nU().optional(),description:nU().optional(),version:nU().regex(/^[0-9]+(\.[0-9]+)+$/).optional(),buildTag:nU().optional(),meta:sJ().optional(),environmentVariables:rv(nU(),nU()).optional(),dockerfile:nU().optional(),dockerContextDir:nU().optional(),readme:nU().nullable().optional(),input:rv(nU(),rn()).nullable().optional(),output:rv(nU(),rn()).nullable().optional(),changelog:nU().nullable().optional(),storages:rd({dataset:rv(nU(),rn()).optional(),datasets:rv(nU(),rv(nU(),rn())).optional(),keyValueStore:rv(nU(),rn()).optional()}).optional(),defaultMemoryMbytes:rh([nU(),n5()]).optional(),minMemoryMbytes:n5().min(128).optional(),maxMemoryMbytes:n5().min(128).optional(),usesStandbyMode:re().optional(),webServerSchema:rv(nU(),rn()).optional(),webServerMcpPath:nU().optional()})),sX=a5(()=>rd({id:nU(),actId:nU(),userId:nU(),startedAt:a6({offset:!0}).pipe(a8()),finishedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),status:sF(),meta:sZ(),stats:sG().nullable().optional(),options:sV().nullable().optional(),usage:sH().nullable().optional(),usageTotalUsd:n6().nullable().optional(),usageUsd:sH().nullable().optional(),inputSchema:nU().nullable().optional(),readme:nU().nullable().optional(),changelog:nU().nullable().optional(),exitCode:n5().nullable().optional(),gitCommitId:nU().optional(),gitBranchName:nU().optional(),createdByOrganizationMemberUserId:nU().optional(),buildNumber:nU().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),imageDigest:nU().nullable().optional(),actVersion:rd({sourceType:sp().optional(),buildTag:nU().nullable().optional(),versionNumber:nU().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),gitRepoUrl:nU().optional(),sourceFiles:ru(so()).optional(),gitHubGistUrl:nU().optional(),tarballUrl:nU().optional(),actorPath:nU().nullable().optional()}).optional(),actorDefinition:sY().nullable().optional()})),sQ=a5(()=>rd({origin:sq(),clientIp:nU().nullable().optional(),userAgent:nU().nullable().optional(),scheduleId:nU().nullable().optional(),scheduledAt:a6({offset:!0}).pipe(a8()).nullable().optional(),actorRunId:nU().optional(),webhookDispatchId:nU().optional(),scheduledAct2Id:nU().optional(),scheduledActorTaskId:nU().optional()})),s0=a5(()=>rd({deployment:rw(["SINGLE_TENANT","MULTI_TENANT_OWNER_PAID","MULTI_TENANT_FREE_USERS","MULTI_TENANT_PAYING_USERS"]).or(nU())})),s1=a5(()=>rd({id:nU(),actId:nU(),userId:nU().optional(),actorTaskId:nU().nullable().optional(),status:sF(),startedAt:a6({offset:!0}).pipe(a8()),finishedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),buildId:nU(),buildNumber:nU().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).optional(),buildNumberInt:n5().optional(),meta:sQ(),usageTotalUsd:n6(),defaultKeyValueStoreId:nU(),defaultDatasetId:nU(),defaultRequestQueueId:nU(),standby:s0().nullable().optional()})),s2=a5(()=>a7().extend({items:ru(s1())})),s4=a5(()=>rd({inputBodyLen:n5().min(0).nullable().optional(),migrationCount:n5().min(0).optional(),rebootCount:n5().min(0).optional(),restartCount:n5().min(0).optional(),resurrectCount:n5().min(0).optional(),memAvgBytes:n6().optional(),memMaxBytes:n5().min(0).optional(),memCurrentBytes:n5().min(0).optional(),cpuAvgUsage:n6().optional(),cpuMaxUsage:n6().optional(),cpuCurrentUsage:n6().optional(),netRxBytes:n5().min(0).optional(),netTxBytes:n5().min(0).optional(),durationMillis:n5().min(0).optional(),runTimeSecs:n6().min(0).optional(),metamorph:n5().min(0).optional(),computeUnits:n6().min(0).optional()})),s9=a5(()=>rd({eventTotalUsd:n6(),eventTitle:nU()})),s3=a5(()=>rd({platform:nU().nullable().optional(),appId:nU().nullable().optional(),isAiTool:re().optional()})),s6=a5(()=>rd({build:nU(),timeoutSecs:n5().min(0),memoryMbytes:n5().min(128).max(32768),diskMbytes:n5().min(0),restartOnError:re().nullable().optional(),maxItems:n5().min(0).nullable().optional(),maxTotalChargeUsd:n6().min(0).nullable().optional(),isMaxTotalChargeUsdSetByUser:re().optional()})),s8=a5(()=>rw(["ANYONE_WITH_ID_CAN_READ","ANYONE_WITH_NAME_CAN_READ","FOLLOW_USER_SETTING","RESTRICTED"]).or(nU())),s5=a5(()=>rd({ACTOR_COMPUTE_UNITS:n6().nullable().optional(),DATASET_READS:n5().nullable().optional(),DATASET_WRITES:n5().nullable().optional(),KEY_VALUE_STORE_READS:n5().nullable().optional(),KEY_VALUE_STORE_WRITES:n5().nullable().optional(),KEY_VALUE_STORE_LISTS:n5().nullable().optional(),REQUEST_QUEUE_READS:n5().nullable().optional(),REQUEST_QUEUE_WRITES:n5().nullable().optional(),DATA_TRANSFER_INTERNAL_GBYTES:n6().nullable().optional(),DATA_TRANSFER_EXTERNAL_GBYTES:n6().nullable().optional(),PROXY_RESIDENTIAL_TRANSFER_GBYTES:n6().nullable().optional(),PROXY_SERPS:n5().nullable().optional(),PROXY_UNBLOCKER_UNITS:n6().nullable().optional()})),s7=a5(()=>rd({ACTOR_COMPUTE_UNITS:n6().nullable().optional(),DATASET_READS:n6().nullable().optional(),DATASET_WRITES:n6().nullable().optional(),KEY_VALUE_STORE_READS:n6().nullable().optional(),KEY_VALUE_STORE_WRITES:n6().nullable().optional(),KEY_VALUE_STORE_LISTS:n6().nullable().optional(),REQUEST_QUEUE_READS:n6().nullable().optional(),REQUEST_QUEUE_WRITES:n6().nullable().optional(),DATA_TRANSFER_INTERNAL_GBYTES:n6().nullable().optional(),DATA_TRANSFER_EXTERNAL_GBYTES:n6().nullable().optional(),PROXY_RESIDENTIAL_TRANSFER_GBYTES:n6().nullable().optional(),PROXY_SERPS:n6().nullable().optional(),PROXY_UNBLOCKER_UNITS:n6().nullable().optional()})),le=a5(()=>rd({createdAt:a6({offset:!0}).pipe(a8()),actorId:nU(),buildId:nU(),inputKey:nU().nullable().optional(),buildTags:ru(nU()).optional()})),lt=a5(()=>rd({id:nU(),actId:nU(),userId:nU(),actorTaskId:nU().nullable().optional(),startedAt:a6({offset:!0}).pipe(a8()),finishedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),status:sF(),statusMessage:nU().nullable().optional(),isStatusMessageTerminal:re().nullable().optional(),meta:sQ(),pricingInfo:sT().optional(),stats:s4(),chargedEventCounts:rv(nU(),n5()).optional(),accountedChargedEventCounts:rv(nU(),n5()).nullable().optional(),eventUsage:rv(nU(),s9()).optional(),externalChargedTotalUsd:n6().optional(),standby:s0().nullable().optional(),integrationTracking:s3().optional(),createdByOrganizationMemberUserId:nU().optional(),consoleUrl:nq({normalize:!0}).optional(),output:rv(nU(),nq({normalize:!0})).optional(),options:s6(),buildId:nU(),exitCode:n5().nullable().optional(),generalAccess:s8().nullable().optional(),defaultKeyValueStoreId:nU(),defaultDatasetId:nU(),defaultRequestQueueId:nU(),storageIds:rd({datasets:rd({default:nU().optional()}).catchall(nU()).optional(),keyValueStores:rd({default:nU().optional()}).catchall(nU()).optional(),requestQueues:rd({default:nU().optional()}).catchall(nU()).optional()}).optional(),buildNumber:nU().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),containerUrl:nq({normalize:!0}).optional(),isContainerServerReady:re().nullable().optional(),gitBranchName:nU().nullable().optional(),usage:s5().nullable().optional(),usageTotalUsd:n6().nullable().optional(),usageUsd:s7().nullable().optional(),metamorphs:ru(le()).nullable().optional(),platformUsageBillingModel:nU().optional()})),li=a5(()=>rd({readCount:n5().optional(),writeCount:n5().optional(),storageBytes:n5().optional(),inflatedBytes:n5().optional()})),ln=a5(()=>rd({id:nU(),name:nU().nullable().optional(),title:nU().nullable().optional(),userId:nU(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),accessedAt:a6({offset:!0}).pipe(a8()),itemCount:n5().min(0),cleanItemCount:n5().min(0),actId:nU().nullable().optional(),actRunId:nU().nullable().optional(),fields:ru(nU()).nullable().optional(),schema:rv(nU(),rn()).nullable().optional(),consoleUrl:nq({normalize:!0}),itemsPublicUrl:nq({normalize:!0}).optional(),urlSigningSecretKey:nU().nullable().optional(),generalAccess:s8().nullable().optional(),stats:li().optional()})),lr=a5(()=>rd({min:n6().nullable().optional(),max:n6().nullable().optional(),nullCount:n5().nullable().optional(),emptyCount:n5().nullable().optional()})),lo=a5(()=>rd({fieldStatistics:rv(nU(),lr()).nullable().optional()})),la=a5(()=>rd({readCount:n5().optional(),writeCount:n5().optional(),deleteCount:n5().optional(),listCount:n5().optional(),s3StorageBytes:n5().optional(),storageBytes:n5().optional()})),ls=a5(()=>rd({id:nU(),name:nU().nullable().optional(),title:nU().nullable().optional(),userId:nU().nullable().optional(),username:nU().nullable().optional(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),accessedAt:a6({offset:!0}).pipe(a8()),actId:nU().nullable().optional(),actRunId:nU().nullable().optional(),consoleUrl:nq({normalize:!0}).optional(),keysPublicUrl:nq({normalize:!0}).optional(),recordsPublicUrl:nq({normalize:!0}).optional(),schema:rv(nU(),rn()).nullable().optional(),urlSigningSecretKey:nU().nullable().optional(),generalAccess:s8().nullable().optional(),stats:la().optional()})),ll=a5(()=>rd({key:nU(),size:n5(),recordPublicUrl:nq({normalize:!0})})),lu=a5(()=>rd({items:ru(ll()),count:n5(),limit:n5(),exclusiveStartKey:nU().nullable().optional(),isTruncated:re(),nextExclusiveStartKey:nU().nullable().optional()})),lc=a5(()=>nU()),lp=a5(()=>nU()),ld=a5(()=>a6({offset:!0}).pipe(a8())),lf=a5(()=>a6({offset:!0}).pipe(a8())),lh=a5(()=>a6({offset:!0}).pipe(a8())),lm=a5(()=>n5().min(0)),lg=a5(()=>n5().min(0)),ly=a5(()=>n5()),lb=a5(()=>re()),lv=a5(()=>rd({deleteCount:n5().optional(),headItemReadCount:n5().optional(),readCount:n5().optional(),storageBytes:n5().optional(),writeCount:n5().optional()})),l_=a5(()=>rd({id:lc(),name:nU().nullable().optional(),title:nU().nullable().optional(),userId:lp(),actId:nU().nullable().optional(),actRunId:nU().nullable().optional(),createdAt:ld(),modifiedAt:lf(),accessedAt:lh(),totalRequestCount:lm(),handledRequestCount:lg(),pendingRequestCount:ly(),hadMultipleClients:lb(),consoleUrl:nq({normalize:!0}),stats:lv().optional(),generalAccess:s8().nullable().optional()})),lw=a5(()=>nU()),lE=a5(()=>nU()),lS=a5(()=>rw(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]).or(nU())),lT=a5(()=>lS()),lR=a5(()=>n5()),lO=a5(()=>rv(nU(),rn())),lx=a5(()=>rd({uniqueKey:lw(),url:lE(),method:lT().optional(),retryCount:lR().optional(),loadedUrl:nU().nullable().optional(),payload:rh([nU(),rv(nU(),rn())]).nullable().optional(),headers:rv(nU(),rn()).nullable().optional(),userData:lO().optional(),noRetry:re().nullable().optional(),errorMessages:ru(nU()).nullable().optional(),handledAt:a6({offset:!0}).pipe(a8()).nullable().optional()})),lA=a5(()=>nU()),lk=a5(()=>a6({offset:!0}).pipe(a8())),lC=a5(()=>lx().extend({id:lA().optional(),lockExpiresAt:lk().optional(),lockByClient:nU().optional()}).required({id:!0})),lP=a5(()=>rd({items:ru(lC()),limit:n5(),exclusiveStartId:nU().optional(),cursor:nU().optional(),nextCursor:nU().optional()})),lI=a5(()=>re()),lU=a5(()=>re()),lz=a5(()=>rd({requestId:lA(),wasAlreadyPresent:lI(),wasAlreadyHandled:lU()})),lL=a5(()=>rd({requestId:lA(),uniqueKey:lw(),wasAlreadyPresent:lI(),wasAlreadyHandled:lU()})),lN=a5(()=>rd({id:lA().optional(),uniqueKey:lw(),url:lE(),method:lT().optional()})),l$=a5(()=>rd({processedRequests:ru(lL()),unprocessedRequests:ru(lN())})),lD=a5(()=>rd({uniqueKey:lw().optional(),id:lA()})),lM=a5(()=>rd({uniqueKey:lw(),id:lA().optional()})),lj=a5(()=>rh([lD(),lM()])),lB=a5(()=>rd({processedRequests:ru(lj()),unprocessedRequests:ru(lN())})),lF=a5(()=>rd({unlockedCount:n5()})),lq=a5(()=>rd({lockExpiresAt:lk()})),lZ=a5(()=>n5()),lW=a5(()=>rd({id:lA(),uniqueKey:lw(),url:lE(),method:lT().optional(),retryCount:lR().optional()})),lK=a5(()=>rd({limit:lZ(),queueModifiedAt:lf(),hadMultipleClients:lb(),items:ru(lW())})),lG=a5(()=>rd({id:lA(),uniqueKey:lw(),url:lE(),method:lT().optional(),retryCount:lR().optional(),lockExpiresAt:lk()})),lV=a5(()=>rd({limit:lZ(),queueModifiedAt:lf(),queueHasLockedRequests:re().optional(),clientKey:nU().optional(),hadMultipleClients:lb(),lockSecs:n5(),items:ru(lG())})),lH=a5(()=>rd({totalRuns:n5().optional(),lastRunStartedAt:a6({offset:!0}).pipe(a8()).nullable().optional()})),lJ=a5(()=>rd({id:nU(),userId:nU(),actId:nU(),actName:nU().nullable().optional(),name:nU(),title:nU().nullable().optional(),username:nU().nullable().optional(),actUsername:nU().nullable().optional(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),stats:lH().nullable().optional(),isPublic:re().optional()})),lY=a5(()=>a7().extend({items:ru(lJ())})),lX=a5(()=>rd({build:nU().nullable().optional(),timeoutSecs:n5().nullable().optional(),memoryMbytes:n5().nullable().optional(),maxItems:n5().nullable().optional(),maxTotalChargeUsd:n6().nullable().optional(),restartOnError:re().nullable().optional(),isMaxTotalChargeUsdSetByUser:re().nullable().optional(),forcePermissionLevel:sn().nullable().optional()})),lQ=a5(()=>rv(nU(),rn())),l0=a5(()=>rd({publishedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),seoTitle:nU().max(60).nullable().optional(),seoDescription:nU().max(160).nullable().optional(),inputSchemaFields:ru(nU()).nullable().optional(),datasetName:nU().nullable().optional(),datasetView:nU().nullable().optional(),categorization:nU().nullable().optional(),highlightedFields:ru(nU()).nullable().optional(),faq:ru(rd({question:nU(),answer:nU()})).nullable().optional()})),l1=a5(()=>rd({id:nU(),userId:nU(),actId:nU(),name:nU(),nameLowerCase:nU().optional(),username:nU().nullable().optional(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),removedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),stats:lH().nullable().optional(),options:lX().nullable().optional(),input:rh([lQ(),ru(lQ())]).nullable().optional(),title:nU().nullable().optional(),description:nU().nullable().optional(),actorStandby:su().nullable().optional(),standbyUrl:nq({normalize:!0}).nullable().optional(),isPublic:re().optional(),publicConfig:l0().nullable().optional()})),l2=a5(()=>rd({readCount:n5().optional(),writeCount:n5().optional(),deleteCount:n5().optional(),listCount:n5().optional(),s3StorageBytes:n5().optional()})),l4=a5(()=>rd({id:nU(),name:nU().nullable().optional(),title:nU().nullable().optional(),userId:nU().nullable().optional(),username:nU().nullable().optional(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),accessedAt:a6({offset:!0}).pipe(a8()),actId:nU().nullable().optional(),actRunId:nU().nullable().optional(),schema:rh([rv(nU(),rn()),nU()]).nullable().optional(),generalAccess:s8().nullable().optional(),stats:l2().optional()})),l9=a5(()=>a7().extend({unnamed:re().optional(),items:ru(l4())})),l3=a5(()=>rd({id:nU(),name:nU().nullable().optional(),userId:nU(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),accessedAt:a6({offset:!0}).pipe(a8()),itemCount:n5(),cleanItemCount:n5(),actId:nU().nullable().optional(),actRunId:nU().nullable().optional(),title:nU().nullable().optional(),username:nU().optional(),generalAccess:s8().nullable().optional(),stats:li().optional()})),l6=a5(()=>a7().extend({unnamed:re().optional(),items:ru(l3())})),l8=a5(()=>rd({deleteCount:n5().optional(),headItemReadCount:n5().optional(),readCount:n5().optional(),writeCount:n5().optional(),s3StorageBytes:n5().optional(),dynamodbStorageBytes:n5().optional()})),l5=a5(()=>rd({id:lc(),name:nU().nullable().optional(),title:nU().nullable().optional(),userId:lp(),username:nU().optional(),createdAt:ld(),modifiedAt:lf(),accessedAt:lh(),expireAt:a6({offset:!0}).pipe(a8()).optional(),totalRequestCount:lm(),handledRequestCount:lg(),pendingRequestCount:ly(),actId:nU().nullable().optional(),actRunId:nU().nullable().optional(),hadMultipleClients:lb(),generalAccess:s8().nullable().optional(),stats:l8().optional()})),l7=a5(()=>a7().extend({unnamed:re().optional(),items:ru(l5())})),ue=a5(()=>rd({id:nU(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),userId:nU(),isAdHoc:re().nullable().optional(),isApifyIntegration:re().optional(),isEnabled:re().optional(),actionType:nU().optional(),shouldInterpolateStrings:re().nullable().optional(),eventTypes:ru(sP()),condition:sI(),ignoreSslErrors:re(),doNotRetry:re(),requestUrl:nq({normalize:!0}).nullable().optional(),headersTemplate:nU().nullable().optional(),title:nU().nullable().optional(),description:nU().nullable().optional(),slackMessage:sU().optional(),googleMail:sL().optional(),googleDrive:sN().optional(),githubIssue:s$().optional(),lastDispatch:sM().nullable().optional(),stats:sj().nullable().optional()})),ut=a5(()=>a7().extend({items:ru(ue())})),ui=a5(()=>rd({_id:nU().optional(),actionType:nU().optional(),condition:sI().optional(),requestUrl:nq({normalize:!0}).nullable().optional(),isAdHoc:re().optional(),isApifyIntegration:re().nullable().optional(),slackMessage:sU().optional(),googleMail:sL().optional(),googleDrive:sN().optional(),githubIssue:s$().optional()})),un=a5(()=>rd({id:nU(),userId:nU(),webhookId:nU(),createdAt:a6({offset:!0}).pipe(a8()),status:sD(),eventType:sP(),eventData:rd({actorId:nU(),actorRunId:nU().optional(),actorBuildId:nU().optional(),actorTaskId:nU().nullable().optional()}).nullable().optional(),webhook:ui().nullable().optional(),calls:ru(rd({startedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),finishedAt:a6({offset:!0}).pipe(a8()).nullable().optional(),errorMessage:nU().nullable().optional(),responseStatus:n5().nullable().optional(),responseBody:nU().nullable().optional(),debugPostMessage:rv(nU(),rn()).optional()})).optional()})),ur=a5(()=>a7().extend({items:ru(un())})),uo=a5(()=>rd({id:nU(),userId:nU(),name:nU(),cronExpression:nU(),timezone:nU(),isEnabled:re(),isExclusive:re(),createdAt:a6({offset:!0}).pipe(a8()),modifiedAt:a6({offset:!0}).pipe(a8()),nextRunAt:a6({offset:!0}).pipe(a8()).nullable().optional(),lastRunAt:a6({offset:!0}).pipe(a8()).nullable().optional()})),ua=a5(()=>rd({email:re().optional()})),us=a5(()=>rd({id:nU(),type:rS("RUN_ACTOR"),actorId:nU()})),ul=a5(()=>rd({id:nU(),type:rS("RUN_ACTOR_TASK"),actorTaskId:nU()})),uu=a5(()=>rg("type",[us(),ul()])),uc=a5(()=>uo().extend({title:nU().nullable().optional(),notifications:ua().optional(),integrationTracking:s3().optional(),actions:ru(uu())})),up=a5(()=>a7().extend({items:ru(uc())})),ud=a5(()=>rd({body:nU().nullable().optional(),contentType:nU().nullable().optional()})),uf=a5(()=>rd({version:n5().optional(),data:rd({cronExpression:nU().optional(),timezone:nU().optional()}).optional()}).nullable()),uh=a5(()=>rd({id:nU(),type:rS("RUN_ACTOR"),actorId:nU(),runInput:ud().nullable().optional(),runOptions:lX().nullable().optional()})),um=a5(()=>rd({id:nU(),type:rS("RUN_ACTOR_TASK"),actorTaskId:nU(),input:rv(nU(),rn()).nullable().optional()})),ug=a5(()=>rg("type",[uh(),um()])),uy=a5(()=>uo().extend({description:nU().nullable().optional(),title:nU().nullable().optional(),notifications:ua().optional(),uiState:uf().optional(),integrationTracking:s3().optional(),actions:ru(ug())})),ub=a5(()=>rd({message:nU(),level:nU(),createdAt:a6({offset:!0}).pipe(a8())})),uv=a5(()=>rd({pricingModel:nU(),apifyMarginPercentage:n6().optional(),createdAt:a6({offset:!0}).pipe(a8()).optional(),startedAt:a6({offset:!0}).pipe(a8()).optional(),notifiedAboutChangeAt:a6({offset:!0}).pipe(a8()).nullable().optional(),notifiedAboutFutureChangeAt:a6({offset:!0}).pipe(a8()).nullable().optional(),isPriceChangeNotificationSuppressed:re().optional(),forceContainsSignificantPriceChange:re().optional(),isPPEPlatformUsagePaidByUser:re().optional(),reasonForChange:nU().nullable().optional(),minimalMaxTotalChargeUsd:n6().nullable().optional(),pricingPerEvent:rv(nU(),rn()).nullable().optional(),pricePerUnitUsd:n6().optional(),trialMinutes:n5().nullable().optional(),unitName:nU().optional(),tieredPricing:rv(nU(),rd({tieredPricePerUnitUsd:n6().optional()})).optional(),notifiedAboutRentalToPpePriceChangeAt:a6({offset:!0}).pipe(a8()).nullable().optional()})),u_=a5(()=>rd({id:nU(),title:nU(),name:nU(),username:nU(),userFullName:nU().nullable().optional(),description:nU().nullable().optional(),categories:ru(nU()).nullable().optional(),notice:sx().optional(),pictureUrl:nU().nullable().optional(),userPictureUrl:nq({normalize:!0}).nullable().optional(),url:nq({normalize:!0}).nullable().optional(),stats:rd({totalUsers:n5(),totalRuns:n5().optional(),totalUsers7Days:n5().optional(),totalUsers30Days:n5().optional(),totalUsers90Days:n5().optional(),actorReviewRating:n6(),actorReviewCount:n5()}),currentPricingInfo:uv().optional(),isWhiteListedForAgenticPayments:re().nullable().optional(),isVerified:re().optional(),badge:nU().nullable().optional(),readmeSummary:nU().optional(),inputSchema:rd({type:nU(),properties:rv(nU(),rd({type:rh([nU(),ru(nU())]).optional()})),required:ru(nU()).optional()}).optional()})),uw=a5(()=>a7().extend({items:ru(u_())})),uE=a5(()=>rd({bio:nU().nullable().optional(),readme:nU().nullable().optional(),name:nU().optional(),pictureUrl:nq({normalize:!0}).nullable().optional(),githubUsername:nU().nullable().optional(),websiteUrl:nq({normalize:!0}).nullable().optional(),twitterUsername:nU().nullable().optional()})),uS=a5(()=>rd({id:nU().optional(),name:nU(),description:nU().nullable(),availableCount:n5().optional()})),uT=a5(()=>rd({password:nU().nullable().optional(),groups:ru(uS())})),uR=a5(()=>rv(nU(),n5())),uO=a5(()=>rd({id:nU().optional(),description:nU().optional(),isEnabled:re().optional(),monthlyBasePriceUsd:n6().optional(),monthlyUsageCreditsUsd:n6().optional(),usageDiscountPercent:n6().optional(),enabledPlatformFeatures:ru(nU()).optional(),maxMonthlyUsageUsd:n6().optional(),maxActorMemoryGbytes:n6().optional(),maxMonthlyActorComputeUnits:n6().optional(),maxMonthlyResidentialProxyGbytes:n6().optional(),maxMonthlyProxySerps:n5().optional(),maxMonthlyExternalDataTransferGbytes:n6().optional(),maxActorCount:n5().optional(),maxActorTaskCount:n5().optional(),dataRetentionDays:n5().optional(),availableProxyGroups:uR(),teamAccountSeatCount:n5().optional(),supportLevel:nU().optional(),availableAddOns:ru(nU()).optional(),tier:nU().optional(),apiRateLimitBoosts:n5().optional(),maxScheduleCount:n5().optional(),maxConcurrentActorRuns:n5().optional(),planPricing:rv(nU(),rn()).optional(),planVersion:n6().optional(),legacyPlanId:nU().optional(),planTags:ru(nU()).optional(),overageThresholdUsd:n6().optional(),maxMonthlyUnblockerUnits:n5().optional(),maxPublicActorTaskCount:n5().optional(),maxPublicActorTaskCountPerActor:n5().optional(),forceBillingInterval:nU().optional(),personalizedSupport:nU().nullable().optional(),monitoringLevel:rw(["STANDARD"]).or(nU()).nullable().optional(),isPayingCustomer:re().optional()})),ux=a5(()=>rd({isEnabled:re(),disabledReason:nU().nullable(),disabledReasonType:nU().nullable(),isTrial:re(),trialExpirationAt:a6({offset:!0}).pipe(a8()).nullable()})),uA=a5(()=>rd({ACTORS:ux(),STORAGE:ux(),SCHEDULER:ux(),PROXY:ux(),PROXY_EXTERNAL_ACCESS:ux(),PROXY_RESIDENTIAL:ux(),PROXY_SERPS:ux(),WEBHOOKS:ux(),ACTORS_PUBLIC_ALL:ux(),ACTORS_PUBLIC_DEVELOPER:ux()})),uk=a5(()=>rd({id:nU().optional(),username:nU(),profile:uE().optional(),email:nU().nullable().optional(),proxy:uT().optional(),plan:uO().optional(),effectivePlatformFeatures:uA().optional(),createdAt:a6({offset:!0}).pipe(a8()).optional(),isPaying:re().optional(),organizationOwnerUserId:nU().nullable().optional()})),uC=a5(()=>rd({startAt:a6({offset:!0}).pipe(a8()),endAt:a6({offset:!0}).pipe(a8())})),uP=a5(()=>rd({quantityAbove:n6(),discountPercent:n6(),tierQuantity:n6(),unitPriceUsd:n6(),priceUsd:n6()})),uI=a5(()=>rd({quantity:n6(),baseAmountUsd:n6(),baseUnitPriceUsd:n6().optional(),amountAfterVolumeDiscountUsd:n6().optional(),priceTiers:ru(uP()).optional()})),uU=a5(()=>rv(nU(),uI())),uz=a5(()=>rv(nU(),uI())),uL=a5(()=>rd({date:a6({offset:!0}).pipe(a8()),serviceUsage:uz(),totalUsageCreditsUsd:n6()})),uN=a5(()=>rd({usageCycle:uC(),monthlyServiceUsage:uU(),dailyServiceUsages:ru(uL()),totalUsageCreditsUsdBeforeVolumeDiscount:n6(),totalUsageCreditsUsdAfterVolumeDiscount:n6()})),u$=a5(()=>rd({maxMonthlyUsageUsd:n6(),maxMonthlyActorComputeUnits:n6(),maxMonthlyExternalDataTransferGbytes:n6(),maxMonthlyProxySerps:n5(),maxMonthlyResidentialProxyGbytes:n6(),maxActorMemoryGbytes:n6(),maxActorCount:n5(),maxActorTaskCount:n5(),maxConcurrentActorJobs:n5(),maxTeamAccountSeatCount:n5(),dataRetentionDays:n5(),maxScheduleCount:n5().optional(),maxMonthlyUnblockerUnits:n6().optional()})),uD=a5(()=>rd({monthlyUsageUsd:n6(),monthlyActorComputeUnits:n6(),monthlyExternalDataTransferGbytes:n6(),monthlyProxySerps:n5(),monthlyResidentialProxyGbytes:n6(),actorMemoryGbytes:n6(),actorCount:n5(),actorTaskCount:n5(),activeActorJobCount:n5(),teamAccountSeatCount:n5(),scheduleCount:n5().optional(),monthlyUnblockerUnits:n6().optional()})),uM=a5(()=>rd({monthlyUsageCycle:uC(),limits:u$(),current:uD()})),uj=a5(()=>{let e=sX();return e.extend({actVersion:e.shape.actVersion.unwrap().extend({buildTag:nU().nullable().optional()}).optional()})}),uB=a5(()=>uy().extend({uiState:uf().nullable().optional()})),uF=new Set(["actor-memory-limit-exceeded","concurrent-runs-limit-exceeded"]);async function uq(e,t,i,n){if(!t)return e();let r=!0===t?1/0:Date.now()+1e3*t;for(;;)try{return await e()}catch(o){if(!(o instanceof oz)||!uF.has(o.type??""))throw o;let e=r-Date.now();if(e<=0)throw o;let t=Math.min(1e4,e);i.info(`Not enough resources to start the run, retrying in ${Number((t/1e3).toPrecision(3))}s: ${o.message}`),await ab(t,n),n?.throwIfAborted()}}let uZ=rp({raw:re().optional(),...a$}),uW=uZ.extend({buffer:re().optional()});let uK=class LogClient extends a3{constructor(e){super({resourcePath:"logs",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:i,buffer:n,...r}=oH(e,uW,"LogGetOptions"),o={url:this.buildUrl(),method:"GET",params:this.buildParams(r),timeoutSecs:t,signal:i};n&&(o.responseType="buffer");try{return(await this.httpClient.call(o)).data}catch(e){at(e,this.id)}}async stream(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:i,raw:n}=oH(e,uZ,"LogOptions"),r={url:this.buildUrl(),method:"GET",params:this.buildParams({stream:!0,raw:n}),responseType:"stream",timeoutSecs:t,signal:i};try{return(await this.httpClient.call(r)).data}catch(e){at(e,this.id)}}};let uG=class LoggerActorRedirect extends oy{constructor(e={}){super({skipTime:!0,level:op.DEBUG,...e})}_log(e,t,i,n){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(e>this.options.level)return;if(i||n)throw Error("Redirect logger does not use other arguments than level and message");let{prefix:o}=r;o=o?`${o}`:"";let a="";this.options.skipTime||(a=`${new Date().toISOString().replace("Z","").replace("T"," ")} `);let s=`${ow().gray(a)}${ow().cyan(o)}${t||""}`;return this._outputWithConsole(op.INFO,s),s}};let uV=class StreamedLog{#b;#v=[];#_=new TextDecoder;#w=/(?:\n|^)(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)/g;#E;#S;#T;#R=null;#O=!1;#x=new AbortController;#A=new AbortController;constructor(e){let{toLog:t,logClient:i,fromStart:n=!0,signal:r}=e;this.#b=t,this.#S=i,this.#T=r,this.#E=n?null:new Date}start(){if(this.#R)throw Error("Streaming task already active");this.#O=!1,this.#x=new AbortController,this.#A=new AbortController,this.#R=this.#k()}async stop(){if(!this.#R)throw Error("Streaming task is not active");this.#O=!0,this.#A.abort();let e=this.#x,t=setTimeout(()=>e.abort(),1e3);try{await this.#R}catch(e){if(!(e instanceof Error&&"AbortError"===e.name))throw e}finally{clearTimeout(t),this.#R=null}}async #k(){let e=this.#T?AbortSignal.any([this.#T,this.#x.signal]):this.#x.signal;try{let t,i=500;for(;!t;){let n;if(this.#O){let i=await this.#S.get({raw:!0,signal:this.#T});t=await this.#C([new TextEncoder().encode(i??"")],e);break}try{n=await this.#S.stream({raw:!0,signal:e})}catch(e){if(this.#O&&!this.#T?.aborted)continue;throw e}if(!n)return;if(this.#O){await n.cancel().catch(()=>{});continue}(t=await this.#C(n,e))||(await ab(i,AbortSignal.any([e,this.#A.signal])),i=Math.min(2*i,5e3))}let n=this.#_.decode(t).trim();n.length&&this.#b.info(n)}catch(t){if(e.aborted)return;ok.warning("Log redirection stopped due to error",t)}}async #C(e,t){let i;try{for await(let t of e){i??=new Uint8Array;let e=new Uint8Array(i.length+t.length);e.set(i,0),e.set(t,i.length);let n=e.lastIndexOf(10);if(i=e.slice(n),this.#v.push(e.slice(0,n)),this.#P(),this.#O)break}}catch(e){if(!t.aborted)throw e}return i}#P(){let e=this.#_.decode(function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),i=0;for(let n of e)t.set(n,i),i+=n.length;return t}(this.#v)).split(this.#w).slice(1),t=e.filter((e,t)=>t%2==0),i=e.filter((e,t)=>t%2!=0);this.#v=[],t.forEach((e,t)=>{let n=i[t];this.#E&&new Date(e)<this.#E||this.#b.info((e+n).trim())})}};let uH=rp({waitForFinish:n6().optional(),...a$}),uJ=rp({waitSecs:n6().optional(),...a$});let uY=class BuildClient extends a3{constructor(e){super({resourcePath:"actor-builds",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:i,...n}=oH(e,uH,"BuildClientGetOptions");return this.getResource(uj(),n,this.timeoutForWaitForFinish(t,"short",n.waitForFinish),i)}async abort(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return o7(await this.httpClient.call({url:this.buildUrl("abort"),method:"POST",params:this.buildParams(),timeoutSecs:t,signal:i}),uj())}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return this.deleteResource(t,i)}async getOpenApiDefinition(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:i}=oH(e,aD,"TimeoutOptions");return(await this.httpClient.call({url:this.buildUrl("openapi.json"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:i})).data}async waitForFinish(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=oH(e,uJ,"BuildClientWaitForFinishOptions");return this.waitForJobFinish(uj(),t)}log(){return new uK(this.subResourceOptions({resourcePath:"log"}))}};let uX=class ResourceCollectionClient extends a9{async listResources(e,t,i,n){return o7(await this.httpClient.call({url:this.buildUrl(),method:"GET",params:this.buildParams(t),timeoutSecs:i,signal:n}),e)}listUnpaginatedResources(e,t,i){let n=this.listResources(e,void 0,t,i);return Object.defineProperty(n,Symbol.asyncIterator,{async *value(){yield*(await n).items}})}listResourcesPaginated(e,t,i){let{timeoutSecs:n=i,signal:r,...o}=t;return this.listPaginatedFromCallback(async t=>this.listResources(e,t,n,r),o)}async createResource(e,t,i,n){return o7(await this.httpClient.call({url:this.buildUrl(),method:"POST",params:this.buildParams(),data:t,timeoutSecs:i,signal:n}),e)}async getOrCreateResource(e,t,i,n,r){return o7(await this.httpClient.call({url:this.buildUrl(),method:"POST",params:this.buildParams({name:t}),data:i,timeoutSecs:n,signal:r}),e)}};let uQ=rp({...af,desc:re().optional(),...a$});let u0=class BuildCollectionClient extends uX{constructor(e){super({...e,resourcePath:e.resourcePath||"actor-builds"})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=oH(e,uQ,"BuildCollectionClientListOptions");return this.listResourcesPaginated(sK(),t,"medium")}};let u1=[429,503],u2=/^(\d+)\.(\d+)\.(\d+)$/;function u4(e){let t=u2.exec(e??"");if(t)return[Number(t[1]),Number(t[2]),Number(t[3])]}let u9=rp({method:rw(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]).optional(),params:rv(nU(),rn()).optional(),headers:rv(nU(),nU()).optional(),data:rn().optional(),parentRequestId:nU().optional(),compression:aC.optional(),responseType:rw(["parsed","buffer","stream"]).optional(),...a$});let u3=class ActorServerClient extends a3{#I;constructor(e){super({resourcePath:"actors",...e})}async getUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions"),n=this.#I??=this.#U(t,i).then(e=>e.standbyUrl);try{return await n}catch(e){throw this.#I===n&&(this.#I=void 0),e}}async getOpenApiSpec(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions"),n=await this.#U(t,i),r=n.actorStandby?.build||"latest",o=n.taggedBuilds?.[r]?.buildId??void 0,a=u4(r);if(void 0===o&&void 0!==a)for await(let e of new u0(this.subResourceOptions({resourcePath:"builds"})).list({desc:!0,timeoutSecs:t,signal:i})){if(e.buildNumber===r){o=e.id;break}if(function(e,t){let i=u4(e);return void 0!==i&&i[0]===t[0]&&i[1]===t[1]&&i[2]<t[2]}(e.buildNumber,a))break}let s=void 0===o?void 0:await new uY({baseUrl:this.apifyClient.baseUrl,publicBaseUrl:this.apifyClient.publicBaseUrl,httpClient:this.httpClient,apifyClient:this.apifyClient,id:o}).get({timeoutSecs:t,signal:i});if(void 0===s)throw new oP(`Build ${r} of Actor ${this.id} does not exist.`);return s.actorDefinition?.webServerSchema}async request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oH(e,nU());let{method:i="GET",params:n,headers:r,data:o,parentRequestId:a,compression:s,responseType:l,timeoutSecs:u="long",signal:c}=oH(t,u9,"ActorServerRequestOptions"),p=await this.getUrl({signal:c}),d=e.split("#")[0].replace(/^\/+/,"");return this.httpClient.call({url:`${p.replace(/\/+$/,"")}/${d}`,method:i,params:n,headers:void 0===a?r:aG(r??{},{"X-Actor-Request-ID":a}),data:o,compression:void 0!==s&&aP(s),authorizationHeader:"X-Apify-Authorization",throwOnErrorStatus:!1,retryStatusCodes:u1,retryTransportErrors:!1,followRedirects:!1,responseType:l,timeoutSecs:u,signal:c})}async #U(e,t){let i=o7(await this.httpClient.call({url:this.buildUrl(),method:"GET",params:this.buildParams(),timeoutSecs:e,signal:t}),sA());if(!i.standbyUrl)throw new oP(`Actor ${this.id} is not a Server Actor.`);return this.#I=Promise.resolve(i.standbyUrl),i}};let u6=class ActorEnvVarClient extends a3{constructor(e){super({resourcePath:"env-vars",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return this.getResource(sd(),{},t,i)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oH(e,o6);let{timeoutSecs:i="short",signal:n}=oH(t,aD,"TimeoutOptions");return this.updateResource(sd(),e,i,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return this.deleteResource(t,i)}};let u8=o6.optional();let u5=class ActorEnvVarCollectionClient extends uX{constructor(e){super({resourcePath:"env-vars",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return this.listUnpaginatedResources(sC(),t,i)}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oH(e,u8);let{timeoutSecs:i="short",signal:n}=oH(t,aD,"TimeoutOptions");return this.createResource(sd(),e,i,n)}};var u7=((r7={}).Active="ACTIVE",r7.Succeeded="SUCCEEDED",r7.Failed="FAILED",r7),ce=((oe={}).SourceFiles="SOURCE_FILES",oe.GitRepo="GIT_REPO",oe.Tarball="TARBALL",oe.GitHubGist="GITHUB_GIST",oe.SourceCode="SOURCE_CODE",oe),ct=((ot={}).RunActor="RUN_ACTOR",ot.RunActorTask="RUN_ACTOR_TASK",ot),ci=((oi={}).Actors="ACTORS",oi.Storage="STORAGE",oi.ProxySERPS="PROXY_SERPS",oi.Scheduler="SCHEDULER",oi.Webhooks="WEBHOOKS",oi.Proxy="PROXY",oi.ProxyExternalAccess="PROXY_EXTERNAL_ACCESS",oi);let cn=nU().min(1);let cr=class ActorVersionClient extends a3{constructor(e){super({resourcePath:"versions",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return this.getResource(sf(),{},t,i)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oH(e,o6);let{timeoutSecs:i="long",signal:n}=oH(t,aD,"TimeoutOptions");return this.updateResource(sf(),e,i,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return this.deleteResource(t,i)}envVar(e){return oH(e,cn),new u6(this.subResourceOptions({id:e}))}envVars(){return new u5(this.subResourceOptions())}};let co=o6.optional();let ca=class ActorVersionCollectionClient extends uX{constructor(e){super({resourcePath:"versions",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:i}=oH(e,aD,"TimeoutOptions");return this.listUnpaginatedResources(sk(),t,i)}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oH(e,co);let{timeoutSecs:i="long",signal:n}=oH(t,aD,"TimeoutOptions");return this.createResource(sf(),e,i,n)}};let cs="toBSON",cl="toString",cu="_bsontype";RegExp(`(.|^$|^${cs}$|^${cu}|^${cl}$)`),RegExp(".","g"),RegExp("^$"),RegExp(`^${cs}$`),RegExp(`^${cl}$`),RegExp(`^${cu}$`),RegExp("^(anonymous|page-not-found|docs|terms-of-use|about|pricing|privacy-policy|customers|request-form|request-solution|release-notes|jobs|api-reference|video-tutorials|acts|key-value-stores|schedules|account|sign-up|sign-in-discourse|admin|documentation|change-password|enroll-account|forgot-password|reset-password|sign-in|verify-email|live-status|browser-info|webhooks|health-check|api|change-log|dashboard|community|crawlers|ext|schemas|admin|administration|crawler|act|library|lib|apifier|team|contact|doc|documentation|for-business|for-developers|developers|business|integrations|job|setting|settings|privacy|policy|assets|help|config|configuration|terms|hiring|hire|status|status-page|solutions|support|market|marketplace|download|downloads|username|users|user|login|logout|signin|sign|signup|sign-out|signout|plugins|plug-ins|reset|password|passwords|square|profile-photos|profiles|true|false|js|css|img|images|image|partials|fonts|font|dynamic_templates|app|schedules|community|storage|storages|account|node_modules|bower_components|video|knowledgebase|forum|customers|blog|health-check|health|anim|forum_topics.json|forum_categories.json|me|you|him|she|it|external|actor|crawler|scheduler|api|sdk|puppeteer|webdriver|selenium|(selenium.*webdriver)|undefined|page-analyzer|wp-login.php|welcome.action|echo|proxy|super-proxy|gdpr|case-studies|use-cases|how-to|kb|cookies|cookie-policy|cookies-policy|powered-by|run|runs|actor|actors|act|acts|success-stories|roadmap|join-marketplace|presskit|press-kit|covid-19|covid|covid19|matfyz|ideas|public-actors|resources|partners|affiliate|industries|web-scraping|custom-solutions|solution-provider|alternatives|platform|freelancers|freelancer|partner|preview|templates|data-for-generative-ai|discord|praguecrawl|prague-crawl|bob|ai-agents|reel|video-reel|mcp|mcpc|model-context-protocol|modelcontextprotocol|apify.com|design-kit|press-kit|scrapers|professional-services|challenge|challange|1m-challenge|1m-usd-challenge|contact-sales|creator|creators|creator-plan|request-an-integration|whitepaper|adviser|crawlee|ultimate-scraper|agent-skills|key-value-store|request-queue|request-queues|build|builds|dataset|datasets|schedule|standby|pay-per-event|pay-per-result|pay-per-usage|ppe|ppr|compute-unit|compute-units|agent|agents|agentic|llms|llm|openai|anthropic|claude|copilot|mistral|gemini|llama|chatbot|chatgpt|prompt|prompts|embeddings|vectors|rag|agentic-commerce|agentic-economy|agentic-payments|a2a|a2b|a2p|ap2|b2a|acp|ucp|mpp|x402|l402|anp|agp|erc-8004|kya|kyapay|official|verified|certified|authorized|partner-official|gold-partner|premium-partner|staff|moderator|apify-admin|console|cli|studio|gateway|workbench|agents-marketplace|agents-store|mcp-server|mcp-servers|mcp-gateway|asia|latam|emea|apac|i18n|l10n|localization|localisation|usd|eur|gbp|jpy|cny|usdc|usdt|btc|eth|sol|crypto|fiat|stablecoin|stablecoins|payment|payments|payout|payouts|invoice|invoices|wallet|soc|soc2|iso|iso-27001|hipaa|ccpa|pci|pci-dss|dpa|dpia|dmca|sla|eula|aml|kyc|contributor|contributors|maintainer|maintainers|core-team|oss|open-source|opensource|open-source-software|spam|scam|phishing|malware|hack|hacked|giveaway|airdrop|bitcoin-giveaway|free-credits|free-money|launch|launches|webinar|webinars|meetup|meetups|summit|conference|conferences|org|orgs|organisation|workspace|workspaces|tenant|tenants|role|roles|permission|permissions|saml|scim|token|tokens|apikey|api-key|api-keys|keys|secret|secrets|coupon|coupons|discount|discounts|promos|refund|refunds|credit|credits|billing-portal|production|prod|canary|internal|restricted|conversations|reactions|mentions|channel|channels|inbox|no-reply|noreply|accessibility|imprint|impressum|trust|trust-center|security-center|brand|branding|support-team|abuse|outage|incident|incidents|what-is-new|whatsnew|index|index\\.html|(favicon\\.[a-z]+)|BingSiteAuth.xml|(google.+\\.html)|robots\\.txt|(sitemap\\.[a-z]+)|(apple-touch-icon.*)|security-whitepaper\\.pdf|security\\.txt|llms\\.txt|llms-full\\.txt|(.*\\.md)|(\\..*)|(xxx-.*)|((.+[^a-z]|)porn([^a-z].+|))|((.+[^a-z]|)vagina([^a-z].+|))|((.+[^a-z]|)dildo([^a-z].+|))|((.+[^a-z]|)nsfw([^a-z].+|))|((.+[^a-z]|)hentai([^a-z].+|))|((.+[^a-z]|)cunt([^a-z].+|))|((.+[^a-z]|)fuck([^a-z].+|))|((.+[^a-z]|)shit([^a-z].+|))|((.+[^a-z]|)bitch([^a-z].+|))|((.+[^a-z]|)slut([^a-z].+|))|((.+[^a-z]|)whore([^a-z].+|))|((.+[^a-z]|)boob([^a-z].+|))|((.+[^a-z]|)tits([^a-z].+|))|((.+[^a-z]|)cock([^a-z].+|))|((.+[^a-z]|)anus([^a-z].+|))|((.+[^a-z]|)pussy([^a-z].+|))|((.+[^a-z]|)nude([^a-z].+|))|((.+[^a-z]|)penis([^a-z].+|))|((.+[^a-z]|)naked([^a-z].+|))|(install-cli\\..*)|([^0-9a-z].*)|(.*[^0-9a-z])|(.*[_.\\-]{2}.*)|0|about|access|account|accounts|activate|activities|activity|ad|add|address|adm|admin|administration|administrator|ads|adult|advertising|affiliate|affiliates|ajax|all|alpha|analysis|analytics|android|anon|anonymous|api|app|apps|archive|archives|article|asct|asset|atom|auth|authentication|avatar|backup|balancer-manager|banner|banners|beta|billing|bin|blog|blogs|board|book|bookmark|bot|bots|bug|business|cache|cadastro|calendar|call|campaign|cancel|captcha|career|careers|cart|categories|category|cgi|cgi-bin|changelog|chat|check|checking|checkout|client|cliente|clients|code|codereview|comercial|comment|comments|communities|community|company|compare|compras|config|configuration|connect|contact|contact-us|contact_us|contactus|contest|contribute|corp|create|css|dashboard|data|db|default|delete|demo|design|designer|destroy|dev|devel|developer|developers|diagram|diary|dict|dictionary|die|dir|direct_messages|directory|dist|doc|docs|documentation|domain|download|downloads|ecommerce|edit|editor|edu|education|email|employment|empty|end|enterprise|entries|entry|error|errors|eval|event|events|exit|explore|facebook|faq|favorite|favorites|feature|features|feed|feedback|feeds|file|files|first|flash|fleet|fleets|flog|follow|followers|following|forgot|form|forum|forums|founder|free|friend|friends|ftp|gadget|gadgets|game|games|get|gift|gifts|gist|github|graph|group|groups|guest|guests|help|home|homepage|host|hosting|hostmaster|hostname|howto|hpg|html|http|httpd|https|i|iamges|icon|icons|id|idea|ideas|image|images|imap|img|index|indice|info|information|inquiry|instagram|intranet|invitations|invite|ipad|iphone|irc|is|issue|issues|it|item|items|java|javascript|job|jobs|join|js|json|jump|knowledgebase|language|languages|last|ldap-status|legal|license|link|links|linux|list|lists|log|log-in|log-out|log_in|log_out|login|logout|logs|m|mac|mail|mail1|mail2|mail3|mail4|mail5|mailer|mailing|maintenance|manager|manual|map|maps|marketing|master|me|media|member|members|message|messages|messenger|microblog|microblogs|mine|mis|mob|mobile|movie|movies|mp3|msg|msn|music|musicas|mx|my|mysql|name|named|nan|navi|navigation|net|network|new|news|newsletter|nick|nickname|notes|noticias|notification|notifications|notify|ns|ns1|ns10|ns2|ns3|ns4|ns5|ns6|ns7|ns8|ns9|null|oauth|oauth_clients|offer|offers|official|old|online|openid|operator|order|orders|organization|organizations|overview|owner|owners|page|pager|pages|panel|password|payment|perl|phone|photo|photoalbum|photos|php|phpmyadmin|phppgadmin|phpredisadmin|pic|pics|ping|plan|plans|plugin|plugins|policy|pop|pop3|popular|portal|post|postfix|postmaster|posts|pr|premium|press|price|pricing|privacy|privacy-policy|privacy_policy|privacypolicy|private|product|products|profile|project|projects|promo|pub|public|purpose|put|python|query|random|ranking|read|readme|recent|recruit|recruitment|register|registration|release|remove|replies|report|reports|repositories|repository|req|request|requests|reset|roc|root|rss|ruby|rule|sag|sale|sales|sample|samples|save|school|script|scripts|search|secure|security|self|send|server|server-info|server-status|service|services|session|sessions|setting|settings|setup|share|shop|show|sign-in|sign-up|sign_in|sign_up|signin|signout|signup|site|sitemap|sites|smartphone|smtp|soporte|source|spec|special|sql|src|ssh|ssl|ssladmin|ssladministrator|sslwebmaster|staff|stage|staging|start|stat|state|static|stats|status|store|stores|stories|style|styleguide|stylesheet|stylesheets|subdomain|subscribe|subscription|subscriptions|suporte|support|svn|swf|sys|sysadmin|sysadministrator|system|tablet|tablets|tag|talk|task|tasks|team|teams|tech|telnet|term|terms|terms-of-service|terms_of_service|termsofservice|test|test1|test2|test3|teste|testing|tests|theme|themes|thread|threads|tmp|todo|tool|tools|top|topic|topics|tos|tour|translations|trends|tutorial|tux|tv|twitter|undef|unfollow|unsubscribe|update|upload|uploads|url|usage|user|username|users|usuario|vendas|ver|version|video|videos|visitor|watch|weather|web|webhook|webhooks|webmail|webmaster|website|websites|welcome|widget|widgets|wiki|win|windows|word|work|works|workshop|ww|wws|www|www1|www2|www3|www4|www5|www6|www7|wwws|wwww|xfn|xml|xmpp|xpg|xxx|yaml|year|yml|you|yourdomain|yourname|yoursite|yourusername)$","i"),(on=of||(of={})).MONGODB_PING="MONGODB_PING",on.MONGODB_READ="MONGODB_READ",on.MONGODB_WRITE="MONGODB_WRITE",on.REDIS="REDIS",on.REDIS_PING="REDIS_PING",on.REDIS_WRITE="REDIS_WRITE",i("c"),i("d").Buffer,i("d").Buffer,i("d").Buffer,(or=oh||(oh={})).VERSION="v",or.USER="u";let cc="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),cp=globalThis.crypto?.subtle;async function cd(e,t){if(!cp)throw Error(`SubtleCrypto is not available in this environment.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify-client",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.120",
|
|
4
4
|
"description": "Apify API client for JavaScript",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.15.0"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@apify/oxlint-config": "^0.4.1",
|
|
89
89
|
"@apify/tsconfig": "^0.2.0",
|
|
90
|
-
"@crawlee/puppeteer": "4.0.0-rc.
|
|
90
|
+
"@crawlee/puppeteer": "4.0.0-rc.3",
|
|
91
91
|
"@rsbuild/core": "^2.3.4",
|
|
92
92
|
"@rsbuild/plugin-node-polyfill": "^1.4.6",
|
|
93
93
|
"@rspack/cli": "^2.3.4",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
"express": "^5.3.0",
|
|
104
104
|
"miniflare": "4.20260730.0",
|
|
105
105
|
"oxfmt": "0.80.0",
|
|
106
|
-
"oxlint": "1.
|
|
107
|
-
"oxlint-tsgolint": "7.0.
|
|
106
|
+
"oxlint": "1.95.0",
|
|
107
|
+
"oxlint-tsgolint": "7.0.2009",
|
|
108
108
|
"puppeteer": "^25.19.0",
|
|
109
109
|
"rimraf": "^6.1.4",
|
|
110
110
|
"rolldown": "^1.3.3",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"devEngines": {
|
|
118
118
|
"packageManager": {
|
|
119
119
|
"name": "pnpm",
|
|
120
|
-
"version": "12.
|
|
120
|
+
"version": "12.23.0",
|
|
121
121
|
"onFail": "warn"
|
|
122
122
|
}
|
|
123
123
|
},
|