Skip to content

Commit a8d7297

Browse files
authored
Merge pull request #95 from SocketDev/retrieve-glob-patterns
Add glob patterns
2 parents 1a0a948 + 76b2056 commit a8d7297

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const { SocketSdk } = require('@socketsecurity/sdk')
5353
* `pathsRelativeTo`: A `string` path that the absolute paths `filePaths` are relative to. This to calculate where in your project the `package.json`/`package-lock.json` files lives
5454
* `issueRules`: An object that follows the format of the [`socket.yml`](https://docs.socket.dev/docs/socket-yml) issue rules. Keys being issue names, values being a boolean that activates or deactivates it. Is applied on top of default config and organization config.
5555
* `getReportList()`
56+
* `getReportSupportedFiles()`
5657
* `getReport(id)`
5758
* `id`: A `string` representing the id of a created report
5859

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ class SocketSdk {
190190
}
191191
}
192192

193+
/**
194+
* @returns {Promise<SocketSdkResultType<'getReportSupportedFiles'>>}
195+
*/
196+
async getReportSupportedFiles () {
197+
try {
198+
const client = await this.#getClient()
199+
const data = await client.get('report/supported').json()
200+
return { success: true, status: 200, data }
201+
} catch (err) {
202+
return /** @type {SocketSdkErrorType<'getReportSupportedFiles'>} */ (this.#handleApiError(err))
203+
}
204+
}
205+
193206
/** @returns {Promise<SocketSdkResultType<'getQuota'>>} */
194207
async getQuota () {
195208
try {

0 commit comments

Comments
 (0)