1 | import { CallOptions, ServiceError } from 'google-gax';
|
2 | import { Datastore } from './';
|
3 | import { google } from '../protos/protos';
|
4 | export interface GenericIndexCallback<T> {
|
5 | (err?: ServiceError | null, index?: Index | null, apiResponse?: T | null): void;
|
6 | }
|
7 | export declare type GetIndexCallback = GenericIndexCallback<IIndex>;
|
8 | export declare type GetIndexResponse = [Index, IIndex];
|
9 | export declare type IndexGetMetadataCallback = (err?: ServiceError | null, metadata?: IIndex | null) => void;
|
10 | export declare type IndexGetMetadataResponse = [IIndex];
|
11 | export interface GetIndexesOptions {
|
12 | filter?: string;
|
13 | gaxOptions?: CallOptions;
|
14 | pageSize?: number;
|
15 | pageToken?: string;
|
16 | autoPaginate?: boolean;
|
17 | }
|
18 | export declare type GetIndexesResponse = [Index[], GetIndexesOptions, google.datastore.admin.v1.IListIndexesResponse];
|
19 | export declare type GetIndexesCallback = (err?: ServiceError | null, indexes?: Index[], nextQuery?: GetIndexesOptions, apiResponse?: google.datastore.admin.v1.IListIndexesResponse) => void;
|
20 | export declare type IIndex = google.datastore.admin.v1.IIndex;
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare class Index {
|
32 | datastore: Datastore;
|
33 | id: string;
|
34 | metadata?: IIndex;
|
35 | constructor(datastore: Datastore, id: string);
|
36 | get(gaxOptions?: CallOptions): Promise<GetIndexResponse>;
|
37 | get(callback: GetIndexCallback): void;
|
38 | get(gaxOptions: CallOptions, callback: GetIndexCallback): void;
|
39 | getMetadata(gaxOptions?: CallOptions): Promise<IndexGetMetadataResponse>;
|
40 | getMetadata(callback: IndexGetMetadataCallback): void;
|
41 | getMetadata(gaxOptions: CallOptions, callback: IndexGetMetadataCallback): void;
|
42 | }
|