@teemill/website 0.30.3 → 0.31.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.
- 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 +2 -2
package/.openapi-generator/FILES
CHANGED
|
@@ -47,6 +47,7 @@ docs/Product.md
|
|
|
47
47
|
docs/ProductAdditionalFilesInner.md
|
|
48
48
|
docs/ProductApplicationSetsInner.md
|
|
49
49
|
docs/ProductWarehouseProduct.md
|
|
50
|
+
docs/ProductsApi.md
|
|
50
51
|
docs/Review.md
|
|
51
52
|
docs/ReviewAuthor.md
|
|
52
53
|
docs/ReviewImagesInner.md
|
|
@@ -90,10 +91,13 @@ docs/UpdatePagesRequest.md
|
|
|
90
91
|
docs/UpdatePagesRequestPagesInner.md
|
|
91
92
|
docs/UpdateProductCollectionsRequest.md
|
|
92
93
|
docs/UpdateSearchRedirectRequest.md
|
|
94
|
+
docs/UpdateWebsiteProductRequest.md
|
|
93
95
|
docs/Variant.md
|
|
94
96
|
docs/VariantProduct.md
|
|
95
97
|
docs/Video.md
|
|
96
98
|
docs/WebsiteApi.md
|
|
99
|
+
docs/WebsiteProduct.md
|
|
100
|
+
docs/WebsiteProductCollectionsInner.md
|
|
97
101
|
git_push.sh
|
|
98
102
|
index.ts
|
|
99
103
|
package.json
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/website@0.
|
|
1
|
+
## @teemill/website@0.31.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @teemill/website@0.
|
|
39
|
+
npm install @teemill/website@0.31.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -77,6 +77,8 @@ Class | Method | HTTP request | Description
|
|
|
77
77
|
*PaymentApi* | [**deauthorizeStripe**](docs/PaymentApi.md#deauthorizestripe) | **DELETE** /v1/website/payment/stripe/deauthorize | Deauthorize Stripe
|
|
78
78
|
*PaymentApi* | [**getPayPalPaymentAccount**](docs/PaymentApi.md#getpaypalpaymentaccount) | **GET** /v1/website/payment/paypal | Get PayPal Payment Account
|
|
79
79
|
*PaymentApi* | [**getStripePaymentAccount**](docs/PaymentApi.md#getstripepaymentaccount) | **GET** /v1/website/payment/stripe | Get Stripe Payment Account
|
|
80
|
+
*ProductsApi* | [**getWebsiteProduct**](docs/ProductsApi.md#getwebsiteproduct) | **GET** /v1/website/products/{productId} | Get website product
|
|
81
|
+
*ProductsApi* | [**updateWebsiteProduct**](docs/ProductsApi.md#updatewebsiteproduct) | **PATCH** /v1/website/products/{productId} | Update website product
|
|
80
82
|
*ReviewsApi* | [**exportReviews**](docs/ReviewsApi.md#exportreviews) | **GET** /v1/website/reviews/export | Export reviews
|
|
81
83
|
*ReviewsApi* | [**getReview**](docs/ReviewsApi.md#getreview) | **GET** /v1/website/reviews/{reviewId} | Get review
|
|
82
84
|
*ReviewsApi* | [**listReviews**](docs/ReviewsApi.md#listreviews) | **GET** /v1/website/reviews | List Reviews
|
|
@@ -169,9 +171,12 @@ Class | Method | HTTP request | Description
|
|
|
169
171
|
- [UpdatePagesRequestPagesInner](docs/UpdatePagesRequestPagesInner.md)
|
|
170
172
|
- [UpdateProductCollectionsRequest](docs/UpdateProductCollectionsRequest.md)
|
|
171
173
|
- [UpdateSearchRedirectRequest](docs/UpdateSearchRedirectRequest.md)
|
|
174
|
+
- [UpdateWebsiteProductRequest](docs/UpdateWebsiteProductRequest.md)
|
|
172
175
|
- [Variant](docs/Variant.md)
|
|
173
176
|
- [VariantProduct](docs/VariantProduct.md)
|
|
174
177
|
- [Video](docs/Video.md)
|
|
178
|
+
- [WebsiteProduct](docs/WebsiteProduct.md)
|
|
179
|
+
- [WebsiteProductCollectionsInner](docs/WebsiteProductCollectionsInner.md)
|
|
175
180
|
|
|
176
181
|
|
|
177
182
|
<a id="documentation-for-authorization"></a>
|
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Website
|
|
5
5
|
* Manage your PodOS Website
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.31.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -924,6 +924,20 @@ export interface UpdateSearchRedirectRequest {
|
|
|
924
924
|
'searchTerm'?: string;
|
|
925
925
|
'destinationUrl'?: string;
|
|
926
926
|
}
|
|
927
|
+
export interface UpdateWebsiteProductRequest {
|
|
928
|
+
/**
|
|
929
|
+
* When true, the product is excluded from storefront search results.
|
|
930
|
+
*/
|
|
931
|
+
'excludeFromSearch'?: boolean;
|
|
932
|
+
/**
|
|
933
|
+
* When provided, replaces collection membership for this product with this exclusive list of collection IDs. Any existing membership not in this list is removed.
|
|
934
|
+
*/
|
|
935
|
+
'collectionIds'?: Array<string>;
|
|
936
|
+
/**
|
|
937
|
+
* When provided, replaces cross-sell links with these product IDs. Order is preserved.
|
|
938
|
+
*/
|
|
939
|
+
'crossSellProductIds'?: Array<string>;
|
|
940
|
+
}
|
|
927
941
|
export interface Variant {
|
|
928
942
|
/**
|
|
929
943
|
* Unique object identifier
|
|
@@ -985,6 +999,33 @@ export interface Video {
|
|
|
985
999
|
'createdAt'?: string;
|
|
986
1000
|
'updatedAt'?: string;
|
|
987
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Website-specific settings for a product on the storefront (search visibility, cross-sells, and collection membership).
|
|
1004
|
+
*/
|
|
1005
|
+
export interface WebsiteProduct {
|
|
1006
|
+
/**
|
|
1007
|
+
* Unique object identifier
|
|
1008
|
+
*/
|
|
1009
|
+
'id': string;
|
|
1010
|
+
/**
|
|
1011
|
+
* When true, the product is excluded from storefront search results.
|
|
1012
|
+
*/
|
|
1013
|
+
'excludeFromSearch': boolean;
|
|
1014
|
+
/**
|
|
1015
|
+
* Products linked as cross-sells for this product, in display order.
|
|
1016
|
+
*/
|
|
1017
|
+
'crossSellProducts': Array<Product>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Collections this product belongs to.
|
|
1020
|
+
*/
|
|
1021
|
+
'collections': Array<WebsiteProductCollectionsInner>;
|
|
1022
|
+
}
|
|
1023
|
+
export interface WebsiteProductCollectionsInner {
|
|
1024
|
+
/**
|
|
1025
|
+
* Unique object identifier
|
|
1026
|
+
*/
|
|
1027
|
+
'id': string;
|
|
1028
|
+
}
|
|
988
1029
|
|
|
989
1030
|
/**
|
|
990
1031
|
* BlogsApi - axios parameter creator
|
|
@@ -1566,12 +1607,13 @@ export class BlogsApi extends BaseAPI {
|
|
|
1566
1607
|
export const CollectionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1567
1608
|
return {
|
|
1568
1609
|
/**
|
|
1569
|
-
*
|
|
1610
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
1570
1611
|
* @summary Update product collections
|
|
1571
1612
|
* @param {string} project What project it is
|
|
1572
1613
|
* @param {string} productId Product\'s unique identifier
|
|
1573
1614
|
* @param {UpdateProductCollectionsRequest} [updateProductCollectionsRequest]
|
|
1574
1615
|
* @param {*} [options] Override http request option.
|
|
1616
|
+
* @deprecated
|
|
1575
1617
|
* @throws {RequiredError}
|
|
1576
1618
|
*/
|
|
1577
1619
|
updateProductCollections: async (project: string, productId: string, updateProductCollectionsRequest?: UpdateProductCollectionsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
@@ -1626,12 +1668,13 @@ export const CollectionsApiFp = function(configuration?: Configuration) {
|
|
|
1626
1668
|
const localVarAxiosParamCreator = CollectionsApiAxiosParamCreator(configuration)
|
|
1627
1669
|
return {
|
|
1628
1670
|
/**
|
|
1629
|
-
*
|
|
1671
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
1630
1672
|
* @summary Update product collections
|
|
1631
1673
|
* @param {string} project What project it is
|
|
1632
1674
|
* @param {string} productId Product\'s unique identifier
|
|
1633
1675
|
* @param {UpdateProductCollectionsRequest} [updateProductCollectionsRequest]
|
|
1634
1676
|
* @param {*} [options] Override http request option.
|
|
1677
|
+
* @deprecated
|
|
1635
1678
|
* @throws {RequiredError}
|
|
1636
1679
|
*/
|
|
1637
1680
|
async updateProductCollections(project: string, productId: string, updateProductCollectionsRequest?: UpdateProductCollectionsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
@@ -1650,10 +1693,11 @@ export const CollectionsApiFactory = function (configuration?: Configuration, ba
|
|
|
1650
1693
|
const localVarFp = CollectionsApiFp(configuration)
|
|
1651
1694
|
return {
|
|
1652
1695
|
/**
|
|
1653
|
-
*
|
|
1696
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
1654
1697
|
* @summary Update product collections
|
|
1655
1698
|
* @param {CollectionsApiUpdateProductCollectionsRequest} requestParameters Request parameters.
|
|
1656
1699
|
* @param {*} [options] Override http request option.
|
|
1700
|
+
* @deprecated
|
|
1657
1701
|
* @throws {RequiredError}
|
|
1658
1702
|
*/
|
|
1659
1703
|
updateProductCollections(requestParameters: CollectionsApiUpdateProductCollectionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
@@ -1684,10 +1728,11 @@ export interface CollectionsApiUpdateProductCollectionsRequest {
|
|
|
1684
1728
|
*/
|
|
1685
1729
|
export class CollectionsApi extends BaseAPI {
|
|
1686
1730
|
/**
|
|
1687
|
-
*
|
|
1731
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `collectionIds` instead.
|
|
1688
1732
|
* @summary Update product collections
|
|
1689
1733
|
* @param {CollectionsApiUpdateProductCollectionsRequest} requestParameters Request parameters.
|
|
1690
1734
|
* @param {*} [options] Override http request option.
|
|
1735
|
+
* @deprecated
|
|
1691
1736
|
* @throws {RequiredError}
|
|
1692
1737
|
*/
|
|
1693
1738
|
public updateProductCollections(requestParameters: CollectionsApiUpdateProductCollectionsRequest, options?: RawAxiosRequestConfig) {
|
|
@@ -1703,12 +1748,13 @@ export class CollectionsApi extends BaseAPI {
|
|
|
1703
1748
|
export const CrossSellApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1704
1749
|
return {
|
|
1705
1750
|
/**
|
|
1706
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
1751
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
1707
1752
|
* @summary Attach cross-sell products
|
|
1708
1753
|
* @param {string} project What project it is
|
|
1709
1754
|
* @param {string} productId Product\'s unique identifier
|
|
1710
1755
|
* @param {AttachCrossSellProductsRequest} [attachCrossSellProductsRequest]
|
|
1711
1756
|
* @param {*} [options] Override http request option.
|
|
1757
|
+
* @deprecated
|
|
1712
1758
|
* @throws {RequiredError}
|
|
1713
1759
|
*/
|
|
1714
1760
|
attachCrossSellProducts: async (project: string, productId: string, attachCrossSellProductsRequest?: AttachCrossSellProductsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
@@ -1754,11 +1800,12 @@ export const CrossSellApiAxiosParamCreator = function (configuration?: Configura
|
|
|
1754
1800
|
};
|
|
1755
1801
|
},
|
|
1756
1802
|
/**
|
|
1757
|
-
*
|
|
1803
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
1758
1804
|
* @summary Get cross-sell products linked to a product
|
|
1759
1805
|
* @param {string} project What project it is
|
|
1760
1806
|
* @param {string} productId Product\'s unique identifier
|
|
1761
1807
|
* @param {*} [options] Override http request option.
|
|
1808
|
+
* @deprecated
|
|
1762
1809
|
* @throws {RequiredError}
|
|
1763
1810
|
*/
|
|
1764
1811
|
getCrossSellProducts: async (project: string, productId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
@@ -1811,12 +1858,13 @@ export const CrossSellApiFp = function(configuration?: Configuration) {
|
|
|
1811
1858
|
const localVarAxiosParamCreator = CrossSellApiAxiosParamCreator(configuration)
|
|
1812
1859
|
return {
|
|
1813
1860
|
/**
|
|
1814
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
1861
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
1815
1862
|
* @summary Attach cross-sell products
|
|
1816
1863
|
* @param {string} project What project it is
|
|
1817
1864
|
* @param {string} productId Product\'s unique identifier
|
|
1818
1865
|
* @param {AttachCrossSellProductsRequest} [attachCrossSellProductsRequest]
|
|
1819
1866
|
* @param {*} [options] Override http request option.
|
|
1867
|
+
* @deprecated
|
|
1820
1868
|
* @throws {RequiredError}
|
|
1821
1869
|
*/
|
|
1822
1870
|
async attachCrossSellProducts(project: string, productId: string, attachCrossSellProductsRequest?: AttachCrossSellProductsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Product>>> {
|
|
@@ -1826,11 +1874,12 @@ export const CrossSellApiFp = function(configuration?: Configuration) {
|
|
|
1826
1874
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1827
1875
|
},
|
|
1828
1876
|
/**
|
|
1829
|
-
*
|
|
1877
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
1830
1878
|
* @summary Get cross-sell products linked to a product
|
|
1831
1879
|
* @param {string} project What project it is
|
|
1832
1880
|
* @param {string} productId Product\'s unique identifier
|
|
1833
1881
|
* @param {*} [options] Override http request option.
|
|
1882
|
+
* @deprecated
|
|
1834
1883
|
* @throws {RequiredError}
|
|
1835
1884
|
*/
|
|
1836
1885
|
async getCrossSellProducts(project: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Product>>> {
|
|
@@ -1849,20 +1898,22 @@ export const CrossSellApiFactory = function (configuration?: Configuration, base
|
|
|
1849
1898
|
const localVarFp = CrossSellApiFp(configuration)
|
|
1850
1899
|
return {
|
|
1851
1900
|
/**
|
|
1852
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
1901
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
1853
1902
|
* @summary Attach cross-sell products
|
|
1854
1903
|
* @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
|
|
1855
1904
|
* @param {*} [options] Override http request option.
|
|
1905
|
+
* @deprecated
|
|
1856
1906
|
* @throws {RequiredError}
|
|
1857
1907
|
*/
|
|
1858
1908
|
attachCrossSellProducts(requestParameters: CrossSellApiAttachCrossSellProductsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Product>> {
|
|
1859
1909
|
return localVarFp.attachCrossSellProducts(requestParameters.project, requestParameters.productId, requestParameters.attachCrossSellProductsRequest, options).then((request) => request(axios, basePath));
|
|
1860
1910
|
},
|
|
1861
1911
|
/**
|
|
1862
|
-
*
|
|
1912
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
1863
1913
|
* @summary Get cross-sell products linked to a product
|
|
1864
1914
|
* @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
|
|
1865
1915
|
* @param {*} [options] Override http request option.
|
|
1916
|
+
* @deprecated
|
|
1866
1917
|
* @throws {RequiredError}
|
|
1867
1918
|
*/
|
|
1868
1919
|
getCrossSellProducts(requestParameters: CrossSellApiGetCrossSellProductsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Product>> {
|
|
@@ -1908,10 +1959,11 @@ export interface CrossSellApiGetCrossSellProductsRequest {
|
|
|
1908
1959
|
*/
|
|
1909
1960
|
export class CrossSellApi extends BaseAPI {
|
|
1910
1961
|
/**
|
|
1911
|
-
* Attaches a list of products to the given product as cross-sell products.
|
|
1962
|
+
* Deprecated. Please use `PATCH /v1/website/products/{productId}` with `crossSellProductIds` instead. Attaches a list of products to the given product as cross-sell products.
|
|
1912
1963
|
* @summary Attach cross-sell products
|
|
1913
1964
|
* @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
|
|
1914
1965
|
* @param {*} [options] Override http request option.
|
|
1966
|
+
* @deprecated
|
|
1915
1967
|
* @throws {RequiredError}
|
|
1916
1968
|
*/
|
|
1917
1969
|
public attachCrossSellProducts(requestParameters: CrossSellApiAttachCrossSellProductsRequest, options?: RawAxiosRequestConfig) {
|
|
@@ -1919,10 +1971,11 @@ export class CrossSellApi extends BaseAPI {
|
|
|
1919
1971
|
}
|
|
1920
1972
|
|
|
1921
1973
|
/**
|
|
1922
|
-
*
|
|
1974
|
+
* Deprecated. Please use `GET /v1/website/products/{productId}` with `crossSellProducts` instead.
|
|
1923
1975
|
* @summary Get cross-sell products linked to a product
|
|
1924
1976
|
* @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
|
|
1925
1977
|
* @param {*} [options] Override http request option.
|
|
1978
|
+
* @deprecated
|
|
1926
1979
|
* @throws {RequiredError}
|
|
1927
1980
|
*/
|
|
1928
1981
|
public getCrossSellProducts(requestParameters: CrossSellApiGetCrossSellProductsRequest, options?: RawAxiosRequestConfig) {
|
|
@@ -3818,6 +3871,244 @@ export class PaymentApi extends BaseAPI {
|
|
|
3818
3871
|
|
|
3819
3872
|
|
|
3820
3873
|
|
|
3874
|
+
/**
|
|
3875
|
+
* ProductsApi - axios parameter creator
|
|
3876
|
+
*/
|
|
3877
|
+
export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
3878
|
+
return {
|
|
3879
|
+
/**
|
|
3880
|
+
* 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.
|
|
3881
|
+
* @summary Get website product
|
|
3882
|
+
* @param {string} project What project it is
|
|
3883
|
+
* @param {string} productId Product\'s unique identifier
|
|
3884
|
+
* @param {*} [options] Override http request option.
|
|
3885
|
+
* @throws {RequiredError}
|
|
3886
|
+
*/
|
|
3887
|
+
getWebsiteProduct: async (project: string, productId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3888
|
+
// verify required parameter 'project' is not null or undefined
|
|
3889
|
+
assertParamExists('getWebsiteProduct', 'project', project)
|
|
3890
|
+
// verify required parameter 'productId' is not null or undefined
|
|
3891
|
+
assertParamExists('getWebsiteProduct', 'productId', productId)
|
|
3892
|
+
const localVarPath = `/v1/website/products/{productId}`
|
|
3893
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
3894
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3895
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3896
|
+
let baseOptions;
|
|
3897
|
+
if (configuration) {
|
|
3898
|
+
baseOptions = configuration.baseOptions;
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3902
|
+
const localVarHeaderParameter = {} as any;
|
|
3903
|
+
const localVarQueryParameter = {} as any;
|
|
3904
|
+
|
|
3905
|
+
// authentication session-oauth required
|
|
3906
|
+
// oauth required
|
|
3907
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
3908
|
+
|
|
3909
|
+
// authentication api-key required
|
|
3910
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
3911
|
+
|
|
3912
|
+
if (project !== undefined) {
|
|
3913
|
+
localVarQueryParameter['project'] = project;
|
|
3914
|
+
}
|
|
3915
|
+
|
|
3916
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
3917
|
+
|
|
3918
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3919
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3920
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3921
|
+
|
|
3922
|
+
return {
|
|
3923
|
+
url: toPathString(localVarUrlObj),
|
|
3924
|
+
options: localVarRequestOptions,
|
|
3925
|
+
};
|
|
3926
|
+
},
|
|
3927
|
+
/**
|
|
3928
|
+
* 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.
|
|
3929
|
+
* @summary Update website product
|
|
3930
|
+
* @param {string} project What project it is
|
|
3931
|
+
* @param {string} productId Product\'s unique identifier
|
|
3932
|
+
* @param {UpdateWebsiteProductRequest} [updateWebsiteProductRequest] Update website product settings
|
|
3933
|
+
* @param {*} [options] Override http request option.
|
|
3934
|
+
* @throws {RequiredError}
|
|
3935
|
+
*/
|
|
3936
|
+
updateWebsiteProduct: async (project: string, productId: string, updateWebsiteProductRequest?: UpdateWebsiteProductRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3937
|
+
// verify required parameter 'project' is not null or undefined
|
|
3938
|
+
assertParamExists('updateWebsiteProduct', 'project', project)
|
|
3939
|
+
// verify required parameter 'productId' is not null or undefined
|
|
3940
|
+
assertParamExists('updateWebsiteProduct', 'productId', productId)
|
|
3941
|
+
const localVarPath = `/v1/website/products/{productId}`
|
|
3942
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
3943
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3944
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3945
|
+
let baseOptions;
|
|
3946
|
+
if (configuration) {
|
|
3947
|
+
baseOptions = configuration.baseOptions;
|
|
3948
|
+
}
|
|
3949
|
+
|
|
3950
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
3951
|
+
const localVarHeaderParameter = {} as any;
|
|
3952
|
+
const localVarQueryParameter = {} as any;
|
|
3953
|
+
|
|
3954
|
+
// authentication session-oauth required
|
|
3955
|
+
// oauth required
|
|
3956
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
3957
|
+
|
|
3958
|
+
// authentication api-key required
|
|
3959
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
3960
|
+
|
|
3961
|
+
if (project !== undefined) {
|
|
3962
|
+
localVarQueryParameter['project'] = project;
|
|
3963
|
+
}
|
|
3964
|
+
|
|
3965
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3966
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
3967
|
+
|
|
3968
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3969
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3970
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3971
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateWebsiteProductRequest, localVarRequestOptions, configuration)
|
|
3972
|
+
|
|
3973
|
+
return {
|
|
3974
|
+
url: toPathString(localVarUrlObj),
|
|
3975
|
+
options: localVarRequestOptions,
|
|
3976
|
+
};
|
|
3977
|
+
},
|
|
3978
|
+
}
|
|
3979
|
+
};
|
|
3980
|
+
|
|
3981
|
+
/**
|
|
3982
|
+
* ProductsApi - functional programming interface
|
|
3983
|
+
*/
|
|
3984
|
+
export const ProductsApiFp = function(configuration?: Configuration) {
|
|
3985
|
+
const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
|
|
3986
|
+
return {
|
|
3987
|
+
/**
|
|
3988
|
+
* 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.
|
|
3989
|
+
* @summary Get website product
|
|
3990
|
+
* @param {string} project What project it is
|
|
3991
|
+
* @param {string} productId Product\'s unique identifier
|
|
3992
|
+
* @param {*} [options] Override http request option.
|
|
3993
|
+
* @throws {RequiredError}
|
|
3994
|
+
*/
|
|
3995
|
+
async getWebsiteProduct(project: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebsiteProduct>> {
|
|
3996
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getWebsiteProduct(project, productId, options);
|
|
3997
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3998
|
+
const localVarOperationServerBasePath = operationServerMap['ProductsApi.getWebsiteProduct']?.[localVarOperationServerIndex]?.url;
|
|
3999
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4000
|
+
},
|
|
4001
|
+
/**
|
|
4002
|
+
* 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.
|
|
4003
|
+
* @summary Update website product
|
|
4004
|
+
* @param {string} project What project it is
|
|
4005
|
+
* @param {string} productId Product\'s unique identifier
|
|
4006
|
+
* @param {UpdateWebsiteProductRequest} [updateWebsiteProductRequest] Update website product settings
|
|
4007
|
+
* @param {*} [options] Override http request option.
|
|
4008
|
+
* @throws {RequiredError}
|
|
4009
|
+
*/
|
|
4010
|
+
async updateWebsiteProduct(project: string, productId: string, updateWebsiteProductRequest?: UpdateWebsiteProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebsiteProduct>> {
|
|
4011
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebsiteProduct(project, productId, updateWebsiteProductRequest, options);
|
|
4012
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4013
|
+
const localVarOperationServerBasePath = operationServerMap['ProductsApi.updateWebsiteProduct']?.[localVarOperationServerIndex]?.url;
|
|
4014
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4015
|
+
},
|
|
4016
|
+
}
|
|
4017
|
+
};
|
|
4018
|
+
|
|
4019
|
+
/**
|
|
4020
|
+
* ProductsApi - factory interface
|
|
4021
|
+
*/
|
|
4022
|
+
export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
4023
|
+
const localVarFp = ProductsApiFp(configuration)
|
|
4024
|
+
return {
|
|
4025
|
+
/**
|
|
4026
|
+
* 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.
|
|
4027
|
+
* @summary Get website product
|
|
4028
|
+
* @param {ProductsApiGetWebsiteProductRequest} requestParameters Request parameters.
|
|
4029
|
+
* @param {*} [options] Override http request option.
|
|
4030
|
+
* @throws {RequiredError}
|
|
4031
|
+
*/
|
|
4032
|
+
getWebsiteProduct(requestParameters: ProductsApiGetWebsiteProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<WebsiteProduct> {
|
|
4033
|
+
return localVarFp.getWebsiteProduct(requestParameters.project, requestParameters.productId, options).then((request) => request(axios, basePath));
|
|
4034
|
+
},
|
|
4035
|
+
/**
|
|
4036
|
+
* 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.
|
|
4037
|
+
* @summary Update website product
|
|
4038
|
+
* @param {ProductsApiUpdateWebsiteProductRequest} requestParameters Request parameters.
|
|
4039
|
+
* @param {*} [options] Override http request option.
|
|
4040
|
+
* @throws {RequiredError}
|
|
4041
|
+
*/
|
|
4042
|
+
updateWebsiteProduct(requestParameters: ProductsApiUpdateWebsiteProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<WebsiteProduct> {
|
|
4043
|
+
return localVarFp.updateWebsiteProduct(requestParameters.project, requestParameters.productId, requestParameters.updateWebsiteProductRequest, options).then((request) => request(axios, basePath));
|
|
4044
|
+
},
|
|
4045
|
+
};
|
|
4046
|
+
};
|
|
4047
|
+
|
|
4048
|
+
/**
|
|
4049
|
+
* Request parameters for getWebsiteProduct operation in ProductsApi.
|
|
4050
|
+
*/
|
|
4051
|
+
export interface ProductsApiGetWebsiteProductRequest {
|
|
4052
|
+
/**
|
|
4053
|
+
* What project it is
|
|
4054
|
+
*/
|
|
4055
|
+
readonly project: string
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* Product\'s unique identifier
|
|
4059
|
+
*/
|
|
4060
|
+
readonly productId: string
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
/**
|
|
4064
|
+
* Request parameters for updateWebsiteProduct operation in ProductsApi.
|
|
4065
|
+
*/
|
|
4066
|
+
export interface ProductsApiUpdateWebsiteProductRequest {
|
|
4067
|
+
/**
|
|
4068
|
+
* What project it is
|
|
4069
|
+
*/
|
|
4070
|
+
readonly project: string
|
|
4071
|
+
|
|
4072
|
+
/**
|
|
4073
|
+
* Product\'s unique identifier
|
|
4074
|
+
*/
|
|
4075
|
+
readonly productId: string
|
|
4076
|
+
|
|
4077
|
+
/**
|
|
4078
|
+
* Update website product settings
|
|
4079
|
+
*/
|
|
4080
|
+
readonly updateWebsiteProductRequest?: UpdateWebsiteProductRequest
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
/**
|
|
4084
|
+
* ProductsApi - object-oriented interface
|
|
4085
|
+
*/
|
|
4086
|
+
export class ProductsApi extends BaseAPI {
|
|
4087
|
+
/**
|
|
4088
|
+
* 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.
|
|
4089
|
+
* @summary Get website product
|
|
4090
|
+
* @param {ProductsApiGetWebsiteProductRequest} requestParameters Request parameters.
|
|
4091
|
+
* @param {*} [options] Override http request option.
|
|
4092
|
+
* @throws {RequiredError}
|
|
4093
|
+
*/
|
|
4094
|
+
public getWebsiteProduct(requestParameters: ProductsApiGetWebsiteProductRequest, options?: RawAxiosRequestConfig) {
|
|
4095
|
+
return ProductsApiFp(this.configuration).getWebsiteProduct(requestParameters.project, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
|
|
4096
|
+
}
|
|
4097
|
+
|
|
4098
|
+
/**
|
|
4099
|
+
* 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.
|
|
4100
|
+
* @summary Update website product
|
|
4101
|
+
* @param {ProductsApiUpdateWebsiteProductRequest} requestParameters Request parameters.
|
|
4102
|
+
* @param {*} [options] Override http request option.
|
|
4103
|
+
* @throws {RequiredError}
|
|
4104
|
+
*/
|
|
4105
|
+
public updateWebsiteProduct(requestParameters: ProductsApiUpdateWebsiteProductRequest, options?: RawAxiosRequestConfig) {
|
|
4106
|
+
return ProductsApiFp(this.configuration).updateWebsiteProduct(requestParameters.project, requestParameters.productId, requestParameters.updateWebsiteProductRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4107
|
+
}
|
|
4108
|
+
}
|
|
4109
|
+
|
|
4110
|
+
|
|
4111
|
+
|
|
3821
4112
|
/**
|
|
3822
4113
|
* ReviewsApi - axios parameter creator
|
|
3823
4114
|
*/
|
package/base.ts
CHANGED
package/common.ts
CHANGED
package/configuration.ts
CHANGED