@datenkraft/bb-fulfillment-shopify-service-ts-client
Version:
The fulfillment-shopify-service API TS Client enables you to work with the fulfillment-shopify-service API
234 lines (233 loc) • 13.5 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Shopify Fulfillment Service
* - alpha: Currently developed API version. Subject to major changes. - beta: A semi-stable early access version. New features can be added. Breaking changes are possible. - stable: The API is recommended for use in production. [Changelog](https://fulfillment-service-sy.steve.niceshops.com/v1/docs/changelog.html) All data is transferred in UTF-8 encoding.\\ The API uses stateless HTTP. No cookies have to be kept.\\ Authentication via OAuth2 client credentials flow. [Privacy Policy](https://www.niceshops.com/en/dienstleistungen/data-privacy-policy) [Shopify Fulfillment Service PHP client @Packagist](https://packagist.org/packages/datenkraft/bb-fulfillment-shopify-service-php-client)
*
* The version of the OpenAPI document: v1.stable
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShopifyApi = exports.ShopifyApiFactory = exports.ShopifyApiFp = exports.ShopifyApiAxiosParamCreator = void 0;
const axios_1 = __importDefault(require("axios"));
// URLSearchParams not necessarily used
// @ts-ignore
const url_1 = require("url");
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
* ShopifyApi - axios parameter creator
* @export
*/
const ShopifyApiAxiosParamCreator = function (configuration) {
return {
/**
* Get a list of Inventory Items..
* @summary Get a list of Inventory Items.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} filterProductNumbers Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShopifyInventoryItemCollection: (shopifyShopDomain, filterProductNumbers, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'shopifyShopDomain' is not null or undefined
(0, common_1.assertParamExists)('getShopifyInventoryItemCollection', 'shopifyShopDomain', shopifyShopDomain);
// verify required parameter 'filterProductNumbers' is not null or undefined
(0, common_1.assertParamExists)('getShopifyInventoryItemCollection', 'filterProductNumbers', filterProductNumbers);
const localVarPath = `/shopify/inventory_items`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (shopifyShopDomain !== undefined) {
localVarQueryParameter['shopifyShopDomain'] = shopifyShopDomain;
}
if (filterProductNumbers !== undefined) {
localVarQueryParameter['filter[productNumbers]'] = filterProductNumbers;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Get a list of Product Variants.
* @summary Get a list of Product Variants.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} [filterProductNumbers] Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShopifyProductVariantCollection: (shopifyShopDomain, filterProductNumbers, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'shopifyShopDomain' is not null or undefined
(0, common_1.assertParamExists)('getShopifyProductVariantCollection', 'shopifyShopDomain', shopifyShopDomain);
const localVarPath = `/shopify/products/variants`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (shopifyShopDomain !== undefined) {
localVarQueryParameter['shopifyShopDomain'] = shopifyShopDomain;
}
if (filterProductNumbers !== undefined) {
localVarQueryParameter['filter[productNumbers]'] = filterProductNumbers;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
exports.ShopifyApiAxiosParamCreator = ShopifyApiAxiosParamCreator;
/**
* ShopifyApi - functional programming interface
* @export
*/
const ShopifyApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.ShopifyApiAxiosParamCreator)(configuration);
return {
/**
* Get a list of Inventory Items..
* @summary Get a list of Inventory Items.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} filterProductNumbers Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShopifyInventoryItemCollection(shopifyShopDomain, filterProductNumbers, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.getShopifyInventoryItemCollection(shopifyShopDomain, filterProductNumbers, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Get a list of Product Variants.
* @summary Get a list of Product Variants.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} [filterProductNumbers] Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShopifyProductVariantCollection(shopifyShopDomain, filterProductNumbers, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.getShopifyProductVariantCollection(shopifyShopDomain, filterProductNumbers, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
};
};
exports.ShopifyApiFp = ShopifyApiFp;
/**
* ShopifyApi - factory interface
* @export
*/
const ShopifyApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.ShopifyApiFp)(configuration);
return {
/**
* Get a list of Inventory Items..
* @summary Get a list of Inventory Items.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} filterProductNumbers Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShopifyInventoryItemCollection(shopifyShopDomain, filterProductNumbers, options) {
return localVarFp.getShopifyInventoryItemCollection(shopifyShopDomain, filterProductNumbers, options).then((request) => request(axios, basePath));
},
/**
* Get a list of Product Variants.
* @summary Get a list of Product Variants.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} [filterProductNumbers] Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShopifyProductVariantCollection(shopifyShopDomain, filterProductNumbers, options) {
return localVarFp.getShopifyProductVariantCollection(shopifyShopDomain, filterProductNumbers, options).then((request) => request(axios, basePath));
},
};
};
exports.ShopifyApiFactory = ShopifyApiFactory;
/**
* ShopifyApi - object-oriented interface
* @export
* @class ShopifyApi
* @extends {BaseAPI}
*/
class ShopifyApi extends base_1.BaseAPI {
/**
* Get a list of Inventory Items..
* @summary Get a list of Inventory Items.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} filterProductNumbers Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShopifyApi
*/
getShopifyInventoryItemCollection(shopifyShopDomain, filterProductNumbers, options) {
return (0, exports.ShopifyApiFp)(this.configuration).getShopifyInventoryItemCollection(shopifyShopDomain, filterProductNumbers, options).then((request) => request(this.axios, this.basePath));
}
/**
* Get a list of Product Variants.
* @summary Get a list of Product Variants.
* @param {string} shopifyShopDomain shopifyShopDomain
* @param {string} [filterProductNumbers] Filter for productNumber/productNumbers. The maximum number of productNumbers allowed is 100. The values must be separated by a comma.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShopifyApi
*/
getShopifyProductVariantCollection(shopifyShopDomain, filterProductNumbers, options) {
return (0, exports.ShopifyApiFp)(this.configuration).getShopifyProductVariantCollection(shopifyShopDomain, filterProductNumbers, options).then((request) => request(this.axios, this.basePath));
}
}
exports.ShopifyApi = ShopifyApi;