@socketsecurity/sdk 1.10.1 → 1.11.1

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,25 @@ 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
+ ## [1.11.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.11.1) - 2025-10-06
8
+
9
+ ### Added
10
+ - Performance optimizations with memoization for `normalizeBaseUrl` and quota utility functions
11
+ - Performance tracking to HTTP client functions
12
+ - Comprehensive error handling tests for SDK methods across organization, scanning, and batch APIs
13
+ - Reusable assertion helpers for SDK tests
14
+
15
+ ### Changed
16
+ - Improved test coverage and reliability with additional test cases
17
+ - Streamlined documentation (README, TESTING.md, QUOTA.md, EXAMPLES.md) for better clarity and discoverability
18
+
19
+ ## [1.11.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.11.0) - 2025-10-04
20
+
21
+ ### Added
22
+ - Optional TTL caching for API responses with configurable cache duration
23
+ - New `cache` option (default: false) to enable response caching
24
+ - New `cacheTtl` option (default: 5 minutes) to customize cache duration
25
+
7
26
  ## [1.10.1](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.10.1) - 2025-10-04
8
27
 
9
28
  ### Added
package/README.md CHANGED
@@ -6,342 +6,184 @@
6
6
  [![Follow @SocketSecurity](https://img.shields.io/twitter/follow/SocketSecurity?style=social)](https://twitter.com/SocketSecurity)
7
7
  [![Follow @socket.dev on Bluesky](https://img.shields.io/badge/Follow-@socket.dev-1DA1F2?style=social&logo=bluesky)](https://bsky.app/profile/socket.dev)
8
8
 
9
- Official SDK for Socket.dev - Programmatic access to security analysis, vulnerability scanning, and compliance monitoring for your software supply chain.
9
+ Official SDK for [Socket.dev](https://socket.dev/) - Programmatic access to security analysis, vulnerability scanning, and compliance monitoring for your software supply chain.
10
10
 
11
- ## Usage
11
+ ## Installation
12
12
 
13
13
  ```bash
14
14
  pnpm add @socketsecurity/sdk
15
15
  ```
16
16
 
17
- ### ESM / TypeScript
17
+ ## Quick Start
18
18
 
19
- ```javascript
19
+ ```typescript
20
20
  import { SocketSdk } from '@socketsecurity/sdk'
21
21
 
22
- const client = new SocketSdk('yourApiKeyHere', {
23
- retries: 3, // Retry failed requests up to 3 times (default: 3)
24
- retryDelay: 1000, // Start with 1s delay, exponential backoff (default: 1000ms)
25
- timeout: 30000, // Request timeout in milliseconds (optional)
22
+ const client = new SocketSdk('your-api-key', {
23
+ retries: 3, // Retry failed requests up to 3 times
24
+ retryDelay: 1000, // Start with 1s delay, exponential backoff
25
+ timeout: 30000, // 30 second timeout
26
26
  })
27
27
 
28
- const res = await client.getQuota()
28
+ // Check your quota
29
+ const quota = await client.getQuota()
30
+ if (quota.success) {
31
+ console.log(`Available quota: ${quota.data.quota} units`)
32
+ }
29
33
 
30
- if (res.success) {
31
- // Will output { quota: 123 } if the quota you have left is 123
32
- console.log(res.data)
34
+ // Analyze a package
35
+ const result = await client.getScoreByNpmPackage('express', '4.18.0')
36
+ if (result.success) {
37
+ console.log(`Security Score: ${result.data.score}/100`)
33
38
  }
39
+
40
+ // Batch analyze multiple packages
41
+ const batchResult = await client.batchPackageFetch({
42
+ components: [
43
+ { purl: 'pkg:npm/express@4.18.0' },
44
+ { purl: 'pkg:npm/react@18.0.0' }
45
+ ]
46
+ })
34
47
  ```
35
48
 
36
- ### Configuration Options
49
+ **[→ Configuration Options](./docs/API.md#configuration)**
37
50
 
38
- The SDK constructor accepts the following options:
51
+ ## API Methods
39
52
 
40
- ```typescript
41
- interface SocketSdkOptions {
42
- baseUrl?: string // API base URL (default: 'https://api.socket.dev/v0/')
43
- timeout?: number // Request timeout in milliseconds
44
- retries?: number // Number of retry attempts for failed requests (default: 3)
45
- retryDelay?: number // Initial retry delay in ms, with exponential backoff (default: 1000)
46
- userAgent?: string // Custom user agent string
47
- agent?: Agent // Custom HTTP agent for advanced networking
48
- }
49
- ```
53
+ <details>
54
+ <summary><strong>Package Analysis</strong> - Quick security checks</summary>
50
55
 
51
- **Retry Logic:**
52
- - Automatically retries transient network errors and 5xx server responses
53
- - Uses exponential backoff: 1s, 2s, 4s, 8s... (configurable via `retryDelay`)
54
- - Does NOT retry 401/403 authentication errors (immediate failure)
55
- - Set `retries: 0` to disable retry logic entirely
56
-
57
- ### Quota Management Example
58
-
59
- ```javascript
60
- import {
61
- SocketSdk,
62
- getQuotaCost,
63
- calculateTotalQuotaCost,
64
- hasQuotaForMethods
65
- } from '@socketsecurity/sdk'
66
-
67
- const client = new SocketSdk('your-api-key')
68
-
69
- // Check quota cost before making API calls
70
- const batchCost = getQuotaCost('batchPackageFetch') // Returns: 100
71
- const analyticsCost = getQuotaCost('getOrgAnalytics') // Returns: 10
72
-
73
- // Calculate total cost for multiple operations
74
- const operations = ['batchPackageFetch', 'getOrgAnalytics', 'uploadManifestFiles']
75
- const totalCost = calculateTotalQuotaCost(operations) // Returns: 210
76
-
77
- // Check if you have sufficient quota
78
- const quotaRes = await client.getQuota()
79
- if (quotaRes.success && hasQuotaForMethods(quotaRes.data.quota, operations)) {
80
- // Proceed with API calls
81
- console.log(`Sufficient quota available: ${quotaRes.data.quota} units`)
82
- } else {
83
- console.log('Insufficient quota - consider using free alternatives')
84
- }
85
- ```
56
+ `batchPackageFetch()` • `batchPackageStream()` • `getIssuesByNpmPackage()` • `getScoreByNpmPackage()`
86
57
 
87
- ### CommonJS
58
+ [→ Documentation](./docs/API.md#package-analysis)
59
+ </details>
88
60
 
89
- ```javascript
90
- const { SocketSdk } = require('@socketsecurity/sdk')
91
- ```
61
+ <details>
62
+ <summary><strong>Scanning & Analysis</strong> - Project scanning</summary>
92
63
 
93
- ## API Overview
94
-
95
- The Socket SDK provides programmatic access to Socket.dev's security analysis platform through 60+ API methods organized into functional categories:
96
-
97
- ### Package Analysis
98
- - **Package Security**: Get vulnerability reports, security scores, and issue details for npm packages
99
- - **Batch Processing**: Analyze multiple packages efficiently with streaming and concurrent processing
100
- - **PURL Support**: Process Package URLs for comprehensive package identification
101
-
102
- ### Organization Management
103
- - **Organizations**: List, manage, and configure organization settings
104
- - **Repositories**: Create, update, and delete organization repositories
105
- - **Labels**: Manage repository categorization and tagging systems
106
-
107
- ### Security Scanning & Analysis
108
- - **Full Scans**: Create comprehensive security scans from manifest files
109
- - **Diff Scans**: Compare scans to identify changes and new vulnerabilities
110
- - **Dependencies**: Upload and analyze project dependency files
111
- - **Reports**: Generate, retrieve, and manage detailed security reports
112
-
113
- ### Policy & Compliance
114
- - **Security Policies**: Configure and update organization security policies
115
- - **License Policies**: Manage allowed/restricted license types
116
- - **Alert Triage**: Review and manage security alert statuses
117
- - **Audit Logs**: Access chronological security and administrative events
118
-
119
- ### Data Export & Integration
120
- - **SBOM Export**: Generate CycloneDX and SPDX Software Bill of Materials
121
- - **Streaming**: Efficient data streaming for large datasets
122
- - **Analytics**: Access usage metrics and security trend data
123
-
124
- ### Authentication & Access
125
- - **API Tokens**: Create, rotate, update, and revoke organization API tokens
126
- - **Entitlements**: View enabled Socket products and features
127
- - **Quota Management**: Monitor API usage limits, quotas, and plan method calls
128
- - **Quota Utilities**: Pre-calculate costs, check permissions, and optimize API usage
129
-
130
- ### Advanced Features
131
- - **Patches**: View and stream security patches for vulnerabilities
132
- - **Custom Queries**: Raw API access with configurable response handling
133
- - **Cross-platform**: Full Windows, macOS, and Linux compatibility
134
-
135
- ## SocketSdk Methods
136
-
137
- ### Package Analysis Methods
138
-
139
- * `batchPackageFetch(componentsObj, queryParams?)` - Analyze multiple packages in batch
140
- * Returns all results at once after processing is complete
141
- * `batchPackageStream(componentsObj, options?)` - Stream package analysis with concurrency control
142
- * Returns results as they become available via async generator
143
- * `getIssuesByNpmPackage(packageName, version)` - Get security issues for a specific npm package
144
- * Returns detailed vulnerability and security alert information
145
- * `getScoreByNpmPackage(packageName, version)` - Get security score for a package
146
- * Returns numerical security rating and scoring breakdown
147
-
148
- ### Scanning & Analysis Methods
149
-
150
- * `createDependenciesSnapshot(filepaths, pathsRelativeTo='.', queryParams?)` - Create dependency snapshot
151
- * Analyzes dependency files to generate comprehensive security report
152
- * `createOrgFullScan(orgSlug, filepaths, pathsRelativeTo='.', queryParams?)` - Create full organization scan
153
- * Uploads project files and initiates complete security analysis
154
- * `createScanFromFilepaths(filePaths, pathsRelativeTo='.', issueRules?)` - Create security scan from files
155
- * Analyzes uploaded files for security vulnerabilities and policy violations
156
- * `getScan(id)` - Get detailed scan results
157
- * Returns complete scan analysis including vulnerabilities and alerts
158
- * `getScanList()` - List all accessible scans
159
- * Returns paginated list of scan metadata and status
160
- * `getSupportedScanFiles()` - Get supported file formats
161
- * Returns supported manifest files, lockfiles, and configuration formats
162
-
163
- ### Organization Management Methods
164
-
165
- * `createOrgRepo(orgSlug, queryParams?)` - Create new repository
166
- * Registers repository for monitoring and security scanning
167
- * `deleteOrgRepo(orgSlug, repoSlug)` - Delete repository
168
- * Removes repository monitoring and associated scan data
169
- * `getOrganizations()` - List accessible organizations
170
- * Returns organization details and access permissions
171
- * `getOrgRepo(orgSlug, repoSlug)` - Get repository details
172
- * Returns repository configuration, monitoring status, and metadata
173
- * `getOrgRepoList(orgSlug, queryParams?)` - List organization repositories
174
- * Returns paginated list of repository metadata and status
175
- * `updateOrgRepo(orgSlug, repoSlug, queryParams?)` - Update repository configuration
176
- * Modifies monitoring settings, branch configuration, and scan preferences
177
-
178
- ### Full Scan Management Methods
179
-
180
- * `deleteOrgFullScan(orgSlug, fullScanId)` - Delete full scan
181
- * Permanently removes scan data and results
182
- * `getOrgFullScanBuffered(orgSlug, fullScanId)` - Get complete scan results in memory
183
- * Returns entire scan data as JSON for programmatic processing
184
- * `getOrgFullScanList(orgSlug, queryParams?)` - List organization full scans
185
- * Returns paginated list of scan metadata and status
186
- * `getOrgFullScanMetadata(orgSlug, fullScanId)` - Get scan metadata
187
- * Returns scan configuration, status, and summary information
188
- * `streamOrgFullScan(orgSlug, fullScanId, output?)` - Stream scan results
189
- * Provides efficient streaming for large scan datasets to file or stdout
190
-
191
- ### Policy & Settings Methods
192
-
193
- * `getOrgLicensePolicy(orgSlug)` - Get license policy configuration
194
- * Returns allowed, restricted, and monitored license types
195
- * `getOrgSecurityPolicy(orgSlug)` - Get organization security policy
196
- * Returns alert rules, severity thresholds, and enforcement settings
197
- * `postSettings(selectors)` - Update user or organization settings
198
- * Configures preferences, notifications, and security policies
199
- * `updateOrgLicensePolicy(orgSlug, policyData, queryParams?)` - Update license policy
200
- * Modifies allowed, restricted, and monitored license types
201
- * `updateOrgSecurityPolicy(orgSlug, policyData)` - Update security policy
202
- * Modifies alert rules, severity thresholds, and enforcement settings
203
-
204
- ### Analytics & Monitoring Methods
205
-
206
- * `getAuditLogEvents(orgSlug, queryParams?)` - Get audit log events
207
- * Returns chronological log of security and administrative actions
208
- * `getOrgAnalytics(time)` - Get organization analytics
209
- * Returns statistical analysis for specified time period
210
- * `getQuota()` - Get current API quota usage
211
- * Returns remaining requests, rate limits, and quota reset times
212
-
213
- ### Quota Utility Functions
214
- * `getQuotaCost(methodName)` - Get quota cost for any SDK method
215
- * `getRequiredPermissions(methodName)` - Get required permissions for SDK method
216
- * `calculateTotalQuotaCost(methodNames[])` - Calculate total cost for multiple methods
217
- * `hasQuotaForMethods(availableQuota, methodNames[])` - Check if quota is sufficient
218
- * `getMethodsByQuotaCost(cost)` - Find methods by quota cost (0, 10, 100 units)
219
- * `getMethodsByPermissions(permissions[])` - Find methods requiring specific permissions
220
- * `getQuotaUsageSummary()` - Get summary of all methods grouped by quota cost
221
- * `getAllMethodRequirements()` - Get complete mapping of methods to costs and permissions
222
- * `getRepoAnalytics(repo, time)` - Get repository analytics
223
- * Returns security metrics, dependency trends, and vulnerability statistics
224
-
225
- ### Authentication & Access Methods
226
-
227
- * `getAPITokens(orgSlug)` - List organization API tokens
228
- * Returns organization API tokens with metadata and permissions
229
- * `postAPIToken(orgSlug, tokenData)` - Create new API token
230
- * Generates API token with specified scopes and metadata
231
- * `postAPITokensRevoke(orgSlug, tokenId)` - Revoke API token
232
- * Permanently disables the token and removes access
233
- * `postAPITokensRotate(orgSlug, tokenId)` - Rotate API token
234
- * Generates new token value while preserving token metadata
235
- * `postAPITokenUpdate(orgSlug, tokenId, updateData)` - Update API token
236
- * Modifies token metadata, scopes, or other properties
237
-
238
- ### Export & Integration Methods
239
-
240
- * `exportCDX(orgSlug, fullScanId)` - Export CycloneDX SBOM
241
- * Returns Software Bill of Materials compliant with CycloneDX standard
242
- * `exportSPDX(orgSlug, fullScanId)` - Export SPDX SBOM
243
- * Returns Software Bill of Materials compliant with SPDX standard
244
- * `searchDependencies(queryParams?)` - Search monitored dependencies
245
- * Returns matching packages with security information and usage patterns
246
- * `uploadManifestFiles(orgSlug, filepaths, pathsRelativeTo='.')` - Upload manifest files
247
- * Processes package files to create dependency snapshots and security analysis
248
-
249
- ### Alert & Triage Methods
250
-
251
- * `getOrgTriage(orgSlug)` - Get organization triage settings
252
- * Returns alert triage configuration and current state
253
- * `updateOrgAlertTriage(orgSlug, alertId, triageData)` - Update alert triage
254
- * Modifies alert resolution status and triage decisions
255
-
256
- ### Repository Label Methods
257
-
258
- * `createOrgRepoLabel(orgSlug, repoSlug, labelData)` - Create repository label
259
- * Adds label for repository categorization and management
260
- * `deleteOrgRepoLabel(orgSlug, repoSlug, labelSlug)` - Delete repository label
261
- * Removes label and associated configuration
262
- * `getOrgRepoLabel(orgSlug, repoSlug, labelSlug)` - Get label details
263
- * Returns label configuration and metadata
264
- * `getOrgRepoLabelList(orgSlug, repoSlug)` - List repository labels
265
- * Returns all labels configured for repository management
266
- * `updateOrgRepoLabel(orgSlug, repoSlug, labelSlug, labelData)` - Update repository label
267
- * Modifies label properties and configuration
268
-
269
- ### Diff Scan Methods
270
-
271
- * `createOrgDiffScanFromIds(orgSlug, queryParams?)` - Create diff scan from IDs
272
- * Compares two existing full scans to identify changes
273
- * `deleteOrgDiffScan(orgSlug, diffScanId)` - Delete diff scan
274
- * Permanently removes diff scan data and results
275
- * `getDiffScanById(orgSlug, diffScanId)` - Get diff scan details
276
- * Returns comparison between two full scans with artifact changes
277
- * `listOrgDiffScans(orgSlug)` - List organization diff scans
278
- * Returns paginated list of diff scan metadata and status
279
-
280
- ### Patch & Vulnerability Methods
281
-
282
- * `streamPatchesFromScan(orgSlug, scanId)` - Stream patches from scan
283
- * Returns ReadableStream for processing large patch datasets
284
- * `viewPatch(orgSlug, uuid)` - View patch details
285
- * Retrieves comprehensive patch information including files and vulnerabilities
286
-
287
- ### Entitlement Methods
288
-
289
- * `getEnabledEntitlements(orgSlug)` - Get enabled entitlements
290
- * Returns array of enabled Socket product keys
291
- * `getEntitlements(orgSlug)` - Get all organization entitlements
292
- * Returns complete list of entitlements with their status
293
-
294
- ### Advanced Query Methods
295
-
296
- * `getApi<T>(urlPath, options?)` - Execute raw GET request
297
- * Direct API access with configurable response type (response, json, text)
298
- * `sendApi<T>(urlPath, options?)` - Send POST/PUT with JSON body
299
- * Direct API access for POST/PUT operations with JSON responses
300
-
301
- ### Legacy Methods (Deprecated Names)
302
-
303
- * `createReportFromFilepaths()` → Use `createScanFromFilepaths()`
304
- * `deleteReport(reportId)` → Use scan-specific delete methods
305
- * `getReport(id)` → Use `getScan(id)`
306
- * `getReportList()` → Use `getScanList()`
307
- * `getReportSupportedFiles()` → Use `getSupportedScanFiles()`
308
-
309
- ## Additional exports
310
-
311
- * `createUserAgentFromPkgJson(pkgJson)`
312
- * `pkgJson`: The content of the `package.json` you want to create a `User-Agent` string for
313
-
314
- ## Advanced
315
-
316
- ### Specifying custom user agent
317
-
318
- The `SocketSdk` constructor accepts an `options` object as its second argument and there a `userAgent` key with a string value can be specified. If specified then that user agent will be prepended to the SDK user agent. See this example:
319
-
320
- ```js
321
- const client = new SocketSdk('yourApiKeyHere', {
322
- userAgent: 'example/1.2.3 (http://example.com/)'
323
- })
324
- ```
64
+ `createDependenciesSnapshot()` `createOrgFullScan()` • `createScanFromFilepaths()` • `getScan()` • `getScanList()` • `getSupportedScanFiles()`
325
65
 
326
- Which results in the [HTTP `User-Agent` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent):
66
+ [ Documentation](./docs/API.md#scanning--analysis)
67
+ </details>
327
68
 
328
- ```
329
- User-Agent: example/1.2.3 (http://example.com/) socketsecurity-sdk/0.5.2 (https://github.com/SocketDev/socket-sdk-js)
330
- ```
69
+ <details>
70
+ <summary><strong>Organization Management</strong> - Orgs and repos</summary>
331
71
 
332
- To easily create a user agent for your code you can use the additional export `createUserAgentFromPkgJson()` like this, assuming `pkgJson` contains your parsed `package.json`:
72
+ `getOrganizations()` `createOrgRepo()` `getOrgRepo()` `getOrgRepoList()` `updateOrgRepo()` `deleteOrgRepo()`
333
73
 
334
- ```js
335
- const client = new SocketSdk('yourApiKeyHere', {
336
- userAgent: createUserAgentFromPkgJson(pkgJson)
337
- })
338
- ```
74
+ [→ Documentation](./docs/API.md#organization-management)
75
+ </details>
76
+
77
+ <details>
78
+ <summary><strong>Policy & Settings</strong> - Security configuration</summary>
79
+
80
+ `getOrgSecurityPolicy()` • `updateOrgSecurityPolicy()` • `getOrgLicensePolicy()` • `updateOrgLicensePolicy()` • `postSettings()`
81
+
82
+ [→ Documentation](./docs/API.md#policy--settings)
83
+ </details>
84
+
85
+ <details>
86
+ <summary><strong>Full Scan Management</strong> - Deep analysis</summary>
87
+
88
+ `getOrgFullScanList()` • `getOrgFullScanMetadata()` • `getOrgFullScanBuffered()` • `streamOrgFullScan()` • `deleteOrgFullScan()`
89
+
90
+ [→ Documentation](./docs/API.md#full-scan-management)
91
+ </details>
92
+
93
+ <details>
94
+ <summary><strong>Diff Scans</strong> - Compare scans</summary>
95
+
96
+ `createOrgDiffScanFromIds()` • `getDiffScanById()` • `listOrgDiffScans()` • `deleteOrgDiffScan()`
97
+
98
+ [→ Documentation](./docs/API.md#diff-scans)
99
+ </details>
100
+
101
+ <details>
102
+ <summary><strong>Patches & Vulnerabilities</strong> - Security fixes</summary>
103
+
104
+ `streamPatchesFromScan()` • `viewPatch()`
105
+
106
+ [→ Documentation](./docs/API.md#patches--vulnerabilities)
107
+ </details>
108
+
109
+ <details>
110
+ <summary><strong>Alert & Triage</strong> - Alert management</summary>
111
+
112
+ `getOrgTriage()` • `updateOrgAlertTriage()`
113
+
114
+ [→ Documentation](./docs/API.md#alert--triage)
115
+ </details>
116
+
117
+ <details>
118
+ <summary><strong>Export & Integration</strong> - SBOM export</summary>
119
+
120
+ `exportCDX()` • `exportSPDX()` • `searchDependencies()` • `uploadManifestFiles()`
121
+
122
+ [→ Documentation](./docs/API.md#export--integration)
123
+ </details>
124
+
125
+ <details>
126
+ <summary><strong>Repository Labels</strong> - Categorization</summary>
127
+
128
+ `createOrgRepoLabel()` • `getOrgRepoLabel()` • `getOrgRepoLabelList()` • `updateOrgRepoLabel()` • `deleteOrgRepoLabel()`
129
+
130
+ [→ Documentation](./docs/API.md#repository-labels)
131
+ </details>
132
+
133
+ <details>
134
+ <summary><strong>Analytics & Monitoring</strong> - Usage metrics</summary>
135
+
136
+ `getQuota()` • `getOrgAnalytics()` • `getRepoAnalytics()` • `getAuditLogEvents()`
137
+
138
+ [→ Documentation](./docs/API.md#analytics--monitoring)
139
+ </details>
140
+
141
+ <details>
142
+ <summary><strong>Authentication & Access</strong> - API tokens</summary>
143
+
144
+ `getAPITokens()` • `postAPIToken()` • `postAPITokensRotate()` • `postAPITokensRevoke()` • `postAPITokenUpdate()`
145
+
146
+ [→ Documentation](./docs/API.md#authentication--access)
147
+ </details>
148
+
149
+ <details>
150
+ <summary><strong>Entitlements</strong> - Feature access</summary>
151
+
152
+ `getEnabledEntitlements()` • `getEntitlements()`
153
+
154
+ [→ Documentation](./docs/API.md#entitlements)
155
+ </details>
156
+
157
+ <details>
158
+ <summary><strong>Quota Utilities</strong> - Cost helpers</summary>
159
+
160
+ `getQuotaCost()` • `getRequiredPermissions()` • `calculateTotalQuotaCost()` • `hasQuotaForMethods()` • `getMethodsByQuotaCost()` • `getMethodsByPermissions()` • `getQuotaUsageSummary()` • `getAllMethodRequirements()`
161
+
162
+ [→ Documentation](./docs/QUOTA.md)
163
+ </details>
164
+
165
+ <details>
166
+ <summary><strong>Advanced Query Methods</strong> - Raw API</summary>
167
+
168
+ `getApi()` • `sendApi()`
169
+
170
+ [→ Documentation](./docs/API.md#advanced-query-methods)
171
+ </details>
172
+
173
+ **[→ Complete API Reference](./docs/API.md)**
174
+
175
+ **[→ Usage Examples](./docs/EXAMPLES.md)**
176
+
177
+ **[→ Quota Management](./docs/QUOTA.md)** - Cost tiers: 0 units (free), 10 units (standard), 100 units (batch/uploads)
178
+
179
+ **[→ Testing Utilities](./docs/TESTING.md)** - Mock factories, fixtures, and type guards for SDK testing
180
+
181
+ ## See Also
339
182
 
340
- Specifying a custom user agent is good practice when shipping a piece of code that others can use to make requests. Eg. [our CLI](https://github.com/SocketDev/socket-cli-js) uses this option to identify requests coming from it + mentioning which version of it that is used.
183
+ - [Socket.dev API Reference](https://docs.socket.dev/reference) - Official API documentation
184
+ - [Socket CLI](https://github.com/SocketDev/socket-cli) - Command-line interface
185
+ - [Socket GitHub App](https://github.com/apps/socket-security) - GitHub integration
341
186
 
342
- ## See also
187
+ ## License
343
188
 
344
- * [Socket API Reference](https://docs.socket.dev/reference)
345
- * [Socket.dev](https://socket.dev/)
346
- * [Socket GitHub App](https://github.com/apps/socket-security)
347
- * [Socket CLI](https://github.com/SocketDev/socket-cli-js)
189
+ MIT