/
var
/
www
/
qr4y.com
/
server
/
delivery
/
node_modules
/
google-gax
/
build
/
src
/
/var/www/qr4y.com/server/delivery/node_modules/google-gax/build/src
mkdir
upload
Name
Size
Mode
Actions
bundlingCalls/
-
0755
rm
longRunningCalls/
-
0755
rm
normalCalls/
-
0755
rm
paginationCalls/
-
0755
rm
streamingCalls/
-
0755
rm
apiCaller.d.ts
1746
0644
edit
dl
rm
apiCaller.js
1037
0644
edit
dl
rm
apiCaller.js.map
322
0644
edit
dl
rm
apitypes.d.ts
2872
0644
edit
dl
rm
apitypes.js
709
0644
edit
dl
rm
apitypes.js.map
134
0644
edit
dl
rm
call.d.ts
1957
0644
edit
dl
rm
call.js
3885
0644
edit
dl
rm
call.js.map
2110
0644
edit
dl
rm
clientInterface.d.ts
1722
0644
edit
dl
rm
clientInterface.js
908
0644
edit
dl
rm
clientInterface.js.map
333
0644
edit
dl
rm
createApiCall.d.ts
1762
0644
edit
dl
rm
createApiCall.js
4352
0644
edit
dl
rm
createApiCall.js.map
1811
0644
edit
dl
rm
descriptor.d.ts
1073
0644
edit
dl
rm
descriptor.js
1572
0644
edit
dl
rm
descriptor.js.map
285
0644
edit
dl
rm
fallback.d.ts
6544
0644
edit
dl
rm
fallback.js
13673
0644
edit
dl
rm
fallback.js.map
6254
0644
edit
dl
rm
fallbackProto.d.ts
946
0644
edit
dl
rm
fallbackProto.js
2266
0644
edit
dl
rm
fallbackProto.js.map
1429
0644
edit
dl
rm
fallbackRest.d.ts
946
0644
edit
dl
rm
fallbackRest.js
3355
0644
edit
dl
rm
fallbackRest.js.map
2153
0644
edit
dl
rm
fallbackServiceStub.d.ts
1575
0644
edit
dl
rm
fallbackServiceStub.js
5257
0644
edit
dl
rm
fallbackServiceStub.js.map
3037
0644
edit
dl
rm
featureDetection.d.ts
856
0644
edit
dl
rm
featureDetection.js
2106
0644
edit
dl
rm
featureDetection.js.map
914
0644
edit
dl
rm
gax.d.ts
14958
0644
edit
dl
rm
gax.js
22090
0644
edit
dl
rm
gax.js.map
8298
0644
edit
dl
rm
googleError.d.ts
2211
0644
edit
dl
rm
googleError.js
7216
0644
edit
dl
rm
googleError.js.map
4504
0644
edit
dl
rm
grpc.d.ts
8930
0644
edit
dl
rm
grpc.js
20671
0644
edit
dl
rm
grpc.js.map
11442
0644
edit
dl
rm
iamService.d.ts
5961
0644
edit
dl
rm
iamService.js
9252
0644
edit
dl
rm
iamService.js.map
6100
0644
edit
dl
rm
iam_policy_service_client_config.json
1063
0644
edit
dl
rm
index.d.ts
3101
0644
edit
dl
rm
index.js
6687
0644
edit
dl
rm
index.js.map
1680
0644
edit
dl
rm
locationService.d.ts
7382
0644
edit
dl
rm
locationService.js
17280
0644
edit
dl
rm
locationService.js.map
7154
0644
edit
dl
rm
locations_client_config.json
933
0644
edit
dl
rm
operationsClient.d.ts
16266
0644
edit
dl
rm
operationsClient.js
19699
0644
edit
dl
rm
operationsClient.js.map
5566
0644
edit
dl
rm
operations_client_config.json
1249
0644
edit
dl
rm
pathTemplate.d.ts
1966
0644
edit
dl
rm
pathTemplate.js
9933
0644
edit
dl
rm
pathTemplate.js.map
6595
0644
edit
dl
rm
protosList.json
4921
0644
edit
dl
rm
routingHeader.d.ts
1124
0644
edit
dl
rm
routingHeader.js
1317
0644
edit
dl
rm
routingHeader.js.map
283
0644
edit
dl
rm
status.d.ts
1153
0644
edit
dl
rm
status.js
3229
0644
edit
dl
rm
status.js.map
1570
0644
edit
dl
rm
streamArrayParser.d.ts
2145
0644
edit
dl
rm
streamArrayParser.js
6212
0644
edit
dl
rm
streamArrayParser.js.map
3262
0644
edit
dl
rm
transcoding.d.ts
2592
0644
edit
dl
rm
transcoding.js
12095
0644
edit
dl
rm
transcoding.js.map
9467
0644
edit
dl
rm
util.d.ts
987
0644
edit
dl
rm
util.js
1984
0644
edit
dl
rm
util.js.map
1064
0644
edit
dl
rm
warnings.d.ts
682
0644
edit
dl
rm
warnings.js
1376
0644
edit
dl
rm
warnings.js.map
629
0644
edit
dl
rm
Edit:
/var/www/qr4y.com/server/delivery/node_modules/google-gax/build/src/operationsClient.js
(19699B)
"use strict"; /** * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.OperationsClientBuilder = exports.OperationsClient = exports.ALL_SCOPES = exports.SERVICE_ADDRESS = void 0; const createApiCall_1 = require("./createApiCall"); const descriptor_1 = require("./descriptor"); const gax = require("./gax"); const configData = require("./operations_client_config.json"); const protoJson = require("../protos/operations.json"); exports.SERVICE_ADDRESS = 'longrunning.googleapis.com'; const version = require('../../package.json').version; const DEFAULT_SERVICE_PORT = 443; const CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; /** * The scopes needed to make gRPC calls to all of the methods defined in * this service. */ exports.ALL_SCOPES = []; /** * Manages long-running operations with an API service. * * When an API method normally takes long time to complete, it can be designed * to return {@link Operation} to the client, and the client can use this * interface to receive the real response asynchronously by polling the * operation resource, or pass the operation resource to another API (such as * Google Cloud Pub/Sub API) to receive the response. Any API service that * returns long-running operations should implement the `Operations` interface * so developers can have a consistent client experience. * * This will be created through a builder function which can be obtained by the * module. See the following example of how to initialize the module and how to * access to the builder. * @see {@link operationsClient} * * @class */ class OperationsClient { constructor(gaxGrpc, // eslint-disable-next-line @typescript-eslint/no-explicit-any operationsProtos, options) { const opts = Object.assign({ servicePath: exports.SERVICE_ADDRESS, port: DEFAULT_SERVICE_PORT, clientConfig: {}, }, options); const googleApiClient = ['gl-node/' + process.versions.node]; if (opts.libName && opts.libVersion) { googleApiClient.push(opts.libName + '/' + opts.libVersion); } googleApiClient.push(CODE_GEN_NAME_VERSION, 'gax/' + version); if (opts.fallback) { googleApiClient.push('gl-web/' + version); } else { googleApiClient.push('grpc/' + gaxGrpc.grpcVersion); } const defaults = gaxGrpc.constructSettings('google.longrunning.Operations', configData, opts.clientConfig || {}, { 'x-goog-api-client': googleApiClient.join(' ') }); this.auth = gaxGrpc.auth; // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; this.descriptor = { listOperations: new descriptor_1.PageDescriptor('pageToken', 'nextPageToken', 'operations'), }; // Put together the "service stub" for // google.longrunning.Operations. this.operationsStub = gaxGrpc.createStub(opts.fallback ? operationsProtos.lookupService('google.longrunning.Operations') : operationsProtos.google.longrunning.Operations, opts); const operationsStubMethods = [ 'getOperation', 'listOperations', 'cancelOperation', 'deleteOperation', ]; for (const methodName of operationsStubMethods) { const innerCallPromise = this.operationsStub.then(stub => (...args) => { const func = stub[methodName]; return func.apply(stub, args); }, err => () => { throw err; }); this.innerApiCalls[methodName] = createApiCall_1.createApiCall(innerCallPromise, defaults[methodName], this.descriptor[methodName]); } } /** Closes this operations client. */ close() { this.operationsStub.then(stub => stub.close()); } getProjectId(callback) { if (this.auth && 'getProjectId' in this.auth) { return this.auth.getProjectId(callback); } if (callback) { callback(new Error('Cannot determine project ID.')); } else { return Promise.reject('Cannot determine project ID.'); } } // Service calls getOperationInternal(request, options, callback) { request = request || {}; options = options || {}; return this.innerApiCalls.getOperation(request, options, callback); } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation resource. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the * details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing * [google.longrunning.Operation]{@link * external:"google.longrunning.Operation"}. * @return {Promise} - The promise which resolves to an array. * The first element of the array is an object representing * [google.longrunning.Operation]{@link * external:"google.longrunning.Operation"}. The promise has a method named * "cancel" which cancels the ongoing API call. * * @example * * const client = longrunning.operationsClient(); * const name = ''; * const [response] = await client.getOperation({name}); * // doThingsWith(response) */ getOperation(request, optionsOrCallback, callback) { let options; if (optionsOrCallback instanceof Function && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback; } request = request || {}; options = options || {}; return this.innerApiCalls.getOperation(request, options, callback); } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * NOTE: the `name` binding below allows API services to override the binding * to use different resource name schemes. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation collection. * @param {string} request.filter - The standard list filter. * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the * details. * @param {function(?Error, ?Array, ?Object, ?Object)=} callback * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of * [google.longrunning.Operation]{@link * external:"google.longrunning.Operation"}. * * When autoPaginate: false is specified through options, it contains the * result in a single response. If the response indicates the next page * exists, the third parameter is set to be used for the next request object. * The fourth parameter keeps the raw response object of an object * representing [google.longrunning.ListOperationsResponse]{@link * external:"google.longrunning.ListOperationsResponse"}. * @return {Promise} - The promise which resolves to an array. * The first element of the array is Array of * [google.longrunning.Operation]{@link * external:"google.longrunning.Operation"}. * * When autoPaginate: false is specified through options, the array has * three elements. The first element is Array of * [google.longrunning.Operation]{@link * external:"google.longrunning.Operation"} in a single response. The second * element is the next request object if the response indicates the next page * exists, or null. The third element is an object representing * [google.longrunning.ListOperationsResponse]{@link * external:"google.longrunning.ListOperationsResponse"}. * * The promise has a method named "cancel" which cancels the ongoing API * call. * * @example * * const client = longrunning.operationsClient(); * const request = { * name: '', * filter: '' * }; * // Iterate over all elements. * const [resources] = await client.listOperations(request); * for (const resource of resources) { * console.log(resources); * } * * // Or obtain the paged response. * const options = {autoPaginate: false}; * let nextRequest = request; * while(nextRequest) { * const response = await client.listOperations(nextRequest, options); * const resources = response[0]; * nextRequest = response[1]; * const rawResponse = response[2]; * for (const resource of resources) { * // doThingsWith(resource); * } * }; */ listOperations(request, optionsOrCallback, callback) { let options; if (optionsOrCallback instanceof Function && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback; } request = request || {}; options = options || {}; return this.innerApiCalls.listOperations(request, options, callback); } /** * Equivalent to {@link listOperations}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listOperations} continuously * and invokes the callback registered for 'data' event for each element in * the responses. * * The returned object has 'end' method when no more elements are required. * * autoPaginate option will be ignored. * * @see {@link https://nodejs.org/api/stream.html} * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation collection. * @param {string} request.filter - The standard list filter. * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the * details. * @return {Stream} - An object stream which emits an object representing [google.longrunning.Operation]{@link external:"google.longrunning.Operation"} on 'data' event. * * @example * * const client = longrunning.operationsClient(); * const request = { * name: '', * filter: '' * }; * client.listOperationsStream(request) * .on('data', element => { * // doThingsWith(element) * }) * .on('error', err => { * console.error(err); * }); */ listOperationsStream(request, options) { const callSettings = new gax.CallSettings(options); return this.descriptor.listOperations.createStream(this.innerApiCalls.listOperations, request, callSettings); } /** * Equivalent to {@link listOperations}, but returns an iterable object. * * for-await-of syntax is used with the iterable to recursively get response element on-demand. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation collection. * @param {string} request.filter - The standard list filter. * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the * details. * @returns {Object} * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. */ listOperationsAsync(request, options) { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); return this.descriptor.listOperations.asyncIterate(this.innerApiCalls.listOperations, request, callSettings); } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not * guaranteed. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use * {@link Operations.GetOperation} or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, * the operation is not deleted; instead, it becomes an operation with * an {@link Operation.error} value with a {@link google.rpc.Status.code} of * 1, corresponding to `Code.CANCELLED`. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation resource to be cancelled. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the * details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. * @return {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API * call. * * @example * * const client = longrunning.operationsClient(); * await client.cancelOperation({name: ''}); */ cancelOperation(request, optionsOrCallback, callback) { let options; if (optionsOrCallback instanceof Function && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback; } request = request || {}; options = options || {}; return this.innerApiCalls.cancelOperation(request, options, callback); } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation resource to be deleted. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the * details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. * @return {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API * call. * * @example * * const client = longrunning.operationsClient(); * await client.deleteOperation({name: ''}); */ deleteOperation(request, optionsOrCallback, callback) { let options; if (optionsOrCallback instanceof Function && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback; } request = request || {}; options = options || {}; return this.innerApiCalls.deleteOperation(request, options, callback); } } exports.OperationsClient = OperationsClient; class OperationsClientBuilder { /** * Builds a new Operations Client * @param gaxGrpc {GrpcClient} */ constructor(gaxGrpc) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const operationsProtos = gaxGrpc.loadProtoJSON(protoJson); /** * Build a new instance of {@link OperationsClient}. * * @param {Object=} opts - The optional parameters. * @param {String=} opts.servicePath - Domain name of the API remote host. * @param {number=} opts.port - The port on which to connect to the remote host. * @param {grpc.ClientCredentials=} opts.sslCreds - A ClientCredentials for use with an SSL-enabled channel. * @param {Object=} opts.clientConfig - The customized config to build the call settings. See {@link gax.constructSettings} for the format. */ this.operationsClient = opts => { if (gaxGrpc.fallback) { opts.fallback = true; } return new OperationsClient(gaxGrpc, operationsProtos, opts); }; Object.assign(this.operationsClient, OperationsClient); } } exports.OperationsClientBuilder = OperationsClientBuilder; //# sourceMappingURL=operationsClient.js.map
Save
cmd:
run