Skip to content

Commit 13b743b

Browse files
committed
docs: consolidate and improve documentation
- Simplify README and remove verbose sections - Condense API reference method parameter documentation - Simplify getting started onboarding guide - Reduce utility examples in quota-management - Streamline usage examples and when-to-use-what guide - Consolidate getting started documentation - Add coverage badges and onboarding guide - Update coverage badges to reflect actual test coverage (79.92%) - Improve .npmrc and .pnpmrc documentation - Remove redundant development documentation
1 parent 2a65147 commit 13b743b

12 files changed

+65
-4042
lines changed

README.md

Lines changed: 5 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,20 @@
22

33
[![Socket Badge](https://socket.dev/api/badge/npm/package/@socketsecurity/sdk)](https://socket.dev/npm/package/@socketsecurity/sdk)
44
[![CI](https://github.com/SocketDev/socket-sdk-js/actions/workflows/ci.yml/badge.svg)](https://github.com/SocketDev/socket-sdk-js/actions/workflows/ci.yml)
5+
![Coverage](https://img.shields.io/badge/coverage-79.95%25-green)
56

67
[![Follow @SocketSecurity](https://img.shields.io/twitter/follow/SocketSecurity?style=social)](https://twitter.com/SocketSecurity)
78
[![Follow @socket.dev on Bluesky](https://img.shields.io/badge/[email protected]?style=social&logo=bluesky)](https://bsky.app/profile/socket.dev)
89

9-
JavaScript SDK for [Socket.dev](https://socket.dev/) API - Security analysis, vulnerability scanning, and compliance monitoring for software supply chains.
10+
JavaScript SDK for [Socket.dev](https://socket.dev/) API.
1011

11-
## Table of Contents
12-
13-
- [Installation](#installation)
14-
- [Quick Start](#quick-start)
15-
- [API Methods](#api-methods) - [Full API Reference](./docs/api-reference.md)
16-
- [Documentation](#documentation)
17-
- [Examples](#examples)
18-
19-
## At a Glance
20-
21-
| Feature | Description |
22-
|---------|-------------|
23-
| **Package Analysis** | Quick security checks for npm packages |
24-
| **Full Scans** | Deep analysis with SBOM support |
25-
| **Batch Operations** | Analyze multiple packages efficiently |
26-
| **Policy Management** | Configure security & license rules |
27-
| **Quota Utilities** | Cost calculation & planning helpers |
28-
| **TypeScript** | Full type safety with auto-generated types |
29-
30-
**Requirements:** Node.js 18+ ·ESM only (v2.0+)
31-
32-
## Installation
12+
## Install
3313

3414
```bash
3515
pnpm add @socketsecurity/sdk
3616
```
3717

38-
**Note:** Version 2.0+ is ESM-only. For CommonJS support, use version 1.x.
39-
40-
## Quick Start
18+
## Usage
4119

4220
```typescript
4321
import { SocketSdk } from '@socketsecurity/sdk'
@@ -69,107 +47,13 @@ const batchResult = await client.batchPackageFetch({
6947
})
7048
```
7149

72-
**[→ Configuration](./docs/api-reference.md#configuration)**
73-
74-
## API Methods
75-
76-
### Package Analysis
77-
78-
Quick security checks: `batchPackageFetch()` ·`batchPackageStream()` ·`getIssuesByNpmPackage()` ·`getScoreByNpmPackage()`
79-
80-
[→ Documentation](./docs/api-reference.md#package-analysis)
81-
82-
### Scanning & Analysis
83-
84-
Project scanning: `createDependenciesSnapshot()` ·`createOrgFullScan()` ·`createScanFromFilepaths()` ·`getScan()` ·`getScanList()` ·`getSupportedScanFiles()`
85-
86-
[→ Documentation](./docs/api-reference.md#scanning--analysis)
87-
88-
### Organization Management
89-
90-
Organizations and repositories: `getOrganizations()` ·`createOrgRepo()` ·`getOrgRepo()` ·`getOrgRepoList()` ·`updateOrgRepo()` ·`deleteOrgRepo()`
91-
92-
[→ Documentation](./docs/api-reference.md#organization-management)
93-
94-
### Policy & Settings
95-
96-
Security configuration: `getOrgSecurityPolicy()` ·`updateOrgSecurityPolicy()` ·`getOrgLicensePolicy()` ·`updateOrgLicensePolicy()` ·`postSettings()`
97-
98-
[→ Documentation](./docs/api-reference.md#policy--settings)
99-
100-
### Full Scan Management
101-
102-
Deep analysis: `getOrgFullScanList()` ·`getOrgFullScanMetadata()` ·`getOrgFullScanBuffered()` ·`streamOrgFullScan()` ·`deleteOrgFullScan()`
103-
104-
[→ Documentation](./docs/api-reference.md#full-scan-management)
105-
106-
### Diff Scans
107-
108-
Scan comparison: `createOrgDiffScanFromIds()` ·`getDiffScanById()` ·`listOrgDiffScans()` ·`deleteOrgDiffScan()`
109-
110-
[→ Documentation](./docs/api-reference.md#diff-scans)
111-
112-
### Patches & Vulnerabilities
113-
114-
Security fixes: `streamPatchesFromScan()` ·`viewPatch()`
115-
116-
[→ Documentation](./docs/api-reference.md#patches--vulnerabilities)
117-
118-
### Alert & Triage
119-
120-
Alert management: `getOrgTriage()` ·`updateOrgAlertTriage()`
121-
122-
[→ Documentation](./docs/api-reference.md#alert--triage)
123-
124-
### Export & Integration
125-
126-
SBOM export: `exportCDX()` ·`exportSPDX()` ·`searchDependencies()` ·`uploadManifestFiles()`
127-
128-
[→ Documentation](./docs/api-reference.md#export--integration)
129-
130-
### Repository Labels
131-
132-
Categorization: `createOrgRepoLabel()` ·`getOrgRepoLabel()` ·`getOrgRepoLabelList()` ·`updateOrgRepoLabel()` ·`deleteOrgRepoLabel()`
133-
134-
[→ Documentation](./docs/api-reference.md#repository-labels)
135-
136-
### Analytics & Monitoring
137-
138-
Usage metrics: `getQuota()` ·`getOrgAnalytics()` ·`getRepoAnalytics()` ·`getAuditLogEvents()`
139-
140-
[→ Documentation](./docs/api-reference.md#analytics--monitoring)
141-
142-
### Authentication & Access
143-
144-
API tokens: `getAPITokens()` ·`postAPIToken()` ·`postAPITokensRotate()` ·`postAPITokensRevoke()` ·`postAPITokenUpdate()`
145-
146-
[→ Documentation](./docs/api-reference.md#authentication--access)
147-
148-
### Entitlements
149-
150-
Feature access: `getEnabledEntitlements()` ·`getEntitlements()`
151-
152-
[→ Documentation](./docs/api-reference.md#entitlements)
153-
154-
### Quota Utilities
155-
156-
Cost helpers: `getQuotaCost()` ·`getRequiredPermissions()` ·`calculateTotalQuotaCost()` ·`hasQuotaForMethods()` ·`getMethodsByQuotaCost()` ·`getMethodsByPermissions()` ·`getQuotaUsageSummary()` ·`getAllMethodRequirements()`
157-
158-
[→ Documentation](./docs/quota-management.md)
159-
160-
### Advanced Query Methods
161-
162-
Raw API access: `getApi()` ·`sendApi()`
163-
164-
[→ Documentation](./docs/api-reference.md#advanced-query-methods)
165-
16650
## Documentation
16751

16852
| Guide | Description |
16953
|-------|-------------|
54+
| **[Getting Started](./docs/getting-started.md)** | Quick start for contributors (5 min setup) |
17055
| **[API Reference](./docs/api-reference.md)** | Complete API method documentation |
17156
| **[Usage Examples](./docs/usage-examples.md)** | Real-world patterns and code samples |
172-
| **[Getting Started](./docs/getting-started.md)** | Development setup and workflow |
17357
| **[Quota Management](./docs/quota-management.md)** | Cost tiers (0/10/100) and utilities |
17458
| **[Testing Guide](./docs/dev/testing.md)** | Test helpers, fixtures, and patterns |
17559
| **[Method Reference](./docs/when-to-use-what.md)** | Quick method selection guide |
@@ -183,14 +67,6 @@ See **[usage-examples.md](./docs/usage-examples.md)** for complete examples incl
18367
- Policy management
18468
- Quota planning
18569

186-
## Related Projects
187-
188-
| Project | Description |
189-
|---------|-------------|
190-
| [Socket.dev API](https://docs.socket.dev/reference) | Official REST API documentation |
191-
| [Socket CLI](https://github.com/SocketDev/socket-cli) | Command-line interface |
192-
| [Socket GitHub App](https://github.com/apps/socket-security) | Automated GitHub integration |
193-
19470
## License
19571

19672
MIT

0 commit comments

Comments
 (0)