@ayurak/sdk 1.0.0 → 1.4.0
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/README.md +106 -10
- package/dist/index.d.mts +510 -1
- package/dist/index.d.ts +510 -1
- package/dist/index.js +440 -1
- package/dist/index.mjs +431 -1
- package/package.json +3 -6
package/README.md
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
# Aribot JavaScript/TypeScript SDK
|
|
2
2
|
|
|
3
|
-
Official JavaScript SDK for the Aribot Security Platform.
|
|
3
|
+
Official JavaScript SDK for the Aribot Security Platform by Aristiun & Ayurak.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@ayurak/sdk)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](LICENSE)
|
|
4
8
|
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
7
11
|
```bash
|
|
8
|
-
npm install
|
|
12
|
+
npm install @ayurak/sdk
|
|
9
13
|
# or
|
|
10
|
-
yarn add
|
|
14
|
+
yarn add @ayurak/sdk
|
|
11
15
|
# or
|
|
12
|
-
pnpm add
|
|
16
|
+
pnpm add @ayurak/sdk
|
|
13
17
|
```
|
|
14
18
|
|
|
15
19
|
## Quick Start
|
|
16
20
|
|
|
17
21
|
```typescript
|
|
18
|
-
import { Aribot } from '
|
|
22
|
+
import { Aribot } from '@ayurak/sdk';
|
|
19
23
|
|
|
20
24
|
const client = new Aribot('your_api_key');
|
|
21
25
|
|
|
@@ -38,6 +42,9 @@ for (const threat of threats) {
|
|
|
38
42
|
- **Compliance Scanning** - ISO 27001, SOC2, GDPR, HIPAA, PCI-DSS, NIST
|
|
39
43
|
- **Cloud Security** - Scan AWS, Azure, GCP for misconfigurations
|
|
40
44
|
- **Pipeline Security** - SAST, SCA, secrets detection in CI/CD
|
|
45
|
+
- **Digital Twin** - Cloud resource mapping, health monitoring, live status
|
|
46
|
+
- **Economics** - Cost analysis, ROI calculations, market intelligence
|
|
47
|
+
- **Red Team** - Attack simulations, methodologies, threat intelligence
|
|
41
48
|
|
|
42
49
|
## API Reference
|
|
43
50
|
|
|
@@ -231,6 +238,83 @@ await client.pipeline.suppressFinding(findingId, 'False positive');
|
|
|
231
238
|
const dashboard = await client.pipeline.dashboard(projectId);
|
|
232
239
|
```
|
|
233
240
|
|
|
241
|
+
### Digital Twin
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
// Get cloud providers
|
|
245
|
+
const providers = await client.digitalTwin.getProviders();
|
|
246
|
+
// Returns: [{ name: 'aws', display_name: 'Amazon Web Services', is_active: true }, ...]
|
|
247
|
+
|
|
248
|
+
// Get available resources
|
|
249
|
+
const resources = await client.digitalTwin.getResources({ provider: 'aws', limit: 50 });
|
|
250
|
+
|
|
251
|
+
// Get health status
|
|
252
|
+
const health = await client.digitalTwin.getHealth();
|
|
253
|
+
|
|
254
|
+
// Get analytics
|
|
255
|
+
const analytics = await client.digitalTwin.getAnalytics();
|
|
256
|
+
|
|
257
|
+
// Get diagram component cloud status
|
|
258
|
+
const status = await client.digitalTwin.getDiagramComponentStatus(diagramId);
|
|
259
|
+
|
|
260
|
+
// Map component to cloud resource
|
|
261
|
+
await client.digitalTwin.mapComponent(diagramId, componentId, resourceId);
|
|
262
|
+
|
|
263
|
+
// Sync diagram status
|
|
264
|
+
await client.digitalTwin.syncDiagramStatus(diagramId);
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Economics
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
// Get economics dashboard
|
|
271
|
+
const dashboard = await client.economics.getDashboard({ period: 'month' });
|
|
272
|
+
|
|
273
|
+
// Get diagram cost analysis
|
|
274
|
+
const cost = await client.economics.getDiagramCostAnalysis(diagramId);
|
|
275
|
+
console.log(`Monthly cost: $${cost.total_monthly_cost}`);
|
|
276
|
+
|
|
277
|
+
// Get component cost
|
|
278
|
+
const componentCost = await client.economics.getComponentCost(componentId);
|
|
279
|
+
|
|
280
|
+
// Get economic intelligence
|
|
281
|
+
const intel = await client.economics.getEconomicIntelligence();
|
|
282
|
+
|
|
283
|
+
// Get market intelligence
|
|
284
|
+
const market = await client.economics.getMarketIntelligence();
|
|
285
|
+
|
|
286
|
+
// Calculate ROI
|
|
287
|
+
const roi = await client.economics.calculateROI({
|
|
288
|
+
investment: 100000,
|
|
289
|
+
risksAddressed: ['risk-1', 'risk-2'],
|
|
290
|
+
timeframeDays: 365
|
|
291
|
+
});
|
|
292
|
+
console.log(`ROI: ${roi.roi_percentage}%`);
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Red Team
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
// Get methodologies
|
|
299
|
+
const methodologies = await client.redTeam.getMethodologies();
|
|
300
|
+
// Returns: [{ id: 'stride', name: 'STRIDE', description: '...' }, ...]
|
|
301
|
+
|
|
302
|
+
// Get simulations
|
|
303
|
+
const simulations = await client.redTeam.getSimulations({ limit: 10 });
|
|
304
|
+
|
|
305
|
+
// Get threat intelligence
|
|
306
|
+
const intel = await client.redTeam.getIntelligence();
|
|
307
|
+
|
|
308
|
+
// Generate attack paths
|
|
309
|
+
const paths = await client.redTeam.generateAttackPaths(diagramId, {
|
|
310
|
+
depth: 'comprehensive',
|
|
311
|
+
includeRemediations: true
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
// Get security requirements
|
|
315
|
+
const requirements = await client.redTeam.getSecurityRequirements(diagramId);
|
|
316
|
+
```
|
|
317
|
+
|
|
234
318
|
## Error Handling
|
|
235
319
|
|
|
236
320
|
```typescript
|
|
@@ -242,7 +326,7 @@ import {
|
|
|
242
326
|
ValidationError,
|
|
243
327
|
NotFoundError,
|
|
244
328
|
ServerError
|
|
245
|
-
} from '
|
|
329
|
+
} from '@ayurak/sdk';
|
|
246
330
|
|
|
247
331
|
const client = new Aribot('your_api_key');
|
|
248
332
|
|
|
@@ -290,7 +374,7 @@ console.log(`API calls used: ${usage.calls_used}/${usage.calls_limit}`);
|
|
|
290
374
|
For Node.js environments, you can use the `fs` module to read files:
|
|
291
375
|
|
|
292
376
|
```typescript
|
|
293
|
-
import { Aribot } from '
|
|
377
|
+
import { Aribot } from '@ayurak/sdk';
|
|
294
378
|
import { readFileSync } from 'fs';
|
|
295
379
|
|
|
296
380
|
const client = new Aribot(process.env.ARIBOT_API_KEY!);
|
|
@@ -307,7 +391,7 @@ const result = await client.threatModeling.analyzeDiagram(blob, {
|
|
|
307
391
|
## Browser Usage
|
|
308
392
|
|
|
309
393
|
```typescript
|
|
310
|
-
import { Aribot } from '
|
|
394
|
+
import { Aribot } from '@ayurak/sdk';
|
|
311
395
|
|
|
312
396
|
const client = new Aribot('your_api_key');
|
|
313
397
|
|
|
@@ -359,10 +443,22 @@ input?.addEventListener('change', async (e) => {
|
|
|
359
443
|
PROJECT_ID: ${{ vars.PROJECT_ID }}
|
|
360
444
|
```
|
|
361
445
|
|
|
446
|
+
## Changelog
|
|
447
|
+
|
|
448
|
+
### v1.4.0
|
|
449
|
+
- **Fixed**: Base URL corrected from `api.aribot.aristiun.com` to `api.aribot.ayurak.com`
|
|
450
|
+
- **Added**: AI module (`client.ai`) - usage, quota, models, configure, analyze, queue status
|
|
451
|
+
- **Added**: SBOM module (`client.sbom`) - document management, upload, vulnerability scanning
|
|
452
|
+
- **Added**: Dashboard module (`client.dashboard`) - overview, recent activity, risk summary
|
|
453
|
+
- **Added**: FinOps module (`client.finops`) - cost optimization, recommendations, cost breakdown
|
|
454
|
+
- **Added**: Marketplace module (`client.marketplace`) - templates, categories, featured items
|
|
455
|
+
- **Added**: API Keys module (`client.apiKeys`) - list, create, revoke API keys
|
|
456
|
+
- **Added**: Framework-specific compliance scoring support
|
|
457
|
+
|
|
362
458
|
## Support
|
|
363
459
|
|
|
364
|
-
- Documentation: https://
|
|
365
|
-
- API Reference: https://
|
|
460
|
+
- Documentation: https://developers.aristiun.com/docs/js-sdk
|
|
461
|
+
- API Reference: https://developers.aristiun.com/api
|
|
366
462
|
- Issues: https://github.com/Aristiun/aribot-js/issues
|
|
367
463
|
|
|
368
464
|
## License
|
package/dist/index.d.mts
CHANGED
|
@@ -431,6 +431,497 @@ declare class PipelineAPI {
|
|
|
431
431
|
dashboard(projectId?: string, period?: 'day' | 'week' | 'month' | 'quarter'): Promise<Record<string, unknown>>;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
+
interface RedTeamMethodology {
|
|
435
|
+
id: string;
|
|
436
|
+
name: string;
|
|
437
|
+
description: string;
|
|
438
|
+
techniques_count: number;
|
|
439
|
+
}
|
|
440
|
+
interface RedTeamSimulation {
|
|
441
|
+
id: string;
|
|
442
|
+
name: string;
|
|
443
|
+
diagram_id: string;
|
|
444
|
+
status: string;
|
|
445
|
+
attack_paths: unknown[];
|
|
446
|
+
created_at: string;
|
|
447
|
+
}
|
|
448
|
+
interface ThreatIntelligence {
|
|
449
|
+
threat_count: number;
|
|
450
|
+
simulation_count: number;
|
|
451
|
+
active_threats: number;
|
|
452
|
+
mitre_techniques: number;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Red Team API for attack simulation and threat intelligence
|
|
456
|
+
*/
|
|
457
|
+
declare class RedTeamAPI {
|
|
458
|
+
private http;
|
|
459
|
+
constructor(http: HttpClient);
|
|
460
|
+
/**
|
|
461
|
+
* Get available red team methodologies (STRIDE, PASTA, MITRE ATT&CK, etc.)
|
|
462
|
+
*/
|
|
463
|
+
getMethodologies(): Promise<RedTeamMethodology[]>;
|
|
464
|
+
/**
|
|
465
|
+
* Get red team simulations (attack path simulations)
|
|
466
|
+
*/
|
|
467
|
+
getSimulations(options?: {
|
|
468
|
+
diagramId?: string;
|
|
469
|
+
status?: string;
|
|
470
|
+
limit?: number;
|
|
471
|
+
}): Promise<RedTeamSimulation[]>;
|
|
472
|
+
/**
|
|
473
|
+
* Get threat intelligence summary
|
|
474
|
+
*/
|
|
475
|
+
getIntelligence(): Promise<ThreatIntelligence>;
|
|
476
|
+
/**
|
|
477
|
+
* Generate attack paths for a diagram
|
|
478
|
+
*/
|
|
479
|
+
generateAttackPaths(diagramId: string, options?: {
|
|
480
|
+
depth?: 'basic' | 'comprehensive' | 'detailed';
|
|
481
|
+
includeRemediations?: boolean;
|
|
482
|
+
}): Promise<{
|
|
483
|
+
simulation_id: string;
|
|
484
|
+
status: string;
|
|
485
|
+
}>;
|
|
486
|
+
/**
|
|
487
|
+
* Get attack paths for a diagram
|
|
488
|
+
*/
|
|
489
|
+
getAttackPaths(diagramId: string): Promise<unknown[]>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
interface CloudProvider {
|
|
493
|
+
id: string;
|
|
494
|
+
name: string;
|
|
495
|
+
display_name: string;
|
|
496
|
+
is_active: boolean;
|
|
497
|
+
is_enabled: boolean;
|
|
498
|
+
resources_count?: number;
|
|
499
|
+
}
|
|
500
|
+
interface CloudResource {
|
|
501
|
+
id: string;
|
|
502
|
+
name: string;
|
|
503
|
+
resource_type: string;
|
|
504
|
+
provider: string;
|
|
505
|
+
region?: string;
|
|
506
|
+
status?: string;
|
|
507
|
+
}
|
|
508
|
+
interface ComponentCloudMapping {
|
|
509
|
+
component_id: string;
|
|
510
|
+
resource_id: string;
|
|
511
|
+
compliance_status: string;
|
|
512
|
+
compliance_score: number;
|
|
513
|
+
security_score: number;
|
|
514
|
+
total_controls: number;
|
|
515
|
+
passed_controls: number;
|
|
516
|
+
failed_controls: number;
|
|
517
|
+
vulnerability_count: number;
|
|
518
|
+
}
|
|
519
|
+
interface DiagramComponentStatus {
|
|
520
|
+
components: ComponentCloudMapping[];
|
|
521
|
+
overall_compliance: number;
|
|
522
|
+
total_mapped: number;
|
|
523
|
+
total_unmapped: number;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Digital Twin API for cloud resource mapping and live status
|
|
527
|
+
*/
|
|
528
|
+
declare class DigitalTwinAPI {
|
|
529
|
+
private http;
|
|
530
|
+
constructor(http: HttpClient);
|
|
531
|
+
/**
|
|
532
|
+
* Get available cloud providers (AWS, Azure, GCP)
|
|
533
|
+
*/
|
|
534
|
+
getProviders(): Promise<CloudProvider[]>;
|
|
535
|
+
/**
|
|
536
|
+
* Get available cloud resources
|
|
537
|
+
*/
|
|
538
|
+
getResources(options?: {
|
|
539
|
+
provider?: string;
|
|
540
|
+
resourceType?: string;
|
|
541
|
+
limit?: number;
|
|
542
|
+
}): Promise<CloudResource[]>;
|
|
543
|
+
/**
|
|
544
|
+
* Get component cloud status for a diagram
|
|
545
|
+
*/
|
|
546
|
+
getDiagramComponentStatus(diagramId: string): Promise<DiagramComponentStatus>;
|
|
547
|
+
/**
|
|
548
|
+
* Map a component to a cloud resource
|
|
549
|
+
*/
|
|
550
|
+
mapComponent(diagramId: string, componentId: string, resourceId: string): Promise<ComponentCloudMapping>;
|
|
551
|
+
/**
|
|
552
|
+
* Unmap a component from cloud resource
|
|
553
|
+
*/
|
|
554
|
+
unmapComponent(diagramId: string, componentId: string): Promise<void>;
|
|
555
|
+
/**
|
|
556
|
+
* Sync diagram cloud status
|
|
557
|
+
*/
|
|
558
|
+
syncDiagramStatus(diagramId: string): Promise<DiagramComponentStatus>;
|
|
559
|
+
/**
|
|
560
|
+
* Get single component cloud status
|
|
561
|
+
*/
|
|
562
|
+
getComponentStatus(componentId: string): Promise<ComponentCloudMapping>;
|
|
563
|
+
/**
|
|
564
|
+
* Get digital twin health status
|
|
565
|
+
*/
|
|
566
|
+
getHealth(): Promise<Record<string, unknown>>;
|
|
567
|
+
/**
|
|
568
|
+
* Get digital twin analytics
|
|
569
|
+
*/
|
|
570
|
+
getAnalytics(): Promise<Record<string, unknown>>;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
interface EconomicsDashboard {
|
|
574
|
+
total_cost: number;
|
|
575
|
+
cost_by_provider: Record<string, number>;
|
|
576
|
+
cost_trend: unknown[];
|
|
577
|
+
security_roi: number;
|
|
578
|
+
risk_value: number;
|
|
579
|
+
potential_loss_prevented: number;
|
|
580
|
+
compliance_investment: number;
|
|
581
|
+
}
|
|
582
|
+
interface ComponentCost {
|
|
583
|
+
component_id: string;
|
|
584
|
+
component_name: string;
|
|
585
|
+
monthly_cost: number;
|
|
586
|
+
annual_cost: number;
|
|
587
|
+
cost_breakdown: Record<string, number>;
|
|
588
|
+
}
|
|
589
|
+
interface DiagramCostAnalysis {
|
|
590
|
+
diagram_id: string;
|
|
591
|
+
total_monthly_cost: number;
|
|
592
|
+
total_annual_cost: number;
|
|
593
|
+
components: ComponentCost[];
|
|
594
|
+
cost_by_category: Record<string, number>;
|
|
595
|
+
}
|
|
596
|
+
interface MarketIntelligence {
|
|
597
|
+
market_trends: unknown[];
|
|
598
|
+
competitive_analysis: unknown[];
|
|
599
|
+
pricing_benchmarks: unknown[];
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Economics API for cost analysis and market intelligence
|
|
603
|
+
*/
|
|
604
|
+
declare class EconomicsAPI {
|
|
605
|
+
private http;
|
|
606
|
+
constructor(http: HttpClient);
|
|
607
|
+
/**
|
|
608
|
+
* Get economics dashboard with cost metrics
|
|
609
|
+
*/
|
|
610
|
+
getDashboard(options?: {
|
|
611
|
+
period?: 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
612
|
+
}): Promise<EconomicsDashboard>;
|
|
613
|
+
/**
|
|
614
|
+
* Get cost analysis for a diagram
|
|
615
|
+
*/
|
|
616
|
+
getDiagramCostAnalysis(diagramId: string): Promise<DiagramCostAnalysis>;
|
|
617
|
+
/**
|
|
618
|
+
* Get component cost intelligence
|
|
619
|
+
*/
|
|
620
|
+
getComponentCost(componentId: string): Promise<ComponentCost>;
|
|
621
|
+
/**
|
|
622
|
+
* Get economic intelligence dashboard (pricing, market trends)
|
|
623
|
+
*/
|
|
624
|
+
getEconomicIntelligence(): Promise<Record<string, unknown>>;
|
|
625
|
+
/**
|
|
626
|
+
* Get market intelligence data
|
|
627
|
+
*/
|
|
628
|
+
getMarketIntelligence(): Promise<MarketIntelligence>;
|
|
629
|
+
/**
|
|
630
|
+
* Calculate ROI for security investments
|
|
631
|
+
*/
|
|
632
|
+
calculateROI(options: {
|
|
633
|
+
investment: number;
|
|
634
|
+
risksAddressed: string[];
|
|
635
|
+
timeframeDays?: number;
|
|
636
|
+
}): Promise<{
|
|
637
|
+
roi_percentage: number;
|
|
638
|
+
breakeven_days: number;
|
|
639
|
+
projected_savings: number;
|
|
640
|
+
}>;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
interface AIUsage {
|
|
644
|
+
total_requests: number;
|
|
645
|
+
tokens_used: number;
|
|
646
|
+
cost: number;
|
|
647
|
+
period: string;
|
|
648
|
+
[key: string]: unknown;
|
|
649
|
+
}
|
|
650
|
+
interface AIQuota {
|
|
651
|
+
requests_limit: number;
|
|
652
|
+
requests_used: number;
|
|
653
|
+
tokens_limit: number;
|
|
654
|
+
tokens_used: number;
|
|
655
|
+
reset_at: string;
|
|
656
|
+
[key: string]: unknown;
|
|
657
|
+
}
|
|
658
|
+
interface AIModel {
|
|
659
|
+
id: string;
|
|
660
|
+
name: string;
|
|
661
|
+
provider: string;
|
|
662
|
+
capabilities: string[];
|
|
663
|
+
[key: string]: unknown;
|
|
664
|
+
}
|
|
665
|
+
interface AIAnalysisResult {
|
|
666
|
+
analysis_id: string;
|
|
667
|
+
status: string;
|
|
668
|
+
results: unknown;
|
|
669
|
+
[key: string]: unknown;
|
|
670
|
+
}
|
|
671
|
+
interface AIQueueStatus {
|
|
672
|
+
pending: number;
|
|
673
|
+
processing: number;
|
|
674
|
+
completed: number;
|
|
675
|
+
failed: number;
|
|
676
|
+
[key: string]: unknown;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* AI usage, quota, and analysis operations
|
|
680
|
+
*/
|
|
681
|
+
declare class AIAPI {
|
|
682
|
+
private http;
|
|
683
|
+
constructor(http: HttpClient);
|
|
684
|
+
/**
|
|
685
|
+
* Get AI usage statistics
|
|
686
|
+
*/
|
|
687
|
+
getUsage(period?: string): Promise<AIUsage>;
|
|
688
|
+
/**
|
|
689
|
+
* Get AI quota information
|
|
690
|
+
*/
|
|
691
|
+
getQuota(): Promise<AIQuota>;
|
|
692
|
+
/**
|
|
693
|
+
* List available AI models
|
|
694
|
+
*/
|
|
695
|
+
listModels(): Promise<AIModel[]>;
|
|
696
|
+
/**
|
|
697
|
+
* Configure AI settings
|
|
698
|
+
*/
|
|
699
|
+
configure(config: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
700
|
+
/**
|
|
701
|
+
* Run AI analysis
|
|
702
|
+
*/
|
|
703
|
+
analyze(options: {
|
|
704
|
+
target: string;
|
|
705
|
+
type?: string;
|
|
706
|
+
model?: string;
|
|
707
|
+
[key: string]: unknown;
|
|
708
|
+
}): Promise<AIAnalysisResult>;
|
|
709
|
+
/**
|
|
710
|
+
* Get AI processing queue status
|
|
711
|
+
*/
|
|
712
|
+
getQueueStatus(): Promise<AIQueueStatus>;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
interface SBOMDocument {
|
|
716
|
+
id: string;
|
|
717
|
+
name: string;
|
|
718
|
+
format: string;
|
|
719
|
+
status: string;
|
|
720
|
+
created_at: string;
|
|
721
|
+
components_count: number;
|
|
722
|
+
vulnerabilities_count: number;
|
|
723
|
+
[key: string]: unknown;
|
|
724
|
+
}
|
|
725
|
+
interface SBOMVulnerability {
|
|
726
|
+
id: string;
|
|
727
|
+
cve_id: string;
|
|
728
|
+
severity: string;
|
|
729
|
+
description: string;
|
|
730
|
+
affected_component: string;
|
|
731
|
+
fix_available: boolean;
|
|
732
|
+
[key: string]: unknown;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* SBOM document management and vulnerability scanning
|
|
736
|
+
*/
|
|
737
|
+
declare class SBOMAPI {
|
|
738
|
+
private http;
|
|
739
|
+
constructor(http: HttpClient);
|
|
740
|
+
/**
|
|
741
|
+
* List SBOM documents
|
|
742
|
+
*/
|
|
743
|
+
list(params?: Record<string, string | number | boolean>): Promise<SBOMDocument[]>;
|
|
744
|
+
/**
|
|
745
|
+
* Get SBOM document details
|
|
746
|
+
*/
|
|
747
|
+
get(documentId: string): Promise<SBOMDocument>;
|
|
748
|
+
/**
|
|
749
|
+
* Upload an SBOM document
|
|
750
|
+
*/
|
|
751
|
+
upload(file: File | Blob, options?: {
|
|
752
|
+
name?: string;
|
|
753
|
+
format?: string;
|
|
754
|
+
}): Promise<SBOMDocument>;
|
|
755
|
+
/**
|
|
756
|
+
* Get vulnerabilities for an SBOM document
|
|
757
|
+
*/
|
|
758
|
+
getVulnerabilities(documentId: string, params?: Record<string, string | number | boolean>): Promise<SBOMVulnerability[]>;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
interface DashboardOverview {
|
|
762
|
+
total_diagrams: number;
|
|
763
|
+
total_threats: number;
|
|
764
|
+
compliance_score: number;
|
|
765
|
+
risk_score: number;
|
|
766
|
+
[key: string]: unknown;
|
|
767
|
+
}
|
|
768
|
+
interface RecentActivity {
|
|
769
|
+
id: string;
|
|
770
|
+
type: string;
|
|
771
|
+
description: string;
|
|
772
|
+
timestamp: string;
|
|
773
|
+
[key: string]: unknown;
|
|
774
|
+
}
|
|
775
|
+
interface RiskSummary {
|
|
776
|
+
overall_risk: string;
|
|
777
|
+
critical: number;
|
|
778
|
+
high: number;
|
|
779
|
+
medium: number;
|
|
780
|
+
low: number;
|
|
781
|
+
trend: string;
|
|
782
|
+
[key: string]: unknown;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Dashboard overview, activity, and risk summary
|
|
786
|
+
*/
|
|
787
|
+
declare class DashboardAPI {
|
|
788
|
+
private http;
|
|
789
|
+
constructor(http: HttpClient);
|
|
790
|
+
/**
|
|
791
|
+
* Get dashboard overview metrics
|
|
792
|
+
*/
|
|
793
|
+
getOverview(): Promise<DashboardOverview>;
|
|
794
|
+
/**
|
|
795
|
+
* Get recent activity
|
|
796
|
+
*/
|
|
797
|
+
getRecentActivity(params?: Record<string, string | number | boolean>): Promise<RecentActivity[]>;
|
|
798
|
+
/**
|
|
799
|
+
* Get risk summary
|
|
800
|
+
*/
|
|
801
|
+
getRiskSummary(): Promise<RiskSummary>;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
interface FinOpsRecommendation {
|
|
805
|
+
id: string;
|
|
806
|
+
type: string;
|
|
807
|
+
description: string;
|
|
808
|
+
estimated_savings: number;
|
|
809
|
+
priority: string;
|
|
810
|
+
[key: string]: unknown;
|
|
811
|
+
}
|
|
812
|
+
interface FinOpsCosts {
|
|
813
|
+
total: number;
|
|
814
|
+
by_service: Record<string, number>;
|
|
815
|
+
by_provider: Record<string, number>;
|
|
816
|
+
period: string;
|
|
817
|
+
[key: string]: unknown;
|
|
818
|
+
}
|
|
819
|
+
interface FinOpsOptimization {
|
|
820
|
+
id: string;
|
|
821
|
+
status: string;
|
|
822
|
+
savings_achieved: number;
|
|
823
|
+
details: string;
|
|
824
|
+
[key: string]: unknown;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* FinOps cost optimization and recommendations
|
|
828
|
+
*/
|
|
829
|
+
declare class FinOpsAPI {
|
|
830
|
+
private http;
|
|
831
|
+
constructor(http: HttpClient);
|
|
832
|
+
/**
|
|
833
|
+
* Get cost optimization recommendations
|
|
834
|
+
*/
|
|
835
|
+
getRecommendations(params?: Record<string, string | number | boolean>): Promise<FinOpsRecommendation[]>;
|
|
836
|
+
/**
|
|
837
|
+
* Get cost breakdown
|
|
838
|
+
*/
|
|
839
|
+
getCosts(params?: Record<string, string | number | boolean>): Promise<FinOpsCosts>;
|
|
840
|
+
/**
|
|
841
|
+
* Get optimization details
|
|
842
|
+
*/
|
|
843
|
+
getOptimization(params?: Record<string, string | number | boolean>): Promise<FinOpsOptimization[]>;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
interface MarketplaceTemplate {
|
|
847
|
+
id: string;
|
|
848
|
+
name: string;
|
|
849
|
+
description: string;
|
|
850
|
+
category: string;
|
|
851
|
+
author: string;
|
|
852
|
+
downloads: number;
|
|
853
|
+
rating: number;
|
|
854
|
+
[key: string]: unknown;
|
|
855
|
+
}
|
|
856
|
+
interface MarketplaceCategory {
|
|
857
|
+
id: string;
|
|
858
|
+
name: string;
|
|
859
|
+
description: string;
|
|
860
|
+
templates_count: number;
|
|
861
|
+
[key: string]: unknown;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Marketplace templates, categories, and featured items
|
|
865
|
+
*/
|
|
866
|
+
declare class MarketplaceAPI {
|
|
867
|
+
private http;
|
|
868
|
+
constructor(http: HttpClient);
|
|
869
|
+
/**
|
|
870
|
+
* List marketplace templates
|
|
871
|
+
*/
|
|
872
|
+
listTemplates(params?: Record<string, string | number | boolean>): Promise<MarketplaceTemplate[]>;
|
|
873
|
+
/**
|
|
874
|
+
* List marketplace categories
|
|
875
|
+
*/
|
|
876
|
+
listCategories(): Promise<MarketplaceCategory[]>;
|
|
877
|
+
/**
|
|
878
|
+
* Get featured templates
|
|
879
|
+
*/
|
|
880
|
+
getFeatured(): Promise<MarketplaceTemplate[]>;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
interface APIKey {
|
|
884
|
+
id: string;
|
|
885
|
+
name: string;
|
|
886
|
+
prefix: string;
|
|
887
|
+
created_at: string;
|
|
888
|
+
last_used_at: string | null;
|
|
889
|
+
expires_at: string | null;
|
|
890
|
+
is_active: boolean;
|
|
891
|
+
[key: string]: unknown;
|
|
892
|
+
}
|
|
893
|
+
interface APIKeyCreateResult {
|
|
894
|
+
id: string;
|
|
895
|
+
name: string;
|
|
896
|
+
key: string;
|
|
897
|
+
prefix: string;
|
|
898
|
+
created_at: string;
|
|
899
|
+
[key: string]: unknown;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* API key management operations
|
|
903
|
+
*/
|
|
904
|
+
declare class APIKeysAPI {
|
|
905
|
+
private http;
|
|
906
|
+
constructor(http: HttpClient);
|
|
907
|
+
/**
|
|
908
|
+
* List API keys
|
|
909
|
+
*/
|
|
910
|
+
list(params?: Record<string, string | number | boolean>): Promise<APIKey[]>;
|
|
911
|
+
/**
|
|
912
|
+
* Create a new API key
|
|
913
|
+
*/
|
|
914
|
+
create(options: {
|
|
915
|
+
name: string;
|
|
916
|
+
expires_in_days?: number;
|
|
917
|
+
scopes?: string[];
|
|
918
|
+
}): Promise<APIKeyCreateResult>;
|
|
919
|
+
/**
|
|
920
|
+
* Revoke an API key
|
|
921
|
+
*/
|
|
922
|
+
revoke(keyId: string): Promise<Record<string, unknown>>;
|
|
923
|
+
}
|
|
924
|
+
|
|
434
925
|
interface AribotOptions {
|
|
435
926
|
baseUrl?: string;
|
|
436
927
|
timeout?: number;
|
|
@@ -475,6 +966,24 @@ declare class Aribot {
|
|
|
475
966
|
cloud: CloudSecurityAPI;
|
|
476
967
|
/** Pipeline security scanning */
|
|
477
968
|
pipeline: PipelineAPI;
|
|
969
|
+
/** Red team attack simulation */
|
|
970
|
+
redTeam: RedTeamAPI;
|
|
971
|
+
/** Digital twin cloud mapping */
|
|
972
|
+
digitalTwin: DigitalTwinAPI;
|
|
973
|
+
/** Economics and cost analysis */
|
|
974
|
+
economics: EconomicsAPI;
|
|
975
|
+
/** AI usage and analysis */
|
|
976
|
+
ai: AIAPI;
|
|
977
|
+
/** SBOM document management */
|
|
978
|
+
sbom: SBOMAPI;
|
|
979
|
+
/** Dashboard overview and metrics */
|
|
980
|
+
dashboard: DashboardAPI;
|
|
981
|
+
/** FinOps cost optimization */
|
|
982
|
+
finops: FinOpsAPI;
|
|
983
|
+
/** Marketplace templates */
|
|
984
|
+
marketplace: MarketplaceAPI;
|
|
985
|
+
/** API key management */
|
|
986
|
+
apiKeys: APIKeysAPI;
|
|
478
987
|
/**
|
|
479
988
|
* Create Aribot client
|
|
480
989
|
*
|
|
@@ -544,4 +1053,4 @@ declare class ServerError extends AribotError {
|
|
|
544
1053
|
constructor(message: string, statusCode?: number, response?: Record<string, unknown>);
|
|
545
1054
|
}
|
|
546
1055
|
|
|
547
|
-
export { type AnalyzeDiagramOptions, Aribot, AribotError, type AribotOptions, AuthenticationError, type CloudAccount, type CloudFinding, type CloudScan, type CloudScanOptions, CloudSecurityAPI, ComplianceAPI, type ComplianceGap, type ComplianceResult, type ScanOptions$1 as ComplianceScanOptions, type ComplianceStandard, type Component, type Control, type CreateProjectOptions, type Diagram, type Finding, type GatesConfig, type GetFindingsOptions, type ListDiagramsOptions, type ListScansOptions, NotFoundError, PipelineAPI, type PipelineScan, type ScanOptions as PipelineScanOptions, type Project, RateLimitError, ServerError, type Threat, ThreatModelingAPI, ValidationError };
|
|
1056
|
+
export { AIAPI, type AIAnalysisResult, type AIModel, type AIQueueStatus, type AIQuota, type AIUsage, type APIKey, type APIKeyCreateResult, APIKeysAPI, type AnalyzeDiagramOptions, Aribot, AribotError, type AribotOptions, AuthenticationError, type CloudAccount, type CloudFinding, type CloudProvider, type CloudResource, type CloudScan, type CloudScanOptions, CloudSecurityAPI, ComplianceAPI, type ComplianceGap, type ComplianceResult, type ScanOptions$1 as ComplianceScanOptions, type ComplianceStandard, type Component, type ComponentCloudMapping, type ComponentCost, type Control, type CreateProjectOptions, DashboardAPI, type DashboardOverview, type Diagram, type DiagramComponentStatus, type DiagramCostAnalysis, DigitalTwinAPI, EconomicsAPI, type EconomicsDashboard, FinOpsAPI, type FinOpsCosts, type FinOpsOptimization, type FinOpsRecommendation, type Finding, type GatesConfig, type GetFindingsOptions, type ListDiagramsOptions, type ListScansOptions, type MarketIntelligence, MarketplaceAPI, type MarketplaceCategory, type MarketplaceTemplate, NotFoundError, PipelineAPI, type PipelineScan, type ScanOptions as PipelineScanOptions, type Project, RateLimitError, type RecentActivity, RedTeamAPI, type RedTeamMethodology, type RedTeamSimulation, type RiskSummary, SBOMAPI, type SBOMDocument, type SBOMVulnerability, ServerError, type Threat, type ThreatIntelligence, ThreatModelingAPI, ValidationError };
|