@google-shopping/reports 0.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.
@@ -0,0 +1,370 @@
1
+ "use strict";
2
+ // Copyright 2023 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.ReportServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1beta/report_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./report_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for retrieving reports and insights about your products, their
31
+ * performance, and their competitive environment on Google.
32
+ * @class
33
+ * @memberof v1beta
34
+ */
35
+ class ReportServiceClient {
36
+ /**
37
+ * Construct an instance of ReportServiceClient.
38
+ *
39
+ * @param {object} [options] - The configuration object.
40
+ * The options accepted by the constructor are described in detail
41
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
42
+ * The common options are:
43
+ * @param {object} [options.credentials] - Credentials object.
44
+ * @param {string} [options.credentials.client_email]
45
+ * @param {string} [options.credentials.private_key]
46
+ * @param {string} [options.email] - Account email address. Required when
47
+ * using a .pem or .p12 keyFilename.
48
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
49
+ * .p12 key downloaded from the Google Developers Console. If you provide
50
+ * a path to a JSON file, the projectId option below is not necessary.
51
+ * NOTE: .pem and .p12 require you to specify options.email as well.
52
+ * @param {number} [options.port] - The port on which to connect to
53
+ * the remote host.
54
+ * @param {string} [options.projectId] - The project ID from the Google
55
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
56
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
57
+ * app is running in an environment which supports
58
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
59
+ * your project ID will be detected automatically.
60
+ * @param {string} [options.apiEndpoint] - The domain name of the
61
+ * API remote host.
62
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
63
+ * Follows the structure of {@link gapicConfig}.
64
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
65
+ * For more information, please check the
66
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
67
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
68
+ * need to avoid loading the default gRPC version and want to use the fallback
69
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
70
+ * ```
71
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
72
+ * const client = new ReportServiceClient({fallback: true}, gax);
73
+ * ```
74
+ */
75
+ constructor(opts, gaxInstance) {
76
+ var _a, _b;
77
+ this._terminated = false;
78
+ this.descriptors = {
79
+ page: {},
80
+ stream: {},
81
+ longrunning: {},
82
+ batching: {},
83
+ };
84
+ // Ensure that options include all the required fields.
85
+ const staticMembers = this.constructor;
86
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
87
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
88
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
89
+ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
90
+ const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
91
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
92
+ // Request numeric enum values if REST transport is used.
93
+ opts.numericEnums = true;
94
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
95
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
96
+ opts['scopes'] = staticMembers.scopes;
97
+ }
98
+ // Load google-gax module synchronously if needed
99
+ if (!gaxInstance) {
100
+ gaxInstance = require('google-gax');
101
+ }
102
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
103
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
104
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
105
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
106
+ // Save options to use in initialize() method.
107
+ this._opts = opts;
108
+ // Save the auth object to the client, for use by other methods.
109
+ this.auth = this._gaxGrpc.auth;
110
+ // Set useJWTAccessWithScope on the auth object.
111
+ this.auth.useJWTAccessWithScope = true;
112
+ // Set defaultServicePath on the auth object.
113
+ this.auth.defaultServicePath = staticMembers.servicePath;
114
+ // Set the default scopes in auth client if needed.
115
+ if (servicePath === staticMembers.servicePath) {
116
+ this.auth.defaultScopes = staticMembers.scopes;
117
+ }
118
+ // Determine the client header string.
119
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
120
+ if (typeof process !== 'undefined' && 'versions' in process) {
121
+ clientHeader.push(`gl-node/${process.versions.node}`);
122
+ }
123
+ else {
124
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
125
+ }
126
+ if (!opts.fallback) {
127
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
128
+ }
129
+ else {
130
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
131
+ }
132
+ if (opts.libName && opts.libVersion) {
133
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
134
+ }
135
+ // Load the applicable protos.
136
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
137
+ // Some of the methods on this service return "paged" results,
138
+ // (e.g. 50 results at a time, with tokens to get subsequent
139
+ // pages). Denote the keys used for pagination and results.
140
+ this.descriptors.page = {
141
+ search: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'),
142
+ };
143
+ // Put together the default options sent with requests.
144
+ this._defaults = this._gaxGrpc.constructSettings('google.shopping.merchant.reports.v1beta.ReportService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
145
+ // Set up a dictionary of "inner API calls"; the core implementation
146
+ // of calling the API is handled in `google-gax`, with this code
147
+ // merely providing the destination and request information.
148
+ this.innerApiCalls = {};
149
+ // Add a warn function to the client constructor so it can be easily tested.
150
+ this.warn = this._gaxModule.warn;
151
+ }
152
+ /**
153
+ * Initialize the client.
154
+ * Performs asynchronous operations (such as authentication) and prepares the client.
155
+ * This function will be called automatically when any class method is called for the
156
+ * first time, but if you need to initialize it before calling an actual method,
157
+ * feel free to call initialize() directly.
158
+ *
159
+ * You can await on this method if you want to make sure the client is initialized.
160
+ *
161
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
162
+ */
163
+ initialize() {
164
+ // If the client stub promise is already initialized, return immediately.
165
+ if (this.reportServiceStub) {
166
+ return this.reportServiceStub;
167
+ }
168
+ // Put together the "service stub" for
169
+ // google.shopping.merchant.reports.v1beta.ReportService.
170
+ this.reportServiceStub = this._gaxGrpc.createStub(this._opts.fallback
171
+ ? this._protos.lookupService('google.shopping.merchant.reports.v1beta.ReportService')
172
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
173
+ this._protos.google.shopping.merchant.reports.v1beta
174
+ .ReportService, this._opts, this._providedCustomServicePath);
175
+ // Iterate over each of the methods that the service provides
176
+ // and create an API call method for each.
177
+ const reportServiceStubMethods = ['search'];
178
+ for (const methodName of reportServiceStubMethods) {
179
+ const callPromise = this.reportServiceStub.then(stub => (...args) => {
180
+ if (this._terminated) {
181
+ return Promise.reject('The client has already been closed.');
182
+ }
183
+ const func = stub[methodName];
184
+ return func.apply(stub, args);
185
+ }, (err) => () => {
186
+ throw err;
187
+ });
188
+ const descriptor = this.descriptors.page[methodName] || undefined;
189
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
190
+ this.innerApiCalls[methodName] = apiCall;
191
+ }
192
+ return this.reportServiceStub;
193
+ }
194
+ /**
195
+ * The DNS address for this API service.
196
+ * @returns {string} The DNS address for this service.
197
+ */
198
+ static get servicePath() {
199
+ return 'merchantapi.googleapis.com';
200
+ }
201
+ /**
202
+ * The DNS address for this API service - same as servicePath(),
203
+ * exists for compatibility reasons.
204
+ * @returns {string} The DNS address for this service.
205
+ */
206
+ static get apiEndpoint() {
207
+ return 'merchantapi.googleapis.com';
208
+ }
209
+ /**
210
+ * The port for this API service.
211
+ * @returns {number} The default port for this service.
212
+ */
213
+ static get port() {
214
+ return 443;
215
+ }
216
+ /**
217
+ * The scopes needed to make gRPC calls for every method defined
218
+ * in this service.
219
+ * @returns {string[]} List of default scopes.
220
+ */
221
+ static get scopes() {
222
+ return ['https://www.googleapis.com/auth/content'];
223
+ }
224
+ /**
225
+ * Return the project ID used by this class.
226
+ * @returns {Promise} A promise that resolves to string containing the project ID.
227
+ */
228
+ getProjectId(callback) {
229
+ if (callback) {
230
+ this.auth.getProjectId(callback);
231
+ return;
232
+ }
233
+ return this.auth.getProjectId();
234
+ }
235
+ search(request, optionsOrCallback, callback) {
236
+ var _a;
237
+ request = request || {};
238
+ let options;
239
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
240
+ callback = optionsOrCallback;
241
+ options = {};
242
+ }
243
+ else {
244
+ options = optionsOrCallback;
245
+ }
246
+ options = options || {};
247
+ options.otherArgs = options.otherArgs || {};
248
+ options.otherArgs.headers = options.otherArgs.headers || {};
249
+ options.otherArgs.headers['x-goog-request-params'] =
250
+ this._gaxModule.routingHeader.fromParams({
251
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
252
+ });
253
+ this.initialize();
254
+ return this.innerApiCalls.search(request, options, callback);
255
+ }
256
+ /**
257
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
258
+ * @param {Object} request
259
+ * The request object that will be sent.
260
+ * @param {string} request.parent
261
+ * Required. Id of the account making the call. Must be a standalone account
262
+ * or an MCA subaccount. Format: accounts/{account}
263
+ * @param {string} request.query
264
+ * Required. Query that defines a report to be retrieved.
265
+ *
266
+ * For details on how to construct your query, see the Query Language
267
+ * guide. For the full list of available tables and fields, see the Available
268
+ * fields.
269
+ * @param {number} [request.pageSize]
270
+ * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
271
+ * the maximum of 1000. Values above 1000 are coerced to 1000.
272
+ * @param {string} [request.pageToken]
273
+ * Optional. Token of the page to retrieve. If not specified, the first page
274
+ * of results is returned. In order to request the next page of results, the
275
+ * value obtained from `next_page_token` in the previous response should be
276
+ * used.
277
+ * @param {object} [options]
278
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
279
+ * @returns {Stream}
280
+ * An object stream which emits an object representing {@link protos.google.shopping.merchant.reports.v1beta.ReportRow|ReportRow} on 'data' event.
281
+ * The client library will perform auto-pagination by default: it will call the API as many
282
+ * times as needed. Note that it can affect your quota.
283
+ * We recommend using `searchAsync()`
284
+ * method described below for async iteration which you can stop as needed.
285
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
286
+ * for more details and examples.
287
+ */
288
+ searchStream(request, options) {
289
+ var _a;
290
+ request = request || {};
291
+ options = options || {};
292
+ options.otherArgs = options.otherArgs || {};
293
+ options.otherArgs.headers = options.otherArgs.headers || {};
294
+ options.otherArgs.headers['x-goog-request-params'] =
295
+ this._gaxModule.routingHeader.fromParams({
296
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
297
+ });
298
+ const defaultCallSettings = this._defaults['search'];
299
+ const callSettings = defaultCallSettings.merge(options);
300
+ this.initialize();
301
+ return this.descriptors.page.search.createStream(this.innerApiCalls.search, request, callSettings);
302
+ }
303
+ /**
304
+ * Equivalent to `search`, but returns an iterable object.
305
+ *
306
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
307
+ * @param {Object} request
308
+ * The request object that will be sent.
309
+ * @param {string} request.parent
310
+ * Required. Id of the account making the call. Must be a standalone account
311
+ * or an MCA subaccount. Format: accounts/{account}
312
+ * @param {string} request.query
313
+ * Required. Query that defines a report to be retrieved.
314
+ *
315
+ * For details on how to construct your query, see the Query Language
316
+ * guide. For the full list of available tables and fields, see the Available
317
+ * fields.
318
+ * @param {number} [request.pageSize]
319
+ * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
320
+ * the maximum of 1000. Values above 1000 are coerced to 1000.
321
+ * @param {string} [request.pageToken]
322
+ * Optional. Token of the page to retrieve. If not specified, the first page
323
+ * of results is returned. In order to request the next page of results, the
324
+ * value obtained from `next_page_token` in the previous response should be
325
+ * used.
326
+ * @param {object} [options]
327
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
328
+ * @returns {Object}
329
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
330
+ * When you iterate the returned iterable, each element will be an object representing
331
+ * {@link protos.google.shopping.merchant.reports.v1beta.ReportRow|ReportRow}. The API will be called under the hood as needed, once per the page,
332
+ * so you can stop the iteration when you don't need more results.
333
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
334
+ * for more details and examples.
335
+ * @example <caption>include:samples/generated/v1beta/report_service.search.js</caption>
336
+ * region_tag:merchantapi_v1beta_generated_ReportService_Search_async
337
+ */
338
+ searchAsync(request, options) {
339
+ var _a;
340
+ request = request || {};
341
+ options = options || {};
342
+ options.otherArgs = options.otherArgs || {};
343
+ options.otherArgs.headers = options.otherArgs.headers || {};
344
+ options.otherArgs.headers['x-goog-request-params'] =
345
+ this._gaxModule.routingHeader.fromParams({
346
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
347
+ });
348
+ const defaultCallSettings = this._defaults['search'];
349
+ const callSettings = defaultCallSettings.merge(options);
350
+ this.initialize();
351
+ return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
352
+ }
353
+ /**
354
+ * Terminate the gRPC channel and close the client.
355
+ *
356
+ * The client will no longer be usable and all future behavior is undefined.
357
+ * @returns {Promise} A promise that resolves when the client is closed.
358
+ */
359
+ close() {
360
+ if (this.reportServiceStub && !this._terminated) {
361
+ return this.reportServiceStub.then(stub => {
362
+ this._terminated = true;
363
+ stub.close();
364
+ });
365
+ }
366
+ return Promise.resolve();
367
+ }
368
+ }
369
+ exports.ReportServiceClient = ReportServiceClient;
370
+ //# sourceMappingURL=report_service_client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report_service_client.js","sourceRoot":"","sources":["../../../src/v1beta/report_service_client.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;;AAcrD,uDAAwD;AACxD;;;;GAIG;AACH,mEAAmE;AACnE,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,O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;YACf,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF;AAhgBD,kDAggBC"}
@@ -0,0 +1,43 @@
1
+ {
2
+ "interfaces": {
3
+ "google.shopping.merchant.reports.v1beta.ReportService": {
4
+ "retry_codes": {
5
+ "non_idempotent": [],
6
+ "idempotent": [
7
+ "DEADLINE_EXCEEDED",
8
+ "UNAVAILABLE"
9
+ ],
10
+ "unavailable": [
11
+ "UNAVAILABLE"
12
+ ]
13
+ },
14
+ "retry_params": {
15
+ "default": {
16
+ "initial_retry_delay_millis": 100,
17
+ "retry_delay_multiplier": 1.3,
18
+ "max_retry_delay_millis": 60000,
19
+ "initial_rpc_timeout_millis": 60000,
20
+ "rpc_timeout_multiplier": 1,
21
+ "max_rpc_timeout_millis": 60000,
22
+ "total_timeout_millis": 600000
23
+ },
24
+ "ce5b960a6ed052e690863808e4f0deff3dc7d49f": {
25
+ "initial_retry_delay_millis": 1000,
26
+ "retry_delay_multiplier": 1.3,
27
+ "max_retry_delay_millis": 10000,
28
+ "initial_rpc_timeout_millis": 60000,
29
+ "rpc_timeout_multiplier": 1,
30
+ "max_rpc_timeout_millis": 60000,
31
+ "total_timeout_millis": 600000
32
+ }
33
+ },
34
+ "methods": {
35
+ "Search": {
36
+ "timeout_millis": 60000,
37
+ "retry_codes_name": "unavailable",
38
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@google-shopping/reports",
3
+ "version": "0.1.0",
4
+ "description": "Merchant API client for Node.js",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/googleapis/google-cloud-node.git",
8
+ "directory": "packages/google-shopping-merchant-reports"
9
+ },
10
+ "license": "Apache-2.0",
11
+ "author": "Google LLC",
12
+ "main": "build/src/index.js",
13
+ "files": [
14
+ "build/src",
15
+ "build/protos"
16
+ ],
17
+ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-reports",
18
+ "keywords": [
19
+ "google apis client",
20
+ "google api client",
21
+ "google apis",
22
+ "google api",
23
+ "google",
24
+ "google cloud platform",
25
+ "google cloud",
26
+ "cloud",
27
+ "google merchantapi",
28
+ "merchantapi",
29
+ "Merchant API"
30
+ ],
31
+ "scripts": {
32
+ "clean": "gts clean",
33
+ "compile": "tsc -p . && cp -r protos build/",
34
+ "compile-protos": "compileProtos src",
35
+ "docs": "jsdoc -c .jsdoc.js",
36
+ "predocs-test": "npm run docs",
37
+ "docs-test": "linkinator docs",
38
+ "fix": "gts fix",
39
+ "lint": "gts check",
40
+ "postpack": "minifyProtoJson",
41
+ "prepare": "npm run compile-protos && npm run compile",
42
+ "system-test": "c8 mocha build/system-test",
43
+ "test": "c8 mocha build/test",
44
+ "samples-test": "cd samples/ && npm link ../ && npm i && npm test",
45
+ "prelint": "cd samples; npm link ../; npm i"
46
+ },
47
+ "dependencies": {
48
+ "google-gax": "^4.0.3"
49
+ },
50
+ "devDependencies": {
51
+ "@types/mocha": "^9.0.0",
52
+ "@types/node": "^20.4.5",
53
+ "@types/sinon": "^17.0.0",
54
+ "c8": "^8.0.1",
55
+ "gapic-tools": "^0.2.0",
56
+ "gts": "^5.0.0",
57
+ "jsdoc": "^4.0.0",
58
+ "jsdoc-fresh": "^3.0.0",
59
+ "jsdoc-region-tag": "^3.0.0",
60
+ "linkinator": "4.1.2",
61
+ "long": "^5.2.3",
62
+ "mocha": "^9.2.2",
63
+ "pack-n-play": "^2.0.0",
64
+ "sinon": "^17.0.0",
65
+ "typescript": "^5.1.6"
66
+ },
67
+ "engines": {
68
+ "node": ">=14.0.0"
69
+ }
70
+ }