@@ -99,6 +99,7 @@ import type {
9999 FullScanItem ,
100100 FullScanListResult ,
101101 FullScanResult ,
102+ GetRepositoryOptions ,
102103 ListFullScansOptions ,
103104 ListRepositoriesOptions ,
104105 OrganizationsResult ,
@@ -1422,6 +1423,7 @@ export class SocketSdk {
14221423 *
14231424 * @param orgSlug - Organization identifier
14241425 * @param repoSlug - Repository slug/name to delete
1426+ * @param options - Optional parameters including workspace
14251427 * @returns Success confirmation
14261428 *
14271429 * @example
@@ -1442,14 +1444,22 @@ export class SocketSdk {
14421444 async deleteRepository (
14431445 orgSlug : string ,
14441446 repoSlug : string ,
1447+ options ?: GetRepositoryOptions | undefined ,
14451448 ) : Promise < DeleteResult | StrictErrorResult > {
1449+ const { workspace } = {
1450+ __proto__ : null ,
1451+ ...options ,
1452+ } as GetRepositoryOptions
1453+ const queryString = workspace
1454+ ? `?${ queryToSearchParams ( { workspace } as QueryParams ) } `
1455+ : ''
14461456 try {
14471457 const data = await this . #executeWithRetry(
14481458 async ( ) =>
14491459 await getResponseJson (
14501460 await createDeleteRequest (
14511461 this . #baseUrl,
1452- `orgs/${ encodeURIComponent ( orgSlug ) } /repos/${ encodeURIComponent ( repoSlug ) } ` ,
1462+ `orgs/${ encodeURIComponent ( orgSlug ) } /repos/${ encodeURIComponent ( repoSlug ) } ${ queryString } ` ,
14531463 { ...this . #reqOptions, hooks : this . #hooks } ,
14541464 ) ,
14551465 ) ,
@@ -2262,6 +2272,7 @@ export class SocketSdk {
22622272 *
22632273 * @param orgSlug - Organization identifier
22642274 * @param repoSlug - Repository slug/name
2275+ * @param options - Optional parameters including workspace
22652276 * @returns Repository details with configuration
22662277 *
22672278 * @example
@@ -2284,17 +2295,25 @@ export class SocketSdk {
22842295 async getRepository (
22852296 orgSlug : string ,
22862297 repoSlug : string ,
2298+ options ?: GetRepositoryOptions | undefined ,
22872299 ) : Promise < RepositoryResult | StrictErrorResult > {
22882300 const orgSlugParam = encodeURIComponent ( orgSlug )
22892301 const repoSlugParam = encodeURIComponent ( repoSlug )
2302+ const { workspace } = {
2303+ __proto__ : null ,
2304+ ...options ,
2305+ } as GetRepositoryOptions
2306+ const queryString = workspace
2307+ ? `?${ queryToSearchParams ( { workspace } as QueryParams ) } `
2308+ : ''
22902309
22912310 try {
22922311 const data = await this . #executeWithRetry(
22932312 async ( ) =>
22942313 await getResponseJson (
22952314 await createGetRequest (
22962315 this . #baseUrl,
2297- `orgs/${ orgSlugParam } /repos/${ repoSlugParam } ` ,
2316+ `orgs/${ orgSlugParam } /repos/${ repoSlugParam } ${ queryString } ` ,
22982317 { ...this . #reqOptions, hooks : this . #hooks } ,
22992318 ) ,
23002319 ) ,
@@ -3217,6 +3236,7 @@ export class SocketSdk {
32173236 * @param orgSlug - Organization identifier
32183237 * @param repoSlug - Repository slug/name
32193238 * @param params - Configuration updates (description, homepage, default_branch, etc.)
3239+ * @param options - Optional parameters including workspace
32203240 * @returns Updated repository details
32213241 *
32223242 * @example
@@ -3241,15 +3261,23 @@ export class SocketSdk {
32413261 orgSlug : string ,
32423262 repoSlug : string ,
32433263 params ?: QueryParams | undefined ,
3264+ options ?: GetRepositoryOptions | undefined ,
32443265 ) : Promise < RepositoryResult | StrictErrorResult > {
3266+ const { workspace } = {
3267+ __proto__ : null ,
3268+ ...options ,
3269+ } as GetRepositoryOptions
3270+ const queryString = workspace
3271+ ? `?${ queryToSearchParams ( { workspace } as QueryParams ) } `
3272+ : ''
32453273 try {
32463274 const data = await this . #executeWithRetry(
32473275 async ( ) =>
32483276 await getResponseJson (
32493277 await createRequestWithJson (
32503278 'POST' ,
32513279 this . #baseUrl,
3252- `orgs/${ encodeURIComponent ( orgSlug ) } /repos/${ encodeURIComponent ( repoSlug ) } ` ,
3280+ `orgs/${ encodeURIComponent ( orgSlug ) } /repos/${ encodeURIComponent ( repoSlug ) } ${ queryString } ` ,
32533281 params ,
32543282 { ...this . #reqOptions, hooks : this . #hooks } ,
32553283 ) ,
0 commit comments