@@ -521,10 +521,16 @@ const injectedRtkApi = api.injectEndpoints({
521521 getRepoBranches : build . query < GetRepoBranchesApiResponse , GetRepoBranchesApiArg > ( {
522522 query : ( queryArg ) => ( { url : `/v2/teams/${ queryArg . teamId } /coderepos/${ queryArg . codeRepositoryName } /branches` } ) ,
523523 } ) ,
524- testRepoConnect : build . query < TestRepoConnectApiResponse , TestRepoConnectApiArg > ( {
524+ getTestRepoConnectPlatform : build . query < GetTestRepoConnectPlatformApiResponse , GetTestRepoConnectPlatformApiArg > ( {
525525 query : ( queryArg ) => ( {
526- url : `/v1/testRepoConnect` ,
527- params : { url : queryArg . url , teamId : queryArg . teamId , secret : queryArg . secret } ,
526+ url : `/v2/testRepoConnectPlatform` ,
527+ params : { url : queryArg . url , secret : queryArg . secret } ,
528+ } ) ,
529+ } ) ,
530+ getTestRepoConnect : build . query < GetTestRepoConnectApiResponse , GetTestRepoConnectApiArg > ( {
531+ query : ( queryArg ) => ( {
532+ url : `/v2/teams/${ queryArg . teamId } /coderepos/testRepoConnect` ,
533+ params : { url : queryArg . url , secretName : queryArg . secretName } ,
528534 } ) ,
529535 } ) ,
530536 getInternalRepoUrls : build . query < GetInternalRepoUrlsApiResponse , GetInternalRepoUrlsApiArg > ( {
@@ -6288,18 +6294,24 @@ export type GetRepoBranchesApiArg = {
62886294 /** Name of the code repository */
62896295 codeRepositoryName : string
62906296}
6291- export type TestRepoConnectApiResponse = /** status 200 The request is successful. */ {
6297+ export type GetTestRepoConnectPlatformApiResponse = /** status 200 The request is successful. */ {
62926298 url ?: string
62936299 status ?: 'unknown' | 'success' | 'failed'
62946300}
6295- export type TestRepoConnectApiArg = {
6296- /** URL of the repository */
6297- url ?: string
6298- /** Id of the team */
6299- teamId ?: string
6300- /** Name of the secret for private repositories */
6301+ export type GetTestRepoConnectPlatformApiArg = {
6302+ url : string
63016303 secret ?: string
63026304}
6305+ export type GetTestRepoConnectApiResponse = /** status 200 The request is successful. */ {
6306+ url ?: string
6307+ status ?: 'unknown' | 'success' | 'failed'
6308+ }
6309+ export type GetTestRepoConnectApiArg = {
6310+ /** ID of team */
6311+ teamId : string
6312+ url : string
6313+ secretName ?: string
6314+ }
63036315export type GetInternalRepoUrlsApiResponse = /** status 200 Successfully obtained internal repo urls */ string [ ]
63046316export type GetInternalRepoUrlsApiArg = {
63056317 /** ID of team */
@@ -7022,7 +7034,8 @@ export const {
70227034 useGetApiDocQuery,
70237035 useGetSettingsInfoQuery,
70247036 useGetRepoBranchesQuery,
7025- useTestRepoConnectQuery,
7037+ useGetTestRepoConnectPlatformQuery,
7038+ useGetTestRepoConnectQuery,
70267039 useGetInternalRepoUrlsQuery,
70277040 useCreateObjWizardMutation,
70287041 useGetSettingsQuery,
0 commit comments