@teemill/website 0.30.4 → 0.31.1
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.
- package/.openapi-generator/FILES +4 -0
- package/README.md +7 -2
- package/api.ts +304 -13
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +186 -13
- package/dist/api.js +219 -15
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +186 -13
- package/dist/esm/api.js +213 -13
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/CollectionsApi.md +1 -0
- package/docs/CrossSellApi.md +2 -1
- package/docs/ProductsApi.md +131 -0
- package/docs/UpdateWebsiteProductRequest.md +24 -0
- package/docs/WebsiteProduct.md +27 -0
- package/docs/WebsiteProductCollectionsInner.md +20 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Website
|
|
6
6
|
* Manage your PodOS Website
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.
|
|
8
|
+
* The version of the OpenAPI document: 0.31.1
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.WebsiteApi = exports.WebsiteApiFactory = exports.WebsiteApiFp = exports.WebsiteApiAxiosParamCreator = exports.SearchApi = exports.SearchApiFactory = exports.SearchApiFp = exports.SearchApiAxiosParamCreator = exports.RoutesApi = exports.RoutesApiFactory = exports.RoutesApiFp = exports.RoutesApiAxiosParamCreator = exports.ReviewsApi = exports.ReviewsApiFactory = exports.ReviewsApiFp = void 0;
|
|
25
|
+
exports.ProductsApiAxiosParamCreator = exports.PaymentApi = exports.PaymentApiFactory = exports.PaymentApiFp = exports.PaymentApiAxiosParamCreator = exports.PagesApi = exports.PagesApiFactory = exports.PagesApiFp = exports.PagesApiAxiosParamCreator = exports.MenuApi = exports.MenuApiFactory = exports.MenuApiFp = exports.MenuApiAxiosParamCreator = exports.FooterApi = exports.FooterApiFactory = exports.FooterApiFp = exports.FooterApiAxiosParamCreator = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.CrossSellApi = exports.CrossSellApiFactory = exports.CrossSellApiFp = exports.CrossSellApiAxiosParamCreator = exports.CollectionsApi = exports.CollectionsApiFactory = exports.CollectionsApiFp = exports.CollectionsApiAxiosParamCreator = exports.BlogsApi = exports.BlogsApiFactory = exports.BlogsApiFp = exports.BlogsApiAxiosParamCreator = exports.UpdateMenuRequestItemSubmenuInnerImageTextShadowEnum = exports.UpdateMenuRequestItemSubmenuInnerImageTextAlignmentEnum = exports.UpdateMenuRequestItemSubmenuInnerImageButtonWidthEnum = exports.UpdateMenuRequestItemSubmenuInnerImageButtonBorderRadiusEnum = exports.UpdateMenuRequestItemSubmenuInnerModeEnum = exports.SubmenuInnerImageTextShadowEnum = exports.SubmenuInnerImageTextAlignmentEnum = exports.SubmenuInnerImageButtonWidthEnum = exports.SubmenuInnerImageButtonBorderRadiusEnum = exports.SubmenuInnerImageBorderRadiusEnum = exports.SubmenuInnerModeEnum = exports.SalePriceCurrencyCodeEnum = exports.PriceCurrencyCodeEnum = exports.PaymentAccountMethodEnum = exports.AttributeThumbnailTypeEnum = exports.ApplicationPlacementEnum = exports.ApplicationTechnologyEnum = void 0;
|
|
26
|
+
exports.WebsiteApi = exports.WebsiteApiFactory = exports.WebsiteApiFp = exports.WebsiteApiAxiosParamCreator = exports.SearchApi = exports.SearchApiFactory = exports.SearchApiFp = exports.SearchApiAxiosParamCreator = exports.RoutesApi = exports.RoutesApiFactory = exports.RoutesApiFp = exports.RoutesApiAxiosParamCreator = exports.ReviewsApi = exports.ReviewsApiFactory = exports.ReviewsApiFp = exports.ReviewsApiAxiosParamCreator = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = void 0;
|
|
27
27
|
const axios_1 = require("axios");
|
|
28
28
|
// Some imports not used depending on template conditions
|
|
29
29
|
// @ts-ignore
|
|
@@ -571,12 +571,13 @@ exports.BlogsApi = BlogsApi;
|
|
|
571
571
|
const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
572
572
|
return {
|
|
573
573
|
/**
|
|
574
|
-
*
|
|
574
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
575
575
|
* @summary Update product collections
|
|
576
576
|
* @param {string} project What project it is
|
|
577
577
|
* @param {string} productId Product\'s unique identifier
|
|
578
578
|
* @param {UpdateProductCollectionsRequest} [updateProductCollectionsRequest]
|
|
579
579
|
* @param {*} [options] Override http request option.
|
|
580
|
+
* @deprecated
|
|
580
581
|
* @throws {RequiredError}
|
|
581
582
|
*/
|
|
582
583
|
updateProductCollections: (project_1, productId_1, updateProductCollectionsRequest_1, ...args_1) => __awaiter(this, [project_1, productId_1, updateProductCollectionsRequest_1, ...args_1], void 0, function* (project, productId, updateProductCollectionsRequest, options = {}) {
|
|
@@ -624,12 +625,13 @@ const CollectionsApiFp = function (configuration) {
|
|
|
624
625
|
const localVarAxiosParamCreator = (0, exports.CollectionsApiAxiosParamCreator)(configuration);
|
|
625
626
|
return {
|
|
626
627
|
/**
|
|
627
|
-
*
|
|
628
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
628
629
|
* @summary Update product collections
|
|
629
630
|
* @param {string} project What project it is
|
|
630
631
|
* @param {string} productId Product\'s unique identifier
|
|
631
632
|
* @param {UpdateProductCollectionsRequest} [updateProductCollectionsRequest]
|
|
632
633
|
* @param {*} [options] Override http request option.
|
|
634
|
+
* @deprecated
|
|
633
635
|
* @throws {RequiredError}
|
|
634
636
|
*/
|
|
635
637
|
updateProductCollections(project, productId, updateProductCollectionsRequest, options) {
|
|
@@ -651,10 +653,11 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
|
|
|
651
653
|
const localVarFp = (0, exports.CollectionsApiFp)(configuration);
|
|
652
654
|
return {
|
|
653
655
|
/**
|
|
654
|
-
*
|
|
656
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
655
657
|
* @summary Update product collections
|
|
656
658
|
* @param {CollectionsApiUpdateProductCollectionsRequest} requestParameters Request parameters.
|
|
657
659
|
* @param {*} [options] Override http request option.
|
|
660
|
+
* @deprecated
|
|
658
661
|
* @throws {RequiredError}
|
|
659
662
|
*/
|
|
660
663
|
updateProductCollections(requestParameters, options) {
|
|
@@ -668,10 +671,11 @@ exports.CollectionsApiFactory = CollectionsApiFactory;
|
|
|
668
671
|
*/
|
|
669
672
|
class CollectionsApi extends base_1.BaseAPI {
|
|
670
673
|
/**
|
|
671
|
-
*
|
|
674
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
672
675
|
* @summary Update product collections
|
|
673
676
|
* @param {CollectionsApiUpdateProductCollectionsRequest} requestParameters Request parameters.
|
|
674
677
|
* @param {*} [options] Override http request option.
|
|
678
|
+
* @deprecated
|
|
675
679
|
* @throws {RequiredError}
|
|
676
680
|
*/
|
|
677
681
|
updateProductCollections(requestParameters, options) {
|
|
@@ -685,12 +689,13 @@ exports.CollectionsApi = CollectionsApi;
|
|
|
685
689
|
const CrossSellApiAxiosParamCreator = function (configuration) {
|
|
686
690
|
return {
|
|
687
691
|
/**
|
|
688
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
692
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
689
693
|
* @summary Attach cross-sell products
|
|
690
694
|
* @param {string} project What project it is
|
|
691
695
|
* @param {string} productId Product\'s unique identifier
|
|
692
696
|
* @param {AttachCrossSellProductsRequest} [attachCrossSellProductsRequest]
|
|
693
697
|
* @param {*} [options] Override http request option.
|
|
698
|
+
* @deprecated
|
|
694
699
|
* @throws {RequiredError}
|
|
695
700
|
*/
|
|
696
701
|
attachCrossSellProducts: (project_1, productId_1, attachCrossSellProductsRequest_1, ...args_1) => __awaiter(this, [project_1, productId_1, attachCrossSellProductsRequest_1, ...args_1], void 0, function* (project, productId, attachCrossSellProductsRequest, options = {}) {
|
|
@@ -729,11 +734,12 @@ const CrossSellApiAxiosParamCreator = function (configuration) {
|
|
|
729
734
|
};
|
|
730
735
|
}),
|
|
731
736
|
/**
|
|
732
|
-
*
|
|
737
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
733
738
|
* @summary Get cross-sell products linked to a product
|
|
734
739
|
* @param {string} project What project it is
|
|
735
740
|
* @param {string} productId Product\'s unique identifier
|
|
736
741
|
* @param {*} [options] Override http request option.
|
|
742
|
+
* @deprecated
|
|
737
743
|
* @throws {RequiredError}
|
|
738
744
|
*/
|
|
739
745
|
getCrossSellProducts: (project_1, productId_1, ...args_1) => __awaiter(this, [project_1, productId_1, ...args_1], void 0, function* (project, productId, options = {}) {
|
|
@@ -779,12 +785,13 @@ const CrossSellApiFp = function (configuration) {
|
|
|
779
785
|
const localVarAxiosParamCreator = (0, exports.CrossSellApiAxiosParamCreator)(configuration);
|
|
780
786
|
return {
|
|
781
787
|
/**
|
|
782
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
788
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
783
789
|
* @summary Attach cross-sell products
|
|
784
790
|
* @param {string} project What project it is
|
|
785
791
|
* @param {string} productId Product\'s unique identifier
|
|
786
792
|
* @param {AttachCrossSellProductsRequest} [attachCrossSellProductsRequest]
|
|
787
793
|
* @param {*} [options] Override http request option.
|
|
794
|
+
* @deprecated
|
|
788
795
|
* @throws {RequiredError}
|
|
789
796
|
*/
|
|
790
797
|
attachCrossSellProducts(project, productId, attachCrossSellProductsRequest, options) {
|
|
@@ -797,11 +804,12 @@ const CrossSellApiFp = function (configuration) {
|
|
|
797
804
|
});
|
|
798
805
|
},
|
|
799
806
|
/**
|
|
800
|
-
*
|
|
807
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
801
808
|
* @summary Get cross-sell products linked to a product
|
|
802
809
|
* @param {string} project What project it is
|
|
803
810
|
* @param {string} productId Product\'s unique identifier
|
|
804
811
|
* @param {*} [options] Override http request option.
|
|
812
|
+
* @deprecated
|
|
805
813
|
* @throws {RequiredError}
|
|
806
814
|
*/
|
|
807
815
|
getCrossSellProducts(project, productId, options) {
|
|
@@ -823,20 +831,22 @@ const CrossSellApiFactory = function (configuration, basePath, axios) {
|
|
|
823
831
|
const localVarFp = (0, exports.CrossSellApiFp)(configuration);
|
|
824
832
|
return {
|
|
825
833
|
/**
|
|
826
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
834
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
827
835
|
* @summary Attach cross-sell products
|
|
828
836
|
* @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
|
|
829
837
|
* @param {*} [options] Override http request option.
|
|
838
|
+
* @deprecated
|
|
830
839
|
* @throws {RequiredError}
|
|
831
840
|
*/
|
|
832
841
|
attachCrossSellProducts(requestParameters, options) {
|
|
833
842
|
return localVarFp.attachCrossSellProducts(requestParameters.project, requestParameters.productId, requestParameters.attachCrossSellProductsRequest, options).then((request) => request(axios, basePath));
|
|
834
843
|
},
|
|
835
844
|
/**
|
|
836
|
-
*
|
|
845
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
837
846
|
* @summary Get cross-sell products linked to a product
|
|
838
847
|
* @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
|
|
839
848
|
* @param {*} [options] Override http request option.
|
|
849
|
+
* @deprecated
|
|
840
850
|
* @throws {RequiredError}
|
|
841
851
|
*/
|
|
842
852
|
getCrossSellProducts(requestParameters, options) {
|
|
@@ -850,20 +860,22 @@ exports.CrossSellApiFactory = CrossSellApiFactory;
|
|
|
850
860
|
*/
|
|
851
861
|
class CrossSellApi extends base_1.BaseAPI {
|
|
852
862
|
/**
|
|
853
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
863
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
854
864
|
* @summary Attach cross-sell products
|
|
855
865
|
* @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
|
|
856
866
|
* @param {*} [options] Override http request option.
|
|
867
|
+
* @deprecated
|
|
857
868
|
* @throws {RequiredError}
|
|
858
869
|
*/
|
|
859
870
|
attachCrossSellProducts(requestParameters, options) {
|
|
860
871
|
return (0, exports.CrossSellApiFp)(this.configuration).attachCrossSellProducts(requestParameters.project, requestParameters.productId, requestParameters.attachCrossSellProductsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
861
872
|
}
|
|
862
873
|
/**
|
|
863
|
-
*
|
|
874
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
864
875
|
* @summary Get cross-sell products linked to a product
|
|
865
876
|
* @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
|
|
866
877
|
* @param {*} [options] Override http request option.
|
|
878
|
+
* @deprecated
|
|
867
879
|
* @throws {RequiredError}
|
|
868
880
|
*/
|
|
869
881
|
getCrossSellProducts(requestParameters, options) {
|
|
@@ -2409,6 +2421,198 @@ class PaymentApi extends base_1.BaseAPI {
|
|
|
2409
2421
|
}
|
|
2410
2422
|
}
|
|
2411
2423
|
exports.PaymentApi = PaymentApi;
|
|
2424
|
+
/**
|
|
2425
|
+
* ProductsApi - axios parameter creator
|
|
2426
|
+
*/
|
|
2427
|
+
const ProductsApiAxiosParamCreator = function (configuration) {
|
|
2428
|
+
return {
|
|
2429
|
+
/**
|
|
2430
|
+
* Returns website-specific settings for a product, including storefront search visibility, cross-sell products, and collection membership. The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2431
|
+
* @summary Get website product
|
|
2432
|
+
* @param {string} project What project it is
|
|
2433
|
+
* @param {string} productId Product\'s unique identifier
|
|
2434
|
+
* @param {*} [options] Override http request option.
|
|
2435
|
+
* @throws {RequiredError}
|
|
2436
|
+
*/
|
|
2437
|
+
getWebsiteProduct: (project_1, productId_1, ...args_1) => __awaiter(this, [project_1, productId_1, ...args_1], void 0, function* (project, productId, options = {}) {
|
|
2438
|
+
// verify required parameter 'project' is not null or undefined
|
|
2439
|
+
(0, common_1.assertParamExists)('getWebsiteProduct', 'project', project);
|
|
2440
|
+
// verify required parameter 'productId' is not null or undefined
|
|
2441
|
+
(0, common_1.assertParamExists)('getWebsiteProduct', 'productId', productId);
|
|
2442
|
+
const localVarPath = `/v1/website/products/{productId}`
|
|
2443
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
2444
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2445
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2446
|
+
let baseOptions;
|
|
2447
|
+
if (configuration) {
|
|
2448
|
+
baseOptions = configuration.baseOptions;
|
|
2449
|
+
}
|
|
2450
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2451
|
+
const localVarHeaderParameter = {};
|
|
2452
|
+
const localVarQueryParameter = {};
|
|
2453
|
+
// authentication session-oauth required
|
|
2454
|
+
// oauth required
|
|
2455
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
2456
|
+
// authentication api-key required
|
|
2457
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
2458
|
+
if (project !== undefined) {
|
|
2459
|
+
localVarQueryParameter['project'] = project;
|
|
2460
|
+
}
|
|
2461
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2462
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2463
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2464
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2465
|
+
return {
|
|
2466
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2467
|
+
options: localVarRequestOptions,
|
|
2468
|
+
};
|
|
2469
|
+
}),
|
|
2470
|
+
/**
|
|
2471
|
+
* Updates website-specific settings for a product. Include only fields you want to change. `excludeFromSearch` toggles storefront search visibility. When `collectionIds` is present, it replaces collection membership for this product with that exclusive list of collection IDs (same behaviour as the deprecated collections route). When `crossSellProductIds` is present, it replaces cross-sell links in the given order (same behaviour as the deprecated cross-sell route). The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2472
|
+
* @summary Update website product
|
|
2473
|
+
* @param {string} project What project it is
|
|
2474
|
+
* @param {string} productId Product\'s unique identifier
|
|
2475
|
+
* @param {UpdateWebsiteProductRequest} [updateWebsiteProductRequest] Update website product settings
|
|
2476
|
+
* @param {*} [options] Override http request option.
|
|
2477
|
+
* @throws {RequiredError}
|
|
2478
|
+
*/
|
|
2479
|
+
updateWebsiteProduct: (project_1, productId_1, updateWebsiteProductRequest_1, ...args_1) => __awaiter(this, [project_1, productId_1, updateWebsiteProductRequest_1, ...args_1], void 0, function* (project, productId, updateWebsiteProductRequest, options = {}) {
|
|
2480
|
+
// verify required parameter 'project' is not null or undefined
|
|
2481
|
+
(0, common_1.assertParamExists)('updateWebsiteProduct', 'project', project);
|
|
2482
|
+
// verify required parameter 'productId' is not null or undefined
|
|
2483
|
+
(0, common_1.assertParamExists)('updateWebsiteProduct', 'productId', productId);
|
|
2484
|
+
const localVarPath = `/v1/website/products/{productId}`
|
|
2485
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
2486
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2487
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2488
|
+
let baseOptions;
|
|
2489
|
+
if (configuration) {
|
|
2490
|
+
baseOptions = configuration.baseOptions;
|
|
2491
|
+
}
|
|
2492
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
2493
|
+
const localVarHeaderParameter = {};
|
|
2494
|
+
const localVarQueryParameter = {};
|
|
2495
|
+
// authentication session-oauth required
|
|
2496
|
+
// oauth required
|
|
2497
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
2498
|
+
// authentication api-key required
|
|
2499
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
2500
|
+
if (project !== undefined) {
|
|
2501
|
+
localVarQueryParameter['project'] = project;
|
|
2502
|
+
}
|
|
2503
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2504
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2505
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2506
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2507
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2508
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateWebsiteProductRequest, localVarRequestOptions, configuration);
|
|
2509
|
+
return {
|
|
2510
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2511
|
+
options: localVarRequestOptions,
|
|
2512
|
+
};
|
|
2513
|
+
}),
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
|
|
2517
|
+
/**
|
|
2518
|
+
* ProductsApi - functional programming interface
|
|
2519
|
+
*/
|
|
2520
|
+
const ProductsApiFp = function (configuration) {
|
|
2521
|
+
const localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
|
|
2522
|
+
return {
|
|
2523
|
+
/**
|
|
2524
|
+
* Returns website-specific settings for a product, including storefront search visibility, cross-sell products, and collection membership. The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2525
|
+
* @summary Get website product
|
|
2526
|
+
* @param {string} project What project it is
|
|
2527
|
+
* @param {string} productId Product\'s unique identifier
|
|
2528
|
+
* @param {*} [options] Override http request option.
|
|
2529
|
+
* @throws {RequiredError}
|
|
2530
|
+
*/
|
|
2531
|
+
getWebsiteProduct(project, productId, options) {
|
|
2532
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2533
|
+
var _a, _b, _c;
|
|
2534
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getWebsiteProduct(project, productId, options);
|
|
2535
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2536
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.getWebsiteProduct']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2537
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2538
|
+
});
|
|
2539
|
+
},
|
|
2540
|
+
/**
|
|
2541
|
+
* Updates website-specific settings for a product. Include only fields you want to change. `excludeFromSearch` toggles storefront search visibility. When `collectionIds` is present, it replaces collection membership for this product with that exclusive list of collection IDs (same behaviour as the deprecated collections route). When `crossSellProductIds` is present, it replaces cross-sell links in the given order (same behaviour as the deprecated cross-sell route). The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2542
|
+
* @summary Update website product
|
|
2543
|
+
* @param {string} project What project it is
|
|
2544
|
+
* @param {string} productId Product\'s unique identifier
|
|
2545
|
+
* @param {UpdateWebsiteProductRequest} [updateWebsiteProductRequest] Update website product settings
|
|
2546
|
+
* @param {*} [options] Override http request option.
|
|
2547
|
+
* @throws {RequiredError}
|
|
2548
|
+
*/
|
|
2549
|
+
updateWebsiteProduct(project, productId, updateWebsiteProductRequest, options) {
|
|
2550
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2551
|
+
var _a, _b, _c;
|
|
2552
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateWebsiteProduct(project, productId, updateWebsiteProductRequest, options);
|
|
2553
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2554
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.updateWebsiteProduct']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2555
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2556
|
+
});
|
|
2557
|
+
},
|
|
2558
|
+
};
|
|
2559
|
+
};
|
|
2560
|
+
exports.ProductsApiFp = ProductsApiFp;
|
|
2561
|
+
/**
|
|
2562
|
+
* ProductsApi - factory interface
|
|
2563
|
+
*/
|
|
2564
|
+
const ProductsApiFactory = function (configuration, basePath, axios) {
|
|
2565
|
+
const localVarFp = (0, exports.ProductsApiFp)(configuration);
|
|
2566
|
+
return {
|
|
2567
|
+
/**
|
|
2568
|
+
* Returns website-specific settings for a product, including storefront search visibility, cross-sell products, and collection membership. The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2569
|
+
* @summary Get website product
|
|
2570
|
+
* @param {ProductsApiGetWebsiteProductRequest} requestParameters Request parameters.
|
|
2571
|
+
* @param {*} [options] Override http request option.
|
|
2572
|
+
* @throws {RequiredError}
|
|
2573
|
+
*/
|
|
2574
|
+
getWebsiteProduct(requestParameters, options) {
|
|
2575
|
+
return localVarFp.getWebsiteProduct(requestParameters.project, requestParameters.productId, options).then((request) => request(axios, basePath));
|
|
2576
|
+
},
|
|
2577
|
+
/**
|
|
2578
|
+
* Updates website-specific settings for a product. Include only fields you want to change. `excludeFromSearch` toggles storefront search visibility. When `collectionIds` is present, it replaces collection membership for this product with that exclusive list of collection IDs (same behaviour as the deprecated collections route). When `crossSellProductIds` is present, it replaces cross-sell links in the given order (same behaviour as the deprecated cross-sell route). The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2579
|
+
* @summary Update website product
|
|
2580
|
+
* @param {ProductsApiUpdateWebsiteProductRequest} requestParameters Request parameters.
|
|
2581
|
+
* @param {*} [options] Override http request option.
|
|
2582
|
+
* @throws {RequiredError}
|
|
2583
|
+
*/
|
|
2584
|
+
updateWebsiteProduct(requestParameters, options) {
|
|
2585
|
+
return localVarFp.updateWebsiteProduct(requestParameters.project, requestParameters.productId, requestParameters.updateWebsiteProductRequest, options).then((request) => request(axios, basePath));
|
|
2586
|
+
},
|
|
2587
|
+
};
|
|
2588
|
+
};
|
|
2589
|
+
exports.ProductsApiFactory = ProductsApiFactory;
|
|
2590
|
+
/**
|
|
2591
|
+
* ProductsApi - object-oriented interface
|
|
2592
|
+
*/
|
|
2593
|
+
class ProductsApi extends base_1.BaseAPI {
|
|
2594
|
+
/**
|
|
2595
|
+
* Returns website-specific settings for a product, including storefront search visibility, cross-sell products, and collection membership. The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2596
|
+
* @summary Get website product
|
|
2597
|
+
* @param {ProductsApiGetWebsiteProductRequest} requestParameters Request parameters.
|
|
2598
|
+
* @param {*} [options] Override http request option.
|
|
2599
|
+
* @throws {RequiredError}
|
|
2600
|
+
*/
|
|
2601
|
+
getWebsiteProduct(requestParameters, options) {
|
|
2602
|
+
return (0, exports.ProductsApiFp)(this.configuration).getWebsiteProduct(requestParameters.project, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
|
|
2603
|
+
}
|
|
2604
|
+
/**
|
|
2605
|
+
* Updates website-specific settings for a product. Include only fields you want to change. `excludeFromSearch` toggles storefront search visibility. When `collectionIds` is present, it replaces collection membership for this product with that exclusive list of collection IDs (same behaviour as the deprecated collections route). When `crossSellProductIds` is present, it replaces cross-sell links in the given order (same behaviour as the deprecated cross-sell route). The dedicated cross-sell and collections routes are deprecated; use this endpoint instead.
|
|
2606
|
+
* @summary Update website product
|
|
2607
|
+
* @param {ProductsApiUpdateWebsiteProductRequest} requestParameters Request parameters.
|
|
2608
|
+
* @param {*} [options] Override http request option.
|
|
2609
|
+
* @throws {RequiredError}
|
|
2610
|
+
*/
|
|
2611
|
+
updateWebsiteProduct(requestParameters, options) {
|
|
2612
|
+
return (0, exports.ProductsApiFp)(this.configuration).updateWebsiteProduct(requestParameters.project, requestParameters.productId, requestParameters.updateWebsiteProductRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
exports.ProductsApi = ProductsApi;
|
|
2412
2616
|
/**
|
|
2413
2617
|
* ReviewsApi - axios parameter creator
|
|
2414
2618
|
*/
|
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED