@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,250 @@
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 v1beta
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
+ 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
+ lfpSaleServiceStub?: Promise<{
31
+ [name: string]: Function;
32
+ }>;
33
+ /**
34
+ * Construct an instance of LfpSaleServiceClient.
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 LfpSaleServiceClient({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 `LfpSale` for the given merchant.
120
+ *
121
+ * @param {Object} request
122
+ * The request object that will be sent.
123
+ * @param {string} request.parent
124
+ * Required. The LFP provider account.
125
+ * Format: `accounts/{lfp_partner}`
126
+ * @param {google.shopping.merchant.lfp.v1beta.LfpSale} request.lfpSale
127
+ * Required. The sale to insert.
128
+ * @param {object} [options]
129
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
130
+ * @returns {Promise} - The promise which resolves to an array.
131
+ * The first element of the array is an object representing {@link protos.google.shopping.merchant.lfp.v1beta.LfpSale|LfpSale}.
132
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
133
+ * for more details and examples.
134
+ * @example <caption>include:samples/generated/v1beta/lfp_sale_service.insert_lfp_sale.js</caption>
135
+ * region_tag:merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_async
136
+ */
137
+ insertLfpSale(request?: protos.google.shopping.merchant.lfp.v1beta.IInsertLfpSaleRequest, options?: CallOptions): Promise<[
138
+ protos.google.shopping.merchant.lfp.v1beta.ILfpSale,
139
+ (protos.google.shopping.merchant.lfp.v1beta.IInsertLfpSaleRequest | undefined),
140
+ {} | undefined
141
+ ]>;
142
+ insertLfpSale(request: protos.google.shopping.merchant.lfp.v1beta.IInsertLfpSaleRequest, options: CallOptions, callback: Callback<protos.google.shopping.merchant.lfp.v1beta.ILfpSale, protos.google.shopping.merchant.lfp.v1beta.IInsertLfpSaleRequest | null | undefined, {} | null | undefined>): void;
143
+ insertLfpSale(request: protos.google.shopping.merchant.lfp.v1beta.IInsertLfpSaleRequest, callback: Callback<protos.google.shopping.merchant.lfp.v1beta.ILfpSale, protos.google.shopping.merchant.lfp.v1beta.IInsertLfpSaleRequest | null | undefined, {} | null | undefined>): void;
144
+ /**
145
+ * Return a fully-qualified lfpInventory resource name string.
146
+ *
147
+ * @param {string} account
148
+ * @param {string} target_merchant
149
+ * @param {string} store_code
150
+ * @param {string} offer
151
+ * @returns {string} Resource name string.
152
+ */
153
+ lfpInventoryPath(account: string, targetMerchant: string, storeCode: string, offer: string): string;
154
+ /**
155
+ * Parse the account from LfpInventory resource.
156
+ *
157
+ * @param {string} lfpInventoryName
158
+ * A fully-qualified path representing LfpInventory resource.
159
+ * @returns {string} A string representing the account.
160
+ */
161
+ matchAccountFromLfpInventoryName(lfpInventoryName: string): string | number;
162
+ /**
163
+ * Parse the target_merchant from LfpInventory resource.
164
+ *
165
+ * @param {string} lfpInventoryName
166
+ * A fully-qualified path representing LfpInventory resource.
167
+ * @returns {string} A string representing the target_merchant.
168
+ */
169
+ matchTargetMerchantFromLfpInventoryName(lfpInventoryName: string): string | number;
170
+ /**
171
+ * Parse the store_code from LfpInventory resource.
172
+ *
173
+ * @param {string} lfpInventoryName
174
+ * A fully-qualified path representing LfpInventory resource.
175
+ * @returns {string} A string representing the store_code.
176
+ */
177
+ matchStoreCodeFromLfpInventoryName(lfpInventoryName: string): string | number;
178
+ /**
179
+ * Parse the offer from LfpInventory resource.
180
+ *
181
+ * @param {string} lfpInventoryName
182
+ * A fully-qualified path representing LfpInventory resource.
183
+ * @returns {string} A string representing the offer.
184
+ */
185
+ matchOfferFromLfpInventoryName(lfpInventoryName: string): string | number;
186
+ /**
187
+ * Return a fully-qualified lfpSale resource name string.
188
+ *
189
+ * @param {string} account
190
+ * @param {string} sale
191
+ * @returns {string} Resource name string.
192
+ */
193
+ lfpSalePath(account: string, sale: string): string;
194
+ /**
195
+ * Parse the account from LfpSale resource.
196
+ *
197
+ * @param {string} lfpSaleName
198
+ * A fully-qualified path representing LfpSale resource.
199
+ * @returns {string} A string representing the account.
200
+ */
201
+ matchAccountFromLfpSaleName(lfpSaleName: string): string | number;
202
+ /**
203
+ * Parse the sale from LfpSale resource.
204
+ *
205
+ * @param {string} lfpSaleName
206
+ * A fully-qualified path representing LfpSale resource.
207
+ * @returns {string} A string representing the sale.
208
+ */
209
+ matchSaleFromLfpSaleName(lfpSaleName: string): string | number;
210
+ /**
211
+ * Return a fully-qualified lfpStore resource name string.
212
+ *
213
+ * @param {string} account
214
+ * @param {string} target_merchant
215
+ * @param {string} store_code
216
+ * @returns {string} Resource name string.
217
+ */
218
+ lfpStorePath(account: string, targetMerchant: string, storeCode: string): string;
219
+ /**
220
+ * Parse the account from LfpStore resource.
221
+ *
222
+ * @param {string} lfpStoreName
223
+ * A fully-qualified path representing LfpStore resource.
224
+ * @returns {string} A string representing the account.
225
+ */
226
+ matchAccountFromLfpStoreName(lfpStoreName: string): string | number;
227
+ /**
228
+ * Parse the target_merchant from LfpStore resource.
229
+ *
230
+ * @param {string} lfpStoreName
231
+ * A fully-qualified path representing LfpStore resource.
232
+ * @returns {string} A string representing the target_merchant.
233
+ */
234
+ matchTargetMerchantFromLfpStoreName(lfpStoreName: string): string | number;
235
+ /**
236
+ * Parse the store_code from LfpStore resource.
237
+ *
238
+ * @param {string} lfpStoreName
239
+ * A fully-qualified path representing LfpStore resource.
240
+ * @returns {string} A string representing the store_code.
241
+ */
242
+ matchStoreCodeFromLfpStoreName(lfpStoreName: string): string | number;
243
+ /**
244
+ * Terminate the gRPC channel and close the client.
245
+ *
246
+ * The client will no longer be usable and all future behavior is undefined.
247
+ * @returns {Promise} A promise that resolves when the client is closed.
248
+ */
249
+ close(): Promise<void>;
250
+ }