Aribot JavaScript and TypeScript SDK: changelog
3.0.0
Version 2.0.1 could not reach the API: it built URLs with new URL(path, baseUrl), which dropped /aribot-api, so every call failed. 3.0.0 is a rebuild. Every call now maps to a route that exists in the Aribot backend today.
Breaking changes
- Default host is
https://aribot.ayurak.com.baseUrlis the host only (no/aribot-api); the SDK adds/aribot-apiitself. A base URL with a path, query or credentials is refused, and plain http is refused except for localhost. - Constructor:
new Aribot({ apiKey, baseUrl, timeoutMs, agentKey, fetch }). The 2.x formnew Aribot(apiKey, options)still works. WithoutapiKey, the client readsARIBOT_API_KEY, thenARIBOT_TOKEN. - **
timeoutis nowtimeoutMs** and defaults to 60000. - Retries: only GET and HEAD are retried. 2.x retried every method, including POST, which could repeat uploads and AI work. To retry a write, pass
{ idempotencyKey }. - Redirects are no longer followed; a 3xx throws
AribotErrorwith coderedirect_refused. - Errors:
AribotErrornow hasstatus,codeandpayload.statusCodeis nowstatusandresponseis nowpayload. 403 isPermissionDeniedError(2.x threwAuthenticationError). New:LicenseRequiredError(402),ConflictError(409),TimeoutError,NetworkError,ConfigError.ValidationErrorcovers 400 and 422 and no longer haserrors; readpayload. - Responses are the server's JSON as is. 2.x unwrapped some lists (for example
getThreatsreturned an array); 3.0 returns the server's array or page. Useresults(page)to get the items. - Package: ESM and CommonJS builds with types, no runtime dependencies, Node 18 or later.
New
gates:decide,feedbackFile,fix,listRuns,listConfigs,getConfig,listRules,getRule,importRules,getVersion,validateVersion,dryRunVersion,activeRuleSet,postRunnerResults.agents.decide: the agent decision API (POST /v2/gateway/decide/), authenticated with theagentKeyoption.connector:health,startCodeReview,getCodeReview,createThreatModel,insights,workbench,startScan,getScan,getScanJob.developer:usage,usageStats,rateLimits,rateLimitUsage,listApiKeys,createApiKey,revokeApiKey.codeReview:createRepository,listRepositories,uploadFiles,startScan,traceability,verifyAllThreats,generateFix,threatVerifications.pipeline:listProjectScans,getResults,getVulnerabilities,getGateResults,stats.threatModeling.export,compliance.listScans,compliance.listReportFrameworks.- Every method takes a last argument
{ signal, timeoutMs, idempotencyKey }.
Renamed or moved
| 2.x | 3.0 | |
|---|---|---|
usage(period) (/v1/usage/) | usage(query) and developer.usage(query) (/v1/developer/usage/) | |
apiKeys.list() (/v2/api-keys/) | developer.listApiKeys() (/v1/developer/api-keys/) | |
apiKeys.create(options) | developer.createApiKey(body); needs a signed-in person (JWT) | |
apiKeys.revoke(id) | developer.revokeApiKey(id); needs a signed-in person (JWT) | |
ai.analyze(options) (/v2/ai/analyze/) | multiAgent.analyze(body) (/v2/threat-modeling/ai-agents/analyze/) | |
remediation.* (/api/v2/remediation/...) | same names under /v2/compliances/remediation/... | |
remediation.analyticsBySeverity | remediation.bySeverity | |
remediation.analyticsByPolicy | remediation.byPolicy | |
threatModeling.analyzeWithAI(id, types) (analyze-with-ai/) | threatModeling.analyzeWithAI(id, body) (analyze-ai/) | |
threatModeling.dashboard(period) (/v1/tm/dashboard/) | threatModeling.dashboard(query) and dashboard.posture(query) (/v1/tm/dashboard/posture/) | |
threatModeling.analyzeDiagram(file, options) | same route; returns the upload response, with no built-in wait. Poll threatModeling.get(id) | |
dashboard.getOverview() (/v2/dashboard/overview/) | dashboard.posture() | |
compliance.getReport(diagramId, format) | compliance.getReport(diagramId, frameworkId, query) (/v1/compliance-reporting/diagrams/{id}/frameworks/{fw}/report/) | |
compliance.dashboard(period) (/v2/compliances/dashboard/) | compliance.dashboard(view) with view trends, top-assets, top-controls, failed-controls or cloud-stats | |
compliance.scan(diagramId, options) | compliance.scan(diagramId, body) | |
cloud.scan(projectId, options) (/v2/cloud-security/scans/) | `cloud.scan({ accountId \ | diagramId, ... }) (POST /v2/connector/scan`) |
cloud.getScan(id) | cloud.getScan(id) (/v2/connector/scan/{id}) | |
cloud.listScans(options) | cloud.listScans(query) (/v2/compliances/scan/) | |
cloud.getFindings(scanId, options) | cloud.listFindings(query) (/v2/compliances/findings/, filter by account_id) | |
cloud.getRemediation(findingId) | cloud.getFinding(findingId) (/v2/compliances/findings/{id}/) | |
cloud.listAccounts(provider) | cloud.listAccounts(query) (/v1/accounts/) | |
cloud.dashboard(period) | cloud.dashboard(query) (/v2/compliances/dashboard/cloud-stats/) | |
pipeline.scan(projectId, options) (POST /v1/pipeline/scans/) | pipeline.scan(projectId, { branch, commitSha, scanType, pullRequestId }) (POST /v1/pipeline/projects/{id}/scan/). It returns the new scan and no longer waits | |
pipeline.getFindings(scanId) (scans/{id}/findings/) | pipeline.getResults(scanId) (scans/{id}/results/) | |
pipeline.configureGates(projectId, gates) (PATCH) | pipeline.getSecurityGates(projectId) to read, pipeline.updateSecurityGate(gateId, changes) to change one gate | |
codeReview.createScan(repositoryUrl, options) | codeReview.createScan({ repositoryId, diagramId, scanType }); register the repository with createRepository first | |
codeReview.getFindings(scanId) | codeReview.traceability(scanId) | |
codeReview.remediateFinding(scanId, findingId) | codeReview.generateFix(scanId, threatId) | |
codeReview.rescan(scanId) | codeReview.startScan(scanId) | |
codeReview.getSummary(scanId) | codeReview.getScan(scanId) | |
sbom.upload(file, options) (POST /v2/sbom/documents/) | sbom.generate({ file, format, projectName }) (POST /v2/sbom/generate/) | |
sbom.getVulnerabilities(documentId) | sbom.checkVulnerabilities({ repositoryUrl, packageManager }) (POST /v2/sbom/vulnerabilities/) | |
economics.getComponentCost(componentId) | economics.getComponentTypeCost(componentTypeId) (/v2/threat-modeling/component-types/{id}/cost-intelligence/) | |
economics.getEconomicIntelligence() | economics.getPricing() | |
digitalTwin.mapComponent(diagramId, componentId, resourceId) | digitalTwin.mapComponent(diagramId, { componentId, resourceId, accountId, componentType }) | |
multiAgent.voiceToArchitecture(audio) | multiAgent.voiceToArchitecture(voiceText, voiceMetadata): the server takes a transcript | |
maestro (class MAESTROAPI) | maestro (class MaestroAPI) | |
SBOMAPI | SbomAPI |
Removed (no backend route)
ai.getUsage,ai.getQuota,ai.listModels,ai.configure,ai.getQueueStatus(/v2/ai/*). For API usage, usedeveloper.usage().- The whole
finopsmodule:getRecommendations,getCosts,getOptimization(/v2/finops/*). dashboard.getRecentActivity,dashboard.getRiskSummary. Usedashboard.posture().compliance.getGaps,compliance.addCustomStandard(the standards route is read only).cloud.connectAccount,cloud.deleteAccount,cloud.resolveFinding,cloud.suppressFinding. Connect and manage cloud accounts in the Aribot app.pipeline.addBaseline,pipeline.suppressFinding,pipeline.dashboard, and the helpersgetSastFindings,getScaFindings,getSecretsFindings. Usepipeline.getResultsorpipeline.getVulnerabilities.maestro.enrichThreats.economics.getMarketIntelligence,economics.calculateROI.- The
apiKeysandaiproperties, and theAIAPI,FinOpsAPIandAPIKeysAPIclasses. - The type aliases for 2.x response shapes (
Diagram,Threat,CloudScanand the rest). Responses are typed asJson.