@socketsecurity/sdk 3.3.1 → 3.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/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [3.4.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v3.4.0) - 2026-03-11
8
+
9
+ ### Added
10
+
11
+ - **listRepositories**: New `workspace` query parameter to filter repositories by workspace (when provided, only repos in that workspace are returned)
12
+ - New audit log action types for OAuth refresh tokens and repository access rules:
13
+ - `CreateOauthRefreshToken` - Track OAuth refresh token creation
14
+ - `RotateOauthRefreshToken` - Track OAuth refresh token rotation
15
+ - `CreateRepoAccessRule` - Track repository access rule creation
16
+ - `UpdateRepoAccessRule` - Track repository access rule updates
17
+ - `DeleteRepoAccessRule` - Track repository access rule deletion
18
+
19
+ ### Changed
20
+
21
+ - Synced OpenAPI type definitions with latest API specification
22
+
7
23
  ## [3.3.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v3.3.1) - 2026-03-03
8
24
 
9
25
  ### Changed
@@ -323,6 +339,7 @@ The following methods mapped to deprecated `/report/*` backend endpoints and hav
323
339
  #### Method Renames (Following REST Conventions)
324
340
 
325
341
  **Full Scans (Modern API):**
342
+
326
343
  - `getOrgFullScanList()` → `listFullScans()` with `ListFullScansOptions`
327
344
  - `createOrgFullScan()` → `createFullScan()` with `CreateFullScanOptions`
328
345
  - `getOrgFullScanBuffered()` → `getFullScan()`
@@ -331,9 +348,11 @@ The following methods mapped to deprecated `/report/*` backend endpoints and hav
331
348
  - `getOrgFullScanMetadata()` → `getFullScanMetadata()`
332
349
 
333
350
  **Organizations:**
351
+
334
352
  - `getOrganizations()` → `listOrganizations()`
335
353
 
336
354
  **Repositories:**
355
+
337
356
  - `getOrgRepoList()` → `listRepositories()` with `ListRepositoriesOptions`
338
357
  - `getOrgRepo()` → `getRepository()`
339
358
  - `createOrgRepo()` → `createRepository()`
@@ -355,22 +374,26 @@ Strict types now mark guaranteed API fields as required instead of optional, imp
355
374
  ## [2.0.7](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.7) - 2025-10-22
356
375
 
357
376
  ### Changed
377
+
358
378
  - Sync with openapi definition
359
379
 
360
380
  ## [2.0.6](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.6) - 2025-10-22
361
381
 
362
382
  ### Fixed
383
+
363
384
  - TypeScript lint compliance for array type syntax in `SocketSdkArrayElement` type helper
364
385
 
365
386
  ## [2.0.5](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.5) - 2025-10-22
366
387
 
367
388
  ### Added
389
+
368
390
  - `SocketSdkData<T>` type helper for extracting data from SDK operation results
369
391
  - `SocketSdkArrayElement<T, K>` type helper for extracting array element types from SDK operations
370
392
 
371
393
  ## [2.0.4](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.4) - 2025-10-22
372
394
 
373
395
  ### Added
396
+
374
397
  - Support for `Retry-After` header in rate limit responses (HTTP 429)
375
398
  - Automatically respects server-specified retry delays
376
399
  - Parses both delay-seconds (numeric) and HTTP-date formats
@@ -379,16 +402,19 @@ Strict types now mark guaranteed API fields as required instead of optional, imp
379
402
  ## [2.0.3](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.3) - 2025-10-22
380
403
 
381
404
  ### Fixed
405
+
382
406
  - Improved TypeScript module resolution with explicit type exports instead of wildcard re-exports
383
407
 
384
408
  ## [2.0.2](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.2) - 2025-10-22
385
409
 
386
410
  ### Fixed
411
+
387
412
  - Ensured expected dist/ files are produced and refined package.json exports
388
413
 
389
414
  ## [2.0.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.1) - 2025-10-21
390
415
 
391
416
  ### Changed
417
+
392
418
  - Use `@socketsecurity/lib` under the hood
393
419
  - Synced OpenAPI type definitions with latest API specification
394
420
  - Added documentation for `scan_type` query parameter on manifest upload endpoint (used for categorizing multiple SBOM heads per repository branch)
@@ -397,6 +423,7 @@ Strict types now mark guaranteed API fields as required instead of optional, imp
397
423
  ## [2.0.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v2.0.0) - 2025-10-10
398
424
 
399
425
  ### Changed
426
+
400
427
  - **BREAKING**: Migrated to ESM-only module format
401
428
  - Package is now ESM-only (`"type": "module"` in package.json)
402
429
  - All output files use `.mjs` extension for JavaScript
@@ -407,43 +434,52 @@ Strict types now mark guaranteed API fields as required instead of optional, imp
407
434
  - Improved code splitting for better tree-shaking with ESM
408
435
 
409
436
  ### Removed
437
+
410
438
  - **BREAKING**: Removed CommonJS support and exports
411
439
  - Removed CommonJS-specific build configurations
412
440
 
413
441
  ### Migration Guide
442
+
414
443
  To migrate from v1.x to v2.0:
444
+
415
445
  1. Ensure your project supports ESM modules (Node.js 14+ with `"type": "module"` or `.mjs` extensions)
416
446
  2. Update imports from CommonJS `require()` to ESM `import` statements:
447
+
417
448
  ```javascript
418
449
  // Before (v1.x)
419
- const { SocketSdk } = require('@socketsecurity/sdk');
450
+ const { SocketSdk } = require('@socketsecurity/sdk')
420
451
 
421
452
  // After (v2.0)
422
- import { SocketSdk } from '@socketsecurity/sdk';
453
+ import { SocketSdk } from '@socketsecurity/sdk'
423
454
  ```
455
+
424
456
  3. If your project still requires CommonJS, consider staying on v1.x or using a transpiler
425
457
 
426
458
  ## [1.11.2](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.11.2) - 2025-10-07
427
459
 
428
460
  ### Fixed
461
+
429
462
  - Fixed typos in requirements.json
430
463
  - Updated @socketsecurity/registry to fix bugs related to inlined runtime-dependent expressions
431
464
 
432
465
  ## [1.11.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.11.1) - 2025-10-06
433
466
 
434
467
  ### Added
468
+
435
469
  - Performance optimizations with memoization for `normalizeBaseUrl` and quota utility functions
436
470
  - Performance tracking to HTTP client functions
437
471
  - Comprehensive error handling tests for SDK methods across organization, scanning, and batch APIs
438
472
  - Reusable assertion helpers for SDK tests
439
473
 
440
474
  ### Changed
475
+
441
476
  - Improved test coverage and reliability with additional test cases
442
477
  - Streamlined documentation (README, TESTING.md, QUOTA.md, EXAMPLES.md) for better clarity and discoverability
443
478
 
444
479
  ## [1.11.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.11.0) - 2025-10-04
445
480
 
446
481
  ### Added
482
+
447
483
  - Optional TTL caching for API responses with configurable cache duration
448
484
  - New `cache` option (default: false) to enable response caching
449
485
  - New `cacheTtl` option (default: 5 minutes) to customize cache duration
@@ -451,16 +487,19 @@ To migrate from v1.x to v2.0:
451
487
  ## [1.10.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.10.1) - 2025-10-04
452
488
 
453
489
  ### Added
490
+
454
491
  - Automatic retry with exponential backoff to all HTTP API calls for improved reliability on transient failures
455
492
 
456
493
  ## [1.10.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.10.0) - 2025-10-04
457
494
 
458
495
  ### Added
496
+
459
497
  - Added `PromiseQueue` utility for controlled concurrency in async operations
460
498
  - HTTP retry logic with exponential backoff for improved reliability on transient failures
461
499
  - Added option type interfaces: `CreateDependenciesSnapshotOptions`, `CreateOrgFullScanOptions`, `CreateScanFromFilepathsOptions`, `StreamOrgFullScanOptions`, `UploadManifestFilesOptions`
462
500
 
463
501
  ### Changed
502
+
464
503
  - **BREAKING**: Refactored SDK methods to use options objects instead of positional parameters for better API clarity:
465
504
  - `createDependenciesSnapshot(filepaths, options)` - replaced `repo` and `branch` positional parameters with options object
466
505
  - `createOrgFullScan(orgSlug, filepaths, options)` - replaced positional parameters with options object
@@ -473,6 +512,7 @@ To migrate from v1.x to v2.0:
473
512
  - Updated `@socketsecurity/registry` dependency to 1.4.0
474
513
 
475
514
  ### Fixed
515
+
476
516
  - Fixed import assertion syntax for JSON imports to use standard import syntax
477
517
  - Fixed HTTP retry test mocks to correctly match PUT method requests
478
518
  - Fixed critical issues in type handling and URL search parameter conversions
@@ -480,22 +520,26 @@ To migrate from v1.x to v2.0:
480
520
  ## [1.9.2](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.9.2) - 2025-10-04
481
521
 
482
522
  ### Changed
523
+
483
524
  - Improved TypeScript type definitions - All optional properties now include explicit `| undefined` type annotations for better type narrowing and null safety
484
525
 
485
526
  ## [1.9.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.9.1) - 2025-10-03
486
527
 
487
528
  ### Changed
529
+
488
530
  - Disabled TypeScript declaration map generation to reduce package size
489
531
 
490
532
  ## [1.9.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.9.0) - 2025-10-03
491
533
 
492
534
  ### Changed
535
+
493
536
  - **BREAKING**: Improved `SocketSdkResult` type compatibility - success and error results now have symmetric properties (`data`, `error`, `cause`) with explicit `undefined` types for better TypeScript narrowing
494
537
  - **BREAKING**: Removed `CResult` type (CLI-specific) in favor of SDK-appropriate `SocketSdkGenericResult` type for `getApi()` and `sendApi()` methods
495
538
  - Updated `getApi()` and `sendApi()` to use `SocketSdkGenericResult` with consistent HTTP status codes instead of CLI exit codes
496
539
  - All result types now use `success` discriminant with `status` (HTTP code), `data`, `error`, and `cause` properties on both branches
497
540
 
498
541
  ### Migration Guide
542
+
499
543
  - If using `getApi()` or `sendApi()` with `throws: false`, update from `CResult` to `SocketSdkGenericResult`
500
544
  - Change `.ok` checks to `.success`
501
545
  - Change `.code` to `.status` (now contains HTTP status code)
@@ -505,11 +549,13 @@ To migrate from v1.x to v2.0:
505
549
  ## [1.8.6](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.6) - 2025-10-02
506
550
 
507
551
  ### Changed
552
+
508
553
  - Reduced package size by excluding source map files (.js.map) from published package
509
554
 
510
555
  ## [1.8.5](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.5) - 2025-10-02
511
556
 
512
557
  ### Changed
558
+
513
559
  - Synced with OpenAPI definition
514
560
  - Added new `/openapi.json` endpoint for retrieving API specification in JSON format
515
561
  - Updated repo label filter descriptions to document empty string ("") usage for repositories with no labels
@@ -518,37 +564,44 @@ To migrate from v1.x to v2.0:
518
564
  ## [1.8.4](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.4) - 2025-10-01
519
565
 
520
566
  ### Fixed
567
+
521
568
  - Fixed registry constant import paths to use correct casing (SOCKET_PUBLIC_API_TOKEN, UNKNOWN_ERROR)
522
569
 
523
570
  ## [1.8.3](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.3) - 2025-09-30
524
571
 
525
572
  ### Changed
573
+
526
574
  - Synced with OpenAPI definition
527
575
 
528
576
  ## [1.8.2](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.2) - 2025-09-29
529
577
 
530
578
  ### Fixed
579
+
531
580
  - Fixed publishing workflow to ensure dist folder is built before npm publish
532
581
  - Changed prepublishOnly script to prevent accidental local publishing
533
582
 
534
583
  ## [1.8.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.1) - 2025-09-29
535
584
 
536
585
  ### Changed
586
+
537
587
  - Update test infrastructure and build configuration
538
588
 
539
589
  ## [1.8.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.0) - 2025-09-27
540
590
 
541
591
  ### Added
592
+
542
593
  - Quota utility functions for API cost management in `quota-utils.ts`
543
594
  - New exported functions: `checkQuota`, `formatQuotaReport`, `getEstimatedCost`, `getMethodCost`, `getQuotaSummary`, `isWithinQuota`
544
595
  - Example files demonstrating quota usage patterns
545
596
 
546
597
  ### Changed
598
+
547
599
  - Improved error handling for quota utilities
548
600
 
549
601
  ## [1.7.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.7.0) - 2025-09-26
550
602
 
551
603
  ### Added
604
+
552
605
  - `getApi` method for raw GET requests with configurable response handling
553
606
  - `sendApi` method for POST/PUT requests with JSON body support
554
607
  - `CResult` type pattern for non-throwing API operations
@@ -568,6 +621,7 @@ To migrate from v1.x to v2.0:
568
621
  - Additional coverage tests for invalid JSON line handling in NDJSON streams
569
622
 
570
623
  ### Changed
624
+
571
625
  - Improved error message formatting and JSON parsing error handling
572
626
  - Enhanced type safety with better generic constraints
573
627
  - Renamed option types to `GetOptions` and `SendOptions` for consistency
@@ -582,169 +636,203 @@ To migrate from v1.x to v2.0:
582
636
  ## [1.6.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.6.1) - 2025-09-24
583
637
 
584
638
  ### Changed
639
+
585
640
  - Updated to use trusted publisher for npm package provenance
586
641
 
587
642
  ## [1.6.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.6.0) - 2025-09-24
588
643
 
589
644
  ### Changed
645
+
590
646
  - **BREAKING:** Converted to single CommonJS export type, removing dual ESM/CJS support
591
647
 
592
648
  ## [1.5.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.5.1) - 2025-09-24
593
649
 
594
650
  ### Fixed
651
+
595
652
  - Added missing setup-script to provenance workflow
596
653
 
597
654
  ## [1.5.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.5.0) - 2025-09-23
598
655
 
599
656
  ### Added
657
+
600
658
  - `getOrgFullScanBuffered` method for buffered full scan retrieval
601
659
 
602
660
  ### Changed
661
+
603
662
  - **BREAKING:** Renamed `getOrgFullScan` to `streamOrgFullScan` for clarity
604
663
 
605
664
  ### Fixed
665
+
606
666
  - Added missing `getResponseJson` call to `createScanFromFilepaths`
607
667
  - Improved handling of empty response bodies
608
668
 
609
669
  ## [1.4.93](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.93) - 2025-09-15
610
670
 
611
671
  ### Fixed
672
+
612
673
  - Fixed malformed part header issue for upload of manifest files
613
674
 
614
675
  ## [1.4.91](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.91) - 2025-09-11
615
676
 
616
677
  ### Changed
678
+
617
679
  - Improved URL handling
618
680
 
619
681
  ## [1.4.90](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.90) - 2025-09-11
620
682
 
621
683
  ### Fixed
684
+
622
685
  - Improved error handling
623
686
 
624
687
  ## [1.4.84](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.84) - 2025-09-03
625
688
 
626
689
  ### Added
690
+
627
691
  - Filter alerts by action
628
692
 
629
693
  ### Changed
694
+
630
695
  - Improved JSON parsing
631
696
 
632
697
  ## [1.4.82](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.82) - 2025-09-02
633
698
 
634
699
  ### Changed
700
+
635
701
  - Improved public policy handling
636
702
 
637
703
  ## [1.4.81](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.81) - 2025-09-02
638
704
 
639
705
  ### Added
706
+
640
707
  - Add public security policy support
641
708
 
642
709
  ## [1.4.79](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.79) - 2025-08-27
643
710
 
644
711
  ### Fixed
712
+
645
713
  - Fixed ESM module compatibility
646
714
 
647
715
  ## [1.4.77](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.77) - 2025-08-25
648
716
 
649
717
  ### Added
718
+
650
719
  - Add timeout option for API requests
651
720
 
652
721
  ## [1.4.73](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.73) - 2025-08-08
653
722
 
654
723
  ### Fixed
724
+
655
725
  - Fixed crates ecosystem support
656
726
 
657
727
  ## [1.4.72](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.72) - 2025-08-08
658
728
 
659
729
  ### Fixed
730
+
660
731
  - Fixed rubygems ecosystem support
661
732
 
662
733
  ## [1.4.71](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.71) - 2025-08-08
663
734
 
664
735
  ### Added
736
+
665
737
  - Support for crate and rubygem ecosystems
666
738
 
667
739
  ## [1.4.68](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.68) - 2025-08-02
668
740
 
669
741
  ### Changed
742
+
670
743
  - Improved type definitions
671
744
  - Memory usage optimizations
672
745
 
673
746
  ## [1.4.66](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.66) - 2025-07-29
674
747
 
675
748
  ### Fixed
749
+
676
750
  - Fixed file upload timing issue
677
751
  - Fixed multipart form data formatting
678
752
 
679
753
  ## [1.4.64](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.64) - 2025-07-22
680
754
 
681
755
  ### Changed
756
+
682
757
  - Improved method signatures
683
758
 
684
759
  ## [1.4.62](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.62) - 2025-07-21
685
760
 
686
761
  ### Fixed
762
+
687
763
  - Fixed query parameter handling for empty values
688
764
 
689
765
  ## [1.4.61](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.61) - 2025-07-21
690
766
 
691
767
  ### Changed
768
+
692
769
  - Improved query parameter normalization
693
770
 
694
771
  ## [1.4.60](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.60) - 2025-07-21
695
772
 
696
773
  ### Changed
774
+
697
775
  - Renamed result type for clarity
698
776
 
699
777
  ## [1.4.59](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.59) - 2025-07-20
700
778
 
701
779
  ### Added
780
+
702
781
  - Add alias types for improved developer experience
703
782
 
704
783
  ## [1.4.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.0) - 2025-05-01
705
784
 
706
785
  ### Added
786
+
707
787
  - Full scans feature support
708
788
  - Audit log and repos features
709
789
  - Organization security policy support (getOrgSecurityPolicy)
710
790
 
711
791
  ### Changed
792
+
712
793
  - Improved TypeScript type exports
713
794
  - Enhanced ESM and CJS dual package support
714
795
 
715
796
  ## [1.3.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.3.0) - 2025-03-01
716
797
 
717
798
  ### Added
799
+
718
800
  - Support for multiple ecosystem types
719
801
  - Enhanced error handling and reporting
720
802
 
721
803
  ### Changed
804
+
722
805
  - Improved API client architecture
723
806
  - Better TypeScript type definitions
724
807
 
725
808
  ## [1.2.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.2.0) - 2025-01-15
726
809
 
727
810
  ### Added
811
+
728
812
  - File upload support for manifest files
729
813
  - Request body creation for file paths
730
814
 
731
815
  ### Changed
816
+
732
817
  - Enhanced multipart form data handling
733
818
  - Improved streaming support
734
819
 
735
820
  ## [1.1.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.1.0) - 2024-11-01
736
821
 
737
822
  ### Added
823
+
738
824
  - Query parameter normalization
739
825
  - Enhanced search parameter handling
740
826
 
741
827
  ### Changed
828
+
742
829
  - Improved URL parsing and handling
743
830
  - Better error messages
744
831
 
745
832
  ## [1.0.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.0.0) - 2024-09-01
746
833
 
747
834
  ### Added
835
+
748
836
  - Initial release of Socket SDK for JavaScript
749
837
  - Full Socket API client implementation
750
838
  - TypeScript support with comprehensive type definitions
package/README.md CHANGED
@@ -21,9 +21,9 @@ pnpm add @socketsecurity/sdk
21
21
  import { SocketSdk } from '@socketsecurity/sdk'
22
22
 
23
23
  const client = new SocketSdk('your-api-key', {
24
- retries: 3, // Retry failed requests up to 3 times
25
- retryDelay: 1000, // Start with 1s delay, exponential backoff
26
- timeout: 30000, // 30 second timeout
24
+ retries: 3, // Retry failed requests up to 3 times
25
+ retryDelay: 1000, // Start with 1s delay, exponential backoff
26
+ timeout: 30000, // 30 second timeout
27
27
  })
28
28
 
29
29
  // Check your quota
@@ -42,16 +42,16 @@ if (result.success) {
42
42
  const batchResult = await client.batchPackageFetch({
43
43
  components: [
44
44
  { purl: 'pkg:npm/express@4.18.0' },
45
- { purl: 'pkg:npm/react@18.0.0' }
46
- ]
45
+ { purl: 'pkg:npm/react@18.0.0' },
46
+ ],
47
47
  })
48
48
  ```
49
49
 
50
50
  ## Documentation
51
51
 
52
- | Guide | Description |
53
- |-------|-------------|
54
- | **[API Reference](./docs/api-reference.md)** | Complete API method documentation |
52
+ | Guide | Description |
53
+ | -------------------------------------------------- | ----------------------------------- |
54
+ | **[API Reference](./docs/api-reference.md)** | Complete API method documentation |
55
55
  | **[Quota Management](./docs/quota-management.md)** | Cost tiers (0/10/100) and utilities |
56
56
 
57
57
  ## License
package/dist/index.js CHANGED
@@ -71,20 +71,26 @@ module.exports = __toCommonJS(index_exports);
71
71
  // package.json
72
72
  var package_default = {
73
73
  name: "@socketsecurity/sdk",
74
- version: "3.3.1",
75
- packageManager: "pnpm@10.30.3",
76
- license: "MIT",
74
+ version: "3.4.0",
77
75
  description: "SDK for the Socket API client",
76
+ homepage: "https://github.com/SocketDev/socket-sdk-js",
77
+ license: "MIT",
78
78
  author: {
79
79
  name: "Socket Inc",
80
80
  email: "eng@socket.dev",
81
81
  url: "https://socket.dev"
82
82
  },
83
- homepage: "https://github.com/SocketDev/socket-sdk-js",
84
83
  repository: {
85
84
  type: "git",
86
85
  url: "git://github.com/SocketDev/socket-sdk-js.git"
87
86
  },
87
+ files: [
88
+ "CHANGELOG.md",
89
+ "data/*.json",
90
+ "dist/*.d.ts",
91
+ "dist/*.js",
92
+ "types/*.d.ts"
93
+ ],
88
94
  main: "./dist/index.js",
89
95
  types: "./dist/index.d.ts",
90
96
  exports: {
@@ -113,6 +119,8 @@ var package_default = {
113
119
  clean: "node scripts/clean.mjs",
114
120
  cover: "node scripts/cover.mjs",
115
121
  fix: "node scripts/lint.mjs --fix",
122
+ format: "oxfmt .",
123
+ "format:check": "oxfmt --check .",
116
124
  "generate-sdk": "node scripts/generate-sdk.mjs",
117
125
  lint: "node scripts/lint.mjs",
118
126
  precommit: "pnpm run check --lint --staged",
@@ -120,7 +128,7 @@ var package_default = {
120
128
  "ci:validate": "node scripts/ci-validate.mjs",
121
129
  prepublishOnly: "echo 'ERROR: Use GitHub Actions workflow for publishing' && exit 1",
122
130
  publish: "node scripts/publish.mjs",
123
- "publish:ci": "node scripts/publish.mjs --skip-git --skip-build --tag ${DIST_TAG:-latest}",
131
+ "publish:ci": "node scripts/publish.mjs --tag ${DIST_TAG:-latest}",
124
132
  claude: "node scripts/claude.mjs",
125
133
  test: "node scripts/test.mjs",
126
134
  type: "tsgo --noEmit -p .config/tsconfig.check.json",
@@ -128,7 +136,7 @@ var package_default = {
128
136
  },
129
137
  dependencies: {
130
138
  "@socketregistry/packageurl-js": "1.3.5",
131
- "@socketsecurity/lib": "5.7.0",
139
+ "@socketsecurity/lib": "5.8.0",
132
140
  "form-data": "4.0.5"
133
141
  },
134
142
  devDependencies: {
@@ -136,10 +144,8 @@ var package_default = {
136
144
  "@babel/parser": "7.26.3",
137
145
  "@babel/traverse": "7.26.4",
138
146
  "@babel/types": "7.26.3",
139
- "@biomejs/biome": "2.2.4",
140
- "@dotenvx/dotenvx": "^1.52.0",
141
- "@eslint/compat": "1.3.2",
142
- "@eslint/js": "9.35.0",
147
+ "@dotenvx/dotenvx": "1.54.1",
148
+ "@oxlint/migrate": "1.52.0",
143
149
  "@sveltejs/acorn-typescript": "1.0.8",
144
150
  "@types/babel__traverse": "7.28.0",
145
151
  "@types/node": "24.9.2",
@@ -149,26 +155,35 @@ var package_default = {
149
155
  del: "8.0.1",
150
156
  "dev-null-cli": "2.0.0",
151
157
  esbuild: "0.25.11",
152
- eslint: "9.35.0",
153
- "eslint-import-resolver-typescript": "4.4.4",
154
- "eslint-plugin-import-x": "4.16.1",
155
- "eslint-plugin-jsdoc": "57.0.8",
156
- "eslint-plugin-n": "17.23.1",
157
- "eslint-plugin-sort-destructure-keys": "2.0.0",
158
- "eslint-plugin-unicorn": "56.0.1",
159
158
  "fast-glob": "3.3.3",
160
- globals: "16.4.0",
161
159
  "http2-wrapper": "2.2.1",
162
160
  husky: "9.1.7",
163
161
  "magic-string": "0.30.14",
164
162
  nock: "14.0.10",
165
163
  "openapi-typescript": "6.7.6",
164
+ oxfmt: "0.37.0",
165
+ oxlint: "1.52.0",
166
166
  semver: "7.7.2",
167
167
  taze: "19.9.2",
168
168
  "type-coverage": "2.29.7",
169
- "typescript-eslint": "8.44.1",
170
169
  vitest: "4.0.3"
171
170
  },
171
+ typeCoverage: {
172
+ atLeast: 99,
173
+ cache: true,
174
+ "ignore-files": "test/*",
175
+ "ignore-non-null-assertion": true,
176
+ "ignore-type-assertion": true,
177
+ ignoreAsAssertion: true,
178
+ ignoreCatch: true,
179
+ ignoreEmptyType: true,
180
+ strict: true
181
+ },
182
+ engines: {
183
+ node: ">=18",
184
+ pnpm: ">=10.25.0"
185
+ },
186
+ packageManager: "pnpm@10.32.1",
172
187
  pnpm: {
173
188
  ignoredBuiltDependencies: [
174
189
  "esbuild",
@@ -177,28 +192,6 @@ var package_default = {
177
192
  overrides: {
178
193
  vite: "7.1.12"
179
194
  }
180
- },
181
- engines: {
182
- node: ">=18",
183
- pnpm: ">=10.25.0"
184
- },
185
- files: [
186
- "CHANGELOG.md",
187
- "data/*.json",
188
- "dist/*.d.ts",
189
- "dist/*.js",
190
- "types/*.d.ts"
191
- ],
192
- typeCoverage: {
193
- cache: true,
194
- atLeast: 99,
195
- ignoreAsAssertion: true,
196
- ignoreCatch: true,
197
- ignoreEmptyType: true,
198
- "ignore-non-null-assertion": true,
199
- "ignore-type-assertion": true,
200
- "ignore-files": "test/*",
201
- strict: true
202
195
  }
203
196
  };
204
197
 
@@ -95,6 +95,7 @@ export type ListRepositoriesOptions = {
95
95
  page?: number | undefined;
96
96
  per_page?: number | undefined;
97
97
  sort?: string | undefined;
98
+ workspace?: string | undefined;
98
99
  };
99
100
  /**
100
101
  * Strict type for organization item.
package/package.json CHANGED
@@ -1,19 +1,25 @@
1
1
  {
2
2
  "name": "@socketsecurity/sdk",
3
- "version": "3.3.1",
4
- "packageManager": "pnpm@10.30.3",
5
- "license": "MIT",
3
+ "version": "3.4.0",
6
4
  "description": "SDK for the Socket API client",
5
+ "homepage": "https://github.com/SocketDev/socket-sdk-js",
6
+ "license": "MIT",
7
7
  "author": {
8
8
  "name": "Socket Inc",
9
9
  "email": "eng@socket.dev",
10
10
  "url": "https://socket.dev"
11
11
  },
12
- "homepage": "https://github.com/SocketDev/socket-sdk-js",
13
12
  "repository": {
14
13
  "type": "git",
15
14
  "url": "git://github.com/SocketDev/socket-sdk-js.git"
16
15
  },
16
+ "files": [
17
+ "CHANGELOG.md",
18
+ "data/*.json",
19
+ "dist/*.d.ts",
20
+ "dist/*.js",
21
+ "types/*.d.ts"
22
+ ],
17
23
  "main": "./dist/index.js",
18
24
  "types": "./dist/index.d.ts",
19
25
  "exports": {
@@ -42,6 +48,8 @@
42
48
  "clean": "node scripts/clean.mjs",
43
49
  "cover": "node scripts/cover.mjs",
44
50
  "fix": "node scripts/lint.mjs --fix",
51
+ "format": "oxfmt .",
52
+ "format:check": "oxfmt --check .",
45
53
  "generate-sdk": "node scripts/generate-sdk.mjs",
46
54
  "lint": "node scripts/lint.mjs",
47
55
  "precommit": "pnpm run check --lint --staged",
@@ -49,7 +57,7 @@
49
57
  "ci:validate": "node scripts/ci-validate.mjs",
50
58
  "prepublishOnly": "echo 'ERROR: Use GitHub Actions workflow for publishing' && exit 1",
51
59
  "publish": "node scripts/publish.mjs",
52
- "publish:ci": "node scripts/publish.mjs --skip-git --skip-build --tag ${DIST_TAG:-latest}",
60
+ "publish:ci": "node scripts/publish.mjs --tag ${DIST_TAG:-latest}",
53
61
  "claude": "node scripts/claude.mjs",
54
62
  "test": "node scripts/test.mjs",
55
63
  "type": "tsgo --noEmit -p .config/tsconfig.check.json",
@@ -57,7 +65,7 @@
57
65
  },
58
66
  "dependencies": {
59
67
  "@socketregistry/packageurl-js": "1.3.5",
60
- "@socketsecurity/lib": "5.7.0",
68
+ "@socketsecurity/lib": "5.8.0",
61
69
  "form-data": "4.0.5"
62
70
  },
63
71
  "devDependencies": {
@@ -65,10 +73,8 @@
65
73
  "@babel/parser": "7.26.3",
66
74
  "@babel/traverse": "7.26.4",
67
75
  "@babel/types": "7.26.3",
68
- "@biomejs/biome": "2.2.4",
69
- "@dotenvx/dotenvx": "^1.52.0",
70
- "@eslint/compat": "1.3.2",
71
- "@eslint/js": "9.35.0",
76
+ "@dotenvx/dotenvx": "1.54.1",
77
+ "@oxlint/migrate": "1.52.0",
72
78
  "@sveltejs/acorn-typescript": "1.0.8",
73
79
  "@types/babel__traverse": "7.28.0",
74
80
  "@types/node": "24.9.2",
@@ -78,26 +84,35 @@
78
84
  "del": "8.0.1",
79
85
  "dev-null-cli": "2.0.0",
80
86
  "esbuild": "0.25.11",
81
- "eslint": "9.35.0",
82
- "eslint-import-resolver-typescript": "4.4.4",
83
- "eslint-plugin-import-x": "4.16.1",
84
- "eslint-plugin-jsdoc": "57.0.8",
85
- "eslint-plugin-n": "17.23.1",
86
- "eslint-plugin-sort-destructure-keys": "2.0.0",
87
- "eslint-plugin-unicorn": "56.0.1",
88
87
  "fast-glob": "3.3.3",
89
- "globals": "16.4.0",
90
88
  "http2-wrapper": "2.2.1",
91
89
  "husky": "9.1.7",
92
90
  "magic-string": "0.30.14",
93
91
  "nock": "14.0.10",
94
92
  "openapi-typescript": "6.7.6",
93
+ "oxfmt": "0.37.0",
94
+ "oxlint": "1.52.0",
95
95
  "semver": "7.7.2",
96
96
  "taze": "19.9.2",
97
97
  "type-coverage": "2.29.7",
98
- "typescript-eslint": "8.44.1",
99
98
  "vitest": "4.0.3"
100
99
  },
100
+ "typeCoverage": {
101
+ "atLeast": 99,
102
+ "cache": true,
103
+ "ignore-files": "test/*",
104
+ "ignore-non-null-assertion": true,
105
+ "ignore-type-assertion": true,
106
+ "ignoreAsAssertion": true,
107
+ "ignoreCatch": true,
108
+ "ignoreEmptyType": true,
109
+ "strict": true
110
+ },
111
+ "engines": {
112
+ "node": ">=18",
113
+ "pnpm": ">=10.25.0"
114
+ },
115
+ "packageManager": "pnpm@10.32.1",
101
116
  "pnpm": {
102
117
  "ignoredBuiltDependencies": [
103
118
  "esbuild",
@@ -106,27 +121,5 @@
106
121
  "overrides": {
107
122
  "vite": "7.1.12"
108
123
  }
109
- },
110
- "engines": {
111
- "node": ">=18",
112
- "pnpm": ">=10.25.0"
113
- },
114
- "files": [
115
- "CHANGELOG.md",
116
- "data/*.json",
117
- "dist/*.d.ts",
118
- "dist/*.js",
119
- "types/*.d.ts"
120
- ],
121
- "typeCoverage": {
122
- "cache": true,
123
- "atLeast": 99,
124
- "ignoreAsAssertion": true,
125
- "ignoreCatch": true,
126
- "ignoreEmptyType": true,
127
- "ignore-non-null-assertion": true,
128
- "ignore-type-assertion": true,
129
- "ignore-files": "test/*",
130
- "strict": true
131
124
  }
132
125
  }
package/types/api.d.ts CHANGED
@@ -7754,6 +7754,8 @@ export interface operations {
7754
7754
  page?: number
7755
7755
  /** @description Include archived repositories in the results */
7756
7756
  include_archived?: boolean
7757
+ /** @description Filter repositories by workspace. When provided (including empty string), only repos in that workspace are returned. */
7758
+ workspace?: string
7757
7759
  }
7758
7760
  path: {
7759
7761
  /** @description The slug of the organization */
@@ -15274,12 +15276,15 @@ export interface operations {
15274
15276
  | 'CreateApiToken'
15275
15277
  | 'CreateArtifact'
15276
15278
  | 'CreateLabel'
15279
+ | 'CreateOauthRefreshToken'
15280
+ | 'CreateRepoAccessRule'
15277
15281
  | 'CreateWebhook'
15278
15282
  | 'DeleteAlertTriage'
15279
15283
  | 'DeleteApiToken'
15280
15284
  | 'DeleteFullScan'
15281
15285
  | 'DeleteLabel'
15282
15286
  | 'DeleteLabelSetting'
15287
+ | 'DeleteRepoAccessRule'
15283
15288
  | 'DeleteReport'
15284
15289
  | 'DeleteRepository'
15285
15290
  | 'DeleteWebhook'
@@ -15293,6 +15298,7 @@ export interface operations {
15293
15298
  | 'RemoveMember'
15294
15299
  | 'ResetInvitationLink'
15295
15300
  | 'ResetOrganizationSettingToDefault'
15301
+ | 'RotateOauthRefreshToken'
15296
15302
  | 'RevokeApiToken'
15297
15303
  | 'RotateApiToken'
15298
15304
  | 'SendInvitation'
@@ -15310,6 +15316,7 @@ export interface operations {
15310
15316
  | 'UpdateLabelSetting'
15311
15317
  | 'UpdateLicenseOverlay'
15312
15318
  | 'UpdateOrganizationSetting'
15319
+ | 'UpdateRepoAccessRule'
15313
15320
  | 'UpdateWebhook'
15314
15321
  | 'UpgradeOrganizationPlan'
15315
15322
  /** @description Number of events per page */