@maxim_mazurok/gapi.client.datastore-v1beta3 0.0.20220715

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,931 @@
1
+ /* Type definitions for non-npm package Cloud Datastore API v1beta3 0.0 */
2
+ // Project: https://cloud.google.com/datastore/
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://datastore.googleapis.com/$discovery/rest?version=v1beta3
13
+ // Revision: 20220715
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Cloud Datastore API v1beta3 */
19
+ function load(urlOrObject: "https://datastore.googleapis.com/$discovery/rest?version=v1beta3"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "datastore", version: "v1beta3"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "datastore", version: "v1beta3", callback: () => any): void;
24
+
25
+ namespace datastore {
26
+ interface AllocateIdsRequest {
27
+ /** Required. A list of keys with incomplete key paths for which to allocate IDs. No key may be reserved/read-only. */
28
+ keys?: Key[];
29
+ }
30
+ interface AllocateIdsResponse {
31
+ /** The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID. */
32
+ keys?: Key[];
33
+ }
34
+ interface ArrayValue {
35
+ /** Values in the array. The order of values in an array is preserved as long as all values have identical settings for 'exclude_from_indexes'. */
36
+ values?: Value[];
37
+ }
38
+ interface BeginTransactionRequest {
39
+ /** Options for a new transaction. */
40
+ transactionOptions?: TransactionOptions;
41
+ }
42
+ interface BeginTransactionResponse {
43
+ /** The transaction identifier (always present). */
44
+ transaction?: string;
45
+ }
46
+ interface CommitRequest {
47
+ /** The type of commit to perform. Defaults to `TRANSACTIONAL`. */
48
+ mode?: string;
49
+ /**
50
+ * The mutations to perform. When mode is `TRANSACTIONAL`, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are
51
+ * not permitted in a single `Commit` request: - `insert` followed by `insert` - `update` followed by `insert` - `upsert` followed by `insert` - `delete` followed by `update` When mode
52
+ * is `NON_TRANSACTIONAL`, no two mutations may affect a single entity.
53
+ */
54
+ mutations?: Mutation[];
55
+ /** The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction. */
56
+ transaction?: string;
57
+ }
58
+ interface CommitResponse {
59
+ /** The transaction commit timestamp. Not set for non-transactional commits. */
60
+ commitTime?: string;
61
+ /** The number of index entries updated during the commit, or zero if none were updated. */
62
+ indexUpdates?: number;
63
+ /** The result of performing the mutations. The i-th mutation result corresponds to the i-th mutation in the request. */
64
+ mutationResults?: MutationResult[];
65
+ }
66
+ interface CompositeFilter {
67
+ /** The list of filters to combine. Requires: * At least one filter is present. */
68
+ filters?: Filter[];
69
+ /** The operator for combining multiple filters. */
70
+ op?: string;
71
+ }
72
+ interface Entity {
73
+ /**
74
+ * The entity's key. An entity must have a key, unless otherwise documented (for example, an entity in `Value.entity_value` may have no key). An entity's kind is its key path's last
75
+ * element's kind, or null if it has no key.
76
+ */
77
+ key?: Key;
78
+ /**
79
+ * The entity's properties. The map's keys are property names. A property name matching regex `__.*__` is reserved. A reserved property name is forbidden in certain documented
80
+ * contexts. The name must not contain more than 500 characters. The name cannot be `""`.
81
+ */
82
+ properties?: { [P in string]: Value };
83
+ }
84
+ interface EntityResult {
85
+ /** A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message. */
86
+ cursor?: string;
87
+ /** The resulting entity. */
88
+ entity?: Entity;
89
+ /** The time at which the entity was last changed. This field is set for `FULL` entity results. If this entity is missing, this field will not be set. */
90
+ updateTime?: string;
91
+ /**
92
+ * The version of the entity, a strictly positive number that monotonically increases with changes to the entity. This field is set for `FULL` entity results. For missing entities in
93
+ * `LookupResponse`, this is the version of the snapshot that was used to look up the entity, and it is always set except for eventually consistent reads.
94
+ */
95
+ version?: string;
96
+ }
97
+ interface Filter {
98
+ /** A composite filter. */
99
+ compositeFilter?: CompositeFilter;
100
+ /** A filter on a property. */
101
+ propertyFilter?: PropertyFilter;
102
+ }
103
+ interface GoogleDatastoreAdminV1beta1CommonMetadata {
104
+ /** The time the operation ended, either successfully or otherwise. */
105
+ endTime?: string;
106
+ /** The client-assigned labels which were provided when the operation was created. May also include additional labels. */
107
+ labels?: { [P in string]: string };
108
+ /** The type of the operation. Can be used as a filter in ListOperationsRequest. */
109
+ operationType?: string;
110
+ /** The time that work began on the operation. */
111
+ startTime?: string;
112
+ /** The current state of the Operation. */
113
+ state?: string;
114
+ }
115
+ interface GoogleDatastoreAdminV1beta1EntityFilter {
116
+ /** If empty, then this represents all kinds. */
117
+ kinds?: string[];
118
+ /**
119
+ * An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces. An empty string element represents the default namespace. This should be
120
+ * used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.
121
+ */
122
+ namespaceIds?: string[];
123
+ }
124
+ interface GoogleDatastoreAdminV1beta1ExportEntitiesMetadata {
125
+ /** Metadata common to all Datastore Admin operations. */
126
+ common?: GoogleDatastoreAdminV1beta1CommonMetadata;
127
+ /** Description of which entities are being exported. */
128
+ entityFilter?: GoogleDatastoreAdminV1beta1EntityFilter;
129
+ /**
130
+ * Location for the export metadata and data files. This will be the same value as the google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix field. The final output
131
+ * location is provided in google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.
132
+ */
133
+ outputUrlPrefix?: string;
134
+ /** An estimate of the number of bytes processed. */
135
+ progressBytes?: GoogleDatastoreAdminV1beta1Progress;
136
+ /** An estimate of the number of entities processed. */
137
+ progressEntities?: GoogleDatastoreAdminV1beta1Progress;
138
+ }
139
+ interface GoogleDatastoreAdminV1beta1ExportEntitiesResponse {
140
+ /**
141
+ * Location of the output metadata file. This can be used to begin an import into Cloud Datastore (this project or another project). See
142
+ * google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. Only present if the operation completed successfully.
143
+ */
144
+ outputUrl?: string;
145
+ }
146
+ interface GoogleDatastoreAdminV1beta1ImportEntitiesMetadata {
147
+ /** Metadata common to all Datastore Admin operations. */
148
+ common?: GoogleDatastoreAdminV1beta1CommonMetadata;
149
+ /** Description of which entities are being imported. */
150
+ entityFilter?: GoogleDatastoreAdminV1beta1EntityFilter;
151
+ /** The location of the import metadata file. This will be the same value as the google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url field. */
152
+ inputUrl?: string;
153
+ /** An estimate of the number of bytes processed. */
154
+ progressBytes?: GoogleDatastoreAdminV1beta1Progress;
155
+ /** An estimate of the number of entities processed. */
156
+ progressEntities?: GoogleDatastoreAdminV1beta1Progress;
157
+ }
158
+ interface GoogleDatastoreAdminV1beta1Progress {
159
+ /** The amount of work that has been completed. Note that this may be greater than work_estimated. */
160
+ workCompleted?: string;
161
+ /** An estimate of how much work needs to be performed. May be zero if the work estimate is unavailable. */
162
+ workEstimated?: string;
163
+ }
164
+ interface GoogleDatastoreAdminV1CommonMetadata {
165
+ /** The time the operation ended, either successfully or otherwise. */
166
+ endTime?: string;
167
+ /** The client-assigned labels which were provided when the operation was created. May also include additional labels. */
168
+ labels?: { [P in string]: string };
169
+ /** The type of the operation. Can be used as a filter in ListOperationsRequest. */
170
+ operationType?: string;
171
+ /** The time that work began on the operation. */
172
+ startTime?: string;
173
+ /** The current state of the Operation. */
174
+ state?: string;
175
+ }
176
+ interface GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata {
177
+ /** The current state of migration from Cloud Datastore to Cloud Firestore in Datastore mode. */
178
+ migrationState?: string;
179
+ /** The current step of migration from Cloud Datastore to Cloud Firestore in Datastore mode. */
180
+ migrationStep?: string;
181
+ }
182
+ interface GoogleDatastoreAdminV1EntityFilter {
183
+ /** If empty, then this represents all kinds. */
184
+ kinds?: string[];
185
+ /**
186
+ * An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces. An empty string element represents the default namespace. This should be
187
+ * used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.
188
+ */
189
+ namespaceIds?: string[];
190
+ }
191
+ interface GoogleDatastoreAdminV1ExportEntitiesMetadata {
192
+ /** Metadata common to all Datastore Admin operations. */
193
+ common?: GoogleDatastoreAdminV1CommonMetadata;
194
+ /** Description of which entities are being exported. */
195
+ entityFilter?: GoogleDatastoreAdminV1EntityFilter;
196
+ /**
197
+ * Location for the export metadata and data files. This will be the same value as the google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix field. The final output
198
+ * location is provided in google.datastore.admin.v1.ExportEntitiesResponse.output_url.
199
+ */
200
+ outputUrlPrefix?: string;
201
+ /** An estimate of the number of bytes processed. */
202
+ progressBytes?: GoogleDatastoreAdminV1Progress;
203
+ /** An estimate of the number of entities processed. */
204
+ progressEntities?: GoogleDatastoreAdminV1Progress;
205
+ }
206
+ interface GoogleDatastoreAdminV1ExportEntitiesResponse {
207
+ /**
208
+ * Location of the output metadata file. This can be used to begin an import into Cloud Datastore (this project or another project). See
209
+ * google.datastore.admin.v1.ImportEntitiesRequest.input_url. Only present if the operation completed successfully.
210
+ */
211
+ outputUrl?: string;
212
+ }
213
+ interface GoogleDatastoreAdminV1ImportEntitiesMetadata {
214
+ /** Metadata common to all Datastore Admin operations. */
215
+ common?: GoogleDatastoreAdminV1CommonMetadata;
216
+ /** Description of which entities are being imported. */
217
+ entityFilter?: GoogleDatastoreAdminV1EntityFilter;
218
+ /** The location of the import metadata file. This will be the same value as the google.datastore.admin.v1.ExportEntitiesResponse.output_url field. */
219
+ inputUrl?: string;
220
+ /** An estimate of the number of bytes processed. */
221
+ progressBytes?: GoogleDatastoreAdminV1Progress;
222
+ /** An estimate of the number of entities processed. */
223
+ progressEntities?: GoogleDatastoreAdminV1Progress;
224
+ }
225
+ interface GoogleDatastoreAdminV1IndexOperationMetadata {
226
+ /** Metadata common to all Datastore Admin operations. */
227
+ common?: GoogleDatastoreAdminV1CommonMetadata;
228
+ /** The index resource ID that this operation is acting on. */
229
+ indexId?: string;
230
+ /** An estimate of the number of entities processed. */
231
+ progressEntities?: GoogleDatastoreAdminV1Progress;
232
+ }
233
+ interface GoogleDatastoreAdminV1MigrationProgressEvent {
234
+ /** Details for the `PREPARE` step. */
235
+ prepareStepDetails?: GoogleDatastoreAdminV1PrepareStepDetails;
236
+ /** Details for the `REDIRECT_WRITES` step. */
237
+ redirectWritesStepDetails?: GoogleDatastoreAdminV1RedirectWritesStepDetails;
238
+ /** The step that is starting. An event with step set to `START` indicates that the migration has been reverted back to the initial pre-migration state. */
239
+ step?: string;
240
+ }
241
+ interface GoogleDatastoreAdminV1MigrationStateEvent {
242
+ /** The new state of the migration. */
243
+ state?: string;
244
+ }
245
+ interface GoogleDatastoreAdminV1PrepareStepDetails {
246
+ /** The concurrency mode this database will use when it reaches the `REDIRECT_WRITES` step. */
247
+ concurrencyMode?: string;
248
+ }
249
+ interface GoogleDatastoreAdminV1Progress {
250
+ /** The amount of work that has been completed. Note that this may be greater than work_estimated. */
251
+ workCompleted?: string;
252
+ /** An estimate of how much work needs to be performed. May be zero if the work estimate is unavailable. */
253
+ workEstimated?: string;
254
+ }
255
+ interface GoogleDatastoreAdminV1RedirectWritesStepDetails {
256
+ /** Ths concurrency mode for this database. */
257
+ concurrencyMode?: string;
258
+ }
259
+ interface GqlQuery {
260
+ /**
261
+ * When false, the query string must not contain any literals and instead must bind all values. For example, `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
262
+ * `SELECT * FROM Kind WHERE a = @value` is.
263
+ */
264
+ allowLiterals?: boolean;
265
+ /**
266
+ * For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex `A-Za-z_$*`, must
267
+ * not match regex `__.*__`, and must not be `""`.
268
+ */
269
+ namedBindings?: { [P in string]: GqlQueryParameter };
270
+ /**
271
+ * Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in `query_string`,
272
+ * there must be an i-th numbered parameter. The inverse must also be true.
273
+ */
274
+ positionalBindings?: GqlQueryParameter[];
275
+ /** A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). */
276
+ queryString?: string;
277
+ }
278
+ interface GqlQueryParameter {
279
+ /** A query cursor. Query cursors are returned in query result batches. */
280
+ cursor?: string;
281
+ /** A value parameter. */
282
+ value?: Value;
283
+ }
284
+ interface Key {
285
+ /** Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition. */
286
+ partitionId?: PartitionId;
287
+ /**
288
+ * The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a
289
+ * _root entity_, the second element identifies a _child_ of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all
290
+ * prefixes of the path are called the element's _ancestors_. An entity path is always fully complete: *all* of the entity's ancestors are required to be in the path along with the
291
+ * entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. For example, the last
292
+ * path element of the key of `Mutation.insert` may have no identifier. A path can never be empty, and a path can have at most 100 elements.
293
+ */
294
+ path?: PathElement[];
295
+ }
296
+ interface KindExpression {
297
+ /** The name of the kind. */
298
+ name?: string;
299
+ }
300
+ interface LatLng {
301
+ /** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
302
+ latitude?: number;
303
+ /** The longitude in degrees. It must be in the range [-180.0, +180.0]. */
304
+ longitude?: number;
305
+ }
306
+ interface LookupRequest {
307
+ /** Required. Keys of entities to look up. */
308
+ keys?: Key[];
309
+ /** The options for this lookup request. */
310
+ readOptions?: ReadOptions;
311
+ }
312
+ interface LookupResponse {
313
+ /** A list of keys that were not looked up due to resource constraints. The order of results in this field is undefined and has no relation to the order of the keys in the input. */
314
+ deferred?: Key[];
315
+ /** Entities found as `ResultType.FULL` entities. The order of results in this field is undefined and has no relation to the order of the keys in the input. */
316
+ found?: EntityResult[];
317
+ /** Entities not found as `ResultType.KEY_ONLY` entities. The order of results in this field is undefined and has no relation to the order of the keys in the input. */
318
+ missing?: EntityResult[];
319
+ /** The time at which these entities were read or found missing. */
320
+ readTime?: string;
321
+ }
322
+ interface Mutation {
323
+ /** The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts. */
324
+ baseVersion?: string;
325
+ /** The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only. */
326
+ delete?: Key;
327
+ /** The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete. */
328
+ insert?: Entity;
329
+ /** The entity to update. The entity must already exist. Must have a complete key path. */
330
+ update?: Entity;
331
+ /** The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts. */
332
+ updateTime?: string;
333
+ /** The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete. */
334
+ upsert?: Entity;
335
+ }
336
+ interface MutationResult {
337
+ /** Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation. */
338
+ conflictDetected?: boolean;
339
+ /** The automatically allocated key. Set only when the mutation allocated a key. */
340
+ key?: Key;
341
+ /**
342
+ * The update time of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of
343
+ * the current entity. This field will not be set after a 'delete'.
344
+ */
345
+ updateTime?: string;
346
+ /**
347
+ * The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current
348
+ * entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity.
349
+ */
350
+ version?: string;
351
+ }
352
+ interface PartitionId {
353
+ /** If not empty, the ID of the namespace to which the entities belong. */
354
+ namespaceId?: string;
355
+ /** The ID of the project to which the entities belong. */
356
+ projectId?: string;
357
+ }
358
+ interface PathElement {
359
+ /** The auto-allocated ID of the entity. Never equal to zero. Values less than zero are discouraged and may not be supported in the future. */
360
+ id?: string;
361
+ /**
362
+ * The kind of the entity. A kind matching regex `__.*__` is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be `""`. Must be valid UTF-8
363
+ * bytes. Legacy values that are not valid UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding of the bytes.
364
+ */
365
+ kind?: string;
366
+ /**
367
+ * The name of the entity. A name matching regex `__.*__` is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be `""`. Must be valid UTF-8 bytes.
368
+ * Legacy values that are not valid UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding of the bytes.
369
+ */
370
+ name?: string;
371
+ }
372
+ interface Projection {
373
+ /** The property to project. */
374
+ property?: PropertyReference;
375
+ }
376
+ interface PropertyFilter {
377
+ /** The operator to filter by. */
378
+ op?: string;
379
+ /** The property to filter by. */
380
+ property?: PropertyReference;
381
+ /** The value to compare the property to. */
382
+ value?: Value;
383
+ }
384
+ interface PropertyOrder {
385
+ /** The direction to order by. Defaults to `ASCENDING`. */
386
+ direction?: string;
387
+ /** The property to order by. */
388
+ property?: PropertyReference;
389
+ }
390
+ interface PropertyReference {
391
+ /** The name of the property. If name includes "."s, it may be interpreted as a property name path. */
392
+ name?: string;
393
+ }
394
+ interface Query {
395
+ /**
396
+ * The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are
397
+ * returned).
398
+ */
399
+ distinctOn?: PropertyReference[];
400
+ /**
401
+ * An ending point for the query results. Query cursors are returned in query result batches and [can only be used to limit the same
402
+ * query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
403
+ */
404
+ endCursor?: string;
405
+ /** The filter to apply. */
406
+ filter?: Filter;
407
+ /** The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified. */
408
+ kind?: KindExpression[];
409
+ /** The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified. */
410
+ limit?: number;
411
+ /** The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified. */
412
+ offset?: number;
413
+ /** The order to apply to the query results (if empty, order is unspecified). */
414
+ order?: PropertyOrder[];
415
+ /** The projection to return. Defaults to returning all properties. */
416
+ projection?: Projection[];
417
+ /**
418
+ * A starting point for the query results. Query cursors are returned in query result batches and [can only be used to continue the same
419
+ * query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
420
+ */
421
+ startCursor?: string;
422
+ }
423
+ interface QueryResultBatch {
424
+ /** A cursor that points to the position after the last result in the batch. */
425
+ endCursor?: string;
426
+ /** The results for this batch. */
427
+ entityResults?: EntityResult[];
428
+ /** The result type for every entity in `entity_results`. */
429
+ entityResultType?: string;
430
+ /** The state of the query after the current batch. */
431
+ moreResults?: string;
432
+ /**
433
+ * Read timestamp this batch was returned from. This applies to the range of results from the query's `start_cursor` (or the beginning of the query if no cursor was given) to this
434
+ * batch's `end_cursor` (not the query's `end_cursor`). In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read
435
+ * timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.
436
+ */
437
+ readTime?: string;
438
+ /** A cursor that points to the position after the last skipped result. Will be set when `skipped_results` != 0. */
439
+ skippedCursor?: string;
440
+ /** The number of results skipped, typically because of an offset. */
441
+ skippedResults?: number;
442
+ /**
443
+ * The version number of the snapshot this batch was returned from. This applies to the range of results from the query's `start_cursor` (or the beginning of the query if no cursor was
444
+ * given) to this batch's `end_cursor` (not the query's `end_cursor`). In a single transaction, subsequent query result batches for the same query can have a greater snapshot version
445
+ * number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.
446
+ */
447
+ snapshotVersion?: string;
448
+ }
449
+ interface ReadOnly {
450
+ /** Reads entities at the given time. This may not be older than 60 seconds. */
451
+ readTime?: string;
452
+ }
453
+ interface ReadOptions {
454
+ /** The non-transactional read consistency to use. Cannot be set to `STRONG` for global queries. */
455
+ readConsistency?: string;
456
+ /** Reads entities as they were at the given time. This may not be older than 270 seconds. This value is only supported for Cloud Firestore in Datastore mode. */
457
+ readTime?: string;
458
+ /** The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction. */
459
+ transaction?: string;
460
+ }
461
+ interface ReadWrite {
462
+ /** The transaction identifier of the transaction being retried. */
463
+ previousTransaction?: string;
464
+ }
465
+ interface ReserveIdsRequest {
466
+ /** If not empty, the ID of the database against which to make the request. */
467
+ databaseId?: string;
468
+ /** Required. A list of keys with complete key paths whose numeric IDs should not be auto-allocated. */
469
+ keys?: Key[];
470
+ }
471
+ // tslint:disable-next-line:no-empty-interface
472
+ interface ReserveIdsResponse {
473
+ }
474
+ interface RollbackRequest {
475
+ /** Required. The transaction identifier, returned by a call to Datastore.BeginTransaction. */
476
+ transaction?: string;
477
+ }
478
+ // tslint:disable-next-line:no-empty-interface
479
+ interface RollbackResponse {
480
+ }
481
+ interface RunQueryRequest {
482
+ /** The GQL query to run. This query must be a non-aggregation query. */
483
+ gqlQuery?: GqlQuery;
484
+ /**
485
+ * Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context
486
+ * partition ID.
487
+ */
488
+ partitionId?: PartitionId;
489
+ /** The query to run. */
490
+ query?: Query;
491
+ /** The options for this query. */
492
+ readOptions?: ReadOptions;
493
+ }
494
+ interface RunQueryResponse {
495
+ /** A batch of query results (always present). */
496
+ batch?: QueryResultBatch;
497
+ /** The parsed form of the `GqlQuery` from the request, if it was set. */
498
+ query?: Query;
499
+ }
500
+ interface TransactionOptions {
501
+ /** The transaction should only allow reads. */
502
+ readOnly?: ReadOnly;
503
+ /** The transaction should allow both reads and writes. */
504
+ readWrite?: ReadWrite;
505
+ }
506
+ interface Value {
507
+ /** An array value. Cannot contain another array value. A `Value` instance that sets field `array_value` must not set fields `meaning` or `exclude_from_indexes`. */
508
+ arrayValue?: ArrayValue;
509
+ /** A blob value. May have at most 1,000,000 bytes. When `exclude_from_indexes` is false, may have at most 1500 bytes. In JSON requests, must be base64-encoded. */
510
+ blobValue?: string;
511
+ /** A boolean value. */
512
+ booleanValue?: boolean;
513
+ /** A double value. */
514
+ doubleValue?: number;
515
+ /** An entity value. - May have no key. - May have a key with an incomplete key path. - May have a reserved/read-only key. */
516
+ entityValue?: Entity;
517
+ /** If the value should be excluded from all indexes including those defined explicitly. */
518
+ excludeFromIndexes?: boolean;
519
+ /** A geo point value representing a point on the surface of Earth. */
520
+ geoPointValue?: LatLng;
521
+ /** An integer value. */
522
+ integerValue?: string;
523
+ /** A key value. */
524
+ keyValue?: Key;
525
+ /** The `meaning` field should only be populated for backwards compatibility. */
526
+ meaning?: number;
527
+ /** A null value. */
528
+ nullValue?: string;
529
+ /** A UTF-8 encoded string value. When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes. */
530
+ stringValue?: string;
531
+ /** A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down. */
532
+ timestampValue?: string;
533
+ }
534
+ interface ProjectsResource {
535
+ /** Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted. */
536
+ allocateIds(request: {
537
+ /** V1 error format. */
538
+ "$.xgafv"?: string;
539
+ /** OAuth access token. */
540
+ access_token?: string;
541
+ /** Data format for response. */
542
+ alt?: string;
543
+ /** JSONP */
544
+ callback?: string;
545
+ /** Selector specifying which fields to include in a partial response. */
546
+ fields?: string;
547
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
548
+ key?: string;
549
+ /** OAuth 2.0 token for the current user. */
550
+ oauth_token?: string;
551
+ /** Returns response with indentations and line breaks. */
552
+ prettyPrint?: boolean;
553
+ /** Required. The ID of the project against which to make the request. */
554
+ projectId: string;
555
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
556
+ quotaUser?: string;
557
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
558
+ upload_protocol?: string;
559
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
560
+ uploadType?: string;
561
+ /** Request body */
562
+ resource: AllocateIdsRequest;
563
+ }): Request<AllocateIdsResponse>;
564
+ allocateIds(request: {
565
+ /** V1 error format. */
566
+ "$.xgafv"?: string;
567
+ /** OAuth access token. */
568
+ access_token?: string;
569
+ /** Data format for response. */
570
+ alt?: string;
571
+ /** JSONP */
572
+ callback?: string;
573
+ /** Selector specifying which fields to include in a partial response. */
574
+ fields?: string;
575
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
576
+ key?: string;
577
+ /** OAuth 2.0 token for the current user. */
578
+ oauth_token?: string;
579
+ /** Returns response with indentations and line breaks. */
580
+ prettyPrint?: boolean;
581
+ /** Required. The ID of the project against which to make the request. */
582
+ projectId: string;
583
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
584
+ quotaUser?: string;
585
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
586
+ upload_protocol?: string;
587
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
588
+ uploadType?: string;
589
+ },
590
+ body: AllocateIdsRequest): Request<AllocateIdsResponse>;
591
+ /** Begins a new transaction. */
592
+ beginTransaction(request: {
593
+ /** V1 error format. */
594
+ "$.xgafv"?: string;
595
+ /** OAuth access token. */
596
+ access_token?: string;
597
+ /** Data format for response. */
598
+ alt?: string;
599
+ /** JSONP */
600
+ callback?: string;
601
+ /** Selector specifying which fields to include in a partial response. */
602
+ fields?: string;
603
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
604
+ key?: string;
605
+ /** OAuth 2.0 token for the current user. */
606
+ oauth_token?: string;
607
+ /** Returns response with indentations and line breaks. */
608
+ prettyPrint?: boolean;
609
+ /** Required. The ID of the project against which to make the request. */
610
+ projectId: string;
611
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
612
+ quotaUser?: string;
613
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
614
+ upload_protocol?: string;
615
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
616
+ uploadType?: string;
617
+ /** Request body */
618
+ resource: BeginTransactionRequest;
619
+ }): Request<BeginTransactionResponse>;
620
+ beginTransaction(request: {
621
+ /** V1 error format. */
622
+ "$.xgafv"?: string;
623
+ /** OAuth access token. */
624
+ access_token?: string;
625
+ /** Data format for response. */
626
+ alt?: string;
627
+ /** JSONP */
628
+ callback?: string;
629
+ /** Selector specifying which fields to include in a partial response. */
630
+ fields?: string;
631
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
632
+ key?: string;
633
+ /** OAuth 2.0 token for the current user. */
634
+ oauth_token?: string;
635
+ /** Returns response with indentations and line breaks. */
636
+ prettyPrint?: boolean;
637
+ /** Required. The ID of the project against which to make the request. */
638
+ projectId: string;
639
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
640
+ quotaUser?: string;
641
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
642
+ upload_protocol?: string;
643
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
644
+ uploadType?: string;
645
+ },
646
+ body: BeginTransactionRequest): Request<BeginTransactionResponse>;
647
+ /** Commits a transaction, optionally creating, deleting or modifying some entities. */
648
+ commit(request: {
649
+ /** V1 error format. */
650
+ "$.xgafv"?: string;
651
+ /** OAuth access token. */
652
+ access_token?: string;
653
+ /** Data format for response. */
654
+ alt?: string;
655
+ /** JSONP */
656
+ callback?: string;
657
+ /** Selector specifying which fields to include in a partial response. */
658
+ fields?: string;
659
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
660
+ key?: string;
661
+ /** OAuth 2.0 token for the current user. */
662
+ oauth_token?: string;
663
+ /** Returns response with indentations and line breaks. */
664
+ prettyPrint?: boolean;
665
+ /** Required. The ID of the project against which to make the request. */
666
+ projectId: string;
667
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
668
+ quotaUser?: string;
669
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
670
+ upload_protocol?: string;
671
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
672
+ uploadType?: string;
673
+ /** Request body */
674
+ resource: CommitRequest;
675
+ }): Request<CommitResponse>;
676
+ commit(request: {
677
+ /** V1 error format. */
678
+ "$.xgafv"?: string;
679
+ /** OAuth access token. */
680
+ access_token?: string;
681
+ /** Data format for response. */
682
+ alt?: string;
683
+ /** JSONP */
684
+ callback?: string;
685
+ /** Selector specifying which fields to include in a partial response. */
686
+ fields?: string;
687
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
688
+ key?: string;
689
+ /** OAuth 2.0 token for the current user. */
690
+ oauth_token?: string;
691
+ /** Returns response with indentations and line breaks. */
692
+ prettyPrint?: boolean;
693
+ /** Required. The ID of the project against which to make the request. */
694
+ projectId: string;
695
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
696
+ quotaUser?: string;
697
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
698
+ upload_protocol?: string;
699
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
700
+ uploadType?: string;
701
+ },
702
+ body: CommitRequest): Request<CommitResponse>;
703
+ /** Looks up entities by key. */
704
+ lookup(request: {
705
+ /** V1 error format. */
706
+ "$.xgafv"?: string;
707
+ /** OAuth access token. */
708
+ access_token?: string;
709
+ /** Data format for response. */
710
+ alt?: string;
711
+ /** JSONP */
712
+ callback?: string;
713
+ /** Selector specifying which fields to include in a partial response. */
714
+ fields?: string;
715
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
716
+ key?: string;
717
+ /** OAuth 2.0 token for the current user. */
718
+ oauth_token?: string;
719
+ /** Returns response with indentations and line breaks. */
720
+ prettyPrint?: boolean;
721
+ /** Required. The ID of the project against which to make the request. */
722
+ projectId: string;
723
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
724
+ quotaUser?: string;
725
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
726
+ upload_protocol?: string;
727
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
728
+ uploadType?: string;
729
+ /** Request body */
730
+ resource: LookupRequest;
731
+ }): Request<LookupResponse>;
732
+ lookup(request: {
733
+ /** V1 error format. */
734
+ "$.xgafv"?: string;
735
+ /** OAuth access token. */
736
+ access_token?: string;
737
+ /** Data format for response. */
738
+ alt?: string;
739
+ /** JSONP */
740
+ callback?: string;
741
+ /** Selector specifying which fields to include in a partial response. */
742
+ fields?: string;
743
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
744
+ key?: string;
745
+ /** OAuth 2.0 token for the current user. */
746
+ oauth_token?: string;
747
+ /** Returns response with indentations and line breaks. */
748
+ prettyPrint?: boolean;
749
+ /** Required. The ID of the project against which to make the request. */
750
+ projectId: string;
751
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
752
+ quotaUser?: string;
753
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
754
+ upload_protocol?: string;
755
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
756
+ uploadType?: string;
757
+ },
758
+ body: LookupRequest): Request<LookupResponse>;
759
+ /** Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore. */
760
+ reserveIds(request: {
761
+ /** V1 error format. */
762
+ "$.xgafv"?: string;
763
+ /** OAuth access token. */
764
+ access_token?: string;
765
+ /** Data format for response. */
766
+ alt?: string;
767
+ /** JSONP */
768
+ callback?: string;
769
+ /** Selector specifying which fields to include in a partial response. */
770
+ fields?: string;
771
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
772
+ key?: string;
773
+ /** OAuth 2.0 token for the current user. */
774
+ oauth_token?: string;
775
+ /** Returns response with indentations and line breaks. */
776
+ prettyPrint?: boolean;
777
+ /** Required. The ID of the project against which to make the request. */
778
+ projectId: string;
779
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
780
+ quotaUser?: string;
781
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
782
+ upload_protocol?: string;
783
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
784
+ uploadType?: string;
785
+ /** Request body */
786
+ resource: ReserveIdsRequest;
787
+ }): Request<{}>;
788
+ reserveIds(request: {
789
+ /** V1 error format. */
790
+ "$.xgafv"?: string;
791
+ /** OAuth access token. */
792
+ access_token?: string;
793
+ /** Data format for response. */
794
+ alt?: string;
795
+ /** JSONP */
796
+ callback?: string;
797
+ /** Selector specifying which fields to include in a partial response. */
798
+ fields?: string;
799
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
800
+ key?: string;
801
+ /** OAuth 2.0 token for the current user. */
802
+ oauth_token?: string;
803
+ /** Returns response with indentations and line breaks. */
804
+ prettyPrint?: boolean;
805
+ /** Required. The ID of the project against which to make the request. */
806
+ projectId: string;
807
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
808
+ quotaUser?: string;
809
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
810
+ upload_protocol?: string;
811
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
812
+ uploadType?: string;
813
+ },
814
+ body: ReserveIdsRequest): Request<{}>;
815
+ /** Rolls back a transaction. */
816
+ rollback(request: {
817
+ /** V1 error format. */
818
+ "$.xgafv"?: string;
819
+ /** OAuth access token. */
820
+ access_token?: string;
821
+ /** Data format for response. */
822
+ alt?: string;
823
+ /** JSONP */
824
+ callback?: string;
825
+ /** Selector specifying which fields to include in a partial response. */
826
+ fields?: string;
827
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
828
+ key?: string;
829
+ /** OAuth 2.0 token for the current user. */
830
+ oauth_token?: string;
831
+ /** Returns response with indentations and line breaks. */
832
+ prettyPrint?: boolean;
833
+ /** Required. The ID of the project against which to make the request. */
834
+ projectId: string;
835
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
836
+ quotaUser?: string;
837
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
838
+ upload_protocol?: string;
839
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
840
+ uploadType?: string;
841
+ /** Request body */
842
+ resource: RollbackRequest;
843
+ }): Request<{}>;
844
+ rollback(request: {
845
+ /** V1 error format. */
846
+ "$.xgafv"?: string;
847
+ /** OAuth access token. */
848
+ access_token?: string;
849
+ /** Data format for response. */
850
+ alt?: string;
851
+ /** JSONP */
852
+ callback?: string;
853
+ /** Selector specifying which fields to include in a partial response. */
854
+ fields?: string;
855
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
856
+ key?: string;
857
+ /** OAuth 2.0 token for the current user. */
858
+ oauth_token?: string;
859
+ /** Returns response with indentations and line breaks. */
860
+ prettyPrint?: boolean;
861
+ /** Required. The ID of the project against which to make the request. */
862
+ projectId: string;
863
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
864
+ quotaUser?: string;
865
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
866
+ upload_protocol?: string;
867
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
868
+ uploadType?: string;
869
+ },
870
+ body: RollbackRequest): Request<{}>;
871
+ /** Queries for entities. */
872
+ runQuery(request: {
873
+ /** V1 error format. */
874
+ "$.xgafv"?: string;
875
+ /** OAuth access token. */
876
+ access_token?: string;
877
+ /** Data format for response. */
878
+ alt?: string;
879
+ /** JSONP */
880
+ callback?: string;
881
+ /** Selector specifying which fields to include in a partial response. */
882
+ fields?: string;
883
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
884
+ key?: string;
885
+ /** OAuth 2.0 token for the current user. */
886
+ oauth_token?: string;
887
+ /** Returns response with indentations and line breaks. */
888
+ prettyPrint?: boolean;
889
+ /** Required. The ID of the project against which to make the request. */
890
+ projectId: string;
891
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
892
+ quotaUser?: string;
893
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
894
+ upload_protocol?: string;
895
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
896
+ uploadType?: string;
897
+ /** Request body */
898
+ resource: RunQueryRequest;
899
+ }): Request<RunQueryResponse>;
900
+ runQuery(request: {
901
+ /** V1 error format. */
902
+ "$.xgafv"?: string;
903
+ /** OAuth access token. */
904
+ access_token?: string;
905
+ /** Data format for response. */
906
+ alt?: string;
907
+ /** JSONP */
908
+ callback?: string;
909
+ /** Selector specifying which fields to include in a partial response. */
910
+ fields?: string;
911
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
912
+ key?: string;
913
+ /** OAuth 2.0 token for the current user. */
914
+ oauth_token?: string;
915
+ /** Returns response with indentations and line breaks. */
916
+ prettyPrint?: boolean;
917
+ /** Required. The ID of the project against which to make the request. */
918
+ projectId: string;
919
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
920
+ quotaUser?: string;
921
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
922
+ upload_protocol?: string;
923
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
924
+ uploadType?: string;
925
+ },
926
+ body: RunQueryRequest): Request<RunQueryResponse>;
927
+ }
928
+
929
+ const projects: ProjectsResource;
930
+ }
931
+ }