diff --git a/README.md b/README.md index afd585e8c..4ed306f6d 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/protos/protos.json b/protos/protos.json index 69e5ece46..de351e54d 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -31,7 +31,24 @@ "(google.api.method_signature)": "project_id,labels,entity_filter,output_url_prefix", "(google.longrunning.operation_info).response_type": "ExportEntitiesResponse", "(google.longrunning.operation_info).metadata_type": "ExportEntitiesMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:export", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id,labels,entity_filter,output_url_prefix" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ExportEntitiesResponse", + "metadata_type": "ExportEntitiesMetadata" + } + } + ] }, "ImportEntities": { "requestType": "ImportEntitiesRequest", @@ -42,21 +59,52 @@ "(google.api.method_signature)": "project_id,labels,input_url,entity_filter", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "ImportEntitiesMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:import", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id,labels,input_url,entity_filter" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "ImportEntitiesMetadata" + } + } + ] }, "GetIndex": { "requestType": "GetIndexRequest", "responseType": "Index", "options": { "(google.api.http).get": "/v1/projects/{project_id}/indexes/{index_id}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/projects/{project_id}/indexes/{index_id}" + } + } + ] }, "ListIndexes": { "requestType": "ListIndexesRequest", "responseType": "ListIndexesResponse", "options": { "(google.api.http).get": "/v1/projects/{project_id}/indexes" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/projects/{project_id}/indexes" + } + } + ] } } }, @@ -423,7 +471,18 @@ "(google.api.http).post": "/v1/projects/{project_id}:lookup", "(google.api.http).body": "*", "(google.api.method_signature)": "project_id,read_options,keys" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:lookup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id,read_options,keys" + } + ] }, "RunQuery": { "requestType": "RunQueryRequest", @@ -431,7 +490,15 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}:runQuery", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:runQuery", + "body": "*" + } + } + ] }, "BeginTransaction": { "requestType": "BeginTransactionRequest", @@ -440,7 +507,18 @@ "(google.api.http).post": "/v1/projects/{project_id}:beginTransaction", "(google.api.http).body": "*", "(google.api.method_signature)": "project_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:beginTransaction", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id" + } + ] }, "Commit": { "requestType": "CommitRequest", @@ -449,7 +527,21 @@ "(google.api.http).post": "/v1/projects/{project_id}:commit", "(google.api.http).body": "*", "(google.api.method_signature)": "project_id,mode,mutations" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:commit", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id,mode,transaction,mutations" + }, + { + "(google.api.method_signature)": "project_id,mode,mutations" + } + ] }, "Rollback": { "requestType": "RollbackRequest", @@ -458,7 +550,18 @@ "(google.api.http).post": "/v1/projects/{project_id}:rollback", "(google.api.http).body": "*", "(google.api.method_signature)": "project_id,transaction" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:rollback", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id,transaction" + } + ] }, "AllocateIds": { "requestType": "AllocateIdsRequest", @@ -467,7 +570,18 @@ "(google.api.http).post": "/v1/projects/{project_id}:allocateIds", "(google.api.http).body": "*", "(google.api.method_signature)": "project_id,keys" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:allocateIds", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id,keys" + } + ] }, "ReserveIds": { "requestType": "ReserveIdsRequest", @@ -476,7 +590,18 @@ "(google.api.http).post": "/v1/projects/{project_id}:reserveIds", "(google.api.http).body": "*", "(google.api.method_signature)": "project_id,keys" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}:reserveIds", + "body": "*" + } + }, + { + "(google.api.method_signature)": "project_id,keys" + } + ] } } }, @@ -2487,7 +2612,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations}", "(google.api.method_signature)": "name,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] }, "GetOperation": { "requestType": "GetOperationRequest", @@ -2495,7 +2630,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteOperation": { "requestType": "DeleteOperationRequest", @@ -2503,7 +2648,17 @@ "options": { "(google.api.http).delete": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CancelOperation": { "requestType": "CancelOperationRequest", @@ -2512,7 +2667,18 @@ "(google.api.http).post": "/v1/{name=operations/**}:cancel", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "WaitOperation": { "requestType": "WaitOperationRequest", diff --git a/src/v1/datastore_admin_client.ts b/src/v1/datastore_admin_client.ts index 509a40055..266aea593 100644 --- a/src/v1/datastore_admin_client.ts +++ b/src/v1/datastore_admin_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -31,6 +32,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/datastore_admin_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './datastore_admin_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -144,9 +150,9 @@ export class DatastoreAdminClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -159,7 +165,9 @@ export class DatastoreAdminClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -407,7 +415,7 @@ export class DatastoreAdminClient { // ------------------- getIndex( request: protos.google.datastore.admin.v1.IGetIndexRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.admin.v1.IIndex, @@ -417,7 +425,7 @@ export class DatastoreAdminClient { >; getIndex( request: protos.google.datastore.admin.v1.IGetIndexRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IGetIndexRequest | null | undefined, @@ -454,7 +462,7 @@ export class DatastoreAdminClient { getIndex( request: protos.google.datastore.admin.v1.IGetIndexRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.admin.v1.IIndex, protos.google.datastore.admin.v1.IGetIndexRequest | null | undefined, @@ -473,12 +481,12 @@ export class DatastoreAdminClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -494,7 +502,7 @@ export class DatastoreAdminClient { exportEntities( request: protos.google.datastore.admin.v1.IExportEntitiesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -507,7 +515,7 @@ export class DatastoreAdminClient { >; exportEntities( request: protos.google.datastore.admin.v1.IExportEntitiesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.datastore.admin.v1.IExportEntitiesResponse, @@ -581,7 +589,7 @@ export class DatastoreAdminClient { exportEntities( request: protos.google.datastore.admin.v1.IExportEntitiesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.datastore.admin.v1.IExportEntitiesResponse, @@ -609,12 +617,12 @@ export class DatastoreAdminClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -666,7 +674,7 @@ export class DatastoreAdminClient { } importEntities( request: protos.google.datastore.admin.v1.IImportEntitiesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -679,7 +687,7 @@ export class DatastoreAdminClient { >; importEntities( request: protos.google.datastore.admin.v1.IImportEntitiesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.protobuf.IEmpty, @@ -748,7 +756,7 @@ export class DatastoreAdminClient { importEntities( request: protos.google.datastore.admin.v1.IImportEntitiesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.protobuf.IEmpty, @@ -776,12 +784,12 @@ export class DatastoreAdminClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -833,7 +841,7 @@ export class DatastoreAdminClient { } listIndexes( request: protos.google.datastore.admin.v1.IListIndexesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.admin.v1.IIndex[], @@ -843,7 +851,7 @@ export class DatastoreAdminClient { >; listIndexes( request: protos.google.datastore.admin.v1.IListIndexesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.datastore.admin.v1.IListIndexesRequest, protos.google.datastore.admin.v1.IListIndexesResponse | null | undefined, @@ -889,7 +897,7 @@ export class DatastoreAdminClient { listIndexes( request: protos.google.datastore.admin.v1.IListIndexesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.datastore.admin.v1.IListIndexesRequest, | protos.google.datastore.admin.v1.IListIndexesResponse @@ -910,12 +918,12 @@ export class DatastoreAdminClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -955,7 +963,7 @@ export class DatastoreAdminClient { */ listIndexesStream( request?: protos.google.datastore.admin.v1.IListIndexesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1007,7 +1015,7 @@ export class DatastoreAdminClient { */ listIndexesAsync( request?: protos.google.datastore.admin.v1.IListIndexesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/src/v1/datastore_client.ts b/src/v1/datastore_client.ts index 1f990a798..26e74e710 100644 --- a/src/v1/datastore_client.ts +++ b/src/v1/datastore_client.ts @@ -16,11 +16,17 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/datastore_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './datastore_client_config.json'; const version = require('../../../package.json').version; @@ -79,9 +85,9 @@ export class DatastoreClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -94,7 +100,9 @@ export class DatastoreClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -289,7 +297,7 @@ export class DatastoreClient { // ------------------- lookup( request: protos.google.datastore.v1.ILookupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.v1.ILookupResponse, @@ -299,7 +307,7 @@ export class DatastoreClient { >; lookup( request: protos.google.datastore.v1.ILookupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, @@ -338,7 +346,7 @@ export class DatastoreClient { lookup( request: protos.google.datastore.v1.ILookupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.v1.ILookupResponse, protos.google.datastore.v1.ILookupRequest | null | undefined, @@ -357,12 +365,12 @@ export class DatastoreClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -377,7 +385,7 @@ export class DatastoreClient { } runQuery( request: protos.google.datastore.v1.IRunQueryRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.v1.IRunQueryResponse, @@ -387,7 +395,7 @@ export class DatastoreClient { >; runQuery( request: protos.google.datastore.v1.IRunQueryRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, @@ -433,7 +441,7 @@ export class DatastoreClient { runQuery( request: protos.google.datastore.v1.IRunQueryRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.v1.IRunQueryResponse, protos.google.datastore.v1.IRunQueryRequest | null | undefined, @@ -452,12 +460,12 @@ export class DatastoreClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -472,7 +480,7 @@ export class DatastoreClient { } beginTransaction( request: protos.google.datastore.v1.IBeginTransactionRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.v1.IBeginTransactionResponse, @@ -482,7 +490,7 @@ export class DatastoreClient { >; beginTransaction( request: protos.google.datastore.v1.IBeginTransactionRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.v1.IBeginTransactionResponse, protos.google.datastore.v1.IBeginTransactionRequest | null | undefined, @@ -519,7 +527,7 @@ export class DatastoreClient { beginTransaction( request: protos.google.datastore.v1.IBeginTransactionRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.v1.IBeginTransactionResponse, | protos.google.datastore.v1.IBeginTransactionRequest @@ -540,12 +548,12 @@ export class DatastoreClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -560,7 +568,7 @@ export class DatastoreClient { } commit( request: protos.google.datastore.v1.ICommitRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.v1.ICommitResponse, @@ -570,7 +578,7 @@ export class DatastoreClient { >; commit( request: protos.google.datastore.v1.ICommitRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, @@ -626,7 +634,7 @@ export class DatastoreClient { commit( request: protos.google.datastore.v1.ICommitRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.v1.ICommitResponse, protos.google.datastore.v1.ICommitRequest | null | undefined, @@ -645,12 +653,12 @@ export class DatastoreClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -665,7 +673,7 @@ export class DatastoreClient { } rollback( request: protos.google.datastore.v1.IRollbackRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.v1.IRollbackResponse, @@ -675,7 +683,7 @@ export class DatastoreClient { >; rollback( request: protos.google.datastore.v1.IRollbackRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, @@ -713,7 +721,7 @@ export class DatastoreClient { rollback( request: protos.google.datastore.v1.IRollbackRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.v1.IRollbackResponse, protos.google.datastore.v1.IRollbackRequest | null | undefined, @@ -732,12 +740,12 @@ export class DatastoreClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -752,7 +760,7 @@ export class DatastoreClient { } allocateIds( request: protos.google.datastore.v1.IAllocateIdsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.v1.IAllocateIdsResponse, @@ -762,7 +770,7 @@ export class DatastoreClient { >; allocateIds( request: protos.google.datastore.v1.IAllocateIdsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, @@ -801,7 +809,7 @@ export class DatastoreClient { allocateIds( request: protos.google.datastore.v1.IAllocateIdsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.v1.IAllocateIdsResponse, protos.google.datastore.v1.IAllocateIdsRequest | null | undefined, @@ -820,12 +828,12 @@ export class DatastoreClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -840,7 +848,7 @@ export class DatastoreClient { } reserveIds( request: protos.google.datastore.v1.IReserveIdsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.datastore.v1.IReserveIdsResponse, @@ -850,7 +858,7 @@ export class DatastoreClient { >; reserveIds( request: protos.google.datastore.v1.IReserveIdsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, @@ -891,7 +899,7 @@ export class DatastoreClient { reserveIds( request: protos.google.datastore.v1.IReserveIdsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.datastore.v1.IReserveIdsResponse, protos.google.datastore.v1.IReserveIdsRequest | null | undefined, @@ -910,12 +918,12 @@ export class DatastoreClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; diff --git a/synth.metadata b/synth.metadata index 37cda3d1c..0e11cd4ec 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-datastore.git", - "sha": "e6473b76a8df8a95d2985728781bba924f7dcba7" + "remote": "https://github.com/googleapis/nodejs-datastore.git", + "sha": "96ecdfa7b2b85e781803487680a4dd64b866b404" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "ebdbe9ab534486cf900700add1e129dff780b481", + "internalRef": "344172074" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -34,84 +42,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "package-lock.json.1585799656", - "protos/google/datastore/admin/v1/datastore_admin.proto", - "protos/google/datastore/admin/v1/index.proto", - "protos/google/datastore/v1/datastore.proto", - "protos/google/datastore/v1/entity.proto", - "protos/google/datastore/v1/query.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "samples/package-lock.json.4106555370", - "src/v1/datastore_admin_client.ts", - "src/v1/datastore_admin_client_config.json", - "src/v1/datastore_admin_proto_list.json", - "src/v1/datastore_client.ts", - "src/v1/datastore_client_config.json", - "src/v1/datastore_proto_list.json", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_datastore_admin_v1.ts", - "test/gapic_datastore_v1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file