@google-cloud/spanner 6.1.3 → 6.2.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,34 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
6
6
 
7
+ ## [6.2.0](https://github.com/googleapis/nodejs-spanner/compare/v6.1.4...v6.2.0) (2022-09-16)
8
+
9
+
10
+ ### Features
11
+
12
+ * Add custom instance config operations ([#1712](https://github.com/googleapis/nodejs-spanner/issues/1712)) ([4b7716b](https://github.com/googleapis/nodejs-spanner/commit/4b7716be5409698e21bb79edec5cdf1019047de8))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * Allow passing gax instance to client constructor ([#1698](https://github.com/googleapis/nodejs-spanner/issues/1698)) ([588c1a2](https://github.com/googleapis/nodejs-spanner/commit/588c1a2e0c449cfcb86cac73da32dd5794ee2baa))
18
+ * **deps:** Use grpc-gcp v1.0.0 ([#1710](https://github.com/googleapis/nodejs-spanner/issues/1710)) ([12eab9d](https://github.com/googleapis/nodejs-spanner/commit/12eab9d628b72b5a7fc88f3d5e932b7a4d70dce2))
19
+ * Move runtime dependencies from dev dependencies to dependencies ([#1704](https://github.com/googleapis/nodejs-spanner/issues/1704)) ([b2c1c0f](https://github.com/googleapis/nodejs-spanner/commit/b2c1c0f93653af6cc7bd9893ca14394f2a631b68))
20
+ * Preserve default values in x-goog-request-params header ([#1711](https://github.com/googleapis/nodejs-spanner/issues/1711)) ([f1ae513](https://github.com/googleapis/nodejs-spanner/commit/f1ae51301d4ea9b0ed1ad4d4762c249fef9f8d08))
21
+
22
+ ## [6.1.4](https://github.com/googleapis/nodejs-spanner/compare/v6.1.3...v6.1.4) (2022-09-06)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * Add hashes to requirements.txt ([#1544](https://github.com/googleapis/nodejs-spanner/issues/1544)) ([#1697](https://github.com/googleapis/nodejs-spanner/issues/1697)) ([61a1468](https://github.com/googleapis/nodejs-spanner/commit/61a1468fb0282bad642e643fc98a19d63acdcd1c))
28
+ * Better support for fallback mode ([#1694](https://github.com/googleapis/nodejs-spanner/issues/1694)) ([bbc8831](https://github.com/googleapis/nodejs-spanner/commit/bbc88317149a3d86c50ccfd98092d5bfb77a104e))
29
+ * Change import long to require ([#1695](https://github.com/googleapis/nodejs-spanner/issues/1695)) ([9283f4b](https://github.com/googleapis/nodejs-spanner/commit/9283f4bdfaea0ceececacbb80df3c37bd522b657))
30
+ * **deps:** Update dependency @google-cloud/projectify to v3 ([#1678](https://github.com/googleapis/nodejs-spanner/issues/1678)) ([e3c1499](https://github.com/googleapis/nodejs-spanner/commit/e3c1499d0bdcbe3b578c5e7dc1d725630a1a0a30))
31
+ * **deps:** Update dependency protobufjs to v7 ([#1686](https://github.com/googleapis/nodejs-spanner/issues/1686)) ([2839d23](https://github.com/googleapis/nodejs-spanner/commit/2839d2317ca7368d288ee9d7feb806f0ac2069c6))
32
+ * Target new spanner db admin service config ([#1685](https://github.com/googleapis/nodejs-spanner/issues/1685)) ([2495c07](https://github.com/googleapis/nodejs-spanner/commit/2495c0723be70cf679ffa9e86f45199dbcd8c77b))
33
+ * Test case fix to avoid the latest typescript dependency issue ([#1703](https://github.com/googleapis/nodejs-spanner/issues/1703)) ([6282f64](https://github.com/googleapis/nodejs-spanner/commit/6282f64560510ae54be26d992d168091f7e943bc))
34
+
7
35
  ## [6.1.3](https://github.com/googleapis/nodejs-spanner/compare/v6.1.2...v6.1.3) (2022-07-07)
8
36
 
9
37
 
package/README.md CHANGED
@@ -147,7 +147,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tre
147
147
  | Queryoptions | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/queryoptions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/queryoptions.js,samples/README.md) |
148
148
  | Quickstart | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
149
149
  | Sets a request tag for a single query | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/request-tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/request-tag.js,samples/README.md) |
150
- | Rpc-priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/rpc-priority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/rpc-priority.js,samples/README.md) |
150
+ | Run Batch update with RPC priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/rpc-priority-batch-dml.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/rpc-priority-batch-dml.js,samples/README.md) |
151
+ | Run partitioned update with RPC priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/rpc-priority-partitioned-dml.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/rpc-priority-partitioned-dml.js,samples/README.md) |
152
+ | Create partitions with RPC priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/rpc-priority-query-partitions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/rpc-priority-query-partitions.js,samples/README.md) |
153
+ | Read data with RPC Priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/rpc-priority-read.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/rpc-priority-read.js,samples/README.md) |
154
+ | Query data with RPC Priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/rpc-priority-run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/rpc-priority-run.js,samples/README.md) |
155
+ | Run transaction with RPC priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/rpc-priority-transaction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/rpc-priority-transaction.js,samples/README.md) |
151
156
  | Schema | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/schema.js,samples/README.md) |
152
157
  | Struct | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/struct.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/struct.js,samples/README.md) |
153
158
  | Timestamp | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/timestamp.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/timestamp.js,samples/README.md) |
@@ -187,6 +187,10 @@ service DatabaseAdmin {
187
187
  post: "/v1/{resource=projects/*/instances/*/backups/*}:testIamPermissions"
188
188
  body: "*"
189
189
  }
190
+ additional_bindings {
191
+ post: "/v1/{resource=projects/*/instances/*/databases/*/databaseRoles/*}:testIamPermissions"
192
+ body: "*"
193
+ }
190
194
  };
191
195
  option (google.api.method_signature) = "resource,permissions";
192
196
  }
@@ -334,6 +338,14 @@ service DatabaseAdmin {
334
338
  };
335
339
  option (google.api.method_signature) = "parent";
336
340
  }
341
+
342
+ // Lists Cloud Spanner database roles.
343
+ rpc ListDatabaseRoles(ListDatabaseRolesRequest) returns (ListDatabaseRolesResponse) {
344
+ option (google.api.http) = {
345
+ get: "/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles"
346
+ };
347
+ option (google.api.method_signature) = "parent";
348
+ }
337
349
  }
338
350
 
339
351
  // Information about the database restore.
@@ -868,3 +880,51 @@ enum RestoreSourceType {
868
880
  // A backup was used as the source of the restore.
869
881
  BACKUP = 1;
870
882
  }
883
+
884
+ // A Cloud Spanner database role.
885
+ message DatabaseRole {
886
+ option (google.api.resource) = {
887
+ type: "spanner.googleapis.com/DatabaseRole"
888
+ pattern: "projects/{project}/instances/{instance}/databases/{database}/databaseRoles/{role}"
889
+ };
890
+
891
+ // Required. The name of the database role. Values are of the form
892
+ // `projects/<project>/instances/<instance>/databases/<database>/databaseRoles/
893
+ // {role}`, where `<role>` is as specified in the `CREATE ROLE`
894
+ // DDL statement. This name can be passed to Get/Set IAMPolicy methods to
895
+ // identify the database role.
896
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
897
+ }
898
+
899
+ // The request for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles].
900
+ message ListDatabaseRolesRequest {
901
+ // Required. The database whose roles should be listed.
902
+ // Values are of the form
903
+ // `projects/<project>/instances/<instance>/databases/<database>/databaseRoles`.
904
+ string parent = 1 [
905
+ (google.api.field_behavior) = REQUIRED,
906
+ (google.api.resource_reference) = {
907
+ type: "spanner.googleapis.com/Database"
908
+ }
909
+ ];
910
+
911
+ // Number of database roles to be returned in the response. If 0 or less,
912
+ // defaults to the server's maximum allowed page size.
913
+ int32 page_size = 2;
914
+
915
+ // If non-empty, `page_token` should contain a
916
+ // [next_page_token][google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token] from a
917
+ // previous [ListDatabaseRolesResponse][google.spanner.admin.database.v1.ListDatabaseRolesResponse].
918
+ string page_token = 3;
919
+ }
920
+
921
+ // The response for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles].
922
+ message ListDatabaseRolesResponse {
923
+ // Database roles that matched the request.
924
+ repeated DatabaseRole database_roles = 1;
925
+
926
+ // `next_page_token` can be sent in a subsequent
927
+ // [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]
928
+ // call to fetch more of the matching roles.
929
+ string next_page_token = 2;
930
+ }
@@ -0,0 +1,42 @@
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.spanner.admin.instance.v1;
18
+
19
+ import "google/protobuf/timestamp.proto";
20
+
21
+ option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1";
22
+ option go_package = "google.golang.org/genproto/googleapis/spanner/admin/instance/v1;instance";
23
+ option java_multiple_files = true;
24
+ option java_outer_classname = "CommonProto";
25
+ option java_package = "com.google.spanner.admin.instance.v1";
26
+ option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Instance\\V1";
27
+ option ruby_package = "Google::Cloud::Spanner::Admin::Instance::V1";
28
+
29
+ // Encapsulates progress related information for a Cloud Spanner long
30
+ // running instance operations.
31
+ message OperationProgress {
32
+ // Percent completion of the operation.
33
+ // Values are between 0 and 100 inclusive.
34
+ int32 progress_percent = 1;
35
+
36
+ // Time the request was received.
37
+ google.protobuf.Timestamp start_time = 2;
38
+
39
+ // If set, the time at which this operation failed or was completed
40
+ // successfully.
41
+ google.protobuf.Timestamp end_time = 3;
42
+ }