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