@google-shopping/lfp 0.6.0 → 0.8.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 (36) hide show
  1. package/README.md +7 -0
  2. package/build/protos/google/shopping/merchant/lfp/v1/lfpinventory.proto +152 -0
  3. package/build/protos/google/shopping/merchant/lfp/v1/lfpmerchantstate.proto +209 -0
  4. package/build/protos/google/shopping/merchant/lfp/v1/lfpsale.proto +125 -0
  5. package/build/protos/google/shopping/merchant/lfp/v1/lfpstore.proto +252 -0
  6. package/build/protos/protos.d.ts +2717 -20
  7. package/build/protos/protos.js +9197 -1880
  8. package/build/protos/protos.json +1049 -22
  9. package/build/src/index.d.ts +3 -1
  10. package/build/src/index.js +4 -2
  11. package/build/src/index.js.map +1 -1
  12. package/build/src/v1/gapic_metadata.json +139 -0
  13. package/build/src/v1/index.d.ts +4 -0
  14. package/build/src/v1/index.js +29 -0
  15. package/build/src/v1/index.js.map +1 -0
  16. package/build/src/v1/lfp_inventory_service_client.d.ts +292 -0
  17. package/build/src/v1/lfp_inventory_service_client.js +527 -0
  18. package/build/src/v1/lfp_inventory_service_client.js.map +1 -0
  19. package/build/src/v1/lfp_inventory_service_client_config.json +43 -0
  20. package/build/src/v1/lfp_inventory_service_proto_list.json +7 -0
  21. package/build/src/v1/lfp_merchant_state_service_client.d.ts +277 -0
  22. package/build/src/v1/lfp_merchant_state_service_client.js +508 -0
  23. package/build/src/v1/lfp_merchant_state_service_client.js.map +1 -0
  24. package/build/src/v1/lfp_merchant_state_service_client_config.json +43 -0
  25. package/build/src/v1/lfp_merchant_state_service_proto_list.json +7 -0
  26. package/build/src/v1/lfp_sale_service_client.d.ts +275 -0
  27. package/build/src/v1/lfp_sale_service_client.js +505 -0
  28. package/build/src/v1/lfp_sale_service_client.js.map +1 -0
  29. package/build/src/v1/lfp_sale_service_client_config.json +43 -0
  30. package/build/src/v1/lfp_sale_service_proto_list.json +7 -0
  31. package/build/src/v1/lfp_store_service_client.d.ts +454 -0
  32. package/build/src/v1/lfp_store_service_client.js +734 -0
  33. package/build/src/v1/lfp_store_service_client.js.map +1 -0
  34. package/build/src/v1/lfp_store_service_client_config.json +58 -0
  35. package/build/src/v1/lfp_store_service_proto_list.json +7 -0
  36. package/package.json +1 -1
@@ -0,0 +1,275 @@
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 sales
7
+ * data for a merchant.
8
+ * @class
9
+ * @memberof v1
10
+ */
11
+ export declare class LfpSaleServiceClient {
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
+ pathTemplates: {
29
+ [name: string]: gax.PathTemplate;
30
+ };
31
+ lfpSaleServiceStub?: Promise<{
32
+ [name: string]: Function;
33
+ }>;
34
+ /**
35
+ * Construct an instance of LfpSaleServiceClient.
36
+ *
37
+ * @param {object} [options] - The configuration object.
38
+ * The options accepted by the constructor are described in detail
39
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
40
+ * The common options are:
41
+ * @param {object} [options.credentials] - Credentials object.
42
+ * @param {string} [options.credentials.client_email]
43
+ * @param {string} [options.credentials.private_key]
44
+ * @param {string} [options.email] - Account email address. Required when
45
+ * using a .pem or .p12 keyFilename.
46
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
47
+ * .p12 key downloaded from the Google Developers Console. If you provide
48
+ * a path to a JSON file, the projectId option below is not necessary.
49
+ * NOTE: .pem and .p12 require you to specify options.email as well.
50
+ * @param {number} [options.port] - The port on which to connect to
51
+ * the remote host.
52
+ * @param {string} [options.projectId] - The project ID from the Google
53
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
54
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
55
+ * app is running in an environment which supports
56
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
57
+ * your project ID will be detected automatically.
58
+ * @param {string} [options.apiEndpoint] - The domain name of the
59
+ * API remote host.
60
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
61
+ * Follows the structure of {@link gapicConfig}.
62
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
63
+ * For more information, please check the
64
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
65
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
66
+ * need to avoid loading the default gRPC version and want to use the fallback
67
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
68
+ * ```
69
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
70
+ * const client = new LfpSaleServiceClient({fallback: true}, gax);
71
+ * ```
72
+ */
73
+ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
74
+ /**
75
+ * Initialize the client.
76
+ * Performs asynchronous operations (such as authentication) and prepares the client.
77
+ * This function will be called automatically when any class method is called for the
78
+ * first time, but if you need to initialize it before calling an actual method,
79
+ * feel free to call initialize() directly.
80
+ *
81
+ * You can await on this method if you want to make sure the client is initialized.
82
+ *
83
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
84
+ */
85
+ initialize(): Promise<{
86
+ [name: string]: Function;
87
+ }>;
88
+ /**
89
+ * The DNS address for this API service.
90
+ * @deprecated Use the apiEndpoint method of the client instance.
91
+ * @returns {string} The DNS address for this service.
92
+ */
93
+ static get servicePath(): string;
94
+ /**
95
+ * The DNS address for this API service - same as servicePath.
96
+ * @deprecated Use the apiEndpoint method of the client instance.
97
+ * @returns {string} The DNS address for this service.
98
+ */
99
+ static get apiEndpoint(): string;
100
+ /**
101
+ * The DNS address for this API service.
102
+ * @returns {string} The DNS address for this service.
103
+ */
104
+ get apiEndpoint(): string;
105
+ get universeDomain(): string;
106
+ /**
107
+ * The port for this API service.
108
+ * @returns {number} The default port for this service.
109
+ */
110
+ static get port(): number;
111
+ /**
112
+ * The scopes needed to make gRPC calls for every method defined
113
+ * in this service.
114
+ * @returns {string[]} List of default scopes.
115
+ */
116
+ static get scopes(): string[];
117
+ getProjectId(): Promise<string>;
118
+ getProjectId(callback: Callback<string, undefined, undefined>): void;
119
+ /**
120
+ * Inserts a `LfpSale` for the given merchant.
121
+ *
122
+ * @param {Object} request
123
+ * The request object that will be sent.
124
+ * @param {string} request.parent
125
+ * Required. The LFP provider account.
126
+ * Format: `accounts/{lfp_partner}`
127
+ * @param {google.shopping.merchant.lfp.v1.LfpSale} request.lfpSale
128
+ * Required. The sale to insert.
129
+ * @param {object} [options]
130
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
131
+ * @returns {Promise} - The promise which resolves to an array.
132
+ * The first element of the array is an object representing {@link protos.google.shopping.merchant.lfp.v1.LfpSale|LfpSale}.
133
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
134
+ * for more details and examples.
135
+ * @example <caption>include:samples/generated/v1/lfp_sale_service.insert_lfp_sale.js</caption>
136
+ * region_tag:merchantapi_v1_generated_LfpSaleService_InsertLfpSale_async
137
+ */
138
+ insertLfpSale(request?: protos.google.shopping.merchant.lfp.v1.IInsertLfpSaleRequest, options?: CallOptions): Promise<[
139
+ protos.google.shopping.merchant.lfp.v1.ILfpSale,
140
+ protos.google.shopping.merchant.lfp.v1.IInsertLfpSaleRequest | undefined,
141
+ {} | undefined
142
+ ]>;
143
+ insertLfpSale(request: protos.google.shopping.merchant.lfp.v1.IInsertLfpSaleRequest, options: CallOptions, callback: Callback<protos.google.shopping.merchant.lfp.v1.ILfpSale, protos.google.shopping.merchant.lfp.v1.IInsertLfpSaleRequest | null | undefined, {} | null | undefined>): void;
144
+ insertLfpSale(request: protos.google.shopping.merchant.lfp.v1.IInsertLfpSaleRequest, callback: Callback<protos.google.shopping.merchant.lfp.v1.ILfpSale, protos.google.shopping.merchant.lfp.v1.IInsertLfpSaleRequest | null | undefined, {} | null | undefined>): void;
145
+ /**
146
+ * Return a fully-qualified lfpInventory resource name string.
147
+ *
148
+ * @param {string} account
149
+ * @param {string} target_merchant
150
+ * @param {string} store_code
151
+ * @param {string} offer
152
+ * @returns {string} Resource name string.
153
+ */
154
+ lfpInventoryPath(account: string, targetMerchant: string, storeCode: string, offer: string): string;
155
+ /**
156
+ * Parse the account from LfpInventory resource.
157
+ *
158
+ * @param {string} lfpInventoryName
159
+ * A fully-qualified path representing LfpInventory resource.
160
+ * @returns {string} A string representing the account.
161
+ */
162
+ matchAccountFromLfpInventoryName(lfpInventoryName: string): string | number;
163
+ /**
164
+ * Parse the target_merchant from LfpInventory resource.
165
+ *
166
+ * @param {string} lfpInventoryName
167
+ * A fully-qualified path representing LfpInventory resource.
168
+ * @returns {string} A string representing the target_merchant.
169
+ */
170
+ matchTargetMerchantFromLfpInventoryName(lfpInventoryName: string): string | number;
171
+ /**
172
+ * Parse the store_code from LfpInventory resource.
173
+ *
174
+ * @param {string} lfpInventoryName
175
+ * A fully-qualified path representing LfpInventory resource.
176
+ * @returns {string} A string representing the store_code.
177
+ */
178
+ matchStoreCodeFromLfpInventoryName(lfpInventoryName: string): string | number;
179
+ /**
180
+ * Parse the offer from LfpInventory resource.
181
+ *
182
+ * @param {string} lfpInventoryName
183
+ * A fully-qualified path representing LfpInventory resource.
184
+ * @returns {string} A string representing the offer.
185
+ */
186
+ matchOfferFromLfpInventoryName(lfpInventoryName: string): string | number;
187
+ /**
188
+ * Return a fully-qualified lfpMerchantState resource name string.
189
+ *
190
+ * @param {string} account
191
+ * @param {string} lfp_merchant_state
192
+ * @returns {string} Resource name string.
193
+ */
194
+ lfpMerchantStatePath(account: string, lfpMerchantState: string): string;
195
+ /**
196
+ * Parse the account from LfpMerchantState resource.
197
+ *
198
+ * @param {string} lfpMerchantStateName
199
+ * A fully-qualified path representing LfpMerchantState resource.
200
+ * @returns {string} A string representing the account.
201
+ */
202
+ matchAccountFromLfpMerchantStateName(lfpMerchantStateName: string): string | number;
203
+ /**
204
+ * Parse the lfp_merchant_state from LfpMerchantState resource.
205
+ *
206
+ * @param {string} lfpMerchantStateName
207
+ * A fully-qualified path representing LfpMerchantState resource.
208
+ * @returns {string} A string representing the lfp_merchant_state.
209
+ */
210
+ matchLfpMerchantStateFromLfpMerchantStateName(lfpMerchantStateName: string): string | number;
211
+ /**
212
+ * Return a fully-qualified lfpSale resource name string.
213
+ *
214
+ * @param {string} account
215
+ * @param {string} sale
216
+ * @returns {string} Resource name string.
217
+ */
218
+ lfpSalePath(account: string, sale: string): string;
219
+ /**
220
+ * Parse the account from LfpSale resource.
221
+ *
222
+ * @param {string} lfpSaleName
223
+ * A fully-qualified path representing LfpSale resource.
224
+ * @returns {string} A string representing the account.
225
+ */
226
+ matchAccountFromLfpSaleName(lfpSaleName: string): string | number;
227
+ /**
228
+ * Parse the sale from LfpSale resource.
229
+ *
230
+ * @param {string} lfpSaleName
231
+ * A fully-qualified path representing LfpSale resource.
232
+ * @returns {string} A string representing the sale.
233
+ */
234
+ matchSaleFromLfpSaleName(lfpSaleName: string): string | number;
235
+ /**
236
+ * Return a fully-qualified lfpStore resource name string.
237
+ *
238
+ * @param {string} account
239
+ * @param {string} target_merchant
240
+ * @param {string} store_code
241
+ * @returns {string} Resource name string.
242
+ */
243
+ lfpStorePath(account: string, targetMerchant: string, storeCode: string): string;
244
+ /**
245
+ * Parse the account from LfpStore resource.
246
+ *
247
+ * @param {string} lfpStoreName
248
+ * A fully-qualified path representing LfpStore resource.
249
+ * @returns {string} A string representing the account.
250
+ */
251
+ matchAccountFromLfpStoreName(lfpStoreName: string): string | number;
252
+ /**
253
+ * Parse the target_merchant from LfpStore resource.
254
+ *
255
+ * @param {string} lfpStoreName
256
+ * A fully-qualified path representing LfpStore resource.
257
+ * @returns {string} A string representing the target_merchant.
258
+ */
259
+ matchTargetMerchantFromLfpStoreName(lfpStoreName: string): string | number;
260
+ /**
261
+ * Parse the store_code from LfpStore resource.
262
+ *
263
+ * @param {string} lfpStoreName
264
+ * A fully-qualified path representing LfpStore resource.
265
+ * @returns {string} A string representing the store_code.
266
+ */
267
+ matchStoreCodeFromLfpStoreName(lfpStoreName: string): string | number;
268
+ /**
269
+ * Terminate the gRPC channel and close the client.
270
+ *
271
+ * The client will no longer be usable and all future behavior is undefined.
272
+ * @returns {Promise} A promise that resolves when the client is closed.
273
+ */
274
+ close(): Promise<void>;
275
+ }