@ayurak/sdk 1.0.0 → 1.1.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 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
+ [![npm](https://img.shields.io/npm/v/@ayurak/sdk)](https://www.npmjs.com/package/@ayurak/sdk)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue)](https://www.typescriptlang.org/)
7
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
4
8
 
5
9
  ## Installation
6
10
 
7
11
  ```bash
8
- npm install aribot-sdk
12
+ npm install @ayurak/sdk
9
13
  # or
10
- yarn add aribot-sdk
14
+ yarn add @ayurak/sdk
11
15
  # or
12
- pnpm add aribot-sdk
16
+ pnpm add @ayurak/sdk
13
17
  ```
14
18
 
15
19
  ## Quick Start
16
20
 
17
21
  ```typescript
18
- import { Aribot } from 'aribot-sdk';
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 'aribot-sdk';
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 'aribot-sdk';
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 'aribot-sdk';
394
+ import { Aribot } from '@ayurak/sdk';
311
395
 
312
396
  const client = new Aribot('your_api_key');
313
397
 
@@ -361,8 +445,8 @@ input?.addEventListener('change', async (e) => {
361
445
 
362
446
  ## Support
363
447
 
364
- - Documentation: https://developer.ayurak.com/docs/js-sdk
365
- - API Reference: https://developer.ayurak.com/api
448
+ - Documentation: https://developers.aristiun.com/docs/js-sdk
449
+ - API Reference: https://developers.aristiun.com/api
366
450
  - Issues: https://github.com/Aristiun/aribot-js/issues
367
451
 
368
452
  ## License
package/dist/index.d.mts CHANGED
@@ -431,6 +431,215 @@ 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
+
434
643
  interface AribotOptions {
435
644
  baseUrl?: string;
436
645
  timeout?: number;
@@ -475,6 +684,12 @@ declare class Aribot {
475
684
  cloud: CloudSecurityAPI;
476
685
  /** Pipeline security scanning */
477
686
  pipeline: PipelineAPI;
687
+ /** Red team attack simulation */
688
+ redTeam: RedTeamAPI;
689
+ /** Digital twin cloud mapping */
690
+ digitalTwin: DigitalTwinAPI;
691
+ /** Economics and cost analysis */
692
+ economics: EconomicsAPI;
478
693
  /**
479
694
  * Create Aribot client
480
695
  *
@@ -544,4 +759,4 @@ declare class ServerError extends AribotError {
544
759
  constructor(message: string, statusCode?: number, response?: Record<string, unknown>);
545
760
  }
546
761
 
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 };
762
+ export { 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, type Diagram, type DiagramComponentStatus, type DiagramCostAnalysis, DigitalTwinAPI, EconomicsAPI, type EconomicsDashboard, type Finding, type GatesConfig, type GetFindingsOptions, type ListDiagramsOptions, type ListScansOptions, type MarketIntelligence, NotFoundError, PipelineAPI, type PipelineScan, type ScanOptions as PipelineScanOptions, type Project, RateLimitError, RedTeamAPI, type RedTeamMethodology, type RedTeamSimulation, ServerError, type Threat, type ThreatIntelligence, ThreatModelingAPI, ValidationError };
package/dist/index.d.ts CHANGED
@@ -431,6 +431,215 @@ 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
+
434
643
  interface AribotOptions {
435
644
  baseUrl?: string;
436
645
  timeout?: number;
@@ -475,6 +684,12 @@ declare class Aribot {
475
684
  cloud: CloudSecurityAPI;
476
685
  /** Pipeline security scanning */
477
686
  pipeline: PipelineAPI;
687
+ /** Red team attack simulation */
688
+ redTeam: RedTeamAPI;
689
+ /** Digital twin cloud mapping */
690
+ digitalTwin: DigitalTwinAPI;
691
+ /** Economics and cost analysis */
692
+ economics: EconomicsAPI;
478
693
  /**
479
694
  * Create Aribot client
480
695
  *
@@ -544,4 +759,4 @@ declare class ServerError extends AribotError {
544
759
  constructor(message: string, statusCode?: number, response?: Record<string, unknown>);
545
760
  }
546
761
 
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 };
762
+ export { 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, type Diagram, type DiagramComponentStatus, type DiagramCostAnalysis, DigitalTwinAPI, EconomicsAPI, type EconomicsDashboard, type Finding, type GatesConfig, type GetFindingsOptions, type ListDiagramsOptions, type ListScansOptions, type MarketIntelligence, NotFoundError, PipelineAPI, type PipelineScan, type ScanOptions as PipelineScanOptions, type Project, RateLimitError, RedTeamAPI, type RedTeamMethodology, type RedTeamSimulation, ServerError, type Threat, type ThreatIntelligence, ThreatModelingAPI, ValidationError };
package/dist/index.js CHANGED
@@ -25,9 +25,12 @@ __export(index_exports, {
25
25
  AuthenticationError: () => AuthenticationError,
26
26
  CloudSecurityAPI: () => CloudSecurityAPI,
27
27
  ComplianceAPI: () => ComplianceAPI,
28
+ DigitalTwinAPI: () => DigitalTwinAPI,
29
+ EconomicsAPI: () => EconomicsAPI,
28
30
  NotFoundError: () => NotFoundError,
29
31
  PipelineAPI: () => PipelineAPI,
30
32
  RateLimitError: () => RateLimitError,
33
+ RedTeamAPI: () => RedTeamAPI,
31
34
  ServerError: () => ServerError,
32
35
  ThreatModelingAPI: () => ThreatModelingAPI,
33
36
  ValidationError: () => ValidationError
@@ -77,7 +80,7 @@ var ServerError = class extends AribotError {
77
80
  };
78
81
 
79
82
  // src/http.ts
80
- var DEFAULT_BASE_URL = "https://api.aribot.ayurak.com/aribot-api";
83
+ var DEFAULT_BASE_URL = "https://api.aribot.aristiun.com/aribot-api";
81
84
  var DEFAULT_TIMEOUT = 3e4;
82
85
  var MAX_RETRIES = 3;
83
86
  function sleep(ms) {
@@ -733,6 +736,185 @@ var PipelineAPI = class {
733
736
  }
734
737
  };
735
738
 
739
+ // src/redteam.ts
740
+ var RedTeamAPI = class {
741
+ constructor(http) {
742
+ this.http = http;
743
+ }
744
+ /**
745
+ * Get available red team methodologies (STRIDE, PASTA, MITRE ATT&CK, etc.)
746
+ */
747
+ async getMethodologies() {
748
+ const result = await this.http.get("/v2/threat-modeling/threat-engine/red-team/methodologies/");
749
+ return result.methodologies || [];
750
+ }
751
+ /**
752
+ * Get red team simulations (attack path simulations)
753
+ */
754
+ async getSimulations(options) {
755
+ const params = {};
756
+ if (options?.diagramId) params.diagram_id = options.diagramId;
757
+ if (options?.status) params.status = options.status;
758
+ if (options?.limit) params.limit = options.limit;
759
+ const result = await this.http.get("/v2/threat-modeling/threat-engine/red-team/simulations/", params);
760
+ return result.simulations || [];
761
+ }
762
+ /**
763
+ * Get threat intelligence summary
764
+ */
765
+ async getIntelligence() {
766
+ return await this.http.get("/v2/threat-modeling/threat-engine/threat-intelligence/");
767
+ }
768
+ /**
769
+ * Generate attack paths for a diagram
770
+ */
771
+ async generateAttackPaths(diagramId, options) {
772
+ return await this.http.post(`/v2/threat-modeling/diagrams/${diagramId}/generate-attack-paths/`, {
773
+ depth: options?.depth || "comprehensive",
774
+ include_remediations: options?.includeRemediations ?? true
775
+ });
776
+ }
777
+ /**
778
+ * Get attack paths for a diagram
779
+ */
780
+ async getAttackPaths(diagramId) {
781
+ const result = await this.http.get(`/v2/threat-modeling/diagrams/${diagramId}/attack-paths/`);
782
+ return result.attack_paths || [];
783
+ }
784
+ };
785
+
786
+ // src/digital-twin.ts
787
+ var DigitalTwinAPI = class {
788
+ constructor(http) {
789
+ this.http = http;
790
+ }
791
+ /**
792
+ * Get available cloud providers (AWS, Azure, GCP)
793
+ */
794
+ async getProviders() {
795
+ const result = await this.http.get("/v2/threat-modeling/digital-twin/providers/");
796
+ if (Array.isArray(result)) return result;
797
+ return result.results || [];
798
+ }
799
+ /**
800
+ * Get available cloud resources
801
+ */
802
+ async getResources(options) {
803
+ const params = {};
804
+ if (options?.provider) params.provider = options.provider;
805
+ if (options?.resourceType) params.resource_type = options.resourceType;
806
+ if (options?.limit) params.limit = options.limit;
807
+ const result = await this.http.get("/v2/threat-modeling/digital-twin/available-resources/", params);
808
+ if (Array.isArray(result)) return result;
809
+ return result.results || [];
810
+ }
811
+ /**
812
+ * Get component cloud status for a diagram
813
+ */
814
+ async getDiagramComponentStatus(diagramId) {
815
+ return await this.http.get(
816
+ `/v2/threat-modeling/digital-twin/diagram/${diagramId}/component-status/`
817
+ );
818
+ }
819
+ /**
820
+ * Map a component to a cloud resource
821
+ */
822
+ async mapComponent(diagramId, componentId, resourceId) {
823
+ return await this.http.post(`/v2/threat-modeling/digital-twin/diagram/${diagramId}/map-component/`, {
824
+ component_id: componentId,
825
+ resource_id: resourceId
826
+ });
827
+ }
828
+ /**
829
+ * Unmap a component from cloud resource
830
+ */
831
+ async unmapComponent(diagramId, componentId) {
832
+ await this.http.delete(`/v2/threat-modeling/digital-twin/diagram/${diagramId}/component/${componentId}/`);
833
+ }
834
+ /**
835
+ * Sync diagram cloud status
836
+ */
837
+ async syncDiagramStatus(diagramId) {
838
+ return await this.http.post(
839
+ `/v2/threat-modeling/digital-twin/diagram/${diagramId}/sync/`,
840
+ {}
841
+ );
842
+ }
843
+ /**
844
+ * Get single component cloud status
845
+ */
846
+ async getComponentStatus(componentId) {
847
+ return await this.http.get(
848
+ `/v2/threat-modeling/digital-twin/component-status/${componentId}/`
849
+ );
850
+ }
851
+ /**
852
+ * Get digital twin health status
853
+ */
854
+ async getHealth() {
855
+ return await this.http.get("/v2/threat-modeling/digital-twin/health/");
856
+ }
857
+ /**
858
+ * Get digital twin analytics
859
+ */
860
+ async getAnalytics() {
861
+ return await this.http.get("/v2/threat-modeling/digital-twin/analytics/");
862
+ }
863
+ };
864
+
865
+ // src/economics.ts
866
+ var EconomicsAPI = class {
867
+ constructor(http) {
868
+ this.http = http;
869
+ }
870
+ /**
871
+ * Get economics dashboard with cost metrics
872
+ */
873
+ async getDashboard(options) {
874
+ const params = {};
875
+ if (options?.period) params.period = options.period;
876
+ return await this.http.get("/v2/threat-modeling/economics/dashboard/", params);
877
+ }
878
+ /**
879
+ * Get cost analysis for a diagram
880
+ */
881
+ async getDiagramCostAnalysis(diagramId) {
882
+ return await this.http.get(
883
+ `/v2/threat-modeling/diagrams/${diagramId}/cost-analysis/`
884
+ );
885
+ }
886
+ /**
887
+ * Get component cost intelligence
888
+ */
889
+ async getComponentCost(componentId) {
890
+ return await this.http.get(
891
+ `/v2/threat-modeling/components/${componentId}/cost-intelligence/`
892
+ );
893
+ }
894
+ /**
895
+ * Get economic intelligence dashboard (pricing, market trends)
896
+ */
897
+ async getEconomicIntelligence() {
898
+ return await this.http.get("/v2/threat-modeling/economic-intelligence/pricing/");
899
+ }
900
+ /**
901
+ * Get market intelligence data
902
+ */
903
+ async getMarketIntelligence() {
904
+ return await this.http.get("/v2/threat-modeling/market-intelligence/");
905
+ }
906
+ /**
907
+ * Calculate ROI for security investments
908
+ */
909
+ async calculateROI(options) {
910
+ return await this.http.post("/v2/threat-modeling/economics/calculate-roi/", {
911
+ investment: options.investment,
912
+ risks_addressed: options.risksAddressed,
913
+ timeframe_days: options.timeframeDays || 365
914
+ });
915
+ }
916
+ };
917
+
736
918
  // src/client.ts
737
919
  var Aribot = class {
738
920
  /**
@@ -751,6 +933,9 @@ var Aribot = class {
751
933
  this.compliance = new ComplianceAPI(this.http);
752
934
  this.cloud = new CloudSecurityAPI(this.http);
753
935
  this.pipeline = new PipelineAPI(this.http);
936
+ this.redTeam = new RedTeamAPI(this.http);
937
+ this.digitalTwin = new DigitalTwinAPI(this.http);
938
+ this.economics = new EconomicsAPI(this.http);
754
939
  }
755
940
  /**
756
941
  * Check API health status
@@ -778,9 +963,12 @@ var Aribot = class {
778
963
  AuthenticationError,
779
964
  CloudSecurityAPI,
780
965
  ComplianceAPI,
966
+ DigitalTwinAPI,
967
+ EconomicsAPI,
781
968
  NotFoundError,
782
969
  PipelineAPI,
783
970
  RateLimitError,
971
+ RedTeamAPI,
784
972
  ServerError,
785
973
  ThreatModelingAPI,
786
974
  ValidationError
package/dist/index.mjs CHANGED
@@ -41,7 +41,7 @@ var ServerError = class extends AribotError {
41
41
  };
42
42
 
43
43
  // src/http.ts
44
- var DEFAULT_BASE_URL = "https://api.aribot.ayurak.com/aribot-api";
44
+ var DEFAULT_BASE_URL = "https://api.aribot.aristiun.com/aribot-api";
45
45
  var DEFAULT_TIMEOUT = 3e4;
46
46
  var MAX_RETRIES = 3;
47
47
  function sleep(ms) {
@@ -697,6 +697,185 @@ var PipelineAPI = class {
697
697
  }
698
698
  };
699
699
 
700
+ // src/redteam.ts
701
+ var RedTeamAPI = class {
702
+ constructor(http) {
703
+ this.http = http;
704
+ }
705
+ /**
706
+ * Get available red team methodologies (STRIDE, PASTA, MITRE ATT&CK, etc.)
707
+ */
708
+ async getMethodologies() {
709
+ const result = await this.http.get("/v2/threat-modeling/threat-engine/red-team/methodologies/");
710
+ return result.methodologies || [];
711
+ }
712
+ /**
713
+ * Get red team simulations (attack path simulations)
714
+ */
715
+ async getSimulations(options) {
716
+ const params = {};
717
+ if (options?.diagramId) params.diagram_id = options.diagramId;
718
+ if (options?.status) params.status = options.status;
719
+ if (options?.limit) params.limit = options.limit;
720
+ const result = await this.http.get("/v2/threat-modeling/threat-engine/red-team/simulations/", params);
721
+ return result.simulations || [];
722
+ }
723
+ /**
724
+ * Get threat intelligence summary
725
+ */
726
+ async getIntelligence() {
727
+ return await this.http.get("/v2/threat-modeling/threat-engine/threat-intelligence/");
728
+ }
729
+ /**
730
+ * Generate attack paths for a diagram
731
+ */
732
+ async generateAttackPaths(diagramId, options) {
733
+ return await this.http.post(`/v2/threat-modeling/diagrams/${diagramId}/generate-attack-paths/`, {
734
+ depth: options?.depth || "comprehensive",
735
+ include_remediations: options?.includeRemediations ?? true
736
+ });
737
+ }
738
+ /**
739
+ * Get attack paths for a diagram
740
+ */
741
+ async getAttackPaths(diagramId) {
742
+ const result = await this.http.get(`/v2/threat-modeling/diagrams/${diagramId}/attack-paths/`);
743
+ return result.attack_paths || [];
744
+ }
745
+ };
746
+
747
+ // src/digital-twin.ts
748
+ var DigitalTwinAPI = class {
749
+ constructor(http) {
750
+ this.http = http;
751
+ }
752
+ /**
753
+ * Get available cloud providers (AWS, Azure, GCP)
754
+ */
755
+ async getProviders() {
756
+ const result = await this.http.get("/v2/threat-modeling/digital-twin/providers/");
757
+ if (Array.isArray(result)) return result;
758
+ return result.results || [];
759
+ }
760
+ /**
761
+ * Get available cloud resources
762
+ */
763
+ async getResources(options) {
764
+ const params = {};
765
+ if (options?.provider) params.provider = options.provider;
766
+ if (options?.resourceType) params.resource_type = options.resourceType;
767
+ if (options?.limit) params.limit = options.limit;
768
+ const result = await this.http.get("/v2/threat-modeling/digital-twin/available-resources/", params);
769
+ if (Array.isArray(result)) return result;
770
+ return result.results || [];
771
+ }
772
+ /**
773
+ * Get component cloud status for a diagram
774
+ */
775
+ async getDiagramComponentStatus(diagramId) {
776
+ return await this.http.get(
777
+ `/v2/threat-modeling/digital-twin/diagram/${diagramId}/component-status/`
778
+ );
779
+ }
780
+ /**
781
+ * Map a component to a cloud resource
782
+ */
783
+ async mapComponent(diagramId, componentId, resourceId) {
784
+ return await this.http.post(`/v2/threat-modeling/digital-twin/diagram/${diagramId}/map-component/`, {
785
+ component_id: componentId,
786
+ resource_id: resourceId
787
+ });
788
+ }
789
+ /**
790
+ * Unmap a component from cloud resource
791
+ */
792
+ async unmapComponent(diagramId, componentId) {
793
+ await this.http.delete(`/v2/threat-modeling/digital-twin/diagram/${diagramId}/component/${componentId}/`);
794
+ }
795
+ /**
796
+ * Sync diagram cloud status
797
+ */
798
+ async syncDiagramStatus(diagramId) {
799
+ return await this.http.post(
800
+ `/v2/threat-modeling/digital-twin/diagram/${diagramId}/sync/`,
801
+ {}
802
+ );
803
+ }
804
+ /**
805
+ * Get single component cloud status
806
+ */
807
+ async getComponentStatus(componentId) {
808
+ return await this.http.get(
809
+ `/v2/threat-modeling/digital-twin/component-status/${componentId}/`
810
+ );
811
+ }
812
+ /**
813
+ * Get digital twin health status
814
+ */
815
+ async getHealth() {
816
+ return await this.http.get("/v2/threat-modeling/digital-twin/health/");
817
+ }
818
+ /**
819
+ * Get digital twin analytics
820
+ */
821
+ async getAnalytics() {
822
+ return await this.http.get("/v2/threat-modeling/digital-twin/analytics/");
823
+ }
824
+ };
825
+
826
+ // src/economics.ts
827
+ var EconomicsAPI = class {
828
+ constructor(http) {
829
+ this.http = http;
830
+ }
831
+ /**
832
+ * Get economics dashboard with cost metrics
833
+ */
834
+ async getDashboard(options) {
835
+ const params = {};
836
+ if (options?.period) params.period = options.period;
837
+ return await this.http.get("/v2/threat-modeling/economics/dashboard/", params);
838
+ }
839
+ /**
840
+ * Get cost analysis for a diagram
841
+ */
842
+ async getDiagramCostAnalysis(diagramId) {
843
+ return await this.http.get(
844
+ `/v2/threat-modeling/diagrams/${diagramId}/cost-analysis/`
845
+ );
846
+ }
847
+ /**
848
+ * Get component cost intelligence
849
+ */
850
+ async getComponentCost(componentId) {
851
+ return await this.http.get(
852
+ `/v2/threat-modeling/components/${componentId}/cost-intelligence/`
853
+ );
854
+ }
855
+ /**
856
+ * Get economic intelligence dashboard (pricing, market trends)
857
+ */
858
+ async getEconomicIntelligence() {
859
+ return await this.http.get("/v2/threat-modeling/economic-intelligence/pricing/");
860
+ }
861
+ /**
862
+ * Get market intelligence data
863
+ */
864
+ async getMarketIntelligence() {
865
+ return await this.http.get("/v2/threat-modeling/market-intelligence/");
866
+ }
867
+ /**
868
+ * Calculate ROI for security investments
869
+ */
870
+ async calculateROI(options) {
871
+ return await this.http.post("/v2/threat-modeling/economics/calculate-roi/", {
872
+ investment: options.investment,
873
+ risks_addressed: options.risksAddressed,
874
+ timeframe_days: options.timeframeDays || 365
875
+ });
876
+ }
877
+ };
878
+
700
879
  // src/client.ts
701
880
  var Aribot = class {
702
881
  /**
@@ -715,6 +894,9 @@ var Aribot = class {
715
894
  this.compliance = new ComplianceAPI(this.http);
716
895
  this.cloud = new CloudSecurityAPI(this.http);
717
896
  this.pipeline = new PipelineAPI(this.http);
897
+ this.redTeam = new RedTeamAPI(this.http);
898
+ this.digitalTwin = new DigitalTwinAPI(this.http);
899
+ this.economics = new EconomicsAPI(this.http);
718
900
  }
719
901
  /**
720
902
  * Check API health status
@@ -741,9 +923,12 @@ export {
741
923
  AuthenticationError,
742
924
  CloudSecurityAPI,
743
925
  ComplianceAPI,
926
+ DigitalTwinAPI,
927
+ EconomicsAPI,
744
928
  NotFoundError,
745
929
  PipelineAPI,
746
930
  RateLimitError,
931
+ RedTeamAPI,
747
932
  ServerError,
748
933
  ThreatModelingAPI,
749
934
  ValidationError
package/package.json CHANGED
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "name": "@ayurak/sdk",
3
- "version": "1.0.0",
4
- "publishConfig": {
5
- "access": "public"
6
- },
3
+ "version": "1.1.0",
7
4
  "description": "Aribot Security Platform SDK by Aristiun & Ayurak - Threat modeling, compliance, and cloud security APIs",
8
5
  "main": "dist/index.js",
9
6
  "module": "dist/index.mjs",
@@ -37,13 +34,13 @@
37
34
  "aristiun",
38
35
  "ayurak"
39
36
  ],
40
- "author": "Aristiun & Ayurak <sdk@ayurak.com>",
37
+ "author": "Aristiun & Ayurak <sdk@aristiun.com>",
41
38
  "license": "MIT",
42
39
  "repository": {
43
40
  "type": "git",
44
41
  "url": "https://github.com/Aristiun/aribot-js"
45
42
  },
46
- "homepage": "https://developer.ayurak.com/docs/js-sdk",
43
+ "homepage": "https://developers.aristiun.com/docs/js-sdk",
47
44
  "bugs": {
48
45
  "url": "https://github.com/Aristiun/aribot-js/issues"
49
46
  },