@@ -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 ) ,
@@ -2264,6 +2274,7 @@ export class SocketSdk {
22642274 *
22652275 * @param orgSlug - Organization identifier
22662276 * @param repoSlug - Repository slug/name
2277+ * @param options - Optional parameters including workspace
22672278 * @returns Repository details with configuration
22682279 *
22692280 * @example
@@ -2286,17 +2297,25 @@ export class SocketSdk {
22862297 async getRepository (
22872298 orgSlug : string ,
22882299 repoSlug : string ,
2300+ options ?: GetRepositoryOptions | undefined ,
22892301 ) : Promise < RepositoryResult | StrictErrorResult > {
22902302 const orgSlugParam = encodeURIComponent ( orgSlug )
22912303 const repoSlugParam = encodeURIComponent ( repoSlug )
2304+ const { workspace } = {
2305+ __proto__ : null ,
2306+ ...options ,
2307+ } as GetRepositoryOptions
2308+ const queryString = workspace
2309+ ? `?${ queryToSearchParams ( { workspace } as QueryParams ) } `
2310+ : ''
22922311
22932312 try {
22942313 const data = await this . #executeWithRetry(
22952314 async ( ) =>
22962315 await getResponseJson (
22972316 await createGetRequest (
22982317 this . #baseUrl,
2299- `orgs/${ orgSlugParam } /repos/${ repoSlugParam } ` ,
2318+ `orgs/${ orgSlugParam } /repos/${ repoSlugParam } ${ queryString } ` ,
23002319 { ...this . #reqOptions, hooks : this . #hooks } ,
23012320 ) ,
23022321 ) ,
@@ -3219,6 +3238,7 @@ export class SocketSdk {
32193238 * @param orgSlug - Organization identifier
32203239 * @param repoSlug - Repository slug/name
32213240 * @param params - Configuration updates (description, homepage, default_branch, etc.)
3241+ * @param options - Optional parameters including workspace
32223242 * @returns Updated repository details
32233243 *
32243244 * @example
@@ -3243,15 +3263,23 @@ export class SocketSdk {
32433263 orgSlug : string ,
32443264 repoSlug : string ,
32453265 params ?: QueryParams | undefined ,
3266+ options ?: GetRepositoryOptions | undefined ,
32463267 ) : Promise < RepositoryResult | StrictErrorResult > {
3268+ const { workspace } = {
3269+ __proto__ : null ,
3270+ ...options ,
3271+ } as GetRepositoryOptions
3272+ const queryString = workspace
3273+ ? `?${ queryToSearchParams ( { workspace } as QueryParams ) } `
3274+ : ''
32473275 try {
32483276 const data = await this . #executeWithRetry(
32493277 async ( ) =>
32503278 await getResponseJson (
32513279 await createRequestWithJson (
32523280 'POST' ,
32533281 this . #baseUrl,
3254- `orgs/${ encodeURIComponent ( orgSlug ) } /repos/${ encodeURIComponent ( repoSlug ) } ` ,
3282+ `orgs/${ encodeURIComponent ( orgSlug ) } /repos/${ encodeURIComponent ( repoSlug ) } ${ queryString } ` ,
32553283 params ,
32563284 { ...this . #reqOptions, hooks : this . #hooks } ,
32573285 ) ,
0 commit comments