Skip to content

Commit

Permalink
feat(retail): update the api
Browse files Browse the repository at this point in the history
#### retail:v2alpha

The following keys were added:
- resources.projects.resources.locations.resources.catalogs.resources.userEvents.methods.export (Total Keys: 12)
- schemas.GoogleCloudRetailV2alphaExportUserEventsRequest (Total Keys: 4)

#### retail:v2beta

The following keys were added:
- resources.projects.resources.locations.resources.catalogs.resources.userEvents.methods.export (Total Keys: 12)
- schemas.GoogleCloudRetailV2betaExportUserEventsRequest (Total Keys: 4)
  • Loading branch information
yoshi-automation committed Jul 25, 2024
1 parent 4763dcb commit e01a97a
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#collect">collect(parent, ets=None, prebuiltRule=None, rawJson=None, uri=None, userEvent=None, x__xgafv=None)</a></code></p>
<p class="firstline">Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.</p>
<p class="toc_element">
<code><a href="#export">export(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.</p>
<p class="toc_element">
<code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.</p>
Expand Down Expand Up @@ -128,6 +131,58 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="export">export(parent, body=None, x__xgafv=None)</code>
<pre>Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.

Args:
parent: string, Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog` (required)
body: object, The request body.
The object takes the form of:

{ # Request message for the `ExportUserEvents` method.
&quot;filter&quot;: &quot;A String&quot;, # A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot; eventsMissingCatalogItems eventTime&lt;&quot;2012-04-23T18:25:43.511Z&quot; eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot; eventTime &lt; &quot;2012-04-23T18:30:43.511Z&quot;` * Example 2: `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot; eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime &lt; &quot;2018-04-23T18:30:43.511Z&quot;` * Example 4: `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot;` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`
&quot;outputConfig&quot;: { # The output configuration setting. # Required. The output location of the data.
&quot;bigqueryDestination&quot;: { # The BigQuery output destination configuration. # The BigQuery location where the output is to be written to.
&quot;datasetId&quot;: &quot;A String&quot;, # Required. The ID of a BigQuery Dataset.
&quot;tableIdPrefix&quot;: &quot;A String&quot;, # Required. The prefix of exported BigQuery tables.
&quot;tableType&quot;: &quot;A String&quot;, # Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.
},
&quot;gcsDestination&quot;: { # The Google Cloud Storage output destination configuration. # The Google Cloud Storage location where the output is to be written to.
&quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json
},
},
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # 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). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>

<div class="method">
<code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
<pre>Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.
Expand Down
55 changes: 55 additions & 0 deletions docs/dyn/retail_v2beta.projects.locations.catalogs.userEvents.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#collect">collect(parent, ets=None, prebuiltRule=None, rawJson=None, uri=None, userEvent=None, x__xgafv=None)</a></code></p>
<p class="firstline">Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.</p>
<p class="toc_element">
<code><a href="#export">export(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.</p>
<p class="toc_element">
<code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.</p>
Expand Down Expand Up @@ -128,6 +131,58 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="export">export(parent, body=None, x__xgafv=None)</code>
<pre>Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.

Args:
parent: string, Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog` (required)
body: object, The request body.
The object takes the form of:

{ # Request message for the `ExportUserEvents` method.
&quot;filter&quot;: &quot;A String&quot;, # A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot; eventsMissingCatalogItems eventTime&lt;&quot;2012-04-23T18:25:43.511Z&quot; eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot; eventTime &lt; &quot;2012-04-23T18:30:43.511Z&quot;` * Example 2: `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot; eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime &lt; &quot;2018-04-23T18:30:43.511Z&quot;` * Example 4: `eventTime &gt; &quot;2012-04-23T18:25:43.511Z&quot;` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`
&quot;outputConfig&quot;: { # The output configuration setting. # Required. The output location of the data.
&quot;bigqueryDestination&quot;: { # The BigQuery output destination configuration. # The BigQuery location where the output is to be written to.
&quot;datasetId&quot;: &quot;A String&quot;, # Required. The ID of a BigQuery Dataset.
&quot;tableIdPrefix&quot;: &quot;A String&quot;, # Required. The prefix of exported BigQuery tables.
&quot;tableType&quot;: &quot;A String&quot;, # Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.
},
&quot;gcsDestination&quot;: { # The Google Cloud Storage output destination configuration. # The Google Cloud Storage location where the output is to be written to.
&quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json
},
},
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # 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). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>

<div class="method">
<code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
<pre>Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.
Expand Down
45 changes: 44 additions & 1 deletion googleapiclient/discovery_cache/documents/retail.v2alpha.json
Original file line number Diff line number Diff line change
Expand Up @@ -2259,6 +2259,34 @@
"https://www.googleapis.com/auth/cloud-platform"
]
},
"export": {
"description": "Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.",
"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:export",
"httpMethod": "POST",
"id": "retail.projects.locations.catalogs.userEvents.export",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v2alpha/{+parent}/userEvents:export",
"request": {
"$ref": "GoogleCloudRetailV2alphaExportUserEventsRequest"
},
"response": {
"$ref": "GoogleLongrunningOperation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"import": {
"description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.",
"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import",
Expand Down Expand Up @@ -2557,7 +2585,7 @@
}
}
},
"revision": "20240702",
"revision": "20240711",
"rootUrl": "https://retail.googleapis.com/",
"schemas": {
"GoogleApiHttpBody": {
Expand Down Expand Up @@ -4483,6 +4511,21 @@
},
"type": "object"
},
"GoogleCloudRetailV2alphaExportUserEventsRequest": {
"description": "Request message for the `ExportUserEvents` method.",
"id": "GoogleCloudRetailV2alphaExportUserEventsRequest",
"properties": {
"filter": {
"description": "A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime > \"2012-04-23T18:25:43.511Z\" eventsMissingCatalogItems eventTime<\"2012-04-23T18:25:43.511Z\" eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\"` * Example 2: `eventTime > \"2012-04-23T18:25:43.511Z\" eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime < \"2018-04-23T18:30:43.511Z\"` * Example 4: `eventTime > \"2012-04-23T18:25:43.511Z\"` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`",
"type": "string"
},
"outputConfig": {
"$ref": "GoogleCloudRetailV2alphaOutputConfig",
"description": "Required. The output location of the data."
}
},
"type": "object"
},
"GoogleCloudRetailV2alphaExportUserEventsResponse": {
"description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.",
"id": "GoogleCloudRetailV2alphaExportUserEventsResponse",
Expand Down
Loading

0 comments on commit e01a97a

Please sign in to comment.