File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,21 @@ class SocketSdk {
492
492
}
493
493
}
494
494
495
+ /**
496
+ * @param {{[key: string]: boolean } } queryParams
497
+ * @param {{components: {purl: string}[] } } components
498
+ * @returns {Promise<SocketSdkResultType<'batchPackageFetch'>> }
499
+ */
500
+ async batchPackageFetch ( queryParams , components ) {
501
+ try {
502
+ const client = await this . #getClient( )
503
+ const data = await client . post ( `purl?${ queryParams } ` , { json : components } ) . json ( )
504
+ return { success : true , status : 200 , data }
505
+ } catch ( err ) {
506
+ return /** @type {SocketSdkErrorType<'batchPackageFetch'> } */ ( this . #handleApiError( err ) )
507
+ }
508
+ }
509
+
495
510
/**
496
511
* @param {Array<{ organization?: string }> } selectors
497
512
* @returns {Promise<SocketSdkResultType<'postSettings'>> }
You can’t perform that action at this time.
0 commit comments