Skip to content

Commit

Permalink
feat(datastore): update the API
Browse files Browse the repository at this point in the history
#### datastore:v1beta3

The following keys were added:
- schemas.EntityResult.properties.createTime.description
- schemas.EntityResult.properties.createTime.format
- schemas.EntityResult.properties.createTime.type
- schemas.MutationResult.properties.createTime.description
- schemas.MutationResult.properties.createTime.format
- schemas.MutationResult.properties.createTime.type

The following keys were changed:
- schemas.PropertyFilter.properties.op.enumDescriptions

#### datastore:v1

The following keys were added:
- schemas.CommitRequest.properties.singleUseTransaction.$ref
- schemas.CommitRequest.properties.singleUseTransaction.description
- schemas.EntityResult.properties.createTime.description
- schemas.EntityResult.properties.createTime.format
- schemas.EntityResult.properties.createTime.type
- schemas.LookupResponse.properties.transaction.description
- schemas.LookupResponse.properties.transaction.format
- schemas.LookupResponse.properties.transaction.type
- schemas.MutationResult.properties.createTime.description
- schemas.MutationResult.properties.createTime.format
- schemas.MutationResult.properties.createTime.type
- schemas.ReadOptions.properties.newTransaction.$ref
- schemas.ReadOptions.properties.newTransaction.description
- schemas.RunAggregationQueryResponse.properties.transaction.description
- schemas.RunAggregationQueryResponse.properties.transaction.format
- schemas.RunAggregationQueryResponse.properties.transaction.type
- schemas.RunQueryResponse.properties.transaction.description
- schemas.RunQueryResponse.properties.transaction.format
- schemas.RunQueryResponse.properties.transaction.type

The following keys were changed:
- schemas.PropertyFilter.properties.op.enumDescriptions
  • Loading branch information
yoshi-automation authored and sofisl committed Feb 2, 2023
1 parent 19c4726 commit 69b9f8c
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 7 deletions.
37 changes: 35 additions & 2 deletions discovery/datastore-v1.json
Expand Up @@ -654,7 +654,7 @@
}
}
},
"revision": "20221018",
"revision": "20230126",
"rootUrl": "https://datastore.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -843,6 +843,10 @@
},
"type": "array"
},
"singleUseTransaction": {
"$ref": "TransactionOptions",
"description": "Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, TransactionOptions.mode must be TransactionOptions.ReadWrite."
},
"transaction": {
"description": "The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.",
"format": "byte",
Expand Down Expand Up @@ -941,6 +945,11 @@
"description": "The result of fetching an entity from Datastore.",
"id": "EntityResult",
"properties": {
"createTime": {
"description": "The time at which the entity was created. This field is set for `FULL` entity results. If this entity is missing, this field will not be set.",
"format": "google-datetime",
"type": "string"
},
"cursor": {
"description": "A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.",
"format": "byte",
Expand Down Expand Up @@ -1829,6 +1838,11 @@
"description": "The time at which these entities were read or found missing.",
"format": "google-datetime",
"type": "string"
},
"transaction": {
"description": "The identifier of the transaction that was started as part of this Lookup request. Set only when ReadOptions.new_transaction was set in LookupRequest.read_options.",
"format": "byte",
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -1874,6 +1888,11 @@
"description": "Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.",
"type": "boolean"
},
"createTime": {
"description": "The create time of the entity. This field will not be set after a 'delete'.",
"format": "google-datetime",
"type": "string"
},
"key": {
"$ref": "Key",
"description": "The automatically allocated key. Set only when the mutation allocated a key."
Expand Down Expand Up @@ -1968,7 +1987,7 @@
"The given `property` is equal to the given `value`.",
"The given `property` is equal to at least one value in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN` or `NOT_IN` is in the same query.",
"The given `property` is not equal to the given `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That `property` comes first in the `order_by`.",
"Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key.",
"Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key. * No other `HAS_ANCESTOR` is in the same query.",
"The value of the `property` is not in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That `field` comes first in the `order_by`."
],
"type": "string"
Expand Down Expand Up @@ -2168,6 +2187,10 @@
"description": "The options shared by read requests.",
"id": "ReadOptions",
"properties": {
"newTransaction": {
"$ref": "TransactionOptions",
"description": "Options for beginning a new transaction for this request. The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction."
},
"readConsistency": {
"description": "The non-transactional read consistency to use.",
"enum": [
Expand Down Expand Up @@ -2291,6 +2314,11 @@
"query": {
"$ref": "AggregationQuery",
"description": "The parsed form of the `GqlQuery` from the request, if it was set."
},
"transaction": {
"description": "The identifier of the transaction that was started as part of this RunAggregationQuery request. Set only when ReadOptions.new_transaction was set in RunAggregationQueryRequest.read_options.",
"format": "byte",
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -2333,6 +2361,11 @@
"query": {
"$ref": "Query",
"description": "The parsed form of the `GqlQuery` from the request, if it was set."
},
"transaction": {
"description": "The identifier of the transaction that was started as part of this RunQuery request. Set only when ReadOptions.new_transaction was set in RunQueryRequest.read_options.",
"format": "byte",
"type": "string"
}
},
"type": "object"
Expand Down
14 changes: 12 additions & 2 deletions discovery/datastore-v1beta3.json
Expand Up @@ -336,7 +336,7 @@
}
}
},
"revision": "20221018",
"revision": "20230126",
"rootUrl": "https://datastore.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -605,6 +605,11 @@
"description": "The result of fetching an entity from Datastore.",
"id": "EntityResult",
"properties": {
"createTime": {
"description": "The time at which the entity was created. This field is set for `FULL` entity results. If this entity is missing, this field will not be set.",
"format": "google-datetime",
"type": "string"
},
"cursor": {
"description": "A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.",
"format": "byte",
Expand Down Expand Up @@ -1333,6 +1338,11 @@
"description": "Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.",
"type": "boolean"
},
"createTime": {
"description": "The create time of the entity. This field will not be set after a 'delete'.",
"format": "google-datetime",
"type": "string"
},
"key": {
"$ref": "Key",
"description": "The automatically allocated key. Set only when the mutation allocated a key."
Expand Down Expand Up @@ -1423,7 +1433,7 @@
"The given `property` is equal to the given `value`.",
"The given `property` is equal to at least one value in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN` or `NOT_IN` is in the same query.",
"The given `property` is not equal to the given `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That `property` comes first in the `order_by`.",
"Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key.",
"Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key. * No other `HAS_ANCESTOR` is in the same query.",
"The value of the `property` is not in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That `field` comes first in the `order_by`."
],
"type": "string"
Expand Down
38 changes: 35 additions & 3 deletions src/apis/datastore/v1.ts
Expand Up @@ -245,6 +245,10 @@ export namespace datastore_v1 {
* 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 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 is `NON_TRANSACTIONAL`, no two mutations may affect a single entity.
*/
mutations?: Schema$Mutation[];
/**
* Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, TransactionOptions.mode must be TransactionOptions.ReadWrite.
*/
singleUseTransaction?: Schema$TransactionOptions;
/**
* The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.
*/
Expand Down Expand Up @@ -310,6 +314,10 @@ export namespace datastore_v1 {
* The result of fetching an entity from Datastore.
*/
export interface Schema$EntityResult {
/**
* The time at which the entity was created. This field is set for `FULL` entity results. If this entity is missing, this field will not be set.
*/
createTime?: string | null;
/**
* A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.
*/
Expand Down Expand Up @@ -867,6 +875,10 @@ export namespace datastore_v1 {
* The time at which these entities were read or found missing.
*/
readTime?: string | null;
/**
* The identifier of the transaction that was started as part of this Lookup request. Set only when ReadOptions.new_transaction was set in LookupRequest.read_options.
*/
transaction?: string | null;
}
/**
* A mutation to apply to an entity.
Expand Down Expand Up @@ -905,6 +917,10 @@ export namespace datastore_v1 {
* Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.
*/
conflictDetected?: boolean | null;
/**
* The create time of the entity. This field will not be set after a 'delete'.
*/
createTime?: string | null;
/**
* The automatically allocated key. Set only when the mutation allocated a key.
*/
Expand Down Expand Up @@ -1091,6 +1107,10 @@ export namespace datastore_v1 {
* The options shared by read requests.
*/
export interface Schema$ReadOptions {
/**
* Options for beginning a new transaction for this request. The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.
*/
newTransaction?: Schema$TransactionOptions;
/**
* The non-transactional read consistency to use.
*/
Expand Down Expand Up @@ -1184,6 +1204,10 @@ export namespace datastore_v1 {
* The parsed form of the `GqlQuery` from the request, if it was set.
*/
query?: Schema$AggregationQuery;
/**
* The identifier of the transaction that was started as part of this RunAggregationQuery request. Set only when ReadOptions.new_transaction was set in RunAggregationQueryRequest.read_options.
*/
transaction?: string | null;
}
/**
* The request for Datastore.RunQuery.
Expand Down Expand Up @@ -1222,6 +1246,10 @@ export namespace datastore_v1 {
* The parsed form of the `GqlQuery` from the request, if it was set.
*/
query?: Schema$Query;
/**
* The identifier of the transaction that was started as part of this RunQuery request. Set only when ReadOptions.new_transaction was set in RunQueryRequest.read_options.
*/
transaction?: string | null;
}
/**
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
Expand Down Expand Up @@ -1654,6 +1682,7 @@ export namespace datastore_v1 {
* // "databaseId": "my_databaseId",
* // "mode": "my_mode",
* // "mutations": [],
* // "singleUseTransaction": {},
* // "transaction": "my_transaction"
* // }
* },
Expand Down Expand Up @@ -2112,7 +2141,8 @@ export namespace datastore_v1 {
* // "deferred": [],
* // "found": [],
* // "missing": [],
* // "readTime": "my_readTime"
* // "readTime": "my_readTime",
* // "transaction": "my_transaction"
* // }
* }
*
Expand Down Expand Up @@ -2537,7 +2567,8 @@ export namespace datastore_v1 {
* // Example response
* // {
* // "batch": {},
* // "query": {}
* // "query": {},
* // "transaction": "my_transaction"
* // }
* }
*
Expand Down Expand Up @@ -2688,7 +2719,8 @@ export namespace datastore_v1 {
* // Example response
* // {
* // "batch": {},
* // "query": {}
* // "query": {},
* // "transaction": "my_transaction"
* // }
* }
*
Expand Down
8 changes: 8 additions & 0 deletions src/apis/datastore/v1beta3.ts
Expand Up @@ -294,6 +294,10 @@ export namespace datastore_v1beta3 {
* The result of fetching an entity from Datastore.
*/
export interface Schema$EntityResult {
/**
* The time at which the entity was created. This field is set for `FULL` entity results. If this entity is missing, this field will not be set.
*/
createTime?: string | null;
/**
* A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.
*/
Expand Down Expand Up @@ -758,6 +762,10 @@ export namespace datastore_v1beta3 {
* Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.
*/
conflictDetected?: boolean | null;
/**
* The create time of the entity. This field will not be set after a 'delete'.
*/
createTime?: string | null;
/**
* The automatically allocated key. Set only when the mutation allocated a key.
*/
Expand Down

0 comments on commit 69b9f8c

Please sign in to comment.