@google-cloud/discoveryengine 0.1.0

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +202 -0
  3. package/README.md +209 -0
  4. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +93 -0
  5. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +77 -0
  6. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +261 -0
  7. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +265 -0
  8. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +182 -0
  9. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +453 -0
  10. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +122 -0
  11. package/build/protos/protos.d.ts +10120 -0
  12. package/build/protos/protos.js +26118 -0
  13. package/build/protos/protos.json +2682 -0
  14. package/build/src/index.d.ts +17 -0
  15. package/build/src/index.js +37 -0
  16. package/build/src/index.js.map +1 -0
  17. package/build/src/v1beta/document_service_client.d.ts +684 -0
  18. package/build/src/v1beta/document_service_client.js +830 -0
  19. package/build/src/v1beta/document_service_client.js.map +1 -0
  20. package/build/src/v1beta/document_service_client_config.json +77 -0
  21. package/build/src/v1beta/index.d.ts +3 -0
  22. package/build/src/v1beta/index.js +27 -0
  23. package/build/src/v1beta/index.js.map +1 -0
  24. package/build/src/v1beta/recommendation_service_client.d.ts +307 -0
  25. package/build/src/v1beta/recommendation_service_client.js +407 -0
  26. package/build/src/v1beta/recommendation_service_client.js.map +1 -0
  27. package/build/src/v1beta/recommendation_service_client_config.json +43 -0
  28. package/build/src/v1beta/user_event_service_client.d.ts +445 -0
  29. package/build/src/v1beta/user_event_service_client.js +628 -0
  30. package/build/src/v1beta/user_event_service_client.js.map +1 -0
  31. package/build/src/v1beta/user_event_service_client_config.json +62 -0
  32. package/package.json +66 -0
@@ -0,0 +1,122 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1beta;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/httpbody.proto";
23
+ import "google/api/resource.proto";
24
+ import "google/cloud/discoveryengine/v1beta/import_config.proto";
25
+ import "google/cloud/discoveryengine/v1beta/user_event.proto";
26
+ import "google/longrunning/operations.proto";
27
+
28
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
29
+ option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "UserEventServiceProto";
32
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
33
+ option objc_class_prefix = "DISCOVERYENGINE";
34
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
35
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
36
+
37
+ // Service for ingesting end user actions on a website to Discovery Engine API.
38
+ service UserEventService {
39
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
40
+ option (google.api.oauth_scopes) =
41
+ "https://www.googleapis.com/auth/cloud-platform";
42
+
43
+ // Writes a single user event.
44
+ rpc WriteUserEvent(WriteUserEventRequest) returns (UserEvent) {
45
+ option (google.api.http) = {
46
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write"
47
+ body: "user_event"
48
+ };
49
+ }
50
+
51
+ // Writes a single user event from the browser. This uses a GET request to
52
+ // due to browser restriction of POST-ing to a 3rd party domain.
53
+ //
54
+ // This method is used only by the Discovery Engine API JavaScript pixel and
55
+ // Google Tag Manager. Users should not call this method directly.
56
+ rpc CollectUserEvent(CollectUserEventRequest) returns (google.api.HttpBody) {
57
+ option (google.api.http) = {
58
+ get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect"
59
+ };
60
+ }
61
+
62
+ // Bulk import of User events. Request processing might be
63
+ // synchronous. Events that already exist are skipped.
64
+ // Use this method for backfilling historical user events.
65
+ //
66
+ // Operation.response is of type ImportResponse. Note that it is
67
+ // possible for a subset of the items to be successfully inserted.
68
+ // Operation.metadata is of type ImportMetadata.
69
+ rpc ImportUserEvents(ImportUserEventsRequest)
70
+ returns (google.longrunning.Operation) {
71
+ option (google.api.http) = {
72
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import"
73
+ body: "*"
74
+ };
75
+ option (google.longrunning.operation_info) = {
76
+ response_type: "google.cloud.discoveryengine.v1beta.ImportUserEventsResponse"
77
+ metadata_type: "google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata"
78
+ };
79
+ }
80
+ }
81
+
82
+ // Request message for WriteUserEvent method.
83
+ message WriteUserEventRequest {
84
+ // Required. The parent DataStore resource name, such as
85
+ // `projects/{project}/locations/{location}/dataStores/{data_store}`.
86
+ string parent = 1 [
87
+ (google.api.field_behavior) = REQUIRED,
88
+ (google.api.resource_reference) = {
89
+ type: "discoveryengine.googleapis.com/DataStore"
90
+ }
91
+ ];
92
+
93
+ // Required. User event to write.
94
+ optional UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
95
+ }
96
+
97
+ // Request message for CollectUserEvent method.
98
+ message CollectUserEventRequest {
99
+ // Required. The parent DataStore resource name, such as
100
+ // `projects/{project}/locations/{location}/dataStores/{data_store}`.
101
+ string parent = 1 [
102
+ (google.api.field_behavior) = REQUIRED,
103
+ (google.api.resource_reference) = {
104
+ type: "discoveryengine.googleapis.com/DataStore"
105
+ }
106
+ ];
107
+
108
+ // Required. URL encoded UserEvent proto with a length limit of 2,000,000
109
+ // characters.
110
+ string user_event = 2 [(google.api.field_behavior) = REQUIRED];
111
+
112
+ // The URL including cgi-parameters but excluding the hash fragment with a
113
+ // length limit of 5,000 characters. This is often more useful than the
114
+ // referer URL, because many browsers only send the domain for 3rd party
115
+ // requests.
116
+ optional string uri = 3;
117
+
118
+ // The event timestamp in milliseconds. This prevents browser caching of
119
+ // otherwise identical get requests. The name is abbreviated to reduce the
120
+ // payload bytes.
121
+ optional int64 ets = 4;
122
+ }