Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'pageToken',
'nextPageToken',
'documents'
),
listCollectionIds: new gaxModule.PageDescriptor(
'pageToken',
'nextPageToken',
'collectionIds'
),
};
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
batchGetDocuments: new gaxModule.StreamDescriptor(
gax.StreamType.SERVER_STREAMING
),
runQuery: new gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
write: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
listen: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
};
// Put together the default options sent with requests.
const defaults = gaxGrpc.constructSettings(
'google.firestore.v1beta1.Firestore',
gapicConfig,
opts.clientConfig,
{'x-goog-api-client': clientHeader.join(' ')}
);
// Set up a dictionary of "inner API calls"; the core implementation
// of calling the API is handled in `google-gax`, with this code
// Load the applicable protos.
// For Node.js, pass the path to JSON proto file.
// For browsers, pass the JSON content.
const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json');
const protos = gaxGrpc.loadProto(opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath);
// Some of the methods on this service return "paged" results,
// (e.g. 50 results at a time, with tokens to get subsequent
// pages). Denote the keys used for pagination and results.
this._descriptors.page = {
listDocuments: new gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents'),
listCollectionIds: new gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'collectionIds'),
};
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
batchGetDocuments: new gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
runQuery: new gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
write: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
listen: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
};
// Put together the default options sent with requests.
const defaults = gaxGrpc.constructSettings('google.firestore.v1.Firestore', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
// 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 = {};
// Put together the "service stub" for
// google.firestore.v1.Firestore.
this.firestoreStub = gaxGrpc.createStub(opts.fallback
? protos.lookupService('google.firestore.v1.Firestore')
: // tslint:disable-next-line no-any
protos.google.firestore.v1.Firestore, opts);
const nodejsProtoPath = path.join(
__dirname,
'..',
'..',
'protos',
'protos.json'
);
const protos = gaxGrpc.loadProto(
opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath
);
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
streamingRecognize: new gaxModule.StreamDescriptor(
gax.StreamType.BIDI_STREAMING
),
};
const protoFilesRoot = opts.fallback
? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json'))
: gaxModule.protobuf.loadSync(nodejsProtoPath);
// This API contains "long-running operations", which return a
// an Operation object that allows for tracking of the operation,
// rather than holding a request open.
this.operationsClient = new gaxModule.lro({
auth: gaxGrpc.auth,
grpc: gaxGrpc.grpc,
}).operationsClient(opts);
const longRunningRecognizeResponse = protoFilesRoot.lookup(
),
listCollectionIds: new gaxModule.PageDescriptor(
'pageToken',
'nextPageToken',
'collectionIds'
),
};
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
batchGetDocuments: new gaxModule.StreamDescriptor(
gax.StreamType.SERVER_STREAMING
),
runQuery: new gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
write: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
listen: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
};
// Put together the default options sent with requests.
const defaults = gaxGrpc.constructSettings(
'google.firestore.v1beta1.Firestore',
gapicConfig,
opts.clientConfig,
{'x-goog-api-client': clientHeader.join(' ')}
);
// 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 = {};
// Some of the methods on this service return "paged" results,
// (e.g. 50 results at a time, with tokens to get subsequent
// pages). Denote the keys used for pagination and results.
this._descriptors.page = {
listSessions: new gaxModule.PageDescriptor(
'pageToken',
'nextPageToken',
'sessions'
),
};
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
executeStreamingSql: new gaxModule.StreamDescriptor(
gax.StreamType.SERVER_STREAMING
),
streamingRead: new gaxModule.StreamDescriptor(
gax.StreamType.SERVER_STREAMING
),
};
// Put together the default options sent with requests.
const defaults = gaxGrpc.constructSettings(
'google.spanner.v1.Spanner',
gapicConfig,
opts.clientConfig,
{'x-goog-api-client': clientHeader.join(' ')}
);
// Set up a dictionary of "inner API calls"; the core implementation
// of calling the API is handled in `google-gax`, with this code
// identifiers to uniquely identify resources within the API.
// Create useful helper objects for these.
this._pathTemplates = {
environmentSessionPathTemplate: new gaxModule.PathTemplate(
'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'
),
sessionPathTemplate: new gaxModule.PathTemplate(
'projects/{project}/agent/sessions/{session}'
),
};
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
streamingDetectIntent: new gaxModule.StreamDescriptor(
gax.StreamType.BIDI_STREAMING
),
};
// Put together the default options sent with requests.
const defaults = gaxGrpc.constructSettings(
'google.cloud.dialogflow.v2beta1.Sessions',
gapicConfig,
opts.clientConfig,
{'x-goog-api-client': clientHeader.join(' ')}
);
// 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 = {};
// Create useful helper objects for these.
this._pathTemplates = {
tablePathTemplate: new gaxModule.PathTemplate(
'projects/{project}/instances/{instance}/tables/{table}'
),
};
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
readRows: new gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
sampleRowKeys: new gaxModule.StreamDescriptor(
gax.StreamType.SERVER_STREAMING
),
mutateRows: new gaxModule.StreamDescriptor(
gax.StreamType.SERVER_STREAMING
),
};
// Put together the default options sent with requests.
const defaults = gaxGrpc.constructSettings(
'google.bigtable.v2.Bigtable',
gapicConfig,
opts.clientConfig,
{'x-goog-api-client': clientHeader.join(' ')}
);
// 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 = {};
const nodejsProtoPath = path.join(
__dirname,
'..',
'..',
'protos',
'protos.json'
);
const protos = gaxGrpc.loadProto(
opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath
);
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
streamingRecognize: new gaxModule.StreamDescriptor(
gax.StreamType.BIDI_STREAMING
),
};
const protoFilesRoot = opts.fallback
? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json'))
: gaxModule.protobuf.loadSync(nodejsProtoPath);
// This API contains "long-running operations", which return a
// an Operation object that allows for tracking of the operation,
// rather than holding a request open.
this.operationsClient = new gaxModule.lro({
auth: gaxGrpc.auth,
grpc: gaxGrpc.grpc,
}).operationsClient(opts);
const longRunningRecognizeResponse = protoFilesRoot.lookup(
'pageToken',
'nextPageToken',
'documents'
),
listCollectionIds: new gaxModule.PageDescriptor(
'pageToken',
'nextPageToken',
'collectionIds'
),
};
// Some of the methods on this service provide streaming responses.
// Provide descriptors for these.
this._descriptors.stream = {
batchGetDocuments: new gaxModule.StreamDescriptor(
gax.StreamType.SERVER_STREAMING
),
runQuery: new gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
write: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
listen: new gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
};
// Put together the default options sent with requests.
const defaults = gaxGrpc.constructSettings(
'google.firestore.v1.Firestore',
gapicConfig,
opts.clientConfig,
{'x-goog-api-client': clientHeader.join(' ')}
);
// Set up a dictionary of "inner API calls"; the core implementation
// of calling the API is handled in `google-gax`, with this code