1 | import * as gax from 'google-gax';
|
2 | import { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
|
3 | import * as protos from '../../protos/protos';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare class DatastoreClient {
|
16 | private _terminated;
|
17 | private _opts;
|
18 | private _providedCustomServicePath;
|
19 | private _gaxModule;
|
20 | private _gaxGrpc;
|
21 | private _protos;
|
22 | private _defaults;
|
23 | auth: gax.GoogleAuth;
|
24 | descriptors: Descriptors;
|
25 | warn: (code: string, message: string, warnType?: string) => void;
|
26 | innerApiCalls: {
|
27 | [name: string]: Function;
|
28 | };
|
29 | datastoreStub?: Promise<{
|
30 | [name: string]: Function;
|
31 | }>;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | constructor(opts?: ClientOptions);
|
67 | /**
|
68 | * Initialize the client.
|
69 | * Performs asynchronous operations (such as authentication) and prepares the client.
|
70 | * This function will be called automatically when any class method is called for the
|
71 | * first time, but if you need to initialize it before calling an actual method,
|
72 | * feel free to call initialize() directly.
|
73 | *
|
74 | * You can await on this method if you want to make sure the client is initialized.
|
75 | *
|
76 | * @returns {Promise} A promise that resolves to an authenticated service stub.
|
77 | */
|
78 | initialize(): Promise<{
|
79 | [name: string]: Function;
|
80 | }>;
|
81 | |
82 |
|
83 |
|
84 |
|
85 | static get servicePath(): string;
|
86 | |
87 |
|
88 |
|
89 |
|
90 |
|
91 | static get apiEndpoint(): string;
|
92 | |
93 |
|
94 |
|
95 |
|
96 | static get port(): number;
|
97 | |
98 |
|
99 |
|
100 |
|
101 |
|
102 | static get scopes(): string[];
|
103 | getProjectId(): Promise<string>;
|
104 | getProjectId(callback: Callback<string, undefined, undefined>): void;
|
105 | lookup(request?: protos.google.datastore.v1.ILookupRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | undefined, {} | undefined]>;
|
106 | lookup(request: protos.google.datastore.v1.ILookupRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>): void;
|
107 | lookup(request: protos.google.datastore.v1.ILookupRequest, callback: Callback<protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, {} | null | undefined>): void;
|
108 | runQuery(request?: protos.google.datastore.v1.IRunQueryRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | undefined, {} | undefined]>;
|
109 | runQuery(request: protos.google.datastore.v1.IRunQueryRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>): void;
|
110 | runQuery(request: protos.google.datastore.v1.IRunQueryRequest, callback: Callback<protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, {} | null | undefined>): void;
|
111 | beginTransaction(request?: protos.google.datastore.v1.IBeginTransactionRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | undefined, {} | undefined]>;
|
112 | beginTransaction(request: protos.google.datastore.v1.IBeginTransactionRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
|
113 | beginTransaction(request: protos.google.datastore.v1.IBeginTransactionRequest, callback: Callback<protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
|
114 | commit(request?: protos.google.datastore.v1.ICommitRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | undefined, {} | undefined]>;
|
115 | commit(request: protos.google.datastore.v1.ICommitRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
|
116 | commit(request: protos.google.datastore.v1.ICommitRequest, callback: Callback<protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
|
117 | rollback(request?: protos.google.datastore.v1.IRollbackRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | undefined, {} | undefined]>;
|
118 | rollback(request: protos.google.datastore.v1.IRollbackRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
|
119 | rollback(request: protos.google.datastore.v1.IRollbackRequest, callback: Callback<protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
|
120 | allocateIds(request?: protos.google.datastore.v1.IAllocateIdsRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | undefined, {} | undefined]>;
|
121 | allocateIds(request: protos.google.datastore.v1.IAllocateIdsRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>): void;
|
122 | allocateIds(request: protos.google.datastore.v1.IAllocateIdsRequest, callback: Callback<protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, {} | null | undefined>): void;
|
123 | reserveIds(request?: protos.google.datastore.v1.IReserveIdsRequest, options?: CallOptions): Promise<[protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | undefined, {} | undefined]>;
|
124 | reserveIds(request: protos.google.datastore.v1.IReserveIdsRequest, options: CallOptions, callback: Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>): void;
|
125 | reserveIds(request: protos.google.datastore.v1.IReserveIdsRequest, callback: Callback<protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, {} | null | undefined>): void;
|
126 | |
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 | close(): Promise<void>;
|
133 | }
|