Skip to content

Commit

Permalink
feat: Add OR query support (#1803)
Browse files Browse the repository at this point in the history
* feat: Add `OR` query support
docs: Improve the API documentation for the `Firestore.ListDocuments` RPC
docs: Minor documentation formatting and cleanup

PiperOrigin-RevId: 509631855

Source-Link: googleapis/googleapis@22bd888

Source-Link: googleapis/googleapis-gen@8b14516
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGIxNDUxNjYxOWM0OGUxZGRhYmNlYzFhZWM1NWFjMDI1NzM2NDEwMiJ9

docs: changing format of the jsdoc links

PiperOrigin-RevId: 509352615

Source-Link: googleapis/googleapis@b737d30

Source-Link: googleapis/googleapis-gen@8efadf3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGVmYWRmM2Q1ODc4MGVhMWM1NTAyNjhkNDZhM2RjNzAxYmEzN2ZjZiJ9

chore(gitignore): only ignore folders in the top level

PiperOrigin-RevId: 507603203

Source-Link: googleapis/googleapis@a4f2de4

Source-Link: googleapis/googleapis-gen@dcf8821
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGNmODgyMTU0ZTdjNzEwZWNmMmExYWJjNzdiMzVjOTVmOTA2MjM3MSJ9

chore: update .gitignore to always include protos folder

Use gapic-generator-typescript v3.0.0.

PiperOrigin-RevId: 507004755

Source-Link: googleapis/googleapis@d784f3c

Source-Link: googleapis/googleapis-gen@5e64ba8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWU2NGJhODYxNWY2NWZkZWRiMWZjZDZhYzc5MmU1ZWE2MjEwMjdlNCJ9

chore: Disable requesting numeric enums in "transport=rest" responses for nodejs-firestore

PiperOrigin-RevId: 502893047

Source-Link: googleapis/googleapis@6adf7b1

Source-Link: googleapis/googleapis-gen@bf897a5
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY4OTdhNTY3ZWI4NTUyNTk5ODU0ZGUwMDMwOGIzOGIwOGZlNjJkOSJ9

feat: Added SuggestConversationSummary RPC
docs: updated go library package

PiperOrigin-RevId: 501862436

Source-Link: googleapis/googleapis@155e0f4

Source-Link: googleapis/googleapis-gen@3051f61
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9

chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport

chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java)
PiperOrigin-RevId: 493113566

Source-Link: googleapis/googleapis@758f0d1

Source-Link: googleapis/googleapis-gen@78bd8f0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 16, 2023
1 parent 8aedc63 commit f68622e
Show file tree
Hide file tree
Showing 22 changed files with 700 additions and 269 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
/.coverage
/coverage
/.nyc_output
/docs/
/out/
/build/
system-test/secrets.js
system-test/*key.json
*.lock
Expand Down
4 changes: 2 additions & 2 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2022 Google LLC',
copyright: 'Copyright 2023 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/firestore',
Expand Down
250 changes: 250 additions & 0 deletions dev/protos/google/api/client.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ syntax = "proto3";

package google.api;

import "google/api/launch_stage.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/duration.proto";

option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
option java_multiple_files = true;
Expand Down Expand Up @@ -97,3 +99,251 @@ extend google.protobuf.ServiceOptions {
// }
string oauth_scopes = 1050;
}

// Required information for every language.
message CommonLanguageSettings {
// Link to automatically generated reference documentation. Example:
// https://cloud.google.com/nodejs/docs/reference/asset/latest
string reference_docs_uri = 1 [deprecated = true];

// The destination where API teams want this client library to be published.
repeated ClientLibraryDestination destinations = 2;
}

// Details about how and where to publish client libraries.
message ClientLibrarySettings {
// Version of the API to apply these settings to.
string version = 1;

// Launch stage of this version of the API.
LaunchStage launch_stage = 2;

// When using transport=rest, the client request will encode enums as
// numbers rather than strings.
bool rest_numeric_enums = 3;

// Settings for legacy Java features, supported in the Service YAML.
JavaSettings java_settings = 21;

// Settings for C++ client libraries.
CppSettings cpp_settings = 22;

// Settings for PHP client libraries.
PhpSettings php_settings = 23;

// Settings for Python client libraries.
PythonSettings python_settings = 24;

// Settings for Node client libraries.
NodeSettings node_settings = 25;

// Settings for .NET client libraries.
DotnetSettings dotnet_settings = 26;

// Settings for Ruby client libraries.
RubySettings ruby_settings = 27;

// Settings for Go client libraries.
GoSettings go_settings = 28;
}

// This message configures the settings for publishing [Google Cloud Client
// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
// generated from the service config.
message Publishing {
// A list of API method settings, e.g. the behavior for methods that use the
// long-running operation pattern.
repeated MethodSettings method_settings = 2;

// Link to a place that API users can report issues. Example:
// https://issuetracker.google.com/issues/new?component=190865&template=1161103
string new_issue_uri = 101;

// Link to product home page. Example:
// https://cloud.google.com/asset-inventory/docs/overview
string documentation_uri = 102;

// Used as a tracking tag when collecting data about the APIs developer
// relations artifacts like docs, packages delivered to package managers,
// etc. Example: "speech".
string api_short_name = 103;

// GitHub label to apply to issues and pull requests opened for this API.
string github_label = 104;

// GitHub teams to be added to CODEOWNERS in the directory in GitHub
// containing source code for the client libraries for this API.
repeated string codeowner_github_teams = 105;

// A prefix used in sample code when demarking regions to be included in
// documentation.
string doc_tag_prefix = 106;

// For whom the client library is being published.
ClientLibraryOrganization organization = 107;

// Client library settings. If the same version string appears multiple
// times in this list, then the last one wins. Settings from earlier
// settings with the same version string are discarded.
repeated ClientLibrarySettings library_settings = 109;
}

// Settings for Java client libraries.
message JavaSettings {
// The package name to use in Java. Clobbers the java_package option
// set in the protobuf. This should be used **only** by APIs
// who have already set the language_settings.java.package_name" field
// in gapic.yaml. API teams should use the protobuf java_package option
// where possible.
//
// Example of a YAML configuration::
//
// publishing:
// java_settings:
// library_package: com.google.cloud.pubsub.v1
string library_package = 1;

// Configure the Java class name to use instead of the service's for its
// corresponding generated GAPIC client. Keys are fully-qualified
// service names as they appear in the protobuf (including the full
// the language_settings.java.interface_names" field in gapic.yaml. API
// teams should otherwise use the service name as it appears in the
// protobuf.
//
// Example of a YAML configuration::
//
// publishing:
// java_settings:
// service_class_names:
// - google.pubsub.v1.Publisher: TopicAdmin
// - google.pubsub.v1.Subscriber: SubscriptionAdmin
map<string, string> service_class_names = 2;

// Some settings.
CommonLanguageSettings common = 3;
}

// Settings for C++ client libraries.
message CppSettings {
// Some settings.
CommonLanguageSettings common = 1;
}

// Settings for Php client libraries.
message PhpSettings {
// Some settings.
CommonLanguageSettings common = 1;
}

// Settings for Python client libraries.
message PythonSettings {
// Some settings.
CommonLanguageSettings common = 1;
}

// Settings for Node client libraries.
message NodeSettings {
// Some settings.
CommonLanguageSettings common = 1;
}

// Settings for Dotnet client libraries.
message DotnetSettings {
// Some settings.
CommonLanguageSettings common = 1;
}

// Settings for Ruby client libraries.
message RubySettings {
// Some settings.
CommonLanguageSettings common = 1;
}

// Settings for Go client libraries.
message GoSettings {
// Some settings.
CommonLanguageSettings common = 1;
}

// Describes the generator configuration for a method.
message MethodSettings {
// Describes settings to use when generating API methods that use the
// long-running operation pattern.
// All default values below are from those used in the client library
// generators (e.g.
// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
message LongRunning {
// Initial delay after which the first poll request will be made.
// Default value: 5 seconds.
google.protobuf.Duration initial_poll_delay = 1;

// Multiplier to gradually increase delay between subsequent polls until it
// reaches max_poll_delay.
// Default value: 1.5.
float poll_delay_multiplier = 2;

// Maximum time between two subsequent poll requests.
// Default value: 45 seconds.
google.protobuf.Duration max_poll_delay = 3;

// Total polling timeout.
// Default value: 5 minutes.
google.protobuf.Duration total_poll_timeout = 4;
}

// The fully qualified name of the method, for which the options below apply.
// This is used to find the method to apply the options.
string selector = 1;

// Describes settings to use for long-running operations when generating
// API methods for RPCs. Complements RPCs that use the annotations in
// google/longrunning/operations.proto.
//
// Example of a YAML configuration::
//
// publishing:
// method_behavior:
// - selector: CreateAdDomain
// long_running:
// initial_poll_delay:
// seconds: 60 # 1 minute
// poll_delay_multiplier: 1.5
// max_poll_delay:
// seconds: 360 # 6 minutes
// total_poll_timeout:
// seconds: 54000 # 90 minutes
LongRunning long_running = 2;
}

// The organization for which the client libraries are being published.
// Affects the url where generated docs are published, etc.
enum ClientLibraryOrganization {
// Not useful.
CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0;

// Google Cloud Platform Org.
CLOUD = 1;

// Ads (Advertising) Org.
ADS = 2;

// Photos Org.
PHOTOS = 3;

// Street View Org.
STREET_VIEW = 4;
}

// To where should client libraries be published?
enum ClientLibraryDestination {
// Client libraries will neither be generated nor published to package
// managers.
CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0;

// Generate the client library in a repo under github.com/googleapis,
// but don't publish it to package managers.
GITHUB = 10;

// Publish the library to package managers like nuget.org and npmjs.com.
PACKAGE_MANAGER = 20;
}
3 changes: 2 additions & 1 deletion dev/protos/google/firestore/v1/aggregation_result.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ option ruby_package = "Google::Cloud::Firestore::V1";
message AggregationResult {
// The result of the aggregation functions, ex: `COUNT(*) AS total_docs`.
//
// The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias]
// The key is the
// [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias]
// assigned to the aggregation function on input and the size of this map
// equals the number of aggregation functions in the query.
map<string, Value> aggregate_fields = 2;
Expand Down
8 changes: 5 additions & 3 deletions dev/protos/google/firestore/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ option ruby_package = "Google::Cloud::Firestore::V1";
// Used to restrict a get or update operation on a document to a subset of its
// fields.
// This is different from standard field masks, as this is always scoped to a
// [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value].
// [Document][google.firestore.v1.Document], and takes in account the dynamic
// nature of [Value][google.firestore.v1.Value].
message DocumentMask {
// The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field
// path syntax reference.
// The list of field paths in the mask. See
// [Document.fields][google.firestore.v1.Document.fields] for a field path
// syntax reference.
repeated string field_paths = 1;
}

Expand Down
Loading

0 comments on commit f68622e

Please sign in to comment.