@google-shopping/reports 0.8.1 → 0.10.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.
@@ -1,8 +1,10 @@
1
+ import * as v1alpha from './v1alpha';
1
2
  import * as v1beta from './v1beta';
2
3
  declare const ReportServiceClient: typeof v1beta.ReportServiceClient;
3
4
  type ReportServiceClient = v1beta.ReportServiceClient;
4
- export { v1beta, ReportServiceClient };
5
+ export { v1alpha, v1beta, ReportServiceClient };
5
6
  declare const _default: {
7
+ v1alpha: typeof v1alpha;
6
8
  v1beta: typeof v1beta;
7
9
  ReportServiceClient: typeof v1beta.ReportServiceClient;
8
10
  };
@@ -17,12 +17,14 @@
17
17
  // ** https://github.com/googleapis/synthtool **
18
18
  // ** All changes to this file may be overwritten. **
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.protos = exports.ReportServiceClient = exports.v1beta = void 0;
20
+ exports.protos = exports.ReportServiceClient = exports.v1beta = exports.v1alpha = void 0;
21
+ const v1alpha = require("./v1alpha");
22
+ exports.v1alpha = v1alpha;
21
23
  const v1beta = require("./v1beta");
22
24
  exports.v1beta = v1beta;
23
25
  const ReportServiceClient = v1beta.ReportServiceClient;
24
26
  exports.ReportServiceClient = ReportServiceClient;
25
- exports.default = { v1beta, ReportServiceClient };
27
+ exports.default = { v1alpha, v1beta, ReportServiceClient };
26
28
  const protos = require("../protos/protos");
27
29
  exports.protos = protos;
28
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.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,2DAA2D;AAC3D,gDAAgD;AAChD,qDAAqD;;;AAErD,mCAAmC;AAK3B,wBAAM;AAHd,MAAM,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAGvC,kDAAmB;AACnC,kBAAe,EAAC,MAAM,EAAE,mBAAmB,EAAC,CAAC;AAC7C,2CAA2C;AACnC,wBAAM"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.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,2DAA2D;AAC3D,gDAAgD;AAChD,qDAAqD;;;AAErD,qCAAqC;AAM7B,0BAAO;AALf,mCAAmC;AAKlB,wBAAM;AAHvB,MAAM,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAG9B,kDAAmB;AAC5C,kBAAe,EAAC,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAC,CAAC;AACtD,2CAA2C;AACnC,wBAAM"}
@@ -0,0 +1,37 @@
1
+ {
2
+ "schema": "1.0",
3
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
4
+ "language": "typescript",
5
+ "protoPackage": "google.shopping.merchant.reports.v1alpha",
6
+ "libraryPackage": "@google-shopping/reports",
7
+ "services": {
8
+ "ReportService": {
9
+ "clients": {
10
+ "grpc": {
11
+ "libraryClient": "ReportServiceClient",
12
+ "rpcs": {
13
+ "Search": {
14
+ "methods": [
15
+ "search",
16
+ "searchStream",
17
+ "searchAsync"
18
+ ]
19
+ }
20
+ }
21
+ },
22
+ "grpc-fallback": {
23
+ "libraryClient": "ReportServiceClient",
24
+ "rpcs": {
25
+ "Search": {
26
+ "methods": [
27
+ "search",
28
+ "searchStream",
29
+ "searchAsync"
30
+ ]
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1 @@
1
+ export { ReportServiceClient } from './report_service_client';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ // Copyright 2025 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
+ var report_service_client_1 = require("./report_service_client");
22
+ Object.defineProperty(exports, "ReportServiceClient", { enumerable: true, get: function () { return report_service_client_1.ReportServiceClient; } });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1alpha/index.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;;;AAErD,iEAA4D;AAApD,4HAAA,mBAAmB,OAAA"}
@@ -0,0 +1,235 @@
1
+ import type * as gax from 'google-gax';
2
+ import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
3
+ import { Transform } from 'stream';
4
+ import * as protos from '../../protos/protos';
5
+ /**
6
+ * Service for retrieving reports and insights about your products, their
7
+ * performance, and their competitive environment on Google.
8
+ * @class
9
+ * @memberof v1alpha
10
+ */
11
+ export declare class ReportServiceClient {
12
+ private _terminated;
13
+ private _opts;
14
+ private _providedCustomServicePath;
15
+ private _gaxModule;
16
+ private _gaxGrpc;
17
+ private _protos;
18
+ private _defaults;
19
+ private _universeDomain;
20
+ private _servicePath;
21
+ private _log;
22
+ auth: gax.GoogleAuth;
23
+ descriptors: Descriptors;
24
+ warn: (code: string, message: string, warnType?: string) => void;
25
+ innerApiCalls: {
26
+ [name: string]: Function;
27
+ };
28
+ reportServiceStub?: Promise<{
29
+ [name: string]: Function;
30
+ }>;
31
+ /**
32
+ * Construct an instance of ReportServiceClient.
33
+ *
34
+ * @param {object} [options] - The configuration object.
35
+ * The options accepted by the constructor are described in detail
36
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
37
+ * The common options are:
38
+ * @param {object} [options.credentials] - Credentials object.
39
+ * @param {string} [options.credentials.client_email]
40
+ * @param {string} [options.credentials.private_key]
41
+ * @param {string} [options.email] - Account email address. Required when
42
+ * using a .pem or .p12 keyFilename.
43
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
44
+ * .p12 key downloaded from the Google Developers Console. If you provide
45
+ * a path to a JSON file, the projectId option below is not necessary.
46
+ * NOTE: .pem and .p12 require you to specify options.email as well.
47
+ * @param {number} [options.port] - The port on which to connect to
48
+ * the remote host.
49
+ * @param {string} [options.projectId] - The project ID from the Google
50
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
51
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
52
+ * app is running in an environment which supports
53
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
54
+ * your project ID will be detected automatically.
55
+ * @param {string} [options.apiEndpoint] - The domain name of the
56
+ * API remote host.
57
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
58
+ * Follows the structure of {@link gapicConfig}.
59
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
60
+ * For more information, please check the
61
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
62
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
63
+ * need to avoid loading the default gRPC version and want to use the fallback
64
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
65
+ * ```
66
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
67
+ * const client = new ReportServiceClient({fallback: true}, gax);
68
+ * ```
69
+ */
70
+ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
71
+ /**
72
+ * Initialize the client.
73
+ * Performs asynchronous operations (such as authentication) and prepares the client.
74
+ * This function will be called automatically when any class method is called for the
75
+ * first time, but if you need to initialize it before calling an actual method,
76
+ * feel free to call initialize() directly.
77
+ *
78
+ * You can await on this method if you want to make sure the client is initialized.
79
+ *
80
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
81
+ */
82
+ initialize(): Promise<{
83
+ [name: string]: Function;
84
+ }>;
85
+ /**
86
+ * The DNS address for this API service.
87
+ * @deprecated Use the apiEndpoint method of the client instance.
88
+ * @returns {string} The DNS address for this service.
89
+ */
90
+ static get servicePath(): string;
91
+ /**
92
+ * The DNS address for this API service - same as servicePath.
93
+ * @deprecated Use the apiEndpoint method of the client instance.
94
+ * @returns {string} The DNS address for this service.
95
+ */
96
+ static get apiEndpoint(): string;
97
+ /**
98
+ * The DNS address for this API service.
99
+ * @returns {string} The DNS address for this service.
100
+ */
101
+ get apiEndpoint(): string;
102
+ get universeDomain(): string;
103
+ /**
104
+ * The port for this API service.
105
+ * @returns {number} The default port for this service.
106
+ */
107
+ static get port(): number;
108
+ /**
109
+ * The scopes needed to make gRPC calls for every method defined
110
+ * in this service.
111
+ * @returns {string[]} List of default scopes.
112
+ */
113
+ static get scopes(): string[];
114
+ getProjectId(): Promise<string>;
115
+ getProjectId(callback: Callback<string, undefined, undefined>): void;
116
+ /**
117
+ * Retrieves a report defined by a search query. The response might contain
118
+ * fewer rows than specified by `page_size`. Rely on `next_page_token` to
119
+ * determine if there are more rows to be requested.
120
+ *
121
+ * @param {Object} request
122
+ * The request object that will be sent.
123
+ * @param {string} request.parent
124
+ * Required. Id of the account making the call. Must be a standalone account
125
+ * or an MCA subaccount. Format: accounts/{account}
126
+ * @param {string} request.query
127
+ * Required. Query that defines a report to be retrieved.
128
+ *
129
+ * For details on how to construct your query, see the Query Language
130
+ * guide. For the full list of available tables and fields, see the Available
131
+ * fields.
132
+ * @param {number} [request.pageSize]
133
+ * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
134
+ * 1000. Values above 5000 are coerced to 5000.
135
+ * @param {string} [request.pageToken]
136
+ * Optional. Token of the page to retrieve. If not specified, the first page
137
+ * of results is returned. In order to request the next page of results, the
138
+ * value obtained from `next_page_token` in the previous response should be
139
+ * used.
140
+ * @param {object} [options]
141
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
142
+ * @returns {Promise} - The promise which resolves to an array.
143
+ * The first element of the array is Array of {@link protos.google.shopping.merchant.reports.v1alpha.ReportRow|ReportRow}.
144
+ * The client library will perform auto-pagination by default: it will call the API as many
145
+ * times as needed and will merge results from all the pages into this array.
146
+ * Note that it can affect your quota.
147
+ * We recommend using `searchAsync()`
148
+ * method described below for async iteration which you can stop as needed.
149
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
150
+ * for more details and examples.
151
+ */
152
+ search(request?: protos.google.shopping.merchant.reports.v1alpha.ISearchRequest, options?: CallOptions): Promise<[
153
+ protos.google.shopping.merchant.reports.v1alpha.IReportRow[],
154
+ protos.google.shopping.merchant.reports.v1alpha.ISearchRequest | null,
155
+ protos.google.shopping.merchant.reports.v1alpha.ISearchResponse
156
+ ]>;
157
+ search(request: protos.google.shopping.merchant.reports.v1alpha.ISearchRequest, options: CallOptions, callback: PaginationCallback<protos.google.shopping.merchant.reports.v1alpha.ISearchRequest, protos.google.shopping.merchant.reports.v1alpha.ISearchResponse | null | undefined, protos.google.shopping.merchant.reports.v1alpha.IReportRow>): void;
158
+ search(request: protos.google.shopping.merchant.reports.v1alpha.ISearchRequest, callback: PaginationCallback<protos.google.shopping.merchant.reports.v1alpha.ISearchRequest, protos.google.shopping.merchant.reports.v1alpha.ISearchResponse | null | undefined, protos.google.shopping.merchant.reports.v1alpha.IReportRow>): void;
159
+ /**
160
+ * Equivalent to `search`, but returns a NodeJS Stream object.
161
+ * @param {Object} request
162
+ * The request object that will be sent.
163
+ * @param {string} request.parent
164
+ * Required. Id of the account making the call. Must be a standalone account
165
+ * or an MCA subaccount. Format: accounts/{account}
166
+ * @param {string} request.query
167
+ * Required. Query that defines a report to be retrieved.
168
+ *
169
+ * For details on how to construct your query, see the Query Language
170
+ * guide. For the full list of available tables and fields, see the Available
171
+ * fields.
172
+ * @param {number} [request.pageSize]
173
+ * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
174
+ * 1000. Values above 5000 are coerced to 5000.
175
+ * @param {string} [request.pageToken]
176
+ * Optional. Token of the page to retrieve. If not specified, the first page
177
+ * of results is returned. In order to request the next page of results, the
178
+ * value obtained from `next_page_token` in the previous response should be
179
+ * used.
180
+ * @param {object} [options]
181
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
182
+ * @returns {Stream}
183
+ * An object stream which emits an object representing {@link protos.google.shopping.merchant.reports.v1alpha.ReportRow|ReportRow} on 'data' event.
184
+ * The client library will perform auto-pagination by default: it will call the API as many
185
+ * times as needed. Note that it can affect your quota.
186
+ * We recommend using `searchAsync()`
187
+ * method described below for async iteration which you can stop as needed.
188
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
189
+ * for more details and examples.
190
+ */
191
+ searchStream(request?: protos.google.shopping.merchant.reports.v1alpha.ISearchRequest, options?: CallOptions): Transform;
192
+ /**
193
+ * Equivalent to `search`, but returns an iterable object.
194
+ *
195
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
196
+ * @param {Object} request
197
+ * The request object that will be sent.
198
+ * @param {string} request.parent
199
+ * Required. Id of the account making the call. Must be a standalone account
200
+ * or an MCA subaccount. Format: accounts/{account}
201
+ * @param {string} request.query
202
+ * Required. Query that defines a report to be retrieved.
203
+ *
204
+ * For details on how to construct your query, see the Query Language
205
+ * guide. For the full list of available tables and fields, see the Available
206
+ * fields.
207
+ * @param {number} [request.pageSize]
208
+ * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
209
+ * 1000. Values above 5000 are coerced to 5000.
210
+ * @param {string} [request.pageToken]
211
+ * Optional. Token of the page to retrieve. If not specified, the first page
212
+ * of results is returned. In order to request the next page of results, the
213
+ * value obtained from `next_page_token` in the previous response should be
214
+ * used.
215
+ * @param {object} [options]
216
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
217
+ * @returns {Object}
218
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
219
+ * When you iterate the returned iterable, each element will be an object representing
220
+ * {@link protos.google.shopping.merchant.reports.v1alpha.ReportRow|ReportRow}. The API will be called under the hood as needed, once per the page,
221
+ * so you can stop the iteration when you don't need more results.
222
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
223
+ * for more details and examples.
224
+ * @example <caption>include:samples/generated/v1alpha/report_service.search.js</caption>
225
+ * region_tag:merchantapi_v1alpha_generated_ReportService_Search_async
226
+ */
227
+ searchAsync(request?: protos.google.shopping.merchant.reports.v1alpha.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.shopping.merchant.reports.v1alpha.IReportRow>;
228
+ /**
229
+ * Terminate the gRPC channel and close the client.
230
+ *
231
+ * The client will no longer be usable and all future behavior is undefined.
232
+ * @returns {Promise} A promise that resolves when the client is closed.
233
+ */
234
+ close(): Promise<void>;
235
+ }