@socketsecurity/sdk 3.1.2 → 3.2.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 +39 -3
- package/README.md +5 -129
- package/dist/constants.d.ts +3 -0
- package/dist/file-upload.d.ts +7 -8
- package/dist/http-client.d.ts +12 -8
- package/dist/index.d.ts +3 -3
- package/dist/index.js +901 -21025
- package/dist/socket-sdk-class.d.ts +237 -1
- package/dist/testing.js +0 -1
- package/dist/types.d.ts +61 -2
- package/dist/utils.d.ts +61 -0
- package/package.json +12 -7
- package/types/api.d.ts +2089 -267
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@ 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.2.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v3.2.0) - 2025-12-08
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- New API methods:
|
|
12
|
+
- `getOrgTelemetryConfig()` - Get organization telemetry configuration
|
|
13
|
+
- `updateOrgTelemetryConfig()` - Update organization telemetry configuration
|
|
14
|
+
- `getOrgWebhooksList()` - List organization webhooks
|
|
15
|
+
- `createOrgWebhook()` - Create organization webhook
|
|
16
|
+
- `getOrgWebhook()` - Get organization webhook details
|
|
17
|
+
- `updateOrgWebhook()` - Update organization webhook
|
|
18
|
+
- `deleteOrgWebhook()` - Delete organization webhook
|
|
19
|
+
- `getOrgAlertsList()` - List organization alerts
|
|
20
|
+
- `getOrgFixes()` - Get available vulnerability fixes for repositories or scans
|
|
21
|
+
- `createOrgFullScanFromArchive()` - Create full scan from archive file (.tar, .tar.gz/.tgz, or .zip)
|
|
22
|
+
- `downloadOrgFullScanFilesAsTar()` - Download full scan files as tarball to local filesystem
|
|
23
|
+
- Per-endpoint TTL configuration: `cacheTtl` option accepts object with endpoint-specific TTL values (e.g., `{ default: 300_000, getIssues: 600_000 }`)
|
|
24
|
+
- Request/response logging: `hooks` option with `onRequest(info)` and `onResponse(info)` callbacks for debugging and monitoring
|
|
25
|
+
- PURL batch processing: `cachedResultsOnly` query parameter (return only cached results, skip new scans) and `summary` query parameter (include summary with counts of malformed, resolved, and not found PURLs) in `batchPackageFetch()` and `batchPackageStream()`
|
|
26
|
+
- UTF-8 filename support: `uploadManifestFiles()`, `createFullScan()`, `createDependenciesSnapshot()`, and `createOrgFullScanFromArchive()` automatically handle international filenames (Japanese, Cyrillic, emoji, and other UTF-8 characters)
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Updated `@socketsecurity/lib` to v5.0.0
|
|
31
|
+
- Synced with OpenAPI definition
|
|
32
|
+
|
|
33
|
+
## [3.1.3](https://github.com/SocketDev/socket-sdk-js/releases/tag/v3.1.3) - 2025-11-04
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Updated OpenAPI type generation script to automatically preserve SDK v3 method name aliases during automated syncs
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- Updated `@socketsecurity/lib` to v3.2.4
|
|
42
|
+
|
|
7
43
|
## [3.1.2](https://github.com/SocketDev/socket-sdk-js/releases/tag/v3.1.2) - 2025-11-02
|
|
8
44
|
|
|
9
45
|
### Fixed
|
|
@@ -445,9 +481,9 @@ To migrate from v1.x to v2.0:
|
|
|
445
481
|
|
|
446
482
|
### Changed
|
|
447
483
|
- Synced with OpenAPI definition
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
484
|
+
- Added new `/openapi.json` endpoint for retrieving API specification in JSON format
|
|
485
|
+
- Updated repo label filter descriptions to document empty string ("") usage for repositories with no labels
|
|
486
|
+
- Added 'dual' threat category type
|
|
451
487
|
|
|
452
488
|
## [1.8.4](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.4) - 2025-10-01
|
|
453
489
|
|
package/README.md
CHANGED
|
@@ -2,42 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://socket.dev/npm/package/@socketsecurity/sdk)
|
|
4
4
|
[](https://github.com/SocketDev/socket-sdk-js/actions/workflows/ci.yml)
|
|
5
|
+

|
|
5
6
|
|
|
6
7
|
[](https://twitter.com/SocketSecurity)
|
|
7
8
|
[](https://bsky.app/profile/socket.dev)
|
|
8
9
|
|
|
9
|
-
JavaScript SDK for [Socket.dev](https://socket.dev/) API
|
|
10
|
+
JavaScript SDK for [Socket.dev](https://socket.dev/) API.
|
|
10
11
|
|
|
11
|
-
##
|
|
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
|
|
33
13
|
|
|
34
14
|
```bash
|
|
35
15
|
pnpm add @socketsecurity/sdk
|
|
36
16
|
```
|
|
37
17
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Quick Start
|
|
18
|
+
## Usage
|
|
41
19
|
|
|
42
20
|
```typescript
|
|
43
21
|
import { SocketSdk } from '@socketsecurity/sdk'
|
|
@@ -69,107 +47,13 @@ const batchResult = await client.batchPackageFetch({
|
|
|
69
47
|
})
|
|
70
48
|
```
|
|
71
49
|
|
|
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
|
-
|
|
166
50
|
## Documentation
|
|
167
51
|
|
|
168
52
|
| Guide | Description |
|
|
169
53
|
|-------|-------------|
|
|
54
|
+
| **[Getting Started](./docs/getting-started.md)** | Quick start for contributors (5 min setup) |
|
|
170
55
|
| **[API Reference](./docs/api-reference.md)** | Complete API method documentation |
|
|
171
56
|
| **[Usage Examples](./docs/usage-examples.md)** | Real-world patterns and code samples |
|
|
172
|
-
| **[Getting Started](./docs/getting-started.md)** | Development setup and workflow |
|
|
173
57
|
| **[Quota Management](./docs/quota-management.md)** | Cost tiers (0/10/100) and utilities |
|
|
174
58
|
| **[Testing Guide](./docs/dev/testing.md)** | Test helpers, fixtures, and patterns |
|
|
175
59
|
| **[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
|
|
|
183
67
|
- Policy management
|
|
184
68
|
- Quota planning
|
|
185
69
|
|
|
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
|
-
|
|
194
70
|
## License
|
|
195
71
|
|
|
196
72
|
MIT
|
package/dist/constants.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ export declare const DEFAULT_USER_AGENT: string;
|
|
|
4
4
|
export declare const DEFAULT_HTTP_TIMEOUT = 30000;
|
|
5
5
|
export declare const DEFAULT_RETRIES = 3;
|
|
6
6
|
export declare const DEFAULT_RETRY_DELAY = 1000;
|
|
7
|
+
export declare const DEFAULT_CACHE_TTL: number;
|
|
8
|
+
export declare const RECOMMENDED_CACHE_TTL_ORGANIZATIONS: number;
|
|
9
|
+
export declare const RECOMMENDED_CACHE_TTL_QUOTA: number;
|
|
7
10
|
export declare const MAX_HTTP_TIMEOUT: number;
|
|
8
11
|
export declare const MIN_HTTP_TIMEOUT = 5000;
|
|
9
12
|
export declare const MAX_RESPONSE_SIZE: number;
|
package/dist/file-upload.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type { ReadStream } from 'node:fs';
|
|
1
|
+
import FormData from 'form-data';
|
|
2
|
+
import type { RequestOptionsWithHooks } from './types';
|
|
4
3
|
import type { IncomingMessage } from 'node:http';
|
|
5
4
|
/**
|
|
6
5
|
* Create multipart form-data body parts for file uploads.
|
|
@@ -8,16 +7,16 @@ import type { IncomingMessage } from 'node:http';
|
|
|
8
7
|
*
|
|
9
8
|
* @throws {Error} When file cannot be read (ENOENT, EACCES, EISDIR, etc.)
|
|
10
9
|
*/
|
|
11
|
-
export declare function createRequestBodyForFilepaths(filepaths: string[], basePath: string):
|
|
10
|
+
export declare function createRequestBodyForFilepaths(filepaths: string[], basePath: string): FormData;
|
|
12
11
|
/**
|
|
13
12
|
* Create multipart form-data body part for JSON data.
|
|
14
13
|
* Converts JSON object to readable stream with appropriate headers.
|
|
15
14
|
*/
|
|
16
|
-
export declare function createRequestBodyForJson(jsonData: unknown, basename?: string):
|
|
15
|
+
export declare function createRequestBodyForJson(jsonData: unknown, basename?: string): FormData;
|
|
17
16
|
/**
|
|
18
|
-
* Create and execute a multipart/form-data upload request.
|
|
19
|
-
* Streams large files efficiently with backpressure handling and early server validation.
|
|
17
|
+
* Create and execute a multipart/form-data upload request using form-data library.
|
|
18
|
+
* Streams large files efficiently with automatic backpressure handling and early server validation.
|
|
20
19
|
*
|
|
21
20
|
* @throws {Error} When network errors occur or stream processing fails
|
|
22
21
|
*/
|
|
23
|
-
export declare function createUploadRequest(baseUrl: string, urlPath: string,
|
|
22
|
+
export declare function createUploadRequest(baseUrl: string, urlPath: string, form: FormData, options?: RequestOptionsWithHooks | undefined): Promise<IncomingMessage>;
|
package/dist/http-client.d.ts
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import http from 'node:http';
|
|
6
6
|
import https from 'node:https';
|
|
7
|
-
import type {
|
|
7
|
+
import type { RequestOptionsWithHooks, SendMethod } from './types';
|
|
8
|
+
import type { JsonValue } from '@socketsecurity/lib/json/types';
|
|
8
9
|
import type { ClientRequest, IncomingMessage } from 'node:http';
|
|
10
|
+
/**
|
|
11
|
+
* Array of sensitive header names that should be redacted in logs
|
|
12
|
+
*/
|
|
9
13
|
/**
|
|
10
14
|
* HTTP response error for Socket API requests.
|
|
11
15
|
* Extends Error with response details for debugging failed API calls.
|
|
@@ -24,7 +28,7 @@ export declare class ResponseError extends Error {
|
|
|
24
28
|
*
|
|
25
29
|
* @throws {Error} When network or timeout errors occur
|
|
26
30
|
*/
|
|
27
|
-
export declare function createDeleteRequest(baseUrl: string, urlPath: string, options
|
|
31
|
+
export declare function createDeleteRequest(baseUrl: string, urlPath: string, options?: RequestOptionsWithHooks | undefined): Promise<IncomingMessage>;
|
|
28
32
|
/**
|
|
29
33
|
* Create and execute an HTTP GET request.
|
|
30
34
|
* Returns the response stream for further processing.
|
|
@@ -32,7 +36,7 @@ export declare function createDeleteRequest(baseUrl: string, urlPath: string, op
|
|
|
32
36
|
*
|
|
33
37
|
* @throws {Error} When network or timeout errors occur
|
|
34
38
|
*/
|
|
35
|
-
export declare function createGetRequest(baseUrl: string, urlPath: string, options
|
|
39
|
+
export declare function createGetRequest(baseUrl: string, urlPath: string, options?: RequestOptionsWithHooks | undefined): Promise<IncomingMessage>;
|
|
36
40
|
/**
|
|
37
41
|
* Create and execute an HTTP request with JSON payload.
|
|
38
42
|
* Automatically sets appropriate content headers and serializes the body.
|
|
@@ -40,7 +44,7 @@ export declare function createGetRequest(baseUrl: string, urlPath: string, optio
|
|
|
40
44
|
*
|
|
41
45
|
* @throws {Error} When network or timeout errors occur
|
|
42
46
|
*/
|
|
43
|
-
export declare function createRequestWithJson(method: SendMethod, baseUrl: string, urlPath: string, json: unknown, options
|
|
47
|
+
export declare function createRequestWithJson(method: SendMethod, baseUrl: string, urlPath: string, json: unknown, options?: RequestOptionsWithHooks | undefined): Promise<IncomingMessage>;
|
|
44
48
|
/**
|
|
45
49
|
* Read the response body from an HTTP error response.
|
|
46
50
|
* Accumulates all chunks into a complete string for error handling.
|
|
@@ -70,7 +74,7 @@ export declare function getResponse(req: ClientRequest): Promise<IncomingMessage
|
|
|
70
74
|
* @throws {ResponseError} When response has non-2xx status code
|
|
71
75
|
* @throws {SyntaxError} When response body contains invalid JSON
|
|
72
76
|
*/
|
|
73
|
-
export declare function getResponseJson(response: IncomingMessage, method?: string | undefined): Promise<
|
|
77
|
+
export declare function getResponseJson(response: IncomingMessage, method?: string | undefined): Promise<JsonValue | undefined>;
|
|
74
78
|
/**
|
|
75
79
|
* Check if HTTP response has a successful status code (2xx range).
|
|
76
80
|
* Returns true for status codes between 200-299, false otherwise.
|
|
@@ -99,7 +103,7 @@ export declare function withRetry<T>(fn: () => Promise<T>, retries?: number, ret
|
|
|
99
103
|
* @param retries - Number of retry attempts (default: 0, retries disabled)
|
|
100
104
|
* @param retryDelay - Initial delay in ms (default: 100)
|
|
101
105
|
*/
|
|
102
|
-
export declare function createGetRequestWithRetry(baseUrl: string, urlPath: string, options
|
|
106
|
+
export declare function createGetRequestWithRetry(baseUrl: string, urlPath: string, options?: RequestOptionsWithHooks | undefined, retries?: number, retryDelay?: number): Promise<IncomingMessage>;
|
|
103
107
|
/**
|
|
104
108
|
* Create DELETE request with automatic retry logic.
|
|
105
109
|
* Retries on network errors and 5xx responses.
|
|
@@ -107,7 +111,7 @@ export declare function createGetRequestWithRetry(baseUrl: string, urlPath: stri
|
|
|
107
111
|
* @param retries - Number of retry attempts (default: 0, retries disabled)
|
|
108
112
|
* @param retryDelay - Initial delay in ms (default: 100)
|
|
109
113
|
*/
|
|
110
|
-
export declare function createDeleteRequestWithRetry(baseUrl: string, urlPath: string, options
|
|
114
|
+
export declare function createDeleteRequestWithRetry(baseUrl: string, urlPath: string, options?: RequestOptionsWithHooks | undefined, retries?: number, retryDelay?: number): Promise<IncomingMessage>;
|
|
111
115
|
/**
|
|
112
116
|
* Create request with JSON payload and automatic retry logic.
|
|
113
117
|
* Retries on network errors and 5xx responses.
|
|
@@ -115,4 +119,4 @@ export declare function createDeleteRequestWithRetry(baseUrl: string, urlPath: s
|
|
|
115
119
|
* @param retries - Number of retry attempts (default: 0, retries disabled)
|
|
116
120
|
* @param retryDelay - Initial delay in ms (default: 100)
|
|
117
121
|
*/
|
|
118
|
-
export declare function createRequestWithJsonAndRetry(method: SendMethod, baseUrl: string, urlPath: string, json: unknown, options
|
|
122
|
+
export declare function createRequestWithJsonAndRetry(method: SendMethod, baseUrl: string, urlPath: string, json: unknown, options?: RequestOptionsWithHooks | undefined, retries?: number, retryDelay?: number): Promise<IncomingMessage>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Provides the SocketSdk class and utility functions for Socket security analysis API interactions.
|
|
4
4
|
*/
|
|
5
5
|
import { DEFAULT_USER_AGENT, httpAgentNames, publicPolicy } from './constants';
|
|
6
|
-
import { normalizeBaseUrl, promiseWithResolvers, queryToSearchParams, resolveAbsPaths, resolveBasePath } from './utils';
|
|
6
|
+
import { calculateWordSetSimilarity, filterRedundantCause, normalizeBaseUrl, promiseWithResolvers, queryToSearchParams, resolveAbsPaths, resolveBasePath, shouldOmitReason } from './utils';
|
|
7
7
|
export { createRequestBodyForFilepaths, createRequestBodyForJson, createUploadRequest, } from './file-upload';
|
|
8
8
|
export { createDeleteRequest, createGetRequest, createRequestWithJson, getErrorResponseBody, getHttpModule, getResponse, getResponseJson, isResponseOk, ResponseError, reshapeArtifactForPublicPolicy, } from './http-client';
|
|
9
9
|
export { calculateTotalQuotaCost, getAllMethodRequirements, getMethodRequirements, getMethodsByPermissions, getMethodsByQuotaCost, getQuotaCost, getQuotaUsageSummary, getRequiredPermissions, hasQuotaForMethods, } from './quota-utils';
|
|
10
10
|
export { SocketSdk } from './socket-sdk-class';
|
|
11
|
-
export type { ALERT_ACTION, ALERT_TYPE, Agent, ArtifactPatches, BatchPackageFetchResultType, BatchPackageStreamOptions, CompactSocketArtifact, CompactSocketArtifactAlert, CreateDependenciesSnapshotOptions, CreateOrgFullScanOptions, CreateScanFromFilepathsOptions, CustomResponseType, Entitlement, EntitlementsResponse, FileValidationCallback, FileValidationResult, GetOptions, GotOptions, HeadersRecord, PatchFile, PatchRecord, PatchViewResponse, QueryParams, RequestOptions, SecurityAlert, SendMethod, SendOptions, SocketArtifact, SocketArtifactAlert, SocketArtifactWithExtras, SocketId, SocketMetricSchema, SocketSdkArrayElement, SocketSdkData, SocketSdkErrorResult, SocketSdkGenericResult, SocketSdkOperations, SocketSdkOptions, SocketSdkResult, SocketSdkSuccessResult, StreamOrgFullScanOptions, UploadManifestFilesError, UploadManifestFilesOptions, UploadManifestFilesResponse, UploadManifestFilesReturnType, Vulnerability, } from './types';
|
|
11
|
+
export type { ALERT_ACTION, ALERT_TYPE, Agent, ArtifactPatches, BatchPackageFetchResultType, BatchPackageStreamOptions, CompactSocketArtifact, CompactSocketArtifactAlert, CreateDependenciesSnapshotOptions, CreateOrgFullScanOptions, CreateScanFromFilepathsOptions, CustomResponseType, Entitlement, EntitlementsResponse, FileValidationCallback, FileValidationResult, GetOptions, GotOptions, HeadersRecord, PatchFile, PatchRecord, PatchViewResponse, TelemetryConfig, PostOrgTelemetryPayload, PostOrgTelemetryResponse, QueryParams, RequestInfo, RequestOptions, RequestOptionsWithHooks, ResponseInfo, SecurityAlert, SendMethod, SendOptions, SocketArtifact, SocketArtifactAlert, SocketArtifactWithExtras, SocketId, SocketMetricSchema, SocketSdkArrayElement, SocketSdkData, SocketSdkErrorResult, SocketSdkGenericResult, SocketSdkOperations, SocketSdkOptions, SocketSdkResult, SocketSdkSuccessResult, StreamOrgFullScanOptions, UploadManifestFilesError, UploadManifestFilesOptions, UploadManifestFilesResponse, UploadManifestFilesReturnType, Vulnerability, } from './types';
|
|
12
12
|
export type { CreateFullScanOptions, DeleteRepositoryLabelResult, DeleteResult, FullScanItem, FullScanListData, FullScanListResult, FullScanResult, ListFullScansOptions, ListRepositoriesOptions, OrganizationItem, OrganizationsResult, RepositoriesListData, RepositoriesListResult, RepositoryItem, RepositoryLabelItem, RepositoryLabelResult, RepositoryLabelsListData, RepositoryLabelsListResult, RepositoryResult, StreamFullScanOptions, StrictErrorResult, StrictResult, } from './types-strict';
|
|
13
13
|
export { createUserAgentFromPkgJson } from './user-agent';
|
|
14
|
-
export { normalizeBaseUrl, promiseWithResolvers, queryToSearchParams, resolveAbsPaths, resolveBasePath, };
|
|
14
|
+
export { calculateWordSetSimilarity, filterRedundantCause, normalizeBaseUrl, promiseWithResolvers, queryToSearchParams, resolveAbsPaths, resolveBasePath, shouldOmitReason, };
|
|
15
15
|
export { DEFAULT_USER_AGENT, httpAgentNames, publicPolicy };
|