@socketsecurity/sdk 1.4.92 → 1.5.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 ADDED
@@ -0,0 +1,161 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
+
7
+ ## [1.5.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.5.0) - 2025-09-23
8
+
9
+ ### Added
10
+ - `getOrgFullScanBuffered` method for buffered full scan retrieval
11
+
12
+ ### Changed
13
+ - **BREAKING:** Renamed `getOrgFullScan` to `streamOrgFullScan` for clarity
14
+
15
+ ### Fixed
16
+ - Added missing `getResponseJson` call to `createScanFromFilepaths`
17
+ - Improved handling of empty response bodies
18
+
19
+ ## [1.4.93](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.93) - 2025-09-15
20
+
21
+ ### Fixed
22
+ - Fixed malformed part header issue for upload of manifest files
23
+
24
+ ## [1.4.91](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.91) - 2025-09-11
25
+
26
+ ### Changed
27
+ - Improved URL handling
28
+
29
+ ## [1.4.90](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.90) - 2025-09-11
30
+
31
+ ### Fixed
32
+ - Improved error handling
33
+
34
+ ## [1.4.84](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.84) - 2025-09-03
35
+
36
+ ### Added
37
+ - Filter alerts by action
38
+
39
+ ### Changed
40
+ - Improved JSON parsing
41
+
42
+ ## [1.4.82](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.82) - 2025-09-02
43
+
44
+ ### Changed
45
+ - Improved public policy handling
46
+
47
+ ## [1.4.81](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.81) - 2025-09-02
48
+
49
+ ### Added
50
+ - Add public security policy support
51
+
52
+ ## [1.4.79](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.79) - 2025-08-27
53
+
54
+ ### Fixed
55
+ - Fixed ESM module compatibility
56
+
57
+ ## [1.4.77](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.77) - 2025-08-25
58
+
59
+ ### Added
60
+ - Add timeout option for API requests
61
+
62
+ ## [1.4.73](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.73) - 2025-08-08
63
+
64
+ ### Fixed
65
+ - Fixed crates ecosystem support
66
+
67
+ ## [1.4.72](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.72) - 2025-08-08
68
+
69
+ ### Fixed
70
+ - Fixed rubygems ecosystem support
71
+
72
+ ## [1.4.71](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.71) - 2025-08-08
73
+
74
+ ### Added
75
+ - Support for crate and rubygem ecosystems
76
+
77
+ ## [1.4.68](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.68) - 2025-08-02
78
+
79
+ ### Changed
80
+ - Improved type definitions
81
+ - Memory usage optimizations
82
+
83
+ ## [1.4.66](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.66) - 2025-07-29
84
+
85
+ ### Fixed
86
+ - Fixed file upload timing issue
87
+ - Fixed multipart form data formatting
88
+
89
+ ## [1.4.64](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.64) - 2025-07-22
90
+
91
+ ### Changed
92
+ - Improved method signatures
93
+
94
+ ## [1.4.62](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.62) - 2025-07-21
95
+
96
+ ### Fixed
97
+ - Fixed query parameter handling for empty values
98
+
99
+ ## [1.4.61](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.61) - 2025-07-21
100
+
101
+ ### Changed
102
+ - Improved query parameter normalization
103
+
104
+ ## [1.4.60](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.60) - 2025-07-21
105
+
106
+ ### Changed
107
+ - Renamed result type for clarity
108
+
109
+ ## [1.4.59](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.59) - 2025-07-20
110
+
111
+ ### Added
112
+ - Add alias types for improved developer experience
113
+
114
+ ## [1.4.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.4.0) - 2025-05-01
115
+
116
+ ### Added
117
+ - Full scans feature support
118
+ - Audit log and repos features
119
+ - Organization security policy support (getOrgSecurityPolicy)
120
+
121
+ ### Changed
122
+ - Improved TypeScript type exports
123
+ - Enhanced ESM and CJS dual package support
124
+
125
+ ## [1.3.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.3.0) - 2025-03-01
126
+
127
+ ### Added
128
+ - Support for multiple ecosystem types
129
+ - Enhanced error handling and reporting
130
+
131
+ ### Changed
132
+ - Improved API client architecture
133
+ - Better TypeScript type definitions
134
+
135
+ ## [1.2.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.2.0) - 2025-01-15
136
+
137
+ ### Added
138
+ - File upload support for manifest files
139
+ - Request body creation for file paths
140
+
141
+ ### Changed
142
+ - Enhanced multipart form data handling
143
+ - Improved streaming support
144
+
145
+ ## [1.1.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.1.0) - 2024-11-01
146
+
147
+ ### Added
148
+ - Query parameter normalization
149
+ - Enhanced search parameter handling
150
+
151
+ ### Changed
152
+ - Improved URL parsing and handling
153
+ - Better error messages
154
+
155
+ ## [1.0.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.0.0) - 2024-09-01
156
+
157
+ ### Added
158
+ - Initial release of Socket SDK for JavaScript
159
+ - Full Socket API client implementation
160
+ - TypeScript support with comprehensive type definitions
161
+ - Dual ESM/CJS package support
package/README.md CHANGED
@@ -11,7 +11,7 @@ SDK for the Socket API client, generated by `api`.
11
11
  ## Usage
12
12
 
13
13
  ```bash
14
- npm install @socketsecurity/sdk
14
+ pnpm add @socketsecurity/sdk
15
15
  ```
16
16
 
17
17
  ### ESM / TypeScript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/sdk",
3
- "version": "1.4.92",
3
+ "version": "1.5.0",
4
4
  "license": "MIT",
5
5
  "description": "SDK for the Socket API client",
6
6
  "author": {
@@ -43,65 +43,25 @@
43
43
  "./types/api.d.ts": "./types/api.d.ts",
44
44
  "./package.json": "./package.json"
45
45
  },
46
- "scripts": {
47
- "build": "npm run clean && run-p -c --aggregate-output build:* && run-p -c --aggregate-output build:clean:*",
48
- "build:cjs": "dotenvx -q run -f .env.local -- tsc",
49
- "build:esm": "dotenvx -q run -f .env.local -- tsc -p tsconfig.esm.json",
50
- "build:clean:cjs": "dotenvx -q run -f .env.local -- node scripts/rename-dist-cjs-files.mjs",
51
- "build:clean:esm": "dotenvx -q run -f .env.local -- node scripts/rename-dist-esm-files.mjs",
52
- "check": "run-p -c --aggregate-output check:*",
53
- "check:lint": "dotenvx -q run -f .env.local -- eslint --report-unused-disable-directives .",
54
- "check:lint:fix": "npm run check:lint -- --fix",
55
- "check:tsc": "dotenvx -q run -f .env.local -- tsc",
56
- "coverage": "run-s coverage:*",
57
- "coverage:test": "run-s test:prepare test:unit:coverage",
58
- "coverage:type": "dotenvx -q run -f .env.local -- type-coverage --detail",
59
- "clean": "run-p -c --aggregate-output clean:*",
60
- "clean:dist": "del-cli 'dist'",
61
- "clean:declarations": "del-cli '*.d.ts' '!api*.d.ts'",
62
- "fix": "run-s lint:fix check:lint:fix",
63
- "generate-sdk": "run-s generate-sdk:*",
64
- "generate-sdk:01-prettify": "dotenvx -q run -f .env.local -- node scripts/prettify-base-json.mjs",
65
- "generate-sdk:02-generate": "dotenvx -q run -f .env.local -- node scripts/generate-types.mjs > types/api.d.ts",
66
- "generate-sdk:03-clean-api": "npm run fix && npm run fix",
67
- "knip:dependencies": "knip --dependencies",
68
- "knip:exports": "knip --include exports,duplicates",
69
- "lint": "dotenvx -q run -f .env.local -- oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json .",
70
- "lint:fix": "run-s -c lint:fix:*",
71
- "lint:fix:oxlint": "dotenvx -q run -f .env.local -- oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --quiet --fix . | dev-null",
72
- "lint:fix:biome": "dotenvx -q run -f .env.local -- biome format --log-level=none --fix . | dev-null",
73
- "lint:fix:eslint": "dotenvx -q run -f .env.local -- eslint --report-unused-disable-directives --fix . | dev-null",
74
- "lint-staged": "dotenvx -q run -f .env.local -- lint-staged",
75
- "precommit": "lint-staged",
76
- "prepare": "dotenvx -q run -f .env.local -- husky",
77
- "prepublishOnly": "run-s build",
78
- "test": "run-s check test:*",
79
- "test:prepare": "dotenvx -q run -f .env.test -- npm run build",
80
- "test:unit": "dotenvx -q run -f .env.test -- vitest --run",
81
- "test:unit:update": "dotenvx -q run -f .env.test -- vitest --run --update",
82
- "test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --coverage",
83
- "test-ci": "run-s build test:*",
84
- "update": "run-p --aggregate-output update:**",
85
- "update:deps": "npx --yes npm-check-updates"
86
- },
87
46
  "dependencies": {
88
- "@socketsecurity/registry": "1.1.8"
47
+ "@socketsecurity/registry": "1.2.0"
89
48
  },
90
49
  "devDependencies": {
91
50
  "@biomejs/biome": "2.2.4",
92
51
  "@dotenvx/dotenvx": "1.49.0",
93
52
  "@eslint/compat": "1.3.2",
94
53
  "@eslint/js": "9.35.0",
95
- "@types/node": "24.3.1",
54
+ "@types/node": "24.4.0",
96
55
  "@typescript-eslint/parser": "8.43.0",
56
+ "@typescript/native-preview": "7.0.0-dev.20250912.1",
97
57
  "@vitest/coverage-v8": "3.2.4",
98
58
  "del-cli": "6.0.0",
99
59
  "dev-null-cli": "2.0.0",
100
60
  "eslint": "9.35.0",
101
61
  "eslint-import-resolver-typescript": "4.4.4",
102
62
  "eslint-plugin-import-x": "4.16.1",
103
- "eslint-plugin-jsdoc": "56.1.2",
104
- "eslint-plugin-n": "17.21.3",
63
+ "eslint-plugin-jsdoc": "57.0.8",
64
+ "eslint-plugin-n": "17.22.0",
105
65
  "eslint-plugin-sort-destructure-keys": "2.0.0",
106
66
  "eslint-plugin-unicorn": "56.0.1",
107
67
  "globals": "16.4.0",
@@ -113,25 +73,27 @@
113
73
  "npm-run-all2": "8.0.4",
114
74
  "openapi-typescript": "6.7.6",
115
75
  "oxlint": "1.15.0",
76
+ "taze": "19.6.0",
77
+ "trash": "10.0.0",
116
78
  "type-coverage": "2.29.7",
117
- "typescript": "5.9.2",
118
79
  "typescript-eslint": "8.43.0",
119
- "vitest": "3.2.4"
120
- },
121
- "overrides": {
122
- "vite": "7.1.5"
80
+ "vitest": "3.2.4",
81
+ "yargs-parser": "^22.0.0",
82
+ "yoctocolors": "2.1.2"
123
83
  },
124
84
  "engines": {
125
- "node": ">=18"
85
+ "node": ">=18",
86
+ "pnpm": ">=10.16.0"
126
87
  },
127
88
  "files": [
128
89
  "dist/**",
129
- "types/**"
90
+ "types/**",
91
+ "CHANGELOG.md"
130
92
  ],
131
93
  "lint-staged": {
132
94
  "*.{cjs,js,json,md,mjs,mts,ts}": [
133
- "npm run lint -- --fix",
134
- "npm run lint:fix:fast -- --no-errors-on-unmatched --files-ignore-unknown=true --colors=off"
95
+ "pnpm run lint:fix:oxlint",
96
+ "pnpm run lint:fix:biome -- --no-errors-on-unmatched --files-ignore-unknown=true --colors=off"
135
97
  ]
136
98
  },
137
99
  "typeCoverage": {
@@ -144,5 +106,52 @@
144
106
  "ignore-type-assertion": true,
145
107
  "ignore-files": "test/*",
146
108
  "strict": true
109
+ },
110
+ "scripts": {
111
+ "build": "pnpm run clean:dist && run-p -c --aggregate-output build:* && run-p -c --aggregate-output build:clean:*",
112
+ "build:cjs": "dotenvx -q run -f .env.local -- tsgo",
113
+ "build:esm": "dotenvx -q run -f .env.local -- tsgo -p tsconfig.esm.json",
114
+ "build:clean:cjs": "dotenvx -q run -f .env.local -- node scripts/rename-dist-cjs-files.mjs",
115
+ "build:clean:esm": "dotenvx -q run -f .env.local -- node scripts/rename-dist-esm-files.mjs",
116
+ "check": "run-p -c --aggregate-output check:*",
117
+ "check:lint": "dotenvx -q run -f .env.local -- eslint --report-unused-disable-directives .",
118
+ "check:lint:fix": "pnpm run check:lint -- --fix",
119
+ "check:tsc": "dotenvx -q run -f .env.local -- tsgo --noEmit -p tsconfig.check.json",
120
+ "check-ci": "pnpm run check:lint",
121
+ "coverage": "run-s coverage:*",
122
+ "coverage:test": "run-s test:prepare test:unit:coverage",
123
+ "coverage:type": "dotenvx -q run -f .env.local -- type-coverage",
124
+ "coverage:type:verbose": "dotenvx -q run -f .env.local -- type-coverage --detail",
125
+ "coverage:percent": "node scripts/get-coverage-percentage.mjs",
126
+ "clean": "run-s -c clean:*",
127
+ "clean:cache": "del-cli '**/.cache'",
128
+ "clean:coverage": "del-cli '.type-coverage' 'coverage'",
129
+ "clean:dist": "del-cli 'dist'",
130
+ "clean:declarations": "del-cli '*.d.ts' '!api*.d.ts'",
131
+ "clean:node_modules": "del-cli '**/node_modules'",
132
+ "fix": "run-s lint:fix",
133
+ "generate-sdk": "run-s generate-sdk:*",
134
+ "generate-sdk:01-prettify": "dotenvx -q run -f .env.local -- node scripts/prettify-base-json.mjs",
135
+ "generate-sdk:02-generate": "dotenvx -q run -f .env.local -- node scripts/generate-types.mjs > types/api.d.ts",
136
+ "generate-sdk:03-clean-api": "pnpm run fix && pnpm run fix",
137
+ "knip:dependencies": "knip --dependencies",
138
+ "knip:exports": "knip --include exports,duplicates",
139
+ "lint": "dotenvx -q run -f .env.local -- oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json .",
140
+ "lint:fix": "run-s -c lint:fix:*",
141
+ "lint:fix:oxlint": "dotenvx -q run -f .env.local -- oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --quiet --fix . | dev-null",
142
+ "lint:fix:biome": "dotenvx -q run -f .env.local -- biome format --log-level=none --fix . | dev-null",
143
+ "lint:fix:eslint": "dotenvx -q run -f .env.local -- eslint --report-unused-disable-directives --fix . | dev-null",
144
+ "lint-staged": "dotenvx -q run -f .env.local -- lint-staged",
145
+ "precommit": "lint-staged",
146
+ "test": "run-s check test:*",
147
+ "test:prepare": "dotenvx -q run -f .env.test -- pnpm run build",
148
+ "test:unit": "dotenvx -q run -f .env.test -- vitest --run",
149
+ "test:unit:update": "dotenvx -q run -f .env.test -- vitest --run --update",
150
+ "test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --coverage",
151
+ "test-ci": "run-s build test:*",
152
+ "test-pre-commit": "dotenvx -q run -f .env.precommit -- pnpm test",
153
+ "update": "run-p --aggregate-output update:**",
154
+ "update:deps": "taze",
155
+ "update:socket": "pnpm update '@socketsecurity/*' --latest"
147
156
  }
148
- }
157
+ }
@@ -1,6 +1,6 @@
1
1
  declare type ValueOf<
2
2
  ObjectType,
3
- ValueType extends keyof ObjectType = keyof ObjectType
3
+ ValueType extends keyof ObjectType = keyof ObjectType,
4
4
  > = ObjectType[ValueType]
5
5
 
6
6
  // Based on openapi-typescript-fetch.
package/types/api.d.ts CHANGED
@@ -6126,6 +6126,32 @@ export interface operations {
6126
6126
  * @default
6127
6127
  */
6128
6128
  head_full_scan_id?: string | null
6129
+ integration_meta?: {
6130
+ /** @enum {string} */
6131
+ type?: 'github'
6132
+ value?: {
6133
+ /**
6134
+ * @description The GitHub installation_id of the active associated Socket GitHub App
6135
+ * @default
6136
+ */
6137
+ installation_id: string
6138
+ /**
6139
+ * @description The GitHub login name that the active Socket GitHub App installation is installed to
6140
+ * @default
6141
+ */
6142
+ installation_login: string
6143
+ /**
6144
+ * @description The name of the associated GitHub repo.
6145
+ * @default
6146
+ */
6147
+ repo_name: string | null
6148
+ /**
6149
+ * @description The id of the associated GitHub repo.
6150
+ * @default
6151
+ */
6152
+ repo_id: string | null
6153
+ }
6154
+ } | null
6129
6155
  /**
6130
6156
  * @description The name of the repository
6131
6157
  * @default
@@ -6255,6 +6281,32 @@ export interface operations {
6255
6281
  * @default
6256
6282
  */
6257
6283
  head_full_scan_id?: string | null
6284
+ integration_meta?: {
6285
+ /** @enum {string} */
6286
+ type?: 'github'
6287
+ value?: {
6288
+ /**
6289
+ * @description The GitHub installation_id of the active associated Socket GitHub App
6290
+ * @default
6291
+ */
6292
+ installation_id: string
6293
+ /**
6294
+ * @description The GitHub login name that the active Socket GitHub App installation is installed to
6295
+ * @default
6296
+ */
6297
+ installation_login: string
6298
+ /**
6299
+ * @description The name of the associated GitHub repo.
6300
+ * @default
6301
+ */
6302
+ repo_name: string | null
6303
+ /**
6304
+ * @description The id of the associated GitHub repo.
6305
+ * @default
6306
+ */
6307
+ repo_id: string | null
6308
+ }
6309
+ } | null
6258
6310
  /**
6259
6311
  * @description The name of the repository
6260
6312
  * @default
@@ -6344,6 +6396,32 @@ export interface operations {
6344
6396
  * @default
6345
6397
  */
6346
6398
  head_full_scan_id: string | null
6399
+ integration_meta: {
6400
+ /** @enum {string} */
6401
+ type?: 'github'
6402
+ value?: {
6403
+ /**
6404
+ * @description The GitHub installation_id of the active associated Socket GitHub App
6405
+ * @default
6406
+ */
6407
+ installation_id: string
6408
+ /**
6409
+ * @description The GitHub login name that the active Socket GitHub App installation is installed to
6410
+ * @default
6411
+ */
6412
+ installation_login: string
6413
+ /**
6414
+ * @description The name of the associated GitHub repo.
6415
+ * @default
6416
+ */
6417
+ repo_name: string | null
6418
+ /**
6419
+ * @description The id of the associated GitHub repo.
6420
+ * @default
6421
+ */
6422
+ repo_id: string | null
6423
+ }
6424
+ } | null
6347
6425
  /**
6348
6426
  * @description The name of the repository
6349
6427
  * @default
@@ -6475,6 +6553,32 @@ export interface operations {
6475
6553
  * @default
6476
6554
  */
6477
6555
  head_full_scan_id?: string | null
6556
+ integration_meta?: {
6557
+ /** @enum {string} */
6558
+ type?: 'github'
6559
+ value?: {
6560
+ /**
6561
+ * @description The GitHub installation_id of the active associated Socket GitHub App
6562
+ * @default
6563
+ */
6564
+ installation_id: string
6565
+ /**
6566
+ * @description The GitHub login name that the active Socket GitHub App installation is installed to
6567
+ * @default
6568
+ */
6569
+ installation_login: string
6570
+ /**
6571
+ * @description The name of the associated GitHub repo.
6572
+ * @default
6573
+ */
6574
+ repo_name: string | null
6575
+ /**
6576
+ * @description The id of the associated GitHub repo.
6577
+ * @default
6578
+ */
6579
+ repo_id: string | null
6580
+ }
6581
+ } | null
6478
6582
  /**
6479
6583
  * @description The name of the repository
6480
6584
  * @default
@@ -11861,6 +11965,7 @@ export interface operations {
11861
11965
  | 'ChangePlanSubscriptionSeats'
11862
11966
  | 'CreateApiToken'
11863
11967
  | 'CreateLabel'
11968
+ | 'DeleteFullScan'
11864
11969
  | 'DeleteLabel'
11865
11970
  | 'DeleteLabelSetting'
11866
11971
  | 'DeleteReport'