@google-shopping/lfp 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.
Files changed (29) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +202 -0
  3. package/README.md +200 -0
  4. package/build/protos/google/shopping/merchant/lfp/v1beta/lfpinventory.proto +149 -0
  5. package/build/protos/google/shopping/merchant/lfp/v1beta/lfpsale.proto +122 -0
  6. package/build/protos/google/shopping/merchant/lfp/v1beta/lfpstore.proto +249 -0
  7. package/build/protos/google/shopping/type/types.proto +169 -0
  8. package/build/protos/protos.d.ts +8673 -0
  9. package/build/protos/protos.js +23511 -0
  10. package/build/protos/protos.json +2617 -0
  11. package/build/src/index.d.ts +17 -0
  12. package/build/src/index.js +37 -0
  13. package/build/src/index.js.map +1 -0
  14. package/build/src/v1beta/index.d.ts +3 -0
  15. package/build/src/v1beta/index.js +27 -0
  16. package/build/src/v1beta/index.js.map +1 -0
  17. package/build/src/v1beta/lfp_inventory_service_client.d.ts +267 -0
  18. package/build/src/v1beta/lfp_inventory_service_client.js +472 -0
  19. package/build/src/v1beta/lfp_inventory_service_client.js.map +1 -0
  20. package/build/src/v1beta/lfp_inventory_service_client_config.json +43 -0
  21. package/build/src/v1beta/lfp_sale_service_client.d.ts +250 -0
  22. package/build/src/v1beta/lfp_sale_service_client.js +450 -0
  23. package/build/src/v1beta/lfp_sale_service_client.js.map +1 -0
  24. package/build/src/v1beta/lfp_sale_service_client_config.json +43 -0
  25. package/build/src/v1beta/lfp_store_service_client.d.ts +430 -0
  26. package/build/src/v1beta/lfp_store_service_client.js +645 -0
  27. package/build/src/v1beta/lfp_store_service_client.js.map +1 -0
  28. package/build/src/v1beta/lfp_store_service_client_config.json +58 -0
  29. package/package.json +70 -0
@@ -0,0 +1,17 @@
1
+ import * as v1beta from './v1beta';
2
+ declare const LfpInventoryServiceClient: typeof v1beta.LfpInventoryServiceClient;
3
+ type LfpInventoryServiceClient = v1beta.LfpInventoryServiceClient;
4
+ declare const LfpSaleServiceClient: typeof v1beta.LfpSaleServiceClient;
5
+ type LfpSaleServiceClient = v1beta.LfpSaleServiceClient;
6
+ declare const LfpStoreServiceClient: typeof v1beta.LfpStoreServiceClient;
7
+ type LfpStoreServiceClient = v1beta.LfpStoreServiceClient;
8
+ export { v1beta, LfpInventoryServiceClient, LfpSaleServiceClient, LfpStoreServiceClient, };
9
+ declare const _default: {
10
+ v1beta: typeof v1beta;
11
+ LfpInventoryServiceClient: typeof v1beta.LfpInventoryServiceClient;
12
+ LfpSaleServiceClient: typeof v1beta.LfpSaleServiceClient;
13
+ LfpStoreServiceClient: typeof v1beta.LfpStoreServiceClient;
14
+ };
15
+ export default _default;
16
+ import * as protos from '../protos/protos';
17
+ export { protos };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ // Copyright 2024 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 synthtool. **
17
+ // ** https://github.com/googleapis/synthtool **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.protos = exports.LfpStoreServiceClient = exports.LfpSaleServiceClient = exports.LfpInventoryServiceClient = exports.v1beta = void 0;
21
+ const v1beta = require("./v1beta");
22
+ exports.v1beta = v1beta;
23
+ const LfpInventoryServiceClient = v1beta.LfpInventoryServiceClient;
24
+ exports.LfpInventoryServiceClient = LfpInventoryServiceClient;
25
+ const LfpSaleServiceClient = v1beta.LfpSaleServiceClient;
26
+ exports.LfpSaleServiceClient = LfpSaleServiceClient;
27
+ const LfpStoreServiceClient = v1beta.LfpStoreServiceClient;
28
+ exports.LfpStoreServiceClient = LfpStoreServiceClient;
29
+ exports.default = {
30
+ v1beta,
31
+ LfpInventoryServiceClient,
32
+ LfpSaleServiceClient,
33
+ LfpStoreServiceClient,
34
+ };
35
+ const protos = require("../protos/protos");
36
+ exports.protos = protos;
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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;AAUjC,wBAAM;AARR,MAAM,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AASjE,8DAAyB;AAP3B,MAAM,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAQvD,oDAAoB;AANtB,MAAM,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAOzD,sDAAqB;AAEvB,kBAAe;IACb,MAAM;IACN,yBAAyB;IACzB,oBAAoB;IACpB,qBAAqB;CACtB,CAAC;AACF,2CAA2C;AACnC,wBAAM"}
@@ -0,0 +1,3 @@
1
+ export { LfpInventoryServiceClient } from './lfp_inventory_service_client';
2
+ export { LfpSaleServiceClient } from './lfp_sale_service_client';
3
+ export { LfpStoreServiceClient } from './lfp_store_service_client';
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // Copyright 2024 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.LfpStoreServiceClient = exports.LfpSaleServiceClient = exports.LfpInventoryServiceClient = void 0;
21
+ var lfp_inventory_service_client_1 = require("./lfp_inventory_service_client");
22
+ Object.defineProperty(exports, "LfpInventoryServiceClient", { enumerable: true, get: function () { return lfp_inventory_service_client_1.LfpInventoryServiceClient; } });
23
+ var lfp_sale_service_client_1 = require("./lfp_sale_service_client");
24
+ Object.defineProperty(exports, "LfpSaleServiceClient", { enumerable: true, get: function () { return lfp_sale_service_client_1.LfpSaleServiceClient; } });
25
+ var lfp_store_service_client_1 = require("./lfp_store_service_client");
26
+ Object.defineProperty(exports, "LfpStoreServiceClient", { enumerable: true, get: function () { return lfp_store_service_client_1.LfpStoreServiceClient; } });
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1beta/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,+EAAyE;AAAjE,yIAAA,yBAAyB,OAAA;AACjC,qEAA+D;AAAvD,+HAAA,oBAAoB,OAAA;AAC5B,uEAAiE;AAAzD,iIAAA,qBAAqB,OAAA"}
@@ -0,0 +1,267 @@
1
+ import type * as gax from 'google-gax';
2
+ import type { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
3
+ import * as protos from '../../protos/protos';
4
+ /**
5
+ * Service for a [LFP
6
+ * partner](https://support.google.com/merchants/answer/7676652) to submit local
7
+ * inventories for a merchant.
8
+ * @class
9
+ * @memberof v1beta
10
+ */
11
+ export declare class LfpInventoryServiceClient {
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
+ auth: gax.GoogleAuth;
22
+ descriptors: Descriptors;
23
+ warn: (code: string, message: string, warnType?: string) => void;
24
+ innerApiCalls: {
25
+ [name: string]: Function;
26
+ };
27
+ pathTemplates: {
28
+ [name: string]: gax.PathTemplate;
29
+ };
30
+ lfpInventoryServiceStub?: Promise<{
31
+ [name: string]: Function;
32
+ }>;
33
+ /**
34
+ * Construct an instance of LfpInventoryServiceClient.
35
+ *
36
+ * @param {object} [options] - The configuration object.
37
+ * The options accepted by the constructor are described in detail
38
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
39
+ * The common options are:
40
+ * @param {object} [options.credentials] - Credentials object.
41
+ * @param {string} [options.credentials.client_email]
42
+ * @param {string} [options.credentials.private_key]
43
+ * @param {string} [options.email] - Account email address. Required when
44
+ * using a .pem or .p12 keyFilename.
45
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
46
+ * .p12 key downloaded from the Google Developers Console. If you provide
47
+ * a path to a JSON file, the projectId option below is not necessary.
48
+ * NOTE: .pem and .p12 require you to specify options.email as well.
49
+ * @param {number} [options.port] - The port on which to connect to
50
+ * the remote host.
51
+ * @param {string} [options.projectId] - The project ID from the Google
52
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
53
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
54
+ * app is running in an environment which supports
55
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
56
+ * your project ID will be detected automatically.
57
+ * @param {string} [options.apiEndpoint] - The domain name of the
58
+ * API remote host.
59
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
60
+ * Follows the structure of {@link gapicConfig}.
61
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
62
+ * For more information, please check the
63
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
64
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
65
+ * need to avoid loading the default gRPC version and want to use the fallback
66
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
67
+ * ```
68
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
69
+ * const client = new LfpInventoryServiceClient({fallback: true}, gax);
70
+ * ```
71
+ */
72
+ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
73
+ /**
74
+ * Initialize the client.
75
+ * Performs asynchronous operations (such as authentication) and prepares the client.
76
+ * This function will be called automatically when any class method is called for the
77
+ * first time, but if you need to initialize it before calling an actual method,
78
+ * feel free to call initialize() directly.
79
+ *
80
+ * You can await on this method if you want to make sure the client is initialized.
81
+ *
82
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
83
+ */
84
+ initialize(): Promise<{
85
+ [name: string]: Function;
86
+ }>;
87
+ /**
88
+ * The DNS address for this API service.
89
+ * @deprecated Use the apiEndpoint method of the client instance.
90
+ * @returns {string} The DNS address for this service.
91
+ */
92
+ static get servicePath(): string;
93
+ /**
94
+ * The DNS address for this API service - same as servicePath.
95
+ * @deprecated Use the apiEndpoint method of the client instance.
96
+ * @returns {string} The DNS address for this service.
97
+ */
98
+ static get apiEndpoint(): string;
99
+ /**
100
+ * The DNS address for this API service.
101
+ * @returns {string} The DNS address for this service.
102
+ */
103
+ get apiEndpoint(): string;
104
+ get universeDomain(): string;
105
+ /**
106
+ * The port for this API service.
107
+ * @returns {number} The default port for this service.
108
+ */
109
+ static get port(): number;
110
+ /**
111
+ * The scopes needed to make gRPC calls for every method defined
112
+ * in this service.
113
+ * @returns {string[]} List of default scopes.
114
+ */
115
+ static get scopes(): string[];
116
+ getProjectId(): Promise<string>;
117
+ getProjectId(callback: Callback<string, undefined, undefined>): void;
118
+ /**
119
+ * Inserts a `LfpInventory` resource for the given target merchant account. If
120
+ * the resource already exists, it will be replaced. The inventory
121
+ * automatically expires after 30 days.
122
+ *
123
+ * @param {Object} request
124
+ * The request object that will be sent.
125
+ * @param {string} request.parent
126
+ * Required. The LFP provider account.
127
+ * Format: `accounts/{account}`
128
+ * @param {google.shopping.merchant.lfp.v1beta.LfpInventory} request.lfpInventory
129
+ * Required. The inventory to insert.
130
+ * @param {object} [options]
131
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
132
+ * @returns {Promise} - The promise which resolves to an array.
133
+ * The first element of the array is an object representing {@link protos.google.shopping.merchant.lfp.v1beta.LfpInventory|LfpInventory}.
134
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
135
+ * for more details and examples.
136
+ * @example <caption>include:samples/generated/v1beta/lfp_inventory_service.insert_lfp_inventory.js</caption>
137
+ * region_tag:merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_async
138
+ */
139
+ insertLfpInventory(request?: protos.google.shopping.merchant.lfp.v1beta.IInsertLfpInventoryRequest, options?: CallOptions): Promise<[
140
+ protos.google.shopping.merchant.lfp.v1beta.ILfpInventory,
141
+ (protos.google.shopping.merchant.lfp.v1beta.IInsertLfpInventoryRequest | undefined),
142
+ {} | undefined
143
+ ]>;
144
+ insertLfpInventory(request: protos.google.shopping.merchant.lfp.v1beta.IInsertLfpInventoryRequest, options: CallOptions, callback: Callback<protos.google.shopping.merchant.lfp.v1beta.ILfpInventory, protos.google.shopping.merchant.lfp.v1beta.IInsertLfpInventoryRequest | null | undefined, {} | null | undefined>): void;
145
+ insertLfpInventory(request: protos.google.shopping.merchant.lfp.v1beta.IInsertLfpInventoryRequest, callback: Callback<protos.google.shopping.merchant.lfp.v1beta.ILfpInventory, protos.google.shopping.merchant.lfp.v1beta.IInsertLfpInventoryRequest | null | undefined, {} | null | undefined>): void;
146
+ /**
147
+ * Return a fully-qualified account resource name string.
148
+ *
149
+ * @param {string} account
150
+ * @returns {string} Resource name string.
151
+ */
152
+ accountPath(account: string): string;
153
+ /**
154
+ * Parse the account from Account resource.
155
+ *
156
+ * @param {string} accountName
157
+ * A fully-qualified path representing Account resource.
158
+ * @returns {string} A string representing the account.
159
+ */
160
+ matchAccountFromAccountName(accountName: string): string | number;
161
+ /**
162
+ * Return a fully-qualified lfpInventory resource name string.
163
+ *
164
+ * @param {string} account
165
+ * @param {string} target_merchant
166
+ * @param {string} store_code
167
+ * @param {string} offer
168
+ * @returns {string} Resource name string.
169
+ */
170
+ lfpInventoryPath(account: string, targetMerchant: string, storeCode: string, offer: string): string;
171
+ /**
172
+ * Parse the account from LfpInventory resource.
173
+ *
174
+ * @param {string} lfpInventoryName
175
+ * A fully-qualified path representing LfpInventory resource.
176
+ * @returns {string} A string representing the account.
177
+ */
178
+ matchAccountFromLfpInventoryName(lfpInventoryName: string): string | number;
179
+ /**
180
+ * Parse the target_merchant from LfpInventory resource.
181
+ *
182
+ * @param {string} lfpInventoryName
183
+ * A fully-qualified path representing LfpInventory resource.
184
+ * @returns {string} A string representing the target_merchant.
185
+ */
186
+ matchTargetMerchantFromLfpInventoryName(lfpInventoryName: string): string | number;
187
+ /**
188
+ * Parse the store_code from LfpInventory resource.
189
+ *
190
+ * @param {string} lfpInventoryName
191
+ * A fully-qualified path representing LfpInventory resource.
192
+ * @returns {string} A string representing the store_code.
193
+ */
194
+ matchStoreCodeFromLfpInventoryName(lfpInventoryName: string): string | number;
195
+ /**
196
+ * Parse the offer from LfpInventory resource.
197
+ *
198
+ * @param {string} lfpInventoryName
199
+ * A fully-qualified path representing LfpInventory resource.
200
+ * @returns {string} A string representing the offer.
201
+ */
202
+ matchOfferFromLfpInventoryName(lfpInventoryName: string): string | number;
203
+ /**
204
+ * Return a fully-qualified lfpSale resource name string.
205
+ *
206
+ * @param {string} account
207
+ * @param {string} sale
208
+ * @returns {string} Resource name string.
209
+ */
210
+ lfpSalePath(account: string, sale: string): string;
211
+ /**
212
+ * Parse the account from LfpSale resource.
213
+ *
214
+ * @param {string} lfpSaleName
215
+ * A fully-qualified path representing LfpSale resource.
216
+ * @returns {string} A string representing the account.
217
+ */
218
+ matchAccountFromLfpSaleName(lfpSaleName: string): string | number;
219
+ /**
220
+ * Parse the sale from LfpSale resource.
221
+ *
222
+ * @param {string} lfpSaleName
223
+ * A fully-qualified path representing LfpSale resource.
224
+ * @returns {string} A string representing the sale.
225
+ */
226
+ matchSaleFromLfpSaleName(lfpSaleName: string): string | number;
227
+ /**
228
+ * Return a fully-qualified lfpStore resource name string.
229
+ *
230
+ * @param {string} account
231
+ * @param {string} target_merchant
232
+ * @param {string} store_code
233
+ * @returns {string} Resource name string.
234
+ */
235
+ lfpStorePath(account: string, targetMerchant: string, storeCode: string): string;
236
+ /**
237
+ * Parse the account from LfpStore resource.
238
+ *
239
+ * @param {string} lfpStoreName
240
+ * A fully-qualified path representing LfpStore resource.
241
+ * @returns {string} A string representing the account.
242
+ */
243
+ matchAccountFromLfpStoreName(lfpStoreName: string): string | number;
244
+ /**
245
+ * Parse the target_merchant from LfpStore resource.
246
+ *
247
+ * @param {string} lfpStoreName
248
+ * A fully-qualified path representing LfpStore resource.
249
+ * @returns {string} A string representing the target_merchant.
250
+ */
251
+ matchTargetMerchantFromLfpStoreName(lfpStoreName: string): string | number;
252
+ /**
253
+ * Parse the store_code from LfpStore resource.
254
+ *
255
+ * @param {string} lfpStoreName
256
+ * A fully-qualified path representing LfpStore resource.
257
+ * @returns {string} A string representing the store_code.
258
+ */
259
+ matchStoreCodeFromLfpStoreName(lfpStoreName: string): string | number;
260
+ /**
261
+ * Terminate the gRPC channel and close the client.
262
+ *
263
+ * The client will no longer be usable and all future behavior is undefined.
264
+ * @returns {Promise} A promise that resolves when the client is closed.
265
+ */
266
+ close(): Promise<void>;
267
+ }