Skip to content

Commit 7d65053

Browse files
fix: improve types for instance (#655)
1 parent f182ca7 commit 7d65053

5 files changed

Lines changed: 310 additions & 132 deletions

File tree

handwritten/bigtable/src/app-profile.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ export type GetAppProfileResponse = [
100100
AppProfile,
101101
google.bigtable.admin.v2.IAppProfile
102102
];
103+
export type GetAppProfilesCallback = (
104+
err: ServiceError | null,
105+
appProfiles?: AppProfile[],
106+
apiResponse?: google.bigtable.admin.v2.IAppProfile[]
107+
) => void;
108+
export type GetAppProfilesResponse = [
109+
AppProfile[],
110+
google.bigtable.admin.v2.IAppProfile[]
111+
];
103112
export type SetAppProfileMetadataCallback = (
104113
err: ServiceError | null,
105114
apiResponse?: google.protobuf.Empty

handwritten/bigtable/src/cluster.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {promisifyAll} from '@google-cloud/promisify';
1818
import {CallOptions, Operation as GaxOperation} from 'google-gax';
1919
import {ServiceError} from '@grpc/grpc-js';
2020

21-
import {google as btTypes} from '../protos/protos';
21+
import {google} from '../protos/protos';
2222
import {Bigtable} from '.';
2323
import {Instance} from './instance';
2424

@@ -40,20 +40,26 @@ export interface GenericOperationCallback<T> {
4040
): void;
4141
}
4242

43-
export type IEmpty = btTypes.protobuf.IEmpty;
44-
export type ICluster = btTypes.bigtable.admin.v2.ICluster;
45-
export type IOperation = btTypes.longrunning.IOperation;
43+
export type IEmpty = google.protobuf.IEmpty;
44+
export type ICluster = google.bigtable.admin.v2.ICluster;
45+
export type IOperation = google.longrunning.IOperation;
4646

4747
export type ApiResponse = [IOperation];
4848
export type CreateClusterResponse = [ICluster, GaxOperation, IOperation];
4949
export type BooleanResponse = [boolean];
5050
export type GetClusterResponse = [ICluster, IOperation];
51+
export type GetClustersResponse = [ICluster[], IOperation];
5152
export type MetadataResponse = [Metadata, IOperation];
5253

5354
export type CreateClusterCallback = GenericCallback<IOperation>;
5455
export type DeleteClusterCallback = GenericCallback<IOperation>;
5556
export type ExistsClusterCallback = GenericCallback<boolean>;
5657
export type GetClusterCallback = GenericClusterCallback<ICluster>;
58+
export type GetClustersCallback = (
59+
err: ServiceError | null,
60+
clusters?: ICluster[],
61+
apiResponse?: google.bigtable.admin.v2.IListClustersResponse
62+
) => void;
5763
export type SetClusterMetadataCallback = GenericOperationCallback<IOperation>;
5864

5965
export interface CreateClusterOptions {

0 commit comments

Comments
 (0)