googleapis
Version:
Google APIs Client Library for Node.js
1,221 lines (1,220 loc) • 117 kB
JavaScript
"use strict";
// Copyright 2020 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.content_v2 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/class-name-casing */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var content_v2;
(function (content_v2) {
/**
* Content API for Shopping
*
* Manage your product listings and accounts for Google Shopping
*
* @example
* ```js
* const {google} = require('googleapis');
* const content = google.content('v2');
* ```
*/
class Content {
context;
accounts;
accountstatuses;
accounttax;
datafeeds;
datafeedstatuses;
liasettings;
orderinvoices;
orderreports;
orderreturns;
orders;
pos;
products;
productstatuses;
shippingsettings;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
this.accountstatuses = new Resource$Accountstatuses(this.context);
this.accounttax = new Resource$Accounttax(this.context);
this.datafeeds = new Resource$Datafeeds(this.context);
this.datafeedstatuses = new Resource$Datafeedstatuses(this.context);
this.liasettings = new Resource$Liasettings(this.context);
this.orderinvoices = new Resource$Orderinvoices(this.context);
this.orderreports = new Resource$Orderreports(this.context);
this.orderreturns = new Resource$Orderreturns(this.context);
this.orders = new Resource$Orders(this.context);
this.pos = new Resource$Pos(this.context);
this.products = new Resource$Products(this.context);
this.productstatuses = new Resource$Productstatuses(this.context);
this.shippingsettings = new Resource$Shippingsettings(this.context);
}
}
content_v2.Content = Content;
class Resource$Accounts {
context;
constructor(context) {
this.context = context;
}
authinfo(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/accounts/authinfo').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
claimwebsite(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/content/v2/{merchantId}/accounts/{accountId}/claimwebsite').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
custombatch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/accounts/batch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounts/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounts/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
link(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounts/{accountId}/link').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounts/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
content_v2.Resource$Accounts = Resource$Accounts;
class Resource$Accountstatuses {
context;
constructor(context) {
this.context = context;
}
custombatch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/accountstatuses/batch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accountstatuses/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accountstatuses').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
content_v2.Resource$Accountstatuses = Resource$Accountstatuses;
class Resource$Accounttax {
context;
constructor(context) {
this.context = context;
}
custombatch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/accounttax/batch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounttax/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounttax').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/accounttax/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
content_v2.Resource$Accounttax = Resource$Accounttax;
class Resource$Datafeeds {
context;
constructor(context) {
this.context = context;
}
custombatch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/datafeeds/batch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/datafeeds/{datafeedId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['merchantId', 'datafeedId'],
pathParams: ['datafeedId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
fetchnow(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/content/v2/{merchantId}/datafeeds/{datafeedId}/fetchNow').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId', 'datafeedId'],
pathParams: ['datafeedId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/datafeeds/{datafeedId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId', 'datafeedId'],
pathParams: ['datafeedId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/datafeeds').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/datafeeds').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/datafeeds/{datafeedId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['merchantId', 'datafeedId'],
pathParams: ['datafeedId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
content_v2.Resource$Datafeeds = Resource$Datafeeds;
class Resource$Datafeedstatuses {
context;
constructor(context) {
this.context = context;
}
custombatch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/datafeedstatuses/batch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/datafeedstatuses/{datafeedId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId', 'datafeedId'],
pathParams: ['datafeedId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/datafeedstatuses').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
content_v2.Resource$Datafeedstatuses = Resource$Datafeedstatuses;
class Resource$Liasettings {
context;
constructor(context) {
this.context = context;
}
custombatch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/liasettings/batch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/liasettings/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getaccessiblegmbaccounts(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/content/v2/{merchantId}/liasettings/{accountId}/accessiblegmbaccounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/liasettings').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['merchantId'],
pathParams: ['merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
listposdataproviders(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/liasettings/posdataproviders').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
requestgmbaccess(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/content/v2/{merchantId}/liasettings/{accountId}/requestgmbaccess').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId', 'accountId', 'gmbEmail'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
requestinventoryverification(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/content/v2/{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId', 'accountId', 'country'],
pathParams: ['accountId', 'country', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
setinventoryverificationcontact(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/content/v2/{merchantId}/liasettings/{accountId}/setinventoryverificationcontact').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [
'merchantId',
'accountId',
'country',
'language',
'contactName',
'contactEmail',
],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
setposdataprovider(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/content/v2/{merchantId}/liasettings/{accountId}/setposdataprovider').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['merchantId', 'accountId', 'country'],
pathParams: ['accountId', 'merchantId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://shoppingcontent.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/content/v2/{merchantId}/liasettings/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['merchantId', 'accountId'],
pathParams: ['accountId', 'merchantId'],