@@ -406,7 +406,7 @@ class SocketSdk {
406406 /**
407407 * @param {string } orgSlug
408408 * @param {string } repoSlug
409- * @returns {Promise<SocketSdkResultType<'getAuditLogEvents '>> }
409+ * @returns {Promise<SocketSdkResultType<'getOrgRepo '>> }
410410 */
411411 async getOrgRepo ( orgSlug , repoSlug ) {
412412 const orgSlugParam = encodeURIComponent ( orgSlug )
@@ -417,14 +417,14 @@ class SocketSdk {
417417 const data = await client . get ( `orgs/${ orgSlugParam } /repos/${ repoSlugParam } ` ) . json ( )
418418 return { success : true , status : 200 , data }
419419 } catch ( err ) {
420- return /** @type {SocketSdkErrorType<'getAuditLogEvents '> } */ ( this . #handleApiError( err ) )
420+ return /** @type {SocketSdkErrorType<'getOrgRepo '> } */ ( this . #handleApiError( err ) )
421421 }
422422 }
423423
424424 /**
425425 * @param {string } orgSlug
426426 * @param {string } repoSlug
427- * @returns {Promise<SocketSdkResultType<'getAuditLogEvents '>> }
427+ * @returns {Promise<SocketSdkResultType<'deleteOrgRepo '>> }
428428 */
429429 async deleteOrgRepo ( orgSlug , repoSlug ) {
430430 const orgSlugParam = encodeURIComponent ( orgSlug )
@@ -435,14 +435,14 @@ class SocketSdk {
435435 const data = await client . delete ( `orgs/${ orgSlugParam } /repos/${ repoSlugParam } ` ) . json ( )
436436 return { success : true , status : 200 , data }
437437 } catch ( err ) {
438- return /** @type {SocketSdkErrorType<'getAuditLogEvents '> } */ ( this . #handleApiError( err ) )
438+ return /** @type {SocketSdkErrorType<'deleteOrgRepo '> } */ ( this . #handleApiError( err ) )
439439 }
440440 }
441441
442442 /**
443443 * @param {string } orgSlug
444444 * @param {{[key: string]: any } } queryParams
445- * @returns {Promise<SocketSdkResultType<'getAuditLogEvents '>> }
445+ * @returns {Promise<SocketSdkResultType<'getOrgRepoList '>> }
446446 */
447447 async getOrgRepoList ( orgSlug , queryParams ) {
448448 const orgSlugParam = encodeURIComponent ( orgSlug )
@@ -453,41 +453,42 @@ class SocketSdk {
453453 const data = await client . get ( `orgs/${ orgSlugParam } /repos?${ formattedQueryParam } ` ) . json ( )
454454 return { success : true , status : 200 , data }
455455 } catch ( err ) {
456- return /** @type {SocketSdkErrorType<'getAuditLogEvents '> } */ ( this . #handleApiError( err ) )
456+ return /** @type {SocketSdkErrorType<'getOrgRepoList '> } */ ( this . #handleApiError( err ) )
457457 }
458458 }
459459
460460 /**
461461 * @param {string } orgSlug
462462 * @param {string } params
463- * @returns {Promise<SocketSdkResultType<'getAuditLogEvents '>> }
463+ * @returns {Promise<SocketSdkResultType<'createOrgRepo '>> }
464464 */
465465 async createOrgRepo ( orgSlug , params ) {
466466 const orgSlugParam = encodeURIComponent ( orgSlug )
467467
468468 try {
469469 const client = await this . #getClient( )
470- const data = await client . post ( `orgs/${ orgSlugParam } /repos` , { body : params } ) . json ( )
470+ const data = await client . post ( `orgs/${ orgSlugParam } /repos` , { json : params } ) . json ( )
471471 return { success : true , status : 200 , data }
472472 } catch ( err ) {
473- return /** @type {SocketSdkErrorType<'getAuditLogEvents '> } */ ( this . #handleApiError( err ) )
473+ return /** @type {SocketSdkErrorType<'createOrgRepo '> } */ ( this . #handleApiError( err ) )
474474 }
475475 }
476476
477477 /**
478478 * @param {string } orgSlug
479479 * @param {string } repoSlug
480- * @returns {Promise<SocketSdkResultType<'getAuditLogEvents'>> }
480+ * @param {string } params
481+ * @returns {Promise<SocketSdkResultType<'updateOrgRepo'>> }
481482 */
482- async updateOrgRepo ( orgSlug , repoSlug ) {
483+ async updateOrgRepo ( orgSlug , repoSlug , params ) {
483484 const orgSlugParam = encodeURIComponent ( orgSlug )
484485
485486 try {
486487 const client = await this . #getClient( )
487- const data = await client . post ( `orgs/${ orgSlugParam } /repos/${ repoSlug } ` ) . json ( )
488+ const data = await client . post ( `orgs/${ orgSlugParam } /repos/${ repoSlug } ` , { json : params } ) . json ( )
488489 return { success : true , status : 200 , data }
489490 } catch ( err ) {
490- return /** @type {SocketSdkErrorType<'getAuditLogEvents '> } */ ( this . #handleApiError( err ) )
491+ return /** @type {SocketSdkErrorType<'updateOrgRepo '> } */ ( this . #handleApiError( err ) )
491492 }
492493 }
493494
0 commit comments