@@ -41,7 +41,8 @@ export type AppRunnerServiceSummary = RequiredProps<
4141 'ServiceName' | 'ServiceArn' | 'Status' | 'ServiceId'
4242>
4343
44- type WithService < T > = T & { Service : AppRunnerService }
44+ // Note: Many of the requests return a type of Service, but Service <: ServiceSummary.
45+ type WithServiceSummary < T > = Omit < T , 'Service' > & { Service : AppRunnerServiceSummary }
4546
4647export class AppRunnerClient extends ClientWrapper < AppRunnerClientSDK > {
4748 public constructor ( regionCode : string ) {
@@ -60,15 +61,15 @@ export class AppRunnerClient extends ClientWrapper<AppRunnerClientSDK> {
6061 return this . makePaginatedRequest ( paginateListServices , request , ( page ) => page . ServiceSummaryList )
6162 }
6263
63- public async pauseService ( request : PauseServiceRequest ) : Promise < WithService < PauseServiceResponse > > {
64+ public async pauseService ( request : PauseServiceRequest ) : Promise < WithServiceSummary < PauseServiceResponse > > {
6465 return await this . makeRequest ( PauseServiceCommand , request )
6566 }
6667
67- public async resumeService ( request : ResumeServiceRequest ) : Promise < WithService < ResumeServiceResponse > > {
68+ public async resumeService ( request : ResumeServiceRequest ) : Promise < WithServiceSummary < ResumeServiceResponse > > {
6869 return await this . makeRequest ( ResumeServiceCommand , request )
6970 }
7071
71- public async updateService ( request : UpdateServiceRequest ) : Promise < WithService < UpdateServiceResponse > > {
72+ public async updateService ( request : UpdateServiceRequest ) : Promise < WithServiceSummary < UpdateServiceResponse > > {
7273 return await this . makeRequest ( UpdateServiceCommand , request )
7374 }
7475
@@ -84,7 +85,9 @@ export class AppRunnerClient extends ClientWrapper<AppRunnerClientSDK> {
8485 return ( await this . createSdkClient ( ) ) . listConnections ( request ) . promise ( )
8586 }
8687
87- public async describeService ( request : DescribeServiceRequest ) : Promise < WithService < DescribeServiceResponse > > {
88+ public async describeService (
89+ request : DescribeServiceRequest
90+ ) : Promise < WithServiceSummary < DescribeServiceResponse > > {
8891 return await this . makeRequest ( DescribeServiceCommand , request )
8992 }
9093
@@ -96,7 +99,7 @@ export class AppRunnerClient extends ClientWrapper<AppRunnerClientSDK> {
9699 return ( await this . createSdkClient ( ) ) . listOperations ( request ) . promise ( )
97100 }
98101
99- public async deleteService ( request : DeleteServiceRequest ) : Promise < WithService < DeleteServiceResponse > > {
102+ public async deleteService ( request : DeleteServiceRequest ) : Promise < WithServiceSummary < DeleteServiceResponse > > {
100103 return this . makeRequest ( DeleteServiceCommand , request )
101104 }
102105
0 commit comments