@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.
- package/README.md +2 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +1 -1
- package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +1 -1
- package/build/protos/google/spanner/admin/database/v1/common.proto +1 -1
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +36 -1
- package/build/protos/google/spanner/admin/instance/v1/common.proto +1 -1
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +1 -1
- package/build/protos/google/spanner/executor/v1/cloud_executor.proto +1 -1
- package/build/protos/google/spanner/v1/change_stream.proto +451 -0
- package/build/protos/google/spanner/v1/commit_response.proto +10 -5
- package/build/protos/google/spanner/v1/keys.proto +1 -1
- package/build/protos/google/spanner/v1/mutation.proto +1 -1
- package/build/protos/google/spanner/v1/query_plan.proto +1 -1
- package/build/protos/google/spanner/v1/result_set.proto +55 -49
- package/build/protos/google/spanner/v1/spanner.proto +1 -1
- package/build/protos/google/spanner/v1/transaction.proto +41 -357
- package/build/protos/google/spanner/v1/type.proto +1 -1
- package/build/protos/protos.d.ts +1577 -194
- package/build/protos/protos.js +3977 -288
- package/build/protos/protos.json +325 -3
- package/build/src/backup.js +7 -0
- package/build/src/batch-transaction.d.ts +48 -29
- package/build/src/batch-transaction.js +15 -100
- package/build/src/codec.js +63 -47
- package/build/src/common-grpc/service-object.js +1 -0
- package/build/src/common-grpc/service.js +35 -18
- package/build/src/common.d.ts +1 -0
- package/build/src/common.js +9 -1
- package/build/src/database.d.ts +1 -0
- package/build/src/database.js +54 -42
- package/build/src/helper.d.ts +99 -0
- package/build/src/helper.js +178 -0
- package/build/src/index.d.ts +33 -0
- package/build/src/index.js +202 -21
- package/build/src/instance-config.d.ts +1 -1
- package/build/src/instance-config.js +4 -0
- package/build/src/instance.js +12 -6
- package/build/src/instrument.js +5 -6
- package/build/src/metrics/constants.d.ts +36 -0
- package/build/src/metrics/constants.js +106 -0
- package/build/src/metrics/external-types.d.ts +20 -0
- package/build/src/metrics/external-types.js +32 -0
- package/build/src/metrics/interceptor.d.ts +13 -0
- package/build/src/metrics/interceptor.js +87 -0
- package/build/src/metrics/metrics-tracer-factory.d.ts +165 -0
- package/build/src/metrics/metrics-tracer-factory.js +389 -0
- package/build/src/metrics/metrics-tracer.d.ts +204 -0
- package/build/src/metrics/metrics-tracer.js +371 -0
- package/build/src/metrics/spanner-metrics-exporter.d.ts +35 -0
- package/build/src/metrics/spanner-metrics-exporter.js +119 -0
- package/build/src/metrics/transform.d.ts +144 -0
- package/build/src/metrics/transform.js +272 -0
- package/build/src/multiplexed-session.js +7 -1
- package/build/src/partial-result-stream.js +18 -10
- package/build/src/request_id_header.js +1 -0
- package/build/src/session-factory.d.ts +34 -0
- package/build/src/session-factory.js +35 -2
- package/build/src/session-pool.js +24 -8
- package/build/src/session.d.ts +0 -1
- package/build/src/session.js +7 -2
- package/build/src/table.js +6 -3
- package/build/src/transaction-runner.d.ts +1 -0
- package/build/src/transaction-runner.js +18 -2
- package/build/src/transaction.d.ts +42 -1
- package/build/src/transaction.js +258 -94
- package/build/src/v1/database_admin_client.d.ts +37 -2
- package/build/src/v1/database_admin_client.js +718 -168
- package/build/src/v1/database_admin_client_config.json +4 -0
- package/build/src/v1/instance_admin_client.d.ts +122 -1
- package/build/src/v1/instance_admin_client.js +765 -146
- package/build/src/v1/spanner_client.d.ts +2 -1
- package/build/src/v1/spanner_client.js +391 -85
- package/build/src/v1/spanner_executor_proxy_client.d.ts +2 -1
- package/build/src/v1/spanner_executor_proxy_client.js +41 -19
- package/build/src/v1/spanner_proto_list.json +1 -0
- package/package.json +64 -58
|
@@ -158,6 +158,10 @@
|
|
|
158
158
|
"timeout_millis": 3600000,
|
|
159
159
|
"retry_codes_name": "idempotent",
|
|
160
160
|
"retry_params_name": "e9fafda332ce8a1702dc1575de3ca81c4feb4799"
|
|
161
|
+
},
|
|
162
|
+
"InternalUpdateGraphOperation": {
|
|
163
|
+
"retry_codes_name": "non_idempotent",
|
|
164
|
+
"retry_params_name": "default"
|
|
161
165
|
}
|
|
162
166
|
}
|
|
163
167
|
}
|
|
@@ -37,6 +37,7 @@ export declare class InstanceAdminClient {
|
|
|
37
37
|
private _defaults;
|
|
38
38
|
private _universeDomain;
|
|
39
39
|
private _servicePath;
|
|
40
|
+
private _log;
|
|
40
41
|
auth: gax.GoogleAuth;
|
|
41
42
|
descriptors: Descriptors;
|
|
42
43
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -72,7 +73,7 @@ export declare class InstanceAdminClient {
|
|
|
72
73
|
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
73
74
|
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
74
75
|
* app is running in an environment which supports
|
|
75
|
-
* {@link https://
|
|
76
|
+
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
|
|
76
77
|
* your project ID will be detected automatically.
|
|
77
78
|
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
78
79
|
* API remote host.
|
|
@@ -1879,6 +1880,126 @@ export declare class InstanceAdminClient {
|
|
|
1879
1880
|
* for more details and examples.
|
|
1880
1881
|
*/
|
|
1881
1882
|
listInstancePartitionOperationsAsync(request?: protos.google.spanner.admin.instance.v1.IListInstancePartitionOperationsRequest, options?: CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;
|
|
1883
|
+
/**
|
|
1884
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
|
1885
|
+
* method to poll the operation result at intervals as recommended by the API
|
|
1886
|
+
* service.
|
|
1887
|
+
*
|
|
1888
|
+
* @param {Object} request - The request object that will be sent.
|
|
1889
|
+
* @param {string} request.name - The name of the operation resource.
|
|
1890
|
+
* @param {Object=} options
|
|
1891
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1892
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1893
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
1894
|
+
* for the details.
|
|
1895
|
+
* @param {function(?Error, ?Object)=} callback
|
|
1896
|
+
* The function which will be called with the result of the API call.
|
|
1897
|
+
*
|
|
1898
|
+
* The second parameter to the callback is an object representing
|
|
1899
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
1900
|
+
* @return {Promise} - The promise which resolves to an array.
|
|
1901
|
+
* The first element of the array is an object representing
|
|
1902
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
1903
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
1904
|
+
*
|
|
1905
|
+
* @example
|
|
1906
|
+
* ```
|
|
1907
|
+
* const client = longrunning.operationsClient();
|
|
1908
|
+
* const name = '';
|
|
1909
|
+
* const [response] = await client.getOperation({name});
|
|
1910
|
+
* // doThingsWith(response)
|
|
1911
|
+
* ```
|
|
1912
|
+
*/
|
|
1913
|
+
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
|
|
1914
|
+
/**
|
|
1915
|
+
* Lists operations that match the specified filter in the request. If the
|
|
1916
|
+
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
|
|
1917
|
+
*
|
|
1918
|
+
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
|
|
1919
|
+
*
|
|
1920
|
+
* @param {Object} request - The request object that will be sent.
|
|
1921
|
+
* @param {string} request.name - The name of the operation collection.
|
|
1922
|
+
* @param {string} request.filter - The standard list filter.
|
|
1923
|
+
* @param {number=} request.pageSize -
|
|
1924
|
+
* The maximum number of resources contained in the underlying API
|
|
1925
|
+
* response. If page streaming is performed per-resource, this
|
|
1926
|
+
* parameter does not affect the return value. If page streaming is
|
|
1927
|
+
* performed per-page, this determines the maximum number of
|
|
1928
|
+
* resources in a page.
|
|
1929
|
+
* @param {Object=} options
|
|
1930
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1931
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1932
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
1933
|
+
* details.
|
|
1934
|
+
* @returns {Object}
|
|
1935
|
+
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
|
|
1936
|
+
*
|
|
1937
|
+
* @example
|
|
1938
|
+
* ```
|
|
1939
|
+
* const client = longrunning.operationsClient();
|
|
1940
|
+
* for await (const response of client.listOperationsAsync(request));
|
|
1941
|
+
* // doThingsWith(response)
|
|
1942
|
+
* ```
|
|
1943
|
+
*/
|
|
1944
|
+
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Starts asynchronous cancellation on a long-running operation. The server
|
|
1947
|
+
* makes a best effort to cancel the operation, but success is not
|
|
1948
|
+
* guaranteed. If the server doesn't support this method, it returns
|
|
1949
|
+
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
|
1950
|
+
* {@link Operations.GetOperation} or
|
|
1951
|
+
* other methods to check whether the cancellation succeeded or whether the
|
|
1952
|
+
* operation completed despite cancellation. On successful cancellation,
|
|
1953
|
+
* the operation is not deleted; instead, it becomes an operation with
|
|
1954
|
+
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
|
|
1955
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
1956
|
+
*
|
|
1957
|
+
* @param {Object} request - The request object that will be sent.
|
|
1958
|
+
* @param {string} request.name - The name of the operation resource to be cancelled.
|
|
1959
|
+
* @param {Object=} options
|
|
1960
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1961
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1962
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
1963
|
+
* details.
|
|
1964
|
+
* @param {function(?Error)=} callback
|
|
1965
|
+
* The function which will be called with the result of the API call.
|
|
1966
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
1967
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
1968
|
+
* call.
|
|
1969
|
+
*
|
|
1970
|
+
* @example
|
|
1971
|
+
* ```
|
|
1972
|
+
* const client = longrunning.operationsClient();
|
|
1973
|
+
* await client.cancelOperation({name: ''});
|
|
1974
|
+
* ```
|
|
1975
|
+
*/
|
|
1976
|
+
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
|
|
1977
|
+
/**
|
|
1978
|
+
* Deletes a long-running operation. This method indicates that the client is
|
|
1979
|
+
* no longer interested in the operation result. It does not cancel the
|
|
1980
|
+
* operation. If the server doesn't support this method, it returns
|
|
1981
|
+
* `google.rpc.Code.UNIMPLEMENTED`.
|
|
1982
|
+
*
|
|
1983
|
+
* @param {Object} request - The request object that will be sent.
|
|
1984
|
+
* @param {string} request.name - The name of the operation resource to be deleted.
|
|
1985
|
+
* @param {Object=} options
|
|
1986
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1987
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1988
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
1989
|
+
* for the details.
|
|
1990
|
+
* @param {function(?Error)=} callback
|
|
1991
|
+
* The function which will be called with the result of the API call.
|
|
1992
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
1993
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
1994
|
+
* call.
|
|
1995
|
+
*
|
|
1996
|
+
* @example
|
|
1997
|
+
* ```
|
|
1998
|
+
* const client = longrunning.operationsClient();
|
|
1999
|
+
* await client.deleteOperation({name: ''});
|
|
2000
|
+
* ```
|
|
2001
|
+
*/
|
|
2002
|
+
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
|
|
1882
2003
|
/**
|
|
1883
2004
|
* Return a fully-qualified instance resource name string.
|
|
1884
2005
|
*
|