Skip to content

Commit 60f8355

Browse files
committed
Add full scans feature
1 parent 1a504aa commit 60f8355

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,22 @@ class SocketSdk {
259259
}
260260
}
261261

262+
/**
263+
* @param {string} orgSlug
264+
* @returns {Promise<SocketSdkResultType<'getOrgFullScanList'>>}
265+
*/
266+
async getOrgFullScanList (orgSlug) {
267+
const orgSlugParam = encodeURIComponent(orgSlug)
268+
269+
try {
270+
const client = await this.#getClient()
271+
const data = await client.get(`orgs/${orgSlugParam}/full-scans`).json()
272+
return { success: true, status: 200, data }
273+
} catch (err) {
274+
return /** @type {SocketSdkErrorType<'getOrgFullScanList'>} */ (this.#handleApiError(err))
275+
}
276+
}
277+
262278
/**
263279
* @param {Array<{ organization?: string }>} selectors
264280
* @returns {Promise<SocketSdkResultType<'postSettings'>>}

0 commit comments

Comments
 (0)