@google-cloud/spanner 7.21.0 → 8.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 (76) hide show
  1. package/README.md +2 -0
  2. package/build/protos/google/spanner/admin/database/v1/backup.proto +1 -1
  3. package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +1 -1
  4. package/build/protos/google/spanner/admin/database/v1/common.proto +1 -1
  5. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +36 -1
  6. package/build/protos/google/spanner/admin/instance/v1/common.proto +1 -1
  7. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +1 -1
  8. package/build/protos/google/spanner/executor/v1/cloud_executor.proto +1 -1
  9. package/build/protos/google/spanner/v1/change_stream.proto +451 -0
  10. package/build/protos/google/spanner/v1/commit_response.proto +10 -5
  11. package/build/protos/google/spanner/v1/keys.proto +1 -1
  12. package/build/protos/google/spanner/v1/mutation.proto +1 -1
  13. package/build/protos/google/spanner/v1/query_plan.proto +1 -1
  14. package/build/protos/google/spanner/v1/result_set.proto +55 -49
  15. package/build/protos/google/spanner/v1/spanner.proto +1 -1
  16. package/build/protos/google/spanner/v1/transaction.proto +41 -357
  17. package/build/protos/google/spanner/v1/type.proto +1 -1
  18. package/build/protos/protos.d.ts +1577 -194
  19. package/build/protos/protos.js +3977 -288
  20. package/build/protos/protos.json +325 -3
  21. package/build/src/backup.js +7 -0
  22. package/build/src/batch-transaction.d.ts +48 -29
  23. package/build/src/batch-transaction.js +15 -100
  24. package/build/src/codec.js +63 -47
  25. package/build/src/common-grpc/service-object.js +1 -0
  26. package/build/src/common-grpc/service.js +35 -18
  27. package/build/src/common.d.ts +1 -0
  28. package/build/src/common.js +9 -1
  29. package/build/src/database.d.ts +1 -0
  30. package/build/src/database.js +54 -42
  31. package/build/src/helper.d.ts +99 -0
  32. package/build/src/helper.js +178 -0
  33. package/build/src/index.d.ts +33 -0
  34. package/build/src/index.js +202 -21
  35. package/build/src/instance-config.d.ts +1 -1
  36. package/build/src/instance-config.js +4 -0
  37. package/build/src/instance.js +12 -6
  38. package/build/src/instrument.js +5 -6
  39. package/build/src/metrics/constants.d.ts +36 -0
  40. package/build/src/metrics/constants.js +106 -0
  41. package/build/src/metrics/external-types.d.ts +20 -0
  42. package/build/src/metrics/external-types.js +32 -0
  43. package/build/src/metrics/interceptor.d.ts +13 -0
  44. package/build/src/metrics/interceptor.js +87 -0
  45. package/build/src/metrics/metrics-tracer-factory.d.ts +165 -0
  46. package/build/src/metrics/metrics-tracer-factory.js +389 -0
  47. package/build/src/metrics/metrics-tracer.d.ts +204 -0
  48. package/build/src/metrics/metrics-tracer.js +371 -0
  49. package/build/src/metrics/spanner-metrics-exporter.d.ts +35 -0
  50. package/build/src/metrics/spanner-metrics-exporter.js +119 -0
  51. package/build/src/metrics/transform.d.ts +144 -0
  52. package/build/src/metrics/transform.js +272 -0
  53. package/build/src/multiplexed-session.js +7 -1
  54. package/build/src/partial-result-stream.js +18 -10
  55. package/build/src/request_id_header.js +1 -0
  56. package/build/src/session-factory.d.ts +34 -0
  57. package/build/src/session-factory.js +35 -2
  58. package/build/src/session-pool.js +24 -8
  59. package/build/src/session.d.ts +0 -1
  60. package/build/src/session.js +7 -2
  61. package/build/src/table.js +6 -3
  62. package/build/src/transaction-runner.d.ts +1 -0
  63. package/build/src/transaction-runner.js +18 -2
  64. package/build/src/transaction.d.ts +42 -1
  65. package/build/src/transaction.js +258 -94
  66. package/build/src/v1/database_admin_client.d.ts +37 -2
  67. package/build/src/v1/database_admin_client.js +718 -168
  68. package/build/src/v1/database_admin_client_config.json +4 -0
  69. package/build/src/v1/instance_admin_client.d.ts +122 -1
  70. package/build/src/v1/instance_admin_client.js +765 -146
  71. package/build/src/v1/spanner_client.d.ts +2 -1
  72. package/build/src/v1/spanner_client.js +391 -85
  73. package/build/src/v1/spanner_executor_proxy_client.d.ts +2 -1
  74. package/build/src/v1/spanner_executor_proxy_client.js +41 -19
  75. package/build/src/v1/spanner_proto_list.json +1 -0
  76. package/package.json +64 -58
@@ -23,6 +23,7 @@ export declare class DatabaseAdminClient {
23
23
  private _defaults;
24
24
  private _universeDomain;
25
25
  private _servicePath;
26
+ private _log;
26
27
  auth: gax.GoogleAuth;
27
28
  descriptors: Descriptors;
28
29
  warn: (code: string, message: string, warnType?: string) => void;
@@ -58,7 +59,7 @@ export declare class DatabaseAdminClient {
58
59
  * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
59
60
  * the environment variable GCLOUD_PROJECT for your project ID. If your
60
61
  * app is running in an environment which supports
61
- * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
62
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
62
63
  * your project ID will be detected automatically.
63
64
  * @param {string} [options.apiEndpoint] - The domain name of the
64
65
  * API remote host.
@@ -512,6 +513,36 @@ export declare class DatabaseAdminClient {
512
513
  ]>;
513
514
  deleteBackupSchedule(request: protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
514
515
  deleteBackupSchedule(request: protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
516
+ /**
517
+ * This is an internal API called by Spanner Graph jobs. You should never need
518
+ * to call this API directly.
519
+ *
520
+ * @param {Object} request
521
+ * The request object that will be sent.
522
+ * @param {string} request.database
523
+ * Internal field, do not use directly.
524
+ * @param {string} request.operationId
525
+ * Internal field, do not use directly.
526
+ * @param {string} request.vmIdentityToken
527
+ * Internal field, do not use directly.
528
+ * @param {number} [request.progress]
529
+ * Internal field, do not use directly.
530
+ * @param {google.rpc.Status} [request.status]
531
+ * Internal field, do not use directly.
532
+ * @param {object} [options]
533
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
534
+ * @returns {Promise} - The promise which resolves to an array.
535
+ * The first element of the array is an object representing {@link protos.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse|InternalUpdateGraphOperationResponse}.
536
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
537
+ * for more details and examples.
538
+ */
539
+ internalUpdateGraphOperation(request?: protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest, options?: CallOptions): Promise<[
540
+ protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationResponse,
541
+ (protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest | undefined),
542
+ {} | undefined
543
+ ]>;
544
+ internalUpdateGraphOperation(request: protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationResponse, protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest | null | undefined, {} | null | undefined>): void;
545
+ internalUpdateGraphOperation(request: protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest, callback: Callback<protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationResponse, protos.google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest | null | undefined, {} | null | undefined>): void;
515
546
  /**
516
547
  * Creates a new Cloud Spanner database and starts to prepare it for serving.
517
548
  * The returned {@link protos.google.longrunning.Operation|long-running operation} will
@@ -712,6 +743,10 @@ export declare class DatabaseAdminClient {
712
743
  * ```
713
744
  * For more details, see protobuffer [self
714
745
  * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
746
+ * @param {boolean} [request.throughputMode]
747
+ * Optional. This field is exposed to be used by the Spanner Migration Tool.
748
+ * For more details, see
749
+ * [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool).
715
750
  * @param {object} [options]
716
751
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
717
752
  * @returns {Promise} - The promise which resolves to an array.
@@ -2047,7 +2082,7 @@ export declare class DatabaseAdminClient {
2047
2082
  * // doThingsWith(response)
2048
2083
  * ```
2049
2084
  */
2050
- listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
2085
+ listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;
2051
2086
  /**
2052
2087
  * Starts asynchronous cancellation on a long-running operation. The server
2053
2088
  * makes a best effort to cancel the operation, but success is not