@brightsec/cli 13.9.0-next.1 → 13.9.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/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(()=>{"use strict";var e={6805:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Archives=t.SpecType=void 0,function(e){e.HAR="HAR",e.OPENAPI="OpenAPI",e.POSTMAN="Postman"}(t.SpecType||(t.SpecType={})),t.Archives=Symbol("Archives")},1825:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseParser=void 0;const r=i(1455),o=i(2613),s=i(6928);t.BaseParser=class BaseParser{constructor(e){this.validator=e,this.FILE_SIZE_LIMIT=524288e3}async parse(e){await this.access(e);if((await(0,r.stat)(e)).size>this.FILE_SIZE_LIMIT)throw new Error("There is not enough storage space to save this file");const t=await(0,r.readFile)(e,"utf8"),i=(0,s.extname)(e);let o;try{o=await this.deserialize(t,{ext:i})}catch(e){throw new Error(`File is invalid. ${e.message}`)}return await this.validator.validate(o),{content:t,filename:(0,s.basename)(e),contentType:this.contentType(i)}}deserialize(e,t){return JSON.parse(e)}contentType(e){switch(e){case".yml":case".yaml":return"application/yaml";default:return"application/json"}}async access(e){(0,o.ok)(e,"The path is invalid.");try{await(0,r.access)(e,r.constants.F_OK)}catch(t){throw new Error(`${(0,s.basename)(e)} file doesn't found.`)}}}},7511:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultParserFactory=void 0;const r=i(5584),o=i(6805),s=i(3898),n=i(1825),a=i(8093),c=i(8641);let p=class DefaultParserFactory{constructor(e,t,i){this.harValidator=e,this.oasValidator=t,this.postmanValidator=i}create(e){switch(e){case o.SpecType.HAR:return new n.BaseParser(this.harValidator);case o.SpecType.OPENAPI:return new a.OasParser(this.oasValidator);case o.SpecType.POSTMAN:return new n.BaseParser(this.postmanValidator);default:throw new Error("Incorrect a specification type")}}};p=r.__decorate([(0,c.injectable)(),r.__metadata("design:paramtypes",[s.HarValidator,s.OasValidator,s.PostmanValidator])],p),t.DefaultParserFactory=p},8093:function(e,t,i){var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){void 0===r&&(r=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,r,o)}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&r(t,e,i);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OasParser=void 0;const n=i(1825);class OasParser extends n.BaseParser{constructor(e){super(e)}async deserialize(e,t){return".yml"===t.ext||".yaml"===t.ext?(await Promise.resolve().then((()=>s(i(7089))))).load(e):JSON.parse(e)}}t.OasParser=OasParser},6780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6500:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserFactory=void 0,t.ParserFactory=Symbol("ParserFactory")},207:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(8093),t),r.__exportStar(i(1825),t),r.__exportStar(i(6780),t),r.__exportStar(i(7511),t),r.__exportStar(i(6500),t)},7351:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestArchives=t.RestArchivesOptions=void 0;const r=i(5584),o=i(6805),s=i(1879),n=i(8641),a=r.__importDefault(i(8938)),c=r.__importDefault(i(2305)),p=i(4589),l=r.__importDefault(i(4708)),d=r.__importDefault(i(7067));t.RestArchivesOptions=Symbol("RestArchivesOptions");let u=class RestArchives{constructor(e,{baseURL:t,apiKey:i,proxyURL:r,insecure:s,timeout:n=1e4}){this.proxyFactory=e,this.ALLOWED_SPECS=[o.SpecType.OPENAPI,o.SpecType.POSTMAN,o.SpecType.HAR];const{httpAgent:c=new d.default.Agent,httpsAgent:p=new l.default.Agent({rejectUnauthorized:!s})}=r?this.proxyFactory.createProxy({proxyUrl:r,rejectUnauthorized:!s}):{};this.client=a.default.create({baseURL:t,timeout:n,httpAgent:c,httpsAgent:p,responseType:"json",headers:{authorization:`Api-Key ${i}`}})}async upload(e){(0,p.ok)(this.ALLOWED_SPECS.includes(e.type),`Invalid specification type. Allowed: ${this.ALLOWED_SPECS}`);const{discard:t,headers:i,variables:r,projectId:o}=e,s=this.castToFile(e),n=new c.default;n.append("file",s.value,s.options),n.append("projectId",o),n.append("headers",JSON.stringify(null!=i?i:{})),n.append("variables",JSON.stringify(null!=r?r:{}));return(await this.client.post("/api/v1/files",n,{params:{discard:t}})).data.id}castToFile({filename:e,content:t,contentType:i="application/json"}){return{options:{filename:e,contentType:i},value:Buffer.from(t)}}};u=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.ProxyFactory)),r.__param(1,(0,n.inject)(t.RestArchivesOptions)),r.__metadata("design:paramtypes",[Object,Object])],u),t.RestArchives=u},3455:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HarValidator=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(9864)),n=r.__importDefault(i(5711)),a=r.__importDefault(i(9280)),c=i(8641);let p=class HarValidator{constructor(){this.ajv=new n.default({allErrors:!0,async:!0,jsonPointers:!0,extendRefs:!0}),this.ajv.addSchema(s.default)}async validate(e){const t=this.ajv.getSchema("har");if(!await t(e))throw o.logger.error((0,a.default)(t.schema,e,t.errors,{indent:2})),new Error("The HAR file is corrupted.");if(!this.entriesAreValid(e.log.entries))throw new Error("HAR is empty or contains none of request.")}entriesAreValid(e){if(!e)return!1;const t=e.map(this.parseEntry,this).filter((e=>!!e));return 0!==[...new Set(t)].length}parseEntry(e){const{host:t,protocol:i}=new URL(e.request.url);if(t&&i&&"chrome-extension:"!==i)return e.request.url}};p=r.__decorate([(0,c.injectable)(),r.__metadata("design:paramtypes",[])],p),t.HarValidator=p},9641:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OasValidator=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(9550)),n=r.__importDefault(i(3447)),a=r.__importDefault(i(5711)),c=r.__importDefault(i(8064)),p=r.__importDefault(i(9280)),l=r.__importDefault(i(6410)),d=r.__importDefault(i(6132)),u=i(8641),h=i(4589);let f=class OasValidator{constructor(){this.MIN_ALLOWED_VERSION="2.0.0",this.VERSION_SCHEMA_MAP=new Map([[2,"http://swagger.io/v2/schema.json#"],[3,"https://spec.openapis.org/oas/3.0/schema/2019-04-02"]]),this.SCHEMAS=[s.default,n.default],this.ajv=new a.default({allErrors:!0,$data:!0,jsonPointers:!0,extendRefs:!0,async:!0,schemaId:"auto"}),this.ajv.addFormat("uriref",l.default.full["uri-reference"]),this.ajv.addMetaSchema(d.default),this.ajv._refs["http://json-schema.org/schema"]="http://json-schema.org/draft-04/schema",this.SCHEMAS.forEach((e=>this.ajv.addSchema(e)))}async validate(e){const t=this.getVersion(e),i=c.default.major(t),r=this.VERSION_SCHEMA_MAP.get(i);(0,h.ok)(r,"Cannot determine version of schema. Schema ID is missed."),this.validateVersion(e);const s=this.ajv.getSchema(r);if(!await s(e))throw o.logger.error((0,p.default)(s.schema,e,s.errors,{indent:2})),new Error("The OAS file is corrupted.")}validateVersion(e){const t=this.getVersion(e);if(!c.default.gte(t,this.MIN_ALLOWED_VERSION))throw new Error("Swagger v1 are not supported. If you are using an older format, convert it to v2 and try again.")}getVersion(e){let t=(e.openapi||e.swagger||"").trim();return(0,h.ok)(t,"Cannot determine version of specification."),!c.default.valid(t)&&this.MIN_ALLOWED_VERSION.startsWith(t)&&(t=this.MIN_ALLOWED_VERSION),t}};f=r.__decorate([(0,u.injectable)(),r.__metadata("design:paramtypes",[])],f),t.OasValidator=f},3316:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostmanValidator=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(7925)),n=r.__importDefault(i(9088)),a=r.__importDefault(i(4900)),c=r.__importDefault(i(3025)),p=r.__importDefault(i(5711)),l=r.__importDefault(i(9280)),d=r.__importDefault(i(6132)),u=r.__importDefault(i(6763)),h=i(8641),f=i(4589),m=i(6760);let y=class PostmanValidator{constructor(){this.ALLOWED_SCHEMAS=["https://schema.getpostman.com/json/draft-07/collection/v2.0.0/","https://schema.getpostman.com/json/draft-07/collection/v2.1.0/","https://schema.getpostman.com/json/collection/v2.0.0/","https://schema.getpostman.com/json/collection/v2.1.0/"],this.META_SCHEMAS=[d.default,u.default],this.SCHEMAS=[s.default,n.default,a.default,c.default],this.ajv=new p.default({allErrors:!0,async:!0,meta:!1,schemaId:"auto"}),[].concat(this.META_SCHEMAS,this.SCHEMAS).forEach((e=>this.ajv.addMetaSchema(e))),this.ajv._refs["http://json-schema.org/schema"]="http://json-schema.org/draft-04/schema"}async validate(e){(0,f.ok)(e,"Postman collection is not provided."),(0,f.ok)(e.info,'"info" section is missed in the collection.');const t=e.info.schema?(0,m.parse)(e.info.schema).dir+"/":"";if(!this.ALLOWED_SCHEMAS.includes(t.trim()))throw new Error("Postman v1 collections are not supported. If you are using an older format, convert it to v2 and try again.");const i=this.ajv.getSchema(t);if(!i)throw new Error("Cannot determine version of schema. Schema ID is missed.");if(!await i(e))throw o.logger.error((0,l.default)(i.schema,e,i.errors,{indent:2})),new Error("The Postman Collection file is corrupted.")}};y=r.__decorate([(0,h.injectable)(),r.__metadata("design:paramtypes",[])],y),t.PostmanValidator=y},9840:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3898:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(3455),t),r.__exportStar(i(9641),t),r.__exportStar(i(3316),t),r.__exportStar(i(9840),t)},6412:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultParserFactory=t.ParserFactory=void 0;const r=i(5584);r.__exportStar(i(6805),t),r.__exportStar(i(7351),t);var o=i(207);Object.defineProperty(t,"ParserFactory",{enumerable:!0,get:function(){return o.ParserFactory}}),Object.defineProperty(t,"DefaultParserFactory",{enumerable:!0,get:function(){return o.DefaultParserFactory}})},5832:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Configure=void 0;const r=i(5584),o=i(1879),s=i(5721),n=r.__importDefault(i(9490));class Configure{constructor(){this.command="configure [options]",this.describe="Start a configuration wizard"}static getMapEntryOrThrow(e,t){try{return[e,new URL(t)]}catch(t){throw new Error(`Invalid value for ${e} testing endpoint`)}}builder(e){return e.option(s.TestType.HTTP,{hidden:!0,requiresArg:!0,describe:"Bright application base URL"}).option(s.TestType.AUTH,{hidden:!0,requiresArg:!0,describe:"Bright event message authentication endpoint"}).option("ping",{boolean:!0,describe:"Start network tests."}).option("traceroute",{boolean:!0,describe:"Start treceroute to a local recource."}).option("max-ttl",{number:!0,requiresArg:!0,describe:"Set the max time-to-live (max number of hops) used in outgoing probe packets.",default:64}).option("probes",{alias:"p",number:!0,requiresArg:!0,describe:"Set the number of probes per 'ttl'.",default:3}).group(["max-ttl","probes"],"Traceroute Options").conflicts("ping","traceroute").middleware((e=>{var t,i;n.default.register(s.Options,{useValue:{traceroute:{maxTTL:isNaN(+e.maxTtl)?void 0:+e.maxTtl,probes:isNaN(+e.probes)?void 0:+e.probes}}}).register(s.ConnectivityUrls,{useValue:new Map([Configure.getMapEntryOrThrow(s.TestType.HTTP,null!==(t=e[s.TestType.HTTP])&&void 0!==t?t:e.api),Configure.getMapEntryOrThrow(s.TestType.AUTH,null!==(i=e[s.TestType.AUTH])&&void 0!==i?i:e.api)])})}))}async handler(e){try{const t=n.default.resolve(s.Platform),stop=async()=>{await t.stop(),process.exit(0)};process.on("SIGTERM",stop).on("SIGINT",stop).on("SIGHUP",stop),await t.start({ping:!!e.ping,traceroute:!!e.traceroute})}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"configure"})),process.exit(1)}}}t.Configure=Configure},4191:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EntryPointsUpdateHost=void 0;const r=i(1879),o=i(8224),s=i(8641);t.EntryPointsUpdateHost=class EntryPointsUpdateHost{constructor(){this.command="entrypoints:update-host [options]",this.describe="Bulk update target entry points host."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).option("old-hostname",{alias:"o",describe:"Old hostname of entrypoints.",string:!0,requiresArg:!0,demandOption:!0}).option("new-hostname",{alias:"n",describe:"New hostname of entrypoints.",string:!0,requiresArg:!0,demandOption:!0}).option("entrypoint-ids",{alias:"e",describe:"IDs of entrypoints to update.",string:!0,requiresArg:!0,array:!0}).middleware((e=>{var t;return s.container.register(o.RestProjectsOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(o.EntryPoints),i=e.project,{taskId:r}=await t.updateHost({projectId:i,entryPointIds:e.entrypointIds,newHostname:e.newHostname,oldHostname:e.oldHostname});console.log(r),process.exitCode=0}catch(e){r.logger.error(r.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:update-host"})),process.exitCode=1}}}},7653:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetEntryPoints=void 0;const r=i(8224),o=i(1879),s=i(8641);t.GetEntryPoints=class GetEntryPoints{constructor(){this.command="entrypoints:list [options]",this.describe="get all entrypoints of the project."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",requiresArg:!0,demandOption:!0}).option("verbose",{describe:"Enable verbose mode",boolean:!0,default:!1}).option("limit",{describe:"Limit the number of entrypoints",default:10}).option("pretty",{describe:"Pretty print the output",boolean:!0,default:!1}).option("connectivity",{describe:"Filter by connectivity",array:!0,choices:["ok","unreachable","problem","skipped","unauthorized","unavailable"]}).option("status",{describe:"Filter by status",array:!0,choices:["new","changed","tested","vulnerable"]}).middleware((e=>{var t;return s.container.register(r.RestProjectsOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){const t=s.container.resolve(r.EntryPoints);try{const i=await t.entrypoints({projectId:e.project,limit:e.limit,connectivity:e.connectivity,status:e.status}),r=e.verbose?i:i.map((e=>({id:e.id,method:e.method,url:e.url})));console.log(e.pretty?JSON.stringify(r,null,2):JSON.stringify(r)),process.exitCode=0}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:list"})),process.exitCode=1}}}},8287:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingDiscoveryStatus=void 0;const r=i(512),o=i(2297),s=i(1879),n=i(8641);t.PollingDiscoveryStatus=class PollingDiscoveryStatus{constructor(){this.command="discovery:polling [options] <discoveryId>",this.describe="Allows to configure a polling of discovery status."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).option("interval",{requiresArg:!0,describe:'The sampling interval between status checks. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.',default:5e3}).option("timeout",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a discovery status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.'}).positional("discoveryId",{describe:"ID of an existing discovery.",demandOption:!0,type:"string"}).middleware((e=>{var t;return n.container.register(r.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.container.resolve(o.DiscoveryPollingFactory).create({discoveryId:e.discoveryId,projectId:e.project,timeout:e.timeout,interval:e.interval});await t.start(),process.exit(0)}catch(e){s.logger.error(s.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:polling"})),process.exit(1)}}}},3567:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingHostUpdateJobStatus=void 0;const r=i(1879),o=i(7035),s=i(8224),n=i(8641);t.PollingHostUpdateJobStatus=class PollingHostUpdateJobStatus{constructor(){this.command="entrypoints:update-host-polling [options] <jobId>",this.describe="Allows to configure a polling of host update job status."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("interval",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a host update job status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.',default:5e3}).option("timeout",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a host update job status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.'}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).positional("jobId",{describe:"ID of an existing update host job which you want to check.",type:"string",demandOption:!0}).middleware((e=>{var t;return n.container.register(s.RestProjectsOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.container.resolve(o.HostUpdateJobStatusPollingFactory).create({timeout:e.timeout,interval:e.interval,jobId:e.jobId,projectId:e.project});await t.start(),process.exit(0)}catch(e){r.logger.error(r.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:update-host-polling"})),process.exit(1)}}}},9520:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingScanStatus=void 0;const r=i(523),o=i(1879),s=i(8641);t.PollingScanStatus=class PollingScanStatus{constructor(){this.command="scan:polling [options] <scanId>",this.describe="Allows to configure a polling of scan status."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("interval",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a scan status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.',default:5e3}).option("timeout",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a scan status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.'}).option("breakpoint",{alias:"b",choices:o.Helpers.toArray(r.BreakpointType),string:!0,describe:"A conditional breakpoint that allows to finish the process with exit code 50 only after fulfilling the predefined condition.",requiresArg:!0,default:r.BreakpointType.ANY}).positional("scanId",{describe:"ID of an existing scan which you want to check.",type:"string",demandOption:!0}).middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.PollingFactory).create({scanId:e.scanId,timeout:e.timeout,interval:e.interval,breakpoint:e.breakpoint});await t.start(),process.exit(0)}catch(e){e instanceof r.BreakpointException&&(o.logger.error("The breakpoint has been hit during polling."),o.logger.error(`Breakpoint: ${e.message}`),process.exit(50)),o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:polling"})),process.exit(1)}}}},1718:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RerunDiscovery=void 0;const r=i(512),o=i(1879),s=i(8641);t.RerunDiscovery=class RerunDiscovery{constructor(){this.command="discovery:rerun [options] <discoveryId>",this.describe="Request to start a new discovery using the same configuration as an existing discovery, by discovery ID."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).positional("discoveryId",{describe:"ID of an existing discovery which you want to re-run.",requiresArg:!0,demandOption:!0,type:"string"}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).middleware((e=>{var t;return s.container.register(r.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Discoveries),i=e.project,o=e.discoveryId,n=await t.rerun(i,o);console.log(n),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:rerun"})),process.exit(1)}}}},3986:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RetestScan=void 0;const r=i(523),o=i(1879),s=i(8641);t.RetestScan=class RetestScan{constructor(){this.command="scan:retest [options] <scanId>",this.describe="Request to start a new scan using the same configuration as an existing scan, by scan ID."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).positional("scanId",{describe:"ID of an existing scan which you want to re-run.",type:"string",demandOption:!0}).middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Scans),i=await t.retest(e.scanId);console.log(i),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:retest"})),process.exit(1)}}}},35:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunDiscovery=void 0;const r=i(512),o=i(1879),s=i(6768),n=i(8641);t.RunDiscovery=class RunDiscovery{constructor(){this.command="discovery:run [options]",this.describe="Start a new discovery for the received configuration."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).option("name",{alias:"n",describe:"Name of the discovery.",string:!0,requiresArg:!0,demandOption:!0}).option("auth",{alias:"o",describe:"Auth object ID.",string:!0,requiresArg:!0}).option("repeater",{alias:"agent",requiresArg:!0,array:!0,describe:"ID of any repeaters connected with the discovery."}).option("archive",{alias:"a",normalize:!0,requiresArg:!0,describe:"A collection of your app's http/websockets logs into HAR file. Usually you can use browser dev tools or our browser web extension"}).option("crawler",{alias:"c",requiresArg:!0,array:!0,describe:"A list of specific urls that should be included into crawler."}).conflicts("archive","crawler").check((e=>{if(e.archive&&e.crawler)throw new Error("Arguments --archive and --crawler are mutually exclusive");if(!e.archive&&!e.crawler)throw new Error("Either --archive or --crawler must be specified");return!0})).option("host-filter",{alias:"F",requiresArg:!0,array:!0,describe:"A list of specific hosts that should be included into scan."}).option("header",{alias:"H",requiresArg:!0,array:!0,describe:"A list of specific headers that should be included into request."}).option("smart",{boolean:!0,describe:"Use automatic smart decisions such as: parameter skipping, detection phases, etc. to minimize scan time."}).option("crawl-parent-subdomains",{boolean:!0,describe:"Crawl parent path folders and subdomains",default:!1}).option("concurrency",{number:!0,default:10,describe:"Number of maximum concurrent requests allowed to be sent to the target, can range between 1 to 50 (default: 10).",requiresArg:!0}).option("interactions-depth",{number:!0,default:3,describe:"Number of maximum interactions with nested objects, can range between 1 to 5 (default: 3).",requiresArg:!0}).middleware((e=>{var t;return n.container.register(s.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.container.resolve(r.Discoveries),i=e.project,{id:s,warnings:a}=await t.create(i,{name:e.name,authObjectId:e.auth,hostsFilter:e.hostFilter,crawlerUrls:e.crawler,fileId:e.archive,repeaters:e.repeater,optimizedCrawler:e.smart,poolSize:e.concurrency,maxInteractionsChainLength:e.interactionsDepth,subdomainsCrawl:e.crawlParentSubdomains,headers:e.header});console.log(s),(null==a?void 0:a.length)&&o.logger.warn(`${a.map((e=>e.message)).join("\n")}\n`),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:run"})),process.exit(1)}}}},9773:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunRepeater=void 0;const r=i(5584),o=i(2046),s=i(1879),n=r.__importDefault(i(9490)),a=i(8914),c=i(6436),p=i(6760),l=r.__importDefault(i(1708));t.RunRepeater=class RunRepeater{constructor(){this.command="repeater [options]",this.describe="Starts an on-prem agent."}builder(e){var t;return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("id",{alias:"agent",describe:"ID of an existing repeater which you want to use to run a new scan.",type:"string",requiresArg:!0,demandOption:!0}).option("scripts",{alias:"S",requiresArg:!0,string:!0,describe:'JSON string which contains script list, which is initially empty and consists of zero or more host and path pairs. Example: {"*.example.com": "./hmac.js"}',coerce:e=>JSON.parse(e)}).option("timeout",{number:!0,requiresArg:!0,default:3e4,describe:"Time to wait for a server to send response headers (and start the response body) before aborting the request."}).option("header",{alias:"H",requiresArg:!0,conflicts:["headers"],array:!0,describe:"A list of specific headers that should be included into request.",coerce:e=>Array.isArray(e)?s.Helpers.parseHeaders(e):{}}).option("headers",{requiresArg:!0,deprecated:"Use --header instead.",string:!0,conflicts:["header"],describe:'JSON string which contains header list, which is initially empty and consists of zero or more name and value pairs. Example: {"x-slack-signature": "Z2dFIHJldHNhRQ"}',coerce:e=>JSON.parse(e)}).option("cacert",{default:!1,requiresArg:!0,describe:"The path to file which may contain multiple CA certificates. Example: /etc/ssl/certs/ca-certificates.crt",coerce:e=>("string"==typeof e||"boolean"==typeof e)&&e}).option("cert",{requiresArg:!0,array:!0,string:!0,describe:'The certificate must be in PKCS, or PEM format. Example: {"hostname": "example.com", "path": "./example.pem", "passphrase": "pa$$word", "port": "1234"}.',coerce:e=>e.map((e=>JSON.parse(e))).map((({path:e,hostname:t,passphrase:i,port:r})=>(e||(s.logger.error('Error during "repeater": Specify the path to your client certificate file.'),l.default.exit(1)),t||(s.logger.error('Error during "repeater": Specify the hostname (without protocol and port) of the request URL for which you want to use the certificate.'),l.default.exit(1)),{hostname:t,passphrase:i,path:(0,p.normalize)(e),port:r})))}).option("experimental-connection-reuse",{deprecated:"Use --ntlm instead",boolean:!0,describe:"Configure ntlm support (enables TCP connection reuse)"}).option("ntlm",{boolean:!0,describe:"Configure ntlm support (enables TCP connection reuse)"}).option("daemon",{requiresArg:!1,alias:"d",describe:"Run as repeater in daemon mode"}).option("run",{requiresArg:!1,hidden:!0}).option("remove-daemon",{requiresArg:!1,alias:["rm","remove"],describe:"Stop and remove repeater daemon"}).option("proxy-domains",{requiresArg:!0,array:!0,describe:"Space-separated list of domains that should be routed through the proxy. This option is only applicable when using the --proxy option",coerce(e){if(void 0!==e[0])return 1===e.length&&e[0].includes(" ")?e[0].trim().split(" "):e}}).option("proxy-domains-bypass",{requiresArg:!0,array:!0,default:null===(t=l.default.env.NO_PROXY)||void 0===t?void 0:t.trim().split(",").map((e=>e.trim())),describe:"Space-separated list of domains that should not be routed through the proxy. This option is only applicable when using the --proxy option",coerce(e){if(1===e.length){if(void 0===e[0])return;return e[0].includes(" ")?e[0].trim().split(" "):e}return e}}).conflicts({daemon:"remove-daemon",ntlm:["proxy","experimental-connection-reuse"]}).conflicts("proxy-domains","proxy-domains-bypass").env("REPEATER").middleware((e=>{Object.hasOwnProperty.call(e,"")&&delete e[""]}),!0).exitProcess(!1).check((e=>{var t,i;const r=e.id;if(!s.Helpers.isShortUUID(r)&&!s.Helpers.isUUID(r))throw new Error("Option --id has wrong value. Please ensure that --id option has a valid ID.");const o=null!==(t=e.proxyDomains)&&void 0!==t?t:[];for(const e of o)if(e.includes(","))throw new Error("Option --proxy-domains has a wrong value.Please ensure that --proxy-domains option has space separated list of domain values");const n=null!==(i=e.proxyDomainsBypass)&&void 0!==i?i:[];for(const e of n)if(e.includes(","))throw new Error("Option --proxy-domain-bypass has wrong value.Please ensure that --proxy-domain-bypass option has space separated list of domain values");return!0})).middleware((e=>{var t,i,r;n.default.register(o.RequestExecutorOptions,{useValue:{headers:null!==(t=e.header)&&void 0!==t?t:e.headers,timeout:e.timeout,proxyUrl:null!==(i=e.proxyTarget)&&void 0!==i?i:e.proxy,certs:e.cert,maxBodySize:1/0,maxContentLength:100,reuseConnection:!!e.ntlm||!!e.experimentalConnectionReuse,whitelistMimes:[{type:"text/html",allowTruncation:!1},{type:"text/plain",allowTruncation:!0},{type:"text/css",allowTruncation:!1},{type:"text/javascript",allowTruncation:!1},{type:"text/markdown",allowTruncation:!0},{type:"text/xml",allowTruncation:!1},{type:"application/javascript",allowTruncation:!1},{type:"application/x-javascript",allowTruncation:!1},{type:"application/json",allowTruncation:!1},{type:"application/xml",allowTruncation:!1},{type:"application/x-www-form-urlencoded",allowTruncation:!1},{type:"application/msgpack",allowTruncation:!1},{type:"application/ld+json",allowTruncation:!1},{type:"application/graphql",allowTruncation:!1}],proxyDomains:e.proxyDomains,proxyDomainsBypass:e.proxyDomainsBypass}}).register(a.DefaultRepeaterServerOptions,{useValue:{uri:e.repeaterServer,token:e.token,connectTimeout:e.timeout,proxyUrl:null!==(r=e.proxyBright)&&void 0!==r?r:e.proxy,insecure:e.insecure}})}))}async handler(e){const t=n.default.resolve(a.RepeaterLauncher);if(e.cacert&&await t.loadCerts("string"==typeof e.cacert?e.cacert:void 0),e.scripts&&await t.loadScripts(e.scripts),e.remove)return await t.uninstall(),void(l.default.exitCode=0);if(e.daemon)return await t.install(),void(l.default.exitCode=0);try{["SIGTERM","SIGINT","SIGHUP"].forEach((e=>l.default.on(e,(async()=>{await t.close(),l.default.exitCode=0})))),await t.run(e.id,e.run)}catch(e){(0,c.captureException)(e),s.logger.error(s.ErrorMessageFactory.genericCommandError({error:e,command:"repeater"})),await t.close(),l.default.exitCode=1}}}},2536:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunScan=void 0;const r=i(523),o=i(1879),s=i(8641),n=i(8161);class RunScan{constructor(){this.command="scan:run [options]",this.describe="Start a new scan for the received configuration."}static excludeEntryPoint(e){return e.map((e=>JSON.parse(e))).map((({methods:e=[],patterns:t=[]})=>{const i=t.filter((e=>!!e));return i.length||(o.logger.error(o.ErrorMessageFactory.genericCommandError({command:"scan:run",error:"please make sure that patterns contain at least one regexp"})),process.exit(1)),{methods:[...new Set(e)],patterns:[...new Set(i)]}}))}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("name",{alias:"n",describe:"Name of the scan.",requiresArg:!0,demandOption:!0}).option("auth",{alias:"o",describe:"Auth object ID.",requiresArg:!0}).option("repeater",{alias:"agent",requiresArg:!0,array:!0,describe:"ID of any repeaters connected with the scan."}).option("archive",{alias:"a",normalize:!0,requiresArg:!0,describe:"A collection your app's http/websockets logs into HAR file. Usually you can use browser dev tools or our browser web extension"}).option("crawler",{alias:"c",requiresArg:!0,array:!0,describe:"A list of specific urls that should be included into crawler."}).option("test",{array:!0,describe:`A list of tests to run during a scan. If no tests are specified, the default tests will be run.${n.EOL}For more information on the default tests, refer to the documentation: https://docs.brightsec.com/docs/running-a-scan${n.EOL}Additional details about available tests can be found here: https://docs.brightsec.com/docs/vulnerability-guide`}).option("bucket",{array:!0,describe:"A list of test buckets which you want to run during a scan."}).option("project",{alias:"p",requiresArg:!0,string:!0,describe:"ID of the project"}).option("template",{alias:"tp",requiresArg:!1,string:!0,describe:"Scan template ID"}).option("module",{default:r.Module.DAST,requiresArg:!0,choices:o.Helpers.toArray(r.Module),describe:"The dast module tests for specific scenarios, mainly OWASP top 10 and other common scenarios. The fuzzer module generates various scenarios to test for unknown vulnerabilities, providing automated AI led fuzzing testing. This module can be coupled with the repeater to find additional vulnerabilities."}).option("host-filter",{alias:"F",requiresArg:!0,array:!0,describe:"A list of specific hosts that should be included into scan."}).option("header",{alias:"H",requiresArg:!0,array:!0,describe:"A list of specific headers that should be included into request."}).option("exclude-param",{requiresArg:!0,array:!0,string:!0,describe:'A list of regex patterns for parameter names you would like to ignore during the tests. Example: "Id$"'}).option("exclude-entry-point",{array:!0,describe:'A list of JSON strings that contain patterns for entry points you would like to ignore during the tests. Pass an empty string to remove default exclusions. To apply patterns for all HTTP methods, you can set an empty array to "methods". Example: \'{ "methods": [], "patterns": ["users\\/?$"] }\'',coerce:RunScan.excludeEntryPoint}).option("smart",{boolean:!0,describe:"Use automatic smart decisions such as: parameter skipping, detection phases, etc. to minimize scan time."}).option("concurrency",{number:!0,default:10,requiresArg:!0,describe:"Number of maximum concurrent requests allowed to be sent to the target, can range between 1 to 50 (default: 10)."}).option("param",{array:!0,defaultDescription:`[${r.ATTACK_PARAM_LOCATIONS_DEFAULT.map((e=>`"${e}"`)).join(",")}]`,requiresArg:!0,choices:o.Helpers.toArray(r.AttackParamLocation),describe:"Defines which part of the request to attack."}).option("entrypoint",{array:!0,alias:"e",describe:"List entrypoint IDs to scan specific entrypoints. If no IDs are provided, the scan will run on the first 2000 project-level entrypoints. This option requires to specify the project ID using the --project option."}).conflicts("entrypoint",["crawler","archive"]).check((e=>{if(e.entrypoint&&e.archive&&e.crawler)throw new Error("Arguments --entrypoint, --archive and --crawler are mutually exclusive");if(!e.entrypoint&&!e.archive&&!e.crawler)throw new Error("When --entrypoint is not provided, either --archive or --crawler must be specified");return!0})).group(["archive","crawler"],"Discovery Options").group(["host-filter","header","module","repeater","test","smart"],"Additional Options").middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Scans),{id:i,warnings:n=[]}=await t.create({tests:e.test,name:e.name,module:e.module,authObjectId:e.auth,projectId:e.project,templateId:e.template,buckets:e.bucket,hostsFilter:e.hostFilter,headers:o.Helpers.parseHeaders(e.header),crawlerUrls:e.crawler,fileId:e.archive,repeaters:e.repeater,smart:e.smart,attackParamLocations:e.param,poolSize:e.concurrency,exclusions:{requests:e.excludeEntryPoint,params:e.excludeParam},entryPointIds:e.entrypoint});console.log(i),n.length&&o.logger.warn(`${n.map((e=>e.message)).join("\n")}\n`),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:run"})),process.exit(1)}}}t.RunScan=RunScan},1294:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StopDiscovery=void 0;const r=i(512),o=i(1879),s=i(8641);t.StopDiscovery=class StopDiscovery{constructor(){this.command="discovery:stop [options] <discoveryId>",this.describe="Stop discovery by id."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).option("project",{alias:"p",requiresArg:!0,string:!0,describe:"ID of the project",demandOption:!0}).positional("discoveryId",{describe:"ID of an existing discovery which you want to stop.",requiresArg:!0,demandOption:!0,type:"string"}).middleware((e=>{var t;return s.container.register(r.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Discoveries);await t.stop(e.project,e.discoveryId),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:stop"})),process.exit(1)}}}},5527:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StopScan=void 0;const r=i(523),o=i(1879),s=i(8641);t.StopScan=class StopScan{constructor(){this.command="scan:stop [options] <scanId>",this.describe="Stop scan by id."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).positional("scanId",{describe:"ID of an existing scan which you want to stop.",requiresArg:!0,demandOption:!0,type:"string"}).middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Scans);await t.stop(e.scanId),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:stop"})),process.exit(1)}}}},4457:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UploadArchive=void 0;const r=i(5584),o=i(6412),s=i(1879),n=r.__importDefault(i(9490));t.UploadArchive=class UploadArchive{constructor(){this.command="archive:upload [options] <file>",this.describe="Uploads a archive to Bright."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("type",{alias:"T",requiresArg:!0,describe:"The specification type",choices:[o.SpecType.OPENAPI,o.SpecType.HAR,o.SpecType.POSTMAN].map((e=>e.toLowerCase())),default:o.SpecType.HAR.toLowerCase(),demandOption:!0}).option("discard",{alias:"d",default:!0,boolean:!0,describe:"Indicates if archive should be remove or not after scan running. Enabled by default."}).option("project",{alias:["p","projectId"],describe:"ID of the project for uploading file (Optional for transition period, will be mandatory in future)In case project-level API key project ID determined from that API key"}).option("header",{alias:"H",default:[],deprecated:"Use --header when running a scan using the scan:run command.",requiresArg:!0,array:!0,describe:"A list of specific headers that should be included into request.",coerce:e=>Array.isArray(e)?s.Helpers.parseHeaders(e):{}}).option("variable",{alias:"V",default:[],deprecated:"Directly integrate variables into the file. For updated guidelines on managing variables effectively, refer to https://learning.postman.com/docs/sending-requests/variables/variables/#variable-scopes",requiresArg:!0,array:!0,describe:"A list of specific variables that should be included into request. Only for Postman",coerce:e=>Array.isArray(e)?s.Helpers.parseHeaders(e):{}}).positional("file",{describe:"A collection your app's http/websockets logs into HAR file. Usually you can use browser dev tools or our browser web extension",type:"string",demandOption:!0,normalize:!0}).group(["header"],"OAS Options").group(["header","variable"],"Postman Options").middleware((e=>{var t;n.default.register(o.RestArchivesOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.default.resolve(o.ParserFactory),i=n.default.resolve(o.Archives),r=s.Helpers.selectEnumValue(o.SpecType,e.type),a=t.create(r),c={...await a.parse(e.file),type:r,discard:e.discard,projectId:e.project,headers:e.header,variables:e.variable};console.log(await i.upload(c)),process.exit(0)}catch(e){s.logger.error(s.ErrorMessageFactory.genericCommandError({error:e,command:"archive:upload"})),process.exit(1)}}}},2887:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VersionCommand=void 0;const r=i(1879),o=i(5317);class VersionCommand{constructor(){this.command="version",this.describe="Prints Bright CLI version this project uses."}static executeCommand(e){return new Promise(((t,i)=>{(0,o.exec)(e,((e,r,o)=>r?t(r):o?t(o):e?i(e):void t("")))}))}async handler(){const e=(await VersionCommand.executeCommand("npm list --depth=0")).match(/ @brightsec\/cli@(.*)\n/),t=(e&&e[1]?e[1]:"").replace(/"invalid"/gi,"").trim(),i=(await VersionCommand.executeCommand("npm list -g --depth=0")).match(/ @brightsec\/cli@(.*)\n/),o=(i&&i[1]?i[1]:"").replace(/"invalid"/gi,"").trim();t?r.logger.log("Local installed version:",t):r.logger.warn("No local installed Bright CLI was found."),o?r.logger.log("Global installed Bright CLI version:",o):r.logger.warn("No global installed was found."),t&&o&&t!==o&&r.logger.warn("To avoid issues with CLI please make sure your global and local Bright CLI versions match, or you are using locally installed Bright CLI instead of global one.")}}t.VersionCommand=VersionCommand},6572:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetEntryPoints=t.Configure=t.RunRepeater=t.PollingScanStatus=t.StopScan=t.RetestScan=t.UploadArchive=t.RunScan=t.VersionCommand=void 0;var r=i(2887);Object.defineProperty(t,"VersionCommand",{enumerable:!0,get:function(){return r.VersionCommand}});var o=i(2536);Object.defineProperty(t,"RunScan",{enumerable:!0,get:function(){return o.RunScan}});var s=i(4457);Object.defineProperty(t,"UploadArchive",{enumerable:!0,get:function(){return s.UploadArchive}});var n=i(3986);Object.defineProperty(t,"RetestScan",{enumerable:!0,get:function(){return n.RetestScan}});var a=i(5527);Object.defineProperty(t,"StopScan",{enumerable:!0,get:function(){return a.StopScan}});var c=i(9520);Object.defineProperty(t,"PollingScanStatus",{enumerable:!0,get:function(){return c.PollingScanStatus}});var p=i(9773);Object.defineProperty(t,"RunRepeater",{enumerable:!0,get:function(){return p.RunRepeater}});var l=i(5832);Object.defineProperty(t,"Configure",{enumerable:!0,get:function(){return l.Configure}});var d=i(7653);Object.defineProperty(t,"GetEntryPoints",{enumerable:!0,get:function(){return d.GetEntryPoints}})},2675:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CliBuilder=void 0;const r=i(5584),o=i(1879),s=i(9654),n=i(6436),a=r.__importDefault(i(2736)),c=r.__importDefault(i(1708));t.CliBuilder=class CliBuilder{constructor(e){this._options=e}get options(){return this._options}build({commands:e}){const{configReader:t,info:r}=this.options,s=i(8314).option("config",{requiresArg:!0,describe:"Path to the file with configuration",config:!0,default:t.discovery(r.cwd),configParser:e=>t.load(e).toJSON()}).option("log-level",{requiresArg:!0,choices:Object.keys(o.LogLevel).map((e=>isNaN(+e)?e.toLowerCase():+e)),default:o.LogLevel.NOTICE,describe:"What level of logs to report. Any logs of a higher level than the setting are shown."}).option("log-file",{requiresArg:!0,type:"string",describe:"File path to write logs to. If specified, logs will be written to this file"}).implies({"log-max-size":"log-file","log-max-files":"log-file","log-rotate-interval":"log-file","log-compress":"log-file"}).group(["log-max-size","log-max-files","log-rotate-interval","log-compress"],"Log Rotation Options (requires --log-file):").option("log-max-size",{requiresArg:!0,type:"string",describe:'Maximum size of log file before rotation (e.g., "10MB", "1GB"). Default: 10MB'}).option("log-max-files",{requiresArg:!0,type:"number",describe:"Maximum number of rotated log files to keep. Default: 5"}).option("log-rotate-interval",{requiresArg:!0,type:"string",describe:'Time interval to rotate log files (e.g., "1d", "12h", "7d"). Default: 1d'}).option("log-compress",{type:"boolean",describe:"Compress rotated log files using gzip. Default: true"}).option("cluster",{deprecated:"Use --hostname instead",requiresArg:!0,describe:"Bright application name (domain name). [default: app.brightsec.com]"}).option("hostname",{requiresArg:!0,describe:"Bright application name (domain name). [default: app.brightsec.com]"}).option("insecure",{boolean:!0,default:!1,description:"Allows CLI to proceed and operate even for server connections otherwise considered insecure."}).option("proxy",{requiresArg:!0,default:c.default.env.PROXY,describe:"Specify a proxy URL to route all traffic through. This should be an HTTP(S), SOCKS4, or SOCKS5 URL. By default, if you specify SOCKS://<URL>, then SOCKS5h is applied."}).option("proxy-bright",{requiresArg:!0,describe:"Specify a proxy URL to route all outbound traffic through. For more information, see the --proxy option."}).option("proxy-target",{requiresArg:!0,describe:"Specify a proxy URL to route all inbound traffic through. For more information, see the --proxy option."}).option("timeout",{describe:"Request timeout in seconds or a duration string (e.g. 10s, 1m, 1h, 10h, 1y).",default:30,coerce:e=>isNaN(+e)?(0,a.default)(e):1e3*+e}).conflicts({proxy:["proxy-bright","proxy-target"],hostname:"cluster"}).middleware((e=>{const{api:t,repeaterServer:i}=o.Helpers.getClusterUrls(e);if(e.api=t,e.repeaterServer=i,e.logFile){const t={maxSize:e["log-max-size"],maxFiles:e["log-max-files"],interval:e["log-rotate-interval"],compress:!1===e["log-compress"]?void 0:"gzip"};o.Logger.configure(e.logLevel,e.logFile,t)}})).middleware((e=>(o.logger.logLevel=e["log-level"],e["log-file"]&&(o.logger.logFile=e["log-file"]),e))).middleware((e=>{var t;return o.logger.logLevel=isNaN(+e.logLevel)?o.LogLevel[null===(t=e.logLevel)||void 0===t?void 0:t.toString().toUpperCase()]:+e.logLevel})).usage("Usage: $0 <command> [options] [<file | scan>]").pkgConf("bright",r.cwd).example("$0 archive:generate --mockfile=.mockfile --name=archive.har","output har file on base your mock requests");return e.reduce(((e,t)=>e.command(this.wrapWithSentry(t))),s).recommendCommands().demandCommand(1).strict(!0).version(r.version).alias("v","version").help("help").alias("h","help").wrap(null)}wrapWithSentry(e){const t=e.handler.bind(e);return e.handler=async e=>{const i=new s.SystemConfigManager(e.api),r=await i.read();return(0,n.runWithAsyncContext)((()=>(this.initSentry(r.sentryDsn),(0,n.setContext)("args",e),i.enableBackgroundRotation((e=>{this.initSentry(e.sentryDsn)})),t(e))))},e}initSentry(e){(0,n.init)({dsn:e,attachStacktrace:!0,release:c.default.env.VERSION,beforeSend:e=>(e.contexts.args&&(e.contexts.args={...e.contexts.args,t:e.contexts.args.t&&"[Filtered]",token:e.contexts.args.token&&"[Filtered]"}),e)})}}},9750:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CliInfo=void 0;const r=i(5584),o=i(4199),s=r.__importDefault(i(6760)),n=i(3024);t.CliInfo=class CliInfo{constructor(e){var t,i;const r=this.getPackagePath(e),o=this.getPackageData(r);this.cwd=r?s.default.dirname(r):e,this.version=null!==(t="13.9.0-next.1")?t:null==o?void 0:o.version,this.distribution=null===(i=null==o?void 0:o.brightCli)||void 0===i?void 0:i.distribution}getPackageData(e){try{const t=(0,n.readFileSync)(e,"utf8");return JSON.parse(t)}catch{}}getPackagePath(e){return(0,o.sync)("package.json",{cwd:e||process.env.BRIGHT_CWD||process.cwd()})}}},2815:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigReader=void 0,t.ConfigReader=Symbol("ConfigReader")},6712:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultConfigReader=void 0;const r=i(1879),o=i(4199),s=i(7089),n=i(6760),a=i(3024),c=i(714);t.DefaultConfigReader=class DefaultConfigReader{constructor(){this.rcOptions=[".brightrc",".brightrc.json",".brightrc.yml",".brightrc.yaml","bright.config.js",".nexploitrc",".nexploitrc.json",".nexploitrc.yml",".nexploitrc.yaml","nexploit.config.js"],this.config=new Map}discovery(e){return(0,o.sync)(this.rcOptions,{cwd:e})}load(e){const t=(0,n.extname)(e.toLowerCase());return".js"===t?this.configure(this.loadCommonJsModule(e)):".yml"===t||".yaml"===t?this.configure((0,s.load)((0,a.readFileSync)(e,"utf8"))):this.configure(JSON.parse((0,a.readFileSync)(e,"utf-8"))),this}get(e){return this.config.get(e)}has(e){return this.config.has(e)}toJSON(){return[...this.config.entries()].reduce(((e,[t,i])=>(e[t]=i,e)),{})}loadCommonJsModule(e){var t,i;const r=(0,a.readFileSync)(e,{encoding:"utf8"}),o=new c.Script(r,{filename:e,timeout:100}),s={exports:{}},n=(0,c.createContext)({exports:s.exports,module:s});o.runInNewContext(n);const p=null!==(i=null===(t=n.module)||void 0===t?void 0:t.exports)&&void 0!==i?i:n.exports;return"function"==typeof p?p():p}configure(e){Object.entries(r.Helpers.omit(e)).map((([e,t])=>this.config.set(e,t)))}}},9654:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SystemConfigManager=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(8938)),n=i(1455),a=i(6760),c=i(8161),p=i(8500);t.SystemConfigManager=class SystemConfigManager{constructor(e){this.rotationInterval=36e5,this.path=(0,a.join)((0,c.homedir)(),".brightclirc"),this.backgroundRotationEnabled=!1,this.client=s.default.create({baseURL:e,timeout:1500,responseType:"json",transitional:{clarifyTimeoutError:!0}})}async read(){await this.rotateIfNecessary();return{sentryDsn:"https://d70acf8253162d45f1e45c1e599a6cee@o319856.ingest.sentry.io/4505924280385536",...(await this.getConfigFile()).data}}enableBackgroundRotation(e){this.backgroundRotationEnabled=!0,this.runBackgroundRotation(e).catch((e=>{o.logger.debug("An error occurred during background rotation",e)}))}disableBackgroundRotation(){this.backgroundRotationEnabled=!1}async runBackgroundRotation(e){for(;this.backgroundRotationEnabled;){o.logger.debug("Performing background rotation of system config file");if(await this.rotateIfNecessary()){e((await this.getConfigFile()).data),o.logger.debug("Background rotation is done, sleeping for %s ms",this.rotationInterval)}await(0,p.setTimeout)(this.rotationInterval,void 0,{ref:!1})}}needsRotation(e){return Date.now()-e.updatedAt.getTime()>=this.rotationInterval}async rotateIfNecessary(){o.logger.debug("Trying to rotate system config");const e=await this.getConfigFile();if(!this.needsRotation(e))return o.logger.debug("Rotation is not needed, last updated on: %s ms",e.updatedAt),!1;o.logger.debug("Rotating system config last updated on: %s ms",e.updatedAt);const t=await this.fetchNewConfig();return t?(await this.updateConfigFile({data:t,updatedAt:new Date}),!0):(o.logger.debug("Rotation failed"),await this.updateConfigFile({...e,updatedAt:new Date}),!1)}defaultConfigFile(){return{data:{},updatedAt:new Date}}async getConfigFile(){const e=this.defaultConfigFile();try{o.logger.debug("Loading system config file");const e=await(0,n.readFile)(this.path),t=JSON.parse(e.toString());return{...t,updatedAt:new Date(t.updatedAt)}}catch(t){return"ENOENT"===t.code?(o.logger.debug("System config file doesn't exist at %s",this.path),e):(o.logger.debug("Error during loading system config file",t),o.logger.debug("Using default system config file"),e)}}async updateConfigFile(e){o.logger.debug("Updating system config file");try{await(0,n.writeFile)(this.path,JSON.stringify(e))}catch(e){o.logger.debug("Error during updating system config file",e)}}async fetchNewConfig(){o.logger.debug("Fetching new system config");try{const{data:e}=await this.client.get("/api/v1/cli/config");return e}catch(e){o.logger.debug("Error during fetching new system config: ",e)}}}},1860:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(2675),t),r.__exportStar(i(2815),t),r.__exportStar(i(9750),t)},2264:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDiscoveryPollingFactory=void 0;const r=i(5584),o=i(8799),s=i(1042),n=i(8641);let a=class DefaultDiscoveryPollingFactory{constructor(e){this.discoveries=e}create(e){return new o.DiscoveryPolling(e,this.discoveries)}};a=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.Discoveries)),r.__metadata("design:paramtypes",[Object])],a),t.DefaultDiscoveryPollingFactory=a},1042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SourceType=t.DiscoveryType=t.Discoveries=void 0,t.Discoveries=Symbol("Discoveries"),function(e){e.CRAWLER="crawler",e.ARCHIVE="archive",e.OAS="oas"}(t.DiscoveryType||(t.DiscoveryType={})),function(e){e.OPEN_API="openapi",e.RAML="raml",e.POSTMAN="postman",e.HAR="har"}(t.SourceType||(t.SourceType={}))},8799:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoveryPolling=void 0;const r=i(5584),o=i(1879),s=i(9863),n=r.__importDefault(i(8938)),a=i(8500);t.DiscoveryPolling=class DiscoveryPolling{constructor(e,t){this.options=e,this.discoveryManager=t,this.defaultInterval=1e4,this.DEFAULT_RECONNECT_TIMES=20,this.abortController=new AbortController,this.options.timeout||(o.logger.warn('Warning: It looks like you\'ve been running polling without "timeout" option.'),o.logger.warn("The recommended way to install polling with a minimal timeout: 10-20min.")),this.options.interval&&this.options.interval<this.defaultInterval&&o.logger.warn("Warning: The minimal value for polling interval is 10 seconds.")}async start(){try{o.logger.log("Starting polling..."),this.initializePolling(),await this.runPollingLoop()}catch(e){this.handleError(e)}finally{await this.stop()}}async stop(){this.abortController.abort(),clearTimeout(this.timeoutDescriptor)}initializePolling(){this.options.timeout&&this.setTimeout()}async runPollingLoop(){for await(const e of this.poll()){if(!await this.processDiscoveryView(e))break}}handleError(e){this.abortController.signal.aborted||(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:polling"}),process.exit(1))}setTimeout(e=this.options.timeout){this.timeoutDescriptor=setTimeout((()=>{this.abortController.abort(),o.logger.log("Polling has been stopped by timeout.")}),e),o.logger.debug("The polling timeout has been set to %d ms.",e)}async*poll(){for(;!this.abortController.signal.aborted;){const e=this.createBackoff(),t=await e.execute((()=>this.discoveryManager.get(this.options.projectId,this.options.discoveryId)));yield t,await this.delay()}}isFinished(e){return e===s.DiscoveryStatus.DONE||e===s.DiscoveryStatus.STOPPED||e===s.DiscoveryStatus.DISRUPTED||e===s.DiscoveryStatus.FAILED}async delay(){var e;const t=null!==(e=this.options.interval)&&void 0!==e?e:this.defaultInterval;await(0,a.setTimeout)(t,!1,{signal:this.abortController.signal})}createBackoff(){return new o.Backoff(this.DEFAULT_RECONNECT_TIMES,(e=>n.default.isAxiosError(e)&&e.status>500||["ECONNRESET","ENETDOWN","ENETUNREACH","ETIMEDOUT","ECONNREFUSED","ENOTFOUND","EAI_AGAIN","ESOCKETTIMEDOUT"].includes(e.code)))}handleDiscoveryStatus(e){const t={[s.DiscoveryStatus.RUNNING]:"Discovery is running.",[s.DiscoveryStatus.PENDING]:"Discovery is pending.",[s.DiscoveryStatus.SCHEDULED]:"Discovery is scheduled.",[s.DiscoveryStatus.QUEUED]:"Discovery is queued.",[s.DiscoveryStatus.DONE]:"Discovery has been completed.",[s.DiscoveryStatus.STOPPED]:"Discovery has been stopped.",[s.DiscoveryStatus.DISRUPTED]:"Discovery has been disrupted.",[s.DiscoveryStatus.FAILED]:"Discovery has failed."}[e]||`Discovery status is ${e}.`;o.logger.log(t)}processDiscoveryView(e){return e?(this.handleDiscoveryStatus(e.status),!this.isFinished(e.status)||(o.logger.log(`The discovery has been finished with status: ${e.status}.`),!1)):(o.logger.log("The discovery has not been found."),!1)}}},2297:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoveryPollingFactory=void 0,t.DiscoveryPollingFactory=Symbol("DiscoveryPollingFactory")},9863:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoveryStatus=void 0,function(e){e.RUNNING="running",e.PENDING="pending",e.STOPPED="stopped",e.FAILED="failed",e.DONE="done",e.DISRUPTED="disrupted",e.SCHEDULED="scheduled",e.QUEUED="queued"}(t.DiscoveryStatus||(t.DiscoveryStatus={}))},6768:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestDiscoveries=t.RestDiscoveryOptions=void 0;const r=i(5584),o=i(1042),s=i(1879),n=i(1860),a=i(8641),c=r.__importDefault(i(8938)),p=r.__importDefault(i(7067)),l=r.__importDefault(i(4708));t.RestDiscoveryOptions=Symbol("RestDiscoveryOptions");let d=class RestDiscoveries{constructor(e,t,{baseURL:i,apiKey:r,timeout:o,insecure:s,proxyURL:n}){this.info=e,this.proxyFactory=t;const{httpAgent:a=new p.default.Agent,httpsAgent:d=new l.default.Agent({rejectUnauthorized:!s})}=n?this.proxyFactory.createProxy({proxyUrl:n,rejectUnauthorized:!s}):{};this.client=c.default.create({baseURL:i,timeout:o,httpAgent:a,httpsAgent:d,responseType:"json",headers:{authorization:`Api-Key ${r}`}})}async create(e,t){const i=await this.prepareConfig({...t});return(await this.client.post(`/api/v2/projects/${e}/discoveries`,i)).data}async rerun(e,t){return(await this.client.post(`/api/v2/projects/${e}/discoveries/${t}/rerun`)).data.id}async stop(e,t){await this.client.put(`/api/v2/projects/${e}/discoveries/${t}/lifecycle`,{action:"stop"})}async delete(e,t){await this.client.delete(`/api/v2/projects/${e}/discoveries/${t}`)}async get(e,t,i){return(await this.client.get(`/api/v2/projects/${e}/discoveries/${t}`,{signal:null==i?void 0:i.signal})).data}async prepareConfig({headers:e,...t}){return{...await this.applyDefaultSettings(t),info:{source:"cli",client:{name:"bright-cli",version:this.info.version}},headers:e?Object.entries(e).map((([e,t])=>({name:e,value:t,mergeStrategy:"replace"}))):void 0}}async applyDefaultSettings(e){var t,i;const r=(null===(t=e.exclusions)||void 0===t?void 0:t.params)||(null===(i=e.exclusions)||void 0===i?void 0:i.requests)?e.exclusions:void 0;let o=await this.exploreDiscovery(e);return o=(null==o?void 0:o.length)?o:void 0,{...e,discoveryTypes:o,exclusions:r}}async exploreDiscovery(e){const t=[],{fileId:i,crawlerUrls:r}=e;if(Array.isArray(r)&&t.push(o.DiscoveryType.CRAWLER),i)try{const{data:e}=await this.client.get(`/api/v2/files/${i}`);t.push(e.type===o.SourceType.HAR?o.DiscoveryType.ARCHIVE:o.DiscoveryType.OAS)}catch(e){throw new Error(`Error loading file with id "${i}": No such file or you do not have permissions.`)}return t}};d=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)((0,a.delay)((()=>n.CliInfo)))),r.__param(1,(0,a.inject)(s.ProxyFactory)),r.__param(2,(0,a.inject)(t.RestDiscoveryOptions)),r.__metadata("design:paramtypes",[n.CliInfo,Object,Object])],d),t.RestDiscoveries=d},512:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(1042),t),r.__exportStar(i(6768),t),r.__exportStar(i(2297),t),r.__exportStar(i(2264),t)},8174:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultHostUpdateJobStatusPollingFactory=void 0;const r=i(5584),o=i(7461),s=i(839),n=i(8641);let a=class DefaultHostUpdateJobStatusPollingFactory{constructor(e){this.entryPoints=e}create(e){return new o.HostUpdateJobStatusPolling(e,this.entryPoints)}};a=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.EntryPoints)),r.__metadata("design:paramtypes",[Object])],a),t.DefaultHostUpdateJobStatusPollingFactory=a},839:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EntryPoints=t.JobStatus=void 0,function(e){e.PENDING="pending",e.PROCESSING="processing",e.COMPLETED="completed",e.FAILED="failed"}(t.JobStatus||(t.JobStatus={})),t.EntryPoints=Symbol("EntryPoints")},7461:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HostUpdateJobStatusPolling=void 0;const r=i(5584),o=i(1879),s=i(839),n=r.__importDefault(i(8938)),a=i(8500);t.HostUpdateJobStatusPolling=class HostUpdateJobStatusPolling{constructor(e,t){this.options=e,this.entryPoints=t,this.defaultInterval=1e4,this.DEFAULT_RECONNECT_TIMES=20,this.abortController=new AbortController,this.options.timeout||(o.logger.warn('Warning: It looks like you\'ve been running polling without "timeout" option.'),o.logger.warn("The recommended way to install polling with a minimal timeout: 10-60min.")),this.options.interval&&this.options.interval<this.defaultInterval&&o.logger.warn("Warning: The minimal value for polling interval is 10 seconds.")}async start(){try{o.logger.log("Starting polling..."),this.initializePolling(),await this.runPollingLoop()}catch(e){this.handleError(e)}finally{await this.stop()}}async stop(){this.abortController.abort(),clearTimeout(this.timeoutDescriptor)}initializePolling(){this.options.timeout&&this.setTimeout()}async runPollingLoop(){for await(const e of this.poll()){if(!await this.processJobView(e))break}}handleError(e){this.abortController.signal.aborted||(o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:update-host-polling"})),process.exit(1))}setTimeout(e=this.options.timeout){this.timeoutDescriptor=setTimeout((()=>{this.abortController.abort(),o.logger.log("Polling has been stopped by timeout.")}),e),o.logger.debug("The polling timeout has been set to %d ms.",e)}async*poll(){for(;!this.abortController.signal.aborted;){const e=this.createBackoff(),t=await e.execute((()=>this.entryPoints.getHostUpdateJobStatus({jobId:this.options.jobId,projectId:this.options.projectId})));o.logger.debug("Host update job data: %j",t),yield t,await this.delay()}}isFinished(e){return e===s.JobStatus.COMPLETED||e===s.JobStatus.FAILED}async delay(){var e;const t=null!==(e=this.options.interval)&&void 0!==e?e:this.defaultInterval;await(0,a.setTimeout)(t,!1,{signal:this.abortController.signal})}createBackoff(){return new o.Backoff(this.DEFAULT_RECONNECT_TIMES,(e=>n.default.isAxiosError(e)&&e.status>500||["ECONNRESET","ENETDOWN","ENETUNREACH","ETIMEDOUT","ECONNREFUSED","ENOTFOUND","EAI_AGAIN","ESOCKETTIMEDOUT"].includes(e.code)))}handleJobStatus(e){const t={[s.JobStatus.PENDING]:"Host update job is pending.",[s.JobStatus.PROCESSING]:"Host update job is processing.",[s.JobStatus.COMPLETED]:"Host update job has been completed.",[s.JobStatus.FAILED]:"Host update job has failed."}[e]||`Host update job status is ${e}.`;o.logger.log(t)}processJobView(e){return e?(this.handleJobStatus(e.status),!this.isFinished(e.status)||(o.logger.log(`The host update job has been finished with status: ${e.status}.`),!1)):(o.logger.log("The host update job has not been found."),!1)}}},7035:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HostUpdateJobStatusPollingFactory=void 0,t.HostUpdateJobStatusPollingFactory=Symbol("HostUpdateJobStatusPollingFactory")},9:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestEntryPoints=t.RestProjectsOptions=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(8938)),n=i(8641),a=r.__importDefault(i(7067)),c=r.__importDefault(i(4708));t.RestProjectsOptions=Symbol("RestProjectsOptions");let p=class RestEntryPoints{constructor(e,{baseURL:t,apiKey:i,insecure:r,proxyURL:o,timeout:n}){this.proxyFactory=e,this.entrypointsPaginationBatchSize=50;const{httpAgent:p=new a.default.Agent,httpsAgent:l=new c.default.Agent({rejectUnauthorized:!r})}=o?this.proxyFactory.createProxy({proxyUrl:o,rejectUnauthorized:!r}):{};this.client=s.default.create({baseURL:t,timeout:n,httpAgent:p,httpsAgent:l,responseType:"json",headers:{authorization:`Api-Key ${i}`}})}async entrypoints({limit:e=10,projectId:t,...i}){let r=e;const o=[];let s,n;for(;r>0;){const{data:{items:e=[]}}=await this.client.get(`/api/v2/projects/${t}/entry-points`,{params:{nextId:s,nextCreatedAt:n,...i,limit:Math.min(r,this.entrypointsPaginationBatchSize)}});if(!e.length)break;o.push(...e),({id:s,createdAt:n}=e[e.length-1]),r-=this.entrypointsPaginationBatchSize}return o}async updateHost(e){const{projectId:t,oldHostname:i,newHostname:r,entryPointIds:o}=e,{data:s}=await this.client.post(`/api/v2/projects/${t}/entry-points/update-host`,{oldHostname:i,newHostname:r,entryPointIds:o});return s}async getHostUpdateJobStatus(e){const{jobId:t,projectId:i}=e,{data:r}=await this.client.get(`/api/v2/projects/${i}/entry-points/update-host/${t}`);return r}};p=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(o.ProxyFactory)),r.__param(1,(0,n.inject)(t.RestProjectsOptions)),r.__metadata("design:paramtypes",[Object,Object])],p),t.RestEntryPoints=p},8224:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(839),t),r.__exportStar(i(9),t)},1243:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRepeaterCommandHub=void 0;const r=i(5584),o=i(7758),s=i(1879),n=i(5721),a=i(2046),c=i(8641),p=i(8161);let l=class DefaultRepeaterCommandHub{constructor(e,t){this.virtualScripts=e,this.requestExecutors=t}compileScripts(e){this.virtualScripts.clear(o.VirtualScriptType.REMOTE),this.virtualScripts.size?s.logger.warn("Error Loading Script: Cannot accept scripts from the cloud when a local script is already loaded"):"string"==typeof e?this.virtualScripts.set("*",o.VirtualScriptType.REMOTE,e):Object.entries(e).map((([e,t])=>this.virtualScripts.set(e,o.VirtualScriptType.REMOTE,t)))}sendRequest(e){const{protocol:t}=e,i=this.requestExecutors.find((e=>e.protocol===t));if(!i)throw new Error(`Unsupported protocol "${t}"`);return i.execute(e)}testNetwork(e,t){return new Promise(((i,r)=>{const o=["configure",`--${e}`];s.logger.debug('Launching "Network Diagnostic" process with cmd: %j',o);const a=s.Helpers.spawn({include:o,exclude:["repeater"]});a.unref();const c=[];a.stdout.on("data",(e=>{const i=e.toString(),r=i.split("\n").filter((e=>e.length>0));c.push(...r);const[o,...s]=[].concat(t);i.indexOf(n.ReadlinePlatform.URLS_QUESTION)>-1&&a.stdin.write(`${[o,...s].join(",")}${p.EOL}`),i.indexOf(n.ReadlinePlatform.HOST_OR_IP_QUESTION)>-1&&a.stdin.write(`${new URL(o).hostname}${p.EOL}`),i.indexOf(n.ReadlinePlatform.COMPELED_MESSAGE)>-1&&a.stdin.end()})),a.once("error",(e=>{s.logger.warn('Failed to start "Network Diagnostic" due to %s',e.message),r(e)})),a.on("close",(e=>{if(0!==e||0===c.length){const t=`"Network Diagnostic" did not start successfully. Process exited with code ${e}`;return s.logger.warn(t),r(new Error(t))}i(this.processOutput(c))}))}))}processOutput(e){return e.filter(((e,t,i)=>!(e.endsWith("[1G")||i[t+1]&&"[1G"===i[t+1]))).filter((e=>!e.startsWith(n.ReadlinePlatform.URLS_QUESTION))).join("\n")}};l=r.__decorate([(0,c.injectable)(),r.__param(0,(0,c.inject)(o.VirtualScripts)),r.__param(1,(0,c.injectAll)(a.RequestExecutor)),r.__metadata("design:paramtypes",[Object,Array])],l),t.DefaultRepeaterCommandHub=l},8788:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRepeaterServer=t.DefaultRepeaterServerOptions=void 0;const r=i(5584),o=i(1879),s=i(1475),n=i(8641),a=r.__importDefault(i(5199)),c=r.__importDefault(i(7060)),p=i(6436),l=i(8474);t.DefaultRepeaterServerOptions=Symbol("DefaultRepeaterServerOptions");let d=class DefaultRepeaterServer{constructor(e,t){this.proxyFactory=e,this.options=t,this.MAX_DEPLOYMENT_TIMEOUT=6e4,this.MIN_RECONNECTION_DELAY=5e3,this.MAX_RECONNECTION_DELAY=1e3,this.events=new l.EventEmitter,this.handlerMap=new WeakMap,this.connectionAttempts=0,this.handleConnectionError=e=>{const{data:t}=e;t&&this.suppressConnectionError(t)&&this.events.emit("error",{...t,message:e.message}),this.scheduleReconnection()},this.handleConnect=()=>{this.connectionAttempts=0,this.clearConnectionTimer(),this.events.emit("connected")},this.handleDisconnect=e=>{"io client disconnect"!==e&&this.events.emit("disconnected"),"io server disconnect"===e&&this.socket.connect()}}get socket(){if(!this._socket)throw new Error("Please make sure that repeater established a connection with host.");return this._socket}disconnect(){var e,t;this.events.removeAllListeners(),this.clearConnectionTimer(),null===(e=this._socket)||void 0===e||e.disconnect(),null===(t=this._socket)||void 0===t||t.removeAllListeners(),this._socket=void 0}async deploy(e,t){process.nextTick((()=>this.socket.emit("deploy",e,t)));const[i]=await Promise.race([(0,l.once)(this.socket,"deployed"),new Promise(((e,t)=>setTimeout(t,this.MAX_DEPLOYMENT_TIMEOUT,new Error("No response.")).unref()))]);return i}async connect(e){var t;this._socket=(0,a.default)(this.options.uri,{parser:c.default,path:"/api/ws/v1",transports:["websocket"],reconnectionDelayMax:this.MAX_RECONNECTION_DELAY,reconnectionDelay:this.MIN_RECONNECTION_DELAY,timeout:null===(t=this.options)||void 0===t?void 0:t.connectTimeout,rejectUnauthorized:!this.options.insecure,agent:this.options.proxyUrl?this.proxyFactory.createProxyForClient({proxyUrl:this.options.proxyUrl,targetUrl:this.options.uri,rejectUnauthorized:!this.options.insecure}):void 0,auth:{token:this.options.token,domain:e}}),this.listenToReservedEvents(),this.listenToApplicationEvents(),await(0,l.once)(this.socket,"connect"),o.logger.debug("Repeater connected to %s",this.options.uri)}off(e,t){const i=this.handlerMap.get(t);i&&(this.events.off(e,i),this.handlerMap.delete(t))}on(e,t){const wrappedHandler=(...i)=>this.wrapEventListener(e,t,...i);this.handlerMap.set(t,wrappedHandler),this.events.on(e,wrappedHandler)}listenToApplicationEvents(){this.socket.on("deployed",(e=>this.events.emit("deploy",e))),this.socket.on("request",((e,t)=>this.events.emit("request",e,t))),this.socket.on("test-network",((e,t)=>this.events.emit("test_network",e,t))),this.socket.on("error",(e=>{(0,p.captureMessage)(e.message),this.events.emit("error",e)})),this.socket.on("update-available",(e=>this.events.emit("update_available",e))),this.socket.on("scripts-updated",(e=>this.events.emit("scripts_updated",e))),this.socket.on("limits",(e=>this.events.emit("limits",e)))}listenToReservedEvents(){this.socket.on("connect",this.handleConnect),this.socket.on("connect_error",this.handleConnectionError),this.socket.on("disconnect",this.handleDisconnect),this.socket.io.on("reconnect",(()=>{this.latestReconnectionError=void 0})),this.socket.io.on("reconnect_error",(e=>this.latestReconnectionError=e)),this.socket.io.on("reconnect_failed",(()=>this.events.emit("reconnection_failed",{error:this.latestReconnectionError}))),this.socket.io.on("reconnect_attempt",(e=>this.events.emit("reconnect_attempt",{attempt:e}))),this.socket.io.on("reconnect",(()=>this.events.emit("reconnection_succeeded")))}suppressConnectionError(e){return[s.RepeaterErrorCodes.REPEATER_UNAUTHORIZED,s.RepeaterErrorCodes.REPEATER_NOT_PERMITTED].includes(e.code)}scheduleReconnection(){let e=Math.max(this.MIN_RECONNECTION_DELAY*2**this.connectionAttempts,this.MIN_RECONNECTION_DELAY);e+=.3*e*Math.random(),e=Math.min(e,this.MAX_RECONNECTION_DELAY),this.connectionAttempts++,this.events.emit("reconnect_attempt",{attempt:this.connectionAttempts}),this.connectionTimer=setTimeout((()=>this.socket.connect()),e)}async wrapEventListener(e,t,...i){try{const e=this.extractLastArgument(i),r=await t(...i);null==e||e(r)}catch(t){this.handleEventError(t,e,i)}}extractLastArgument(e){const t=e.pop();return"function"==typeof t?t:void e.push(t)}clearConnectionTimer(){this.connectionTimer&&clearTimeout(this.connectionTimer)}handleEventError(e,t,i){(0,p.captureException)(e),o.logger.debug("An error occurred while processing the %s event with the following payload: %j",t,i),o.logger.error(e)}};d=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(o.ProxyFactory)),r.__param(1,(0,n.inject)(t.DefaultRepeaterServerOptions)),r.__metadata("design:paramtypes",[Object,Object])],d),t.DefaultRepeaterServer=d},8553:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRuntimeDetector=void 0;const r=i(5584),o=i(1860),s=r.__importDefault(i(1184)),n=i(8641),a=r.__importDefault(i(9267)),c=i(1421),p=r.__importDefault(i(8161));let l=class DefaultRuntimeDetector{constructor(e){this.cliInfo=e}distribution(){return this.cliInfo.distribution}isInsideDocker(){return!!process.env.BRIGHT_CLI_DOCKER}nodeVersion(){return process.version}ci(){var e;return null!==(e=a.default.name)&&void 0!==e?e:void 0}arch(){try{return(0,s.default)()}catch{}return p.default.arch()}os(){const e=p.default.platform();return"darwin"===e?this.detectMacosVersion():"linux"===e?this.detectLinuxVersion():"win32"===e?this.detectWindowsVersion():`${p.default.platform()} (${p.default.release()})`}detectMacosVersion(){try{const e=(0,c.execSync)("sw_vers -productName",{encoding:"utf8"}).trim(),t=(0,c.execSync)("sw_vers -productVersion",{encoding:"utf8"}).trim(),i=(0,c.execSync)("sw_vers -buildVersion",{encoding:"utf8"}).trim();if(e.length&&t.length&&i.length)return`${e} ${t} (${i})`}catch{}return`${p.default.platform()} (${p.default.release()})`}detectLinuxVersion(){try{const e=(0,c.execSync)("cat /etc/os-release",{encoding:"utf8"}).trim(),extractValue=t=>{var i;return null===(i=new RegExp(`(?:^|[\r\n]+)${t}(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*"(?:\\\\"|[^"])*"|\\s*\`(?:\\\\\`|[^\`])*\`|[^#\r\n]+)?`,"i").exec(e))||void 0===i?void 0:i[1].replace(/^(['"`])([\s\S]*)\1$/i,"$2")},t=extractValue("NAME")||extractValue("ID"),i=extractValue("VERSION")||extractValue("VERSION_ID"),r=extractValue("PRETTY_NAME");if(t.length&&i.length)return`${t} ${i}`;if(r.length)return r}catch{}return`${p.default.platform()} (${p.default.release()})`}detectWindowsVersion(){try{const e=(0,c.execSync)("ver",{encoding:"utf8"}).trim();if(e.length)return e}catch{}return`${p.default.platform()} (${p.default.release()})`}};l=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)((0,n.delay)((()=>o.CliInfo)))),r.__metadata("design:paramtypes",[o.CliInfo])],l),t.DefaultRuntimeDetector=l},868:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkTestType=void 0,function(e){e.PING="ping",e.TRACEROUTE="traceroute"}(t.NetworkTestType||(t.NetworkTestType={}))},9912:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RepeaterCommandHub=void 0,t.RepeaterCommandHub=Symbol("RepeaterCommandHub")},9888:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RepeaterLauncher=void 0,t.RepeaterLauncher=Symbol("RepeaterLauncher")},1475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RepeaterServer=t.RepeaterErrorCodes=void 0,function(e){e.REPEATER_NOT_PERMITTED="repeater_not_permitted",e.REPEATER_ALREADY_STARTED="repeater_already_started",e.REPEATER_DEACTIVATED="repeater_deactivated",e.REPEATER_UNAUTHORIZED="repeater_unauthorized",e.REPEATER_NO_LONGER_SUPPORTED="repeater_no_longer_supported",e.UNKNOWN_ERROR="unknown_error",e.UNEXPECTED_ERROR="unexpected_error"}(t.RepeaterErrorCodes||(t.RepeaterErrorCodes={})),t.RepeaterServer=Symbol("RepeaterServer")},6520:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeDetector=void 0,t.RuntimeDetector=Symbol("RuntimeDetector")},4171:(e,t,i)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ServerRepeaterLauncher=void 0;const o=i(5584),s=i(1475),n=i(6520),a=i(7758),c=i(9369),p=i(2046),l=i(1879),d=i(1860),u=i(9912),h=i(8641),f=o.__importDefault(i(6895)),m=i(6436);let y=r=class ServerRepeaterLauncher{constructor(e,t,i,r,o,s,n,a,c){this.runtimeDetector=e,this.virtualScripts=t,this.repeaterServer=i,this.startupManager=r,this.commandHub=o,this.certificates=s,this.scriptLoader=n,this.requestExecutorOptions=a,this.info=c,this.repeaterRunning=!1,this.handleError=({code:e,message:t,remediation:i})=>{const r=this.normalizeMessage(t),o=this.normalizeMessage(null!=i?i:"");this.isCriticalError(e)?this.handleCriticalError(r,o):l.logger.error(r)},this.deployRepeater=async()=>{try{await this.repeaterServer.deploy({repeaterId:this.repeaterId},this.getRuntime()),l.logger.log("The Repeater (%s) started",this.info.version)}catch{}},this.reconnectionFailed=({error:e})=>{(0,m.captureException)(e),l.logger.error(e),this.close().catch(l.logger.error),process.exitCode=1},this.testingNetwork=async e=>{try{return{output:await this.commandHub.testNetwork(e.type,e.input)}}catch(e){return{error:"string"==typeof e?e:e.message}}},this.limitsReceived=e=>{l.logger.debug("Limits received: %i",e.maxBodySize),this.requestExecutorOptions.maxBodySize=e.maxBodySize},this.requestReceived=async e=>{const t=await this.commandHub.sendRequest(new p.Request({...e})),{statusCode:i,message:r,errorCode:o,body:s,headers:n,protocol:a,encoding:c}=t;return{protocol:a,body:s,headers:n,statusCode:i,errorCode:o,message:r,encoding:c}}}close(){return this.repeaterRunning=!1,this.repeaterServer.disconnect(),Promise.resolve()}async install(){const{command:e,args:t}=l.Helpers.getExecArgs({escape:!1,include:["--run"],exclude:["--daemon","-d"]});await this.startupManager.install({command:e,args:t,name:r.SERVICE_NAME,displayName:"Bright Repeater"}),l.logger.log("A Repeater daemon process was initiated successfully (SERVICE: %s)",r.SERVICE_NAME)}loadCerts(e){return this.certificates.load(e)}loadScripts(e){return this.scriptLoader.load(e)}async uninstall(){await this.startupManager.uninstall(r.SERVICE_NAME),l.logger.log("The Repeater daemon process (SERVICE: %s) was stopped and deleted successfully",r.SERVICE_NAME)}async run(e,t=!1){this.repeaterRunning||(this.repeaterRunning=!0,(0,m.setTag)("bridge_id",e),t&&await this.startupManager.run((()=>this.close())),l.logger.log("Starting the Repeater (%s)...",this.info.version),this.repeaterId=e,this.subscribeToEvents(),await this.repeaterServer.connect(this.repeaterId))}getRuntime(){return{version:this.info.version,scriptsLoaded:!!this.virtualScripts.size,ci:this.runtimeDetector.ci(),os:this.runtimeDetector.os(),arch:this.runtimeDetector.arch(),docker:this.runtimeDetector.isInsideDocker(),distribution:this.runtimeDetector.distribution(),nodeVersion:this.runtimeDetector.nodeVersion()}}subscribeToEvents(){this.repeaterServer.on("connected",this.deployRepeater),this.repeaterServer.on("error",this.handleError),this.repeaterServer.on("reconnection_failed",this.reconnectionFailed),this.repeaterServer.on("request",this.requestReceived),this.repeaterServer.on("limits",this.limitsReceived),this.repeaterServer.on("test_network",this.testingNetwork),this.repeaterServer.on("scripts_updated",(e=>this.commandHub.compileScripts(e.script))),this.repeaterServer.on("update_available",(e=>l.logger.warn("%s: A new Repeater version (%s) is available, for update instruction visit https://docs.brightsec.com/docs/installation-options",f.default.yellow("(!) IMPORTANT"),e.version))),this.repeaterServer.on("reconnect_attempt",(({attempt:e})=>l.logger.warn("Failed to connect to Bright cloud (attempt %d)",e))),this.repeaterServer.on("reconnection_succeeded",(()=>l.logger.log("The Repeater (%s) connected",this.info.version)))}normalizeMessage(e){return e.replace(/\.$/,"")}isCriticalError(e){return[s.RepeaterErrorCodes.REPEATER_DEACTIVATED,s.RepeaterErrorCodes.REPEATER_NO_LONGER_SUPPORTED,s.RepeaterErrorCodes.REPEATER_UNAUTHORIZED,s.RepeaterErrorCodes.REPEATER_ALREADY_STARTED,s.RepeaterErrorCodes.REPEATER_NOT_PERMITTED,s.RepeaterErrorCodes.UNEXPECTED_ERROR].includes(e)}handleCriticalError(e,t){l.logger.error("%s: %s. %s",f.default.red("(!) CRITICAL"),e,t),this.close().catch(l.logger.error),process.exitCode=1}};y.SERVICE_NAME="bright-repeater",y=r=o.__decorate([(0,h.injectable)(),o.__param(0,(0,h.inject)(n.RuntimeDetector)),o.__param(1,(0,h.inject)(a.VirtualScripts)),o.__param(2,(0,h.inject)(s.RepeaterServer)),o.__param(3,(0,h.inject)(c.StartupManager)),o.__param(4,(0,h.inject)(u.RepeaterCommandHub)),o.__param(5,(0,h.inject)(p.Certificates)),o.__param(6,(0,h.inject)(a.ScriptLoader)),o.__param(7,(0,h.inject)(p.RequestExecutorOptions)),o.__param(8,(0,h.inject)((0,h.delay)((()=>d.CliInfo)))),o.__metadata("design:paramtypes",[Object,Object,Object,Object,Object,Object,Object,Object,d.CliInfo])],y),t.ServerRepeaterLauncher=y},8914:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(9912),t),r.__exportStar(i(1243),t),r.__exportStar(i(868),t),r.__exportStar(i(8788),t),r.__exportStar(i(9888),t),r.__exportStar(i(1475),t),r.__exportStar(i(4171),t),r.__exportStar(i(6520),t),r.__exportStar(i(8553),t)},7412:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Certificates=void 0,t.Certificates=Symbol("Certificates")},3348:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CertificatesCache=void 0,t.CertificatesCache=Symbol("CertificatesCache")},1667:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CertificatesLoader=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(953)),n=r.__importDefault(i(4708)),a=i(1455);t.CertificatesLoader=class CertificatesLoader{constructor(){this.CERT_FILES=["/etc/ssl/certs/ca-certificates.crt","/etc/pki/tls/certs/ca-bundle.crt","/etc/ssl/ca-bundle.pem","/etc/pki/tls/cacert.pem","/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem","/etc/ssl/cert.pem"]}async load(e){const t="win32"===process.platform;try{t?(0,s.default)():"string"==typeof e?await this.loadCertsFromFile(e):await this.discoveryDefaultLocations()}catch{o.logger.warn(`Error Loading Certificate: Cannot load certificates from ${t?"Trusted Root Certification Authorities Certificate Store":e}.`)}}async discoveryDefaultLocations(){for(const e of this.CERT_FILES)try{return void await this.loadCertsFromFile(e)}catch{}o.logger.warn("Error Loading Certificate: Cannot load certificates from the system root. Please use --cacert option to specify the accurate path to the file. https://docs.brightsec.com/docs/initializing-the-repeater#options")}async loadCertsFromFile(e){const t=await(0,a.readFile)(e,"utf8");n.default.globalAgent.options.ca=t.split(/-----END CERTIFICATE-----\n?/).filter((e=>!!e)).map((e=>`${e}-----END CERTIFICATE-----\n`))}}},2514:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CertificatesResolver=void 0,t.CertificatesResolver=Symbol("CertificatesResolver")},1609:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCertificatesCache=void 0;const r=i(5584),o=i(1879),s=i(8641);let n=class DefaultCertificatesCache{constructor(){this.cache=new Map}add(e,t){const i=this.certificateCacheKeyFromRequest(e);this.cache.has(i)||this.cache.set(i,t)}get(e){return this.cache.get(this.certificateCacheKeyFromRequest(e))}certificateCacheKeyFromRequest(e){const t=new URL(e.url);return`${t.hostname}_${o.Helpers.portFromURL(t)}`}};n=r.__decorate([(0,s.injectable)()],n),t.DefaultCertificatesCache=n},9945:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCertificatesResolver=void 0;const r=i(5584),o=i(8718),s=i(3348),n=i(8641);let a=class DefaultCertificatesResolver{constructor(e){this.certificatesCache=e}resolve(e,t){const i=this.certificatesCache.get(e);if(i)return[i];const r=new URL(e.url),s=o.Helpers.portFromURL(r);return t.filter((e=>this.matchHostnameAndPort(r.hostname,s,e)))}matchHostnameAndPort(e,t,i){return!(i.hostname!==e&&!o.Helpers.wildcardToRegExp(i.hostname).test(e))&&(!i.port||i.port===t)}};a=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.CertificatesCache)),r.__metadata("design:paramtypes",[Object])],a),t.DefaultCertificatesResolver=a},9846:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestExecutor=void 0;const r=i(5584),o=i(1795),s=i(4479),n=i(1879),a=i(7758),c=i(5232),p=i(18),l=i(7084),d=i(3348),u=i(2514),h=i(8641),f=r.__importDefault(i(7868)),m=i(7331),y=i(3136),g=r.__importDefault(i(7067)),b=r.__importDefault(i(4708)),v=i(8474),_=i(8522);let w=class HttpRequestExecutor{constructor(e,t,i,r,o){if(this.virtualScripts=e,this.proxyFactory=t,this.options=i,this.certificatesCache=r,this.certificatesResolver=o,this.DEFAULT_SCRIPT_ENTRYPOINT="handle",this.options.proxyUrl&&({httpsAgent:this.httpsProxyAgent,httpAgent:this.httpProxyAgent}=this.proxyFactory.createProxy({proxyUrl:this.options.proxyUrl})),this.options.reuseConnection){const e={keepAlive:!0,maxSockets:100,timeout:this.options.timeout};this.httpsAgent=new b.default.Agent(e),this.httpAgent=new g.default.Agent(e)}if(this.options.proxyDomains&&this.options.proxyDomainsBypass)throw new Error("cannot use both proxyDomains and proxyDomainsBypass at the same time");this.options.proxyDomains&&(this.proxyDomains=this.options.proxyDomains.map((e=>n.Helpers.wildcardToRegExp(e)))),this.options.proxyDomainsBypass&&(this.proxyDomainsBypass=this.options.proxyDomainsBypass.map((e=>n.Helpers.wildcardToRegExp(e))))}get protocol(){return c.Protocol.HTTP}async execute(e){var t;try{this.options.headers&&e.setHeaders(this.options.headers),e=await this.transformScript(e);const t=this.options.certs?this.certificatesResolver.resolve(e,this.options.certs):void 0;return void 0===t||0===t.length?(n.logger.debug("Executing HTTP request with following params: %j",e),await this.executeRequest(e)):await this.tryRequestWithCertificates(e,t)}catch(i){const{cause:r}=i,{message:s,code:a,syscall:c,name:p}=null!=r?r:i,l=null!==(t=null!=a?a:c)&&void 0!==t?t:p;return n.logger.error('Error executing request: "%s %s HTTP/1.1"',e.method,e.url),n.logger.error("Cause: %s",s),new o.Response({message:s,errorCode:l,protocol:this.protocol})}}async request(e){let t,i;try{const r=this.createRequest(e);process.nextTick((()=>r.end(e.encoding?f.default.encode(e.body,e.encoding):e.body))),t=this.setTimeout(r,e.timeout),[i]=await(0,v.once)(r,"response")}finally{clearTimeout(t)}return this.truncateResponse(e,i)}createRequest(e){const t=(e.secureEndpoint?b.default:g.default).request(this.createRequestOptions(e));return this.setHeaders(t,e),t.hasHeader("accept-encoding")||t.setHeader("accept-encoding","gzip, deflate"),t}setTimeout(e,t){if(null!=t||(t=this.options.timeout),"number"==typeof t)return setTimeout((()=>e.destroy(Object.assign(new Error("Waiting response has timed out"),{code:"ETIMEDOUT"}))),t)}createRequestOptions(e){var t;const{auth:i,hostname:r,port:o,hash:s="",pathname:n="/",search:a=""}=(0,y.parse)(e.url);return{hostname:r,port:o,path:`${null!=n?n:"/"}${null!=a?a:""}${null!=s?s:""}`,auth:i,agent:this.getRequestAgent(e),timeout:null!==(t=e.timeout)&&void 0!==t?t:this.options.timeout,ca:e.ca,pfx:e.pfx,passphrase:e.passphrase,method:e.method,rejectUnauthorized:!1}}getRequestAgent(e){var t,i;return this.proxyDomains&&!this.proxyDomains.some((t=>t.test((0,y.parse)(e.url).hostname)))?(n.logger.debug("Not using proxy for URL '%s'",e.url),e.secureEndpoint?this.httpsAgent:this.httpAgent):this.proxyDomainsBypass&&this.proxyDomainsBypass.some((t=>t.test((0,y.parse)(e.url).hostname)))?(n.logger.debug("Bypassing proxy for URL '%s'",e.url),e.secureEndpoint?this.httpsAgent:this.httpAgent):e.secureEndpoint?null!==(t=this.httpsProxyAgent)&&void 0!==t?t:this.httpsAgent:null!==(i=this.httpProxyAgent)&&void 0!==i?i:this.httpAgent}async truncateResponse({decompress:e,encoding:t,maxContentSize:i,url:r},o){var s;if(this.responseHasNoBody(o))return n.logger.debug("The response does not contain any body."),{res:o,body:""};const a=this.parseContentType(o),{type:c}=a,p=null===(s=this.options.whitelistMimes)||void 0===s?void 0:s.find((e=>c.startsWith(e.type))),l=p?this.options.maxBodySize:1024*(null!=i?i:this.options.maxContentLength),{body:d,transform:u}=await this.parseBody(o,{decompress:e,allowTruncation:!p||p.allowTruncation,maxSize:l});return u&&p&&n.logger.error("The original response body for URL %s was %s because it exceeded the maximum allowed size of %i bytes.",r,u,l),o.headers["content-length"]=d.byteLength.toFixed(),e&&delete o.headers["content-encoding"],{res:o,body:f.default.decode(d,null!=t?t:a.encoding)}}parseContentType(e){const t=e.headers["content-type"]||"application/octet-stream",{type:i,parameters:{charset:r}}=(0,m.safeParse)(t);let o=r;return o&&f.default.encodingExists(o)||(o="utf-8"),{type:i,encoding:o}}unzipBody(e){let t=e;if(!this.responseHasNoBody(e)){let i=e.headers["content-encoding"]||"identity";i=i.trim().toLowerCase();const r={flush:_.constants.Z_SYNC_FLUSH,finishFlush:_.constants.Z_SYNC_FLUSH};switch(i){case"gzip":t=e.pipe((0,_.createGunzip)(r));break;case"deflate":t=e.pipe(new l.NormalizeZlibDeflateTransformStream).pipe((0,_.createInflate)(r));break;case"br":t=e.pipe((0,_.createBrotliDecompress)())}}return t}responseHasNoBody(e){return"HEAD"===e.method||e.statusCode>=100&&e.statusCode<200||204===e.statusCode||304===e.statusCode}async parseBody(e,t){const i=[],r=t.decompress?this.unzipBody(e):e;for await(const e of r)i.push(e);let o=Buffer.concat(i),s=!1;if(o.byteLength>t.maxSize){const e=this.truncateBody(o,t);o=e.body,s=e.transform}return{body:o,transform:s}}truncateBody(e,t){return t.allowTruncation?(n.logger.debug("Truncate original response body to %i bytes",t.maxSize),{body:e.subarray(0,t.maxSize),transform:"truncated"}):(n.logger.debug("Omit original response body because body is bigger than %i bytes",t.maxSize),{body:Buffer.alloc(0),transform:"omitted"})}setHeaders(e,t){var i;const r=Object.getOwnPropertySymbols(e).find((e=>["Symbol(kOutHeaders)","Symbol(outHeadersKey)"].includes(e.toString())));if(!e.headersSent&&r&&t.headers){const o=e[r]=null!==(i=e[r])&&void 0!==i?i:Object.create(null);Object.entries(t.headers).forEach((([e,t])=>{e&&(o[e.toLowerCase()]=[e.toLowerCase(),null!=t?t:""])}))}t.keepAlive||e.setHeader("Connection","close")}async transformScript(e){const{hostname:t}=new URL(e.url),i=this.virtualScripts.find(t);if(!i)return e;const r=await i.exec(this.DEFAULT_SCRIPT_ENTRYPOINT,{...e.toJSON(),body:e.encoding?f.default.encode(e.body,e.encoding).toString():e.body});return new s.Request(r)}async executeRequest(e){const{res:t,body:i}=await this.request(e);return n.logger.trace("received following response for request %j: headers: %j body: %s",{url:e.url,protocol:this.protocol,method:e.method},{statusCode:t.statusCode,headers:t.headers},i.slice(0,500).concat(i.length>500?"...":"")),new o.Response({body:i,protocol:this.protocol,statusCode:t.statusCode,headers:t.headers,encoding:e.encoding})}tryRequestWithCertificates(e,t){const i=t.map((async t=>{n.logger.debug("Executing HTTP request with following params: %j",e);try{await e.loadCert(t);const i=await this.executeRequest(e);return this.certificatesCache.add(e,t),i}catch(e){const i=n.Helpers.isTlsCertError(e)?`Failed to do successful request with certificate ${t.path}. It will be excluded from list of known certificates.`:`Unexpected error occured during request: ${e}`;throw n.logger.warn(i),e}}));return Promise.any(i)}};w=r.__decorate([(0,h.injectable)(),r.__param(0,(0,h.inject)(a.VirtualScripts)),r.__param(1,(0,h.inject)(n.ProxyFactory)),r.__param(2,(0,h.inject)(p.RequestExecutorOptions)),r.__param(3,(0,h.inject)(d.CertificatesCache)),r.__param(4,(0,h.inject)(u.CertificatesResolver)),r.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],w),t.HttpRequestExecutor=w},5232:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Protocol=void 0,function(e){e.HTTP="http",e.WS="ws"}(t.Protocol||(t.Protocol={}))},4479:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Request=void 0;const r=i(1879),o=i(1455),s=i(6760),n=i(1692);class Request{constructor({protocol:e,method:t,url:i,body:r,ca:o,pfx:s,passphrase:n,timeout:a,correlationIdRegex:c,maxContentSize:p,encoding:l,decompress:d=!0,headers:u={},keepAlive:h}){var f;this.protocol=e,this._method=null!==(f=null==t?void 0:t.toUpperCase())&&void 0!==f?f:"GET",this.validateUrl(i),this.url=i.trim(),this.precheckBody(r),this.body=r,this.correlationIdRegex=this.normalizeCorrelationIdRegex(c),this.setHeaders(u),s&&(this._pfx=Buffer.from(s)),o&&(this._ca=Buffer.from(o)),this._passphrase=n,this.encoding=l,this.timeout=a,this.maxContentSize=p,this.decompress=!!d,this.keepAlive=h}get method(){return this._method}get headers(){return this._headers}get ca(){return this._ca}get pfx(){return this._pfx}get passphrase(){return this._passphrase}get secureEndpoint(){return this.url.startsWith("https")}setHeaders(e){const t={...this._headers,...e};this._headers=Object.entries(t).reduce(((e,[t,i])=>(e[t]=Array.isArray(i)&&Request.SINGLE_VALUE_HEADERS.has(t.toLowerCase())?i.join(", "):i,e)),{})}async loadCert({path:e,passphrase:t}){let i;try{i=await(0,o.readFile)(e)}catch(t){r.logger.warn(`Warning: certificate ${e} not found.`)}const n=(0,s.extname)(e),a=(0,s.basename)(e);switch(n){case".pem":case".crt":case".ca":this._ca=i;break;case".pfx":this.assertPassphrase(a,i,t),this._pfx=i,this._passphrase=t;break;default:r.logger.warn(`Warning: certificate of type "${n}" does not support.`)}}toJSON(){var e,t;return{protocol:this.protocol,url:this.url,body:this.body,method:this._method,headers:this._headers,passphrase:this._passphrase,ca:null===(e=this._ca)||void 0===e?void 0:e.toString("utf8"),pfx:null===(t=this._pfx)||void 0===t?void 0:t.toString("utf8"),correlationIdRegex:this.correlationIdRegex}}validateUrl(e){try{new URL(e)}catch{throw new Error("Invalid URL.")}}precheckBody(e){if(e&&"string"!=typeof e)throw new Error("Body must be string.")}normalizeCorrelationIdRegex(e){if(e)try{return new RegExp(e,"i")}catch{throw new Error("Correlation id must be regular expression.")}}assertPassphrase(e,t,i){try{(0,n.createSecureContext)({passphrase:i,pfx:t})}catch(t){r.logger.warn(`Error Loading Certificate: Wrong passphrase for certificate ${e}.`)}}}t.Request=Request,Request.SINGLE_VALUE_HEADERS=new Set(["authorization","content-disposition","content-length","content-type","from","host","if-modified-since","if-unmodified-since","location","max-forwards","proxy-authorization","referer","user-agent"])},9878:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestExecutor=void 0,t.RequestExecutor=Symbol("RequestExecutor")},18:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestExecutorOptions=void 0,t.RequestExecutorOptions=Symbol("RequestExecutorOptions")},1795:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Response=void 0;t.Response=class Response{constructor({protocol:e,statusCode:t,headers:i,body:r,message:o,errorCode:s,encoding:n}){this.protocol=e,this.statusCode=t,this.headers=i,this.body=r,this.errorCode=s,this.message=o,this.encoding=n}}},1560:(e,t,i)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WsRequestExecutor=void 0;const o=i(5584),s=i(1795),n=i(5232),a=i(1879),c=i(18),p=i(3348),l=i(2514),d=i(8641),u=o.__importDefault(i(5086)),h=i(8474),f=i(7975);let m=r=class WsRequestExecutor{constructor(e,t,i,r){this.proxyFactory=e,this.options=t,this.certificatesCache=i,this.certificatesResolver=r,this.options.proxyUrl&&({httpsAgent:this.httpsProxyAgent,httpAgent:this.httpProxyAgent}=this.proxyFactory.createProxy({proxyUrl:this.options.proxyUrl}))}get protocol(){return n.Protocol.WS}async execute(e){var t,i;try{const t=this.options.certs?this.certificatesResolver.resolve(e,this.options.certs):void 0;return void 0===t||0===t.length?(a.logger.debug("Executing WS request with following params: %j",e),await this.executeRequest(e)):await this.tryRequestWithCertificates(e,t)}catch(r){const o=null!==(t=r.info)&&void 0!==t?t:r.message,n=null!==(i=r.code)&&void 0!==i?i:r.syscall;return a.logger.error("Error executing request: %s",e.url),a.logger.error("Cause: %s",o),new s.Response({message:o,errorCode:n,protocol:this.protocol})}}setTimeout(e){const t=setTimeout((()=>e.emit("error",Object.assign(new Error("Waiting frame has timed out"),{code:"ETIMEDOUT"}))),this.options.timeout);return t.unref(),t}async consume(e,t){const i=await Promise.race([this.waitForResponse(e,t),(0,h.once)(e,"close")]);let r;if(i.length){const[e,t]=i;r={body:"string"==typeof e?e:t,code:"number"==typeof e?e:void 0}}return r}waitForResponse(e,t){return new Promise((i=>{e.on("message",(e=>{const r=String(e);(!t||t.test(r))&&i([r])}))}))}async connect(e){const[,t]=await Promise.all([(0,h.once)(e,"open"),(0,h.once)(e,"upgrade")]),[i]=t;return i}normalizeHeaders(e){return Object.entries(e).reduce(((e,[t,i])=>{const o=t.trim().toLowerCase();return r.FORBIDDEN_HEADERS.has(o)||(e[t]=i),e}),{})}async executeRequest(e){var t;let i,r;try{r=new u.default(e.url,{agent:e.secureEndpoint?this.httpsProxyAgent:this.httpProxyAgent,rejectUnauthorized:!1,handshakeTimeout:this.options.timeout,headers:this.normalizeHeaders(e.headers),ca:e.ca,pfx:e.pfx,passphrase:e.passphrase});const o=await this.connect(r);await(0,f.promisify)(r.send.bind(r))(e.body),i=this.setTimeout(r);const n=await this.consume(r,e.correlationIdRegex);return new s.Response({protocol:this.protocol,statusCode:null!==(t=n.code)&&void 0!==t?t:o.statusCode,headers:o.headers,body:n.body})}finally{i&&clearTimeout(i),(null==r?void 0:r.readyState)===u.default.OPEN&&r.close(1e3)}}tryRequestWithCertificates(e,t){const i=t.map((async t=>{a.logger.debug("Executing HTTP request with following params: %j",e);try{await e.loadCert(t);const i=await this.executeRequest(e);return this.certificatesCache.add(e,t),i}catch(e){const i=a.Helpers.isTlsCertError(e)?`Failed to do successful request with certificate ${t.path}. It will be excluded from list of known certificates.`:`Unexpected error occured during request: ${e}`;throw a.logger.warn(i),e}}));return Promise.any(i)}};m.FORBIDDEN_HEADERS=new Set(["sec-websocket-version","sec-websocket-key"]),m=r=o.__decorate([(0,d.injectable)(),o.__param(0,(0,d.inject)(a.ProxyFactory)),o.__param(1,(0,d.inject)(c.RequestExecutorOptions)),o.__param(2,(0,d.inject)(p.CertificatesCache)),o.__param(3,(0,d.inject)(l.CertificatesResolver)),o.__metadata("design:paramtypes",[Object,Object,Object,Object])],m),t.WsRequestExecutor=m},2046:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(9878),t),r.__exportStar(i(18),t),r.__exportStar(i(9846),t),r.__exportStar(i(1560),t),r.__exportStar(i(1795),t),r.__exportStar(i(4479),t),r.__exportStar(i(5232),t),r.__exportStar(i(7412),t),r.__exportStar(i(1667),t),r.__exportStar(i(3348),t),r.__exportStar(i(2514),t)},7831:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasePolling=void 0;const r=i(5584),o=i(2217),s=i(1879),n=r.__importDefault(i(8938)),a=i(4589);t.BasePolling=class BasePolling{constructor(e,t,i){this.options=e,this.scanManager=t,this.breakpoint=i,this.defaultInterval=1e4,this.DEFAULT_RECONNECT_TIMES=20,this._active=!0,this.options.timeout||(s.logger.warn('Warning: It looks like you\'ve been running polling without "timeout" option.'),s.logger.warn("The recommended way to install polling with a minimal timeout: 10-20min.")),this.options.interval&&this.options.interval<this.defaultInterval&&s.logger.warn("Warning: The minimal value for polling interval is 10 seconds."),(0,a.ok)(i,"You should choose a breakpoint for polling.")}get active(){return this._active}async start(){try{s.logger.log("Starting polling..."),this.options.timeout&&this.setTimeout();for await(const e of this.poll())await this.breakpoint.execute(e)}finally{await this.stop()}}async stop(){this._active||s.logger.log("Polling has been terminated by timeout."),this._active=!1,clearTimeout(this.timeoutDescriptor)}setTimeout(e=this.options.timeout){this.timeoutDescriptor=setTimeout((()=>this._active=!1),e),s.logger.debug("The polling timeout has been set to %d ms.",e)}async*poll(){for(;this.active;){await this.delay();const e=this.createBackoff(),t=await e.execute((()=>this.scanManager.status(this.options.scanId)));if(this.isRedundant(t.status))break;yield t}}isRedundant(e){return e===o.ScanStatus.DONE||e===o.ScanStatus.STOPPED||e===o.ScanStatus.DISRUPTED||e===o.ScanStatus.FAILED}delay(){var e;const t=null!==(e=this.options.interval)&&void 0!==e?e:this.defaultInterval;return new Promise((e=>setTimeout(e,t)))}createBackoff(){return new s.Backoff(this.DEFAULT_RECONNECT_TIMES,(e=>n.default.isAxiosError(e)&&e.status>500||["ECONNRESET","ENETDOWN","ENETUNREACH","ETIMEDOUT","ECONNREFUSED","ENOTFOUND","EAI_AGAIN","ESOCKETTIMEDOUT"].includes(e.code)))}}},7496:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakpoint=void 0;t.Breakpoint=class Breakpoint{async execute(e){this.isExcepted(e)&&this.breakOn(e)}}},3120:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointFactory=void 0,t.BreakpointFactory=Symbol("BreakpointFactory")},1008:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointType=void 0,function(e){e.ANY="any",e.MEDIUM_ISSUE="medium_issue",e.HIGH_ISSUE="high_issue",e.CRITICAL_ISSUE="critical_issue"}(t.BreakpointType||(t.BreakpointType={}))},4264:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointException=void 0;class BreakpointException extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}t.BreakpointException=BreakpointException},7352:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnSeverity=void 0;const r=i(7496),o=i(4264),s=i(7024);class OnSeverity extends r.Breakpoint{constructor(e){var t;super(),this.severity=e,this.breakSeverities=null!==(t=s.severityRanges.get(e))&&void 0!==t?t:[]}breakOn(){throw new o.BreakpointException(`Bright CLI found a first ${this.severity} issue.`)}isExcepted(e){return this.breakSeverities.some((t=>e[`numberOf${t}SeverityIssues`]>0))}}t.OnSeverity=OnSeverity},360:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnSeverity=t.BreakpointException=void 0;var r=i(4264);Object.defineProperty(t,"BreakpointException",{enumerable:!0,get:function(){return r.BreakpointException}});var o=i(7352);Object.defineProperty(t,"OnSeverity",{enumerable:!0,get:function(){return o.OnSeverity}})},7980:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultBreakpointFactory=void 0;const r=i(5584),o=i(360),s=i(1008),n=i(7024),a=i(8641);let c=class DefaultBreakpointFactory{create(e){switch(e){case s.BreakpointType.ANY:return new o.OnSeverity(n.Severity.LOW);case s.BreakpointType.HIGH_ISSUE:return new o.OnSeverity(n.Severity.HIGH);case s.BreakpointType.MEDIUM_ISSUE:return new o.OnSeverity(n.Severity.MEDIUM);case s.BreakpointType.CRITICAL_ISSUE:return new o.OnSeverity(n.Severity.CRITICAL);default:return null}}};c=r.__decorate([(0,a.injectable)()],c),t.DefaultBreakpointFactory=c},2625:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultPollingFactory=void 0;const r=i(5584),o=i(2217),s=i(7831),n=i(3120),a=i(8641);let c=class DefaultPollingFactory{constructor(e,t){this.scans=e,this.breakpointFactory=t}create(e){const t=this.breakpointFactory.create(e.breakpoint);return new s.BasePolling(e,this.scans,t)}};c=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)(o.Scans)),r.__param(1,(0,a.inject)(n.BreakpointFactory)),r.__metadata("design:paramtypes",[Object,Object])],c),t.DefaultPollingFactory=c},7032:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingFactory=void 0,t.PollingFactory=Symbol("PollingFactory")},6499:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestScans=t.RestScansOptions=void 0;const r=i(5584),o=i(2217),s=i(1860),n=i(1879),a=i(8641),c=r.__importDefault(i(8938)),p=r.__importDefault(i(7067)),l=r.__importDefault(i(4708));t.RestScansOptions=Symbol("RestScansOptions");let d=class RestScans{constructor(e,t,{baseURL:i,apiKey:r,insecure:o,proxyURL:s,timeout:n}){this.info=e,this.proxyFactory=t;const{httpAgent:a=new p.default.Agent,httpsAgent:d=new l.default.Agent({rejectUnauthorized:!o})}=s?this.proxyFactory.createProxy({proxyUrl:s,rejectUnauthorized:!o}):{};this.client=c.default.create({baseURL:i,timeout:n,httpAgent:a,httpsAgent:d,responseType:"json",headers:{authorization:`Api-Key ${r}`}})}async create(e){const t=await this.prepareScanConfig({...e});return(await this.client.post("/api/v1/scans",t)).data}async retest(e){return(await this.client.post(`/api/v1/scans/${e}/retest`)).data.id}async status(e){return(await this.client.get(`/api/v1/scans/${e}`)).data}async stop(e){await this.client.get(`/api/v1/scans/${e}/stop`)}async delete(e){await this.client.delete(`/api/v1/scans/${e}`)}async prepareScanConfig({headers:e,...t}){const i=await this.applyDefaultSettings(t);return{...this.replaceDeprecatedAttackParamLocations(i),info:{source:"cli",client:{name:"bright-cli",version:this.info.version}},headers:e?Object.entries(e).map((([e,t])=>({name:e,value:t,mergeStrategy:"replace"}))):void 0}}async exploreDiscovery(e){const t=[],{fileId:i,crawlerUrls:r}=e;if(Array.isArray(r)&&t.push(o.Discovery.CRAWLER),i)try{const{data:e}=await this.client.get(`/api/v2/files/${i}`);t.push(e.type===o.SourceType.HAR?o.Discovery.ARCHIVE:o.Discovery.OAS)}catch(e){throw new Error(`Error loading file with id "${i}": No such file or you do not have permissions.`)}return t}async applyDefaultSettings(e){var t,i,r;const s=null!==(t=e.attackParamLocations)&&void 0!==t?t:e.templateId?void 0:[...o.ATTACK_PARAM_LOCATIONS_DEFAULT],n=(null===(i=e.exclusions)||void 0===i?void 0:i.params)||(null===(r=e.exclusions)||void 0===r?void 0:r.requests)?e.exclusions:void 0;let a=await this.exploreDiscovery(e);return a=(null==a?void 0:a.length)?a:void 0,{...e,attackParamLocations:s,discoveryTypes:a,exclusions:n}}replaceDeprecatedAttackParamLocations(e){var t,i,r,s;return(null===(t=e.attackParamLocations)||void 0===t?void 0:t.includes(o.AttackParamLocation.ARTIFICAL_FRAGMENT))&&(e.attackParamLocations=e.attackParamLocations.filter((e=>e!==o.AttackParamLocation.ARTIFICAL_FRAGMENT)),(null===(i=e.attackParamLocations)||void 0===i?void 0:i.includes(o.AttackParamLocation.ARTIFICIAL_FRAGMENT))||(e.attackParamLocations=[...e.attackParamLocations,o.AttackParamLocation.ARTIFICIAL_FRAGMENT])),(null===(r=e.attackParamLocations)||void 0===r?void 0:r.includes(o.AttackParamLocation.ARTIFICAL_QUERY))&&(e.attackParamLocations=e.attackParamLocations.filter((e=>e!==o.AttackParamLocation.ARTIFICAL_QUERY)),(null===(s=e.attackParamLocations)||void 0===s?void 0:s.includes(o.AttackParamLocation.ARTIFICIAL_QUERY))||(e.attackParamLocations=[...e.attackParamLocations,o.AttackParamLocation.ARTIFICIAL_QUERY])),e}};d=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)((0,a.delay)((()=>s.CliInfo)))),r.__param(1,(0,a.inject)(n.ProxyFactory)),r.__param(2,(0,a.inject)(t.RestScansOptions)),r.__metadata("design:paramtypes",[s.CliInfo,Object,Object])],d),t.RestScans=d},2217:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Scans=t.SourceType=t.ScanStatus=t.Module=t.ATTACK_PARAM_LOCATIONS_DEFAULT=t.AttackParamLocation=t.Discovery=void 0,function(e){e.CRAWLER="crawler",e.ARCHIVE="archive",e.OAS="oas"}(t.Discovery||(t.Discovery={})),function(e){e.ARTIFICAL_FRAGMENT="artifical-fragment",e.ARTIFICAL_QUERY="artifical-query",e.ARTIFICIAL_FRAGMENT="artificial-fragment",e.ARTIFICIAL_QUERY="artificial-query",e.BODY="body",e.FRAGMENT="fragment",e.HEADER="header",e.PATH="path",e.QUERY="query"}(i=t.AttackParamLocation||(t.AttackParamLocation={})),t.ATTACK_PARAM_LOCATIONS_DEFAULT=[i.BODY,i.FRAGMENT,i.QUERY],function(e){e.DAST="dast",e.FUZZER="fuzzer"}(t.Module||(t.Module={})),function(e){e.RUNNING="running",e.PENDING="pending",e.STOPPED="stopped",e.FAILED="failed",e.DONE="done",e.DISRUPTED="disrupted",e.SCHEDULED="scheduled",e.QUEUED="queued"}(t.ScanStatus||(t.ScanStatus={})),function(e){e.OPEN_API="openapi",e.RAML="raml",e.POSTMAN="postman",e.HAR="har"}(t.SourceType||(t.SourceType={})),t.Scans=Symbol("Scans")},7024:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.severityRanges=t.Severity=void 0,function(e){e.MEDIUM="Medium",e.HIGH="High",e.LOW="Low",e.CRITICAL="Critical"}(i=t.Severity||(t.Severity={})),t.severityRanges=new Map(Object.values(i).map((e=>{switch(e){case i.CRITICAL:return[e,[i.CRITICAL]];case i.HIGH:return[e,[i.HIGH,i.CRITICAL]];case i.MEDIUM:return[e,[i.MEDIUM,i.HIGH,i.CRITICAL]];case i.LOW:return[e,Object.values(i)]}})))},523:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(3120),t),r.__exportStar(i(7980),t),r.__exportStar(i(7032),t),r.__exportStar(i(2625),t),r.__exportStar(i(796),t),r.__exportStar(i(2217),t),r.__exportStar(i(1008),t),r.__exportStar(i(7496),t),r.__exportStar(i(360),t),r.__exportStar(i(6499),t),r.__exportStar(i(7024),t)},6454:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultVirtualScripts=void 0;const r=i(5584),o=i(7354),s=i(1879),n=i(8641);let a=class DefaultVirtualScripts{constructor(){this.store=new Map}get size(){return this.store.size}[Symbol.iterator](){return this.store[Symbol.iterator]()}clear(e){e?this.store.forEach((t=>{t.type===e&&this.delete(t.id)})):this.store.clear()}delete(e){return this.store.delete(e)}entries(){return this.store.entries()}find(e){return[...this.store.values()].find((t=>s.Helpers.wildcardToRegExp(t.id).test(e)))}keys(){return this.store.keys()}set(e,t,i){const r=new o.VirtualScript(e,t,i);return this.store.set(r.id,r),r.compile(),this}values(){return this.store.values()}};a=r.__decorate([(0,n.injectable)()],a),t.DefaultVirtualScripts=a},9311:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FSScriptLoader=void 0;const r=i(5584),o=i(993),s=i(1879),n=i(7354),a=i(8641),c=i(1455);let p=class FSScriptLoader{constructor(e){this.virtualScripts=e}async load(e){await Promise.all(Object.entries(e).map((([e,t])=>this.loadScript(e,t))))}async loadScript(e,t){let i;try{i=await(0,c.readFile)(t,{encoding:"utf8"})}catch(e){throw s.logger.debug(`Cannot load ${t}. Error: ${e.message}`),new Error(`Error Loading Script: Cannot load ${t}`)}this.virtualScripts.set(e,n.VirtualScriptType.LOCAL,i)}};p=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)(o.VirtualScripts)),r.__metadata("design:paramtypes",[Object])],p),t.FSScriptLoader=p},8576:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptLoader=void 0,t.ScriptLoader=Symbol("ScriptLoader")},7354:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualScript=t.VirtualScriptType=void 0;const r=i(5584),o=i(714),s=r.__importDefault(i(8995)),n=i(6760);var a;!function(e){e.LOCAL="local",e.REMOTE="remote"}(a=t.VirtualScriptType||(t.VirtualScriptType={}));t.VirtualScript=class VirtualScript{constructor(e,t,i){if(this.MODULE_EXEC_ARGS=["module.exports","module.require","module","__filename","__dirname"],!e)throw new Error("ID must be declared explicitly.");if(this.id=e,!t)throw new Error(`Type might accept one of the following values: ${Object.values(a).join(", ")}.`);if(this.type=t,!i)throw new Error("Code must be declared explicitly.");this.script=new o.Script(this.wrapScriptCode(i),{filename:e})}compile(){const e=new s.default(this.id);return this.context=(0,o.createContext)({module:e,__filename:(0,n.join)(this.id,process.cwd()),__dirname:process.cwd()}),this}async exec(e,...t){this.script.runInContext(this.context,{timeout:100});const{exports:i={}}=this.context.module,r=i[e];if("function"!=typeof r)throw new Error(`Error Loading Script: Script ${this.id} does not match expected format, missing function ${e}.`);return r(...t)}wrapScriptCode(e){const t=s.default.wrap(e.replace(/[\u200B-\u200D\uFEFF]/g,""));return`${t.slice(0,t.length-1)}(${this.MODULE_EXEC_ARGS.join(",")})`}}},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualScripts=void 0,t.VirtualScripts=Symbol("VirtualScripts")},7758:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(7354),t),r.__exportStar(i(9311),t),r.__exportStar(i(8576),t),r.__exportStar(i(993),t),r.__exportStar(i(6454),t)},9068:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultStartupManager=void 0;const r=i(756),o=i(7975);t.DefaultStartupManager=class DefaultStartupManager{async install({name:e,...t}){await(0,o.promisify)(r.add)(e,t),await(0,o.promisify)(r.enable)(e)}async run(e){(0,r.run)((()=>this.exit(0,e)))}async uninstall(e){try{await(0,o.promisify)(r.disable)(e)}catch{}try{await(0,o.promisify)(r.remove)(e)}catch{}}async exit(e,t){await(null==t?void 0:t()),(0,r.stop)(e)}}},2149:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartupManager=void 0,t.StartupManager=Symbol("StartupManager")},6324:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9369:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(9068),t),r.__exportStar(i(2149),t),r.__exportStar(i(6324),t)},5927:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Backoff=void 0;const r=i(5599),o=i(8500);t.Backoff=class Backoff{constructor(e,t){this.maxDepth=e,this.shouldRetry=t,this.depth=0}async execute(e){var t;try{return await e()}catch(i){if((null===(t=this.shouldRetry)||void 0===t?void 0:t.call(this,i))&&this.depth<this.maxDepth)return this.retry(e);throw i}}async retry(e){const t=Math.max(2**this.depth*100,1e3);return r.logger.warn("Failed to connect, retrying in %d second (attempt %d/%d)",Math.round(t/1e3),this.depth+1,this.maxDepth),await(0,o.setTimeout)(t),this.depth++,this.execute(e)}}},0:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultProxyFactory=void 0;const r=i(8398),o=i(1973),s=i(2216);t.DefaultProxyFactory=class DefaultProxyFactory{createProxy({proxyUrl:e,rejectUnauthorized:t=!1}){let i;try{({protocol:i}=new URL(e))}catch(t){throw new Error(`Invalid Proxy URL: '${e}'. Please provide a valid URL.`)}switch(i){case"http:":case"https:":return this.createHttpProxy(e,t);case"socks:":case"socks4:":case"socks4a:":case"socks5:":case"socks5h:":return this.createSocksProxy(e);default:throw new Error(`Unsupported proxy protocol: '${i.replace(":","")}'. Please use a supported protocol (HTTP(S), SOCKS4, or SOCKS5).`)}}createProxyForClient({targetUrl:e,...t}){const i=this.createProxy(t);let r;try{({protocol:r}=new URL(e))}catch(t){throw new Error(`Invalid Target URL: '${e}'. Please contact support at support@brightsec.com`)}switch(r){case"http:":case"ws:":return i.httpAgent;case"https:":case"wss:":return i.httpsAgent;default:throw new Error(`Proxy not supported for protocol '${r}'. Please contact support at support@brightsec.com`)}}createHttpProxy(e,t){return{httpsAgent:new r.PatchedHttpsProxyAgent(e,{rejectUnauthorized:t}),httpAgent:new o.HttpProxyAgent(e,{rejectUnauthorized:t})}}createSocksProxy(e){const t=new s.SocksProxyAgent(e);return{httpAgent:t,httpsAgent:t}}}},7918:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessageFactory=void 0;const r=i(8938);t.ErrorMessageFactory=class ErrorMessageFactory{static genericCommandError(e){const t=this.getTitle(e),i=this.extractErrorDetails(e);return this.formatFinalMessage(t,i)}static formatFinalMessage(e,t){return t?`${e}: ${t}.`:`${e}.`}static getTitle(e){return"message"in e?e.message:`Error during "${e.command}"`}static extractErrorDetails(e){var t,i;return"string"==typeof e.error?e.error:(0,r.isAxiosError)(e.error)&&"string"==typeof(null===(t=e.error.response)||void 0===t?void 0:t.data)?e.error.response.data:null!==(i=e.error.error||e.error.message)&&void 0!==i?i:null}}},8718:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Helpers=void 0;const r=i(4589),o=i(1421),s=i(6760);class Helpers{static isUUID(e){return(0,r.ok)(e,"Value must be string"),this.UUID_PATTERN.test(e)}static isShortUUID(e){return(0,r.ok)(e,"Value must be string"),this.SHORT_UUID_PATTERN.test(e)}static getClusterUrls(e){var t;let i,r;const o=null!==(t=e.cluster)&&void 0!==t?t:e.hostname;if(o){let e=o;try{({host:e}=new URL(o))}catch{}["localhost","127.0.0.1"].includes(e)?(r=`http://${e}:8000`,i=`ws://${e}:8000/workstations`):(r=`https://${e}`,i=`wss://${e}/workstations`)}else r="https://app.brightsec.com",i="wss://app.brightsec.com/workstations";return{api:r,repeaterServer:i}}static spawn(e={detached:!1}){const{command:t,args:i,windowsVerbatimArguments:r,shell:s}=Helpers.getExecArgs({spawn:!0,excludeAll:!0,include:e.include,exclude:e.exclude});return(0,o.spawn)(t,i,{shell:s,windowsVerbatimArguments:r,detached:!s&&e.detached,windowsHide:s&&e.detached})}static getExecArgs(e){e={escape:!0,excludeAll:!1,spawn:!1,...null!=e?e:{}};let t=process.argv.slice(1);e.excludeAll&&(t=t.slice(0,1)),e.include&&(t=[...t,...e.include]),e.exclude&&(t=t.filter((t=>!e.exclude.includes(t)))),t=[...process.execArgv,...t].filter((t=>!(process.pkg&&!e.spawn)||!t.startsWith(process.pkg.entrypoint)));let i=(0,s.normalize)(process.execPath);const r=this.win(),o=r&&e.escape;return o&&(i=`"${i}"`,t=t.map(this.escapeShellArgument,this)),{args:t,shell:r,command:i,windowsVerbatimArguments:o}}static async pool(e,t,i){const r=[],o=[];for(const s of t){const t=i(s);r.push(t);const n=t.then((()=>{o.splice(o.indexOf(n),1)}));o.push(n),o.length>=e&&await Promise.race(o)}return Promise.all(r)}static wildcardToRegExp(e){return new RegExp(`^${e.split(/\*+/).map(this.regExpEscape).join(".*")}$`)}static selectEnumValue(e,t){return Object.values(e).find((e=>e.toLowerCase().trim()===t.toLowerCase().trim()))}static omit(e){return Object.entries(e).reduce(((e,[t,i])=>null==i?e:{...e,[t]:i}),{})}static split(e,t){(0,r.ok)(Array.isArray(e),"First argument must be an instance of Array.");const i=Math.ceil(e.length/t);return Array(i).fill(null).map(((i,r)=>e.slice(r*t,r*t+t)))}static toArray(e){return[...Object.values(e)]}static parseHeaders(e=[]){return(0,r.ok)(Array.isArray(e),"First argument must be an instance of Array."),e.reduce(((e,t)=>{const[i,r]=this.parseHeader(t);return{...e,[i]:r}}),{})}static portFromURL(e){return e.port||("http:"===e.protocol?"80":"https:"===e.protocol?"443":"")}static isTlsCertError(e){const t=e;return!!t.code&&(!("string"!=typeof t.code||!t.code.startsWith("ERR_TLS_")&&"ECONNRESET"!==t.code)||!!Helpers.OPENSSL_CODES.has(t.code))}static escapeShellArgument(e){return(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(this.META_CHARS_REGEXP,"^$1")}static parseHeader(e){if((0,r.ok)("string"==typeof e,"First argument must be an instance of String."),e){const[t,...i]=e.split(":");return[t,i.join(":")].map((e=>decodeURIComponent(e.trim())))}}static win(){return"win32"===process.platform}static regExpEscape(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}}t.Helpers=Helpers,Helpers.UUID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Helpers.SHORT_UUID_PATTERN=/^[1-9a-z]{10,22}$/i,Helpers.META_CHARS_REGEXP=/([()\][%!^"`<>&|;, *?])/g,Helpers.OPENSSL_CODES=new Set(["CERT_HAS_EXPIRED","CERT_NOT_YET_VALID","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_GET_ISSUER_CERT","HOSTNAME_MISMATCH","CERT_REJECTED","CERT_UNTRUSTED"])},5599:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.Logger=t.LogLevel=void 0;const r=i(5584).__importDefault(i(6895)),o=i(6960),s=i(7975),n=i(9896),a=i(6928);var c;!function(e){e[e.SILENT=0]="SILENT",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.NOTICE=3]="NOTICE",e[e.VERBOSE=4]="VERBOSE",e[e.TRACE=5]="TRACE"}(c=t.LogLevel||(t.LogLevel={}));class Logger{constructor(e=c.NOTICE,t,i={}){var r,o;this.MAX_FORMATTED_LEVEL_LENGTH=Object.keys(c).sort(((e,t)=>e.length-t.length)).slice(0).pop().length,this._logLevel=e,this._logOptions={maxSize:i.maxSize||"10MB",maxFiles:null!==(r=i.maxFiles)&&void 0!==r?r:5,interval:i.interval||"1d",compress:null!==(o=i.compress)&&void 0!==o?o:"gzip"},t&&(this.logFile=t)}static getInstance(){return Logger.instance||(Logger.instance=new Logger),Logger.instance}static configure(e=c.NOTICE,t,i={}){var r,o;const s=Logger.getInstance();return s._logLevel=e,s._logOptions={maxSize:i.maxSize||"10MB",maxFiles:null!==(r=i.maxFiles)&&void 0!==r?r:5,interval:i.interval||"1d",compress:null!==(o=i.compress)&&void 0!==o?o:"gzip"},t&&(s.logFile=t),s}get logLevel(){return this._logLevel}set logLevel(e){this._logLevel=e}get logFile(){return this._logPath}set logFile(e){if(this._logFile&&"end"in this._logFile&&this._logFile.end(),this._logFile=void 0,this._logPath=void 0,e){const t=(0,a.dirname)(e);(0,n.existsSync)(t)||(0,n.mkdirSync)(t,{recursive:!0}),this._logFile=(0,o.createStream)(e,{size:this._logOptions.maxSize,interval:this._logOptions.interval,compress:this._logOptions.compress,maxFiles:this._logOptions.maxFiles,rotate:1}),this._logPath=e}}error(e,t,...i){if(this.logLevel<c.ERROR)return;let o;if("string"==typeof e)arguments.length>1&&i.unshift(t),o=e;else{const r=e;o=t||r.message,r.stack&&i.push(`\n${r.stack}`)}const s=this.formatMessage("ERROR",o,i);this._logFile||this.writeToStderr(r.default.red(s)),this.writeToFile(s)}warn(e,...t){if(this.logLevel<c.WARN)return;const i=this.formatMessage("WARN",e,t);this._logFile||this.writeToStdout(r.default.yellow(i)),this.writeToFile(i)}log(e,...t){if(this.logLevel<c.NOTICE)return;const i=this.formatMessage("NOTICE",e,t);this._logFile||this.writeToStdout(r.default.green(i)),this.writeToFile(i)}debug(e,...t){if(this.logLevel<c.VERBOSE)return;const i=this.formatMessage("VERBOSE",e,t);this._logFile||this.writeToStdout(r.default.cyan(i)),this.writeToFile(i)}trace(e,...t){if(this.logLevel<c.TRACE)return;const i=this.formatMessage("TRACE",e,t);this._logFile||this.writeToStdout(r.default.cyan(i)),this.writeToFile(i)}formatMessage(e,t,i){const r=(0,s.format)(t,...i),o=e.toUpperCase().padEnd(this.MAX_FORMATTED_LEVEL_LENGTH," ");return`${(new Date).toISOString()} [${o}] ${r}`}writeToFile(e){if(this._logFile)try{this._logFile.write(`${e}\n`)}catch(e){}}writeToStdout(e){process.stdout.write(`${e}\n`)}writeToStderr(e){process.stderr.write(`${e}\n`)}}t.Logger=Logger,t.logger=Logger.getInstance()},7084:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NormalizeZlibDeflateTransformStream=void 0;const r=i(7075);class NormalizeZlibDeflateTransformStream extends r.Transform{constructor(){super(...arguments),this.hasCheckedHead=!1,this.header=Buffer.from([120,156])}_transform(e,t,i){this.hasCheckedHead||0===e.length||(0!==e.compare(this.header,0,1,0,1)&&this.push(this.header,t),this.hasCheckedHead=!0),this.push(e,t),i()}}t.NormalizeZlibDeflateTransformStream=NormalizeZlibDeflateTransformStream},8398:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PatchedHttpsProxyAgent=void 0;const r=i(3688),o=Symbol("tlsUpgradeOptions");class PatchedHttpsProxyAgent extends r.HttpsProxyAgent{constructor(e,t){super(e,t),this[o]=t}connect(e,t){return super.connect(e,{...this[o],...t})}}t.PatchedHttpsProxyAgent=PatchedHttpsProxyAgent},796:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1289:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyFactory=void 0,t.ProxyFactory=Symbol("ProxyFactory")},7565:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Traceroute=t.Protocol=void 0;const r=i(5584),o=i(8718),s=i(5599),n=r.__importDefault(i(8176)),a=r.__importDefault(i(1314)),c=i(1553),p=i(8474),l=i(7030);var d=i(8176);Object.defineProperty(t,"Protocol",{enumerable:!0,get:function(){return d.Protocol}});const u=Symbol("Stop"),h={amountProbes:3,maximumHops:64,timeoutInMillis:3e3,reverseLookup:!0,protocol:n.default.Protocol.ICMP,packetSize:52,outStream:process.stdout};t.Traceroute=class Traceroute{constructor(e,t={}){this.destinationIp=e,this.icmpSocket=n.default.createSocket({protocol:n.default.Protocol.ICMP}),this.resolver=new c.Resolver,this.subject=new p.EventEmitter,this.port=33433,this.ttl=1,this.probes=0;const i=t.maximumHops||h.maximumHops;this.options={...h,...o.Helpers.omit(t),...i>255||i<1?{maximumHops:h.maximumHops}:{maximumHops:i}},this.destinationHostname=this.destinationIp,this.icmpSocket.on("error",(e=>this.emitError(e))),this.icmpSocket.on("message",(async(e,t)=>{const i=this.parseIdFromIcmpMessage(e);if(s.logger.debug("Received ICMP %s bytes (message: %s) from %s:%s",e.length,e.toString("hex"),t,i),i===this.port){const e=await this.getHostName(t);this.handleReply(t,e)}}))}async execute(){if(!(0,l.isIP)(this.destinationIp))try{this.destinationIp=(await this.resolver.resolve(this.destinationHostname,"A"))[0]}catch(e){s.logger.debug("Cannot resolve the following hostname: %s. Error: %s",this.destinationHostname,e)}process.stdout.write(`traceroute to ${this.destinationHostname} (${this.destinationIp}), ${this.options.maximumHops} hops max, ${this.options.packetSize} byte packets`),this.options.protocol===n.default.Protocol.UDP?(this.udpSocket=a.default.createSocket("udp4"),this.udpSocket.on("error",(e=>this.emitError(e))),this.udpSocket.bind((()=>this.sendPacket()))):setImmediate((()=>this.sendPacket()));const[e]=await(0,p.once)(this.subject,u);return this.abort(),e}abort(){this.udpSocket&&this.udpSocket.close(),this.icmpSocket.close()}async getHostName(e){if(this.options.reverseLookup)try{const[t]=await this.resolver.reverse(e);return t}catch(t){s.logger.debug("Cannot reverse the following IP address: %s. Error: %s",e,t)}}sendPacket(){this.probes>=this.options.amountProbes&&(this.probes=0,this.ttl++),this.probes++;const e=this.createPingRequest(0,0,++this.port,this.options.packetSize);if(this.udpSocket){try{this.udpSocket.setTTL(this.ttl)}catch(e){return void this.emitError(e)}this.udpSocket.send(e,0,e.length,this.port,this.destinationIp,this.afterSend.bind(this))}else this.icmpSocket.setOption(n.default.SocketLevel.IPPROTO_IP,n.default.SocketOption.IP_TTL,this.ttl),this.icmpSocket.send(e,0,e.length,this.destinationIp,this.afterSend.bind(this))}parseIdFromIcmpMessage(e){let t=20;const i=e.readUInt8(t);if(3===i||4===i||5===i||11===i){const i=t+8;if(e.length-i<20||64!=(240&e.readUInt8(i)))return;const r=4*(15&e.readUInt8(i));if(e.length-i-r<8)return;t=i+r}return e.readUInt16BE(t+6)}afterSend(e){e?this.emitError(e):this.timeout=setTimeout((()=>this.handleReply()),this.options.timeoutInMillis)}handleReply(e,t){this.clearTimeout();const i=this.ttl.toFixed().padStart(3," ");if(e){const r=`${(process.hrtime(this.startTime)[1]/1e6).toFixed(3)} ms`;e===this.previousIP?process.stdout.write(` ${r} `):1===this.probes?process.stdout.write(`\n${i} ${t||e} (${e}) ${r} `):process.stdout.write(`\n${Array(i.length).fill(" ").join("")} ${t||e} (${e}) ${r} `)}else process.stdout.write(1===this.probes?`\n${i} * `:"* ");if(this.probes===this.options.amountProbes&&(e===this.destinationIp||this.ttl>=this.options.maximumHops))return process.stdout.write("\n"),void this.subject.emit(u,{reached:e===this.destinationIp});this.previousIP=e,setImmediate((()=>this.sendPacket()))}createPingRequest(e,t,i,r=0){const o=[...[e||8,0,0,0,this.secondByte(t),this.firstByte(t),this.secondByte(i),this.firstByte(i)],...Array(r).fill(255)],s=Buffer.from(o);return n.default.writeChecksum(s,2,n.default.createChecksum(s)),s}firstByte(e){return 255&e}secondByte(e){return(65280&e)>>8}clearTimeout(){this.timeout&&clearTimeout(this.timeout)}emitError(e){this.subject.emit("error",e)}}},1879:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(5927),t),r.__exportStar(i(0),t),r.__exportStar(i(7918),t),r.__exportStar(i(8718),t),r.__exportStar(i(5599),t),r.__exportStar(i(1289),t),r.__exportStar(i(7565),t)},3112:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AuthConnectivity=void 0;const r=i(5584),o=i(3857),s=i(1879),n=i(6743),a=r.__importDefault(i(8938)),c=i(8641),p=i(3136);let l=class AuthConnectivity{constructor(e){this.tokens=e,this.type=o.TestType.AUTH,this.CONNECTION_TIMEOUT=1e4}async test(e){const{repeaterId:t,authToken:i}=this.tokens.readTokens();try{const{data:r}=await a.default.get((0,p.resolve)(e.toString(),`/api/v1/repeaters/${t}`),{timeout:this.CONNECTION_TIMEOUT,headers:{Authorization:`api-key ${i}`}});return s.logger.debug("Authentication test successful with repeater ID: %s",r.id),r.id===t}catch(e){return!a.default.isAxiosError(e)||401!==e.status&&403!==e.status&&404!==e.status?s.logger.debug("Authentication test failed: %s",e.message):s.logger.debug("Authentication test failed with repeater ID: %s",t),!1}}};l=r.__decorate([(0,c.injectable)(),r.__param(0,(0,c.inject)(n.Tokens)),r.__metadata("design:paramtypes",[Object])],l),t.AuthConnectivity=l},4210:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Connectivity=void 0,t.Connectivity=Symbol("Connectivity")},3628:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectivityAnalyzer=void 0,t.ConnectivityAnalyzer=Symbol("ConnectivityAnalyzer")},5965:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultConnectivityAnalyzer=t.ConnectivityUrls=void 0;const r=i(5584),o=i(4210),s=i(1879),n=i(8027),a=i(8641);t.ConnectivityUrls=Symbol("ConnectivityUrls");let c=class DefaultConnectivityAnalyzer{constructor(e,t,i){this.urls=e,this.opt=t,this.connectivityTestRegistry=i}async verifyAccess(e,t){s.logger.debug("Calling connectivity status test with type %s",e);const i=this.connectivityTestRegistry.find((t=>t.type===e));if(!i)throw new Error("Selected test is not support.");return i.test(null!=t?t:this.urls.get(i.type),this.opt)}};c=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)(t.ConnectivityUrls)),r.__param(1,(0,a.inject)(n.Options)),r.__param(2,(0,a.injectAll)(o.Connectivity)),r.__metadata("design:paramtypes",[Map,Object,Array])],c),t.DefaultConnectivityAnalyzer=c},4178:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTTPConnectivity=void 0;const r=i(5584),o=i(1879),s=i(3857),n=i(8641),a=r.__importDefault(i(4708)),c=r.__importDefault(i(7067)),p=i(8474);let l=class HTTPConnectivity{constructor(){this.type=s.TestType.HTTP,this.CONNECTION_TIMEOUT=1e4,this.FACTORY_REGISTRY=new Map([["http:",c.default],["https:",a.default]])}async test({port:e,hostname:t,protocol:i}){const r=this.FACTORY_REGISTRY.get(i).request({port:e,hostname:t,method:"GET",rejectUnauthorized:!1,timeout:this.CONNECTION_TIMEOUT});try{return r.once("timeout",(()=>r.destroy(new Error("Reached timeout.")))),process.nextTick((()=>r.end())),await(0,p.once)(r,"response"),o.logger.debug("Http connectivity test. The connection is successful."),!0}catch(e){return o.logger.debug("Http connectivity test. The connection failed: %s",e.message),!1}finally{r.aborted||r.destroy()}}};l=r.__decorate([(0,n.injectable)()],l),t.HTTPConnectivity=l},5356:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TracerouteConnectivity=void 0;const r=i(5584),o=i(1879),s=i(3857),n=i(8641);let a=class TracerouteConnectivity{constructor(){this.type=s.TestType.TRACEROUTE}async test(e,t){var i,r;const s=new o.Traceroute(e,{maximumHops:null===(i=null==t?void 0:t.traceroute)||void 0===i?void 0:i.maxTTL,amountProbes:null===(r=null==t?void 0:t.traceroute)||void 0===r?void 0:r.probes});try{const{reached:e}=await s.execute();return o.logger.debug("Traceroute test has been finished."),e}catch(e){return o.logger.debug("Traceroute test has been failed: %s",e.stack),!1}}};a=r.__decorate([(0,n.injectable)()],a),t.TracerouteConnectivity=a},7977:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(3112),t),r.__exportStar(i(4210),t),r.__exportStar(i(3628),t),r.__exportStar(i(5965),t),r.__exportStar(i(4178),t),r.__exportStar(i(5356),t)},2371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AUTH_TOKEN_VALIDATION_REGEXP=void 0,t.AUTH_TOKEN_VALIDATION_REGEXP=/^[A-Za-z0-9+/=]{7}\.nex[ap]\.[A-Za-z0-9+/=]{32}$/},2916:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FSTokens=void 0;const r=i(5584),o=i(1879),s=i(8641),n=i(8161),a=i(3024),c=i(6760);let p=class FSTokens{constructor(){this.baseDir=(0,n.homedir)()}writeTokens(e){o.logger.debug("Saving tokens to file %s",this.path),(0,a.writeFileSync)(this.path,JSON.stringify(e))}readTokens(){for(const e of[this.path,this.legacyPath])if(o.logger.debug("Reading saved tokens from file %s",e),(0,a.existsSync)(e)){o.logger.debug("File found. Return the tokens.");const t=(0,a.readFileSync)(e);return JSON.parse(t.toString("utf8"))}o.logger.debug("File doesn't exist.")}get path(){return(0,c.join)(this.baseDir,".bright-cli")}get legacyPath(){return(0,c.join)(this.baseDir,".nexploit-cli")}};p=r.__decorate([(0,s.injectable)()],p),t.FSTokens=p},8027:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Options=void 0,t.Options=Symbol("Options")},8534:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Platform=void 0,t.Platform=Symbol("Platform")},3367:(e,t,i)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadlinePlatform=void 0;const o=i(5584),s=i(2371),n=i(7977),a=i(1879),c=i(3857),p=i(6743),l=i(8641),d=o.__importDefault(i(481)),u=i(8161);let h=r=class ReadlinePlatform{constructor(e,t,i){this.urls=e,this.tokens=t,this.connectivityService=i,this.delimiter=`${u.EOL}\r--${u.EOL}`}async start(e){this.rl=d.default.createInterface({input:process.stdin,output:process.stdout}),(null==e?void 0:e.traceroute)?await this.processTraceroute():await this.configure(e),console.log(this.delimiter),console.log(r.COMPELED_MESSAGE)}async stop(){this.rl.close()}async configure(e){(null==e?void 0:e.ping)||(console.log(`Welcome to the Bright Network Testing wizard!${u.EOL}`),console.log("Note: To run the test, you will require a `Repeater ID` and an `Repeater Token` with the correct scopes."),console.log("If you are running the configuration as part of a POC, both of these should have been sent to you via your sales contact."),process.stdout.write(u.EOL),await this.requestTokens(),console.log(this.delimiter),await this.processExternalCommunication(),console.log(this.delimiter)),await this.processPing()}async requestTokens(){const e=await this.question("Please enter your Repeater ID"),t=await this.question("Please enter your Repeater API Token");process.stdout.write(u.EOL),t&&s.AUTH_TOKEN_VALIDATION_REGEXP.test(t)?e?await this.tokens.writeTokens({repeaterId:e,authToken:t}):console.error("Invalid value for repeater id"):console.error("Invalid value for authentication token")}processConnectivity(e){const t=this.urls.get(e);return this.process(`Validating the ${e} connection to ${t.toString()}`,(()=>this.connectivityService.verifyAccess(e,t)))}async processExternalCommunication(){console.log(`Starting EXTERNAL communication diagnostics:${u.EOL}`),await this.processConnectivity(c.TestType.HTTP),await this.process("Verifying provided Token and Repeater ID",(()=>this.connectivityService.verifyAccess(c.TestType.AUTH))),process.stdout.write(u.EOL),console.log("EXTERNAL communication diagnostics completed.")}async processPing(){console.log(`Next step is to validate the connection to your INTERNAL (local) target application(s).${u.EOL}`);const e=this.getDelimitedInput(await this.question(r.URLS_QUESTION),",");console.log(this.delimiter),console.log(r.INTERNAL_DIAGNOSTIC);let t=0;await a.Helpers.pool(250,e,(e=>this.process(`Trying to reach ${e}`,(async()=>{const i=await this.connectivityService.verifyAccess(c.TestType.HTTP,new URL(e));return t+=Number(i),i})))),process.stdout.write(u.EOL),console.log("INTERNAL communication diagnostics completed."),console.log(`${e.length-t} out of ${e.length} URLs could not be reached.`)}async processTraceroute(){console.log(`Traceroute to your INTERNAL (local) target application.${u.EOL}`),"win32"===process.platform&&console.log(`Note: Some Windows users might need to allow the ICMP network traffic through a firewall to enable this functionality.\n For more information, see: https://docs.brightsec.com/docs/testing-network-connectivity${u.EOL}`);const e=await this.question(r.HOST_OR_IP_QUESTION);console.log(this.delimiter),console.log(r.INTERNAL_DIAGNOSTIC);const t=await this.connectivityService.verifyAccess(c.TestType.TRACEROUTE,e);process.stdout.write(u.EOL),console.log(`Traceroute ${t?"completed":"failed"}.`)}async question(e){return new Promise((t=>this.rl.question(`${e}: `,t)))}async process(e,t){let i;process.stdout.write(`${e}...`),d.default.cursorTo(process.stdout,0);try{i=await t()}catch(e){a.logger.debug(e.message),i=!1}console.log(`${e}... ${i?"Success":"Failed"}`)}getDelimitedInput(e,t){const i=(null!=e?e:"").trim();return i?i.split(t).map((e=>e.trim())).filter(Boolean):[]}};h.URLS_QUESTION="Please enter the target URLs to test (separated by commas)",h.HOST_OR_IP_QUESTION="Please enter the target hostname or IP to test",h.COMPELED_MESSAGE="Communication diagnostics done, close the terminal to exit.",h.INTERNAL_DIAGNOSTIC=`Starting INTERNAL communication diagnostics:${u.EOL}`,h=r=o.__decorate([(0,l.injectable)(),o.__param(0,(0,l.inject)(n.ConnectivityUrls)),o.__param(1,(0,l.inject)(p.Tokens)),o.__param(2,(0,l.inject)(n.ConnectivityAnalyzer)),o.__metadata("design:paramtypes",[Object,Object,Object])],h),t.ReadlinePlatform=h},6860:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});i(5584).__exportStar(i(3367),t)},3857:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TestType=void 0,function(e){e.HTTP="http",e.AUTH="auth",e.TRACEROUTE="traceroute"}(t.TestType||(t.TestType={}))},6743:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tokens=void 0,t.Tokens=Symbol("Tokens")},5721:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(7977),t),r.__exportStar(i(6860),t),r.__exportStar(i(2371),t),r.__exportStar(i(2916),t),r.__exportStar(i(8534),t),r.__exportStar(i(3857),t),r.__exportStar(i(6743),t),r.__exportStar(i(8027),t)},9490:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),i(1321);const r=i(2046),o=i(7758),s=i(9369),n=i(5721),a=i(523),c=i(8224),p=i(6412),l=i(2815),d=i(6712),u=i(9750),h=i(2675),f=i(8914),m=i(1879),y=i(512),g=i(8174),b=i(7035),v=i(1609),_=i(9945),w=i(8641);w.container.register("tsyringe",{useValue:w.container}).register(u.CliInfo,{useValue:new u.CliInfo(__dirname)}).register(r.RequestExecutor,{useClass:r.HttpRequestExecutor},{lifecycle:w.Lifecycle.Singleton}).register(r.Certificates,{useClass:r.CertificatesLoader},{lifecycle:w.Lifecycle.Singleton}).register(r.CertificatesCache,{useClass:v.DefaultCertificatesCache},{lifecycle:w.Lifecycle.Singleton}).register(r.CertificatesResolver,{useClass:_.DefaultCertificatesResolver},{lifecycle:w.Lifecycle.Singleton}).register(r.RequestExecutor,{useClass:r.WsRequestExecutor},{lifecycle:w.Lifecycle.Singleton}).register(o.VirtualScripts,{useClass:o.DefaultVirtualScripts},{lifecycle:w.Lifecycle.Singleton}).register(s.StartupManager,{useClass:s.DefaultStartupManager},{lifecycle:w.Lifecycle.Singleton}).register(f.RuntimeDetector,{useClass:f.DefaultRuntimeDetector},{lifecycle:w.Lifecycle.Singleton}).register(f.RepeaterServer,{useClass:f.DefaultRepeaterServer},{lifecycle:w.Lifecycle.Singleton}).register(f.RepeaterCommandHub,{useClass:f.DefaultRepeaterCommandHub},{lifecycle:w.Lifecycle.Singleton}).register(n.Tokens,{useClass:n.FSTokens},{lifecycle:w.Lifecycle.Singleton}).register(n.Connectivity,{useClass:n.HTTPConnectivity},{lifecycle:w.Lifecycle.Singleton}).register(n.Connectivity,{useClass:n.TracerouteConnectivity},{lifecycle:w.Lifecycle.Singleton}).register(n.Connectivity,{useClass:n.AuthConnectivity},{lifecycle:w.Lifecycle.Singleton}).register(a.BreakpointFactory,{useClass:a.DefaultBreakpointFactory},{lifecycle:w.Lifecycle.Singleton}).register(a.PollingFactory,{useClass:a.DefaultPollingFactory},{lifecycle:w.Lifecycle.Singleton}).register(y.DiscoveryPollingFactory,{useClass:y.DefaultDiscoveryPollingFactory},{lifecycle:w.Lifecycle.Singleton}).register(b.HostUpdateJobStatusPollingFactory,{useClass:g.DefaultHostUpdateJobStatusPollingFactory},{lifecycle:w.Lifecycle.Singleton}).register(a.Scans,{useClass:a.RestScans},{lifecycle:w.Lifecycle.Singleton}).register(y.Discoveries,{useClass:y.RestDiscoveries},{lifecycle:w.Lifecycle.Singleton}).register(c.EntryPoints,{useClass:c.RestEntryPoints},{lifecycle:w.Lifecycle.Singleton}).register(p.Archives,{useClass:p.RestArchives},{lifecycle:w.Lifecycle.Singleton}).register(p.ParserFactory,{useClass:p.DefaultParserFactory},{lifecycle:w.Lifecycle.Singleton}).register(o.ScriptLoader,{useClass:o.FSScriptLoader},{lifecycle:w.Lifecycle.Singleton}).register(n.ConnectivityAnalyzer,{useClass:n.DefaultConnectivityAnalyzer},{lifecycle:w.Lifecycle.Singleton}).register(n.Platform,{useClass:n.ReadlinePlatform},{lifecycle:w.Lifecycle.Singleton}).register(l.ConfigReader,{useClass:d.DefaultConfigReader},{lifecycle:w.Lifecycle.Singleton}).register(h.CliBuilder,{useFactory:e=>new h.CliBuilder({info:e.resolve(u.CliInfo),configReader:e.resolve(l.ConfigReader)})}).register(m.ProxyFactory,{useClass:m.DefaultProxyFactory}).register(f.RepeaterLauncher,{useClass:f.ServerRepeaterLauncher},{lifecycle:w.Lifecycle.Singleton}),t.default=w.container},756:e=>{e.exports=require("@neuralegion/os-service")},8176:e=>{e.exports=require("@neuralegion/raw-socket")},6436:e=>{e.exports=require("@sentry/node")},5711:e=>{e.exports=require("ajv")},6410:e=>{e.exports=require("ajv/lib/compile/formats")},6132:e=>{e.exports=require("ajv/lib/refs/json-schema-draft-04.json")},6763:e=>{e.exports=require("ajv/lib/refs/json-schema-draft-07.json")},1184:e=>{e.exports=require("arch")},8938:e=>{e.exports=require("axios")},9280:e=>{e.exports=require("better-ajv-errors")},6895:e=>{e.exports=require("chalk")},9267:e=>{e.exports=require("ci-info")},7331:e=>{e.exports=require("fast-content-type-parse")},4199:e=>{e.exports=require("find-up")},2305:e=>{e.exports=require("form-data")},1973:e=>{e.exports=require("http-proxy-agent")},3688:e=>{e.exports=require("https-proxy-agent")},7868:e=>{e.exports=require("iconv-lite")},7089:e=>{e.exports=require("js-yaml")},2736:e=>{e.exports=require("ms")},1321:e=>{e.exports=require("reflect-metadata")},6960:e=>{e.exports=require("rotating-file-stream")},8064:e=>{e.exports=require("semver")},5199:e=>{e.exports=require("socket.io-client")},7060:e=>{e.exports=require("socket.io-msgpack-parser")},2216:e=>{e.exports=require("socks-proxy-agent")},5584:e=>{e.exports=require("tslib")},8641:e=>{e.exports=require("tsyringe")},953:e=>{e.exports=require("win-ca")},5086:e=>{e.exports=require("ws")},8314:e=>{e.exports=require("yargs")},2613:e=>{e.exports=require("assert")},5317:e=>{e.exports=require("child_process")},9896:e=>{e.exports=require("fs")},4589:e=>{e.exports=require("node:assert")},1421:e=>{e.exports=require("node:child_process")},1314:e=>{e.exports=require("node:dgram")},1553:e=>{e.exports=require("node:dns/promises")},8474:e=>{e.exports=require("node:events")},3024:e=>{e.exports=require("node:fs")},1455:e=>{e.exports=require("node:fs/promises")},7067:e=>{e.exports=require("node:http")},4708:e=>{e.exports=require("node:https")},8995:e=>{e.exports=require("node:module")},7030:e=>{e.exports=require("node:net")},8161:e=>{e.exports=require("node:os")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},481:e=>{e.exports=require("node:readline")},7075:e=>{e.exports=require("node:stream")},8500:e=>{e.exports=require("node:timers/promises")},1692:e=>{e.exports=require("node:tls")},3136:e=>{e.exports=require("node:url")},7975:e=>{e.exports=require("node:util")},714:e=>{e.exports=require("node:vm")},8522:e=>{e.exports=require("node:zlib")},6928:e=>{e.exports=require("path")},9864:e=>{e.exports=JSON.parse('{"$id":"har","type":"object","required":["log"],"properties":{"log":{"$ref":"#/definitions/log"}},"definitions":{"log":{"$id":"#/definitions/log","description":"HTTP Archive structure.","type":"object","required":["version","creator","entries"],"properties":{"log":{"type":"object","properties":{"version":{"type":"string"},"creator":{"$ref":"#/definitions/creator"},"browser":{"$ref":"#/definitions/browser"},"pages":{"type":"array","optional":true,"items":{"$ref":"#/definitions/page"}},"entries":{"type":"array","items":{"$ref":"#/definitions/entry"}},"comment":{"type":"string","optional":true}}}}},"creator":{"$id":"#/definitions/creator","description":"Name and version info of the log creator app.","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string","optional":true}}},"browser":{"$id":"#/definitions/browser","description":"Name and version info of used browser.","type":"object","optional":true,"required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string","optional":true}}},"page":{"$id":"#/definitions/page","description":"Exported web page","optional":true,"required":["startedDateTime","$id","title","pageTimings"],"properties":{"startedDateTime":{"type":"string","format":"date-time","pattern":"^(d{4})(-)?(dd)(-)?(dd)(T)?(dd)(:)?(dd)(:)?(dd)(.d+)?(Z|([+-])(dd)(:)?(dd))"},"$id":{"type":"string","unique":true},"title":{"type":"string"},"pageTimings":{"$ref":"#/definitions/pageTimings"},"comment":{"type":"string","optional":true}}},"pageTimings":{"$id":"#/definitions/pageTimings","description":"Timing info about page load","properties":{"onContentLoad":{"type":"number","optional":true,"min":-1},"onLoad":{"type":"number","optional":true,"min":-1},"comment":{"type":"string","optional":true}}},"entry":{"$id":"#/definitions/entry","description":"Request and Response related info","optional":true,"required":["startedDateTime","time","request","response","cache","timings"],"properties":{"pageref":{"type":"string","optional":true},"startedDateTime":{"type":"string","format":"date-time","pattern":"^(d{4})(-)?(dd)(-)?(dd)(T)?(dd)(:)?(dd)(:)?(dd)(.d+)?(Z|([+-])(dd)(:)?(dd))"},"time":{"type":"number","min":0},"request":{"$ref":"#/definitions/request"},"response":{"$ref":"#/definitions/response"},"cache":{"$ref":"#/definitions/cache"},"timings":{"$ref":"#/definitions/timings"},"serverIPAddress":{"type":"string","optional":true},"connection":{"type":"string","optional":true},"comment":{"type":"string","optional":true}}},"request":{"$id":"#/definitions/request","description":"Monitored request","required":["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],"properties":{"method":{"type":"string"},"url":{"type":"string"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"headers":{"type":"array","items":{"$ref":"#/definitions/record"}},"queryString":{"type":"array","items":{"$ref":"#/definitions/record"}},"postData":{"$ref":"#/definitions/postData"},"headersSize":{"type":"integer","min":-1},"bodySize":{"type":"integer","min":-1},"comment":{"type":"string","optional":true}}},"record":{"$id":"#/definitions/record","required":["name","value"],"description":"Helper name-value pair structure.","properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string","optional":true}}},"response":{"$id":"#/definitions/response","description":"Monitored Response.","required":["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],"properties":{"status":{"type":"integer"},"statusText":{"type":"string"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"headers":{"type":"array","items":{"$ref":"#/definitions/record"}},"content":{"$ref":"#/definitions/content"},"redirectURL":{"type":"string"},"headersSize":{"type":"integer","min":-1},"bodySize":{"type":"integer","min":-1},"comment":{"type":"string","optional":true}}},"cookie":{"$id":"#/definitions/cookie","description":"Cookie description.","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"path":{"type":"string","optional":true},"domain":{"type":"string","optional":true},"expires":{"type":"string","optional":true},"httpOnly":{"type":"boolean","optional":true},"secure":{"type":"boolean","optional":true},"comment":{"type":"string","optional":true}}},"postData":{"$id":"#/definitions/postData","description":"Posted data info.","optional":true,"required":["mimeType"],"properties":{"mimeType":{"type":"string"},"text":{"type":"string","optional":true},"params":{"type":"array","optional":true,"properties":{"name":{"type":"string"},"value":{"type":"string","optional":true},"fileName":{"type":"string","optional":true},"content":{"type":"string","optional":true},"comment":{"type":"string","optional":true}}},"comment":{"type":"string","optional":true}}},"content":{"$id":"#/definitions/content","description":"Response content","required":["size","mimeType"],"properties":{"size":{"type":"integer"},"compression":{"type":"integer","optional":true},"mimeType":{"type":"string"},"text":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"comment":{"type":"string","optional":true}}},"cache":{"$id":"#/definitions/cache","description":"Info about a response coming from the cache.","properties":{"beforeRequest":{"$ref":"#/definitions/cacheEntry"},"afterRequest":{"$ref":"#/definitions/cacheEntry"},"comment":{"type":"string","optional":true}}},"cacheEntry":{"$id":"#/definitions/cacheEntry","optional":true,"description":"Info about cache entry.","required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","optional":"true","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string","optional":true}}},"timings":{"$id":"#/definitions/timings","required":["send","wait","receive"],"description":"Info about request-response timing.","properties":{"dns":{"type":"number","optional":true,"min":-1},"connect":{"type":"number","optional":true,"min":-1},"blocked":{"type":"number","optional":true,"min":-1},"send":{"type":"number"},"wait":{"type":"number"},"receive":{"type":"number"},"ssl":{"type":"number","optional":true,"min":-1},"comment":{"type":"string","optional":true}}}}}')},9550:e=>{e.exports=JSON.parse('{"title":"A JSON Schema for Swagger 2.0 API.","id":"http://swagger.io/v2/schema.json#","$schema":"http://json-schema.org/draft-04/schema#","type":"object","required":["swagger","info","paths"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"swagger":{"type":"string","enum":["2.0"],"description":"The Swagger version of this document."},"info":{"$ref":"#/definitions/info"},"host":{"type":"string","pattern":"^[^{}/ :\\\\\\\\]+(?::\\\\d+)?$","description":"The host (name or ip) of the API. Example: \'swagger.io\'"},"basePath":{"type":"string","pattern":"^/","description":"The base path to the API. Example: \'/api\'."},"schemes":{"$ref":"#/definitions/schemesList"},"consumes":{"description":"A list of MIME types accepted by the API.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"produces":{"description":"A list of MIME types the API can produce.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"paths":{"$ref":"#/definitions/paths"},"definitions":{"$ref":"#/definitions/definitions"},"parameters":{"$ref":"#/definitions/parameterDefinitions"},"responses":{"$ref":"#/definitions/responseDefinitions"},"security":{"$ref":"#/definitions/security"},"securityDefinitions":{"$ref":"#/definitions/securityDefinitions"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."},"termsOfService":{"type":"string","description":"The terms of service for the API."},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"paths":{"type":"object","description":"Relative paths to the individual endpoints. They must be relative to the \'basePath\'.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"},"^/":{"$ref":"#/definitions/pathItem"}},"additionalProperties":false},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"One or more JSON objects describing the schemas being consumed and produced by the API."},"parameterDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"One or more JSON representations for parameters"},"responseDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/response"},"description":"One or more JSON representations for responses"},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"examples":{"type":"object","additionalProperties":true},"mimeType":{"type":"string","description":"The MIME type of the HTTP message."},"operation":{"type":"object","required":["responses"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"tags":{"type":"array","items":{"type":"string"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the operation."},"description":{"type":"string","description":"A longer description of the operation, GitHub Flavored Markdown is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string","description":"A unique identifier of the operation."},"produces":{"description":"A list of MIME types the API can produce.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"consumes":{"description":"A list of MIME types the API can consume.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"parameters":{"$ref":"#/definitions/parametersList"},"responses":{"$ref":"#/definitions/responses"},"schemes":{"$ref":"#/definitions/schemesList"},"deprecated":{"type":"boolean","default":false},"security":{"$ref":"#/definitions/security"}}},"pathItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"get":{"$ref":"#/definitions/operation"},"put":{"$ref":"#/definitions/operation"},"post":{"$ref":"#/definitions/operation"},"delete":{"$ref":"#/definitions/operation"},"options":{"$ref":"#/definitions/operation"},"head":{"$ref":"#/definitions/operation"},"patch":{"$ref":"#/definitions/operation"},"parameters":{"$ref":"#/definitions/parametersList"}}},"responses":{"type":"object","description":"Response objects names can either be any valid HTTP status code or \'default\'.","minProperties":1,"additionalProperties":false,"patternProperties":{"^([0-9]{3})$|^(default)$":{"$ref":"#/definitions/responseValue"},"^x-":{"$ref":"#/definitions/vendorExtension"}},"not":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}}},"responseValue":{"oneOf":[{"$ref":"#/definitions/response"},{"$ref":"#/definitions/jsonReference"}]},"response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"schema":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/fileSchema"}]},"headers":{"$ref":"#/definitions/headers"},"examples":{"$ref":"#/definitions/examples"}},"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/header"}},"header":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"vendorExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"bodyParameter":{"type":"object","required":["name","in","schema"],"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["body"]},"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"schema":{"$ref":"#/definitions/schema"}},"additionalProperties":false},"headerParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["header"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"queryParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["query"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"formDataParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["formData"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array","file"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"pathParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["required"],"properties":{"required":{"type":"boolean","enum":[true],"description":"Determines whether or not this parameter is required or optional."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["path"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"nonBodyParameter":{"type":"object","required":["name","in","type"],"oneOf":[{"$ref":"#/definitions/headerParameterSubSchema"},{"$ref":"#/definitions/formDataParameterSubSchema"},{"$ref":"#/definitions/queryParameterSubSchema"},{"$ref":"#/definitions/pathParameterSubSchema"}]},"parameter":{"oneOf":[{"$ref":"#/definitions/bodyParameter"},{"$ref":"#/definitions/nonBodyParameter"}]},"schema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/xml"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"fileSchema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["type"],"properties":{"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"type":{"type":"string","enum":["file"]},"readOnly":{"type":"boolean","default":false},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"primitivesItems":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"security":{"type":"array","items":{"$ref":"#/definitions/securityRequirement"},"uniqueItems":true},"securityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"xml":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"securityDefinitions":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/basicAuthenticationSecurity"},{"$ref":"#/definitions/apiKeySecurity"},{"$ref":"#/definitions/oauth2ImplicitSecurity"},{"$ref":"#/definitions/oauth2PasswordSecurity"},{"$ref":"#/definitions/oauth2ApplicationSecurity"},{"$ref":"#/definitions/oauth2AccessCodeSecurity"}]}},"basicAuthenticationSecurity":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["basic"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"apiKeySecurity":{"type":"object","additionalProperties":false,"required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ImplicitSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["implicit"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2PasswordSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["password"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ApplicationSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["application"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2AccessCodeSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["accessCode"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"mediaTypeList":{"type":"array","items":{"$ref":"#/definitions/mimeType"},"uniqueItems":true},"parametersList":{"type":"array","description":"The parameters needed to send a valid API call.","additionalItems":false,"items":{"oneOf":[{"$ref":"#/definitions/parameter"},{"$ref":"#/definitions/jsonReference"}]},"uniqueItems":true},"schemesList":{"type":"array","description":"The transfer protocol of the API.","items":{"type":"string","enum":["http","https","ws","wss"]},"uniqueItems":true},"collectionFormat":{"type":"string","enum":["csv","ssv","tsv","pipes"],"default":"csv"},"collectionFormatWithMulti":{"type":"string","enum":["csv","ssv","tsv","pipes","multi"],"default":"csv"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"jsonReference":{"type":"object","required":["$ref"],"additionalProperties":false,"properties":{"$ref":{"type":"string"}}}}}')},3447:e=>{e.exports=JSON.parse('{"id":"https://spec.openapis.org/oas/3.0/schema/2019-04-02","$schema":"http://json-schema.org/draft-04/schema#","description":"Validation schema for OpenAPI Specification 3.0.X.","type":"object","required":["openapi","info","paths"],"properties":{"openapi":{"type":"string","pattern":"^3\\\\.0\\\\.\\\\d(-.+)?$"},"info":{"$ref":"#/definitions/Info"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"tags":{"type":"array","items":{"$ref":"#/definitions/Tag"},"uniqueItems":true},"paths":{"$ref":"#/definitions/Paths"},"components":{"$ref":"#/definitions/Components"}},"patternProperties":{"^x-":{}},"additionalProperties":false,"definitions":{"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"Info":{"type":"object","required":["title","version"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"termsOfService":{"type":"string","format":"uri-reference"},"contact":{"$ref":"#/definitions/Contact"},"license":{"$ref":"#/definitions/License"},"version":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Contact":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"email":{"type":"string","format":"email"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"License":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Server":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"description":{"type":"string"},"variables":{"type":"object","additionalProperties":{"$ref":"#/definitions/ServerVariable"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ServerVariable":{"type":"object","required":["default"],"properties":{"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Components":{"type":"object","properties":{"schemas":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}}},"responses":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Response"}]}}},"parameters":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Parameter"}]}}},"examples":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Example"}]}}},"requestBodies":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/RequestBody"}]}}},"headers":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Header"}]}}},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"links":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Link"}]}}},"callbacks":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Callback"}]}}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Schema":{"type":"object","properties":{"title":{"type":"string"},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":{},"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":{},"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":{},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"headers":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Header"},{"$ref":"#/definitions/Reference"}]}},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"links":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Link"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"MediaType":{"type":"object","properties":{"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}},"encoding":{"type":"object","additionalProperties":{"$ref":"#/definitions/Encoding"}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"}]},"Example":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"value":{},"externalValue":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Header":{"type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string","enum":["simple"],"default":"simple"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"}]},"Paths":{"type":"object","patternProperties":{"^\\\\/":{"$ref":"#/definitions/PathItem"},"^x-":{}},"additionalProperties":false},"PathItem":{"type":"object","properties":{"$ref":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true}},"patternProperties":{"^(get|put|post|delete|options|head|patch|trace)$":{"$ref":"#/definitions/Operation"},"^x-":{}},"additionalProperties":false},"Operation":{"type":"object","required":["responses"],"properties":{"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"operationId":{"type":"string"},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true},"requestBody":{"oneOf":[{"$ref":"#/definitions/RequestBody"},{"$ref":"#/definitions/Reference"}]},"responses":{"$ref":"#/definitions/Responses"},"callbacks":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Callback"},{"$ref":"#/definitions/Reference"}]}},"deprecated":{"type":"boolean","default":false},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Responses":{"type":"object","properties":{"default":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]}},"patternProperties":{"^[1-5](?:\\\\d{2}|XX)$":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]},"^x-":{}},"minProperties":1,"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"Tag":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExampleXORExamples":{"description":"Example and examples are mutually exclusive","not":{"required":["example","examples"]}},"SchemaXORContent":{"description":"Schema and content are mutually exclusive, at least one is required","not":{"required":["schema","content"]},"oneOf":[{"required":["schema"]},{"required":["content"],"description":"Some properties are not allowed if content is present","allOf":[{"not":{"required":["style"]}},{"not":{"required":["explode"]}},{"not":{"required":["allowReserved"]}},{"not":{"required":["example"]}},{"not":{"required":["examples"]}}]}]},"Parameter":{"type":"object","properties":{"name":{"type":"string"},"in":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"required":["name","in"],"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"},{"$ref":"#/definitions/ParameterLocation"}]},"ParameterLocation":{"description":"Parameter location","oneOf":[{"description":"Parameter in path","required":["required"],"properties":{"in":{"enum":["path"]},"style":{"enum":["matrix","label","simple"],"default":"simple"},"required":{"enum":[true]}}},{"description":"Parameter in query","properties":{"in":{"enum":["query"]},"style":{"enum":["form","spaceDelimited","pipeDelimited","deepObject"],"default":"form"}}},{"description":"Parameter in header","properties":{"in":{"enum":["header"]},"style":{"enum":["simple"],"default":"simple"}}},{"description":"Parameter in cookie","properties":{"in":{"enum":["cookie"]},"style":{"enum":["form"],"default":"form"}}}]},"RequestBody":{"type":"object","required":["content"],"properties":{"description":{"type":"string"},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"required":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/APIKeySecurityScheme"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/OAuth2SecurityScheme"},{"$ref":"#/definitions/OpenIdConnectSecurityScheme"}]},"APIKeySecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"HTTPSecurityScheme":{"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"bearerFormat":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false,"oneOf":[{"description":"Bearer","properties":{"scheme":{"enum":["bearer"]}}},{"description":"Non Bearer","not":{"required":["bearerFormat"]},"properties":{"scheme":{"not":{"enum":["bearer"]}}}}]},"OAuth2SecurityScheme":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flows":{"$ref":"#/definitions/OAuthFlows"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OpenIdConnectSecurityScheme":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"openIdConnectUrl":{"type":"string","format":"uri-reference"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OAuthFlows":{"type":"object","properties":{"implicit":{"$ref":"#/definitions/ImplicitOAuthFlow"},"password":{"$ref":"#/definitions/PasswordOAuthFlow"},"clientCredentials":{"$ref":"#/definitions/ClientCredentialsFlow"},"authorizationCode":{"$ref":"#/definitions/AuthorizationCodeOAuthFlow"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ImplicitOAuthFlow":{"type":"object","required":["authorizationUrl","scopes"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"PasswordOAuthFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ClientCredentialsFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"AuthorizationCodeOAuthFlow":{"type":"object","required":["authorizationUrl","tokenUrl"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Link":{"type":"object","properties":{"operationId":{"type":"string"},"operationRef":{"type":"string","format":"uri-reference"},"parameters":{"type":"object","additionalProperties":{}},"requestBody":{},"description":{"type":"string"},"server":{"$ref":"#/definitions/Server"}},"patternProperties":{"^x-":{}},"additionalProperties":false,"not":{"description":"Operation Id and Operation Ref are mutually exclusive","required":["operationId","operationRef"]}},"Callback":{"type":"object","additionalProperties":{"$ref":"#/definitions/PathItem"},"patternProperties":{"^x-":{}}},"Encoding":{"type":"object","properties":{"contentType":{"type":"string"},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/Header"}},"style":{"type":"string","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false}},"additionalProperties":false}}}')},9088:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","id":"https://schema.getpostman.com/json/collection/v2.0.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth":{"type":"object","title":"Auth","id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","ntlm","noauth","oauth1","oauth2"]},"noauth":{},"apikey":{"type":"object","title":"API Key Authentication","description":"The attributes for API Key Authentication. e.g. key, value, in."},"awsv4":{"type":"object","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). e.g. accessKey, secretKey, region, service."},"basic":{"type":"object","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). e.g. username, password."},"bearer":{"type":"object","title":"Bearer Token Authentication","description":"The attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750). e.g. token."},"digest":{"type":"object","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication). e.g. username, password, realm, nonce, nonceCount, algorithm, qop, opaque, clientNonce."},"edgegrid":{"type":"object","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html). e.g. accessToken, clientToken, clientSecret, baseURL, nonce, timestamp, headersToSign."},"hawk":{"type":"object","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk). e.g. authId, authKey, algorith, user, nonce, extraData, appId, delegation, timestamp."},"ntlm":{"type":"object","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx). e.g. username, password, domain, workstation."},"oauth1":{"type":"object","title":"OAuth1","description":"The attributes for [OAuth1](https://oauth.net/1/). e.g. consumerKey, consumerSecret, token, tokenSecret, signatureMethod, timestamp, nonce, version, realm, encodeOAuthSign."},"oauth2":{"type":"object","title":"OAuth2","description":"The attributes for [OAuth2](https://oauth.net/2/). e.g. accessToken, addTokenTo."}},"required":["type"]},"certificate-list":{"id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"type":"object","title":"Cookie","id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"id":"#/definitions/event-list","title":"Event List","type":"array","$schema":"http://json-schema.org/draft-04/schema#","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"type":"object","title":"Header","id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Item","id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Protocol Profile Behavior","id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["text"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"null"}]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["file"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"graphql":{"type":"object"},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`.","oneOf":[{"type":"null"},{"type":"string"},{"type":"number"}]},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","oneOf":[{"type":"object"},{"type":"null"}]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":"string"},{"type":"null"}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-04/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"oneOf":[{"type":"string"},{"type":"null"}]},"value":{"oneOf":[{"type":"string"},{"type":"null"}]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')},3025:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","id":"https://schema.getpostman.com/json/collection/v2.1.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth-attribute":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Auth","id":"#/definitions/auth-attribute","description":"Represents an attribute for any authorization method provided by Postman. For example `username` and `password` are set as auth attributes for Basic Authentication method.","properties":{"key":{"type":"string"},"value":{},"type":{"type":"string"}},"required":["key"]},"auth":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Auth","id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","noauth","oauth1","oauth2","ntlm"]},"noauth":{},"apikey":{"type":"array","title":"API Key Authentication","description":"The attributes for API Key Authentication.","items":{"$ref":"#/definitions/auth-attribute"}},"awsv4":{"type":"array","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).","items":{"$ref":"#/definitions/auth-attribute"}},"basic":{"type":"array","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"bearer":{"type":"array","title":"Bearer Token Authentication","description":"The helper attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750)","items":{"$ref":"#/definitions/auth-attribute"}},"digest":{"type":"array","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"edgegrid":{"type":"array","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html).","items":{"$ref":"#/definitions/auth-attribute"}},"hawk":{"type":"array","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk)","items":{"$ref":"#/definitions/auth-attribute"}},"ntlm":{"type":"array","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth1":{"type":"array","title":"OAuth1","description":"The attributes for [OAuth2](https://oauth.net/1/)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth2":{"type":"array","title":"OAuth2","description":"Helper attributes for [OAuth2](https://oauth.net/2/)","items":{"$ref":"#/definitions/auth-attribute"}}},"required":["type"]},"certificate-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Cookie","id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/event-list","title":"Event List","type":"array","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Header","id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Item","id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Protocol Profile Behavior","id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["text"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"oneOf":[{"type":"string"},{"type":"null"},{"type":"array"}]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["file"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"graphql":{"type":"object"},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","oneOf":[{"type":"null"},{"type":"string"},{"type":"number"}],"description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`."},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","oneOf":[{"type":"object"},{"type":"null"}]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":"string"},{"type":"null"}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-04/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"oneOf":[{"type":"string"},{"type":"null"}]},"value":{"oneOf":[{"type":"string"},{"type":"null"}]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')},7925:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://schema.getpostman.com/json/draft-07/collection/v2.0.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth":{"type":"object","title":"Auth","$id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","ntlm","noauth","oauth1","oauth2"]},"noauth":{},"apikey":{"type":"object","title":"API Key Authentication","description":"The attributes for API Key Authentication. e.g. key, value, in."},"awsv4":{"type":"object","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). e.g. accessKey, secretKey, region, service."},"basic":{"type":"object","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). e.g. username, password."},"bearer":{"type":"object","title":"Bearer Token Authentication","description":"The attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750). e.g. token."},"digest":{"type":"object","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication). e.g. username, password, realm, nonce, nonceCount, algorithm, qop, opaque, clientNonce."},"edgegrid":{"type":"object","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html). e.g. accessToken, clientToken, clientSecret, baseURL, nonce, timestamp, headersToSign."},"hawk":{"type":"object","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk). e.g. authId, authKey, algorith, user, nonce, extraData, appId, delegation, timestamp."},"ntlm":{"type":"object","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx). e.g. username, password, domain, workstation."},"oauth1":{"type":"object","title":"OAuth1","description":"The attributes for [OAuth1](https://oauth.net/1/). e.g. consumerKey, consumerSecret, token, tokenSecret, signatureMethod, timestamp, nonce, version, realm, encodeOAuthSign."},"oauth2":{"type":"object","title":"OAuth2","description":"The attributes for [OAuth2](https://oauth.net/2/). e.g. accessToken, addTokenTo."}},"required":["type"]},"certificate-list":{"$id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"$id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"$id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"type":"object","title":"Cookie","$id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"type":["string","null"],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"$id":"#/definitions/event-list","title":"Event List","type":"array","$schema":"http://json-schema.org/draft-07/schema#","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"$id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"type":"object","title":"Header","$id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-07/schema#","title":"Folder","$id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"Item","$id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"Protocol Profile Behavior","$id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"graphql":{"type":"object"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"text"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"type":["array","string","null"]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"file"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`.","type":["null","string","number"]},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","type":["object","null"]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":"string"},{"type":"null"}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-07/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","$id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"type":["string","null"]},"value":{"type":["string","null"]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')},4900:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://schema.getpostman.com/json/draft-07/collection/v2.1.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth-attribute":{"type":"object","title":"Auth","$id":"#/definitions/auth-attribute","description":"Represents an attribute for any authorization method provided by Postman. For example `username` and `password` are set as auth attributes for Basic Authentication method.","properties":{"key":{"type":"string"},"value":{},"type":{"type":"string"}},"required":["key"]},"auth":{"type":"object","title":"Auth","$id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","noauth","oauth1","oauth2","ntlm"]},"noauth":{},"apikey":{"type":"array","title":"API Key Authentication","description":"The attributes for API Key Authentication.","items":{"$ref":"#/definitions/auth-attribute"}},"awsv4":{"type":"array","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).","items":{"$ref":"#/definitions/auth-attribute"}},"basic":{"type":"array","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"bearer":{"type":"array","title":"Bearer Token Authentication","description":"The helper attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750)","items":{"$ref":"#/definitions/auth-attribute"}},"digest":{"type":"array","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"edgegrid":{"type":"array","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html).","items":{"$ref":"#/definitions/auth-attribute"}},"hawk":{"type":"array","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk)","items":{"$ref":"#/definitions/auth-attribute"}},"ntlm":{"type":"array","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth1":{"type":"array","title":"OAuth1","description":"The attributes for [OAuth2](https://oauth.net/1/)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth2":{"type":"array","title":"OAuth2","description":"Helper attributes for [OAuth2](https://oauth.net/2/)","items":{"$ref":"#/definitions/auth-attribute"}}},"required":["type"]},"certificate-list":{"$id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"$id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"$id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"type":"object","title":"Cookie","$id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"type":["string","null"],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"$id":"#/definitions/event-list","title":"Event List","type":"array","$schema":"http://json-schema.org/draft-07/schema#","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"$id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"type":"object","title":"Header","$id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-07/schema#","title":"Folder","$id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"type":"object","title":"Item","$id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"Protocol Profile Behavior","$id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"graphql":{"type":"object"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"text"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"type":["array","string","null"]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"file"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","type":["null","string","number"],"description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`."},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","type":["object","null"]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":["string","null"]}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-07/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","$id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"type":["string","null"]},"value":{"type":["string","null"]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')}},t={};function __webpack_require__(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,__webpack_require__),o.exports}var i={};(()=>{var e,t=i;Object.defineProperty(t,"__esModule",{value:!0});const r=__webpack_require__(5584);process.env.UV_THREADPOOL_SIZE=String(1024),process.env.NODE_OPTIONS=`${null!==(e=process.env.NODE_OPTIONS)&&void 0!==e?e:""} --max-http-header-size=40960`.trim(),__webpack_require__(1321);const o=__webpack_require__(6572),s=__webpack_require__(1860),n=r.__importDefault(__webpack_require__(9490)),a=__webpack_require__(35),c=__webpack_require__(1294),p=__webpack_require__(1718),l=__webpack_require__(8287),d=__webpack_require__(3567),u=__webpack_require__(4191);n.default.resolve(s.CliBuilder).build({commands:[new o.RunRepeater,new o.VersionCommand,new o.PollingScanStatus,new o.RunScan,new o.RetestScan,new o.StopScan,new a.RunDiscovery,new c.StopDiscovery,new p.RerunDiscovery,new l.PollingDiscoveryStatus,new d.PollingHostUpdateJobStatus,new o.UploadArchive,new o.Configure,new o.GetEntryPoints,new u.EntryPointsUpdateHost]}).argv})();var r=exports;for(var o in i)r[o]=i[o];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
2
|
+
(()=>{"use strict";var e={6805:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Archives=t.SpecType=void 0,function(e){e.HAR="HAR",e.OPENAPI="OpenAPI",e.POSTMAN="Postman"}(t.SpecType||(t.SpecType={})),t.Archives=Symbol("Archives")},1825:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseParser=void 0;const r=i(1455),o=i(2613),s=i(6928);t.BaseParser=class BaseParser{constructor(e){this.validator=e,this.FILE_SIZE_LIMIT=524288e3}async parse(e){await this.access(e);if((await(0,r.stat)(e)).size>this.FILE_SIZE_LIMIT)throw new Error("There is not enough storage space to save this file");const t=await(0,r.readFile)(e,"utf8"),i=(0,s.extname)(e);let o;try{o=await this.deserialize(t,{ext:i})}catch(e){throw new Error(`File is invalid. ${e.message}`)}return await this.validator.validate(o),{content:t,filename:(0,s.basename)(e),contentType:this.contentType(i)}}deserialize(e,t){return JSON.parse(e)}contentType(e){switch(e){case".yml":case".yaml":return"application/yaml";default:return"application/json"}}async access(e){(0,o.ok)(e,"The path is invalid.");try{await(0,r.access)(e,r.constants.F_OK)}catch(t){throw new Error(`${(0,s.basename)(e)} file doesn't found.`)}}}},7511:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultParserFactory=void 0;const r=i(5584),o=i(6805),s=i(3898),n=i(1825),a=i(8093),c=i(8641);let p=class DefaultParserFactory{constructor(e,t,i){this.harValidator=e,this.oasValidator=t,this.postmanValidator=i}create(e){switch(e){case o.SpecType.HAR:return new n.BaseParser(this.harValidator);case o.SpecType.OPENAPI:return new a.OasParser(this.oasValidator);case o.SpecType.POSTMAN:return new n.BaseParser(this.postmanValidator);default:throw new Error("Incorrect a specification type")}}};p=r.__decorate([(0,c.injectable)(),r.__metadata("design:paramtypes",[s.HarValidator,s.OasValidator,s.PostmanValidator])],p),t.DefaultParserFactory=p},8093:function(e,t,i){var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){void 0===r&&(r=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,r,o)}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&r(t,e,i);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OasParser=void 0;const n=i(1825);class OasParser extends n.BaseParser{constructor(e){super(e)}async deserialize(e,t){return".yml"===t.ext||".yaml"===t.ext?(await Promise.resolve().then((()=>s(i(7089))))).load(e):JSON.parse(e)}}t.OasParser=OasParser},6780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6500:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserFactory=void 0,t.ParserFactory=Symbol("ParserFactory")},207:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(8093),t),r.__exportStar(i(1825),t),r.__exportStar(i(6780),t),r.__exportStar(i(7511),t),r.__exportStar(i(6500),t)},7351:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestArchives=t.RestArchivesOptions=void 0;const r=i(5584),o=i(6805),s=i(1879),n=i(8641),a=r.__importDefault(i(8938)),c=r.__importDefault(i(2305)),p=i(4589),l=r.__importDefault(i(4708)),d=r.__importDefault(i(7067));t.RestArchivesOptions=Symbol("RestArchivesOptions");let u=class RestArchives{constructor(e,{baseURL:t,apiKey:i,proxyURL:r,insecure:s,timeout:n=1e4}){this.proxyFactory=e,this.ALLOWED_SPECS=[o.SpecType.OPENAPI,o.SpecType.POSTMAN,o.SpecType.HAR];const{httpAgent:c=new d.default.Agent,httpsAgent:p=new l.default.Agent({rejectUnauthorized:!s})}=r?this.proxyFactory.createProxy({proxyUrl:r,rejectUnauthorized:!s}):{};this.client=a.default.create({baseURL:t,timeout:n,httpAgent:c,httpsAgent:p,responseType:"json",headers:{authorization:`Api-Key ${i}`}})}async upload(e){(0,p.ok)(this.ALLOWED_SPECS.includes(e.type),`Invalid specification type. Allowed: ${this.ALLOWED_SPECS}`);const{discard:t,headers:i,variables:r,projectId:o}=e,s=this.castToFile(e),n=new c.default;n.append("file",s.value,s.options),n.append("projectId",o),n.append("headers",JSON.stringify(null!=i?i:{})),n.append("variables",JSON.stringify(null!=r?r:{}));return(await this.client.post("/api/v1/files",n,{params:{discard:t}})).data.id}castToFile({filename:e,content:t,contentType:i="application/json"}){return{options:{filename:e,contentType:i},value:Buffer.from(t)}}};u=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.ProxyFactory)),r.__param(1,(0,n.inject)(t.RestArchivesOptions)),r.__metadata("design:paramtypes",[Object,Object])],u),t.RestArchives=u},3455:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HarValidator=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(9864)),n=r.__importDefault(i(5711)),a=r.__importDefault(i(9280)),c=i(8641);let p=class HarValidator{constructor(){this.ajv=new n.default({allErrors:!0,async:!0,jsonPointers:!0,extendRefs:!0}),this.ajv.addSchema(s.default)}async validate(e){const t=this.ajv.getSchema("har");if(!await t(e))throw o.logger.error((0,a.default)(t.schema,e,t.errors,{indent:2})),new Error("The HAR file is corrupted.");if(!this.entriesAreValid(e.log.entries))throw new Error("HAR is empty or contains none of request.")}entriesAreValid(e){if(!e)return!1;const t=e.map(this.parseEntry,this).filter((e=>!!e));return 0!==[...new Set(t)].length}parseEntry(e){const{host:t,protocol:i}=new URL(e.request.url);if(t&&i&&"chrome-extension:"!==i)return e.request.url}};p=r.__decorate([(0,c.injectable)(),r.__metadata("design:paramtypes",[])],p),t.HarValidator=p},9641:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OasValidator=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(9550)),n=r.__importDefault(i(3447)),a=r.__importDefault(i(5711)),c=r.__importDefault(i(8064)),p=r.__importDefault(i(9280)),l=r.__importDefault(i(6410)),d=r.__importDefault(i(6132)),u=i(8641),h=i(4589);let f=class OasValidator{constructor(){this.MIN_ALLOWED_VERSION="2.0.0",this.VERSION_SCHEMA_MAP=new Map([[2,"http://swagger.io/v2/schema.json#"],[3,"https://spec.openapis.org/oas/3.0/schema/2019-04-02"]]),this.SCHEMAS=[s.default,n.default],this.ajv=new a.default({allErrors:!0,$data:!0,jsonPointers:!0,extendRefs:!0,async:!0,schemaId:"auto"}),this.ajv.addFormat("uriref",l.default.full["uri-reference"]),this.ajv.addMetaSchema(d.default),this.ajv._refs["http://json-schema.org/schema"]="http://json-schema.org/draft-04/schema",this.SCHEMAS.forEach((e=>this.ajv.addSchema(e)))}async validate(e){const t=this.getVersion(e),i=c.default.major(t),r=this.VERSION_SCHEMA_MAP.get(i);(0,h.ok)(r,"Cannot determine version of schema. Schema ID is missed."),this.validateVersion(e);const s=this.ajv.getSchema(r);if(!await s(e))throw o.logger.error((0,p.default)(s.schema,e,s.errors,{indent:2})),new Error("The OAS file is corrupted.")}validateVersion(e){const t=this.getVersion(e);if(!c.default.gte(t,this.MIN_ALLOWED_VERSION))throw new Error("Swagger v1 are not supported. If you are using an older format, convert it to v2 and try again.")}getVersion(e){let t=(e.openapi||e.swagger||"").trim();return(0,h.ok)(t,"Cannot determine version of specification."),!c.default.valid(t)&&this.MIN_ALLOWED_VERSION.startsWith(t)&&(t=this.MIN_ALLOWED_VERSION),t}};f=r.__decorate([(0,u.injectable)(),r.__metadata("design:paramtypes",[])],f),t.OasValidator=f},3316:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostmanValidator=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(7925)),n=r.__importDefault(i(9088)),a=r.__importDefault(i(4900)),c=r.__importDefault(i(3025)),p=r.__importDefault(i(5711)),l=r.__importDefault(i(9280)),d=r.__importDefault(i(6132)),u=r.__importDefault(i(6763)),h=i(8641),f=i(4589),m=i(6760);let y=class PostmanValidator{constructor(){this.ALLOWED_SCHEMAS=["https://schema.getpostman.com/json/draft-07/collection/v2.0.0/","https://schema.getpostman.com/json/draft-07/collection/v2.1.0/","https://schema.getpostman.com/json/collection/v2.0.0/","https://schema.getpostman.com/json/collection/v2.1.0/"],this.META_SCHEMAS=[d.default,u.default],this.SCHEMAS=[s.default,n.default,a.default,c.default],this.ajv=new p.default({allErrors:!0,async:!0,meta:!1,schemaId:"auto"}),[].concat(this.META_SCHEMAS,this.SCHEMAS).forEach((e=>this.ajv.addMetaSchema(e))),this.ajv._refs["http://json-schema.org/schema"]="http://json-schema.org/draft-04/schema"}async validate(e){(0,f.ok)(e,"Postman collection is not provided."),(0,f.ok)(e.info,'"info" section is missed in the collection.');const t=e.info.schema?(0,m.parse)(e.info.schema).dir+"/":"";if(!this.ALLOWED_SCHEMAS.includes(t.trim()))throw new Error("Postman v1 collections are not supported. If you are using an older format, convert it to v2 and try again.");const i=this.ajv.getSchema(t);if(!i)throw new Error("Cannot determine version of schema. Schema ID is missed.");if(!await i(e))throw o.logger.error((0,l.default)(i.schema,e,i.errors,{indent:2})),new Error("The Postman Collection file is corrupted.")}};y=r.__decorate([(0,h.injectable)(),r.__metadata("design:paramtypes",[])],y),t.PostmanValidator=y},9840:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3898:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(3455),t),r.__exportStar(i(9641),t),r.__exportStar(i(3316),t),r.__exportStar(i(9840),t)},6412:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultParserFactory=t.ParserFactory=void 0;const r=i(5584);r.__exportStar(i(6805),t),r.__exportStar(i(7351),t);var o=i(207);Object.defineProperty(t,"ParserFactory",{enumerable:!0,get:function(){return o.ParserFactory}}),Object.defineProperty(t,"DefaultParserFactory",{enumerable:!0,get:function(){return o.DefaultParserFactory}})},5832:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Configure=void 0;const r=i(5584),o=i(1879),s=i(5721),n=r.__importDefault(i(9490));class Configure{constructor(){this.command="configure [options]",this.describe="Start a configuration wizard"}static getMapEntryOrThrow(e,t){try{return[e,new URL(t)]}catch(t){throw new Error(`Invalid value for ${e} testing endpoint`)}}builder(e){return e.option(s.TestType.HTTP,{hidden:!0,requiresArg:!0,describe:"Bright application base URL"}).option(s.TestType.AUTH,{hidden:!0,requiresArg:!0,describe:"Bright event message authentication endpoint"}).option("ping",{boolean:!0,describe:"Start network tests."}).option("traceroute",{boolean:!0,describe:"Start treceroute to a local recource."}).option("max-ttl",{number:!0,requiresArg:!0,describe:"Set the max time-to-live (max number of hops) used in outgoing probe packets.",default:64}).option("probes",{alias:"p",number:!0,requiresArg:!0,describe:"Set the number of probes per 'ttl'.",default:3}).group(["max-ttl","probes"],"Traceroute Options").conflicts("ping","traceroute").middleware((e=>{var t,i;n.default.register(s.Options,{useValue:{traceroute:{maxTTL:isNaN(+e.maxTtl)?void 0:+e.maxTtl,probes:isNaN(+e.probes)?void 0:+e.probes}}}).register(s.ConnectivityUrls,{useValue:new Map([Configure.getMapEntryOrThrow(s.TestType.HTTP,null!==(t=e[s.TestType.HTTP])&&void 0!==t?t:e.api),Configure.getMapEntryOrThrow(s.TestType.AUTH,null!==(i=e[s.TestType.AUTH])&&void 0!==i?i:e.api)])})}))}async handler(e){try{const t=n.default.resolve(s.Platform),stop=async()=>{await t.stop(),process.exit(0)};process.on("SIGTERM",stop).on("SIGINT",stop).on("SIGHUP",stop),await t.start({ping:!!e.ping,traceroute:!!e.traceroute})}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"configure"})),process.exit(1)}}}t.Configure=Configure},4191:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EntryPointsUpdateHost=void 0;const r=i(1879),o=i(8224),s=i(8641);t.EntryPointsUpdateHost=class EntryPointsUpdateHost{constructor(){this.command="entrypoints:update-host [options]",this.describe="Bulk update target entry points host."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).option("old-hostname",{alias:"o",describe:"Old hostname of entrypoints.",string:!0,requiresArg:!0,demandOption:!0}).option("new-hostname",{alias:"n",describe:"New hostname of entrypoints.",string:!0,requiresArg:!0,demandOption:!0}).option("entrypoint-ids",{alias:"e",describe:"IDs of entrypoints to update.",string:!0,requiresArg:!0,array:!0}).middleware((e=>{var t;return s.container.register(o.RestProjectsOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(o.EntryPoints),i=e.project,{taskId:r}=await t.updateHost({projectId:i,entryPointIds:e.entrypointIds,newHostname:e.newHostname,oldHostname:e.oldHostname});console.log(r),process.exitCode=0}catch(e){r.logger.error(r.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:update-host"})),process.exitCode=1}}}},7653:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetEntryPoints=void 0;const r=i(8224),o=i(1879),s=i(8641);t.GetEntryPoints=class GetEntryPoints{constructor(){this.command="entrypoints:list [options]",this.describe="get all entrypoints of the project."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",requiresArg:!0,demandOption:!0}).option("verbose",{describe:"Enable verbose mode",boolean:!0,default:!1}).option("limit",{describe:"Limit the number of entrypoints",default:10}).option("pretty",{describe:"Pretty print the output",boolean:!0,default:!1}).option("connectivity",{describe:"Filter by connectivity",array:!0,choices:["ok","unreachable","problem","skipped","unauthorized","unavailable"]}).option("status",{describe:"Filter by status",array:!0,choices:["new","changed","tested","vulnerable"]}).middleware((e=>{var t;return s.container.register(r.RestProjectsOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){const t=s.container.resolve(r.EntryPoints);try{const i=await t.entrypoints({projectId:e.project,limit:e.limit,connectivity:e.connectivity,status:e.status}),r=e.verbose?i:i.map((e=>({id:e.id,method:e.method,url:e.url})));console.log(e.pretty?JSON.stringify(r,null,2):JSON.stringify(r)),process.exitCode=0}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:list"})),process.exitCode=1}}}},8287:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingDiscoveryStatus=void 0;const r=i(512),o=i(2297),s=i(1879),n=i(8641);t.PollingDiscoveryStatus=class PollingDiscoveryStatus{constructor(){this.command="discovery:polling [options] <discoveryId>",this.describe="Allows to configure a polling of discovery status."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).option("interval",{requiresArg:!0,describe:'The sampling interval between status checks. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.',default:5e3}).option("timeout",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a discovery status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.'}).positional("discoveryId",{describe:"ID of an existing discovery.",demandOption:!0,type:"string"}).middleware((e=>{var t;return n.container.register(r.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.container.resolve(o.DiscoveryPollingFactory).create({discoveryId:e.discoveryId,projectId:e.project,timeout:e.timeout,interval:e.interval});await t.start(),process.exit(0)}catch(e){s.logger.error(s.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:polling"})),process.exit(1)}}}},3567:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingHostUpdateJobStatus=void 0;const r=i(1879),o=i(7035),s=i(8224),n=i(8641);t.PollingHostUpdateJobStatus=class PollingHostUpdateJobStatus{constructor(){this.command="entrypoints:update-host-polling [options] <jobId>",this.describe="Allows to configure a polling of host update job status."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("interval",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a host update job status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.',default:5e3}).option("timeout",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a host update job status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.'}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).positional("jobId",{describe:"ID of an existing update host job which you want to check.",type:"string",demandOption:!0}).middleware((e=>{var t;return n.container.register(s.RestProjectsOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.container.resolve(o.HostUpdateJobStatusPollingFactory).create({timeout:e.timeout,interval:e.interval,jobId:e.jobId,projectId:e.project});await t.start(),process.exit(0)}catch(e){r.logger.error(r.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:update-host-polling"})),process.exit(1)}}}},9520:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingScanStatus=void 0;const r=i(523),o=i(1879),s=i(8641);t.PollingScanStatus=class PollingScanStatus{constructor(){this.command="scan:polling [options] <scanId>",this.describe="Allows to configure a polling of scan status."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("interval",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a scan status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.',default:5e3}).option("timeout",{requiresArg:!0,describe:'Period of time between the end of a timeout period or completion of a scan status request, and the next request for status. Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.'}).option("breakpoint",{alias:"b",choices:o.Helpers.toArray(r.BreakpointType),string:!0,describe:"A conditional breakpoint that allows to finish the process with exit code 50 only after fulfilling the predefined condition.",requiresArg:!0,default:r.BreakpointType.ANY}).positional("scanId",{describe:"ID of an existing scan which you want to check.",type:"string",demandOption:!0}).middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.PollingFactory).create({scanId:e.scanId,timeout:e.timeout,interval:e.interval,breakpoint:e.breakpoint});await t.start(),process.exit(0)}catch(e){e instanceof r.BreakpointException&&(o.logger.error("The breakpoint has been hit during polling."),o.logger.error(`Breakpoint: ${e.message}`),process.exit(50)),o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:polling"})),process.exit(1)}}}},1718:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RerunDiscovery=void 0;const r=i(512),o=i(1879),s=i(8641);t.RerunDiscovery=class RerunDiscovery{constructor(){this.command="discovery:rerun [options] <discoveryId>",this.describe="Request to start a new discovery using the same configuration as an existing discovery, by discovery ID."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).positional("discoveryId",{describe:"ID of an existing discovery which you want to re-run.",requiresArg:!0,demandOption:!0,type:"string"}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).middleware((e=>{var t;return s.container.register(r.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Discoveries),i=e.project,o=e.discoveryId,n=await t.rerun(i,o);console.log(n),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:rerun"})),process.exit(1)}}}},3986:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RetestScan=void 0;const r=i(523),o=i(1879),s=i(8641);t.RetestScan=class RetestScan{constructor(){this.command="scan:retest [options] <scanId>",this.describe="Request to start a new scan using the same configuration as an existing scan, by scan ID."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).positional("scanId",{describe:"ID of an existing scan which you want to re-run.",type:"string",demandOption:!0}).middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Scans),i=await t.retest(e.scanId);console.log(i),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:retest"})),process.exit(1)}}}},35:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunDiscovery=void 0;const r=i(512),o=i(1879),s=i(6768),n=i(8641);t.RunDiscovery=class RunDiscovery{constructor(){this.command="discovery:run [options]",this.describe="Start a new discovery for the received configuration."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).option("project",{alias:"p",describe:"ID of the project",string:!0,requiresArg:!0,demandOption:!0}).option("name",{alias:"n",describe:"Name of the discovery.",string:!0,requiresArg:!0,demandOption:!0}).option("auth",{alias:"o",describe:"Auth object ID.",string:!0,requiresArg:!0}).option("repeater",{alias:"agent",requiresArg:!0,array:!0,describe:"ID of any repeaters connected with the discovery."}).option("archive",{alias:"a",normalize:!0,requiresArg:!0,describe:"A collection of your app's http/websockets logs into HAR file. Usually you can use browser dev tools or our browser web extension"}).option("crawler",{alias:"c",requiresArg:!0,array:!0,describe:"A list of specific urls that should be included into crawler."}).conflicts("archive","crawler").check((e=>{if(e.archive&&e.crawler)throw new Error("Arguments --archive and --crawler are mutually exclusive");if(!e.archive&&!e.crawler)throw new Error("Either --archive or --crawler must be specified");return!0})).option("host-filter",{alias:"F",requiresArg:!0,array:!0,describe:"A list of specific hosts that should be included into scan."}).option("header",{alias:"H",requiresArg:!0,array:!0,describe:"A list of specific headers that should be included into request."}).option("smart",{boolean:!0,describe:"Use automatic smart decisions such as: parameter skipping, detection phases, etc. to minimize scan time."}).option("crawl-parent-subdomains",{boolean:!0,describe:"Crawl parent path folders and subdomains",default:!1}).option("concurrency",{number:!0,default:10,describe:"Number of maximum concurrent requests allowed to be sent to the target, can range between 1 to 50 (default: 10).",requiresArg:!0}).option("interactions-depth",{number:!0,default:3,describe:"Number of maximum interactions with nested objects, can range between 1 to 5 (default: 3).",requiresArg:!0}).middleware((e=>{var t;return n.container.register(s.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.container.resolve(r.Discoveries),i=e.project,{id:s,warnings:a}=await t.create(i,{name:e.name,authObjectId:e.auth,hostsFilter:e.hostFilter,crawlerUrls:e.crawler,fileId:e.archive,repeaters:e.repeater,optimizedCrawler:e.smart,poolSize:e.concurrency,maxInteractionsChainLength:e.interactionsDepth,subdomainsCrawl:e.crawlParentSubdomains,headers:e.header});console.log(s),(null==a?void 0:a.length)&&o.logger.warn(`${a.map((e=>e.message)).join("\n")}\n`),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:run"})),process.exit(1)}}}},9773:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunRepeater=void 0;const r=i(5584),o=i(2046),s=i(1879),n=r.__importDefault(i(9490)),a=i(8914),c=i(6436),p=i(6760),l=r.__importDefault(i(1708));t.RunRepeater=class RunRepeater{constructor(){this.command="repeater [options]",this.describe="Starts an on-prem agent."}builder(e){var t;return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("id",{alias:"agent",describe:"ID of an existing repeater which you want to use to run a new scan.",type:"string",requiresArg:!0,demandOption:!0}).option("scripts",{alias:"S",requiresArg:!0,string:!0,describe:'JSON string which contains script list, which is initially empty and consists of zero or more host and path pairs. Example: {"*.example.com": "./hmac.js"}',coerce:e=>JSON.parse(e)}).option("timeout",{number:!0,requiresArg:!0,default:3e4,describe:"Time to wait for a server to send response headers (and start the response body) before aborting the request."}).option("header",{alias:"H",requiresArg:!0,conflicts:["headers"],array:!0,describe:"A list of specific headers that should be included into request.",coerce:e=>Array.isArray(e)?s.Helpers.parseHeaders(e):{}}).option("headers",{requiresArg:!0,deprecated:"Use --header instead.",string:!0,conflicts:["header"],describe:'JSON string which contains header list, which is initially empty and consists of zero or more name and value pairs. Example: {"x-slack-signature": "Z2dFIHJldHNhRQ"}',coerce:e=>JSON.parse(e)}).option("cacert",{default:!1,requiresArg:!0,describe:"The path to file which may contain multiple CA certificates. Example: /etc/ssl/certs/ca-certificates.crt",coerce:e=>("string"==typeof e||"boolean"==typeof e)&&e}).option("cert",{requiresArg:!0,array:!0,string:!0,describe:'The certificate must be in PKCS, or PEM format. Example: {"hostname": "example.com", "path": "./example.pem", "passphrase": "pa$$word", "port": "1234"}.',coerce:e=>e.map((e=>JSON.parse(e))).map((({path:e,hostname:t,passphrase:i,port:r})=>(e||(s.logger.error('Error during "repeater": Specify the path to your client certificate file.'),l.default.exit(1)),t||(s.logger.error('Error during "repeater": Specify the hostname (without protocol and port) of the request URL for which you want to use the certificate.'),l.default.exit(1)),{hostname:t,passphrase:i,path:(0,p.normalize)(e),port:r})))}).option("experimental-connection-reuse",{deprecated:"Use --ntlm instead",boolean:!0,describe:"Configure ntlm support (enables TCP connection reuse)"}).option("ntlm",{boolean:!0,describe:"Configure ntlm support (enables TCP connection reuse)"}).option("daemon",{requiresArg:!1,alias:"d",describe:"Run as repeater in daemon mode"}).option("run",{requiresArg:!1,hidden:!0}).option("remove-daemon",{requiresArg:!1,alias:["rm","remove"],describe:"Stop and remove repeater daemon"}).option("proxy-domains",{requiresArg:!0,array:!0,describe:"Space-separated list of domains that should be routed through the proxy. This option is only applicable when using the --proxy option",coerce(e){if(void 0!==e[0])return 1===e.length&&e[0].includes(" ")?e[0].trim().split(" "):e}}).option("proxy-domains-bypass",{requiresArg:!0,array:!0,default:null===(t=l.default.env.NO_PROXY)||void 0===t?void 0:t.trim().split(",").map((e=>e.trim())),describe:"Space-separated list of domains that should not be routed through the proxy. This option is only applicable when using the --proxy option",coerce(e){if(1===e.length){if(void 0===e[0])return;return e[0].includes(" ")?e[0].trim().split(" "):e}return e}}).conflicts({daemon:"remove-daemon",ntlm:["proxy","experimental-connection-reuse"]}).conflicts("proxy-domains","proxy-domains-bypass").env("REPEATER").middleware((e=>{Object.hasOwnProperty.call(e,"")&&delete e[""]}),!0).exitProcess(!1).check((e=>{var t,i;const r=e.id;if(!s.Helpers.isShortUUID(r)&&!s.Helpers.isUUID(r))throw new Error("Option --id has wrong value. Please ensure that --id option has a valid ID.");const o=null!==(t=e.proxyDomains)&&void 0!==t?t:[];for(const e of o)if(e.includes(","))throw new Error("Option --proxy-domains has a wrong value.Please ensure that --proxy-domains option has space separated list of domain values");const n=null!==(i=e.proxyDomainsBypass)&&void 0!==i?i:[];for(const e of n)if(e.includes(","))throw new Error("Option --proxy-domain-bypass has wrong value.Please ensure that --proxy-domain-bypass option has space separated list of domain values");return!0})).middleware((e=>{var t,i,r;n.default.register(o.RequestExecutorOptions,{useValue:{headers:null!==(t=e.header)&&void 0!==t?t:e.headers,timeout:e.timeout,proxyUrl:null!==(i=e.proxyTarget)&&void 0!==i?i:e.proxy,certs:e.cert,maxBodySize:1/0,maxContentLength:100,reuseConnection:!!e.ntlm||!!e.experimentalConnectionReuse,whitelistMimes:[{type:"text/html",allowTruncation:!1},{type:"text/plain",allowTruncation:!0},{type:"text/css",allowTruncation:!1},{type:"text/javascript",allowTruncation:!1},{type:"text/markdown",allowTruncation:!0},{type:"text/xml",allowTruncation:!1},{type:"application/javascript",allowTruncation:!1},{type:"application/x-javascript",allowTruncation:!1},{type:"application/json",allowTruncation:!1},{type:"application/xml",allowTruncation:!1},{type:"application/x-www-form-urlencoded",allowTruncation:!1},{type:"application/msgpack",allowTruncation:!1},{type:"application/ld+json",allowTruncation:!1},{type:"application/graphql",allowTruncation:!1}],proxyDomains:e.proxyDomains,proxyDomainsBypass:e.proxyDomainsBypass}}).register(a.DefaultRepeaterServerOptions,{useValue:{uri:e.repeaterServer,token:e.token,connectTimeout:e.timeout,proxyUrl:null!==(r=e.proxyBright)&&void 0!==r?r:e.proxy,insecure:e.insecure}})}))}async handler(e){const t=n.default.resolve(a.RepeaterLauncher);if(e.cacert&&await t.loadCerts("string"==typeof e.cacert?e.cacert:void 0),e.scripts&&await t.loadScripts(e.scripts),e.remove)return await t.uninstall(),void(l.default.exitCode=0);if(e.daemon)return await t.install(),void(l.default.exitCode=0);try{["SIGTERM","SIGINT","SIGHUP"].forEach((e=>l.default.on(e,(async()=>{await t.close(),l.default.exitCode=0})))),await t.run(e.id,e.run)}catch(e){(0,c.captureException)(e),s.logger.error(s.ErrorMessageFactory.genericCommandError({error:e,command:"repeater"})),await t.close(),l.default.exitCode=1}}}},2536:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunScan=void 0;const r=i(523),o=i(1879),s=i(8641),n=i(8161);class RunScan{constructor(){this.command="scan:run [options]",this.describe="Start a new scan for the received configuration."}static excludeEntryPoint(e){return e.map((e=>JSON.parse(e))).map((({methods:e=[],patterns:t=[]})=>{const i=t.filter((e=>!!e));return i.length||(o.logger.error(o.ErrorMessageFactory.genericCommandError({command:"scan:run",error:"please make sure that patterns contain at least one regexp"})),process.exit(1)),{methods:[...new Set(e)],patterns:[...new Set(i)]}}))}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("name",{alias:"n",describe:"Name of the scan.",requiresArg:!0,demandOption:!0}).option("auth",{alias:"o",describe:"Auth object ID.",requiresArg:!0}).option("repeater",{alias:"agent",requiresArg:!0,array:!0,describe:"ID of any repeaters connected with the scan."}).option("archive",{alias:"a",normalize:!0,requiresArg:!0,describe:"A collection your app's http/websockets logs into HAR file. Usually you can use browser dev tools or our browser web extension"}).option("crawler",{alias:"c",requiresArg:!0,array:!0,describe:"A list of specific urls that should be included into crawler."}).option("test",{array:!0,describe:`A list of tests to run during a scan. If no tests are specified, the default tests will be run.${n.EOL}For more information on the default tests, refer to the documentation: https://docs.brightsec.com/docs/running-a-scan${n.EOL}Additional details about available tests can be found here: https://docs.brightsec.com/docs/vulnerability-guide`}).option("bucket",{array:!0,describe:"A list of test buckets which you want to run during a scan."}).option("project",{alias:"p",requiresArg:!0,string:!0,describe:"ID of the project"}).option("template",{alias:"tp",requiresArg:!1,string:!0,describe:"Scan template ID"}).option("module",{default:r.Module.DAST,requiresArg:!0,choices:o.Helpers.toArray(r.Module),describe:"The dast module tests for specific scenarios, mainly OWASP top 10 and other common scenarios. The fuzzer module generates various scenarios to test for unknown vulnerabilities, providing automated AI led fuzzing testing. This module can be coupled with the repeater to find additional vulnerabilities."}).option("host-filter",{alias:"F",requiresArg:!0,array:!0,describe:"A list of specific hosts that should be included into scan."}).option("header",{alias:"H",requiresArg:!0,array:!0,describe:"A list of specific headers that should be included into request."}).option("exclude-param",{requiresArg:!0,array:!0,string:!0,describe:'A list of regex patterns for parameter names you would like to ignore during the tests. Example: "Id$"'}).option("exclude-entry-point",{array:!0,describe:'A list of JSON strings that contain patterns for entry points you would like to ignore during the tests. Pass an empty string to remove default exclusions. To apply patterns for all HTTP methods, you can set an empty array to "methods". Example: \'{ "methods": [], "patterns": ["users\\/?$"] }\'',coerce:RunScan.excludeEntryPoint}).option("smart",{boolean:!0,describe:"Use automatic smart decisions such as: parameter skipping, detection phases, etc. to minimize scan time."}).option("concurrency",{number:!0,default:10,requiresArg:!0,describe:"Number of maximum concurrent requests allowed to be sent to the target, can range between 1 to 50 (default: 10)."}).option("param",{array:!0,defaultDescription:`[${r.ATTACK_PARAM_LOCATIONS_DEFAULT.map((e=>`"${e}"`)).join(",")}]`,requiresArg:!0,choices:o.Helpers.toArray(r.AttackParamLocation),describe:"Defines which part of the request to attack."}).option("entrypoint",{array:!0,alias:"e",describe:"List entrypoint IDs to scan specific entrypoints. If no IDs are provided, the scan will run on the first 2000 project-level entrypoints. This option requires to specify the project ID using the --project option."}).conflicts("entrypoint",["crawler","archive"]).check((e=>{if(e.entrypoint&&e.archive&&e.crawler)throw new Error("Arguments --entrypoint, --archive and --crawler are mutually exclusive");if(!e.entrypoint&&!e.archive&&!e.crawler)throw new Error("When --entrypoint is not provided, either --archive or --crawler must be specified");return!0})).group(["archive","crawler"],"Discovery Options").group(["host-filter","header","module","repeater","test","smart"],"Additional Options").middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Scans),{id:i,warnings:n=[]}=await t.create({tests:e.test,name:e.name,module:e.module,authObjectId:e.auth,projectId:e.project,templateId:e.template,buckets:e.bucket,hostsFilter:e.hostFilter,headers:o.Helpers.parseHeaders(e.header),crawlerUrls:e.crawler,fileId:e.archive,repeaters:e.repeater,smart:e.smart,attackParamLocations:e.param,poolSize:e.concurrency,exclusions:{requests:e.excludeEntryPoint,params:e.excludeParam},entryPointIds:e.entrypoint});console.log(i),n.length&&o.logger.warn(`${n.map((e=>e.message)).join("\n")}\n`),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:run"})),process.exit(1)}}}t.RunScan=RunScan},1294:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StopDiscovery=void 0;const r=i(512),o=i(1879),s=i(8641);t.StopDiscovery=class StopDiscovery{constructor(){this.command="discovery:stop [options] <discoveryId>",this.describe="Stop discovery by id."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",string:!0,requiresArg:!0,demandOption:!0}).option("project",{alias:"p",requiresArg:!0,string:!0,describe:"ID of the project",demandOption:!0}).positional("discoveryId",{describe:"ID of an existing discovery which you want to stop.",requiresArg:!0,demandOption:!0,type:"string"}).middleware((e=>{var t;return s.container.register(r.RestDiscoveryOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Discoveries);await t.stop(e.project,e.discoveryId),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:stop"})),process.exit(1)}}}},5527:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StopScan=void 0;const r=i(523),o=i(1879),s=i(8641);t.StopScan=class StopScan{constructor(){this.command="scan:stop [options] <scanId>",this.describe="Stop scan by id."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).positional("scanId",{describe:"ID of an existing scan which you want to stop.",requiresArg:!0,demandOption:!0,type:"string"}).middleware((e=>{var t;return s.container.register(r.RestScansOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=s.container.resolve(r.Scans);await t.stop(e.scanId),process.exit(0)}catch(e){o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"scan:stop"})),process.exit(1)}}}},4457:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UploadArchive=void 0;const r=i(5584),o=i(6412),s=i(1879),n=r.__importDefault(i(9490));t.UploadArchive=class UploadArchive{constructor(){this.command="archive:upload [options] <file>",this.describe="Uploads a archive to Bright."}builder(e){return e.option("token",{alias:"t",describe:"Bright API-key",requiresArg:!0,demandOption:!0}).option("type",{alias:"T",requiresArg:!0,describe:"The specification type",choices:[o.SpecType.OPENAPI,o.SpecType.HAR,o.SpecType.POSTMAN].map((e=>e.toLowerCase())),default:o.SpecType.HAR.toLowerCase(),demandOption:!0}).option("discard",{alias:"d",default:!0,boolean:!0,describe:"Indicates if archive should be remove or not after scan running. Enabled by default."}).option("project",{alias:["p","projectId"],describe:"ID of the project for uploading file (Optional for transition period, will be mandatory in future)In case project-level API key project ID determined from that API key"}).option("header",{alias:"H",default:[],deprecated:"Use --header when running a scan using the scan:run command.",requiresArg:!0,array:!0,describe:"A list of specific headers that should be included into request.",coerce:e=>Array.isArray(e)?s.Helpers.parseHeaders(e):{}}).option("variable",{alias:"V",default:[],deprecated:"Directly integrate variables into the file. For updated guidelines on managing variables effectively, refer to https://learning.postman.com/docs/sending-requests/variables/variables/#variable-scopes",requiresArg:!0,array:!0,describe:"A list of specific variables that should be included into request. Only for Postman",coerce:e=>Array.isArray(e)?s.Helpers.parseHeaders(e):{}}).positional("file",{describe:"A collection your app's http/websockets logs into HAR file. Usually you can use browser dev tools or our browser web extension",type:"string",demandOption:!0,normalize:!0}).group(["header"],"OAS Options").group(["header","variable"],"Postman Options").middleware((e=>{var t;n.default.register(o.RestArchivesOptions,{useValue:{insecure:e.insecure,baseURL:e.api,apiKey:e.token,proxyURL:null!==(t=e.proxyBright)&&void 0!==t?t:e.proxy,timeout:e.timeout}})}))}async handler(e){try{const t=n.default.resolve(o.ParserFactory),i=n.default.resolve(o.Archives),r=s.Helpers.selectEnumValue(o.SpecType,e.type),a=t.create(r),c={...await a.parse(e.file),type:r,discard:e.discard,projectId:e.project,headers:e.header,variables:e.variable};console.log(await i.upload(c)),process.exit(0)}catch(e){s.logger.error(s.ErrorMessageFactory.genericCommandError({error:e,command:"archive:upload"})),process.exit(1)}}}},2887:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VersionCommand=void 0;const r=i(1879),o=i(5317);class VersionCommand{constructor(){this.command="version",this.describe="Prints Bright CLI version this project uses."}static executeCommand(e){return new Promise(((t,i)=>{(0,o.exec)(e,((e,r,o)=>r?t(r):o?t(o):e?i(e):void t("")))}))}async handler(){const e=(await VersionCommand.executeCommand("npm list --depth=0")).match(/ @brightsec\/cli@(.*)\n/),t=(e&&e[1]?e[1]:"").replace(/"invalid"/gi,"").trim(),i=(await VersionCommand.executeCommand("npm list -g --depth=0")).match(/ @brightsec\/cli@(.*)\n/),o=(i&&i[1]?i[1]:"").replace(/"invalid"/gi,"").trim();t?r.logger.log("Local installed version:",t):r.logger.warn("No local installed Bright CLI was found."),o?r.logger.log("Global installed Bright CLI version:",o):r.logger.warn("No global installed was found."),t&&o&&t!==o&&r.logger.warn("To avoid issues with CLI please make sure your global and local Bright CLI versions match, or you are using locally installed Bright CLI instead of global one.")}}t.VersionCommand=VersionCommand},6572:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetEntryPoints=t.Configure=t.RunRepeater=t.PollingScanStatus=t.StopScan=t.RetestScan=t.UploadArchive=t.RunScan=t.VersionCommand=void 0;var r=i(2887);Object.defineProperty(t,"VersionCommand",{enumerable:!0,get:function(){return r.VersionCommand}});var o=i(2536);Object.defineProperty(t,"RunScan",{enumerable:!0,get:function(){return o.RunScan}});var s=i(4457);Object.defineProperty(t,"UploadArchive",{enumerable:!0,get:function(){return s.UploadArchive}});var n=i(3986);Object.defineProperty(t,"RetestScan",{enumerable:!0,get:function(){return n.RetestScan}});var a=i(5527);Object.defineProperty(t,"StopScan",{enumerable:!0,get:function(){return a.StopScan}});var c=i(9520);Object.defineProperty(t,"PollingScanStatus",{enumerable:!0,get:function(){return c.PollingScanStatus}});var p=i(9773);Object.defineProperty(t,"RunRepeater",{enumerable:!0,get:function(){return p.RunRepeater}});var l=i(5832);Object.defineProperty(t,"Configure",{enumerable:!0,get:function(){return l.Configure}});var d=i(7653);Object.defineProperty(t,"GetEntryPoints",{enumerable:!0,get:function(){return d.GetEntryPoints}})},2675:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CliBuilder=void 0;const r=i(5584),o=i(1879),s=i(9654),n=i(6436),a=r.__importDefault(i(2736)),c=r.__importDefault(i(1708));t.CliBuilder=class CliBuilder{constructor(e){this._options=e}get options(){return this._options}build({commands:e}){const{configReader:t,info:r}=this.options,s=i(8314).option("config",{requiresArg:!0,describe:"Path to the file with configuration",config:!0,default:t.discovery(r.cwd),configParser:e=>t.load(e).toJSON()}).option("log-level",{requiresArg:!0,choices:Object.keys(o.LogLevel).map((e=>isNaN(+e)?e.toLowerCase():+e)),default:o.LogLevel.NOTICE,describe:"What level of logs to report. Any logs of a higher level than the setting are shown."}).option("log-file",{requiresArg:!0,type:"string",describe:"File path to write logs to. If specified, logs will be written to this file"}).implies({"log-max-size":"log-file","log-max-files":"log-file","log-rotate-interval":"log-file","log-compress":"log-file"}).group(["log-max-size","log-max-files","log-rotate-interval","log-compress"],"Log Rotation Options (requires --log-file):").option("log-max-size",{requiresArg:!0,type:"string",describe:'Maximum size of log file before rotation (e.g., "10MB", "1GB"). Default: 10MB'}).option("log-max-files",{requiresArg:!0,type:"number",describe:"Maximum number of rotated log files to keep. Default: 5"}).option("log-rotate-interval",{requiresArg:!0,type:"string",describe:'Time interval to rotate log files (e.g., "1d", "12h", "7d"). Default: 1d'}).option("log-compress",{type:"boolean",describe:"Compress rotated log files using gzip. Default: true"}).option("cluster",{deprecated:"Use --hostname instead",requiresArg:!0,describe:"Bright application name (domain name). [default: app.brightsec.com]"}).option("hostname",{requiresArg:!0,describe:"Bright application name (domain name). [default: app.brightsec.com]"}).option("insecure",{boolean:!0,default:!1,description:"Allows CLI to proceed and operate even for server connections otherwise considered insecure."}).option("proxy",{requiresArg:!0,default:c.default.env.PROXY,describe:"Specify a proxy URL to route all traffic through. This should be an HTTP(S), SOCKS4, or SOCKS5 URL. By default, if you specify SOCKS://<URL>, then SOCKS5h is applied."}).option("proxy-bright",{requiresArg:!0,describe:"Specify a proxy URL to route all outbound traffic through. For more information, see the --proxy option."}).option("proxy-target",{requiresArg:!0,describe:"Specify a proxy URL to route all inbound traffic through. For more information, see the --proxy option."}).option("timeout",{describe:"Request timeout in seconds or a duration string (e.g. 10s, 1m, 1h, 10h, 1y).",default:30,coerce:e=>isNaN(+e)?(0,a.default)(e):1e3*+e}).conflicts({proxy:["proxy-bright","proxy-target"],hostname:"cluster"}).middleware((e=>{const{api:t,repeaterServer:i}=o.Helpers.getClusterUrls(e);if(e.api=t,e.repeaterServer=i,e.logFile){const t={maxSize:e["log-max-size"],maxFiles:e["log-max-files"],interval:e["log-rotate-interval"],compress:!1===e["log-compress"]?void 0:"gzip"};o.Logger.configure(e.logLevel,e.logFile,t)}})).middleware((e=>(o.logger.logLevel=e["log-level"],e["log-file"]&&(o.logger.logFile=e["log-file"]),e))).middleware((e=>{var t;return o.logger.logLevel=isNaN(+e.logLevel)?o.LogLevel[null===(t=e.logLevel)||void 0===t?void 0:t.toString().toUpperCase()]:+e.logLevel})).usage("Usage: $0 <command> [options] [<file | scan>]").pkgConf("bright",r.cwd).example("$0 archive:generate --mockfile=.mockfile --name=archive.har","output har file on base your mock requests");return e.reduce(((e,t)=>e.command(this.wrapWithSentry(t))),s).recommendCommands().demandCommand(1).strict(!0).version(r.version).alias("v","version").help("help").alias("h","help").wrap(null)}wrapWithSentry(e){const t=e.handler.bind(e);return e.handler=async e=>{const i=new s.SystemConfigManager(e.api),r=await i.read();return(0,n.runWithAsyncContext)((()=>(this.initSentry(r.sentryDsn),(0,n.setContext)("args",e),i.enableBackgroundRotation((e=>{this.initSentry(e.sentryDsn)})),t(e))))},e}initSentry(e){(0,n.init)({dsn:e,attachStacktrace:!0,release:c.default.env.VERSION,beforeSend:e=>(e.contexts.args&&(e.contexts.args={...e.contexts.args,t:e.contexts.args.t&&"[Filtered]",token:e.contexts.args.token&&"[Filtered]"}),e)})}}},9750:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CliInfo=void 0;const r=i(5584),o=i(4199),s=r.__importDefault(i(6760)),n=i(3024);t.CliInfo=class CliInfo{constructor(e){var t,i;const r=this.getPackagePath(e),o=this.getPackageData(r);this.cwd=r?s.default.dirname(r):e,this.version=null!==(t="13.9.0-next.2")?t:null==o?void 0:o.version,this.distribution=null===(i=null==o?void 0:o.brightCli)||void 0===i?void 0:i.distribution}getPackageData(e){try{const t=(0,n.readFileSync)(e,"utf8");return JSON.parse(t)}catch{}}getPackagePath(e){return(0,o.sync)("package.json",{cwd:e||process.env.BRIGHT_CWD||process.cwd()})}}},2815:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigReader=void 0,t.ConfigReader=Symbol("ConfigReader")},6712:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultConfigReader=void 0;const r=i(1879),o=i(4199),s=i(7089),n=i(6760),a=i(3024),c=i(714);t.DefaultConfigReader=class DefaultConfigReader{constructor(){this.rcOptions=[".brightrc",".brightrc.json",".brightrc.yml",".brightrc.yaml","bright.config.js",".nexploitrc",".nexploitrc.json",".nexploitrc.yml",".nexploitrc.yaml","nexploit.config.js"],this.config=new Map}discovery(e){return(0,o.sync)(this.rcOptions,{cwd:e})}load(e){const t=(0,n.extname)(e.toLowerCase());return".js"===t?this.configure(this.loadCommonJsModule(e)):".yml"===t||".yaml"===t?this.configure((0,s.load)((0,a.readFileSync)(e,"utf8"))):this.configure(JSON.parse((0,a.readFileSync)(e,"utf-8"))),this}get(e){return this.config.get(e)}has(e){return this.config.has(e)}toJSON(){return[...this.config.entries()].reduce(((e,[t,i])=>(e[t]=i,e)),{})}loadCommonJsModule(e){var t,i;const r=(0,a.readFileSync)(e,{encoding:"utf8"}),o=new c.Script(r,{filename:e,timeout:100}),s={exports:{}},n=(0,c.createContext)({exports:s.exports,module:s});o.runInNewContext(n);const p=null!==(i=null===(t=n.module)||void 0===t?void 0:t.exports)&&void 0!==i?i:n.exports;return"function"==typeof p?p():p}configure(e){Object.entries(r.Helpers.omit(e)).map((([e,t])=>this.config.set(e,t)))}}},9654:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SystemConfigManager=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(8938)),n=i(1455),a=i(6760),c=i(8161),p=i(8500);t.SystemConfigManager=class SystemConfigManager{constructor(e){this.rotationInterval=36e5,this.path=(0,a.join)((0,c.homedir)(),".brightclirc"),this.backgroundRotationEnabled=!1,this.client=s.default.create({baseURL:e,timeout:1500,responseType:"json",transitional:{clarifyTimeoutError:!0}})}async read(){await this.rotateIfNecessary();return{sentryDsn:"https://d70acf8253162d45f1e45c1e599a6cee@o319856.ingest.sentry.io/4505924280385536",...(await this.getConfigFile()).data}}enableBackgroundRotation(e){this.backgroundRotationEnabled=!0,this.runBackgroundRotation(e).catch((e=>{o.logger.debug("An error occurred during background rotation",e)}))}disableBackgroundRotation(){this.backgroundRotationEnabled=!1}async runBackgroundRotation(e){for(;this.backgroundRotationEnabled;){o.logger.debug("Performing background rotation of system config file");if(await this.rotateIfNecessary()){e((await this.getConfigFile()).data),o.logger.debug("Background rotation is done, sleeping for %s ms",this.rotationInterval)}await(0,p.setTimeout)(this.rotationInterval,void 0,{ref:!1})}}needsRotation(e){return Date.now()-e.updatedAt.getTime()>=this.rotationInterval}async rotateIfNecessary(){o.logger.debug("Trying to rotate system config");const e=await this.getConfigFile();if(!this.needsRotation(e))return o.logger.debug("Rotation is not needed, last updated on: %s ms",e.updatedAt),!1;o.logger.debug("Rotating system config last updated on: %s ms",e.updatedAt);const t=await this.fetchNewConfig();return t?(await this.updateConfigFile({data:t,updatedAt:new Date}),!0):(o.logger.debug("Rotation failed"),await this.updateConfigFile({...e,updatedAt:new Date}),!1)}defaultConfigFile(){return{data:{},updatedAt:new Date}}async getConfigFile(){const e=this.defaultConfigFile();try{o.logger.debug("Loading system config file");const e=await(0,n.readFile)(this.path),t=JSON.parse(e.toString());return{...t,updatedAt:new Date(t.updatedAt)}}catch(t){return"ENOENT"===t.code?(o.logger.debug("System config file doesn't exist at %s",this.path),e):(o.logger.debug("Error during loading system config file",t),o.logger.debug("Using default system config file"),e)}}async updateConfigFile(e){o.logger.debug("Updating system config file");try{await(0,n.writeFile)(this.path,JSON.stringify(e))}catch(e){o.logger.debug("Error during updating system config file",e)}}async fetchNewConfig(){o.logger.debug("Fetching new system config");try{const{data:e}=await this.client.get("/api/v1/cli/config");return e}catch(e){o.logger.debug("Error during fetching new system config: ",e)}}}},1860:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(2675),t),r.__exportStar(i(2815),t),r.__exportStar(i(9750),t)},2264:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDiscoveryPollingFactory=void 0;const r=i(5584),o=i(8799),s=i(1042),n=i(8641);let a=class DefaultDiscoveryPollingFactory{constructor(e){this.discoveries=e}create(e){return new o.DiscoveryPolling(e,this.discoveries)}};a=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.Discoveries)),r.__metadata("design:paramtypes",[Object])],a),t.DefaultDiscoveryPollingFactory=a},1042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SourceType=t.DiscoveryType=t.Discoveries=void 0,t.Discoveries=Symbol("Discoveries"),function(e){e.CRAWLER="crawler",e.ARCHIVE="archive",e.OAS="oas"}(t.DiscoveryType||(t.DiscoveryType={})),function(e){e.OPEN_API="openapi",e.RAML="raml",e.POSTMAN="postman",e.HAR="har"}(t.SourceType||(t.SourceType={}))},8799:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoveryPolling=void 0;const r=i(5584),o=i(1879),s=i(9863),n=r.__importDefault(i(8938)),a=i(8500);t.DiscoveryPolling=class DiscoveryPolling{constructor(e,t){this.options=e,this.discoveryManager=t,this.defaultInterval=1e4,this.DEFAULT_RECONNECT_TIMES=20,this.abortController=new AbortController,this.options.timeout||(o.logger.warn('Warning: It looks like you\'ve been running polling without "timeout" option.'),o.logger.warn("The recommended way to install polling with a minimal timeout: 10-20min.")),this.options.interval&&this.options.interval<this.defaultInterval&&o.logger.warn("Warning: The minimal value for polling interval is 10 seconds.")}async start(){try{o.logger.log("Starting polling..."),this.initializePolling(),await this.runPollingLoop()}catch(e){this.handleError(e)}finally{await this.stop()}}async stop(){this.abortController.abort(),clearTimeout(this.timeoutDescriptor)}initializePolling(){this.options.timeout&&this.setTimeout()}async runPollingLoop(){for await(const e of this.poll()){if(!await this.processDiscoveryView(e))break}}handleError(e){this.abortController.signal.aborted||(o.ErrorMessageFactory.genericCommandError({error:e,command:"discovery:polling"}),process.exit(1))}setTimeout(e=this.options.timeout){this.timeoutDescriptor=setTimeout((()=>{this.abortController.abort(),o.logger.log("Polling has been stopped by timeout.")}),e),o.logger.debug("The polling timeout has been set to %d ms.",e)}async*poll(){for(;!this.abortController.signal.aborted;){const e=this.createBackoff(),t=await e.execute((()=>this.discoveryManager.get(this.options.projectId,this.options.discoveryId)));yield t,await this.delay()}}isFinished(e){return e===s.DiscoveryStatus.DONE||e===s.DiscoveryStatus.STOPPED||e===s.DiscoveryStatus.DISRUPTED||e===s.DiscoveryStatus.FAILED}async delay(){var e;const t=null!==(e=this.options.interval)&&void 0!==e?e:this.defaultInterval;await(0,a.setTimeout)(t,!1,{signal:this.abortController.signal})}createBackoff(){return new o.Backoff(this.DEFAULT_RECONNECT_TIMES,(e=>n.default.isAxiosError(e)&&e.status>500||["ECONNRESET","ENETDOWN","ENETUNREACH","ETIMEDOUT","ECONNREFUSED","ENOTFOUND","EAI_AGAIN","ESOCKETTIMEDOUT"].includes(e.code)))}handleDiscoveryStatus(e){const t={[s.DiscoveryStatus.RUNNING]:"Discovery is running.",[s.DiscoveryStatus.PENDING]:"Discovery is pending.",[s.DiscoveryStatus.SCHEDULED]:"Discovery is scheduled.",[s.DiscoveryStatus.QUEUED]:"Discovery is queued.",[s.DiscoveryStatus.DONE]:"Discovery has been completed.",[s.DiscoveryStatus.STOPPED]:"Discovery has been stopped.",[s.DiscoveryStatus.DISRUPTED]:"Discovery has been disrupted.",[s.DiscoveryStatus.FAILED]:"Discovery has failed."}[e]||`Discovery status is ${e}.`;o.logger.log(t)}processDiscoveryView(e){return e?(this.handleDiscoveryStatus(e.status),!this.isFinished(e.status)||(o.logger.log(`The discovery has been finished with status: ${e.status}.`),!1)):(o.logger.log("The discovery has not been found."),!1)}}},2297:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoveryPollingFactory=void 0,t.DiscoveryPollingFactory=Symbol("DiscoveryPollingFactory")},9863:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoveryStatus=void 0,function(e){e.RUNNING="running",e.PENDING="pending",e.STOPPED="stopped",e.FAILED="failed",e.DONE="done",e.DISRUPTED="disrupted",e.SCHEDULED="scheduled",e.QUEUED="queued"}(t.DiscoveryStatus||(t.DiscoveryStatus={}))},6768:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestDiscoveries=t.RestDiscoveryOptions=void 0;const r=i(5584),o=i(1042),s=i(1879),n=i(1860),a=i(8641),c=r.__importDefault(i(8938)),p=r.__importDefault(i(7067)),l=r.__importDefault(i(4708));t.RestDiscoveryOptions=Symbol("RestDiscoveryOptions");let d=class RestDiscoveries{constructor(e,t,{baseURL:i,apiKey:r,timeout:o,insecure:s,proxyURL:n}){this.info=e,this.proxyFactory=t;const{httpAgent:a=new p.default.Agent,httpsAgent:d=new l.default.Agent({rejectUnauthorized:!s})}=n?this.proxyFactory.createProxy({proxyUrl:n,rejectUnauthorized:!s}):{};this.client=c.default.create({baseURL:i,timeout:o,httpAgent:a,httpsAgent:d,responseType:"json",headers:{authorization:`Api-Key ${r}`}})}async create(e,t){const i=await this.prepareConfig({...t});return(await this.client.post(`/api/v2/projects/${e}/discoveries`,i)).data}async rerun(e,t){return(await this.client.post(`/api/v2/projects/${e}/discoveries/${t}/rerun`)).data.id}async stop(e,t){await this.client.put(`/api/v2/projects/${e}/discoveries/${t}/lifecycle`,{action:"stop"})}async delete(e,t){await this.client.delete(`/api/v2/projects/${e}/discoveries/${t}`)}async get(e,t,i){return(await this.client.get(`/api/v2/projects/${e}/discoveries/${t}`,{signal:null==i?void 0:i.signal})).data}async prepareConfig({headers:e,...t}){return{...await this.applyDefaultSettings(t),info:{source:"cli",client:{name:"bright-cli",version:this.info.version}},headers:e?Object.entries(e).map((([e,t])=>({name:e,value:t,mergeStrategy:"replace"}))):void 0}}async applyDefaultSettings(e){var t,i;const r=(null===(t=e.exclusions)||void 0===t?void 0:t.params)||(null===(i=e.exclusions)||void 0===i?void 0:i.requests)?e.exclusions:void 0;let o=await this.exploreDiscovery(e);return o=(null==o?void 0:o.length)?o:void 0,{...e,discoveryTypes:o,exclusions:r}}async exploreDiscovery(e){const t=[],{fileId:i,crawlerUrls:r}=e;if(Array.isArray(r)&&t.push(o.DiscoveryType.CRAWLER),i)try{const{data:e}=await this.client.get(`/api/v2/files/${i}`);t.push(e.type===o.SourceType.HAR?o.DiscoveryType.ARCHIVE:o.DiscoveryType.OAS)}catch(e){throw new Error(`Error loading file with id "${i}": No such file or you do not have permissions.`)}return t}};d=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)((0,a.delay)((()=>n.CliInfo)))),r.__param(1,(0,a.inject)(s.ProxyFactory)),r.__param(2,(0,a.inject)(t.RestDiscoveryOptions)),r.__metadata("design:paramtypes",[n.CliInfo,Object,Object])],d),t.RestDiscoveries=d},512:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(1042),t),r.__exportStar(i(6768),t),r.__exportStar(i(2297),t),r.__exportStar(i(2264),t)},8174:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultHostUpdateJobStatusPollingFactory=void 0;const r=i(5584),o=i(7461),s=i(839),n=i(8641);let a=class DefaultHostUpdateJobStatusPollingFactory{constructor(e){this.entryPoints=e}create(e){return new o.HostUpdateJobStatusPolling(e,this.entryPoints)}};a=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.EntryPoints)),r.__metadata("design:paramtypes",[Object])],a),t.DefaultHostUpdateJobStatusPollingFactory=a},839:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EntryPoints=t.JobStatus=void 0,function(e){e.PENDING="pending",e.PROCESSING="processing",e.COMPLETED="completed",e.FAILED="failed"}(t.JobStatus||(t.JobStatus={})),t.EntryPoints=Symbol("EntryPoints")},7461:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HostUpdateJobStatusPolling=void 0;const r=i(5584),o=i(1879),s=i(839),n=r.__importDefault(i(8938)),a=i(8500);t.HostUpdateJobStatusPolling=class HostUpdateJobStatusPolling{constructor(e,t){this.options=e,this.entryPoints=t,this.defaultInterval=1e4,this.DEFAULT_RECONNECT_TIMES=20,this.abortController=new AbortController,this.options.timeout||(o.logger.warn('Warning: It looks like you\'ve been running polling without "timeout" option.'),o.logger.warn("The recommended way to install polling with a minimal timeout: 10-60min.")),this.options.interval&&this.options.interval<this.defaultInterval&&o.logger.warn("Warning: The minimal value for polling interval is 10 seconds.")}async start(){try{o.logger.log("Starting polling..."),this.initializePolling(),await this.runPollingLoop()}catch(e){this.handleError(e)}finally{await this.stop()}}async stop(){this.abortController.abort(),clearTimeout(this.timeoutDescriptor)}initializePolling(){this.options.timeout&&this.setTimeout()}async runPollingLoop(){for await(const e of this.poll()){if(!await this.processJobView(e))break}}handleError(e){this.abortController.signal.aborted||(o.logger.error(o.ErrorMessageFactory.genericCommandError({error:e,command:"entrypoints:update-host-polling"})),process.exit(1))}setTimeout(e=this.options.timeout){this.timeoutDescriptor=setTimeout((()=>{this.abortController.abort(),o.logger.log("Polling has been stopped by timeout.")}),e),o.logger.debug("The polling timeout has been set to %d ms.",e)}async*poll(){for(;!this.abortController.signal.aborted;){const e=this.createBackoff(),t=await e.execute((()=>this.entryPoints.getHostUpdateJobStatus({jobId:this.options.jobId,projectId:this.options.projectId})));o.logger.debug("Host update job data: %j",t),yield t,await this.delay()}}isFinished(e){return e===s.JobStatus.COMPLETED||e===s.JobStatus.FAILED}async delay(){var e;const t=null!==(e=this.options.interval)&&void 0!==e?e:this.defaultInterval;await(0,a.setTimeout)(t,!1,{signal:this.abortController.signal})}createBackoff(){return new o.Backoff(this.DEFAULT_RECONNECT_TIMES,(e=>n.default.isAxiosError(e)&&e.status>500||["ECONNRESET","ENETDOWN","ENETUNREACH","ETIMEDOUT","ECONNREFUSED","ENOTFOUND","EAI_AGAIN","ESOCKETTIMEDOUT"].includes(e.code)))}handleJobStatus(e){const t={[s.JobStatus.PENDING]:"Host update job is pending.",[s.JobStatus.PROCESSING]:"Host update job is processing.",[s.JobStatus.COMPLETED]:"Host update job has been completed.",[s.JobStatus.FAILED]:"Host update job has failed."}[e]||`Host update job status is ${e}.`;o.logger.log(t)}processJobView(e){return e?(this.handleJobStatus(e.status),!this.isFinished(e.status)||(o.logger.log(`The host update job has been finished with status: ${e.status}.`),!1)):(o.logger.log("The host update job has not been found."),!1)}}},7035:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HostUpdateJobStatusPollingFactory=void 0,t.HostUpdateJobStatusPollingFactory=Symbol("HostUpdateJobStatusPollingFactory")},9:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestEntryPoints=t.RestProjectsOptions=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(8938)),n=i(8641),a=r.__importDefault(i(7067)),c=r.__importDefault(i(4708));t.RestProjectsOptions=Symbol("RestProjectsOptions");let p=class RestEntryPoints{constructor(e,{baseURL:t,apiKey:i,insecure:r,proxyURL:o,timeout:n}){this.proxyFactory=e,this.entrypointsPaginationBatchSize=50;const{httpAgent:p=new a.default.Agent,httpsAgent:l=new c.default.Agent({rejectUnauthorized:!r})}=o?this.proxyFactory.createProxy({proxyUrl:o,rejectUnauthorized:!r}):{};this.client=s.default.create({baseURL:t,timeout:n,httpAgent:p,httpsAgent:l,responseType:"json",headers:{authorization:`Api-Key ${i}`}})}async entrypoints({limit:e=10,projectId:t,...i}){let r=e;const o=[];let s,n;for(;r>0;){const{data:{items:e=[]}}=await this.client.get(`/api/v2/projects/${t}/entry-points`,{params:{nextId:s,nextCreatedAt:n,...i,limit:Math.min(r,this.entrypointsPaginationBatchSize)}});if(!e.length)break;o.push(...e),({id:s,createdAt:n}=e[e.length-1]),r-=this.entrypointsPaginationBatchSize}return o}async updateHost(e){const{projectId:t,oldHostname:i,newHostname:r,entryPointIds:o}=e,{data:s}=await this.client.post(`/api/v2/projects/${t}/entry-points/update-host`,{oldHostname:i,newHostname:r,entryPointIds:o});return s}async getHostUpdateJobStatus(e){const{jobId:t,projectId:i}=e,{data:r}=await this.client.get(`/api/v2/projects/${i}/entry-points/update-host/${t}`);return r}};p=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(o.ProxyFactory)),r.__param(1,(0,n.inject)(t.RestProjectsOptions)),r.__metadata("design:paramtypes",[Object,Object])],p),t.RestEntryPoints=p},8224:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(839),t),r.__exportStar(i(9),t)},1243:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRepeaterCommandHub=void 0;const r=i(5584),o=i(7758),s=i(1879),n=i(5721),a=i(2046),c=i(8641),p=i(8161);let l=class DefaultRepeaterCommandHub{constructor(e,t){this.virtualScripts=e,this.requestExecutors=t}compileScripts(e){this.virtualScripts.clear(o.VirtualScriptType.REMOTE),this.virtualScripts.size?s.logger.warn("Error Loading Script: Cannot accept scripts from the cloud when a local script is already loaded"):"string"==typeof e?this.virtualScripts.set("*",o.VirtualScriptType.REMOTE,e):Object.entries(e).map((([e,t])=>this.virtualScripts.set(e,o.VirtualScriptType.REMOTE,t)))}sendRequest(e){const{protocol:t}=e,i=this.requestExecutors.find((e=>e.protocol===t));if(!i)throw new Error(`Unsupported protocol "${t}"`);return i.execute(e)}testNetwork(e,t){return new Promise(((i,r)=>{const o=["configure",`--${e}`];s.logger.debug('Launching "Network Diagnostic" process with cmd: %j',o);const a=s.Helpers.spawn({include:o,exclude:["repeater"]});a.unref();const c=[];a.stdout.on("data",(e=>{const i=e.toString(),r=i.split("\n").filter((e=>e.length>0));c.push(...r);const[o,...s]=[].concat(t);i.indexOf(n.ReadlinePlatform.URLS_QUESTION)>-1&&a.stdin.write(`${[o,...s].join(",")}${p.EOL}`),i.indexOf(n.ReadlinePlatform.HOST_OR_IP_QUESTION)>-1&&a.stdin.write(`${new URL(o).hostname}${p.EOL}`),i.indexOf(n.ReadlinePlatform.COMPELED_MESSAGE)>-1&&a.stdin.end()})),a.once("error",(e=>{s.logger.warn('Failed to start "Network Diagnostic" due to %s',e.message),r(e)})),a.on("close",(e=>{if(0!==e||0===c.length){const t=`"Network Diagnostic" did not start successfully. Process exited with code ${e}`;return s.logger.warn(t),r(new Error(t))}i(this.processOutput(c))}))}))}processOutput(e){return e.filter(((e,t,i)=>!(e.endsWith("[1G")||i[t+1]&&"[1G"===i[t+1]))).filter((e=>!e.startsWith(n.ReadlinePlatform.URLS_QUESTION))).join("\n")}};l=r.__decorate([(0,c.injectable)(),r.__param(0,(0,c.inject)(o.VirtualScripts)),r.__param(1,(0,c.injectAll)(a.RequestExecutor)),r.__metadata("design:paramtypes",[Object,Array])],l),t.DefaultRepeaterCommandHub=l},8788:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRepeaterServer=t.DefaultRepeaterServerOptions=void 0;const r=i(5584),o=i(1879),s=i(1475),n=i(8641),a=r.__importDefault(i(5199)),c=r.__importDefault(i(7060)),p=i(6436),l=i(8474);t.DefaultRepeaterServerOptions=Symbol("DefaultRepeaterServerOptions");let d=class DefaultRepeaterServer{constructor(e,t){this.proxyFactory=e,this.options=t,this.MAX_DEPLOYMENT_TIMEOUT=6e4,this.MIN_RECONNECTION_DELAY=5e3,this.MAX_RECONNECTION_DELAY=1e3,this.events=new l.EventEmitter,this.handlerMap=new WeakMap,this.connectionAttempts=0,this.handleConnectionError=e=>{const{data:t}=e;t&&this.suppressConnectionError(t)&&this.events.emit("error",{...t,message:e.message}),this.scheduleReconnection()},this.handleConnect=()=>{this.connectionAttempts=0,this.clearConnectionTimer(),this.events.emit("connected")},this.handleDisconnect=e=>{"io client disconnect"!==e&&this.events.emit("disconnected"),"io server disconnect"===e&&this.socket.connect()}}get socket(){if(!this._socket)throw new Error("Please make sure that repeater established a connection with host.");return this._socket}disconnect(){var e,t;this.events.removeAllListeners(),this.clearConnectionTimer(),null===(e=this._socket)||void 0===e||e.disconnect(),null===(t=this._socket)||void 0===t||t.removeAllListeners(),this._socket=void 0}async deploy(e,t){process.nextTick((()=>this.socket.emit("deploy",e,t)));const[i]=await Promise.race([(0,l.once)(this.socket,"deployed"),new Promise(((e,t)=>setTimeout(t,this.MAX_DEPLOYMENT_TIMEOUT,new Error("No response.")).unref()))]);return i}async connect(e){var t;this._socket=(0,a.default)(this.options.uri,{parser:c.default,path:"/api/ws/v1",transports:["websocket"],reconnectionDelayMax:this.MAX_RECONNECTION_DELAY,reconnectionDelay:this.MIN_RECONNECTION_DELAY,timeout:null===(t=this.options)||void 0===t?void 0:t.connectTimeout,rejectUnauthorized:!this.options.insecure,agent:this.options.proxyUrl?this.proxyFactory.createProxyForClient({proxyUrl:this.options.proxyUrl,targetUrl:this.options.uri,rejectUnauthorized:!this.options.insecure}):void 0,auth:{token:this.options.token,domain:e}}),this.listenToReservedEvents(),this.listenToApplicationEvents(),await(0,l.once)(this.socket,"connect"),o.logger.debug("Repeater connected to %s",this.options.uri)}off(e,t){const i=this.handlerMap.get(t);i&&(this.events.off(e,i),this.handlerMap.delete(t))}on(e,t){const wrappedHandler=(...i)=>this.wrapEventListener(e,t,...i);this.handlerMap.set(t,wrappedHandler),this.events.on(e,wrappedHandler)}listenToApplicationEvents(){this.socket.on("deployed",(e=>this.events.emit("deploy",e))),this.socket.on("request",((e,t)=>this.events.emit("request",e,t))),this.socket.on("test-network",((e,t)=>this.events.emit("test_network",e,t))),this.socket.on("error",(e=>{(0,p.captureMessage)(e.message),this.events.emit("error",e)})),this.socket.on("update-available",(e=>this.events.emit("update_available",e))),this.socket.on("scripts-updated",(e=>this.events.emit("scripts_updated",e))),this.socket.on("limits",(e=>this.events.emit("limits",e)))}listenToReservedEvents(){this.socket.on("connect",this.handleConnect),this.socket.on("connect_error",this.handleConnectionError),this.socket.on("disconnect",this.handleDisconnect),this.socket.io.on("reconnect",(()=>{this.latestReconnectionError=void 0})),this.socket.io.on("reconnect_error",(e=>this.latestReconnectionError=e)),this.socket.io.on("reconnect_failed",(()=>this.events.emit("reconnection_failed",{error:this.latestReconnectionError}))),this.socket.io.on("reconnect_attempt",(e=>this.events.emit("reconnect_attempt",{attempt:e}))),this.socket.io.on("reconnect",(()=>this.events.emit("reconnection_succeeded")))}suppressConnectionError(e){return[s.RepeaterErrorCodes.REPEATER_UNAUTHORIZED,s.RepeaterErrorCodes.REPEATER_NOT_PERMITTED].includes(e.code)}scheduleReconnection(){let e=Math.max(this.MIN_RECONNECTION_DELAY*2**this.connectionAttempts,this.MIN_RECONNECTION_DELAY);e+=.3*e*Math.random(),e=Math.min(e,this.MAX_RECONNECTION_DELAY),this.connectionAttempts++,this.events.emit("reconnect_attempt",{attempt:this.connectionAttempts}),this.connectionTimer=setTimeout((()=>this.socket.connect()),e)}async wrapEventListener(e,t,...i){try{const e=this.extractLastArgument(i),r=await t(...i);null==e||e(r)}catch(t){this.handleEventError(t,e,i)}}extractLastArgument(e){const t=e.pop();return"function"==typeof t?t:void e.push(t)}clearConnectionTimer(){this.connectionTimer&&clearTimeout(this.connectionTimer)}handleEventError(e,t,i){(0,p.captureException)(e),o.logger.debug("An error occurred while processing the %s event with the following payload: %j",t,i),o.logger.error(e)}};d=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(o.ProxyFactory)),r.__param(1,(0,n.inject)(t.DefaultRepeaterServerOptions)),r.__metadata("design:paramtypes",[Object,Object])],d),t.DefaultRepeaterServer=d},8553:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRuntimeDetector=void 0;const r=i(5584),o=i(1860),s=r.__importDefault(i(1184)),n=i(8641),a=r.__importDefault(i(9267)),c=i(1421),p=r.__importDefault(i(8161));let l=class DefaultRuntimeDetector{constructor(e){this.cliInfo=e}distribution(){return this.cliInfo.distribution}isInsideDocker(){return!!process.env.BRIGHT_CLI_DOCKER}nodeVersion(){return process.version}ci(){var e;return null!==(e=a.default.name)&&void 0!==e?e:void 0}arch(){try{return(0,s.default)()}catch{}return p.default.arch()}os(){const e=p.default.platform();return"darwin"===e?this.detectMacosVersion():"linux"===e?this.detectLinuxVersion():"win32"===e?this.detectWindowsVersion():`${p.default.platform()} (${p.default.release()})`}detectMacosVersion(){try{const e=(0,c.execSync)("sw_vers -productName",{encoding:"utf8"}).trim(),t=(0,c.execSync)("sw_vers -productVersion",{encoding:"utf8"}).trim(),i=(0,c.execSync)("sw_vers -buildVersion",{encoding:"utf8"}).trim();if(e.length&&t.length&&i.length)return`${e} ${t} (${i})`}catch{}return`${p.default.platform()} (${p.default.release()})`}detectLinuxVersion(){try{const e=(0,c.execSync)("cat /etc/os-release",{encoding:"utf8"}).trim(),extractValue=t=>{var i;return null===(i=new RegExp(`(?:^|[\r\n]+)${t}(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*"(?:\\\\"|[^"])*"|\\s*\`(?:\\\\\`|[^\`])*\`|[^#\r\n]+)?`,"i").exec(e))||void 0===i?void 0:i[1].replace(/^(['"`])([\s\S]*)\1$/i,"$2")},t=extractValue("NAME")||extractValue("ID"),i=extractValue("VERSION")||extractValue("VERSION_ID"),r=extractValue("PRETTY_NAME");if(t.length&&i.length)return`${t} ${i}`;if(r.length)return r}catch{}return`${p.default.platform()} (${p.default.release()})`}detectWindowsVersion(){try{const e=(0,c.execSync)("ver",{encoding:"utf8"}).trim();if(e.length)return e}catch{}return`${p.default.platform()} (${p.default.release()})`}};l=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)((0,n.delay)((()=>o.CliInfo)))),r.__metadata("design:paramtypes",[o.CliInfo])],l),t.DefaultRuntimeDetector=l},868:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkTestType=void 0,function(e){e.PING="ping",e.TRACEROUTE="traceroute"}(t.NetworkTestType||(t.NetworkTestType={}))},9912:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RepeaterCommandHub=void 0,t.RepeaterCommandHub=Symbol("RepeaterCommandHub")},9888:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RepeaterLauncher=void 0,t.RepeaterLauncher=Symbol("RepeaterLauncher")},1475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RepeaterServer=t.RepeaterErrorCodes=void 0,function(e){e.REPEATER_NOT_PERMITTED="repeater_not_permitted",e.REPEATER_ALREADY_STARTED="repeater_already_started",e.REPEATER_DEACTIVATED="repeater_deactivated",e.REPEATER_UNAUTHORIZED="repeater_unauthorized",e.REPEATER_NO_LONGER_SUPPORTED="repeater_no_longer_supported",e.UNKNOWN_ERROR="unknown_error",e.UNEXPECTED_ERROR="unexpected_error"}(t.RepeaterErrorCodes||(t.RepeaterErrorCodes={})),t.RepeaterServer=Symbol("RepeaterServer")},6520:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeDetector=void 0,t.RuntimeDetector=Symbol("RuntimeDetector")},4171:(e,t,i)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ServerRepeaterLauncher=void 0;const o=i(5584),s=i(1475),n=i(6520),a=i(7758),c=i(9369),p=i(2046),l=i(1879),d=i(1860),u=i(9912),h=i(8641),f=o.__importDefault(i(6895)),m=i(6436);let y=r=class ServerRepeaterLauncher{constructor(e,t,i,r,o,s,n,a,c){this.runtimeDetector=e,this.virtualScripts=t,this.repeaterServer=i,this.startupManager=r,this.commandHub=o,this.certificates=s,this.scriptLoader=n,this.requestExecutorOptions=a,this.info=c,this.repeaterRunning=!1,this.handleError=({code:e,message:t,remediation:i})=>{const r=this.normalizeMessage(t),o=this.normalizeMessage(null!=i?i:"");this.isCriticalError(e)?this.handleCriticalError(r,o):l.logger.error(r)},this.deployRepeater=async()=>{try{await this.repeaterServer.deploy({repeaterId:this.repeaterId},this.getRuntime()),l.logger.log("The Repeater (%s) started",this.info.version)}catch{}},this.reconnectionFailed=({error:e})=>{(0,m.captureException)(e),l.logger.error(e),this.close().catch(l.logger.error),process.exitCode=1},this.testingNetwork=async e=>{try{return{output:await this.commandHub.testNetwork(e.type,e.input)}}catch(e){return{error:"string"==typeof e?e:e.message}}},this.limitsReceived=e=>{l.logger.debug("Limits received: %i",e.maxBodySize),this.requestExecutorOptions.maxBodySize=e.maxBodySize},this.requestReceived=async e=>{const t=await this.commandHub.sendRequest(new p.Request({...e})),{statusCode:i,message:r,errorCode:o,body:s,headers:n,protocol:a,encoding:c}=t;return{protocol:a,body:s,headers:n,statusCode:i,errorCode:o,message:r,encoding:c}}}close(){return this.repeaterRunning=!1,this.repeaterServer.disconnect(),Promise.resolve()}async install(){const{command:e,args:t}=l.Helpers.getExecArgs({escape:!1,include:["--run"],exclude:["--daemon","-d"]});await this.startupManager.install({command:e,args:t,name:r.SERVICE_NAME,displayName:"Bright Repeater"}),l.logger.log("A Repeater daemon process was initiated successfully (SERVICE: %s)",r.SERVICE_NAME)}loadCerts(e){return this.certificates.load(e)}loadScripts(e){return this.scriptLoader.load(e)}async uninstall(){await this.startupManager.uninstall(r.SERVICE_NAME),l.logger.log("The Repeater daemon process (SERVICE: %s) was stopped and deleted successfully",r.SERVICE_NAME)}async run(e,t=!1){this.repeaterRunning||(this.repeaterRunning=!0,(0,m.setTag)("bridge_id",e),t&&await this.startupManager.run((()=>this.close())),l.logger.log("Starting the Repeater (%s)...",this.info.version),this.repeaterId=e,this.subscribeToEvents(),await this.repeaterServer.connect(this.repeaterId))}getRuntime(){return{version:this.info.version,scriptsLoaded:!!this.virtualScripts.size,ci:this.runtimeDetector.ci(),os:this.runtimeDetector.os(),arch:this.runtimeDetector.arch(),docker:this.runtimeDetector.isInsideDocker(),distribution:this.runtimeDetector.distribution(),nodeVersion:this.runtimeDetector.nodeVersion()}}subscribeToEvents(){this.repeaterServer.on("connected",this.deployRepeater),this.repeaterServer.on("error",this.handleError),this.repeaterServer.on("reconnection_failed",this.reconnectionFailed),this.repeaterServer.on("request",this.requestReceived),this.repeaterServer.on("limits",this.limitsReceived),this.repeaterServer.on("test_network",this.testingNetwork),this.repeaterServer.on("scripts_updated",(e=>this.commandHub.compileScripts(e.script))),this.repeaterServer.on("update_available",(e=>l.logger.warn("%s: A new Repeater version (%s) is available, for update instruction visit https://docs.brightsec.com/docs/installation-options",f.default.yellow("(!) IMPORTANT"),e.version))),this.repeaterServer.on("reconnect_attempt",(({attempt:e})=>l.logger.warn("Failed to connect to Bright cloud (attempt %d)",e))),this.repeaterServer.on("reconnection_succeeded",(()=>l.logger.log("The Repeater (%s) connected",this.info.version)))}normalizeMessage(e){return e.replace(/\.$/,"")}isCriticalError(e){return[s.RepeaterErrorCodes.REPEATER_DEACTIVATED,s.RepeaterErrorCodes.REPEATER_NO_LONGER_SUPPORTED,s.RepeaterErrorCodes.REPEATER_UNAUTHORIZED,s.RepeaterErrorCodes.REPEATER_ALREADY_STARTED,s.RepeaterErrorCodes.REPEATER_NOT_PERMITTED,s.RepeaterErrorCodes.UNEXPECTED_ERROR].includes(e)}handleCriticalError(e,t){l.logger.error("%s: %s. %s",f.default.red("(!) CRITICAL"),e,t),this.close().catch(l.logger.error),process.exitCode=1}};y.SERVICE_NAME="bright-repeater",y=r=o.__decorate([(0,h.injectable)(),o.__param(0,(0,h.inject)(n.RuntimeDetector)),o.__param(1,(0,h.inject)(a.VirtualScripts)),o.__param(2,(0,h.inject)(s.RepeaterServer)),o.__param(3,(0,h.inject)(c.StartupManager)),o.__param(4,(0,h.inject)(u.RepeaterCommandHub)),o.__param(5,(0,h.inject)(p.Certificates)),o.__param(6,(0,h.inject)(a.ScriptLoader)),o.__param(7,(0,h.inject)(p.RequestExecutorOptions)),o.__param(8,(0,h.inject)((0,h.delay)((()=>d.CliInfo)))),o.__metadata("design:paramtypes",[Object,Object,Object,Object,Object,Object,Object,Object,d.CliInfo])],y),t.ServerRepeaterLauncher=y},8914:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(9912),t),r.__exportStar(i(1243),t),r.__exportStar(i(868),t),r.__exportStar(i(8788),t),r.__exportStar(i(9888),t),r.__exportStar(i(1475),t),r.__exportStar(i(4171),t),r.__exportStar(i(6520),t),r.__exportStar(i(8553),t)},7412:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Certificates=void 0,t.Certificates=Symbol("Certificates")},3348:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CertificatesCache=void 0,t.CertificatesCache=Symbol("CertificatesCache")},1667:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CertificatesLoader=void 0;const r=i(5584),o=i(1879),s=r.__importDefault(i(953)),n=r.__importDefault(i(4708)),a=i(1455);t.CertificatesLoader=class CertificatesLoader{constructor(){this.CERT_FILES=["/etc/ssl/certs/ca-certificates.crt","/etc/pki/tls/certs/ca-bundle.crt","/etc/ssl/ca-bundle.pem","/etc/pki/tls/cacert.pem","/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem","/etc/ssl/cert.pem"]}async load(e){const t="win32"===process.platform;try{t?(0,s.default)():"string"==typeof e?await this.loadCertsFromFile(e):await this.discoveryDefaultLocations()}catch{o.logger.warn(`Error Loading Certificate: Cannot load certificates from ${t?"Trusted Root Certification Authorities Certificate Store":e}.`)}}async discoveryDefaultLocations(){for(const e of this.CERT_FILES)try{return void await this.loadCertsFromFile(e)}catch{}o.logger.warn("Error Loading Certificate: Cannot load certificates from the system root. Please use --cacert option to specify the accurate path to the file. https://docs.brightsec.com/docs/initializing-the-repeater#options")}async loadCertsFromFile(e){const t=await(0,a.readFile)(e,"utf8");n.default.globalAgent.options.ca=t.split(/-----END CERTIFICATE-----\n?/).filter((e=>!!e)).map((e=>`${e}-----END CERTIFICATE-----\n`))}}},2514:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CertificatesResolver=void 0,t.CertificatesResolver=Symbol("CertificatesResolver")},1609:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCertificatesCache=void 0;const r=i(5584),o=i(1879),s=i(8641);let n=class DefaultCertificatesCache{constructor(){this.cache=new Map}add(e,t){const i=this.certificateCacheKeyFromRequest(e);this.cache.has(i)||this.cache.set(i,t)}get(e){return this.cache.get(this.certificateCacheKeyFromRequest(e))}certificateCacheKeyFromRequest(e){const t=new URL(e.url);return`${t.hostname}_${o.Helpers.portFromURL(t)}`}};n=r.__decorate([(0,s.injectable)()],n),t.DefaultCertificatesCache=n},9945:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCertificatesResolver=void 0;const r=i(5584),o=i(8718),s=i(3348),n=i(8641);let a=class DefaultCertificatesResolver{constructor(e){this.certificatesCache=e}resolve(e,t){const i=this.certificatesCache.get(e);if(i)return[i];const r=new URL(e.url),s=o.Helpers.portFromURL(r);return t.filter((e=>this.matchHostnameAndPort(r.hostname,s,e)))}matchHostnameAndPort(e,t,i){return!(i.hostname!==e&&!o.Helpers.wildcardToRegExp(i.hostname).test(e))&&(!i.port||i.port===t)}};a=r.__decorate([(0,n.injectable)(),r.__param(0,(0,n.inject)(s.CertificatesCache)),r.__metadata("design:paramtypes",[Object])],a),t.DefaultCertificatesResolver=a},9846:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestExecutor=void 0;const r=i(5584),o=i(1795),s=i(4479),n=i(1879),a=i(7758),c=i(5232),p=i(18),l=i(7084),d=i(3348),u=i(2514),h=i(8641),f=r.__importDefault(i(7868)),m=i(7331),y=i(3136),g=r.__importDefault(i(7067)),b=r.__importDefault(i(4708)),v=i(8474),_=i(8522);let w=class HttpRequestExecutor{constructor(e,t,i,r,o){if(this.virtualScripts=e,this.proxyFactory=t,this.options=i,this.certificatesCache=r,this.certificatesResolver=o,this.DEFAULT_SCRIPT_ENTRYPOINT="handle",this.options.proxyUrl&&({httpsAgent:this.httpsProxyAgent,httpAgent:this.httpProxyAgent}=this.proxyFactory.createProxy({proxyUrl:this.options.proxyUrl})),this.options.reuseConnection){const e={keepAlive:!0,maxSockets:100,timeout:this.options.timeout};this.httpsAgent=new b.default.Agent(e),this.httpAgent=new g.default.Agent(e)}if(this.options.proxyDomains&&this.options.proxyDomainsBypass)throw new Error("cannot use both proxyDomains and proxyDomainsBypass at the same time");this.options.proxyDomains&&(this.proxyDomains=this.options.proxyDomains.map((e=>n.Helpers.wildcardToRegExp(e)))),this.options.proxyDomainsBypass&&(this.proxyDomainsBypass=this.options.proxyDomainsBypass.map((e=>n.Helpers.wildcardToRegExp(e))))}get protocol(){return c.Protocol.HTTP}async execute(e){var t;try{this.options.headers&&e.setHeaders(this.options.headers),e=await this.transformScript(e);const t=this.options.certs?this.certificatesResolver.resolve(e,this.options.certs):void 0;return void 0===t||0===t.length?(n.logger.debug("Executing HTTP request with following params: %j",e),await this.executeRequest(e)):await this.tryRequestWithCertificates(e,t)}catch(i){const{cause:r}=i,{message:s,code:a,syscall:c,name:p}=null!=r?r:i,l=null!==(t=null!=a?a:c)&&void 0!==t?t:p;return n.logger.error('Error executing request: "%s %s HTTP/1.1"',e.method,e.url),n.logger.error("Cause: %s",s),new o.Response({message:s,errorCode:l,protocol:this.protocol})}}async request(e){let t,i;try{const r=this.createRequest(e);process.nextTick((()=>r.end(e.encoding?f.default.encode(e.body,e.encoding):e.body))),t=this.setTimeout(r,e.timeout),[i]=await(0,v.once)(r,"response")}finally{clearTimeout(t)}return this.truncateResponse(e,i)}createRequest(e){const t=(e.secureEndpoint?b.default:g.default).request(this.createRequestOptions(e));return this.setHeaders(t,e),t.hasHeader("accept-encoding")||t.setHeader("accept-encoding","gzip, deflate"),t}setTimeout(e,t){if(null!=t||(t=this.options.timeout),"number"==typeof t)return setTimeout((()=>e.destroy(Object.assign(new Error("Waiting response has timed out"),{code:"ETIMEDOUT"}))),t)}createRequestOptions(e){var t;const{auth:i,hostname:r,port:o,hash:s="",pathname:n="/",search:a=""}=(0,y.parse)(e.url);return{hostname:r,port:o,path:`${null!=n?n:"/"}${null!=a?a:""}${null!=s?s:""}`,auth:i,agent:this.getRequestAgent(e),timeout:null!==(t=e.timeout)&&void 0!==t?t:this.options.timeout,ca:e.ca,pfx:e.pfx,passphrase:e.passphrase,method:e.method,rejectUnauthorized:!1}}getRequestAgent(e){var t,i;return this.proxyDomains&&!this.proxyDomains.some((t=>t.test((0,y.parse)(e.url).hostname)))?(n.logger.debug("Not using proxy for URL '%s'",e.url),e.secureEndpoint?this.httpsAgent:this.httpAgent):this.proxyDomainsBypass&&this.proxyDomainsBypass.some((t=>t.test((0,y.parse)(e.url).hostname)))?(n.logger.debug("Bypassing proxy for URL '%s'",e.url),e.secureEndpoint?this.httpsAgent:this.httpAgent):e.secureEndpoint?null!==(t=this.httpsProxyAgent)&&void 0!==t?t:this.httpsAgent:null!==(i=this.httpProxyAgent)&&void 0!==i?i:this.httpAgent}async truncateResponse({decompress:e,encoding:t,maxContentSize:i,url:r},o){var s;if(this.responseHasNoBody(o))return n.logger.debug("The response does not contain any body."),{res:o,body:""};const a=this.parseContentType(o),{type:c}=a,p=null===(s=this.options.whitelistMimes)||void 0===s?void 0:s.find((e=>c.startsWith(e.type))),l=p?this.options.maxBodySize:1024*(null!=i?i:this.options.maxContentLength),{body:d,transform:u}=await this.parseBody(o,{decompress:e,allowTruncation:!p||p.allowTruncation,maxSize:l});return u&&p&&n.logger.error("The original response body for URL %s was %s because it exceeded the maximum allowed size of %i bytes.",r,u,l),o.headers["content-length"]=d.byteLength.toFixed(),e&&delete o.headers["content-encoding"],{res:o,body:f.default.decode(d,null!=t?t:a.encoding)}}parseContentType(e){const t=e.headers["content-type"]||"application/octet-stream",{type:i,parameters:{charset:r}}=(0,m.safeParse)(t);let o=r;return o&&f.default.encodingExists(o)||(o="utf-8"),{type:i,encoding:o}}unzipBody(e){let t=e;if(!this.responseHasNoBody(e)){let i=e.headers["content-encoding"]||"identity";i=i.trim().toLowerCase();const r={flush:_.constants.Z_SYNC_FLUSH,finishFlush:_.constants.Z_SYNC_FLUSH};switch(i){case"gzip":t=e.pipe((0,_.createGunzip)(r));break;case"deflate":t=e.pipe(new l.NormalizeZlibDeflateTransformStream).pipe((0,_.createInflate)(r));break;case"br":t=e.pipe((0,_.createBrotliDecompress)())}}return t}responseHasNoBody(e){return"HEAD"===e.method||e.statusCode>=100&&e.statusCode<200||204===e.statusCode||304===e.statusCode}async parseBody(e,t){const i=[],r=t.decompress?this.unzipBody(e):e;for await(const e of r)i.push(e);let o=Buffer.concat(i),s=!1;if(o.byteLength>t.maxSize){const e=this.truncateBody(o,t);o=e.body,s=e.transform}return{body:o,transform:s}}truncateBody(e,t){return t.allowTruncation?(n.logger.debug("Truncate original response body to %i bytes",t.maxSize),{body:e.subarray(0,t.maxSize),transform:"truncated"}):(n.logger.debug("Omit original response body because body is bigger than %i bytes",t.maxSize),{body:Buffer.alloc(0),transform:"omitted"})}setHeaders(e,t){var i;const r=Object.getOwnPropertySymbols(e).find((e=>["Symbol(kOutHeaders)","Symbol(outHeadersKey)"].includes(e.toString())));if(!e.headersSent&&r&&t.headers){const o=e[r]=null!==(i=e[r])&&void 0!==i?i:Object.create(null);Object.entries(t.headers).forEach((([e,t])=>{e&&(o[e.toLowerCase()]=[e.toLowerCase(),null!=t?t:""])}))}t.keepAlive||e.setHeader("Connection","close")}async transformScript(e){const{hostname:t}=new URL(e.url),i=this.virtualScripts.find(t);if(!i)return e;const r=await i.exec(this.DEFAULT_SCRIPT_ENTRYPOINT,{...e.toJSON(),body:e.encoding?f.default.encode(e.body,e.encoding).toString():e.body});return new s.Request(r)}async executeRequest(e){const{res:t,body:i}=await this.request(e);return n.logger.trace("received following response for request %j: headers: %j body: %s",{url:e.url,protocol:this.protocol,method:e.method},{statusCode:t.statusCode,headers:t.headers},i.slice(0,500).concat(i.length>500?"...":"")),new o.Response({body:i,protocol:this.protocol,statusCode:t.statusCode,headers:t.headers,encoding:e.encoding})}tryRequestWithCertificates(e,t){const i=t.map((async t=>{n.logger.debug("Executing HTTP request with following params: %j",e);try{await e.loadCert(t);const i=await this.executeRequest(e);return this.certificatesCache.add(e,t),i}catch(e){const i=n.Helpers.isTlsCertError(e)?`Failed to do successful request with certificate ${t.path}. It will be excluded from list of known certificates.`:`Unexpected error occured during request: ${e}`;throw n.logger.warn(i),e}}));return Promise.any(i)}};w=r.__decorate([(0,h.injectable)(),r.__param(0,(0,h.inject)(a.VirtualScripts)),r.__param(1,(0,h.inject)(n.ProxyFactory)),r.__param(2,(0,h.inject)(p.RequestExecutorOptions)),r.__param(3,(0,h.inject)(d.CertificatesCache)),r.__param(4,(0,h.inject)(u.CertificatesResolver)),r.__metadata("design:paramtypes",[Object,Object,Object,Object,Object])],w),t.HttpRequestExecutor=w},5232:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Protocol=void 0,function(e){e.HTTP="http",e.WS="ws"}(t.Protocol||(t.Protocol={}))},4479:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Request=void 0;const r=i(1879),o=i(1455),s=i(6760),n=i(1692);class Request{constructor({protocol:e,method:t,url:i,body:r,ca:o,pfx:s,passphrase:n,timeout:a,correlationIdRegex:c,maxContentSize:p,encoding:l,decompress:d=!0,headers:u={},keepAlive:h}){var f;this.protocol=e,this._method=null!==(f=null==t?void 0:t.toUpperCase())&&void 0!==f?f:"GET",this.validateUrl(i),this.url=i.trim(),this.precheckBody(r),this.body=r,this.correlationIdRegex=this.normalizeCorrelationIdRegex(c),this.setHeaders(u),s&&(this._pfx=Buffer.from(s)),o&&(this._ca=Buffer.from(o)),this._passphrase=n,this.encoding=l,this.timeout=a,this.maxContentSize=p,this.decompress=!!d,this.keepAlive=h}get method(){return this._method}get headers(){return this._headers}get ca(){return this._ca}get pfx(){return this._pfx}get passphrase(){return this._passphrase}get secureEndpoint(){return this.url.startsWith("https")}setHeaders(e){const t={...this._headers,...e};this._headers=Object.entries(t).reduce(((e,[t,i])=>(e[t]=Array.isArray(i)&&Request.SINGLE_VALUE_HEADERS.has(t.toLowerCase())?i.join(", "):i,e)),{})}async loadCert({path:e,passphrase:t}){let i;try{i=await(0,o.readFile)(e)}catch(t){r.logger.warn(`Warning: certificate ${e} not found.`)}const n=(0,s.extname)(e),a=(0,s.basename)(e);switch(n){case".pem":case".crt":case".ca":this._ca=i;break;case".pfx":this.assertPassphrase(a,i,t),this._pfx=i,this._passphrase=t;break;default:r.logger.warn(`Warning: certificate of type "${n}" does not support.`)}}toJSON(){var e,t;return{protocol:this.protocol,url:this.url,body:this.body,method:this._method,headers:this._headers,passphrase:this._passphrase,ca:null===(e=this._ca)||void 0===e?void 0:e.toString("utf8"),pfx:null===(t=this._pfx)||void 0===t?void 0:t.toString("utf8"),correlationIdRegex:this.correlationIdRegex}}validateUrl(e){try{new URL(e)}catch{throw new Error("Invalid URL.")}}precheckBody(e){if(e&&"string"!=typeof e)throw new Error("Body must be string.")}normalizeCorrelationIdRegex(e){if(e)try{return new RegExp(e,"i")}catch{throw new Error("Correlation id must be regular expression.")}}assertPassphrase(e,t,i){try{(0,n.createSecureContext)({passphrase:i,pfx:t})}catch(t){r.logger.warn(`Error Loading Certificate: Wrong passphrase for certificate ${e}.`)}}}t.Request=Request,Request.SINGLE_VALUE_HEADERS=new Set(["authorization","content-disposition","content-length","content-type","from","host","if-modified-since","if-unmodified-since","location","max-forwards","proxy-authorization","referer","user-agent"])},9878:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestExecutor=void 0,t.RequestExecutor=Symbol("RequestExecutor")},18:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestExecutorOptions=void 0,t.RequestExecutorOptions=Symbol("RequestExecutorOptions")},1795:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Response=void 0;t.Response=class Response{constructor({protocol:e,statusCode:t,headers:i,body:r,message:o,errorCode:s,encoding:n}){this.protocol=e,this.statusCode=t,this.headers=i,this.body=r,this.errorCode=s,this.message=o,this.encoding=n}}},1560:(e,t,i)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WsRequestExecutor=void 0;const o=i(5584),s=i(1795),n=i(5232),a=i(1879),c=i(18),p=i(3348),l=i(2514),d=i(8641),u=o.__importDefault(i(5086)),h=i(8474),f=i(7975);let m=r=class WsRequestExecutor{constructor(e,t,i,r){this.proxyFactory=e,this.options=t,this.certificatesCache=i,this.certificatesResolver=r,this.options.proxyUrl&&({httpsAgent:this.httpsProxyAgent,httpAgent:this.httpProxyAgent}=this.proxyFactory.createProxy({proxyUrl:this.options.proxyUrl}))}get protocol(){return n.Protocol.WS}async execute(e){var t,i;try{const t=this.options.certs?this.certificatesResolver.resolve(e,this.options.certs):void 0;return void 0===t||0===t.length?(a.logger.debug("Executing WS request with following params: %j",e),await this.executeRequest(e)):await this.tryRequestWithCertificates(e,t)}catch(r){const o=null!==(t=r.info)&&void 0!==t?t:r.message,n=null!==(i=r.code)&&void 0!==i?i:r.syscall;return a.logger.error("Error executing request: %s",e.url),a.logger.error("Cause: %s",o),new s.Response({message:o,errorCode:n,protocol:this.protocol})}}setTimeout(e){const t=setTimeout((()=>e.emit("error",Object.assign(new Error("Waiting frame has timed out"),{code:"ETIMEDOUT"}))),this.options.timeout);return t.unref(),t}async consume(e,t){const i=await Promise.race([this.waitForResponse(e,t),(0,h.once)(e,"close")]);let r;if(i.length){const[e,t]=i;r={body:"string"==typeof e?e:t,code:"number"==typeof e?e:void 0}}return r}waitForResponse(e,t){return new Promise((i=>{e.on("message",(e=>{const r=String(e);(!t||t.test(r))&&i([r])}))}))}async connect(e){const[,t]=await Promise.all([(0,h.once)(e,"open"),(0,h.once)(e,"upgrade")]),[i]=t;return i}normalizeHeaders(e){return Object.entries(e).reduce(((e,[t,i])=>{const o=t.trim().toLowerCase();return r.FORBIDDEN_HEADERS.has(o)||(e[t]=i),e}),{})}async executeRequest(e){var t;let i,r;try{r=new u.default(e.url,{agent:e.secureEndpoint?this.httpsProxyAgent:this.httpProxyAgent,rejectUnauthorized:!1,handshakeTimeout:this.options.timeout,headers:this.normalizeHeaders(e.headers),ca:e.ca,pfx:e.pfx,passphrase:e.passphrase});const o=await this.connect(r);await(0,f.promisify)(r.send.bind(r))(e.body),i=this.setTimeout(r);const n=await this.consume(r,e.correlationIdRegex);return new s.Response({protocol:this.protocol,statusCode:null!==(t=n.code)&&void 0!==t?t:o.statusCode,headers:o.headers,body:n.body})}finally{i&&clearTimeout(i),(null==r?void 0:r.readyState)===u.default.OPEN&&r.close(1e3)}}tryRequestWithCertificates(e,t){const i=t.map((async t=>{a.logger.debug("Executing HTTP request with following params: %j",e);try{await e.loadCert(t);const i=await this.executeRequest(e);return this.certificatesCache.add(e,t),i}catch(e){const i=a.Helpers.isTlsCertError(e)?`Failed to do successful request with certificate ${t.path}. It will be excluded from list of known certificates.`:`Unexpected error occured during request: ${e}`;throw a.logger.warn(i),e}}));return Promise.any(i)}};m.FORBIDDEN_HEADERS=new Set(["sec-websocket-version","sec-websocket-key"]),m=r=o.__decorate([(0,d.injectable)(),o.__param(0,(0,d.inject)(a.ProxyFactory)),o.__param(1,(0,d.inject)(c.RequestExecutorOptions)),o.__param(2,(0,d.inject)(p.CertificatesCache)),o.__param(3,(0,d.inject)(l.CertificatesResolver)),o.__metadata("design:paramtypes",[Object,Object,Object,Object])],m),t.WsRequestExecutor=m},2046:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(9878),t),r.__exportStar(i(18),t),r.__exportStar(i(9846),t),r.__exportStar(i(1560),t),r.__exportStar(i(1795),t),r.__exportStar(i(4479),t),r.__exportStar(i(5232),t),r.__exportStar(i(7412),t),r.__exportStar(i(1667),t),r.__exportStar(i(3348),t),r.__exportStar(i(2514),t)},7831:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasePolling=void 0;const r=i(5584),o=i(2217),s=i(1879),n=r.__importDefault(i(8938)),a=i(4589);t.BasePolling=class BasePolling{constructor(e,t,i){this.options=e,this.scanManager=t,this.breakpoint=i,this.defaultInterval=1e4,this.DEFAULT_RECONNECT_TIMES=20,this._active=!0,this.options.timeout||(s.logger.warn('Warning: It looks like you\'ve been running polling without "timeout" option.'),s.logger.warn("The recommended way to install polling with a minimal timeout: 10-20min.")),this.options.interval&&this.options.interval<this.defaultInterval&&s.logger.warn("Warning: The minimal value for polling interval is 10 seconds."),(0,a.ok)(i,"You should choose a breakpoint for polling.")}get active(){return this._active}async start(){try{s.logger.log("Starting polling..."),this.options.timeout&&this.setTimeout();for await(const e of this.poll())await this.breakpoint.execute(e)}finally{await this.stop()}}async stop(){this._active||s.logger.log("Polling has been terminated by timeout."),this._active=!1,clearTimeout(this.timeoutDescriptor)}setTimeout(e=this.options.timeout){this.timeoutDescriptor=setTimeout((()=>this._active=!1),e),s.logger.debug("The polling timeout has been set to %d ms.",e)}async*poll(){for(;this.active;){await this.delay();const e=this.createBackoff(),t=await e.execute((()=>this.scanManager.status(this.options.scanId)));if(this.isRedundant(t.status))break;yield t}}isRedundant(e){return e===o.ScanStatus.DONE||e===o.ScanStatus.STOPPED||e===o.ScanStatus.DISRUPTED||e===o.ScanStatus.FAILED}delay(){var e;const t=null!==(e=this.options.interval)&&void 0!==e?e:this.defaultInterval;return new Promise((e=>setTimeout(e,t)))}createBackoff(){return new s.Backoff(this.DEFAULT_RECONNECT_TIMES,(e=>n.default.isAxiosError(e)&&e.status>500||["ECONNRESET","ENETDOWN","ENETUNREACH","ETIMEDOUT","ECONNREFUSED","ENOTFOUND","EAI_AGAIN","ESOCKETTIMEDOUT"].includes(e.code)))}}},7496:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakpoint=void 0;t.Breakpoint=class Breakpoint{async execute(e){this.isExcepted(e)&&this.breakOn(e)}}},3120:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointFactory=void 0,t.BreakpointFactory=Symbol("BreakpointFactory")},1008:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointType=void 0,function(e){e.ANY="any",e.MEDIUM_ISSUE="medium_issue",e.HIGH_ISSUE="high_issue",e.CRITICAL_ISSUE="critical_issue"}(t.BreakpointType||(t.BreakpointType={}))},4264:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointException=void 0;class BreakpointException extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}t.BreakpointException=BreakpointException},7352:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnSeverity=void 0;const r=i(7496),o=i(4264),s=i(7024);class OnSeverity extends r.Breakpoint{constructor(e){var t;super(),this.severity=e,this.breakSeverities=null!==(t=s.severityRanges.get(e))&&void 0!==t?t:[]}breakOn(){throw new o.BreakpointException(`Bright CLI found a first ${this.severity} issue.`)}isExcepted(e){return this.breakSeverities.some((t=>e[`numberOf${t}SeverityIssues`]>0))}}t.OnSeverity=OnSeverity},360:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnSeverity=t.BreakpointException=void 0;var r=i(4264);Object.defineProperty(t,"BreakpointException",{enumerable:!0,get:function(){return r.BreakpointException}});var o=i(7352);Object.defineProperty(t,"OnSeverity",{enumerable:!0,get:function(){return o.OnSeverity}})},7980:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultBreakpointFactory=void 0;const r=i(5584),o=i(360),s=i(1008),n=i(7024),a=i(8641);let c=class DefaultBreakpointFactory{create(e){switch(e){case s.BreakpointType.ANY:return new o.OnSeverity(n.Severity.LOW);case s.BreakpointType.HIGH_ISSUE:return new o.OnSeverity(n.Severity.HIGH);case s.BreakpointType.MEDIUM_ISSUE:return new o.OnSeverity(n.Severity.MEDIUM);case s.BreakpointType.CRITICAL_ISSUE:return new o.OnSeverity(n.Severity.CRITICAL);default:return null}}};c=r.__decorate([(0,a.injectable)()],c),t.DefaultBreakpointFactory=c},2625:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultPollingFactory=void 0;const r=i(5584),o=i(2217),s=i(7831),n=i(3120),a=i(8641);let c=class DefaultPollingFactory{constructor(e,t){this.scans=e,this.breakpointFactory=t}create(e){const t=this.breakpointFactory.create(e.breakpoint);return new s.BasePolling(e,this.scans,t)}};c=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)(o.Scans)),r.__param(1,(0,a.inject)(n.BreakpointFactory)),r.__metadata("design:paramtypes",[Object,Object])],c),t.DefaultPollingFactory=c},7032:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PollingFactory=void 0,t.PollingFactory=Symbol("PollingFactory")},6499:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestScans=t.RestScansOptions=void 0;const r=i(5584),o=i(2217),s=i(1860),n=i(1879),a=i(8641),c=r.__importDefault(i(8938)),p=r.__importDefault(i(7067)),l=r.__importDefault(i(4708));t.RestScansOptions=Symbol("RestScansOptions");let d=class RestScans{constructor(e,t,{baseURL:i,apiKey:r,insecure:o,proxyURL:s,timeout:n}){this.info=e,this.proxyFactory=t;const{httpAgent:a=new p.default.Agent,httpsAgent:d=new l.default.Agent({rejectUnauthorized:!o})}=s?this.proxyFactory.createProxy({proxyUrl:s,rejectUnauthorized:!o}):{};this.client=c.default.create({baseURL:i,timeout:n,httpAgent:a,httpsAgent:d,responseType:"json",headers:{authorization:`Api-Key ${r}`}})}async create(e){const t=await this.prepareScanConfig({...e});return(await this.client.post("/api/v1/scans",t)).data}async retest(e){return(await this.client.post(`/api/v1/scans/${e}/retest`)).data.id}async status(e){return(await this.client.get(`/api/v1/scans/${e}`)).data}async stop(e){await this.client.get(`/api/v1/scans/${e}/stop`)}async delete(e){await this.client.delete(`/api/v1/scans/${e}`)}async prepareScanConfig({headers:e,...t}){const i=await this.applyDefaultSettings(t);return{...this.replaceDeprecatedAttackParamLocations(i),info:{source:"cli",client:{name:"bright-cli",version:this.info.version}},headers:e?Object.entries(e).map((([e,t])=>({name:e,value:t,mergeStrategy:"replace"}))):void 0}}async exploreDiscovery(e){const t=[],{fileId:i,crawlerUrls:r}=e;if(Array.isArray(r)&&t.push(o.Discovery.CRAWLER),i)try{const{data:e}=await this.client.get(`/api/v2/files/${i}`);t.push(e.type===o.SourceType.HAR?o.Discovery.ARCHIVE:o.Discovery.OAS)}catch(e){throw new Error(`Error loading file with id "${i}": No such file or you do not have permissions.`)}return t}async applyDefaultSettings(e){var t,i,r;const s=null!==(t=e.attackParamLocations)&&void 0!==t?t:e.templateId?void 0:[...o.ATTACK_PARAM_LOCATIONS_DEFAULT],n=(null===(i=e.exclusions)||void 0===i?void 0:i.params)||(null===(r=e.exclusions)||void 0===r?void 0:r.requests)?e.exclusions:void 0;let a=await this.exploreDiscovery(e);return a=(null==a?void 0:a.length)?a:void 0,{...e,attackParamLocations:s,discoveryTypes:a,exclusions:n}}replaceDeprecatedAttackParamLocations(e){var t,i,r,s;return(null===(t=e.attackParamLocations)||void 0===t?void 0:t.includes(o.AttackParamLocation.ARTIFICAL_FRAGMENT))&&(e.attackParamLocations=e.attackParamLocations.filter((e=>e!==o.AttackParamLocation.ARTIFICAL_FRAGMENT)),(null===(i=e.attackParamLocations)||void 0===i?void 0:i.includes(o.AttackParamLocation.ARTIFICIAL_FRAGMENT))||(e.attackParamLocations=[...e.attackParamLocations,o.AttackParamLocation.ARTIFICIAL_FRAGMENT])),(null===(r=e.attackParamLocations)||void 0===r?void 0:r.includes(o.AttackParamLocation.ARTIFICAL_QUERY))&&(e.attackParamLocations=e.attackParamLocations.filter((e=>e!==o.AttackParamLocation.ARTIFICAL_QUERY)),(null===(s=e.attackParamLocations)||void 0===s?void 0:s.includes(o.AttackParamLocation.ARTIFICIAL_QUERY))||(e.attackParamLocations=[...e.attackParamLocations,o.AttackParamLocation.ARTIFICIAL_QUERY])),e}};d=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)((0,a.delay)((()=>s.CliInfo)))),r.__param(1,(0,a.inject)(n.ProxyFactory)),r.__param(2,(0,a.inject)(t.RestScansOptions)),r.__metadata("design:paramtypes",[s.CliInfo,Object,Object])],d),t.RestScans=d},2217:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Scans=t.SourceType=t.ScanStatus=t.Module=t.ATTACK_PARAM_LOCATIONS_DEFAULT=t.AttackParamLocation=t.Discovery=void 0,function(e){e.CRAWLER="crawler",e.ARCHIVE="archive",e.OAS="oas"}(t.Discovery||(t.Discovery={})),function(e){e.ARTIFICAL_FRAGMENT="artifical-fragment",e.ARTIFICAL_QUERY="artifical-query",e.ARTIFICIAL_FRAGMENT="artificial-fragment",e.ARTIFICIAL_QUERY="artificial-query",e.BODY="body",e.FRAGMENT="fragment",e.HEADER="header",e.PATH="path",e.QUERY="query"}(i=t.AttackParamLocation||(t.AttackParamLocation={})),t.ATTACK_PARAM_LOCATIONS_DEFAULT=[i.BODY,i.FRAGMENT,i.QUERY],function(e){e.DAST="dast",e.FUZZER="fuzzer"}(t.Module||(t.Module={})),function(e){e.RUNNING="running",e.PENDING="pending",e.STOPPED="stopped",e.FAILED="failed",e.DONE="done",e.DISRUPTED="disrupted",e.SCHEDULED="scheduled",e.QUEUED="queued"}(t.ScanStatus||(t.ScanStatus={})),function(e){e.OPEN_API="openapi",e.RAML="raml",e.POSTMAN="postman",e.HAR="har"}(t.SourceType||(t.SourceType={})),t.Scans=Symbol("Scans")},7024:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.severityRanges=t.Severity=void 0,function(e){e.MEDIUM="Medium",e.HIGH="High",e.LOW="Low",e.CRITICAL="Critical"}(i=t.Severity||(t.Severity={})),t.severityRanges=new Map(Object.values(i).map((e=>{switch(e){case i.CRITICAL:return[e,[i.CRITICAL]];case i.HIGH:return[e,[i.HIGH,i.CRITICAL]];case i.MEDIUM:return[e,[i.MEDIUM,i.HIGH,i.CRITICAL]];case i.LOW:return[e,Object.values(i)]}})))},523:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(3120),t),r.__exportStar(i(7980),t),r.__exportStar(i(7032),t),r.__exportStar(i(2625),t),r.__exportStar(i(796),t),r.__exportStar(i(2217),t),r.__exportStar(i(1008),t),r.__exportStar(i(7496),t),r.__exportStar(i(360),t),r.__exportStar(i(6499),t),r.__exportStar(i(7024),t)},6454:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultVirtualScripts=void 0;const r=i(5584),o=i(7354),s=i(1879),n=i(8641);let a=class DefaultVirtualScripts{constructor(){this.store=new Map}get size(){return this.store.size}[Symbol.iterator](){return this.store[Symbol.iterator]()}clear(e){e?this.store.forEach((t=>{t.type===e&&this.delete(t.id)})):this.store.clear()}delete(e){return this.store.delete(e)}entries(){return this.store.entries()}find(e){return[...this.store.values()].find((t=>s.Helpers.wildcardToRegExp(t.id).test(e)))}keys(){return this.store.keys()}set(e,t,i){const r=new o.VirtualScript(e,t,i);return this.store.set(r.id,r),r.compile(),this}values(){return this.store.values()}};a=r.__decorate([(0,n.injectable)()],a),t.DefaultVirtualScripts=a},9311:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FSScriptLoader=void 0;const r=i(5584),o=i(993),s=i(1879),n=i(7354),a=i(8641),c=i(1455);let p=class FSScriptLoader{constructor(e){this.virtualScripts=e}async load(e){await Promise.all(Object.entries(e).map((([e,t])=>this.loadScript(e,t))))}async loadScript(e,t){let i;try{i=await(0,c.readFile)(t,{encoding:"utf8"})}catch(e){throw s.logger.debug(`Cannot load ${t}. Error: ${e.message}`),new Error(`Error Loading Script: Cannot load ${t}`)}this.virtualScripts.set(e,n.VirtualScriptType.LOCAL,i)}};p=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)(o.VirtualScripts)),r.__metadata("design:paramtypes",[Object])],p),t.FSScriptLoader=p},8576:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptLoader=void 0,t.ScriptLoader=Symbol("ScriptLoader")},7354:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualScript=t.VirtualScriptType=void 0;const r=i(5584),o=i(714),s=r.__importDefault(i(8995)),n=i(6760);var a;!function(e){e.LOCAL="local",e.REMOTE="remote"}(a=t.VirtualScriptType||(t.VirtualScriptType={}));t.VirtualScript=class VirtualScript{constructor(e,t,i){if(this.MODULE_EXEC_ARGS=["module.exports","module.require","module","__filename","__dirname"],!e)throw new Error("ID must be declared explicitly.");if(this.id=e,!t)throw new Error(`Type might accept one of the following values: ${Object.values(a).join(", ")}.`);if(this.type=t,!i)throw new Error("Code must be declared explicitly.");this.script=new o.Script(this.wrapScriptCode(i),{filename:e})}compile(){const e=new s.default(this.id);return this.context=(0,o.createContext)({module:e,__filename:(0,n.join)(this.id,process.cwd()),__dirname:process.cwd()}),this}async exec(e,...t){this.script.runInContext(this.context,{timeout:100});const{exports:i={}}=this.context.module,r=i[e];if("function"!=typeof r)throw new Error(`Error Loading Script: Script ${this.id} does not match expected format, missing function ${e}.`);return r(...t)}wrapScriptCode(e){const t=s.default.wrap(e.replace(/[\u200B-\u200D\uFEFF]/g,""));return`${t.slice(0,t.length-1)}(${this.MODULE_EXEC_ARGS.join(",")})`}}},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualScripts=void 0,t.VirtualScripts=Symbol("VirtualScripts")},7758:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(7354),t),r.__exportStar(i(9311),t),r.__exportStar(i(8576),t),r.__exportStar(i(993),t),r.__exportStar(i(6454),t)},9068:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultStartupManager=void 0;const r=i(756),o=i(7975);t.DefaultStartupManager=class DefaultStartupManager{async install({name:e,...t}){await(0,o.promisify)(r.add)(e,t),await(0,o.promisify)(r.enable)(e)}async run(e){(0,r.run)((()=>this.exit(0,e)))}async uninstall(e){try{await(0,o.promisify)(r.disable)(e)}catch{}try{await(0,o.promisify)(r.remove)(e)}catch{}}async exit(e,t){await(null==t?void 0:t()),(0,r.stop)(e)}}},2149:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartupManager=void 0,t.StartupManager=Symbol("StartupManager")},6324:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9369:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(9068),t),r.__exportStar(i(2149),t),r.__exportStar(i(6324),t)},5927:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Backoff=void 0;const r=i(5599),o=i(8500);t.Backoff=class Backoff{constructor(e,t){this.maxDepth=e,this.shouldRetry=t,this.depth=0}async execute(e){var t;try{return await e()}catch(i){if((null===(t=this.shouldRetry)||void 0===t?void 0:t.call(this,i))&&this.depth<this.maxDepth)return this.retry(e);throw i}}async retry(e){const t=Math.max(2**this.depth*100,1e3);return r.logger.warn("Failed to connect, retrying in %d second (attempt %d/%d)",Math.round(t/1e3),this.depth+1,this.maxDepth),await(0,o.setTimeout)(t),this.depth++,this.execute(e)}}},0:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultProxyFactory=void 0;const r=i(8398),o=i(1973),s=i(2216);t.DefaultProxyFactory=class DefaultProxyFactory{createProxy({proxyUrl:e,rejectUnauthorized:t=!1}){let i;try{({protocol:i}=new URL(e))}catch(t){throw new Error(`Invalid Proxy URL: '${e}'. Please provide a valid URL.`)}switch(i){case"http:":case"https:":return this.createHttpProxy(e,t);case"socks:":case"socks4:":case"socks4a:":case"socks5:":case"socks5h:":return this.createSocksProxy(e);default:throw new Error(`Unsupported proxy protocol: '${i.replace(":","")}'. Please use a supported protocol (HTTP(S), SOCKS4, or SOCKS5).`)}}createProxyForClient({targetUrl:e,...t}){const i=this.createProxy(t);let r;try{({protocol:r}=new URL(e))}catch(t){throw new Error(`Invalid Target URL: '${e}'. Please contact support at support@brightsec.com`)}switch(r){case"http:":case"ws:":return i.httpAgent;case"https:":case"wss:":return i.httpsAgent;default:throw new Error(`Proxy not supported for protocol '${r}'. Please contact support at support@brightsec.com`)}}createHttpProxy(e,t){return{httpsAgent:new r.PatchedHttpsProxyAgent(e,{rejectUnauthorized:t}),httpAgent:new o.HttpProxyAgent(e,{rejectUnauthorized:t})}}createSocksProxy(e){const t=new s.SocksProxyAgent(e);return{httpAgent:t,httpsAgent:t}}}},7918:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessageFactory=void 0;const r=i(8938);t.ErrorMessageFactory=class ErrorMessageFactory{static genericCommandError(e){const t=this.getTitle(e),i=this.extractErrorDetails(e);return this.formatFinalMessage(t,i)}static formatFinalMessage(e,t){return t?`${e}: ${t}.`:`${e}.`}static getTitle(e){return"message"in e?e.message:`Error during "${e.command}"`}static extractErrorDetails(e){var t,i;return"string"==typeof e.error?e.error:(0,r.isAxiosError)(e.error)&&"string"==typeof(null===(t=e.error.response)||void 0===t?void 0:t.data)?e.error.response.data:null!==(i=e.error.error||e.error.message)&&void 0!==i?i:null}}},8718:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Helpers=void 0;const r=i(4589),o=i(1421),s=i(6760);class Helpers{static isUUID(e){return(0,r.ok)(e,"Value must be string"),this.UUID_PATTERN.test(e)}static isShortUUID(e){return(0,r.ok)(e,"Value must be string"),this.SHORT_UUID_PATTERN.test(e)}static getClusterUrls(e){var t;let i,r;const o=null!==(t=e.cluster)&&void 0!==t?t:e.hostname;if(o){let e=o;try{({host:e}=new URL(o))}catch{}["localhost","127.0.0.1"].includes(e)?(r=`http://${e}:8000`,i=`ws://${e}:8000/workstations`):(r=`https://${e}`,i=`wss://${e}/workstations`)}else r="https://app.brightsec.com",i="wss://app.brightsec.com/workstations";return{api:r,repeaterServer:i}}static spawn(e={detached:!1}){const{command:t,args:i,windowsVerbatimArguments:r,shell:s}=Helpers.getExecArgs({spawn:!0,excludeAll:!0,include:e.include,exclude:e.exclude});return(0,o.spawn)(t,i,{shell:s,windowsVerbatimArguments:r,detached:!s&&e.detached,windowsHide:s&&e.detached})}static getExecArgs(e){e={escape:!0,excludeAll:!1,spawn:!1,...null!=e?e:{}};let t=process.argv.slice(1);e.excludeAll&&(t=t.slice(0,1)),e.include&&(t=[...t,...e.include]),e.exclude&&(t=t.filter((t=>!e.exclude.includes(t)))),t=[...process.execArgv,...t].filter((t=>!(process.pkg&&!e.spawn)||!t.startsWith(process.pkg.entrypoint)));let i=(0,s.normalize)(process.execPath);const r=this.win(),o=r&&e.escape;return o&&(i=`"${i}"`,t=t.map(this.escapeShellArgument,this)),{args:t,shell:r,command:i,windowsVerbatimArguments:o}}static async pool(e,t,i){const r=[],o=[];for(const s of t){const t=i(s);r.push(t);const n=t.then((()=>{o.splice(o.indexOf(n),1)}));o.push(n),o.length>=e&&await Promise.race(o)}return Promise.all(r)}static wildcardToRegExp(e){return new RegExp(`^${e.split(/\*+/).map(this.regExpEscape).join(".*")}$`)}static selectEnumValue(e,t){return Object.values(e).find((e=>e.toLowerCase().trim()===t.toLowerCase().trim()))}static omit(e){return Object.entries(e).reduce(((e,[t,i])=>null==i?e:{...e,[t]:i}),{})}static split(e,t){(0,r.ok)(Array.isArray(e),"First argument must be an instance of Array.");const i=Math.ceil(e.length/t);return Array(i).fill(null).map(((i,r)=>e.slice(r*t,r*t+t)))}static toArray(e){return[...Object.values(e)]}static parseHeaders(e=[]){return(0,r.ok)(Array.isArray(e),"First argument must be an instance of Array."),e.reduce(((e,t)=>{const[i,r]=this.parseHeader(t);return{...e,[i]:r}}),{})}static portFromURL(e){return e.port||("http:"===e.protocol?"80":"https:"===e.protocol?"443":"")}static isTlsCertError(e){const t=e;return!!t.code&&(!("string"!=typeof t.code||!t.code.startsWith("ERR_TLS_")&&"ECONNRESET"!==t.code)||!!Helpers.OPENSSL_CODES.has(t.code))}static escapeShellArgument(e){return(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(this.META_CHARS_REGEXP,"^$1")}static parseHeader(e){if((0,r.ok)("string"==typeof e,"First argument must be an instance of String."),e){const[t,...i]=e.split(":");return[t,i.join(":")].map((e=>decodeURIComponent(e.trim())))}}static win(){return"win32"===process.platform}static regExpEscape(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}}t.Helpers=Helpers,Helpers.UUID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Helpers.SHORT_UUID_PATTERN=/^[1-9a-z]{10,22}$/i,Helpers.META_CHARS_REGEXP=/([()\][%!^"`<>&|;, *?])/g,Helpers.OPENSSL_CODES=new Set(["CERT_HAS_EXPIRED","CERT_NOT_YET_VALID","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_GET_ISSUER_CERT","HOSTNAME_MISMATCH","CERT_REJECTED","CERT_UNTRUSTED"])},5599:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.Logger=t.LogLevel=void 0;const r=i(5584).__importDefault(i(6895)),o=i(6960),s=i(7975),n=i(9896),a=i(6928);var c;!function(e){e[e.SILENT=0]="SILENT",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.NOTICE=3]="NOTICE",e[e.VERBOSE=4]="VERBOSE",e[e.TRACE=5]="TRACE"}(c=t.LogLevel||(t.LogLevel={}));class Logger{constructor(e=c.NOTICE,t,i={}){var r,o;this.MAX_FORMATTED_LEVEL_LENGTH=Object.keys(c).sort(((e,t)=>e.length-t.length)).slice(0).pop().length,this._logLevel=e,this._logOptions={maxSize:i.maxSize||"10MB",maxFiles:null!==(r=i.maxFiles)&&void 0!==r?r:5,interval:i.interval||"1d",compress:null!==(o=i.compress)&&void 0!==o?o:"gzip"},t&&(this.logFile=t)}static getInstance(){return Logger.instance||(Logger.instance=new Logger),Logger.instance}static configure(e=c.NOTICE,t,i={}){var r,o;const s=Logger.getInstance();return s._logLevel=e,s._logOptions={maxSize:i.maxSize||"10MB",maxFiles:null!==(r=i.maxFiles)&&void 0!==r?r:5,interval:i.interval||"1d",compress:null!==(o=i.compress)&&void 0!==o?o:"gzip"},t&&(s.logFile=t),s}get logLevel(){return this._logLevel}set logLevel(e){this._logLevel=e}get logFile(){return this._logPath}set logFile(e){if(this._logFile&&"end"in this._logFile&&this._logFile.end(),this._logFile=void 0,this._logPath=void 0,e){const t=(0,a.dirname)(e);(0,n.existsSync)(t)||(0,n.mkdirSync)(t,{recursive:!0}),this._logFile=(0,o.createStream)(e,{size:this._logOptions.maxSize,interval:this._logOptions.interval,compress:this._logOptions.compress,maxFiles:this._logOptions.maxFiles,rotate:1}),this._logPath=e}}error(e,t,...i){if(this.logLevel<c.ERROR)return;let o;if("string"==typeof e)arguments.length>1&&i.unshift(t),o=e;else{const r=e;o=t||r.message,r.stack&&i.push(`\n${r.stack}`)}const s=this.formatMessage("ERROR",o,i);this._logFile||this.writeToStderr(r.default.red(s)),this.writeToFile(s)}warn(e,...t){if(this.logLevel<c.WARN)return;const i=this.formatMessage("WARN",e,t);this._logFile||this.writeToStdout(r.default.yellow(i)),this.writeToFile(i)}log(e,...t){if(this.logLevel<c.NOTICE)return;const i=this.formatMessage("NOTICE",e,t);this._logFile||this.writeToStdout(r.default.green(i)),this.writeToFile(i)}debug(e,...t){if(this.logLevel<c.VERBOSE)return;const i=this.formatMessage("VERBOSE",e,t);this._logFile||this.writeToStdout(r.default.cyan(i)),this.writeToFile(i)}trace(e,...t){if(this.logLevel<c.TRACE)return;const i=this.formatMessage("TRACE",e,t);this._logFile||this.writeToStdout(r.default.cyan(i)),this.writeToFile(i)}formatMessage(e,t,i){const r=(0,s.format)(t,...i),o=e.toUpperCase().padEnd(this.MAX_FORMATTED_LEVEL_LENGTH," ");return`${(new Date).toISOString()} [${o}] ${r}`}writeToFile(e){if(this._logFile)try{this._logFile.write(`${e}\n`)}catch(e){}}writeToStdout(e){process.stdout.write(`${e}\n`)}writeToStderr(e){process.stderr.write(`${e}\n`)}}t.Logger=Logger,t.logger=Logger.getInstance()},7084:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NormalizeZlibDeflateTransformStream=void 0;const r=i(7075);class NormalizeZlibDeflateTransformStream extends r.Transform{constructor(){super(...arguments),this.hasCheckedHead=!1,this.header=Buffer.from([120,156])}_transform(e,t,i){this.hasCheckedHead||0===e.length||(0!==e.compare(this.header,0,1,0,1)&&this.push(this.header,t),this.hasCheckedHead=!0),this.push(e,t),i()}}t.NormalizeZlibDeflateTransformStream=NormalizeZlibDeflateTransformStream},8398:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PatchedHttpsProxyAgent=void 0;const r=i(3688),o=Symbol("tlsUpgradeOptions");class PatchedHttpsProxyAgent extends r.HttpsProxyAgent{constructor(e,t){super(e,t),this[o]=t}connect(e,t){return super.connect(e,{...this[o],...t})}}t.PatchedHttpsProxyAgent=PatchedHttpsProxyAgent},796:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1289:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyFactory=void 0,t.ProxyFactory=Symbol("ProxyFactory")},7565:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Traceroute=t.Protocol=void 0;const r=i(5584),o=i(8718),s=i(5599),n=r.__importDefault(i(8176)),a=r.__importDefault(i(1314)),c=i(1553),p=i(8474),l=i(7030);var d=i(8176);Object.defineProperty(t,"Protocol",{enumerable:!0,get:function(){return d.Protocol}});const u=Symbol("Stop"),h={amountProbes:3,maximumHops:64,timeoutInMillis:3e3,reverseLookup:!0,protocol:n.default.Protocol.ICMP,packetSize:52,outStream:process.stdout};t.Traceroute=class Traceroute{constructor(e,t={}){this.destinationIp=e,this.icmpSocket=n.default.createSocket({protocol:n.default.Protocol.ICMP}),this.resolver=new c.Resolver,this.subject=new p.EventEmitter,this.port=33433,this.ttl=1,this.probes=0;const i=t.maximumHops||h.maximumHops;this.options={...h,...o.Helpers.omit(t),...i>255||i<1?{maximumHops:h.maximumHops}:{maximumHops:i}},this.destinationHostname=this.destinationIp,this.icmpSocket.on("error",(e=>this.emitError(e))),this.icmpSocket.on("message",(async(e,t)=>{const i=this.parseIdFromIcmpMessage(e);if(s.logger.debug("Received ICMP %s bytes (message: %s) from %s:%s",e.length,e.toString("hex"),t,i),i===this.port){const e=await this.getHostName(t);this.handleReply(t,e)}}))}async execute(){if(!(0,l.isIP)(this.destinationIp))try{this.destinationIp=(await this.resolver.resolve(this.destinationHostname,"A"))[0]}catch(e){s.logger.debug("Cannot resolve the following hostname: %s. Error: %s",this.destinationHostname,e)}process.stdout.write(`traceroute to ${this.destinationHostname} (${this.destinationIp}), ${this.options.maximumHops} hops max, ${this.options.packetSize} byte packets`),this.options.protocol===n.default.Protocol.UDP?(this.udpSocket=a.default.createSocket("udp4"),this.udpSocket.on("error",(e=>this.emitError(e))),this.udpSocket.bind((()=>this.sendPacket()))):setImmediate((()=>this.sendPacket()));const[e]=await(0,p.once)(this.subject,u);return this.abort(),e}abort(){this.udpSocket&&this.udpSocket.close(),this.icmpSocket.close()}async getHostName(e){if(this.options.reverseLookup)try{const[t]=await this.resolver.reverse(e);return t}catch(t){s.logger.debug("Cannot reverse the following IP address: %s. Error: %s",e,t)}}sendPacket(){this.probes>=this.options.amountProbes&&(this.probes=0,this.ttl++),this.probes++;const e=this.createPingRequest(0,0,++this.port,this.options.packetSize);if(this.udpSocket){try{this.udpSocket.setTTL(this.ttl)}catch(e){return void this.emitError(e)}this.udpSocket.send(e,0,e.length,this.port,this.destinationIp,this.afterSend.bind(this))}else this.icmpSocket.setOption(n.default.SocketLevel.IPPROTO_IP,n.default.SocketOption.IP_TTL,this.ttl),this.icmpSocket.send(e,0,e.length,this.destinationIp,this.afterSend.bind(this))}parseIdFromIcmpMessage(e){let t=20;const i=e.readUInt8(t);if(3===i||4===i||5===i||11===i){const i=t+8;if(e.length-i<20||64!=(240&e.readUInt8(i)))return;const r=4*(15&e.readUInt8(i));if(e.length-i-r<8)return;t=i+r}return e.readUInt16BE(t+6)}afterSend(e){e?this.emitError(e):this.timeout=setTimeout((()=>this.handleReply()),this.options.timeoutInMillis)}handleReply(e,t){this.clearTimeout();const i=this.ttl.toFixed().padStart(3," ");if(e){const r=`${(process.hrtime(this.startTime)[1]/1e6).toFixed(3)} ms`;e===this.previousIP?process.stdout.write(` ${r} `):1===this.probes?process.stdout.write(`\n${i} ${t||e} (${e}) ${r} `):process.stdout.write(`\n${Array(i.length).fill(" ").join("")} ${t||e} (${e}) ${r} `)}else process.stdout.write(1===this.probes?`\n${i} * `:"* ");if(this.probes===this.options.amountProbes&&(e===this.destinationIp||this.ttl>=this.options.maximumHops))return process.stdout.write("\n"),void this.subject.emit(u,{reached:e===this.destinationIp});this.previousIP=e,setImmediate((()=>this.sendPacket()))}createPingRequest(e,t,i,r=0){const o=[...[e||8,0,0,0,this.secondByte(t),this.firstByte(t),this.secondByte(i),this.firstByte(i)],...Array(r).fill(255)],s=Buffer.from(o);return n.default.writeChecksum(s,2,n.default.createChecksum(s)),s}firstByte(e){return 255&e}secondByte(e){return(65280&e)>>8}clearTimeout(){this.timeout&&clearTimeout(this.timeout)}emitError(e){this.subject.emit("error",e)}}},1879:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(5927),t),r.__exportStar(i(0),t),r.__exportStar(i(7918),t),r.__exportStar(i(8718),t),r.__exportStar(i(5599),t),r.__exportStar(i(1289),t),r.__exportStar(i(7565),t)},3112:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AuthConnectivity=void 0;const r=i(5584),o=i(3857),s=i(1879),n=i(6743),a=r.__importDefault(i(8938)),c=i(8641),p=i(3136);let l=class AuthConnectivity{constructor(e){this.tokens=e,this.type=o.TestType.AUTH,this.CONNECTION_TIMEOUT=1e4}async test(e){const{repeaterId:t,authToken:i}=this.tokens.readTokens();try{const{data:r}=await a.default.get((0,p.resolve)(e.toString(),`/api/v1/repeaters/${t}`),{timeout:this.CONNECTION_TIMEOUT,headers:{Authorization:`api-key ${i}`}});return s.logger.debug("Authentication test successful with repeater ID: %s",r.id),r.id===t}catch(e){return!a.default.isAxiosError(e)||401!==e.status&&403!==e.status&&404!==e.status?s.logger.debug("Authentication test failed: %s",e.message):s.logger.debug("Authentication test failed with repeater ID: %s",t),!1}}};l=r.__decorate([(0,c.injectable)(),r.__param(0,(0,c.inject)(n.Tokens)),r.__metadata("design:paramtypes",[Object])],l),t.AuthConnectivity=l},4210:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Connectivity=void 0,t.Connectivity=Symbol("Connectivity")},3628:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectivityAnalyzer=void 0,t.ConnectivityAnalyzer=Symbol("ConnectivityAnalyzer")},5965:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultConnectivityAnalyzer=t.ConnectivityUrls=void 0;const r=i(5584),o=i(4210),s=i(1879),n=i(8027),a=i(8641);t.ConnectivityUrls=Symbol("ConnectivityUrls");let c=class DefaultConnectivityAnalyzer{constructor(e,t,i){this.urls=e,this.opt=t,this.connectivityTestRegistry=i}async verifyAccess(e,t){s.logger.debug("Calling connectivity status test with type %s",e);const i=this.connectivityTestRegistry.find((t=>t.type===e));if(!i)throw new Error("Selected test is not support.");return i.test(null!=t?t:this.urls.get(i.type),this.opt)}};c=r.__decorate([(0,a.injectable)(),r.__param(0,(0,a.inject)(t.ConnectivityUrls)),r.__param(1,(0,a.inject)(n.Options)),r.__param(2,(0,a.injectAll)(o.Connectivity)),r.__metadata("design:paramtypes",[Map,Object,Array])],c),t.DefaultConnectivityAnalyzer=c},4178:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTTPConnectivity=void 0;const r=i(5584),o=i(1879),s=i(3857),n=i(8641),a=r.__importDefault(i(4708)),c=r.__importDefault(i(7067)),p=i(8474);let l=class HTTPConnectivity{constructor(){this.type=s.TestType.HTTP,this.CONNECTION_TIMEOUT=1e4,this.FACTORY_REGISTRY=new Map([["http:",c.default],["https:",a.default]])}async test({port:e,hostname:t,protocol:i}){const r=this.FACTORY_REGISTRY.get(i).request({port:e,hostname:t,method:"GET",rejectUnauthorized:!1,timeout:this.CONNECTION_TIMEOUT});try{return r.once("timeout",(()=>r.destroy(new Error("Reached timeout.")))),process.nextTick((()=>r.end())),await(0,p.once)(r,"response"),o.logger.debug("Http connectivity test. The connection is successful."),!0}catch(e){return o.logger.debug("Http connectivity test. The connection failed: %s",e.message),!1}finally{r.aborted||r.destroy()}}};l=r.__decorate([(0,n.injectable)()],l),t.HTTPConnectivity=l},5356:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TracerouteConnectivity=void 0;const r=i(5584),o=i(1879),s=i(3857),n=i(8641);let a=class TracerouteConnectivity{constructor(){this.type=s.TestType.TRACEROUTE}async test(e,t){var i,r;const s=new o.Traceroute(e,{maximumHops:null===(i=null==t?void 0:t.traceroute)||void 0===i?void 0:i.maxTTL,amountProbes:null===(r=null==t?void 0:t.traceroute)||void 0===r?void 0:r.probes});try{const{reached:e}=await s.execute();return o.logger.debug("Traceroute test has been finished."),e}catch(e){return o.logger.debug("Traceroute test has been failed: %s",e.stack),!1}}};a=r.__decorate([(0,n.injectable)()],a),t.TracerouteConnectivity=a},7977:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(3112),t),r.__exportStar(i(4210),t),r.__exportStar(i(3628),t),r.__exportStar(i(5965),t),r.__exportStar(i(4178),t),r.__exportStar(i(5356),t)},2371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AUTH_TOKEN_VALIDATION_REGEXP=void 0,t.AUTH_TOKEN_VALIDATION_REGEXP=/^[A-Za-z0-9+/=]{7}\.nex[ap]\.[A-Za-z0-9+/=]{32}$/},2916:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FSTokens=void 0;const r=i(5584),o=i(1879),s=i(8641),n=i(8161),a=i(3024),c=i(6760);let p=class FSTokens{constructor(){this.baseDir=(0,n.homedir)()}writeTokens(e){o.logger.debug("Saving tokens to file %s",this.path),(0,a.writeFileSync)(this.path,JSON.stringify(e))}readTokens(){for(const e of[this.path,this.legacyPath])if(o.logger.debug("Reading saved tokens from file %s",e),(0,a.existsSync)(e)){o.logger.debug("File found. Return the tokens.");const t=(0,a.readFileSync)(e);return JSON.parse(t.toString("utf8"))}o.logger.debug("File doesn't exist.")}get path(){return(0,c.join)(this.baseDir,".bright-cli")}get legacyPath(){return(0,c.join)(this.baseDir,".nexploit-cli")}};p=r.__decorate([(0,s.injectable)()],p),t.FSTokens=p},8027:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Options=void 0,t.Options=Symbol("Options")},8534:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Platform=void 0,t.Platform=Symbol("Platform")},3367:(e,t,i)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadlinePlatform=void 0;const o=i(5584),s=i(2371),n=i(7977),a=i(1879),c=i(3857),p=i(6743),l=i(8641),d=o.__importDefault(i(481)),u=i(8161);let h=r=class ReadlinePlatform{constructor(e,t,i){this.urls=e,this.tokens=t,this.connectivityService=i,this.delimiter=`${u.EOL}\r--${u.EOL}`}async start(e){this.rl=d.default.createInterface({input:process.stdin,output:process.stdout}),(null==e?void 0:e.traceroute)?await this.processTraceroute():await this.configure(e),console.log(this.delimiter),console.log(r.COMPELED_MESSAGE)}async stop(){this.rl.close()}async configure(e){(null==e?void 0:e.ping)||(console.log(`Welcome to the Bright Network Testing wizard!${u.EOL}`),console.log("Note: To run the test, you will require a `Repeater ID` and an `Repeater Token` with the correct scopes."),console.log("If you are running the configuration as part of a POC, both of these should have been sent to you via your sales contact."),process.stdout.write(u.EOL),await this.requestTokens(),console.log(this.delimiter),await this.processExternalCommunication(),console.log(this.delimiter)),await this.processPing()}async requestTokens(){const e=await this.question("Please enter your Repeater ID"),t=await this.question("Please enter your Repeater API Token");process.stdout.write(u.EOL),t&&s.AUTH_TOKEN_VALIDATION_REGEXP.test(t)?e?await this.tokens.writeTokens({repeaterId:e,authToken:t}):console.error("Invalid value for repeater id"):console.error("Invalid value for authentication token")}processConnectivity(e){const t=this.urls.get(e);return this.process(`Validating the ${e} connection to ${t.toString()}`,(()=>this.connectivityService.verifyAccess(e,t)))}async processExternalCommunication(){console.log(`Starting EXTERNAL communication diagnostics:${u.EOL}`),await this.processConnectivity(c.TestType.HTTP),await this.process("Verifying provided Token and Repeater ID",(()=>this.connectivityService.verifyAccess(c.TestType.AUTH))),process.stdout.write(u.EOL),console.log("EXTERNAL communication diagnostics completed.")}async processPing(){console.log(`Next step is to validate the connection to your INTERNAL (local) target application(s).${u.EOL}`);const e=this.getDelimitedInput(await this.question(r.URLS_QUESTION),",");console.log(this.delimiter),console.log(r.INTERNAL_DIAGNOSTIC);let t=0;await a.Helpers.pool(250,e,(e=>this.process(`Trying to reach ${e}`,(async()=>{const i=await this.connectivityService.verifyAccess(c.TestType.HTTP,new URL(e));return t+=Number(i),i})))),process.stdout.write(u.EOL),console.log("INTERNAL communication diagnostics completed."),console.log(`${e.length-t} out of ${e.length} URLs could not be reached.`)}async processTraceroute(){console.log(`Traceroute to your INTERNAL (local) target application.${u.EOL}`),"win32"===process.platform&&console.log(`Note: Some Windows users might need to allow the ICMP network traffic through a firewall to enable this functionality.\n For more information, see: https://docs.brightsec.com/docs/testing-network-connectivity${u.EOL}`);const e=await this.question(r.HOST_OR_IP_QUESTION);console.log(this.delimiter),console.log(r.INTERNAL_DIAGNOSTIC);const t=await this.connectivityService.verifyAccess(c.TestType.TRACEROUTE,e);process.stdout.write(u.EOL),console.log(`Traceroute ${t?"completed":"failed"}.`)}async question(e){return new Promise((t=>this.rl.question(`${e}: `,t)))}async process(e,t){let i;process.stdout.write(`${e}...`),d.default.cursorTo(process.stdout,0);try{i=await t()}catch(e){a.logger.debug(e.message),i=!1}console.log(`${e}... ${i?"Success":"Failed"}`)}getDelimitedInput(e,t){const i=(null!=e?e:"").trim();return i?i.split(t).map((e=>e.trim())).filter(Boolean):[]}};h.URLS_QUESTION="Please enter the target URLs to test (separated by commas)",h.HOST_OR_IP_QUESTION="Please enter the target hostname or IP to test",h.COMPELED_MESSAGE="Communication diagnostics done, close the terminal to exit.",h.INTERNAL_DIAGNOSTIC=`Starting INTERNAL communication diagnostics:${u.EOL}`,h=r=o.__decorate([(0,l.injectable)(),o.__param(0,(0,l.inject)(n.ConnectivityUrls)),o.__param(1,(0,l.inject)(p.Tokens)),o.__param(2,(0,l.inject)(n.ConnectivityAnalyzer)),o.__metadata("design:paramtypes",[Object,Object,Object])],h),t.ReadlinePlatform=h},6860:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});i(5584).__exportStar(i(3367),t)},3857:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TestType=void 0,function(e){e.HTTP="http",e.AUTH="auth",e.TRACEROUTE="traceroute"}(t.TestType||(t.TestType={}))},6743:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tokens=void 0,t.Tokens=Symbol("Tokens")},5721:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=i(5584);r.__exportStar(i(7977),t),r.__exportStar(i(6860),t),r.__exportStar(i(2371),t),r.__exportStar(i(2916),t),r.__exportStar(i(8534),t),r.__exportStar(i(3857),t),r.__exportStar(i(6743),t),r.__exportStar(i(8027),t)},9490:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),i(1321);const r=i(2046),o=i(7758),s=i(9369),n=i(5721),a=i(523),c=i(8224),p=i(6412),l=i(2815),d=i(6712),u=i(9750),h=i(2675),f=i(8914),m=i(1879),y=i(512),g=i(8174),b=i(7035),v=i(1609),_=i(9945),w=i(8641);w.container.register("tsyringe",{useValue:w.container}).register(u.CliInfo,{useValue:new u.CliInfo(__dirname)}).register(r.RequestExecutor,{useClass:r.HttpRequestExecutor},{lifecycle:w.Lifecycle.Singleton}).register(r.Certificates,{useClass:r.CertificatesLoader},{lifecycle:w.Lifecycle.Singleton}).register(r.CertificatesCache,{useClass:v.DefaultCertificatesCache},{lifecycle:w.Lifecycle.Singleton}).register(r.CertificatesResolver,{useClass:_.DefaultCertificatesResolver},{lifecycle:w.Lifecycle.Singleton}).register(r.RequestExecutor,{useClass:r.WsRequestExecutor},{lifecycle:w.Lifecycle.Singleton}).register(o.VirtualScripts,{useClass:o.DefaultVirtualScripts},{lifecycle:w.Lifecycle.Singleton}).register(s.StartupManager,{useClass:s.DefaultStartupManager},{lifecycle:w.Lifecycle.Singleton}).register(f.RuntimeDetector,{useClass:f.DefaultRuntimeDetector},{lifecycle:w.Lifecycle.Singleton}).register(f.RepeaterServer,{useClass:f.DefaultRepeaterServer},{lifecycle:w.Lifecycle.Singleton}).register(f.RepeaterCommandHub,{useClass:f.DefaultRepeaterCommandHub},{lifecycle:w.Lifecycle.Singleton}).register(n.Tokens,{useClass:n.FSTokens},{lifecycle:w.Lifecycle.Singleton}).register(n.Connectivity,{useClass:n.HTTPConnectivity},{lifecycle:w.Lifecycle.Singleton}).register(n.Connectivity,{useClass:n.TracerouteConnectivity},{lifecycle:w.Lifecycle.Singleton}).register(n.Connectivity,{useClass:n.AuthConnectivity},{lifecycle:w.Lifecycle.Singleton}).register(a.BreakpointFactory,{useClass:a.DefaultBreakpointFactory},{lifecycle:w.Lifecycle.Singleton}).register(a.PollingFactory,{useClass:a.DefaultPollingFactory},{lifecycle:w.Lifecycle.Singleton}).register(y.DiscoveryPollingFactory,{useClass:y.DefaultDiscoveryPollingFactory},{lifecycle:w.Lifecycle.Singleton}).register(b.HostUpdateJobStatusPollingFactory,{useClass:g.DefaultHostUpdateJobStatusPollingFactory},{lifecycle:w.Lifecycle.Singleton}).register(a.Scans,{useClass:a.RestScans},{lifecycle:w.Lifecycle.Singleton}).register(y.Discoveries,{useClass:y.RestDiscoveries},{lifecycle:w.Lifecycle.Singleton}).register(c.EntryPoints,{useClass:c.RestEntryPoints},{lifecycle:w.Lifecycle.Singleton}).register(p.Archives,{useClass:p.RestArchives},{lifecycle:w.Lifecycle.Singleton}).register(p.ParserFactory,{useClass:p.DefaultParserFactory},{lifecycle:w.Lifecycle.Singleton}).register(o.ScriptLoader,{useClass:o.FSScriptLoader},{lifecycle:w.Lifecycle.Singleton}).register(n.ConnectivityAnalyzer,{useClass:n.DefaultConnectivityAnalyzer},{lifecycle:w.Lifecycle.Singleton}).register(n.Platform,{useClass:n.ReadlinePlatform},{lifecycle:w.Lifecycle.Singleton}).register(l.ConfigReader,{useClass:d.DefaultConfigReader},{lifecycle:w.Lifecycle.Singleton}).register(h.CliBuilder,{useFactory:e=>new h.CliBuilder({info:e.resolve(u.CliInfo),configReader:e.resolve(l.ConfigReader)})}).register(m.ProxyFactory,{useClass:m.DefaultProxyFactory}).register(f.RepeaterLauncher,{useClass:f.ServerRepeaterLauncher},{lifecycle:w.Lifecycle.Singleton}),t.default=w.container},756:e=>{e.exports=require("@neuralegion/os-service")},8176:e=>{e.exports=require("@neuralegion/raw-socket")},6436:e=>{e.exports=require("@sentry/node")},5711:e=>{e.exports=require("ajv")},6410:e=>{e.exports=require("ajv/lib/compile/formats")},6132:e=>{e.exports=require("ajv/lib/refs/json-schema-draft-04.json")},6763:e=>{e.exports=require("ajv/lib/refs/json-schema-draft-07.json")},1184:e=>{e.exports=require("arch")},8938:e=>{e.exports=require("axios")},9280:e=>{e.exports=require("better-ajv-errors")},6895:e=>{e.exports=require("chalk")},9267:e=>{e.exports=require("ci-info")},7331:e=>{e.exports=require("fast-content-type-parse")},4199:e=>{e.exports=require("find-up")},2305:e=>{e.exports=require("form-data")},1973:e=>{e.exports=require("http-proxy-agent")},3688:e=>{e.exports=require("https-proxy-agent")},7868:e=>{e.exports=require("iconv-lite")},7089:e=>{e.exports=require("js-yaml")},2736:e=>{e.exports=require("ms")},1321:e=>{e.exports=require("reflect-metadata")},6960:e=>{e.exports=require("rotating-file-stream")},8064:e=>{e.exports=require("semver")},5199:e=>{e.exports=require("socket.io-client")},7060:e=>{e.exports=require("socket.io-msgpack-parser")},2216:e=>{e.exports=require("socks-proxy-agent")},5584:e=>{e.exports=require("tslib")},8641:e=>{e.exports=require("tsyringe")},953:e=>{e.exports=require("win-ca")},5086:e=>{e.exports=require("ws")},8314:e=>{e.exports=require("yargs")},2613:e=>{e.exports=require("assert")},5317:e=>{e.exports=require("child_process")},9896:e=>{e.exports=require("fs")},4589:e=>{e.exports=require("node:assert")},1421:e=>{e.exports=require("node:child_process")},1314:e=>{e.exports=require("node:dgram")},1553:e=>{e.exports=require("node:dns/promises")},8474:e=>{e.exports=require("node:events")},3024:e=>{e.exports=require("node:fs")},1455:e=>{e.exports=require("node:fs/promises")},7067:e=>{e.exports=require("node:http")},4708:e=>{e.exports=require("node:https")},8995:e=>{e.exports=require("node:module")},7030:e=>{e.exports=require("node:net")},8161:e=>{e.exports=require("node:os")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},481:e=>{e.exports=require("node:readline")},7075:e=>{e.exports=require("node:stream")},8500:e=>{e.exports=require("node:timers/promises")},1692:e=>{e.exports=require("node:tls")},3136:e=>{e.exports=require("node:url")},7975:e=>{e.exports=require("node:util")},714:e=>{e.exports=require("node:vm")},8522:e=>{e.exports=require("node:zlib")},6928:e=>{e.exports=require("path")},9864:e=>{e.exports=JSON.parse('{"$id":"har","type":"object","required":["log"],"properties":{"log":{"$ref":"#/definitions/log"}},"definitions":{"log":{"$id":"#/definitions/log","description":"HTTP Archive structure.","type":"object","required":["version","creator","entries"],"properties":{"log":{"type":"object","properties":{"version":{"type":"string"},"creator":{"$ref":"#/definitions/creator"},"browser":{"$ref":"#/definitions/browser"},"pages":{"type":"array","optional":true,"items":{"$ref":"#/definitions/page"}},"entries":{"type":"array","items":{"$ref":"#/definitions/entry"}},"comment":{"type":"string","optional":true}}}}},"creator":{"$id":"#/definitions/creator","description":"Name and version info of the log creator app.","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string","optional":true}}},"browser":{"$id":"#/definitions/browser","description":"Name and version info of used browser.","type":"object","optional":true,"required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string","optional":true}}},"page":{"$id":"#/definitions/page","description":"Exported web page","optional":true,"required":["startedDateTime","$id","title","pageTimings"],"properties":{"startedDateTime":{"type":"string","format":"date-time","pattern":"^(d{4})(-)?(dd)(-)?(dd)(T)?(dd)(:)?(dd)(:)?(dd)(.d+)?(Z|([+-])(dd)(:)?(dd))"},"$id":{"type":"string","unique":true},"title":{"type":"string"},"pageTimings":{"$ref":"#/definitions/pageTimings"},"comment":{"type":"string","optional":true}}},"pageTimings":{"$id":"#/definitions/pageTimings","description":"Timing info about page load","properties":{"onContentLoad":{"type":"number","optional":true,"min":-1},"onLoad":{"type":"number","optional":true,"min":-1},"comment":{"type":"string","optional":true}}},"entry":{"$id":"#/definitions/entry","description":"Request and Response related info","optional":true,"required":["startedDateTime","time","request","response","cache","timings"],"properties":{"pageref":{"type":"string","optional":true},"startedDateTime":{"type":"string","format":"date-time","pattern":"^(d{4})(-)?(dd)(-)?(dd)(T)?(dd)(:)?(dd)(:)?(dd)(.d+)?(Z|([+-])(dd)(:)?(dd))"},"time":{"type":"number","min":0},"request":{"$ref":"#/definitions/request"},"response":{"$ref":"#/definitions/response"},"cache":{"$ref":"#/definitions/cache"},"timings":{"$ref":"#/definitions/timings"},"serverIPAddress":{"type":"string","optional":true},"connection":{"type":"string","optional":true},"comment":{"type":"string","optional":true}}},"request":{"$id":"#/definitions/request","description":"Monitored request","required":["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],"properties":{"method":{"type":"string"},"url":{"type":"string"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"headers":{"type":"array","items":{"$ref":"#/definitions/record"}},"queryString":{"type":"array","items":{"$ref":"#/definitions/record"}},"postData":{"$ref":"#/definitions/postData"},"headersSize":{"type":"integer","min":-1},"bodySize":{"type":"integer","min":-1},"comment":{"type":"string","optional":true}}},"record":{"$id":"#/definitions/record","required":["name","value"],"description":"Helper name-value pair structure.","properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string","optional":true}}},"response":{"$id":"#/definitions/response","description":"Monitored Response.","required":["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],"properties":{"status":{"type":"integer"},"statusText":{"type":"string"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"headers":{"type":"array","items":{"$ref":"#/definitions/record"}},"content":{"$ref":"#/definitions/content"},"redirectURL":{"type":"string"},"headersSize":{"type":"integer","min":-1},"bodySize":{"type":"integer","min":-1},"comment":{"type":"string","optional":true}}},"cookie":{"$id":"#/definitions/cookie","description":"Cookie description.","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"path":{"type":"string","optional":true},"domain":{"type":"string","optional":true},"expires":{"type":"string","optional":true},"httpOnly":{"type":"boolean","optional":true},"secure":{"type":"boolean","optional":true},"comment":{"type":"string","optional":true}}},"postData":{"$id":"#/definitions/postData","description":"Posted data info.","optional":true,"required":["mimeType"],"properties":{"mimeType":{"type":"string"},"text":{"type":"string","optional":true},"params":{"type":"array","optional":true,"properties":{"name":{"type":"string"},"value":{"type":"string","optional":true},"fileName":{"type":"string","optional":true},"content":{"type":"string","optional":true},"comment":{"type":"string","optional":true}}},"comment":{"type":"string","optional":true}}},"content":{"$id":"#/definitions/content","description":"Response content","required":["size","mimeType"],"properties":{"size":{"type":"integer"},"compression":{"type":"integer","optional":true},"mimeType":{"type":"string"},"text":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"comment":{"type":"string","optional":true}}},"cache":{"$id":"#/definitions/cache","description":"Info about a response coming from the cache.","properties":{"beforeRequest":{"$ref":"#/definitions/cacheEntry"},"afterRequest":{"$ref":"#/definitions/cacheEntry"},"comment":{"type":"string","optional":true}}},"cacheEntry":{"$id":"#/definitions/cacheEntry","optional":true,"description":"Info about cache entry.","required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","optional":"true","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string","optional":true}}},"timings":{"$id":"#/definitions/timings","required":["send","wait","receive"],"description":"Info about request-response timing.","properties":{"dns":{"type":"number","optional":true,"min":-1},"connect":{"type":"number","optional":true,"min":-1},"blocked":{"type":"number","optional":true,"min":-1},"send":{"type":"number"},"wait":{"type":"number"},"receive":{"type":"number"},"ssl":{"type":"number","optional":true,"min":-1},"comment":{"type":"string","optional":true}}}}}')},9550:e=>{e.exports=JSON.parse('{"title":"A JSON Schema for Swagger 2.0 API.","id":"http://swagger.io/v2/schema.json#","$schema":"http://json-schema.org/draft-04/schema#","type":"object","required":["swagger","info","paths"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"swagger":{"type":"string","enum":["2.0"],"description":"The Swagger version of this document."},"info":{"$ref":"#/definitions/info"},"host":{"type":"string","pattern":"^[^{}/ :\\\\\\\\]+(?::\\\\d+)?$","description":"The host (name or ip) of the API. Example: \'swagger.io\'"},"basePath":{"type":"string","pattern":"^/","description":"The base path to the API. Example: \'/api\'."},"schemes":{"$ref":"#/definitions/schemesList"},"consumes":{"description":"A list of MIME types accepted by the API.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"produces":{"description":"A list of MIME types the API can produce.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"paths":{"$ref":"#/definitions/paths"},"definitions":{"$ref":"#/definitions/definitions"},"parameters":{"$ref":"#/definitions/parameterDefinitions"},"responses":{"$ref":"#/definitions/responseDefinitions"},"security":{"$ref":"#/definitions/security"},"securityDefinitions":{"$ref":"#/definitions/securityDefinitions"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."},"termsOfService":{"type":"string","description":"The terms of service for the API."},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"paths":{"type":"object","description":"Relative paths to the individual endpoints. They must be relative to the \'basePath\'.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"},"^/":{"$ref":"#/definitions/pathItem"}},"additionalProperties":false},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"One or more JSON objects describing the schemas being consumed and produced by the API."},"parameterDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"One or more JSON representations for parameters"},"responseDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/response"},"description":"One or more JSON representations for responses"},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"examples":{"type":"object","additionalProperties":true},"mimeType":{"type":"string","description":"The MIME type of the HTTP message."},"operation":{"type":"object","required":["responses"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"tags":{"type":"array","items":{"type":"string"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the operation."},"description":{"type":"string","description":"A longer description of the operation, GitHub Flavored Markdown is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string","description":"A unique identifier of the operation."},"produces":{"description":"A list of MIME types the API can produce.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"consumes":{"description":"A list of MIME types the API can consume.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"parameters":{"$ref":"#/definitions/parametersList"},"responses":{"$ref":"#/definitions/responses"},"schemes":{"$ref":"#/definitions/schemesList"},"deprecated":{"type":"boolean","default":false},"security":{"$ref":"#/definitions/security"}}},"pathItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"get":{"$ref":"#/definitions/operation"},"put":{"$ref":"#/definitions/operation"},"post":{"$ref":"#/definitions/operation"},"delete":{"$ref":"#/definitions/operation"},"options":{"$ref":"#/definitions/operation"},"head":{"$ref":"#/definitions/operation"},"patch":{"$ref":"#/definitions/operation"},"parameters":{"$ref":"#/definitions/parametersList"}}},"responses":{"type":"object","description":"Response objects names can either be any valid HTTP status code or \'default\'.","minProperties":1,"additionalProperties":false,"patternProperties":{"^([0-9]{3})$|^(default)$":{"$ref":"#/definitions/responseValue"},"^x-":{"$ref":"#/definitions/vendorExtension"}},"not":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}}},"responseValue":{"oneOf":[{"$ref":"#/definitions/response"},{"$ref":"#/definitions/jsonReference"}]},"response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"schema":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/fileSchema"}]},"headers":{"$ref":"#/definitions/headers"},"examples":{"$ref":"#/definitions/examples"}},"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/header"}},"header":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"vendorExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"bodyParameter":{"type":"object","required":["name","in","schema"],"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["body"]},"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"schema":{"$ref":"#/definitions/schema"}},"additionalProperties":false},"headerParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["header"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"queryParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["query"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"formDataParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["formData"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array","file"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"pathParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["required"],"properties":{"required":{"type":"boolean","enum":[true],"description":"Determines whether or not this parameter is required or optional."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["path"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"nonBodyParameter":{"type":"object","required":["name","in","type"],"oneOf":[{"$ref":"#/definitions/headerParameterSubSchema"},{"$ref":"#/definitions/formDataParameterSubSchema"},{"$ref":"#/definitions/queryParameterSubSchema"},{"$ref":"#/definitions/pathParameterSubSchema"}]},"parameter":{"oneOf":[{"$ref":"#/definitions/bodyParameter"},{"$ref":"#/definitions/nonBodyParameter"}]},"schema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/xml"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"fileSchema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["type"],"properties":{"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"type":{"type":"string","enum":["file"]},"readOnly":{"type":"boolean","default":false},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"primitivesItems":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"security":{"type":"array","items":{"$ref":"#/definitions/securityRequirement"},"uniqueItems":true},"securityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"xml":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"securityDefinitions":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/basicAuthenticationSecurity"},{"$ref":"#/definitions/apiKeySecurity"},{"$ref":"#/definitions/oauth2ImplicitSecurity"},{"$ref":"#/definitions/oauth2PasswordSecurity"},{"$ref":"#/definitions/oauth2ApplicationSecurity"},{"$ref":"#/definitions/oauth2AccessCodeSecurity"}]}},"basicAuthenticationSecurity":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["basic"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"apiKeySecurity":{"type":"object","additionalProperties":false,"required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ImplicitSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["implicit"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2PasswordSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["password"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ApplicationSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["application"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2AccessCodeSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["accessCode"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"mediaTypeList":{"type":"array","items":{"$ref":"#/definitions/mimeType"},"uniqueItems":true},"parametersList":{"type":"array","description":"The parameters needed to send a valid API call.","additionalItems":false,"items":{"oneOf":[{"$ref":"#/definitions/parameter"},{"$ref":"#/definitions/jsonReference"}]},"uniqueItems":true},"schemesList":{"type":"array","description":"The transfer protocol of the API.","items":{"type":"string","enum":["http","https","ws","wss"]},"uniqueItems":true},"collectionFormat":{"type":"string","enum":["csv","ssv","tsv","pipes"],"default":"csv"},"collectionFormatWithMulti":{"type":"string","enum":["csv","ssv","tsv","pipes","multi"],"default":"csv"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"jsonReference":{"type":"object","required":["$ref"],"additionalProperties":false,"properties":{"$ref":{"type":"string"}}}}}')},3447:e=>{e.exports=JSON.parse('{"id":"https://spec.openapis.org/oas/3.0/schema/2019-04-02","$schema":"http://json-schema.org/draft-04/schema#","description":"Validation schema for OpenAPI Specification 3.0.X.","type":"object","required":["openapi","info","paths"],"properties":{"openapi":{"type":"string","pattern":"^3\\\\.0\\\\.\\\\d(-.+)?$"},"info":{"$ref":"#/definitions/Info"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"tags":{"type":"array","items":{"$ref":"#/definitions/Tag"},"uniqueItems":true},"paths":{"$ref":"#/definitions/Paths"},"components":{"$ref":"#/definitions/Components"}},"patternProperties":{"^x-":{}},"additionalProperties":false,"definitions":{"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"Info":{"type":"object","required":["title","version"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"termsOfService":{"type":"string","format":"uri-reference"},"contact":{"$ref":"#/definitions/Contact"},"license":{"$ref":"#/definitions/License"},"version":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Contact":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"email":{"type":"string","format":"email"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"License":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Server":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"description":{"type":"string"},"variables":{"type":"object","additionalProperties":{"$ref":"#/definitions/ServerVariable"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ServerVariable":{"type":"object","required":["default"],"properties":{"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Components":{"type":"object","properties":{"schemas":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}}},"responses":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Response"}]}}},"parameters":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Parameter"}]}}},"examples":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Example"}]}}},"requestBodies":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/RequestBody"}]}}},"headers":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Header"}]}}},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"links":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Link"}]}}},"callbacks":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Callback"}]}}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Schema":{"type":"object","properties":{"title":{"type":"string"},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":{},"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":{},"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":{},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"headers":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Header"},{"$ref":"#/definitions/Reference"}]}},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"links":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Link"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"MediaType":{"type":"object","properties":{"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}},"encoding":{"type":"object","additionalProperties":{"$ref":"#/definitions/Encoding"}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"}]},"Example":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"value":{},"externalValue":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Header":{"type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string","enum":["simple"],"default":"simple"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"}]},"Paths":{"type":"object","patternProperties":{"^\\\\/":{"$ref":"#/definitions/PathItem"},"^x-":{}},"additionalProperties":false},"PathItem":{"type":"object","properties":{"$ref":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true}},"patternProperties":{"^(get|put|post|delete|options|head|patch|trace)$":{"$ref":"#/definitions/Operation"},"^x-":{}},"additionalProperties":false},"Operation":{"type":"object","required":["responses"],"properties":{"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"operationId":{"type":"string"},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true},"requestBody":{"oneOf":[{"$ref":"#/definitions/RequestBody"},{"$ref":"#/definitions/Reference"}]},"responses":{"$ref":"#/definitions/Responses"},"callbacks":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Callback"},{"$ref":"#/definitions/Reference"}]}},"deprecated":{"type":"boolean","default":false},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Responses":{"type":"object","properties":{"default":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]}},"patternProperties":{"^[1-5](?:\\\\d{2}|XX)$":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]},"^x-":{}},"minProperties":1,"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"Tag":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExampleXORExamples":{"description":"Example and examples are mutually exclusive","not":{"required":["example","examples"]}},"SchemaXORContent":{"description":"Schema and content are mutually exclusive, at least one is required","not":{"required":["schema","content"]},"oneOf":[{"required":["schema"]},{"required":["content"],"description":"Some properties are not allowed if content is present","allOf":[{"not":{"required":["style"]}},{"not":{"required":["explode"]}},{"not":{"required":["allowReserved"]}},{"not":{"required":["example"]}},{"not":{"required":["examples"]}}]}]},"Parameter":{"type":"object","properties":{"name":{"type":"string"},"in":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"required":["name","in"],"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"},{"$ref":"#/definitions/ParameterLocation"}]},"ParameterLocation":{"description":"Parameter location","oneOf":[{"description":"Parameter in path","required":["required"],"properties":{"in":{"enum":["path"]},"style":{"enum":["matrix","label","simple"],"default":"simple"},"required":{"enum":[true]}}},{"description":"Parameter in query","properties":{"in":{"enum":["query"]},"style":{"enum":["form","spaceDelimited","pipeDelimited","deepObject"],"default":"form"}}},{"description":"Parameter in header","properties":{"in":{"enum":["header"]},"style":{"enum":["simple"],"default":"simple"}}},{"description":"Parameter in cookie","properties":{"in":{"enum":["cookie"]},"style":{"enum":["form"],"default":"form"}}}]},"RequestBody":{"type":"object","required":["content"],"properties":{"description":{"type":"string"},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"required":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/APIKeySecurityScheme"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/OAuth2SecurityScheme"},{"$ref":"#/definitions/OpenIdConnectSecurityScheme"}]},"APIKeySecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"HTTPSecurityScheme":{"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"bearerFormat":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false,"oneOf":[{"description":"Bearer","properties":{"scheme":{"enum":["bearer"]}}},{"description":"Non Bearer","not":{"required":["bearerFormat"]},"properties":{"scheme":{"not":{"enum":["bearer"]}}}}]},"OAuth2SecurityScheme":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flows":{"$ref":"#/definitions/OAuthFlows"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OpenIdConnectSecurityScheme":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"openIdConnectUrl":{"type":"string","format":"uri-reference"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OAuthFlows":{"type":"object","properties":{"implicit":{"$ref":"#/definitions/ImplicitOAuthFlow"},"password":{"$ref":"#/definitions/PasswordOAuthFlow"},"clientCredentials":{"$ref":"#/definitions/ClientCredentialsFlow"},"authorizationCode":{"$ref":"#/definitions/AuthorizationCodeOAuthFlow"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ImplicitOAuthFlow":{"type":"object","required":["authorizationUrl","scopes"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"PasswordOAuthFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ClientCredentialsFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"AuthorizationCodeOAuthFlow":{"type":"object","required":["authorizationUrl","tokenUrl"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Link":{"type":"object","properties":{"operationId":{"type":"string"},"operationRef":{"type":"string","format":"uri-reference"},"parameters":{"type":"object","additionalProperties":{}},"requestBody":{},"description":{"type":"string"},"server":{"$ref":"#/definitions/Server"}},"patternProperties":{"^x-":{}},"additionalProperties":false,"not":{"description":"Operation Id and Operation Ref are mutually exclusive","required":["operationId","operationRef"]}},"Callback":{"type":"object","additionalProperties":{"$ref":"#/definitions/PathItem"},"patternProperties":{"^x-":{}}},"Encoding":{"type":"object","properties":{"contentType":{"type":"string"},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/Header"}},"style":{"type":"string","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false}},"additionalProperties":false}}}')},9088:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","id":"https://schema.getpostman.com/json/collection/v2.0.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth":{"type":"object","title":"Auth","id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","ntlm","noauth","oauth1","oauth2"]},"noauth":{},"apikey":{"type":"object","title":"API Key Authentication","description":"The attributes for API Key Authentication. e.g. key, value, in."},"awsv4":{"type":"object","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). e.g. accessKey, secretKey, region, service."},"basic":{"type":"object","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). e.g. username, password."},"bearer":{"type":"object","title":"Bearer Token Authentication","description":"The attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750). e.g. token."},"digest":{"type":"object","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication). e.g. username, password, realm, nonce, nonceCount, algorithm, qop, opaque, clientNonce."},"edgegrid":{"type":"object","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html). e.g. accessToken, clientToken, clientSecret, baseURL, nonce, timestamp, headersToSign."},"hawk":{"type":"object","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk). e.g. authId, authKey, algorith, user, nonce, extraData, appId, delegation, timestamp."},"ntlm":{"type":"object","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx). e.g. username, password, domain, workstation."},"oauth1":{"type":"object","title":"OAuth1","description":"The attributes for [OAuth1](https://oauth.net/1/). e.g. consumerKey, consumerSecret, token, tokenSecret, signatureMethod, timestamp, nonce, version, realm, encodeOAuthSign."},"oauth2":{"type":"object","title":"OAuth2","description":"The attributes for [OAuth2](https://oauth.net/2/). e.g. accessToken, addTokenTo."}},"required":["type"]},"certificate-list":{"id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"type":"object","title":"Cookie","id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"id":"#/definitions/event-list","title":"Event List","type":"array","$schema":"http://json-schema.org/draft-04/schema#","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"type":"object","title":"Header","id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Item","id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Protocol Profile Behavior","id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["text"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"null"}]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["file"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"graphql":{"type":"object"},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`.","oneOf":[{"type":"null"},{"type":"string"},{"type":"number"}]},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","oneOf":[{"type":"object"},{"type":"null"}]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":"string"},{"type":"null"}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-04/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"oneOf":[{"type":"string"},{"type":"null"}]},"value":{"oneOf":[{"type":"string"},{"type":"null"}]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')},3025:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","id":"https://schema.getpostman.com/json/collection/v2.1.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth-attribute":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Auth","id":"#/definitions/auth-attribute","description":"Represents an attribute for any authorization method provided by Postman. For example `username` and `password` are set as auth attributes for Basic Authentication method.","properties":{"key":{"type":"string"},"value":{},"type":{"type":"string"}},"required":["key"]},"auth":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Auth","id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","noauth","oauth1","oauth2","ntlm"]},"noauth":{},"apikey":{"type":"array","title":"API Key Authentication","description":"The attributes for API Key Authentication.","items":{"$ref":"#/definitions/auth-attribute"}},"awsv4":{"type":"array","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).","items":{"$ref":"#/definitions/auth-attribute"}},"basic":{"type":"array","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"bearer":{"type":"array","title":"Bearer Token Authentication","description":"The helper attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750)","items":{"$ref":"#/definitions/auth-attribute"}},"digest":{"type":"array","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"edgegrid":{"type":"array","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html).","items":{"$ref":"#/definitions/auth-attribute"}},"hawk":{"type":"array","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk)","items":{"$ref":"#/definitions/auth-attribute"}},"ntlm":{"type":"array","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth1":{"type":"array","title":"OAuth1","description":"The attributes for [OAuth2](https://oauth.net/1/)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth2":{"type":"array","title":"OAuth2","description":"Helper attributes for [OAuth2](https://oauth.net/2/)","items":{"$ref":"#/definitions/auth-attribute"}}},"required":["type"]},"certificate-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Cookie","id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/event-list","title":"Event List","type":"array","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Header","id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Item","id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","title":"Protocol Profile Behavior","id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["text"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"oneOf":[{"type":"string"},{"type":"null"},{"type":"array"}]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","enum":["file"]},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"graphql":{"type":"object"},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","oneOf":[{"type":"null"},{"type":"string"},{"type":"number"}],"description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`."},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","oneOf":[{"type":"object"},{"type":"null"}]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":"string"},{"type":"null"}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-04/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"oneOf":[{"type":"string"},{"type":"null"}]},"value":{"oneOf":[{"type":"string"},{"type":"null"}]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-04/schema#","id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')},7925:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://schema.getpostman.com/json/draft-07/collection/v2.0.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth":{"type":"object","title":"Auth","$id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","ntlm","noauth","oauth1","oauth2"]},"noauth":{},"apikey":{"type":"object","title":"API Key Authentication","description":"The attributes for API Key Authentication. e.g. key, value, in."},"awsv4":{"type":"object","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). e.g. accessKey, secretKey, region, service."},"basic":{"type":"object","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). e.g. username, password."},"bearer":{"type":"object","title":"Bearer Token Authentication","description":"The attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750). e.g. token."},"digest":{"type":"object","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication). e.g. username, password, realm, nonce, nonceCount, algorithm, qop, opaque, clientNonce."},"edgegrid":{"type":"object","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html). e.g. accessToken, clientToken, clientSecret, baseURL, nonce, timestamp, headersToSign."},"hawk":{"type":"object","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk). e.g. authId, authKey, algorith, user, nonce, extraData, appId, delegation, timestamp."},"ntlm":{"type":"object","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx). e.g. username, password, domain, workstation."},"oauth1":{"type":"object","title":"OAuth1","description":"The attributes for [OAuth1](https://oauth.net/1/). e.g. consumerKey, consumerSecret, token, tokenSecret, signatureMethod, timestamp, nonce, version, realm, encodeOAuthSign."},"oauth2":{"type":"object","title":"OAuth2","description":"The attributes for [OAuth2](https://oauth.net/2/). e.g. accessToken, addTokenTo."}},"required":["type"]},"certificate-list":{"$id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"$id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"$id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"type":"object","title":"Cookie","$id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"type":["string","null"],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"$id":"#/definitions/event-list","title":"Event List","type":"array","$schema":"http://json-schema.org/draft-07/schema#","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"$id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"type":"object","title":"Header","$id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-07/schema#","title":"Folder","$id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"Item","$id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"Protocol Profile Behavior","$id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"graphql":{"type":"object"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"text"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"type":["array","string","null"]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"file"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`.","type":["null","string","number"]},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","type":["object","null"]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":"string"},{"type":"null"}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-07/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","$id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"type":["string","null"]},"value":{"type":["string","null"]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')},4900:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://schema.getpostman.com/json/draft-07/collection/v2.1.0/","type":"object","properties":{"info":{"$ref":"#/definitions/info"},"item":{"type":"array","description":"Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.","items":{"title":"Items","oneOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"variable":{"$ref":"#/definitions/variable-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["info","item"],"definitions":{"auth-attribute":{"type":"object","title":"Auth","$id":"#/definitions/auth-attribute","description":"Represents an attribute for any authorization method provided by Postman. For example `username` and `password` are set as auth attributes for Basic Authentication method.","properties":{"key":{"type":"string"},"value":{},"type":{"type":"string"}},"required":["key"]},"auth":{"type":"object","title":"Auth","$id":"#/definitions/auth","description":"Represents authentication helpers provided by Postman","properties":{"type":{"type":"string","enum":["apikey","awsv4","basic","bearer","digest","edgegrid","hawk","noauth","oauth1","oauth2","ntlm"]},"noauth":{},"apikey":{"type":"array","title":"API Key Authentication","description":"The attributes for API Key Authentication.","items":{"$ref":"#/definitions/auth-attribute"}},"awsv4":{"type":"array","title":"AWS Signature v4","description":"The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).","items":{"$ref":"#/definitions/auth-attribute"}},"basic":{"type":"array","title":"Basic Authentication","description":"The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"bearer":{"type":"array","title":"Bearer Token Authentication","description":"The helper attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750)","items":{"$ref":"#/definitions/auth-attribute"}},"digest":{"type":"array","title":"Digest Authentication","description":"The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication).","items":{"$ref":"#/definitions/auth-attribute"}},"edgegrid":{"type":"array","title":"EdgeGrid Authentication","description":"The attributes for [Akamai EdgeGrid Authentication](https://developer.akamai.com/legacy/introduction/Client_Auth.html).","items":{"$ref":"#/definitions/auth-attribute"}},"hawk":{"type":"array","title":"Hawk Authentication","description":"The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk)","items":{"$ref":"#/definitions/auth-attribute"}},"ntlm":{"type":"array","title":"NTLM Authentication","description":"The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth1":{"type":"array","title":"OAuth1","description":"The attributes for [OAuth2](https://oauth.net/1/)","items":{"$ref":"#/definitions/auth-attribute"}},"oauth2":{"type":"array","title":"OAuth2","description":"Helper attributes for [OAuth2](https://oauth.net/2/)","items":{"$ref":"#/definitions/auth-attribute"}}},"required":["type"]},"certificate-list":{"$id":"#/definitions/certificate-list","title":"Certificate List","description":"A representation of a list of ssl certificates","type":"array","items":{"$ref":"#/definitions/certificate"}},"certificate":{"$id":"#/definitions/certificate","title":"Certificate","description":"A representation of an ssl certificate","type":"object","properties":{"name":{"description":"A name for the certificate for user reference","type":"string"},"matches":{"description":"A list of Url match pattern strings, to identify Urls this certificate can be used for.","type":"array","item":{"type":"string","description":"An Url match pattern string"}},"key":{"description":"An object containing path to file containing private key, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"cert":{"description":"An object containing path to file certificate, on the file system","type":"object","properties":{"src":{"description":"The path to file containing key for certificate, on the file system"}}},"passphrase":{"description":"The passphrase for the certificate","type":"string"}}},"cookie-list":{"$id":"#/definitions/cookie-list","title":"Certificate List","description":"A representation of a list of cookies","type":"array","items":{"$ref":"#/definitions/cookie"}},"cookie":{"type":"object","title":"Cookie","$id":"#/definitions/cookie","description":"A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)","properties":{"domain":{"type":"string","description":"The domain for which this cookie is valid."},"expires":{"type":["string","null"],"description":"When the cookie expires."},"maxAge":{"type":"string"},"hostOnly":{"type":"boolean","description":"True if the cookie is a host-only cookie. (i.e. a request\'s URL domain must exactly match the domain of the cookie)."},"httpOnly":{"type":"boolean","description":"Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)"},"name":{"type":"string","description":"This is the name of the Cookie."},"path":{"type":"string","description":"The path associated with the Cookie."},"secure":{"type":"boolean","description":"Indicates if the \'secure\' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)"},"session":{"type":"boolean","description":"True if the cookie is a session cookie."},"value":{"type":"string","description":"The value of the Cookie."},"extensions":{"type":"array","description":"Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)"}},"required":["domain","path"]},"description":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/description","description":"A Description can be a raw text, or be an object, which holds the description along with its format.","oneOf":[{"type":"object","title":"Description","properties":{"content":{"type":"string","description":"The content of the description goes here, as a raw string."},"type":{"type":"string","description":"Holds the mime type of the raw description content. E.g: \'text/markdown\' or \'text/html\'.\\nThe type is used to correctly render the description when generating documentation, or in the Postman app."},"version":{"description":"Description can have versions associated with it, which should be put in this property."}}},{"type":"string"},{"type":"null"}]},"event-list":{"$id":"#/definitions/event-list","title":"Event List","type":"array","$schema":"http://json-schema.org/draft-07/schema#","description":"Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.","items":{"$ref":"#/definitions/event"}},"event":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/event","title":"Event","description":"Defines a script associated with an associated event name","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the enclosing event."},"listen":{"type":"string","description":"Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively."},"script":{"$ref":"#/definitions/script"},"disabled":{"type":"boolean","default":false,"description":"Indicates whether the event is disabled. If absent, the event is assumed to be enabled."}},"required":["listen"]},"header-list":{"$id":"#/definitions/header-list","title":"Header List","description":"A representation for a list of headers","type":"array","items":{"$ref":"#/definitions/header"}},"header":{"type":"object","title":"Header","$id":"#/definitions/header","description":"Represents a single HTTP Header","properties":{"key":{"description":"This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``","type":"string"},"value":{"type":"string","description":"The value (or the RHS) of the Header is stored in this field."},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current header will not be sent with requests."},"description":{"$ref":"#/definitions/description"}},"required":["key","value"]},"info":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/info","title":"Information","description":"Detailed description of the info block","type":"object","properties":{"name":{"type":"string","title":"Name of the collection","description":"A collection\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content."},"_postman_id":{"type":"string","description":"Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\\n *Note: This field exists for compatibility reasons with Collection Format V1.*"},"description":{"$ref":"#/definitions/description"},"version":{"$ref":"#/definitions/version"},"schema":{"description":"This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1","type":"string"}},"required":["name","schema"]},"item-group":{"$schema":"http://json-schema.org/draft-07/schema#","title":"Folder","$id":"#/definitions/item-group","description":"One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using \'Folders\'. A folder just is an ordered set of requests.","type":"object","properties":{"name":{"type":"string","description":"A folder\'s friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"item":{"description":"Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.","type":"array","items":{"title":"Items","anyOf":[{"$ref":"#/definitions/item"},{"$ref":"#/definitions/item-group"}]}},"event":{"$ref":"#/definitions/event-list"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["item"]},"item":{"type":"object","title":"Item","$id":"#/definitions/item","description":"Items are entities which contain an actual HTTP request, and sample responses attached to it.","properties":{"id":{"type":"string","description":"A unique ID that is used to identify collections internally"},"name":{"type":"string","description":"A human readable identifier for the current item."},"description":{"$ref":"#/definitions/description"},"variable":{"$ref":"#/definitions/variable-list"},"event":{"$ref":"#/definitions/event-list"},"request":{"$ref":"#/definitions/request"},"response":{"type":"array","title":"Responses","items":{"$ref":"#/definitions/response"}},"protocolProfileBehavior":{"$ref":"#/definitions/protocol-profile-behavior"}},"required":["request"]},"protocol-profile-behavior":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"Protocol Profile Behavior","$id":"#/definitions/protocol-profile-behavior","description":"Set of configurations used to alter the usual behavior of sending the request"},"proxy-config":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/proxy-config","title":"Proxy Config","description":"Using the Proxy, you can configure your custom proxy into the postman for particular url match","type":"object","properties":{"match":{"default":"http+https://*/*","description":"The Url match for which the proxy config is defined","type":"string"},"host":{"type":"string","description":"The proxy server host"},"port":{"type":"integer","minimum":0,"default":8080,"description":"The proxy server port"},"tunnel":{"description":"The tunneling details for the proxy config","default":false,"type":"boolean"},"disabled":{"type":"boolean","default":false,"description":"When set to true, ignores this proxy configuration entity"}}},"request":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/request","title":"Request","description":"A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be \'GET\'.","oneOf":[{"type":"object","title":"Request","properties":{"url":{"$ref":"#/definitions/url"},"auth":{"oneOf":[{"type":"null"},{"$ref":"#/definitions/auth"}]},"proxy":{"$ref":"#/definitions/proxy-config"},"certificate":{"$ref":"#/definitions/certificate"},"method":{"anyOf":[{"description":"The Standard HTTP method associated with this request.","type":"string","enum":["GET","PUT","POST","PATCH","DELETE","COPY","HEAD","OPTIONS","LINK","UNLINK","PURGE","LOCK","UNLOCK","PROPFIND","VIEW"]},{"description":"The Custom HTTP method associated with this request.","type":"string"}]},"description":{"$ref":"#/definitions/description"},"header":{"oneOf":[{"$ref":"#/definitions/header-list"},{"type":"string"}]},"body":{"oneOf":[{"type":"object","description":"This field contains the data usually contained in the request body.","properties":{"mode":{"description":"Postman stores the type of data associated with this request in this field.","enum":["raw","urlencoded","formdata","file","graphql"]},"raw":{"type":"string"},"graphql":{"type":"object"},"urlencoded":{"type":"array","items":{"type":"object","title":"UrlEncodedParameter","properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false},"description":{"$ref":"#/definitions/description"}},"required":["key"]}},"formdata":{"type":"array","items":{"type":"object","title":"FormParameter","oneOf":[{"properties":{"key":{"type":"string"},"value":{"type":"string"},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"text"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]},{"properties":{"key":{"type":"string"},"src":{"type":["array","string","null"]},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents this form data entity from being sent."},"type":{"type":"string","const":"file"},"contentType":{"type":"string","description":"Override Content-Type header of this form data entity."},"description":{"$ref":"#/definitions/description"}},"required":["key"]}]}},"file":{"type":"object","properties":{"src":{"oneOf":[{"type":"string","description":"Contains the name of the file to upload. _Not the path_."},{"type":"null","description":"A null src indicates that no file has been selected as a part of the request body"}]},"content":{"type":"string"}}},"options":{"type":"object","description":"Additional configurations and options set for various body modes."},"disabled":{"type":"boolean","default":false,"description":"When set to true, prevents request body from being sent."}}},{"type":"null"}]}}},{"type":"string"}]},"response":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/response","title":"Response","description":"A response represents an HTTP response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this response from requests.","type":"string"},"originalRequest":{"$ref":"#/definitions/request"},"responseTime":{"title":"ResponseTime","type":["null","string","number"],"description":"The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`."},"timings":{"title":"Response Timings","description":"Set of timing information related to request and response in milliseconds","type":["object","null"]},"header":{"title":"Headers","oneOf":[{"type":"array","title":"Header","description":"No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.","items":{"oneOf":[{"$ref":"#/definitions/header"},{"title":"Header","type":"string"}]}},{"type":["string","null"]}]},"cookie":{"type":"array","items":{"$ref":"#/definitions/cookie"}},"body":{"type":["null","string"],"description":"The raw text of the response."},"status":{"type":"string","description":"The response status, e.g: \'200 OK\'"},"code":{"type":"integer","description":"The numerical response code, example: 200, 201, 404, etc."}}},"script":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/script","title":"Script","type":"object","description":"A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.","properties":{"id":{"description":"A unique, user defined identifier that can be used to refer to this script from requests.","type":"string"},"type":{"description":"Type of the script. E.g: \'text/javascript\'","type":"string"},"exec":{"oneOf":[{"type":"array","description":"This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.","items":{"type":"string"}},{"type":"string"}]},"src":{"$ref":"#/definitions/url"},"name":{"type":"string","description":"Script name"}}},"url":{"$schema":"http://json-schema.org/draft-07/schema#","description":"If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.","$id":"#/definitions/url","title":"Url","oneOf":[{"type":"object","properties":{"raw":{"type":"string","description":"The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)."},"protocol":{"type":"string","description":"The protocol associated with the request, E.g: \'http\'"},"host":{"title":"Host","description":"The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"description":"The host, split into subdomain strings."}]},"path":{"oneOf":[{"type":"string"},{"type":"array","description":"The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}]}}]},"port":{"type":"string","description":"The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https."},"query":{"type":"array","description":"An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables","items":{"type":"object","title":"QueryParam","properties":{"key":{"type":["string","null"]},"value":{"type":["string","null"]},"disabled":{"type":"boolean","default":false,"description":"If set to true, the current query parameter will not be sent with the request."},"description":{"$ref":"#/definitions/description"}}}},"hash":{"description":"Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.","type":"string"},"variable":{"type":"array","description":"Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.","items":{"$ref":"#/definitions/variable"}}}},{"type":"string"}]},"variable-list":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable-list","title":"Variable List","description":"Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\\n*Note: Collection variables must not contain any sensitive information.*","type":"array","items":{"$ref":"#/definitions/variable"}},"variable":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/variable","title":"Variable","description":"Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.","type":"object","properties":{"id":{"description":"A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"key":{"description":"A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.","type":"string"},"value":{"description":"The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection"},"type":{"description":"A variable may have multiple types. This field specifies the type of the variable.","type":"string","enum":["string","boolean","any","number"]},"name":{"type":"string","description":"Variable name"},"description":{"$ref":"#/definitions/description"},"system":{"type":"boolean","default":false,"description":"When set to true, indicates that this variable has been set by Postman"},"disabled":{"type":"boolean","default":false}},"anyOf":[{"required":["id"]},{"required":["key"]},{"required":["id","key"]}]},"version":{"$schema":"http://json-schema.org/draft-07/schema#","$id":"#/definitions/version","title":"Collection Version","description":"Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!","oneOf":[{"type":"object","properties":{"major":{"description":"Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).","minimum":0,"type":"integer"},"minor":{"description":"You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.","minimum":0,"type":"integer"},"patch":{"description":"Ideally, minor changes to a collection should result in the increment of this number.","minimum":0,"type":"integer"},"identifier":{"description":"A human friendly identifier to make sense of the version numbers. E.g: \'beta-3\'","type":"string","maxLength":10},"meta":{}},"required":["major","minor","patch"]},{"type":"string"}]}}}')}},t={};function __webpack_require__(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,__webpack_require__),o.exports}var i={};(()=>{var e,t=i;Object.defineProperty(t,"__esModule",{value:!0});const r=__webpack_require__(5584);process.env.UV_THREADPOOL_SIZE=String(1024),process.env.NODE_OPTIONS=`${null!==(e=process.env.NODE_OPTIONS)&&void 0!==e?e:""} --max-http-header-size=40960`.trim(),__webpack_require__(1321);const o=__webpack_require__(6572),s=__webpack_require__(1860),n=r.__importDefault(__webpack_require__(9490)),a=__webpack_require__(35),c=__webpack_require__(1294),p=__webpack_require__(1718),l=__webpack_require__(8287),d=__webpack_require__(3567),u=__webpack_require__(4191);n.default.resolve(s.CliBuilder).build({commands:[new o.RunRepeater,new o.VersionCommand,new o.PollingScanStatus,new o.RunScan,new o.RetestScan,new o.StopScan,new a.RunDiscovery,new c.StopDiscovery,new p.RerunDiscovery,new l.PollingDiscoveryStatus,new d.PollingHostUpdateJobStatus,new o.UploadArchive,new o.Configure,new o.GetEntryPoints,new u.EntryPointsUpdateHost]}).argv})();var r=exports;for(var o in i)r[o]=i[o];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
3
3
|
//# sourceMappingURL=index.js.map
|