diff --git a/api/Api.ts b/api/Api.ts index ae65d4c..7af0232 100644 --- a/api/Api.ts +++ b/api/Api.ts @@ -11,98 +11,19 @@ */ /** @default "view" */ -export enum IV3ProductsBrandsListParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "asc" */ -export enum IV3ProductsBrandsListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - -/** @default "name" */ -export enum IV3ProductsBrandsListParamsOrderbyEnum { - Id = "id", - Include = "include", - Name = "name", - Slug = "slug", - TermGroup = "term_group", - Description = "description", - Count = "count", -} - -/** @default "default" */ -export enum IDisplayEnum { - Default = "default", - Products = "products", - Subcategories = "subcategories", - Both = "both", -} - -/** @default "view" */ -export enum IV3ProductsBrandsDetailParamsContextEnum { - View = "view", - Edit = "edit", -} - -export enum IDisplayEnum1 { - Default = "default", - Products = "products", - Subcategories = "subcategories", - Both = "both", -} - -export enum IV3ProductsBrandsUpdateParamsDisplayEnum { - Default = "default", - Products = "products", - Subcategories = "subcategories", - Both = "both", -} - -export enum IV3ProductsBrandsPartialUpdateParamsDisplayEnum { - Default = "default", - Products = "products", - Subcategories = "subcategories", - Both = "both", -} - -export enum IDisplayEnum2 { - Default = "default", - Products = "products", - Subcategories = "subcategories", - Both = "both", -} - -export enum IV3ProductsBrandsBatchUpdateParamsDisplayEnum { - Default = "default", - Products = "products", - Subcategories = "subcategories", - Both = "both", -} - -export enum IV3ProductsBrandsBatchPartialUpdateParamsDisplayEnum { - Default = "default", - Products = "products", - Subcategories = "subcategories", - Both = "both", -} - -/** @default "view" */ -export enum IV3CouponsListParamsContextEnum { +export enum IV1CouponsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV3CouponsListParamsOrderEnum { +export enum IV1CouponsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV3CouponsListParamsOrderbyEnum { +export enum IV1CouponsListParamsOrderbyEnum { Date = "date", Id = "id", Include = "include", @@ -119,7 +40,7 @@ export enum IDiscountTypeEnum { } /** @default "view" */ -export enum IV3CouponsDetailParamsContextEnum { +export enum IV1CouponsDetailParamsContextEnum { View = "view", Edit = "edit", } @@ -130,13 +51,13 @@ export enum IDiscountTypeEnum1 { FixedProduct = "fixed_product", } -export enum IV3CouponsUpdateParamsDiscountTypeEnum { +export enum IV1CouponsUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", } -export enum IV3CouponsPartialUpdateParamsDiscountTypeEnum { +export enum IV1CouponsPartialUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", @@ -148,37 +69,37 @@ export enum IDiscountTypeEnum2 { FixedProduct = "fixed_product", } -export enum IV3CouponsBatchUpdateParamsDiscountTypeEnum { +export enum IV1CouponsBatchUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", } -export enum IV3CouponsBatchPartialUpdateParamsDiscountTypeEnum { +export enum IV1CouponsBatchPartialUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", } /** @default "view" */ -export enum IV3CustomersDownloadsListParamsContextEnum { +export enum IV1CustomersDownloadsListParamsContextEnum { View = "view", } /** @default "view" */ -export enum IV3CustomersListParamsContextEnum { +export enum IV1CustomersListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV3CustomersListParamsOrderEnum { +export enum IV1CustomersListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV3CustomersListParamsOrderbyEnum { +export enum IV1CustomersListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -186,7 +107,7 @@ export enum IV3CustomersListParamsOrderbyEnum { } /** @default "customer" */ -export enum IV3CustomersListParamsRoleEnum { +export enum IV1CustomersListParamsRoleEnum { All = "all", Administrator = "administrator", Editor = "editor", @@ -198,44 +119,72 @@ export enum IV3CustomersListParamsRoleEnum { } /** @default "view" */ -export enum IV3CustomersDetailParamsContextEnum { +export enum IV1CustomersDetailParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV3OrdersNotesListParamsContextEnum { +export enum IV1OrdersNotesListParamsContextEnum { View = "view", Edit = "edit", } +/** @default "view" */ +export enum IV1OrdersDetailParamsContextEnum { + View = "view", + Edit = "edit", +} + +/** @default "view" */ +export enum IV1OrdersRefundsListParamsContextEnum { + View = "view", + Edit = "edit", +} + +/** @default "desc" */ +export enum IV1OrdersRefundsListParamsOrderEnum { + Asc = "asc", + Desc = "desc", +} + +/** @default "date" */ +export enum IV1OrdersRefundsListParamsOrderbyEnum { + Date = "date", + Id = "id", + Include = "include", + Title = "title", + Slug = "slug", + Modified = "modified", +} + /** @default "any" */ -export enum IV3OrdersNotesListParamsTypeEnum { +export enum IV1OrdersRefundsListParamsStatusEnum { Any = "any", - Customer = "customer", - Internal = "internal", + Pending = "pending", + Processing = "processing", + OnHold = "on-hold", + Completed = "completed", + Cancelled = "cancelled", + Refunded = "refunded", + Failed = "failed", + CheckoutDraft = "checkout-draft", } /** @default "view" */ -export enum IV3OrdersDetailParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "view" */ -export enum IV3OrdersRefundsListParamsContextEnum { +export enum IV1OrdersListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV3OrdersRefundsListParamsOrderEnum { +export enum IV1OrdersListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV3OrdersRefundsListParamsOrderbyEnum { +export enum IV1OrdersListParamsOrderbyEnum { Date = "date", Id = "id", Include = "include", @@ -244,31 +193,21 @@ export enum IV3OrdersRefundsListParamsOrderbyEnum { Modified = "modified", } -/** @default "view" */ -export enum IV3OrdersListParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "desc" */ -export enum IV3OrdersListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - -/** @default "date" */ -export enum IV3OrdersListParamsOrderbyEnum { - Date = "date", - Id = "id", - Include = "include", - Title = "title", - Slug = "slug", - Modified = "modified", +/** @default "any" */ +export enum IV1OrdersListParamsStatusEnum { + Any = "any", + Pending = "pending", + Processing = "processing", + OnHold = "on-hold", + Completed = "completed", + Cancelled = "cancelled", + Refunded = "refunded", + Failed = "failed", + CheckoutDraft = "checkout-draft", } /** @default "pending" */ export enum IStatusEnum { - AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -447,13 +386,12 @@ export enum ICurrencyEnum { } /** @default "view" */ -export enum IV3OrdersDetail2ParamsContextEnum { +export enum IV1OrdersDetail2ParamsContextEnum { View = "view", Edit = "edit", } export enum IStatusEnum1 { - AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -630,8 +568,7 @@ export enum ICurrencyEnum1 { ZMW = "ZMW", } -export enum IV3OrdersUpdateParamsStatusEnum { - AutoDraft = "auto-draft", +export enum IV1OrdersUpdateParamsStatusEnum { Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -642,7 +579,7 @@ export enum IV3OrdersUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV3OrdersUpdateParamsCurrencyEnum { +export enum IV1OrdersUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -808,8 +745,7 @@ export enum IV3OrdersUpdateParamsCurrencyEnum { ZMW = "ZMW", } -export enum IV3OrdersPartialUpdateParamsStatusEnum { - AutoDraft = "auto-draft", +export enum IV1OrdersPartialUpdateParamsStatusEnum { Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -820,7 +756,7 @@ export enum IV3OrdersPartialUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV3OrdersPartialUpdateParamsCurrencyEnum { +export enum IV1OrdersPartialUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -987,7 +923,6 @@ export enum IV3OrdersPartialUpdateParamsCurrencyEnum { } export enum IStatusEnum2 { - AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -1164,8 +1099,7 @@ export enum ICurrencyEnum2 { ZMW = "ZMW", } -export enum IV3OrdersBatchUpdateParamsStatusEnum { - AutoDraft = "auto-draft", +export enum IV1OrdersBatchUpdateParamsStatusEnum { Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -1176,7 +1110,7 @@ export enum IV3OrdersBatchUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV3OrdersBatchUpdateParamsCurrencyEnum { +export enum IV1OrdersBatchUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -1342,8 +1276,7 @@ export enum IV3OrdersBatchUpdateParamsCurrencyEnum { ZMW = "ZMW", } -export enum IV3OrdersBatchPartialUpdateParamsStatusEnum { - AutoDraft = "auto-draft", +export enum IV1OrdersBatchPartialUpdateParamsStatusEnum { Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -1354,7 +1287,7 @@ export enum IV3OrdersBatchPartialUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV3OrdersBatchPartialUpdateParamsCurrencyEnum { +export enum IV1OrdersBatchPartialUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -1521,19 +1454,19 @@ export enum IV3OrdersBatchPartialUpdateParamsCurrencyEnum { } /** @default "view" */ -export enum IV3ProductsAttributesTermsListParamsContextEnum { +export enum IV1ProductsAttributesTermsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV3ProductsAttributesTermsListParamsOrderEnum { +export enum IV1ProductsAttributesTermsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV3ProductsAttributesTermsListParamsOrderbyEnum { +export enum IV1ProductsAttributesTermsListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -1544,13 +1477,13 @@ export enum IV3ProductsAttributesTermsListParamsOrderbyEnum { } /** @default "view" */ -export enum IV3ProductsAttributesDetailParamsContextEnum { +export enum IV1ProductsAttributesDetailParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV3ProductsAttributesListParamsContextEnum { +export enum IV1ProductsAttributesListParamsContextEnum { View = "view", Edit = "edit", } @@ -1569,7 +1502,7 @@ export enum IOrderByEnum { } /** @default "view" */ -export enum IV3ProductsAttributesDetail2ParamsContextEnum { +export enum IV1ProductsAttributesDetail2ParamsContextEnum { View = "view", Edit = "edit", } @@ -1585,22 +1518,22 @@ export enum IOrderByEnum1 { Id = "id", } -export enum IV3ProductsAttributesUpdate2ParamsTypeEnum { +export enum IV1ProductsAttributesUpdate2ParamsTypeEnum { Select = "select", } -export enum IV3ProductsAttributesUpdate2ParamsOrderByEnum { +export enum IV1ProductsAttributesUpdate2ParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", Id = "id", } -export enum IV3ProductsAttributesPartialUpdate2ParamsTypeEnum { +export enum IV1ProductsAttributesPartialUpdate2ParamsTypeEnum { Select = "select", } -export enum IV3ProductsAttributesPartialUpdate2ParamsOrderByEnum { +export enum IV1ProductsAttributesPartialUpdate2ParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", @@ -1618,22 +1551,22 @@ export enum IOrderByEnum2 { Id = "id", } -export enum IV3ProductsAttributesBatchUpdateParamsTypeEnum { +export enum IV1ProductsAttributesBatchUpdateParamsTypeEnum { Select = "select", } -export enum IV3ProductsAttributesBatchUpdateParamsOrderByEnum { +export enum IV1ProductsAttributesBatchUpdateParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", Id = "id", } -export enum IV3ProductsAttributesBatchPartialUpdateParamsTypeEnum { +export enum IV1ProductsAttributesBatchPartialUpdateParamsTypeEnum { Select = "select", } -export enum IV3ProductsAttributesBatchPartialUpdateParamsOrderByEnum { +export enum IV1ProductsAttributesBatchPartialUpdateParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", @@ -1641,19 +1574,19 @@ export enum IV3ProductsAttributesBatchPartialUpdateParamsOrderByEnum { } /** @default "view" */ -export enum IV3ProductsCategoriesListParamsContextEnum { +export enum IV1ProductsCategoriesListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV3ProductsCategoriesListParamsOrderEnum { +export enum IV1ProductsCategoriesListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV3ProductsCategoriesListParamsOrderbyEnum { +export enum IV1ProductsCategoriesListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -1664,7 +1597,7 @@ export enum IV3ProductsCategoriesListParamsOrderbyEnum { } /** @default "default" */ -export enum IDisplayEnum3 { +export enum IDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", @@ -1672,173 +1605,79 @@ export enum IDisplayEnum3 { } /** @default "view" */ -export enum IV3ProductsCategoriesDetailParamsContextEnum { +export enum IV1ProductsCategoriesDetailParamsContextEnum { View = "view", Edit = "edit", } -export enum IDisplayEnum4 { +export enum IDisplayEnum1 { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV3ProductsCategoriesUpdateParamsDisplayEnum { +export enum IV1ProductsCategoriesUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV3ProductsCategoriesPartialUpdateParamsDisplayEnum { +export enum IV1ProductsCategoriesPartialUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IDisplayEnum5 { +export enum IDisplayEnum2 { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV3ProductsCategoriesBatchUpdateParamsDisplayEnum { +export enum IV1ProductsCategoriesBatchUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV3ProductsCategoriesBatchPartialUpdateParamsDisplayEnum { +export enum IV1ProductsCategoriesBatchPartialUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -/** @default "asc" */ -export enum IV3ProductsCustomFieldsNamesListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - /** @default "view" */ -export enum IV3ProductsReviewsListParamsContextEnum { +export enum IV1ProductsReviewsListParamsContextEnum { View = "view", Edit = "edit", } -/** @default "desc" */ -export enum IV3ProductsReviewsListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - -/** @default "date_gmt" */ -export enum IV3ProductsReviewsListParamsOrderbyEnum { - Date = "date", - DateGmt = "date_gmt", - Id = "id", - Include = "include", - Product = "product", -} - -/** @default "approved" */ -export enum IV3ProductsReviewsListParamsStatusEnum { - All = "all", - Hold = "hold", - Approved = "approved", - Spam = "spam", - Trash = "trash", -} - -/** @default "approved" */ -export enum IStatusEnum3 { - Approved = "approved", - Hold = "hold", - Spam = "spam", - Unspam = "unspam", - Trash = "trash", - Untrash = "untrash", -} - /** @default "view" */ -export enum IV3ProductsReviewsDetailParamsContextEnum { +export enum IV1ProductsDetailParamsContextEnum { View = "view", Edit = "edit", } -export enum IStatusEnum4 { - Approved = "approved", - Hold = "hold", - Spam = "spam", - Unspam = "unspam", - Trash = "trash", - Untrash = "untrash", -} - -export enum IV3ProductsReviewsUpdateParamsStatusEnum { - Approved = "approved", - Hold = "hold", - Spam = "spam", - Unspam = "unspam", - Trash = "trash", - Untrash = "untrash", -} - -export enum IV3ProductsReviewsPartialUpdateParamsStatusEnum { - Approved = "approved", - Hold = "hold", - Spam = "spam", - Unspam = "unspam", - Trash = "trash", - Untrash = "untrash", -} - -export enum IStatusEnum5 { - Approved = "approved", - Hold = "hold", - Spam = "spam", - Unspam = "unspam", - Trash = "trash", - Untrash = "untrash", -} - -export enum IV3ProductsReviewsBatchUpdateParamsStatusEnum { - Approved = "approved", - Hold = "hold", - Spam = "spam", - Unspam = "unspam", - Trash = "trash", - Untrash = "untrash", -} - -export enum IV3ProductsReviewsBatchPartialUpdateParamsStatusEnum { - Approved = "approved", - Hold = "hold", - Spam = "spam", - Unspam = "unspam", - Trash = "trash", - Untrash = "untrash", -} - /** @default "view" */ -export enum IV3ProductsShippingClassesListParamsContextEnum { +export enum IV1ProductsShippingClassesListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV3ProductsShippingClassesListParamsOrderEnum { +export enum IV1ProductsShippingClassesListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV3ProductsShippingClassesListParamsOrderbyEnum { +export enum IV1ProductsShippingClassesListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -1849,25 +1688,25 @@ export enum IV3ProductsShippingClassesListParamsOrderbyEnum { } /** @default "view" */ -export enum IV3ProductsShippingClassesDetailParamsContextEnum { +export enum IV1ProductsShippingClassesDetailParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV3ProductsTagsListParamsContextEnum { +export enum IV1ProductsTagsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV3ProductsTagsListParamsOrderEnum { +export enum IV1ProductsTagsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV3ProductsTagsListParamsOrderbyEnum { +export enum IV1ProductsTagsListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -1878,70 +1717,50 @@ export enum IV3ProductsTagsListParamsOrderbyEnum { } /** @default "view" */ -export enum IV3ProductsTagsDetailParamsContextEnum { +export enum IV1ProductsTagsDetailParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV3ProductsListParamsContextEnum { +export enum IV1ProductsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV3ProductsListParamsOrderEnum { +export enum IV1ProductsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV3ProductsListParamsOrderbyEnum { +export enum IV1ProductsListParamsOrderbyEnum { Date = "date", Id = "id", Include = "include", Title = "title", Slug = "slug", Modified = "modified", - Popularity = "popularity", - Rating = "rating", - PostIn = "post__in", - Price = "price", - Sales = "sales", - MenuOrder = "menu_order", - Random = "random", - Popularity1 = "popularity", - Rating2 = "rating", - MenuOrder3 = "menu_order", - Price4 = "price", - Popularity5 = "popularity", - Rating6 = "rating", } /** @default "any" */ -export enum IV3ProductsListParamsStatusEnum { +export enum IV1ProductsListParamsStatusEnum { Any = "any", Future = "future", - Trash = "trash", Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", } -export enum IV3ProductsListParamsTypeEnum { +export enum IV1ProductsListParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV3ProductsListParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - /** @default "simple" */ export enum ITypeEnum3 { Simple = "simple", @@ -1951,14 +1770,12 @@ export enum ITypeEnum3 { } /** @default "publish" */ -export enum IStatusEnum6 { +export enum IStatusEnum3 { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", } /** @default "visible" */ @@ -1969,6 +1786,11 @@ export enum ICatalogVisibilityEnum { Hidden = "hidden", } +/** @default "standard" */ +export enum IDownloadTypeEnum { + Standard = "standard", +} + /** @default "taxable" */ export enum ITaxStatusEnum { Taxable = "taxable", @@ -1976,13 +1798,6 @@ export enum ITaxStatusEnum { None = "none", } -/** @default "instock" */ -export enum IStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - /** @default "no" */ export enum IBackordersEnum { No = "no", @@ -1991,7 +1806,7 @@ export enum IBackordersEnum { } /** @default "view" */ -export enum IV3ProductsDetailParamsContextEnum { +export enum IV1ProductsDetail2ParamsContextEnum { View = "view", Edit = "edit", } @@ -2003,14 +1818,12 @@ export enum ITypeEnum4 { Variable = "variable", } -export enum IStatusEnum7 { +export enum IStatusEnum4 { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", } export enum ICatalogVisibilityEnum1 { @@ -2020,103 +1833,93 @@ export enum ICatalogVisibilityEnum1 { Hidden = "hidden", } +export enum IDownloadTypeEnum1 { + Standard = "standard", +} + export enum ITaxStatusEnum1 { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IStockStatusEnum1 { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - export enum IBackordersEnum1 { No = "no", Notify = "notify", Yes = "yes", } -export enum IV3ProductsUpdateParamsTypeEnum { +export enum IV1ProductsUpdate2ParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV3ProductsUpdateParamsStatusEnum { +export enum IV1ProductsUpdate2ParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", } -export enum IV3ProductsUpdateParamsCatalogVisibilityEnum { +export enum IV1ProductsUpdate2ParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV3ProductsUpdateParamsTaxStatusEnum { +export enum IV1ProductsUpdate2ParamsDownloadTypeEnum { + Standard = "standard", +} + +export enum IV1ProductsUpdate2ParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV3ProductsUpdateParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsUpdateParamsBackordersEnum { +export enum IV1ProductsUpdate2ParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", } -export enum IV3ProductsPartialUpdateParamsTypeEnum { +export enum IV1ProductsPartialUpdate2ParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV3ProductsPartialUpdateParamsStatusEnum { +export enum IV1ProductsPartialUpdate2ParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", } -export enum IV3ProductsPartialUpdateParamsCatalogVisibilityEnum { +export enum IV1ProductsPartialUpdate2ParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV3ProductsPartialUpdateParamsTaxStatusEnum { +export enum IV1ProductsPartialUpdate2ParamsDownloadTypeEnum { + Standard = "standard", +} + +export enum IV1ProductsPartialUpdate2ParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV3ProductsPartialUpdateParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsPartialUpdateParamsBackordersEnum { +export enum IV1ProductsPartialUpdate2ParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", @@ -2129,14 +1932,12 @@ export enum ITypeEnum5 { Variable = "variable", } -export enum IStatusEnum8 { +export enum IStatusEnum5 { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", } export enum ICatalogVisibilityEnum2 { @@ -2146,482 +1947,104 @@ export enum ICatalogVisibilityEnum2 { Hidden = "hidden", } +export enum IDownloadTypeEnum2 { + Standard = "standard", +} + export enum ITaxStatusEnum2 { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IStockStatusEnum2 { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - export enum IBackordersEnum2 { No = "no", Notify = "notify", Yes = "yes", } -export enum IV3ProductsBatchUpdateParamsTypeEnum { +export enum IV1ProductsBatchUpdateParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV3ProductsBatchUpdateParamsStatusEnum { +export enum IV1ProductsBatchUpdateParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", } -export enum IV3ProductsBatchUpdateParamsCatalogVisibilityEnum { +export enum IV1ProductsBatchUpdateParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV3ProductsBatchUpdateParamsTaxStatusEnum { +export enum IV1ProductsBatchUpdateParamsDownloadTypeEnum { + Standard = "standard", +} + +export enum IV1ProductsBatchUpdateParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV3ProductsBatchUpdateParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsBatchUpdateParamsBackordersEnum { +export enum IV1ProductsBatchUpdateParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", } -export enum IV3ProductsBatchPartialUpdateParamsTypeEnum { +export enum IV1ProductsBatchPartialUpdateParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV3ProductsBatchPartialUpdateParamsStatusEnum { +export enum IV1ProductsBatchPartialUpdateParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", } -export enum IV3ProductsBatchPartialUpdateParamsCatalogVisibilityEnum { +export enum IV1ProductsBatchPartialUpdateParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV3ProductsBatchPartialUpdateParamsTaxStatusEnum { +export enum IV1ProductsBatchPartialUpdateParamsDownloadTypeEnum { + Standard = "standard", +} + +export enum IV1ProductsBatchPartialUpdateParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV3ProductsBatchPartialUpdateParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsBatchPartialUpdateParamsBackordersEnum { +export enum IV1ProductsBatchPartialUpdateParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", } /** @default "view" */ -export enum IV3ProductsSuggestedProductsListParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "desc" */ -export enum IV3ProductsSuggestedProductsListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - -/** @default "date" */ -export enum IV3ProductsSuggestedProductsListParamsOrderbyEnum { - Date = "date", - Id = "id", - Include = "include", - Title = "title", - Slug = "slug", - Modified = "modified", - Popularity = "popularity", - Rating = "rating", - PostIn = "post__in", - Price = "price", - Sales = "sales", - MenuOrder = "menu_order", - Random = "random", - Popularity1 = "popularity", - Rating2 = "rating", - MenuOrder3 = "menu_order", -} - -/** @default "any" */ -export enum IV3ProductsSuggestedProductsListParamsStatusEnum { - Any = "any", - Future = "future", - Trash = "trash", - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum IV3ProductsSuggestedProductsListParamsTypeEnum { - Simple = "simple", - Grouped = "grouped", - External = "external", - Variable = "variable", -} - -export enum ITypeEnum6 { - Simple = "simple", - Grouped = "grouped", - External = "external", - Variable = "variable", -} - -export enum IStatusEnum9 { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", - Future = "future", - AutoDraft = "auto-draft", - Trash = "trash", -} - -export enum ICatalogVisibilityEnum3 { - Visible = "visible", - Catalog = "catalog", - Search = "search", - Hidden = "hidden", -} - -export enum ITaxStatusEnum3 { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -export enum IStockStatusEnum3 { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IBackordersEnum3 { - No = "no", - Notify = "notify", - Yes = "yes", -} - -/** @default "view" */ -export enum IV3ProductsVariationsListParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "desc" */ -export enum IV3ProductsVariationsListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - -/** @default "date" */ -export enum IV3ProductsVariationsListParamsOrderbyEnum { - Date = "date", - Id = "id", - Include = "include", - Title = "title", - Slug = "slug", - Modified = "modified", - MenuOrder = "menu_order", -} - -/** @default "any" */ -export enum IV3ProductsVariationsListParamsStatusEnum { - Any = "any", - Future = "future", - Trash = "trash", - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum IV3ProductsVariationsListParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -/** @default "publish" */ -export enum IStatusEnum10 { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -/** @default "taxable" */ -export enum ITaxStatusEnum4 { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -/** @default "instock" */ -export enum IStockStatusEnum4 { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -/** @default "no" */ -export enum IBackordersEnum4 { - No = "no", - Notify = "notify", - Yes = "yes", -} - -/** @default "view" */ -export enum IV3ProductsDetail2ParamsContextEnum { - View = "view", - Edit = "edit", -} - -export enum IStatusEnum11 { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum ITaxStatusEnum5 { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -export enum IStockStatusEnum5 { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IBackordersEnum5 { - No = "no", - Notify = "notify", - Yes = "yes", -} - -export enum IV3ProductsUpdate2ParamsStatusEnum { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum IV3ProductsUpdate2ParamsTaxStatusEnum { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -export enum IV3ProductsUpdate2ParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsUpdate2ParamsBackordersEnum { - No = "no", - Notify = "notify", - Yes = "yes", -} - -export enum IV3ProductsPartialUpdate2ParamsStatusEnum { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum IV3ProductsPartialUpdate2ParamsTaxStatusEnum { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -export enum IV3ProductsPartialUpdate2ParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsPartialUpdate2ParamsBackordersEnum { - No = "no", - Notify = "notify", - Yes = "yes", -} - -export enum IStatusEnum12 { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum ITaxStatusEnum6 { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -export enum IStockStatusEnum6 { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IBackordersEnum6 { - No = "no", - Notify = "notify", - Yes = "yes", -} - -export enum IV3ProductsVariationsBatchUpdateParamsStatusEnum { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum IV3ProductsVariationsBatchUpdateParamsTaxStatusEnum { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -export enum IV3ProductsVariationsBatchUpdateParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsVariationsBatchUpdateParamsBackordersEnum { - No = "no", - Notify = "notify", - Yes = "yes", -} - -export enum IV3ProductsVariationsBatchPartialUpdateParamsStatusEnum { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -export enum IV3ProductsVariationsBatchPartialUpdateParamsTaxStatusEnum { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -export enum IV3ProductsVariationsBatchPartialUpdateParamsStockStatusEnum { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -export enum IV3ProductsVariationsBatchPartialUpdateParamsBackordersEnum { - No = "no", - Notify = "notify", - Yes = "yes", -} - -/** @default "publish" */ -export enum IStatusEnum13 { - Draft = "draft", - Pending = "pending", - Private = "private", - Publish = "publish", -} - -/** @default "taxable" */ -export enum ITaxStatusEnum7 { - Taxable = "taxable", - Shipping = "shipping", - None = "none", -} - -/** @default "instock" */ -export enum IStockStatusEnum7 { - Instock = "instock", - Outofstock = "outofstock", - Onbackorder = "onbackorder", -} - -/** @default "no" */ -export enum IBackordersEnum7 { - No = "no", - Notify = "notify", - Yes = "yes", -} - -/** @default "view" */ -export enum IV3RefundsListParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "desc" */ -export enum IV3RefundsListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - -/** @default "date" */ -export enum IV3RefundsListParamsOrderbyEnum { - Date = "date", - Id = "id", - Include = "include", - Title = "title", - Slug = "slug", - Modified = "modified", -} - -/** @default "view" */ -export enum IV3ReportsSalesListParamsContextEnum { +export enum IV1ReportsSalesListParamsContextEnum { View = "view", } -export enum IV3ReportsSalesListParamsPeriodEnum { +export enum IV1ReportsSalesListParamsPeriodEnum { Week = "week", Month = "month", LastMonth = "last_month", @@ -2629,11 +2052,11 @@ export enum IV3ReportsSalesListParamsPeriodEnum { } /** @default "view" */ -export enum IV3ReportsTopSellersListParamsContextEnum { +export enum IV1ReportsTopSellersListParamsContextEnum { View = "view", } -export enum IV3ReportsTopSellersListParamsPeriodEnum { +export enum IV1ReportsTopSellersListParamsPeriodEnum { Week = "week", Month = "month", LastMonth = "last_month", @@ -2641,82 +2064,36 @@ export enum IV3ReportsTopSellersListParamsPeriodEnum { } /** @default "view" */ -export enum IV3ReportsOrdersTotalsListParamsContextEnum { +export enum IV1ReportsListParamsContextEnum { View = "view", } /** @default "view" */ -export enum IV3ReportsProductsTotalsListParamsContextEnum { - View = "view", -} - -/** @default "view" */ -export enum IV3ReportsCustomersTotalsListParamsContextEnum { - View = "view", -} - -/** @default "view" */ -export enum IV3ReportsCouponsTotalsListParamsContextEnum { - View = "view", -} - -/** @default "view" */ -export enum IV3ReportsReviewsTotalsListParamsContextEnum { - View = "view", -} - -/** @default "view" */ -export enum IV3ReportsListParamsContextEnum { - View = "view", -} - -export enum ITypeEnum7 { - Postcode = "postcode", - State = "state", - Country = "country", - Continent = "continent", -} - -export enum IV3ShippingZonesLocationsUpdateParamsTypeEnum { - Postcode = "postcode", - State = "state", - Country = "country", - Continent = "continent", -} - -export enum IV3ShippingZonesLocationsPartialUpdateParamsTypeEnum { - Postcode = "postcode", - State = "state", - Country = "country", - Continent = "continent", -} - -/** @default "view" */ -export enum IV3TaxesClassesListParamsContextEnum { +export enum IV1TaxesClassesListParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV3TaxesListParamsContextEnum { +export enum IV1TaxesListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV3TaxesListParamsOrderEnum { +export enum IV1TaxesListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "order" */ -export enum IV3TaxesListParamsOrderbyEnum { +export enum IV1TaxesListParamsOrderbyEnum { Id = "id", Order = "order", Priority = "priority", } -export enum IV3TaxesListParamsClassEnum { +export enum IV1TaxesListParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", @@ -2730,7 +2107,7 @@ export enum IClassEnum { } /** @default "view" */ -export enum IV3TaxesDetailParamsContextEnum { +export enum IV1TaxesDetailParamsContextEnum { View = "view", Edit = "edit", } @@ -2741,13 +2118,13 @@ export enum IClassEnum1 { ZeroRate = "zero-rate", } -export enum IV3TaxesUpdateParamsClassEnum { +export enum IV1TaxesUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", } -export enum IV3TaxesPartialUpdateParamsClassEnum { +export enum IV1TaxesPartialUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", @@ -2759,39 +2136,39 @@ export enum IClassEnum2 { ZeroRate = "zero-rate", } -export enum IV3TaxesBatchUpdateParamsClassEnum { +export enum IV1TaxesBatchUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", } -export enum IV3TaxesBatchPartialUpdateParamsClassEnum { +export enum IV1TaxesBatchPartialUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", } /** @default "view" */ -export enum IV3WebhooksListParamsContextEnum { +export enum IV1WebhooksListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV3WebhooksListParamsOrderEnum { +export enum IV1WebhooksListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV3WebhooksListParamsOrderbyEnum { +export enum IV1WebhooksListParamsOrderbyEnum { Date = "date", Id = "id", Title = "title", } /** @default "all" */ -export enum IV3WebhooksListParamsStatusEnum { +export enum IV1WebhooksListParamsStatusEnum { All = "all", Active = "active", Paused = "paused", @@ -2799,105 +2176,66 @@ export enum IV3WebhooksListParamsStatusEnum { } /** @default "active" */ -export enum IStatusEnum14 { +export enum IStatusEnum6 { Active = "active", Paused = "paused", Disabled = "disabled", } /** @default "view" */ -export enum IV3WebhooksDetailParamsContextEnum { +export enum IV1WebhooksDetailParamsContextEnum { View = "view", Edit = "edit", } -export enum IStatusEnum15 { +export enum IStatusEnum7 { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV3WebhooksUpdateParamsStatusEnum { +export enum IV1WebhooksUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV3WebhooksPartialUpdateParamsStatusEnum { +export enum IV1WebhooksPartialUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IStatusEnum16 { +export enum IStatusEnum8 { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV3WebhooksBatchUpdateParamsStatusEnum { +export enum IV1WebhooksBatchUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV3WebhooksBatchPartialUpdateParamsStatusEnum { +export enum IV1WebhooksBatchPartialUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } /** @default "view" */ -export enum IV3SystemStatusListParamsContextEnum { - View = "view", -} - -/** @default "view" */ -export enum IV3SystemStatusToolsListParamsContextEnum { +export enum IV1WebhooksDeliveriesListParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV3ShippingMethodsListParamsContextEnum { - View = "view", -} - -/** @default "view" */ -export enum IV3ShippingMethodsDetailParamsContextEnum { - View = "view", -} - -/** @default "view" */ -export enum IV3PaymentGatewaysListParamsContextEnum { +export enum IV1WebhooksDetail2ParamsContextEnum { View = "view", Edit = "edit", } -/** @default "view" */ -export enum IV3PaymentGatewaysDetailParamsContextEnum { - View = "view", - Edit = "edit", -} - -export enum ITemplateIdEnum { - NewOrder = "new_order", - CancelledOrder = "cancelled_order", - CustomerCancelledOrder = "customer_cancelled_order", - FailedOrder = "failed_order", - CustomerFailedOrder = "customer_failed_order", - CustomerOnHoldOrder = "customer_on_hold_order", - CustomerProcessingOrder = "customer_processing_order", - CustomerCompletedOrder = "customer_completed_order", - CustomerRefundedOrder = "customer_refunded_order", - CustomerInvoice = "customer_invoice", - CustomerNote = "customer_note", - CustomerResetPassword = "customer_reset_password", - CustomerNewAccount = "customer_new_account", - CustomerPosCompletedOrder = "customer_pos_completed_order", - CustomerPosRefundedOrder = "customer_pos_refunded_order", -} - export type QueryParamsType = Record; export type ResponseFormat = keyof Omit; @@ -3161,13 +2499,13 @@ export class Api< * No description * * @tags marketplace - * @name V3MarketplaceFeaturedList - * @request GET:/wc/v3/marketplace/featured + * @name V1MarketplaceProductPreviewList + * @request GET:/wc/v1/marketplace/product-preview * @secure */ - v3MarketplaceFeaturedList: (params: RequestParams = {}) => + v1MarketplaceProductPreviewList: (params: RequestParams = {}) => this.request({ - path: `/wc/v3/marketplace/featured`, + path: `/wc/v1/marketplace/product-preview`, method: "GET", secure: true, type: ContentType.UrlEncoded, @@ -3177,145 +2515,62 @@ export class Api< /** * No description * - * @tags marketplace - * @name V3MarketplaceRefreshCreate - * @request POST:/wc/v3/marketplace/refresh + * @tags coupons + * @name V1CouponsList + * @request GET:/wc/v1/coupons * @secure */ - v3MarketplaceRefreshCreate: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/marketplace/refresh`, - method: "POST", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags marketplace - * @name V3MarketplaceSubscriptionsList - * @request GET:/wc/v3/marketplace/subscriptions - * @secure - */ - v3MarketplaceSubscriptionsList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/marketplace/subscriptions`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags marketplace - * @name V3MarketplaceSubscriptionsConnectCreate - * @request POST:/wc/v3/marketplace/subscriptions/connect - * @secure - */ - v3MarketplaceSubscriptionsConnectCreate: ( - data: { - product_key: string; + v1CouponsList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1CouponsListParamsContextEnum[]; + /** + * Current page of the collection. + * @format int64 + * @min 1 + */ + page?: number; + /** + * Maximum number of items to be returned in result set. + * @format int64 + * @min 1 + * @max 100 + */ + per_page?: number; + /** Limit results to those matching a string. */ + search?: string; + /** + * Limit response to resources published after a given ISO8601 compliant date. + * @format date-time + */ + after?: string; + /** + * Limit response to resources published before a given ISO8601 compliant date. + * @format date-time + */ + before?: string; + /** Ensure result set excludes specific IDs. */ + exclude?: number[]; + /** Limit result set to specific ids. */ + include?: number[]; + /** + * Offset the result set by a specific number of items. + * @format int64 + */ + offset?: number; + /** Order sort attribute ascending or descending. */ + order?: IV1CouponsListParamsOrderEnum[]; + /** Sort collection by object attribute. */ + orderby?: IV1CouponsListParamsOrderbyEnum[]; + /** Use WP Query arguments to modify the response; private query vars require appropriate authorization. */ + filter?: string; + /** Limit result set to resources with a specific code. */ + code?: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/marketplace/subscriptions/connect`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags marketplace - * @name V3MarketplaceSubscriptionsActivatePluginCreate - * @request POST:/wc/v3/marketplace/subscriptions/activate-plugin - * @secure - */ - v3MarketplaceSubscriptionsActivatePluginCreate: ( - data: { - product_key: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/marketplace/subscriptions/activate-plugin`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags marketplace - * @name V3MarketplaceSubscriptionsDisconnectCreate - * @request POST:/wc/v3/marketplace/subscriptions/disconnect - * @secure - */ - v3MarketplaceSubscriptionsDisconnectCreate: ( - data: { - product_key: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/marketplace/subscriptions/disconnect`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags marketplace - * @name V3MarketplaceSubscriptionsActivateCreate - * @request POST:/wc/v3/marketplace/subscriptions/activate - * @secure - */ - v3MarketplaceSubscriptionsActivateCreate: ( - data: { - product_key: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/marketplace/subscriptions/activate`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags marketplace - * @name V3MarketplaceSubscriptionsInstallUrlList - * @request GET:/wc/v3/marketplace/subscriptions/install-url - * @secure - */ - v3MarketplaceSubscriptionsInstallUrlList: ( - query: { - product_key: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/marketplace/subscriptions/install-url`, + path: `/wc/v1/coupons`, method: "GET", query: query, secure: true, @@ -3326,19 +2581,63 @@ export class Api< /** * No description * - * @tags marketplace - * @name V3MarketplaceCreateOrderCreate - * @request POST:/wc/v3/marketplace/create-order + * @tags coupons + * @name V1CouponsCreate + * @request POST:/wc/v1/coupons * @secure */ - v3MarketplaceCreateOrderCreate: ( + v1CouponsCreate: ( data: { - product_id: string; + /** Coupon code. */ + code: string; + /** Coupon description. */ + description?: string; + /** Determines the type of discount that will be applied. */ + discount_type?: IDiscountTypeEnum[]; + /** The amount of discount. Should always be numeric, even if setting a percentage. */ + amount?: string; + /** UTC DateTime when the coupon expires. */ + expiry_date?: null; + /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ + individual_use?: boolean; + /** List of product IDs the coupon can be used on. */ + product_ids?: number[]; + /** List of product IDs the coupon cannot be used on. */ + exclude_product_ids?: number[]; + /** + * How many times the coupon can be used in total. + * @format int64 + */ + usage_limit?: number; + /** + * How many times the coupon can be used per customer. + * @format int64 + */ + usage_limit_per_user?: number; + /** + * Max number of items in the cart the coupon can be applied to. + * @format int64 + */ + limit_usage_to_x_items?: number; + /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ + free_shipping?: boolean; + /** List of category IDs the coupon applies to. */ + product_categories?: number[]; + /** List of category IDs the coupon does not apply to. */ + excluded_product_categories?: number[]; + /** If true, this coupon will not be applied to items that have sale prices. */ + exclude_sale_items?: boolean; + /** Minimum order amount that needs to be in the cart before coupon applies. */ + minimum_amount?: string; + /** Maximum order amount allowed when using the coupon. */ + maximum_amount?: string; + /** List of email addresses that can use this coupon. */ + email_restrictions?: string[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/marketplace/create-order`, + path: `/wc/v1/coupons`, method: "POST", body: data, secure: true, @@ -3349,15 +2648,1654 @@ export class Api< /** * No description * - * @tags products - * @name V3ProductsBrandsList - * @request GET:/wc/v3/products/brands + * @tags coupons + * @name V1CouponsDetail + * @request GET:/wc/v1/coupons/{id} * @secure */ - v3ProductsBrandsList: ( + v1CouponsDetail: ( + id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsBrandsListParamsContextEnum[]; + context?: IV1CouponsDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/${id}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags coupons + * @name V1CouponsCreate2 + * @request POST:/wc/v1/coupons/{id} + * @originalName v1CouponsCreate + * @duplicate + * @secure + */ + v1CouponsCreate2: ( + id: number, + data: { + /** Coupon code. */ + code?: string; + /** Coupon description. */ + description?: string; + /** Determines the type of discount that will be applied. */ + discount_type?: IDiscountTypeEnum1[]; + /** The amount of discount. Should always be numeric, even if setting a percentage. */ + amount?: string; + /** UTC DateTime when the coupon expires. */ + expiry_date?: null; + /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ + individual_use?: boolean; + /** List of product IDs the coupon can be used on. */ + product_ids?: number[]; + /** List of product IDs the coupon cannot be used on. */ + exclude_product_ids?: number[]; + /** + * How many times the coupon can be used in total. + * @format int64 + */ + usage_limit?: number; + /** + * How many times the coupon can be used per customer. + * @format int64 + */ + usage_limit_per_user?: number; + /** + * Max number of items in the cart the coupon can be applied to. + * @format int64 + */ + limit_usage_to_x_items?: number; + /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ + free_shipping?: boolean; + /** List of category IDs the coupon applies to. */ + product_categories?: number[]; + /** List of category IDs the coupon does not apply to. */ + excluded_product_categories?: number[]; + /** If true, this coupon will not be applied to items that have sale prices. */ + exclude_sale_items?: boolean; + /** Minimum order amount that needs to be in the cart before coupon applies. */ + minimum_amount?: string; + /** Maximum order amount allowed when using the coupon. */ + maximum_amount?: string; + /** List of email addresses that can use this coupon. */ + email_restrictions?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/${id}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags coupons + * @name V1CouponsUpdate + * @request PUT:/wc/v1/coupons/{id} + * @secure + */ + v1CouponsUpdate: ( + id: number, + query?: { + /** Coupon code. */ + code?: string; + /** Coupon description. */ + description?: string; + /** Determines the type of discount that will be applied. */ + discount_type?: IV1CouponsUpdateParamsDiscountTypeEnum[]; + /** The amount of discount. Should always be numeric, even if setting a percentage. */ + amount?: string; + /** UTC DateTime when the coupon expires. */ + expiry_date?: any; + /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ + individual_use?: boolean; + /** List of product IDs the coupon can be used on. */ + product_ids?: number[]; + /** List of product IDs the coupon cannot be used on. */ + exclude_product_ids?: number[]; + /** + * How many times the coupon can be used in total. + * @format int64 + */ + usage_limit?: number; + /** + * How many times the coupon can be used per customer. + * @format int64 + */ + usage_limit_per_user?: number; + /** + * Max number of items in the cart the coupon can be applied to. + * @format int64 + */ + limit_usage_to_x_items?: number; + /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ + free_shipping?: boolean; + /** List of category IDs the coupon applies to. */ + product_categories?: number[]; + /** List of category IDs the coupon does not apply to. */ + excluded_product_categories?: number[]; + /** If true, this coupon will not be applied to items that have sale prices. */ + exclude_sale_items?: boolean; + /** Minimum order amount that needs to be in the cart before coupon applies. */ + minimum_amount?: string; + /** Maximum order amount allowed when using the coupon. */ + maximum_amount?: string; + /** List of email addresses that can use this coupon. */ + email_restrictions?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/${id}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags coupons + * @name V1CouponsPartialUpdate + * @request PATCH:/wc/v1/coupons/{id} + * @secure + */ + v1CouponsPartialUpdate: ( + id: number, + query?: { + /** Coupon code. */ + code?: string; + /** Coupon description. */ + description?: string; + /** Determines the type of discount that will be applied. */ + discount_type?: IV1CouponsPartialUpdateParamsDiscountTypeEnum[]; + /** The amount of discount. Should always be numeric, even if setting a percentage. */ + amount?: string; + /** UTC DateTime when the coupon expires. */ + expiry_date?: any; + /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ + individual_use?: boolean; + /** List of product IDs the coupon can be used on. */ + product_ids?: number[]; + /** List of product IDs the coupon cannot be used on. */ + exclude_product_ids?: number[]; + /** + * How many times the coupon can be used in total. + * @format int64 + */ + usage_limit?: number; + /** + * How many times the coupon can be used per customer. + * @format int64 + */ + usage_limit_per_user?: number; + /** + * Max number of items in the cart the coupon can be applied to. + * @format int64 + */ + limit_usage_to_x_items?: number; + /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ + free_shipping?: boolean; + /** List of category IDs the coupon applies to. */ + product_categories?: number[]; + /** List of category IDs the coupon does not apply to. */ + excluded_product_categories?: number[]; + /** If true, this coupon will not be applied to items that have sale prices. */ + exclude_sale_items?: boolean; + /** Minimum order amount that needs to be in the cart before coupon applies. */ + minimum_amount?: string; + /** Maximum order amount allowed when using the coupon. */ + maximum_amount?: string; + /** List of email addresses that can use this coupon. */ + email_restrictions?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/${id}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags coupons + * @name V1CouponsDelete + * @request DELETE:/wc/v1/coupons/{id} + * @secure + */ + v1CouponsDelete: ( + id: number, + query?: { + /** Whether to bypass trash and force deletion. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/${id}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags coupons + * @name V1CouponsBatchCreate + * @request POST:/wc/v1/coupons/batch + * @secure + */ + v1CouponsBatchCreate: ( + data: { + /** Coupon code. */ + code?: string; + /** Coupon description. */ + description?: string; + /** Determines the type of discount that will be applied. */ + discount_type?: IDiscountTypeEnum2[]; + /** The amount of discount. Should always be numeric, even if setting a percentage. */ + amount?: string; + /** UTC DateTime when the coupon expires. */ + expiry_date?: null; + /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ + individual_use?: boolean; + /** List of product IDs the coupon can be used on. */ + product_ids?: number[]; + /** List of product IDs the coupon cannot be used on. */ + exclude_product_ids?: number[]; + /** + * How many times the coupon can be used in total. + * @format int64 + */ + usage_limit?: number; + /** + * How many times the coupon can be used per customer. + * @format int64 + */ + usage_limit_per_user?: number; + /** + * Max number of items in the cart the coupon can be applied to. + * @format int64 + */ + limit_usage_to_x_items?: number; + /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ + free_shipping?: boolean; + /** List of category IDs the coupon applies to. */ + product_categories?: number[]; + /** List of category IDs the coupon does not apply to. */ + excluded_product_categories?: number[]; + /** If true, this coupon will not be applied to items that have sale prices. */ + exclude_sale_items?: boolean; + /** Minimum order amount that needs to be in the cart before coupon applies. */ + minimum_amount?: string; + /** Maximum order amount allowed when using the coupon. */ + maximum_amount?: string; + /** List of email addresses that can use this coupon. */ + email_restrictions?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags coupons + * @name V1CouponsBatchUpdate + * @request PUT:/wc/v1/coupons/batch + * @secure + */ + v1CouponsBatchUpdate: ( + query?: { + /** Coupon code. */ + code?: string; + /** Coupon description. */ + description?: string; + /** Determines the type of discount that will be applied. */ + discount_type?: IV1CouponsBatchUpdateParamsDiscountTypeEnum[]; + /** The amount of discount. Should always be numeric, even if setting a percentage. */ + amount?: string; + /** UTC DateTime when the coupon expires. */ + expiry_date?: any; + /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ + individual_use?: boolean; + /** List of product IDs the coupon can be used on. */ + product_ids?: number[]; + /** List of product IDs the coupon cannot be used on. */ + exclude_product_ids?: number[]; + /** + * How many times the coupon can be used in total. + * @format int64 + */ + usage_limit?: number; + /** + * How many times the coupon can be used per customer. + * @format int64 + */ + usage_limit_per_user?: number; + /** + * Max number of items in the cart the coupon can be applied to. + * @format int64 + */ + limit_usage_to_x_items?: number; + /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ + free_shipping?: boolean; + /** List of category IDs the coupon applies to. */ + product_categories?: number[]; + /** List of category IDs the coupon does not apply to. */ + excluded_product_categories?: number[]; + /** If true, this coupon will not be applied to items that have sale prices. */ + exclude_sale_items?: boolean; + /** Minimum order amount that needs to be in the cart before coupon applies. */ + minimum_amount?: string; + /** Maximum order amount allowed when using the coupon. */ + maximum_amount?: string; + /** List of email addresses that can use this coupon. */ + email_restrictions?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/batch`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags coupons + * @name V1CouponsBatchPartialUpdate + * @request PATCH:/wc/v1/coupons/batch + * @secure + */ + v1CouponsBatchPartialUpdate: ( + query?: { + /** Coupon code. */ + code?: string; + /** Coupon description. */ + description?: string; + /** Determines the type of discount that will be applied. */ + discount_type?: IV1CouponsBatchPartialUpdateParamsDiscountTypeEnum[]; + /** The amount of discount. Should always be numeric, even if setting a percentage. */ + amount?: string; + /** UTC DateTime when the coupon expires. */ + expiry_date?: any; + /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ + individual_use?: boolean; + /** List of product IDs the coupon can be used on. */ + product_ids?: number[]; + /** List of product IDs the coupon cannot be used on. */ + exclude_product_ids?: number[]; + /** + * How many times the coupon can be used in total. + * @format int64 + */ + usage_limit?: number; + /** + * How many times the coupon can be used per customer. + * @format int64 + */ + usage_limit_per_user?: number; + /** + * Max number of items in the cart the coupon can be applied to. + * @format int64 + */ + limit_usage_to_x_items?: number; + /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ + free_shipping?: boolean; + /** List of category IDs the coupon applies to. */ + product_categories?: number[]; + /** List of category IDs the coupon does not apply to. */ + excluded_product_categories?: number[]; + /** If true, this coupon will not be applied to items that have sale prices. */ + exclude_sale_items?: boolean; + /** Minimum order amount that needs to be in the cart before coupon applies. */ + minimum_amount?: string; + /** Maximum order amount allowed when using the coupon. */ + maximum_amount?: string; + /** List of email addresses that can use this coupon. */ + email_restrictions?: string[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/coupons/batch`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersDownloadsList + * @request GET:/wc/v1/customers/{customer_id}/downloads + * @secure + */ + v1CustomersDownloadsList: ( + customerId: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1CustomersDownloadsListParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/${customerId}/downloads`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersList + * @request GET:/wc/v1/customers + * @secure + */ + v1CustomersList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1CustomersListParamsContextEnum[]; + /** + * Current page of the collection. + * @format int64 + * @min 1 + */ + page?: number; + /** + * Maximum number of items to be returned in result set. + * @format int64 + * @min 1 + * @max 100 + */ + per_page?: number; + /** Limit results to those matching a string. */ + search?: string; + /** Ensure result set excludes specific IDs. */ + exclude?: number[]; + /** Limit result set to specific IDs. */ + include?: number[]; + /** + * Offset the result set by a specific number of items. + * @format int64 + */ + offset?: number; + /** Order sort attribute ascending or descending. */ + order?: IV1CustomersListParamsOrderEnum[]; + /** Sort collection by object attribute. */ + orderby?: IV1CustomersListParamsOrderbyEnum[]; + /** + * Limit result set to resources with a specific email. + * @format email + */ + email?: string; + /** Limit result set to resources with a specific role. */ + role?: IV1CustomersListParamsRoleEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersCreate + * @request POST:/wc/v1/customers + * @secure + */ + v1CustomersCreate: ( + data: { + /** New user email address. */ + email: string; + /** Customer first name. */ + first_name?: string; + /** Customer last name. */ + last_name?: string; + /** New user username. */ + username?: string; + /** New user password. */ + password?: string; + /** List of billing address data. */ + billing?: string; + /** List of shipping address data. */ + shipping?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersDetail + * @request GET:/wc/v1/customers/{id} + * @secure + */ + v1CustomersDetail: ( + id: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1CustomersDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/${id}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersCreate2 + * @request POST:/wc/v1/customers/{id} + * @originalName v1CustomersCreate + * @duplicate + * @secure + */ + v1CustomersCreate2: ( + id: number, + data: { + /** + * The email address for the customer. + * @format email + */ + email?: string; + /** Customer first name. */ + first_name?: string; + /** Customer last name. */ + last_name?: string; + /** Customer login name. */ + username?: string; + /** Customer password. */ + password?: string; + /** List of billing address data. */ + billing?: string; + /** List of shipping address data. */ + shipping?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/${id}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersUpdate + * @request PUT:/wc/v1/customers/{id} + * @secure + */ + v1CustomersUpdate: ( + id: number, + query?: { + /** + * The email address for the customer. + * @format email + */ + email?: string; + /** Customer first name. */ + first_name?: string; + /** Customer last name. */ + last_name?: string; + /** Customer login name. */ + username?: string; + /** Customer password. */ + password?: string; + /** List of billing address data. */ + billing?: string; + /** List of shipping address data. */ + shipping?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/${id}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersPartialUpdate + * @request PATCH:/wc/v1/customers/{id} + * @secure + */ + v1CustomersPartialUpdate: ( + id: number, + query?: { + /** + * The email address for the customer. + * @format email + */ + email?: string; + /** Customer first name. */ + first_name?: string; + /** Customer last name. */ + last_name?: string; + /** Customer login name. */ + username?: string; + /** Customer password. */ + password?: string; + /** List of billing address data. */ + billing?: string; + /** List of shipping address data. */ + shipping?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/${id}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersDelete + * @request DELETE:/wc/v1/customers/{id} + * @secure + */ + v1CustomersDelete: ( + id: number, + query?: { + /** Required to be true, as resource does not support trashing. */ + force?: boolean; + /** + * ID to reassign posts to. + * @format int64 + */ + reassign?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/${id}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersBatchCreate + * @request POST:/wc/v1/customers/batch + * @secure + */ + v1CustomersBatchCreate: ( + data: { + /** + * The email address for the customer. + * @format email + */ + email?: string; + /** Customer first name. */ + first_name?: string; + /** Customer last name. */ + last_name?: string; + /** Customer login name. */ + username?: string; + /** Customer password. */ + password?: string; + /** List of billing address data. */ + billing?: string; + /** List of shipping address data. */ + shipping?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersBatchUpdate + * @request PUT:/wc/v1/customers/batch + * @secure + */ + v1CustomersBatchUpdate: ( + query?: { + /** + * The email address for the customer. + * @format email + */ + email?: string; + /** Customer first name. */ + first_name?: string; + /** Customer last name. */ + last_name?: string; + /** Customer login name. */ + username?: string; + /** Customer password. */ + password?: string; + /** List of billing address data. */ + billing?: string; + /** List of shipping address data. */ + shipping?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/batch`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags customers + * @name V1CustomersBatchPartialUpdate + * @request PATCH:/wc/v1/customers/batch + * @secure + */ + v1CustomersBatchPartialUpdate: ( + query?: { + /** + * The email address for the customer. + * @format email + */ + email?: string; + /** Customer first name. */ + first_name?: string; + /** Customer last name. */ + last_name?: string; + /** Customer login name. */ + username?: string; + /** Customer password. */ + password?: string; + /** List of billing address data. */ + billing?: string; + /** List of shipping address data. */ + shipping?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/customers/batch`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersNotesList + * @request GET:/wc/v1/orders/{order_id}/notes + * @secure + */ + v1OrdersNotesList: ( + orderId: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1OrdersNotesListParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${orderId}/notes`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersNotesCreate + * @request POST:/wc/v1/orders/{order_id}/notes + * @secure + */ + v1OrdersNotesCreate: ( + orderId: number, + data: { + /** Order note content. */ + note: string; + /** Shows/define if the note is only for reference or for the customer (the user will be notified). */ + customer_note?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${orderId}/notes`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersDetail + * @request GET:/wc/v1/orders/{order_id} + * @secure + */ + v1OrdersDetail: ( + orderId: number, + query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1OrdersDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${orderId}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersDelete + * @request DELETE:/wc/v1/orders/{order_id} + * @secure + */ + v1OrdersDelete: ( + orderId: number, + query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** Required to be true, as resource does not support trashing. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${orderId}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersRefundsList + * @request GET:/wc/v1/orders/{order_id}/refunds + * @secure + */ + v1OrdersRefundsList: ( + orderId: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1OrdersRefundsListParamsContextEnum[]; + /** + * Current page of the collection. + * @format int64 + * @min 1 + */ + page?: number; + /** + * Maximum number of items to be returned in result set. + * @format int64 + * @min 1 + * @max 100 + */ + per_page?: number; + /** Limit results to those matching a string. */ + search?: string; + /** + * Limit response to resources published after a given ISO8601 compliant date. + * @format date-time + */ + after?: string; + /** + * Limit response to resources published before a given ISO8601 compliant date. + * @format date-time + */ + before?: string; + /** Ensure result set excludes specific IDs. */ + exclude?: number[]; + /** Limit result set to specific ids. */ + include?: number[]; + /** + * Offset the result set by a specific number of items. + * @format int64 + */ + offset?: number; + /** Order sort attribute ascending or descending. */ + order?: IV1OrdersRefundsListParamsOrderEnum[]; + /** Sort collection by object attribute. */ + orderby?: IV1OrdersRefundsListParamsOrderbyEnum[]; + /** Use WP Query arguments to modify the response; private query vars require appropriate authorization. */ + filter?: string; + /** Limit result set to orders assigned a specific status. */ + status?: IV1OrdersRefundsListParamsStatusEnum[]; + /** + * Limit result set to orders assigned a specific customer. + * @format int64 + */ + customer?: number; + /** + * Limit result set to orders assigned a specific product. + * @format int64 + */ + product?: number; + /** + * Number of decimal points to use in each resource. + * @format int64 + */ + dp?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${orderId}/refunds`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersRefundsCreate + * @request POST:/wc/v1/orders/{order_id}/refunds + * @secure + */ + v1OrdersRefundsCreate: ( + orderId: number, + data: { + /** Refund amount. */ + amount?: string; + /** Reason for refund. */ + reason?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${orderId}/refunds`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersList + * @request GET:/wc/v1/orders + * @secure + */ + v1OrdersList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1OrdersListParamsContextEnum[]; + /** + * Current page of the collection. + * @format int64 + * @min 1 + */ + page?: number; + /** + * Maximum number of items to be returned in result set. + * @format int64 + * @min 1 + * @max 100 + */ + per_page?: number; + /** Limit results to those matching a string. */ + search?: string; + /** + * Limit response to resources published after a given ISO8601 compliant date. + * @format date-time + */ + after?: string; + /** + * Limit response to resources published before a given ISO8601 compliant date. + * @format date-time + */ + before?: string; + /** Ensure result set excludes specific IDs. */ + exclude?: number[]; + /** Limit result set to specific ids. */ + include?: number[]; + /** + * Offset the result set by a specific number of items. + * @format int64 + */ + offset?: number; + /** Order sort attribute ascending or descending. */ + order?: IV1OrdersListParamsOrderEnum[]; + /** Sort collection by object attribute. */ + orderby?: IV1OrdersListParamsOrderbyEnum[]; + /** Use WP Query arguments to modify the response; private query vars require appropriate authorization. */ + filter?: string; + /** Limit result set to orders assigned a specific status. */ + status?: IV1OrdersListParamsStatusEnum[]; + /** + * Limit result set to orders assigned a specific customer. + * @format int64 + */ + customer?: number; + /** + * Limit result set to orders assigned a specific product. + * @format int64 + */ + product?: number; + /** + * Number of decimal points to use in each resource. + * @format int64 + */ + dp?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersCreate + * @request POST:/wc/v1/orders + * @secure + */ + v1OrdersCreate: ( + data: { + /** + * Parent order ID. + * @format int64 + */ + parent_id?: number; + /** Order status. */ + status?: IStatusEnum[]; + /** Currency the order was created with, in ISO format. */ + currency?: ICurrencyEnum[]; + /** + * User ID who owns the order. 0 for guests. + * @format int64 + */ + customer_id?: number; + /** Billing address. */ + billing?: string; + /** Shipping address. */ + shipping?: string; + /** Payment method ID. */ + payment_method?: string; + /** Payment method title. */ + payment_method_title?: string; + /** Define if the order is paid. It will set the status to processing and reduce stock items. */ + set_paid?: boolean; + /** Unique transaction ID. */ + transaction_id?: string; + /** Note left by customer during checkout. */ + customer_note?: string; + /** Line items data. */ + line_items?: object[]; + /** Shipping lines data. */ + shipping_lines?: object[]; + /** Fee lines data. */ + fee_lines?: object[]; + /** Coupons line data. */ + coupon_lines?: object[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersDetail2 + * @request GET:/wc/v1/orders/{id} + * @originalName v1OrdersDetail + * @duplicate + * @secure + */ + v1OrdersDetail2: ( + id: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1OrdersDetail2ParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${id}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersCreate2 + * @request POST:/wc/v1/orders/{id} + * @originalName v1OrdersCreate + * @duplicate + * @secure + */ + v1OrdersCreate2: ( + id: number, + data: { + /** + * Parent order ID. + * @format int64 + */ + parent_id?: number; + /** Order status. */ + status?: IStatusEnum1[]; + /** Currency the order was created with, in ISO format. */ + currency?: ICurrencyEnum1[]; + /** + * User ID who owns the order. 0 for guests. + * @format int64 + */ + customer_id?: number; + /** Billing address. */ + billing?: string; + /** Shipping address. */ + shipping?: string; + /** Payment method ID. */ + payment_method?: string; + /** Payment method title. */ + payment_method_title?: string; + /** Define if the order is paid. It will set the status to processing and reduce stock items. */ + set_paid?: boolean; + /** Unique transaction ID. */ + transaction_id?: string; + /** Note left by customer during checkout. */ + customer_note?: string; + /** Line items data. */ + line_items?: object[]; + /** Shipping lines data. */ + shipping_lines?: object[]; + /** Fee lines data. */ + fee_lines?: object[]; + /** Coupons line data. */ + coupon_lines?: object[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${id}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersUpdate + * @request PUT:/wc/v1/orders/{id} + * @secure + */ + v1OrdersUpdate: ( + id: number, + query?: { + /** + * Parent order ID. + * @format int64 + */ + parent_id?: number; + /** Order status. */ + status?: IV1OrdersUpdateParamsStatusEnum[]; + /** Currency the order was created with, in ISO format. */ + currency?: IV1OrdersUpdateParamsCurrencyEnum[]; + /** + * User ID who owns the order. 0 for guests. + * @format int64 + */ + customer_id?: number; + /** Billing address. */ + billing?: string; + /** Shipping address. */ + shipping?: string; + /** Payment method ID. */ + payment_method?: string; + /** Payment method title. */ + payment_method_title?: string; + /** Define if the order is paid. It will set the status to processing and reduce stock items. */ + set_paid?: boolean; + /** Unique transaction ID. */ + transaction_id?: string; + /** Note left by customer during checkout. */ + customer_note?: string; + /** Line items data. */ + line_items?: object[]; + /** Shipping lines data. */ + shipping_lines?: object[]; + /** Fee lines data. */ + fee_lines?: object[]; + /** Coupons line data. */ + coupon_lines?: object[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${id}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersPartialUpdate + * @request PATCH:/wc/v1/orders/{id} + * @secure + */ + v1OrdersPartialUpdate: ( + id: number, + query?: { + /** + * Parent order ID. + * @format int64 + */ + parent_id?: number; + /** Order status. */ + status?: IV1OrdersPartialUpdateParamsStatusEnum[]; + /** Currency the order was created with, in ISO format. */ + currency?: IV1OrdersPartialUpdateParamsCurrencyEnum[]; + /** + * User ID who owns the order. 0 for guests. + * @format int64 + */ + customer_id?: number; + /** Billing address. */ + billing?: string; + /** Shipping address. */ + shipping?: string; + /** Payment method ID. */ + payment_method?: string; + /** Payment method title. */ + payment_method_title?: string; + /** Define if the order is paid. It will set the status to processing and reduce stock items. */ + set_paid?: boolean; + /** Unique transaction ID. */ + transaction_id?: string; + /** Note left by customer during checkout. */ + customer_note?: string; + /** Line items data. */ + line_items?: object[]; + /** Shipping lines data. */ + shipping_lines?: object[]; + /** Fee lines data. */ + fee_lines?: object[]; + /** Coupons line data. */ + coupon_lines?: object[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${id}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersDelete2 + * @request DELETE:/wc/v1/orders/{id} + * @originalName v1OrdersDelete + * @duplicate + * @secure + */ + v1OrdersDelete2: ( + id: number, + query?: { + /** Whether to bypass trash and force deletion. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/${id}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersBatchCreate + * @request POST:/wc/v1/orders/batch + * @secure + */ + v1OrdersBatchCreate: ( + data: { + /** + * Parent order ID. + * @format int64 + */ + parent_id?: number; + /** Order status. */ + status?: IStatusEnum2[]; + /** Currency the order was created with, in ISO format. */ + currency?: ICurrencyEnum2[]; + /** + * User ID who owns the order. 0 for guests. + * @format int64 + */ + customer_id?: number; + /** Billing address. */ + billing?: string; + /** Shipping address. */ + shipping?: string; + /** Payment method ID. */ + payment_method?: string; + /** Payment method title. */ + payment_method_title?: string; + /** Define if the order is paid. It will set the status to processing and reduce stock items. */ + set_paid?: boolean; + /** Unique transaction ID. */ + transaction_id?: string; + /** Note left by customer during checkout. */ + customer_note?: string; + /** Line items data. */ + line_items?: object[]; + /** Shipping lines data. */ + shipping_lines?: object[]; + /** Fee lines data. */ + fee_lines?: object[]; + /** Coupons line data. */ + coupon_lines?: object[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersBatchUpdate + * @request PUT:/wc/v1/orders/batch + * @secure + */ + v1OrdersBatchUpdate: ( + query?: { + /** + * Parent order ID. + * @format int64 + */ + parent_id?: number; + /** Order status. */ + status?: IV1OrdersBatchUpdateParamsStatusEnum[]; + /** Currency the order was created with, in ISO format. */ + currency?: IV1OrdersBatchUpdateParamsCurrencyEnum[]; + /** + * User ID who owns the order. 0 for guests. + * @format int64 + */ + customer_id?: number; + /** Billing address. */ + billing?: string; + /** Shipping address. */ + shipping?: string; + /** Payment method ID. */ + payment_method?: string; + /** Payment method title. */ + payment_method_title?: string; + /** Define if the order is paid. It will set the status to processing and reduce stock items. */ + set_paid?: boolean; + /** Unique transaction ID. */ + transaction_id?: string; + /** Note left by customer during checkout. */ + customer_note?: string; + /** Line items data. */ + line_items?: object[]; + /** Shipping lines data. */ + shipping_lines?: object[]; + /** Fee lines data. */ + fee_lines?: object[]; + /** Coupons line data. */ + coupon_lines?: object[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/batch`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V1OrdersBatchPartialUpdate + * @request PATCH:/wc/v1/orders/batch + * @secure + */ + v1OrdersBatchPartialUpdate: ( + query?: { + /** + * Parent order ID. + * @format int64 + */ + parent_id?: number; + /** Order status. */ + status?: IV1OrdersBatchPartialUpdateParamsStatusEnum[]; + /** Currency the order was created with, in ISO format. */ + currency?: IV1OrdersBatchPartialUpdateParamsCurrencyEnum[]; + /** + * User ID who owns the order. 0 for guests. + * @format int64 + */ + customer_id?: number; + /** Billing address. */ + billing?: string; + /** Shipping address. */ + shipping?: string; + /** Payment method ID. */ + payment_method?: string; + /** Payment method title. */ + payment_method_title?: string; + /** Define if the order is paid. It will set the status to processing and reduce stock items. */ + set_paid?: boolean; + /** Unique transaction ID. */ + transaction_id?: string; + /** Note left by customer during checkout. */ + customer_note?: string; + /** Line items data. */ + line_items?: object[]; + /** Shipping lines data. */ + shipping_lines?: object[]; + /** Fee lines data. */ + fee_lines?: object[]; + /** Coupons line data. */ + coupon_lines?: object[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/orders/batch`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesTermsList + * @request GET:/wc/v1/products/attributes/{attribute_id}/terms + * @secure + */ + v1ProductsAttributesTermsList: ( + attributeId: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1ProductsAttributesTermsListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -3383,9 +4321,9 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV3ProductsBrandsListParamsOrderEnum[]; + order?: IV1ProductsAttributesTermsListParamsOrderEnum[]; /** Sort collection by resource attribute. */ - orderby?: IV3ProductsBrandsListParamsOrderbyEnum[]; + orderby?: IV1ProductsAttributesTermsListParamsOrderbyEnum[]; /** Whether to hide resources not assigned to any products. */ hide_empty?: boolean; /** @@ -3404,7 +4342,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands`, + path: `/wc/v1/products/attributes/${attributeId}/terms`, method: "GET", query: query, secure: true, @@ -3416,11 +4354,703 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsCreate - * @request POST:/wc/v3/products/brands + * @name V1ProductsAttributesTermsCreate + * @request POST:/wc/v1/products/attributes/{attribute_id}/terms * @secure */ - v3ProductsBrandsCreate: ( + v1ProductsAttributesTermsCreate: ( + attributeId: number, + data: { + /** Name for the resource. */ + name: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** HTML description of the resource. */ + description?: string; + /** + * Menu order, used to custom sort the resource. + * @format int64 + */ + menu_order?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}/terms`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesDetail + * @request GET:/wc/v1/products/attributes/{attribute_id} + * @secure + */ + v1ProductsAttributesDetail: ( + attributeId: number, + query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1ProductsAttributesDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesCreate + * @request POST:/wc/v1/products/attributes/{attribute_id} + * @secure + */ + v1ProductsAttributesCreate: ( + attributeId: number, + data: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** Term name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** HTML description of the resource. */ + description?: string; + /** + * Menu order, used to custom sort the resource. + * @format int64 + */ + menu_order?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesUpdate + * @request PUT:/wc/v1/products/attributes/{attribute_id} + * @secure + */ + v1ProductsAttributesUpdate: ( + attributeId: number, + query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** Term name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** HTML description of the resource. */ + description?: string; + /** + * Menu order, used to custom sort the resource. + * @format int64 + */ + menu_order?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesPartialUpdate + * @request PATCH:/wc/v1/products/attributes/{attribute_id} + * @secure + */ + v1ProductsAttributesPartialUpdate: ( + attributeId: number, + query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** Term name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** HTML description of the resource. */ + description?: string; + /** + * Menu order, used to custom sort the resource. + * @format int64 + */ + menu_order?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesDelete + * @request DELETE:/wc/v1/products/attributes/{attribute_id} + * @secure + */ + v1ProductsAttributesDelete: ( + attributeId: number, + query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** Required to be true, as resource does not support trashing. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesTermsBatchCreate + * @request POST:/wc/v1/products/attributes/{attribute_id}/terms/batch + * @secure + */ + v1ProductsAttributesTermsBatchCreate: ( + attributeId: number, + data: { + /** Term name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** HTML description of the resource. */ + description?: string; + /** + * Menu order, used to custom sort the resource. + * @format int64 + */ + menu_order?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}/terms/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesTermsBatchUpdate + * @request PUT:/wc/v1/products/attributes/{attribute_id}/terms/batch + * @secure + */ + v1ProductsAttributesTermsBatchUpdate: ( + attributeId: number, + query?: { + /** Term name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** HTML description of the resource. */ + description?: string; + /** + * Menu order, used to custom sort the resource. + * @format int64 + */ + menu_order?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}/terms/batch`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesTermsBatchPartialUpdate + * @request PATCH:/wc/v1/products/attributes/{attribute_id}/terms/batch + * @secure + */ + v1ProductsAttributesTermsBatchPartialUpdate: ( + attributeId: number, + query?: { + /** Term name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** HTML description of the resource. */ + description?: string; + /** + * Menu order, used to custom sort the resource. + * @format int64 + */ + menu_order?: number; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${attributeId}/terms/batch`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesList + * @request GET:/wc/v1/products/attributes + * @secure + */ + v1ProductsAttributesList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1ProductsAttributesListParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesCreate2 + * @request POST:/wc/v1/products/attributes + * @originalName v1ProductsAttributesCreate + * @duplicate + * @secure + */ + v1ProductsAttributesCreate2: ( + data: { + /** Name for the resource. */ + name: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** Type of attribute. */ + type?: ITypeEnum[]; + /** Default sort order. */ + order_by?: IOrderByEnum[]; + /** Enable/Disable attribute archives. */ + has_archives?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesDetail2 + * @request GET:/wc/v1/products/attributes/{id} + * @originalName v1ProductsAttributesDetail + * @duplicate + * @secure + */ + v1ProductsAttributesDetail2: ( + id: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1ProductsAttributesDetail2ParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${id}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesCreate3 + * @request POST:/wc/v1/products/attributes/{id} + * @originalName v1ProductsAttributesCreate + * @duplicate + * @secure + */ + v1ProductsAttributesCreate3: ( + id: number, + data: { + /** Attribute name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** Type of attribute. */ + type?: ITypeEnum1[]; + /** Default sort order. */ + order_by?: IOrderByEnum1[]; + /** Enable/Disable attribute archives. */ + has_archives?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${id}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesUpdate2 + * @request PUT:/wc/v1/products/attributes/{id} + * @originalName v1ProductsAttributesUpdate + * @duplicate + * @secure + */ + v1ProductsAttributesUpdate2: ( + id: number, + query?: { + /** Attribute name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** Type of attribute. */ + type?: IV1ProductsAttributesUpdate2ParamsTypeEnum[]; + /** Default sort order. */ + order_by?: IV1ProductsAttributesUpdate2ParamsOrderByEnum[]; + /** Enable/Disable attribute archives. */ + has_archives?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${id}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesPartialUpdate2 + * @request PATCH:/wc/v1/products/attributes/{id} + * @originalName v1ProductsAttributesPartialUpdate + * @duplicate + * @secure + */ + v1ProductsAttributesPartialUpdate2: ( + id: number, + query?: { + /** Attribute name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** Type of attribute. */ + type?: IV1ProductsAttributesPartialUpdate2ParamsTypeEnum[]; + /** Default sort order. */ + order_by?: IV1ProductsAttributesPartialUpdate2ParamsOrderByEnum[]; + /** Enable/Disable attribute archives. */ + has_archives?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${id}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesDelete2 + * @request DELETE:/wc/v1/products/attributes/{id} + * @originalName v1ProductsAttributesDelete + * @duplicate + * @secure + */ + v1ProductsAttributesDelete2: ( + id: number, + query?: { + /** Required to be true, as resource does not support trashing. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/${id}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesBatchCreate + * @request POST:/wc/v1/products/attributes/batch + * @secure + */ + v1ProductsAttributesBatchCreate: ( + data: { + /** Attribute name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** Type of attribute. */ + type?: ITypeEnum2[]; + /** Default sort order. */ + order_by?: IOrderByEnum2[]; + /** Enable/Disable attribute archives. */ + has_archives?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesBatchUpdate + * @request PUT:/wc/v1/products/attributes/batch + * @secure + */ + v1ProductsAttributesBatchUpdate: ( + query?: { + /** Attribute name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** Type of attribute. */ + type?: IV1ProductsAttributesBatchUpdateParamsTypeEnum[]; + /** Default sort order. */ + order_by?: IV1ProductsAttributesBatchUpdateParamsOrderByEnum[]; + /** Enable/Disable attribute archives. */ + has_archives?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/batch`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsAttributesBatchPartialUpdate + * @request PATCH:/wc/v1/products/attributes/batch + * @secure + */ + v1ProductsAttributesBatchPartialUpdate: ( + query?: { + /** Attribute name. */ + name?: string; + /** An alphanumeric identifier for the resource unique to its type. */ + slug?: string; + /** Type of attribute. */ + type?: IV1ProductsAttributesBatchPartialUpdateParamsTypeEnum[]; + /** Default sort order. */ + order_by?: IV1ProductsAttributesBatchPartialUpdateParamsOrderByEnum[]; + /** Enable/Disable attribute archives. */ + has_archives?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/attributes/batch`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsCategoriesList + * @request GET:/wc/v1/products/categories + * @secure + */ + v1ProductsCategoriesList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1ProductsCategoriesListParamsContextEnum[]; + /** + * Current page of the collection. + * @format int64 + * @min 1 + */ + page?: number; + /** + * Maximum number of items to be returned in result set. + * @format int64 + * @min 1 + * @max 100 + */ + per_page?: number; + /** Limit results to those matching a string. */ + search?: string; + /** Ensure result set excludes specific IDs. */ + exclude?: number[]; + /** Limit result set to specific ids. */ + include?: number[]; + /** + * Offset the result set by a specific number of items. Applies to hierarchical taxonomies only. + * @format int64 + */ + offset?: number; + /** Order sort attribute ascending or descending. */ + order?: IV1ProductsCategoriesListParamsOrderEnum[]; + /** Sort collection by resource attribute. */ + orderby?: IV1ProductsCategoriesListParamsOrderbyEnum[]; + /** Whether to hide resources not assigned to any products. */ + hide_empty?: boolean; + /** + * Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only. + * @format int64 + */ + parent?: number; + /** + * Limit result set to resources assigned to a specific product. + * @format int64 + */ + product?: number; + /** Limit result set to resources with a specific slug. */ + slug?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/categories`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsCategoriesCreate + * @request POST:/wc/v1/products/categories + * @secure + */ + v1ProductsCategoriesCreate: ( data: { /** Name for the resource. */ name: string; @@ -3446,7 +5076,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands`, + path: `/wc/v1/products/categories`, method: "POST", body: data, secure: true, @@ -3458,20 +5088,20 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsDetail - * @request GET:/wc/v3/products/brands/{id} + * @name V1ProductsCategoriesDetail + * @request GET:/wc/v1/products/categories/{id} * @secure */ - v3ProductsBrandsDetail: ( + v1ProductsCategoriesDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsBrandsDetailParamsContextEnum[]; + context?: IV1ProductsCategoriesDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/${id}`, + path: `/wc/v1/products/categories/${id}`, method: "GET", query: query, secure: true, @@ -3483,13 +5113,13 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsCreate2 - * @request POST:/wc/v3/products/brands/{id} - * @originalName v3ProductsBrandsCreate + * @name V1ProductsCategoriesCreate2 + * @request POST:/wc/v1/products/categories/{id} + * @originalName v1ProductsCategoriesCreate * @duplicate * @secure */ - v3ProductsBrandsCreate2: ( + v1ProductsCategoriesCreate2: ( id: number, data: { /** Category name. */ @@ -3516,7 +5146,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/${id}`, + path: `/wc/v1/products/categories/${id}`, method: "POST", body: data, secure: true, @@ -3528,11 +5158,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsUpdate - * @request PUT:/wc/v3/products/brands/{id} + * @name V1ProductsCategoriesUpdate + * @request PUT:/wc/v1/products/categories/{id} * @secure */ - v3ProductsBrandsUpdate: ( + v1ProductsCategoriesUpdate: ( id: number, query?: { /** Category name. */ @@ -3547,7 +5177,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV3ProductsBrandsUpdateParamsDisplayEnum[]; + display?: IV1ProductsCategoriesUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -3559,7 +5189,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/${id}`, + path: `/wc/v1/products/categories/${id}`, method: "PUT", query: query, secure: true, @@ -3571,11 +5201,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsPartialUpdate - * @request PATCH:/wc/v3/products/brands/{id} + * @name V1ProductsCategoriesPartialUpdate + * @request PATCH:/wc/v1/products/categories/{id} * @secure */ - v3ProductsBrandsPartialUpdate: ( + v1ProductsCategoriesPartialUpdate: ( id: number, query?: { /** Category name. */ @@ -3590,7 +5220,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV3ProductsBrandsPartialUpdateParamsDisplayEnum[]; + display?: IV1ProductsCategoriesPartialUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -3602,7 +5232,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/${id}`, + path: `/wc/v1/products/categories/${id}`, method: "PATCH", query: query, secure: true, @@ -3614,11 +5244,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsDelete - * @request DELETE:/wc/v3/products/brands/{id} + * @name V1ProductsCategoriesDelete + * @request DELETE:/wc/v1/products/categories/{id} * @secure */ - v3ProductsBrandsDelete: ( + v1ProductsCategoriesDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -3627,7 +5257,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/${id}`, + path: `/wc/v1/products/categories/${id}`, method: "DELETE", query: query, secure: true, @@ -3639,11 +5269,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsBatchCreate - * @request POST:/wc/v3/products/brands/batch + * @name V1ProductsCategoriesBatchCreate + * @request POST:/wc/v1/products/categories/batch * @secure */ - v3ProductsBrandsBatchCreate: ( + v1ProductsCategoriesBatchCreate: ( data: { /** Category name. */ name?: string; @@ -3669,7 +5299,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/batch`, + path: `/wc/v1/products/categories/batch`, method: "POST", body: data, secure: true, @@ -3681,11 +5311,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsBatchUpdate - * @request PUT:/wc/v3/products/brands/batch + * @name V1ProductsCategoriesBatchUpdate + * @request PUT:/wc/v1/products/categories/batch * @secure */ - v3ProductsBrandsBatchUpdate: ( + v1ProductsCategoriesBatchUpdate: ( query?: { /** Category name. */ name?: string; @@ -3699,7 +5329,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV3ProductsBrandsBatchUpdateParamsDisplayEnum[]; + display?: IV1ProductsCategoriesBatchUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -3711,7 +5341,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/batch`, + path: `/wc/v1/products/categories/batch`, method: "PUT", query: query, secure: true, @@ -3723,11 +5353,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsBrandsBatchPartialUpdate - * @request PATCH:/wc/v3/products/brands/batch + * @name V1ProductsCategoriesBatchPartialUpdate + * @request PATCH:/wc/v1/products/categories/batch * @secure */ - v3ProductsBrandsBatchPartialUpdate: ( + v1ProductsCategoriesBatchPartialUpdate: ( query?: { /** Category name. */ name?: string; @@ -3741,7 +5371,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV3ProductsBrandsBatchPartialUpdateParamsDisplayEnum[]; + display?: IV1ProductsCategoriesBatchPartialUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -3753,7 +5383,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/brands/batch`, + path: `/wc/v1/products/categories/batch`, method: "PATCH", query: query, secure: true, @@ -3764,1193 +5394,26 @@ export class Api< /** * No description * - * @tags coupons - * @name V3CouponsList - * @request GET:/wc/v3/coupons + * @tags products + * @name V1ProductsReviewsList + * @request GET:/wc/v1/products/{product_id}/reviews * @secure */ - v3CouponsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3CouponsListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** - * Limit response to resources published after a given ISO8601 compliant date. - * @format date-time - */ - after?: string; - /** - * Limit response to resources published before a given ISO8601 compliant date. - * @format date-time - */ - before?: string; - /** - * Limit response to resources modified after a given ISO8601 compliant date. - * @format date-time - */ - modified_after?: string; - /** - * Limit response to resources modified before a given ISO8601 compliant date. - * @format date-time - */ - modified_before?: string; - /** Whether to consider GMT post dates when limiting response by published or modified date. */ - dates_are_gmt?: boolean; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3CouponsListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3CouponsListParamsOrderbyEnum[]; - /** Limit result set to resources with a specific code. */ - code?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsCreate - * @request POST:/wc/v3/coupons - * @secure - */ - v3CouponsCreate: ( - data: { - /** Coupon code. */ - code: string; - /** The amount of discount. Should always be numeric, even if setting a percentage. */ - amount?: string; - /** The status of the coupon. Should always be draft, published, or pending review */ - status?: string; - /** Determines the type of discount that will be applied. */ - discount_type?: IDiscountTypeEnum[]; - /** Coupon description. */ - description?: string; - /** The date the coupon expires, in the site's timezone. */ - date_expires?: null; - /** The date the coupon expires, as GMT. */ - date_expires_gmt?: null; - /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ - individual_use?: boolean; - /** List of product IDs the coupon can be used on. */ - product_ids?: number[]; - /** List of product IDs the coupon cannot be used on. */ - excluded_product_ids?: number[]; - /** - * How many times the coupon can be used in total. - * @format int64 - */ - usage_limit?: number; - /** - * How many times the coupon can be used per customer. - * @format int64 - */ - usage_limit_per_user?: number; - /** - * Max number of items in the cart the coupon can be applied to. - * @format int64 - */ - limit_usage_to_x_items?: number; - /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ - free_shipping?: boolean; - /** List of category IDs the coupon applies to. */ - product_categories?: number[]; - /** List of category IDs the coupon does not apply to. */ - excluded_product_categories?: number[]; - /** If true, this coupon will not be applied to items that have sale prices. */ - exclude_sale_items?: boolean; - /** Minimum order amount that needs to be in the cart before coupon applies. */ - minimum_amount?: string; - /** Maximum order amount allowed when using the coupon. */ - maximum_amount?: string; - /** List of email addresses that can use this coupon. */ - email_restrictions?: string[]; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsDetail - * @request GET:/wc/v3/coupons/{id} - * @secure - */ - v3CouponsDetail: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3CouponsDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsCreate2 - * @request POST:/wc/v3/coupons/{id} - * @originalName v3CouponsCreate - * @duplicate - * @secure - */ - v3CouponsCreate2: ( - id: number, - data: { - /** Coupon code. */ - code?: string; - /** The amount of discount. Should always be numeric, even if setting a percentage. */ - amount?: string; - /** The status of the coupon. Should always be draft, published, or pending review */ - status?: string; - /** Determines the type of discount that will be applied. */ - discount_type?: IDiscountTypeEnum1[]; - /** Coupon description. */ - description?: string; - /** The date the coupon expires, in the site's timezone. */ - date_expires?: null; - /** The date the coupon expires, as GMT. */ - date_expires_gmt?: null; - /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ - individual_use?: boolean; - /** List of product IDs the coupon can be used on. */ - product_ids?: number[]; - /** List of product IDs the coupon cannot be used on. */ - excluded_product_ids?: number[]; - /** - * How many times the coupon can be used in total. - * @format int64 - */ - usage_limit?: number; - /** - * How many times the coupon can be used per customer. - * @format int64 - */ - usage_limit_per_user?: number; - /** - * Max number of items in the cart the coupon can be applied to. - * @format int64 - */ - limit_usage_to_x_items?: number; - /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ - free_shipping?: boolean; - /** List of category IDs the coupon applies to. */ - product_categories?: number[]; - /** List of category IDs the coupon does not apply to. */ - excluded_product_categories?: number[]; - /** If true, this coupon will not be applied to items that have sale prices. */ - exclude_sale_items?: boolean; - /** Minimum order amount that needs to be in the cart before coupon applies. */ - minimum_amount?: string; - /** Maximum order amount allowed when using the coupon. */ - maximum_amount?: string; - /** List of email addresses that can use this coupon. */ - email_restrictions?: string[]; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsUpdate - * @request PUT:/wc/v3/coupons/{id} - * @secure - */ - v3CouponsUpdate: ( - id: number, - query?: { - /** Coupon code. */ - code?: string; - /** The amount of discount. Should always be numeric, even if setting a percentage. */ - amount?: string; - /** The status of the coupon. Should always be draft, published, or pending review */ - status?: string; - /** Determines the type of discount that will be applied. */ - discount_type?: IV3CouponsUpdateParamsDiscountTypeEnum[]; - /** Coupon description. */ - description?: string; - /** The date the coupon expires, in the site's timezone. */ - date_expires?: any; - /** The date the coupon expires, as GMT. */ - date_expires_gmt?: any; - /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ - individual_use?: boolean; - /** List of product IDs the coupon can be used on. */ - product_ids?: number[]; - /** List of product IDs the coupon cannot be used on. */ - excluded_product_ids?: number[]; - /** - * How many times the coupon can be used in total. - * @format int64 - */ - usage_limit?: number; - /** - * How many times the coupon can be used per customer. - * @format int64 - */ - usage_limit_per_user?: number; - /** - * Max number of items in the cart the coupon can be applied to. - * @format int64 - */ - limit_usage_to_x_items?: number; - /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ - free_shipping?: boolean; - /** List of category IDs the coupon applies to. */ - product_categories?: number[]; - /** List of category IDs the coupon does not apply to. */ - excluded_product_categories?: number[]; - /** If true, this coupon will not be applied to items that have sale prices. */ - exclude_sale_items?: boolean; - /** Minimum order amount that needs to be in the cart before coupon applies. */ - minimum_amount?: string; - /** Maximum order amount allowed when using the coupon. */ - maximum_amount?: string; - /** List of email addresses that can use this coupon. */ - email_restrictions?: string[]; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsPartialUpdate - * @request PATCH:/wc/v3/coupons/{id} - * @secure - */ - v3CouponsPartialUpdate: ( - id: number, - query?: { - /** Coupon code. */ - code?: string; - /** The amount of discount. Should always be numeric, even if setting a percentage. */ - amount?: string; - /** The status of the coupon. Should always be draft, published, or pending review */ - status?: string; - /** Determines the type of discount that will be applied. */ - discount_type?: IV3CouponsPartialUpdateParamsDiscountTypeEnum[]; - /** Coupon description. */ - description?: string; - /** The date the coupon expires, in the site's timezone. */ - date_expires?: any; - /** The date the coupon expires, as GMT. */ - date_expires_gmt?: any; - /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ - individual_use?: boolean; - /** List of product IDs the coupon can be used on. */ - product_ids?: number[]; - /** List of product IDs the coupon cannot be used on. */ - excluded_product_ids?: number[]; - /** - * How many times the coupon can be used in total. - * @format int64 - */ - usage_limit?: number; - /** - * How many times the coupon can be used per customer. - * @format int64 - */ - usage_limit_per_user?: number; - /** - * Max number of items in the cart the coupon can be applied to. - * @format int64 - */ - limit_usage_to_x_items?: number; - /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ - free_shipping?: boolean; - /** List of category IDs the coupon applies to. */ - product_categories?: number[]; - /** List of category IDs the coupon does not apply to. */ - excluded_product_categories?: number[]; - /** If true, this coupon will not be applied to items that have sale prices. */ - exclude_sale_items?: boolean; - /** Minimum order amount that needs to be in the cart before coupon applies. */ - minimum_amount?: string; - /** Maximum order amount allowed when using the coupon. */ - maximum_amount?: string; - /** List of email addresses that can use this coupon. */ - email_restrictions?: string[]; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsDelete - * @request DELETE:/wc/v3/coupons/{id} - * @secure - */ - v3CouponsDelete: ( - id: number, - query?: { - /** Whether to bypass trash and force deletion. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsBatchCreate - * @request POST:/wc/v3/coupons/batch - * @secure - */ - v3CouponsBatchCreate: ( - data: { - /** Coupon code. */ - code?: string; - /** The amount of discount. Should always be numeric, even if setting a percentage. */ - amount?: string; - /** The status of the coupon. Should always be draft, published, or pending review */ - status?: string; - /** Determines the type of discount that will be applied. */ - discount_type?: IDiscountTypeEnum2[]; - /** Coupon description. */ - description?: string; - /** The date the coupon expires, in the site's timezone. */ - date_expires?: null; - /** The date the coupon expires, as GMT. */ - date_expires_gmt?: null; - /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ - individual_use?: boolean; - /** List of product IDs the coupon can be used on. */ - product_ids?: number[]; - /** List of product IDs the coupon cannot be used on. */ - excluded_product_ids?: number[]; - /** - * How many times the coupon can be used in total. - * @format int64 - */ - usage_limit?: number; - /** - * How many times the coupon can be used per customer. - * @format int64 - */ - usage_limit_per_user?: number; - /** - * Max number of items in the cart the coupon can be applied to. - * @format int64 - */ - limit_usage_to_x_items?: number; - /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ - free_shipping?: boolean; - /** List of category IDs the coupon applies to. */ - product_categories?: number[]; - /** List of category IDs the coupon does not apply to. */ - excluded_product_categories?: number[]; - /** If true, this coupon will not be applied to items that have sale prices. */ - exclude_sale_items?: boolean; - /** Minimum order amount that needs to be in the cart before coupon applies. */ - minimum_amount?: string; - /** Maximum order amount allowed when using the coupon. */ - maximum_amount?: string; - /** List of email addresses that can use this coupon. */ - email_restrictions?: string[]; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsBatchUpdate - * @request PUT:/wc/v3/coupons/batch - * @secure - */ - v3CouponsBatchUpdate: ( - query?: { - /** Coupon code. */ - code?: string; - /** The amount of discount. Should always be numeric, even if setting a percentage. */ - amount?: string; - /** The status of the coupon. Should always be draft, published, or pending review */ - status?: string; - /** Determines the type of discount that will be applied. */ - discount_type?: IV3CouponsBatchUpdateParamsDiscountTypeEnum[]; - /** Coupon description. */ - description?: string; - /** The date the coupon expires, in the site's timezone. */ - date_expires?: any; - /** The date the coupon expires, as GMT. */ - date_expires_gmt?: any; - /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ - individual_use?: boolean; - /** List of product IDs the coupon can be used on. */ - product_ids?: number[]; - /** List of product IDs the coupon cannot be used on. */ - excluded_product_ids?: number[]; - /** - * How many times the coupon can be used in total. - * @format int64 - */ - usage_limit?: number; - /** - * How many times the coupon can be used per customer. - * @format int64 - */ - usage_limit_per_user?: number; - /** - * Max number of items in the cart the coupon can be applied to. - * @format int64 - */ - limit_usage_to_x_items?: number; - /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ - free_shipping?: boolean; - /** List of category IDs the coupon applies to. */ - product_categories?: number[]; - /** List of category IDs the coupon does not apply to. */ - excluded_product_categories?: number[]; - /** If true, this coupon will not be applied to items that have sale prices. */ - exclude_sale_items?: boolean; - /** Minimum order amount that needs to be in the cart before coupon applies. */ - minimum_amount?: string; - /** Maximum order amount allowed when using the coupon. */ - maximum_amount?: string; - /** List of email addresses that can use this coupon. */ - email_restrictions?: string[]; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags coupons - * @name V3CouponsBatchPartialUpdate - * @request PATCH:/wc/v3/coupons/batch - * @secure - */ - v3CouponsBatchPartialUpdate: ( - query?: { - /** Coupon code. */ - code?: string; - /** The amount of discount. Should always be numeric, even if setting a percentage. */ - amount?: string; - /** The status of the coupon. Should always be draft, published, or pending review */ - status?: string; - /** Determines the type of discount that will be applied. */ - discount_type?: IV3CouponsBatchPartialUpdateParamsDiscountTypeEnum[]; - /** Coupon description. */ - description?: string; - /** The date the coupon expires, in the site's timezone. */ - date_expires?: any; - /** The date the coupon expires, as GMT. */ - date_expires_gmt?: any; - /** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */ - individual_use?: boolean; - /** List of product IDs the coupon can be used on. */ - product_ids?: number[]; - /** List of product IDs the coupon cannot be used on. */ - excluded_product_ids?: number[]; - /** - * How many times the coupon can be used in total. - * @format int64 - */ - usage_limit?: number; - /** - * How many times the coupon can be used per customer. - * @format int64 - */ - usage_limit_per_user?: number; - /** - * Max number of items in the cart the coupon can be applied to. - * @format int64 - */ - limit_usage_to_x_items?: number; - /** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */ - free_shipping?: boolean; - /** List of category IDs the coupon applies to. */ - product_categories?: number[]; - /** List of category IDs the coupon does not apply to. */ - excluded_product_categories?: number[]; - /** If true, this coupon will not be applied to items that have sale prices. */ - exclude_sale_items?: boolean; - /** Minimum order amount that needs to be in the cart before coupon applies. */ - minimum_amount?: string; - /** Maximum order amount allowed when using the coupon. */ - maximum_amount?: string; - /** List of email addresses that can use this coupon. */ - email_restrictions?: string[]; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/coupons/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersDownloadsList - * @request GET:/wc/v3/customers/{customer_id}/downloads - * @secure - */ - v3CustomersDownloadsList: ( - customerId: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3CustomersDownloadsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/${customerId}/downloads`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersList - * @request GET:/wc/v3/customers - * @secure - */ - v3CustomersList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3CustomersListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific IDs. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3CustomersListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3CustomersListParamsOrderbyEnum[]; - /** - * Limit result set to resources with a specific email. - * @format email - */ - email?: string; - /** Limit result set to resources with a specific role. */ - role?: IV3CustomersListParamsRoleEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersCreate - * @request POST:/wc/v3/customers - * @secure - */ - v3CustomersCreate: ( - data: { - /** New user email address. */ - email: string; - /** Customer first name. */ - first_name?: string; - /** Customer last name. */ - last_name?: string; - /** New user username. */ - username?: string; - /** New user password. */ - password?: string; - /** List of billing address data. */ - billing?: string; - /** List of shipping address data. */ - shipping?: string; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersDetail - * @request GET:/wc/v3/customers/{id} - * @secure - */ - v3CustomersDetail: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3CustomersDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersCreate2 - * @request POST:/wc/v3/customers/{id} - * @originalName v3CustomersCreate - * @duplicate - * @secure - */ - v3CustomersCreate2: ( - id: number, - data: { - /** - * The email address for the customer. - * @format email - */ - email?: string; - /** Customer first name. */ - first_name?: string; - /** Customer last name. */ - last_name?: string; - /** Customer login name. */ - username?: string; - /** Customer password. */ - password?: string; - /** List of billing address data. */ - billing?: string; - /** List of shipping address data. */ - shipping?: string; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersUpdate - * @request PUT:/wc/v3/customers/{id} - * @secure - */ - v3CustomersUpdate: ( - id: number, + v1ProductsReviewsList: ( + productId: number, query?: { /** - * The email address for the customer. - * @format email - */ - email?: string; - /** Customer first name. */ - first_name?: string; - /** Customer last name. */ - last_name?: string; - /** Customer login name. */ - username?: string; - /** Customer password. */ - password?: string; - /** List of billing address data. */ - billing?: string; - /** List of shipping address data. */ - shipping?: string; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersPartialUpdate - * @request PATCH:/wc/v3/customers/{id} - * @secure - */ - v3CustomersPartialUpdate: ( - id: number, - query?: { - /** - * The email address for the customer. - * @format email - */ - email?: string; - /** Customer first name. */ - first_name?: string; - /** Customer last name. */ - last_name?: string; - /** Customer login name. */ - username?: string; - /** Customer password. */ - password?: string; - /** List of billing address data. */ - billing?: string; - /** List of shipping address data. */ - shipping?: string; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersDelete - * @request DELETE:/wc/v3/customers/{id} - * @secure - */ - v3CustomersDelete: ( - id: number, - query?: { - /** Required to be true, as resource does not support trashing. */ - force?: boolean; - /** - * ID to reassign posts to. - * @format int64 - */ - reassign?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersBatchCreate - * @request POST:/wc/v3/customers/batch - * @secure - */ - v3CustomersBatchCreate: ( - data: { - /** - * The email address for the customer. - * @format email - */ - email?: string; - /** Customer first name. */ - first_name?: string; - /** Customer last name. */ - last_name?: string; - /** Customer login name. */ - username?: string; - /** Customer password. */ - password?: string; - /** List of billing address data. */ - billing?: string; - /** List of shipping address data. */ - shipping?: string; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersBatchUpdate - * @request PUT:/wc/v3/customers/batch - * @secure - */ - v3CustomersBatchUpdate: ( - query?: { - /** - * The email address for the customer. - * @format email - */ - email?: string; - /** Customer first name. */ - first_name?: string; - /** Customer last name. */ - last_name?: string; - /** Customer login name. */ - username?: string; - /** Customer password. */ - password?: string; - /** List of billing address data. */ - billing?: string; - /** List of shipping address data. */ - shipping?: string; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags customers - * @name V3CustomersBatchPartialUpdate - * @request PATCH:/wc/v3/customers/batch - * @secure - */ - v3CustomersBatchPartialUpdate: ( - query?: { - /** - * The email address for the customer. - * @format email - */ - email?: string; - /** Customer first name. */ - first_name?: string; - /** Customer last name. */ - last_name?: string; - /** Customer login name. */ - username?: string; - /** Customer password. */ - password?: string; - /** List of billing address data. */ - billing?: string; - /** List of shipping address data. */ - shipping?: string; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/customers/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags layout-templates - * @name V3LayoutTemplatesList - * @request GET:/wc/v3/layout-templates - * @secure - */ - v3LayoutTemplatesList: ( - query?: { - /** Area to get templates for. */ - area?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/layout-templates`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags layout-templates - * @name V3LayoutTemplatesDetail - * @request GET:/wc/v3/layout-templates/{id} - * @secure - */ - v3LayoutTemplatesDetail: (id: string, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/layout-templates/${id}`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersNotesList - * @request GET:/wc/v3/orders/{order_id}/notes - * @secure - */ - v3OrdersNotesList: ( - orderId: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3OrdersNotesListParamsContextEnum[]; - /** Limit result to customers or internal notes. */ - type?: IV3OrdersNotesListParamsTypeEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${orderId}/notes`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersNotesCreate - * @request POST:/wc/v3/orders/{order_id}/notes - * @secure - */ - v3OrdersNotesCreate: ( - orderId: number, - data: { - /** Order note content. */ - note: string; - /** If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only. */ - customer_note?: boolean; - /** If true, this note will be attributed to the current user. If false, the note will be attributed to the system. */ - added_by_user?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${orderId}/notes`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersDetail - * @request GET:/wc/v3/orders/{order_id} - * @secure - */ - v3OrdersDetail: ( - orderId: number, - query?: { - /** - * Unique identifier for the resource. + * Unique identifier for the variation. * @format int64 */ id?: number; /** Scope under which the request is made; determines fields present in response. */ - context?: IV3OrdersDetailParamsContextEnum[]; + context?: IV1ProductsReviewsListParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/orders/${orderId}`, + path: `/wc/v1/products/${productId}/reviews`, method: "GET", query: query, secure: true, @@ -4961,2107 +5424,37 @@ export class Api< /** * No description * - * @tags orders - * @name V3OrdersDelete - * @request DELETE:/wc/v3/orders/{order_id} + * @tags products + * @name V1ProductsReviewsCreate + * @request POST:/wc/v1/products/{product_id}/reviews * @secure */ - v3OrdersDelete: ( - orderId: number, - query?: { + v1ProductsReviewsCreate: ( + productId: number, + data: { /** - * Unique identifier for the resource. + * Unique identifier for the variation. * @format int64 */ id?: number; - /** Required to be true, as resource does not support trashing. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${orderId}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersRefundsList - * @request GET:/wc/v3/orders/{order_id}/refunds - * @secure - */ - v3OrdersRefundsList: ( - orderId: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3OrdersRefundsListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** - * Limit response to resources published after a given ISO8601 compliant date. - * @format date-time - */ - after?: string; - /** - * Limit response to resources published before a given ISO8601 compliant date. - * @format date-time - */ - before?: string; - /** - * Limit response to resources modified after a given ISO8601 compliant date. - * @format date-time - */ - modified_after?: string; - /** - * Limit response to resources modified before a given ISO8601 compliant date. - * @format date-time - */ - modified_before?: string; - /** Whether to consider GMT post dates when limiting response by published or modified date. */ - dates_are_gmt?: boolean; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3OrdersRefundsListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3OrdersRefundsListParamsOrderbyEnum[]; - /** Limit result set to those of particular parent IDs. */ - parent?: number[]; - /** Limit result set to all items except those of a particular parent ID. */ - parent_exclude?: number[]; - /** - * Number of decimal points to use in each resource. - * @format int64 - */ - dp?: number; - /** Only show meta which is meant to be displayed for an order. */ - order_item_display_meta?: boolean; - /** Limit meta_data to specific keys. */ - include_meta?: string[]; - /** Ensure meta_data excludes specific keys. */ - exclude_meta?: string[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${orderId}/refunds`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersRefundsCreate - * @request POST:/wc/v3/orders/{order_id}/refunds - * @secure - */ - v3OrdersRefundsCreate: ( - orderId: number, - data: { - /** Refund amount. */ - amount?: string; - /** Reason for refund. */ - reason?: string; - /** - * User ID of user who created the refund. - * @format int64 - */ - refunded_by?: number; - /** Meta data. */ - meta_data?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** When true, the payment gateway API is used to generate the refund. */ - api_refund?: boolean; - /** When true, refunded items are restocked. */ - api_restock?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${orderId}/refunds`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersList - * @request GET:/wc/v3/orders - * @secure - */ - v3OrdersList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3OrdersListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** - * Limit response to resources published after a given ISO8601 compliant date. - * @format date-time - */ - after?: string; - /** - * Limit response to resources published before a given ISO8601 compliant date. - * @format date-time - */ - before?: string; - /** - * Limit response to resources modified after a given ISO8601 compliant date. - * @format date-time - */ - modified_after?: string; - /** - * Limit response to resources modified before a given ISO8601 compliant date. - * @format date-time - */ - modified_before?: string; - /** Whether to consider GMT post dates when limiting response by published or modified date. */ - dates_are_gmt?: boolean; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3OrdersListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3OrdersListParamsOrderbyEnum[]; - /** Limit result set to those of particular parent IDs. */ - parent?: number[]; - /** Limit result set to all items except those of a particular parent ID. */ - parent_exclude?: number[]; - /** Limit result set to orders which have specific statuses. */ - status?: string[]; - /** - * Limit result set to orders assigned a specific customer. - * @format int64 - */ - customer?: number; - /** - * Limit result set to orders assigned a specific product. - * @format int64 - */ - product?: number; - /** - * Number of decimal points to use in each resource. - * @format int64 - */ - dp?: number; - /** Only show meta which is meant to be displayed for an order. */ - order_item_display_meta?: boolean; - /** Limit meta_data to specific keys. */ - include_meta?: string[]; - /** Ensure meta_data excludes specific keys. */ - exclude_meta?: string[]; - /** Limit result set to orders created via specific sources (e.g. checkout, admin). */ - created_via?: string[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersCreate - * @request POST:/wc/v3/orders - * @secure - */ - v3OrdersCreate: ( - data: { - /** - * Parent order ID. - * @format int64 - */ - parent_id?: number; - /** Shows where the order was created. */ - created_via?: string; - /** Order status. */ - status?: IStatusEnum[]; - /** Currency the order was created with, in ISO format. */ - currency?: ICurrencyEnum[]; - /** - * User ID who owns the order. 0 for guests. - * @format int64 - */ - customer_id?: number; - /** Note left by customer during checkout. */ - customer_note?: string; - /** Billing address. */ - billing?: string; - /** Shipping address. */ - shipping?: string; - /** Payment method ID. */ - payment_method?: string; - /** Payment method title. */ - payment_method_title?: string; - /** Unique transaction ID. */ - transaction_id?: string; - /** Meta data. */ - meta_data?: object[]; - /** Line items data. */ - line_items?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** Coupons line data. */ - coupon_lines?: object[]; - /** Define if the order is paid. It will set the status to processing and reduce stock items. */ - set_paid?: boolean; - /** Set the action as manual so that the order note registers as "added by user". */ - manual_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersDetail2 - * @request GET:/wc/v3/orders/{id} - * @originalName v3OrdersDetail - * @duplicate - * @secure - */ - v3OrdersDetail2: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3OrdersDetail2ParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersCreate2 - * @request POST:/wc/v3/orders/{id} - * @originalName v3OrdersCreate - * @duplicate - * @secure - */ - v3OrdersCreate2: ( - id: number, - data: { - /** - * Parent order ID. - * @format int64 - */ - parent_id?: number; - /** Shows where the order was created. */ - created_via?: string; - /** Order status. */ - status?: IStatusEnum1[]; - /** Currency the order was created with, in ISO format. */ - currency?: ICurrencyEnum1[]; - /** - * User ID who owns the order. 0 for guests. - * @format int64 - */ - customer_id?: number; - /** Note left by customer during checkout. */ - customer_note?: string; - /** Billing address. */ - billing?: string; - /** Shipping address. */ - shipping?: string; - /** Payment method ID. */ - payment_method?: string; - /** Payment method title. */ - payment_method_title?: string; - /** Unique transaction ID. */ - transaction_id?: string; - /** Meta data. */ - meta_data?: object[]; - /** Line items data. */ - line_items?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** Coupons line data. */ - coupon_lines?: object[]; - /** Define if the order is paid. It will set the status to processing and reduce stock items. */ - set_paid?: boolean; - /** Set the action as manual so that the order note registers as "added by user". */ - manual_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersUpdate - * @request PUT:/wc/v3/orders/{id} - * @secure - */ - v3OrdersUpdate: ( - id: number, - query?: { - /** - * Parent order ID. - * @format int64 - */ - parent_id?: number; - /** Shows where the order was created. */ - created_via?: string; - /** Order status. */ - status?: IV3OrdersUpdateParamsStatusEnum[]; - /** Currency the order was created with, in ISO format. */ - currency?: IV3OrdersUpdateParamsCurrencyEnum[]; - /** - * User ID who owns the order. 0 for guests. - * @format int64 - */ - customer_id?: number; - /** Note left by customer during checkout. */ - customer_note?: string; - /** Billing address. */ - billing?: string; - /** Shipping address. */ - shipping?: string; - /** Payment method ID. */ - payment_method?: string; - /** Payment method title. */ - payment_method_title?: string; - /** Unique transaction ID. */ - transaction_id?: string; - /** Meta data. */ - meta_data?: object[]; - /** Line items data. */ - line_items?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** Coupons line data. */ - coupon_lines?: object[]; - /** Define if the order is paid. It will set the status to processing and reduce stock items. */ - set_paid?: boolean; - /** Set the action as manual so that the order note registers as "added by user". */ - manual_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersPartialUpdate - * @request PATCH:/wc/v3/orders/{id} - * @secure - */ - v3OrdersPartialUpdate: ( - id: number, - query?: { - /** - * Parent order ID. - * @format int64 - */ - parent_id?: number; - /** Shows where the order was created. */ - created_via?: string; - /** Order status. */ - status?: IV3OrdersPartialUpdateParamsStatusEnum[]; - /** Currency the order was created with, in ISO format. */ - currency?: IV3OrdersPartialUpdateParamsCurrencyEnum[]; - /** - * User ID who owns the order. 0 for guests. - * @format int64 - */ - customer_id?: number; - /** Note left by customer during checkout. */ - customer_note?: string; - /** Billing address. */ - billing?: string; - /** Shipping address. */ - shipping?: string; - /** Payment method ID. */ - payment_method?: string; - /** Payment method title. */ - payment_method_title?: string; - /** Unique transaction ID. */ - transaction_id?: string; - /** Meta data. */ - meta_data?: object[]; - /** Line items data. */ - line_items?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** Coupons line data. */ - coupon_lines?: object[]; - /** Define if the order is paid. It will set the status to processing and reduce stock items. */ - set_paid?: boolean; - /** Set the action as manual so that the order note registers as "added by user". */ - manual_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersDelete2 - * @request DELETE:/wc/v3/orders/{id} - * @originalName v3OrdersDelete - * @duplicate - * @secure - */ - v3OrdersDelete2: ( - id: number, - query?: { - /** Whether to bypass trash and force deletion. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersBatchCreate - * @request POST:/wc/v3/orders/batch - * @secure - */ - v3OrdersBatchCreate: ( - data: { - /** - * Parent order ID. - * @format int64 - */ - parent_id?: number; - /** Shows where the order was created. */ - created_via?: string; - /** Order status. */ - status?: IStatusEnum2[]; - /** Currency the order was created with, in ISO format. */ - currency?: ICurrencyEnum2[]; - /** - * User ID who owns the order. 0 for guests. - * @format int64 - */ - customer_id?: number; - /** Note left by customer during checkout. */ - customer_note?: string; - /** Billing address. */ - billing?: string; - /** Shipping address. */ - shipping?: string; - /** Payment method ID. */ - payment_method?: string; - /** Payment method title. */ - payment_method_title?: string; - /** Unique transaction ID. */ - transaction_id?: string; - /** Meta data. */ - meta_data?: object[]; - /** Line items data. */ - line_items?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** Coupons line data. */ - coupon_lines?: object[]; - /** Define if the order is paid. It will set the status to processing and reduce stock items. */ - set_paid?: boolean; - /** Set the action as manual so that the order note registers as "added by user". */ - manual_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersBatchUpdate - * @request PUT:/wc/v3/orders/batch - * @secure - */ - v3OrdersBatchUpdate: ( - query?: { - /** - * Parent order ID. - * @format int64 - */ - parent_id?: number; - /** Shows where the order was created. */ - created_via?: string; - /** Order status. */ - status?: IV3OrdersBatchUpdateParamsStatusEnum[]; - /** Currency the order was created with, in ISO format. */ - currency?: IV3OrdersBatchUpdateParamsCurrencyEnum[]; - /** - * User ID who owns the order. 0 for guests. - * @format int64 - */ - customer_id?: number; - /** Note left by customer during checkout. */ - customer_note?: string; - /** Billing address. */ - billing?: string; - /** Shipping address. */ - shipping?: string; - /** Payment method ID. */ - payment_method?: string; - /** Payment method title. */ - payment_method_title?: string; - /** Unique transaction ID. */ - transaction_id?: string; - /** Meta data. */ - meta_data?: object[]; - /** Line items data. */ - line_items?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** Coupons line data. */ - coupon_lines?: object[]; - /** Define if the order is paid. It will set the status to processing and reduce stock items. */ - set_paid?: boolean; - /** Set the action as manual so that the order note registers as "added by user". */ - manual_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersBatchPartialUpdate - * @request PATCH:/wc/v3/orders/batch - * @secure - */ - v3OrdersBatchPartialUpdate: ( - query?: { - /** - * Parent order ID. - * @format int64 - */ - parent_id?: number; - /** Shows where the order was created. */ - created_via?: string; - /** Order status. */ - status?: IV3OrdersBatchPartialUpdateParamsStatusEnum[]; - /** Currency the order was created with, in ISO format. */ - currency?: IV3OrdersBatchPartialUpdateParamsCurrencyEnum[]; - /** - * User ID who owns the order. 0 for guests. - * @format int64 - */ - customer_id?: number; - /** Note left by customer during checkout. */ - customer_note?: string; - /** Billing address. */ - billing?: string; - /** Shipping address. */ - shipping?: string; - /** Payment method ID. */ - payment_method?: string; - /** Payment method title. */ - payment_method_title?: string; - /** Unique transaction ID. */ - transaction_id?: string; - /** Meta data. */ - meta_data?: object[]; - /** Line items data. */ - line_items?: object[]; - /** Shipping lines data. */ - shipping_lines?: object[]; - /** Fee lines data. */ - fee_lines?: object[]; - /** Coupons line data. */ - coupon_lines?: object[]; - /** Define if the order is paid. It will set the status to processing and reduce stock items. */ - set_paid?: boolean; - /** Set the action as manual so that the order note registers as "added by user". */ - manual_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesTermsList - * @request GET:/wc/v3/products/attributes/{attribute_id}/terms - * @secure - */ - v3ProductsAttributesTermsList: ( - attributeId: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsAttributesTermsListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. Applies to hierarchical taxonomies only. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3ProductsAttributesTermsListParamsOrderEnum[]; - /** Sort collection by resource attribute. */ - orderby?: IV3ProductsAttributesTermsListParamsOrderbyEnum[]; - /** Whether to hide resources not assigned to any products. */ - hide_empty?: boolean; - /** - * Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only. - * @format int64 - */ - parent?: number; - /** - * Limit result set to resources assigned to a specific product. - * @format int64 - */ - product?: number; - /** Limit result set to resources with a specific slug. */ - slug?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}/terms`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesTermsCreate - * @request POST:/wc/v3/products/attributes/{attribute_id}/terms - * @secure - */ - v3ProductsAttributesTermsCreate: ( - attributeId: number, - data: { - /** Name for the resource. */ - name: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}/terms`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesDetail - * @request GET:/wc/v3/products/attributes/{attribute_id} - * @secure - */ - v3ProductsAttributesDetail: ( - attributeId: number, - query?: { - /** - * Unique identifier for the resource. - * @format int64 - */ - id?: number; - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsAttributesDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesCreate - * @request POST:/wc/v3/products/attributes/{attribute_id} - * @secure - */ - v3ProductsAttributesCreate: ( - attributeId: number, - data: { - /** - * Unique identifier for the resource. - * @format int64 - */ - id?: number; - /** Term name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesUpdate - * @request PUT:/wc/v3/products/attributes/{attribute_id} - * @secure - */ - v3ProductsAttributesUpdate: ( - attributeId: number, - query?: { - /** - * Unique identifier for the resource. - * @format int64 - */ - id?: number; - /** Term name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesPartialUpdate - * @request PATCH:/wc/v3/products/attributes/{attribute_id} - * @secure - */ - v3ProductsAttributesPartialUpdate: ( - attributeId: number, - query?: { - /** - * Unique identifier for the resource. - * @format int64 - */ - id?: number; - /** Term name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesDelete - * @request DELETE:/wc/v3/products/attributes/{attribute_id} - * @secure - */ - v3ProductsAttributesDelete: ( - attributeId: number, - query?: { - /** - * Unique identifier for the resource. - * @format int64 - */ - id?: number; - /** Required to be true, as resource does not support trashing. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesTermsBatchCreate - * @request POST:/wc/v3/products/attributes/{attribute_id}/terms/batch - * @secure - */ - v3ProductsAttributesTermsBatchCreate: ( - attributeId: number, - data: { - /** Term name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}/terms/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesTermsBatchUpdate - * @request PUT:/wc/v3/products/attributes/{attribute_id}/terms/batch - * @secure - */ - v3ProductsAttributesTermsBatchUpdate: ( - attributeId: number, - query?: { - /** Term name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}/terms/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesTermsBatchPartialUpdate - * @request PATCH:/wc/v3/products/attributes/{attribute_id}/terms/batch - * @secure - */ - v3ProductsAttributesTermsBatchPartialUpdate: ( - attributeId: number, - query?: { - /** Term name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${attributeId}/terms/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesList - * @request GET:/wc/v3/products/attributes - * @secure - */ - v3ProductsAttributesList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsAttributesListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesCreate2 - * @request POST:/wc/v3/products/attributes - * @originalName v3ProductsAttributesCreate - * @duplicate - * @secure - */ - v3ProductsAttributesCreate2: ( - data: { - /** Name for the resource. */ - name: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** Type of attribute. */ - type?: ITypeEnum[]; - /** Default sort order. */ - order_by?: IOrderByEnum[]; - /** Enable/Disable attribute archives. */ - has_archives?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesDetail2 - * @request GET:/wc/v3/products/attributes/{id} - * @originalName v3ProductsAttributesDetail - * @duplicate - * @secure - */ - v3ProductsAttributesDetail2: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsAttributesDetail2ParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesCreate3 - * @request POST:/wc/v3/products/attributes/{id} - * @originalName v3ProductsAttributesCreate - * @duplicate - * @secure - */ - v3ProductsAttributesCreate3: ( - id: number, - data: { - /** Attribute name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** Type of attribute. */ - type?: ITypeEnum1[]; - /** Default sort order. */ - order_by?: IOrderByEnum1[]; - /** Enable/Disable attribute archives. */ - has_archives?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesUpdate2 - * @request PUT:/wc/v3/products/attributes/{id} - * @originalName v3ProductsAttributesUpdate - * @duplicate - * @secure - */ - v3ProductsAttributesUpdate2: ( - id: number, - query?: { - /** Attribute name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** Type of attribute. */ - type?: IV3ProductsAttributesUpdate2ParamsTypeEnum[]; - /** Default sort order. */ - order_by?: IV3ProductsAttributesUpdate2ParamsOrderByEnum[]; - /** Enable/Disable attribute archives. */ - has_archives?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesPartialUpdate2 - * @request PATCH:/wc/v3/products/attributes/{id} - * @originalName v3ProductsAttributesPartialUpdate - * @duplicate - * @secure - */ - v3ProductsAttributesPartialUpdate2: ( - id: number, - query?: { - /** Attribute name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** Type of attribute. */ - type?: IV3ProductsAttributesPartialUpdate2ParamsTypeEnum[]; - /** Default sort order. */ - order_by?: IV3ProductsAttributesPartialUpdate2ParamsOrderByEnum[]; - /** Enable/Disable attribute archives. */ - has_archives?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesDelete2 - * @request DELETE:/wc/v3/products/attributes/{id} - * @originalName v3ProductsAttributesDelete - * @duplicate - * @secure - */ - v3ProductsAttributesDelete2: ( - id: number, - query?: { - /** Required to be true, as resource does not support trashing. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesBatchCreate - * @request POST:/wc/v3/products/attributes/batch - * @secure - */ - v3ProductsAttributesBatchCreate: ( - data: { - /** Attribute name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** Type of attribute. */ - type?: ITypeEnum2[]; - /** Default sort order. */ - order_by?: IOrderByEnum2[]; - /** Enable/Disable attribute archives. */ - has_archives?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesBatchUpdate - * @request PUT:/wc/v3/products/attributes/batch - * @secure - */ - v3ProductsAttributesBatchUpdate: ( - query?: { - /** Attribute name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** Type of attribute. */ - type?: IV3ProductsAttributesBatchUpdateParamsTypeEnum[]; - /** Default sort order. */ - order_by?: IV3ProductsAttributesBatchUpdateParamsOrderByEnum[]; - /** Enable/Disable attribute archives. */ - has_archives?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsAttributesBatchPartialUpdate - * @request PATCH:/wc/v3/products/attributes/batch - * @secure - */ - v3ProductsAttributesBatchPartialUpdate: ( - query?: { - /** Attribute name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** Type of attribute. */ - type?: IV3ProductsAttributesBatchPartialUpdateParamsTypeEnum[]; - /** Default sort order. */ - order_by?: IV3ProductsAttributesBatchPartialUpdateParamsOrderByEnum[]; - /** Enable/Disable attribute archives. */ - has_archives?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/attributes/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesList - * @request GET:/wc/v3/products/categories - * @secure - */ - v3ProductsCategoriesList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsCategoriesListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. Applies to hierarchical taxonomies only. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3ProductsCategoriesListParamsOrderEnum[]; - /** Sort collection by resource attribute. */ - orderby?: IV3ProductsCategoriesListParamsOrderbyEnum[]; - /** Whether to hide resources not assigned to any products. */ - hide_empty?: boolean; - /** - * Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only. - * @format int64 - */ - parent?: number; - /** - * Limit result set to resources assigned to a specific product. - * @format int64 - */ - product?: number; - /** Limit result set to resources with a specific slug. */ - slug?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesCreate - * @request POST:/wc/v3/products/categories - * @secure - */ - v3ProductsCategoriesCreate: ( - data: { - /** Name for the resource. */ - name: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** - * The ID for the parent of the resource. - * @format int64 - */ - parent?: number; - /** HTML description of the resource. */ - description?: string; - /** Category archive display type. */ - display?: IDisplayEnum3[]; - /** Image data. */ - image?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesDetail - * @request GET:/wc/v3/products/categories/{id} - * @secure - */ - v3ProductsCategoriesDetail: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsCategoriesDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesCreate2 - * @request POST:/wc/v3/products/categories/{id} - * @originalName v3ProductsCategoriesCreate - * @duplicate - * @secure - */ - v3ProductsCategoriesCreate2: ( - id: number, - data: { - /** Category name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** - * The ID for the parent of the resource. - * @format int64 - */ - parent?: number; - /** HTML description of the resource. */ - description?: string; - /** Category archive display type. */ - display?: IDisplayEnum4[]; - /** Image data. */ - image?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesUpdate - * @request PUT:/wc/v3/products/categories/{id} - * @secure - */ - v3ProductsCategoriesUpdate: ( - id: number, - query?: { - /** Category name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** - * The ID for the parent of the resource. - * @format int64 - */ - parent?: number; - /** HTML description of the resource. */ - description?: string; - /** Category archive display type. */ - display?: IV3ProductsCategoriesUpdateParamsDisplayEnum[]; - /** Image data. */ - image?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesPartialUpdate - * @request PATCH:/wc/v3/products/categories/{id} - * @secure - */ - v3ProductsCategoriesPartialUpdate: ( - id: number, - query?: { - /** Category name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** - * The ID for the parent of the resource. - * @format int64 - */ - parent?: number; - /** HTML description of the resource. */ - description?: string; - /** Category archive display type. */ - display?: IV3ProductsCategoriesPartialUpdateParamsDisplayEnum[]; - /** Image data. */ - image?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesDelete - * @request DELETE:/wc/v3/products/categories/{id} - * @secure - */ - v3ProductsCategoriesDelete: ( - id: number, - query?: { - /** Required to be true, as resource does not support trashing. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesBatchCreate - * @request POST:/wc/v3/products/categories/batch - * @secure - */ - v3ProductsCategoriesBatchCreate: ( - data: { - /** Category name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** - * The ID for the parent of the resource. - * @format int64 - */ - parent?: number; - /** HTML description of the resource. */ - description?: string; - /** Category archive display type. */ - display?: IDisplayEnum5[]; - /** Image data. */ - image?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesBatchUpdate - * @request PUT:/wc/v3/products/categories/batch - * @secure - */ - v3ProductsCategoriesBatchUpdate: ( - query?: { - /** Category name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** - * The ID for the parent of the resource. - * @format int64 - */ - parent?: number; - /** HTML description of the resource. */ - description?: string; - /** Category archive display type. */ - display?: IV3ProductsCategoriesBatchUpdateParamsDisplayEnum[]; - /** Image data. */ - image?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCategoriesBatchPartialUpdate - * @request PATCH:/wc/v3/products/categories/batch - * @secure - */ - v3ProductsCategoriesBatchPartialUpdate: ( - query?: { - /** Category name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** - * The ID for the parent of the resource. - * @format int64 - */ - parent?: number; - /** HTML description of the resource. */ - description?: string; - /** Category archive display type. */ - display?: IV3ProductsCategoriesBatchPartialUpdateParamsDisplayEnum[]; - /** Image data. */ - image?: string; - /** - * Menu order, used to custom sort the resource. - * @format int64 - */ - menu_order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/categories/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCustomFieldsNamesList - * @request GET:/wc/v3/products/custom-fields/names - * @secure - */ - v3ProductsCustomFieldsNamesList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: string; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** Order sort items ascending or descending. */ - order?: IV3ProductsCustomFieldsNamesListParamsOrderEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/custom-fields/names`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsReviewsList - * @request GET:/wc/v3/products/reviews - * @secure - */ - v3ProductsReviewsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsReviewsListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** - * Limit response to resources published after a given ISO8601 compliant date. - * @format date-time - */ - after?: string; - /** - * Limit response to reviews published before a given ISO8601 compliant date. - * @format date-time - */ - before?: string; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific IDs. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3ProductsReviewsListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3ProductsReviewsListParamsOrderbyEnum[]; - /** Limit result set to reviews assigned to specific user IDs. */ - reviewer?: number[]; - /** Ensure result set excludes reviews assigned to specific user IDs. */ - reviewer_exclude?: number[]; - /** - * Limit result set to that from a specific author email. - * @format email - */ - reviewer_email?: string; - /** Limit result set to reviews assigned to specific product IDs. */ - product?: number[]; - /** Limit result set to reviews assigned a specific status. */ - status?: IV3ProductsReviewsListParamsStatusEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/reviews`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsReviewsCreate - * @request POST:/wc/v3/products/reviews - * @secure - */ - v3ProductsReviewsCreate: ( - data: { - /** - * Unique identifier for the product. - * @format int64 - */ - product_id: number; - /** Product name. */ - product_name?: string; - /** Status of the review. */ - status?: IStatusEnum3[]; - /** Name of the reviewer. */ - reviewer: string; - /** Email of the reviewer. */ - reviewer_email: string; /** Review content. */ review: string; + /** The date the review was created, in the site's timezone. */ + date_created?: null; /** * Review rating (0 to 5). * @format int64 */ rating?: number; + /** Name of the reviewer. */ + name: string; + /** Email of the reviewer. */ + email: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/reviews`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsReviewsDetail - * @request GET:/wc/v3/products/reviews/{id} - * @secure - */ - v3ProductsReviewsDetail: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsReviewsDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/reviews/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsReviewsCreate2 - * @request POST:/wc/v3/products/reviews/{id} - * @originalName v3ProductsReviewsCreate - * @duplicate - * @secure - */ - v3ProductsReviewsCreate2: ( - id: number, - data: { - /** - * Unique identifier for the product that the review belongs to. - * @format int64 - */ - product_id?: number; - /** Product name. */ - product_name?: string; - /** Status of the review. */ - status?: IStatusEnum4[]; - /** Reviewer name. */ - reviewer?: string; - /** - * Reviewer email. - * @format email - */ - reviewer_email?: string; - /** The content of the review. */ - review?: string; - /** - * Review rating (0 to 5). - * @format int64 - */ - rating?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/reviews/${id}`, + path: `/wc/v1/products/${productId}/reviews`, method: "POST", body: data, secure: true, @@ -7073,41 +5466,107 @@ export class Api< * No description * * @tags products - * @name V3ProductsReviewsUpdate - * @request PUT:/wc/v3/products/reviews/{id} + * @name V1ProductsDetail + * @request GET:/wc/v1/products/{product_id} * @secure */ - v3ProductsReviewsUpdate: ( - id: number, + v1ProductsDetail: ( + productId: number, query?: { /** - * Unique identifier for the product that the review belongs to. + * Unique identifier for the resource. * @format int64 */ - product_id?: number; - /** Product name. */ - product_name?: string; - /** Status of the review. */ - status?: IV3ProductsReviewsUpdateParamsStatusEnum[]; - /** Reviewer name. */ - reviewer?: string; + id?: number; + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1ProductsDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/${productId}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsCreate + * @request POST:/wc/v1/products/{product_id} + * @secure + */ + v1ProductsCreate: ( + productId: number, + data: { /** - * Reviewer email. - * @format email + * Unique identifier for the resource. + * @format int64 */ - reviewer_email?: string; + id?: number; /** The content of the review. */ review?: string; + /** The date the review was created, in the site's timezone. */ + date_created?: null; /** * Review rating (0 to 5). * @format int64 */ rating?: number; + /** Reviewer name. */ + name?: string; + /** Reviewer email. */ + email?: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/reviews/${id}`, + path: `/wc/v1/products/${productId}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V1ProductsUpdate + * @request PUT:/wc/v1/products/{product_id} + * @secure + */ + v1ProductsUpdate: ( + productId: number, + query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; + /** The content of the review. */ + review?: string; + /** The date the review was created, in the site's timezone. */ + date_created?: any; + /** + * Review rating (0 to 5). + * @format int64 + */ + rating?: number; + /** Reviewer name. */ + name?: string; + /** Reviewer email. */ + email?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/products/${productId}`, method: "PUT", query: query, secure: true, @@ -7119,41 +5578,36 @@ export class Api< * No description * * @tags products - * @name V3ProductsReviewsPartialUpdate - * @request PATCH:/wc/v3/products/reviews/{id} + * @name V1ProductsPartialUpdate + * @request PATCH:/wc/v1/products/{product_id} * @secure */ - v3ProductsReviewsPartialUpdate: ( - id: number, + v1ProductsPartialUpdate: ( + productId: number, query?: { /** - * Unique identifier for the product that the review belongs to. + * Unique identifier for the resource. * @format int64 */ - product_id?: number; - /** Product name. */ - product_name?: string; - /** Status of the review. */ - status?: IV3ProductsReviewsPartialUpdateParamsStatusEnum[]; - /** Reviewer name. */ - reviewer?: string; - /** - * Reviewer email. - * @format email - */ - reviewer_email?: string; + id?: number; /** The content of the review. */ review?: string; + /** The date the review was created, in the site's timezone. */ + date_created?: any; /** * Review rating (0 to 5). * @format int64 */ rating?: number; + /** Reviewer name. */ + name?: string; + /** Reviewer email. */ + email?: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/reviews/${id}`, + path: `/wc/v1/products/${productId}`, method: "PATCH", query: query, secure: true, @@ -7165,20 +5619,25 @@ export class Api< * No description * * @tags products - * @name V3ProductsReviewsDelete - * @request DELETE:/wc/v3/products/reviews/{id} + * @name V1ProductsDelete + * @request DELETE:/wc/v1/products/{product_id} * @secure */ - v3ProductsReviewsDelete: ( - id: number, + v1ProductsDelete: ( + productId: number, query?: { + /** + * Unique identifier for the resource. + * @format int64 + */ + id?: number; /** Whether to bypass trash and force deletion. */ force?: boolean; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/reviews/${id}`, + path: `/wc/v1/products/${productId}`, method: "DELETE", query: query, secure: true, @@ -7190,149 +5649,14 @@ export class Api< * No description * * @tags products - * @name V3ProductsReviewsBatchCreate - * @request POST:/wc/v3/products/reviews/batch + * @name V1ProductsShippingClassesList + * @request GET:/wc/v1/products/shipping_classes * @secure */ - v3ProductsReviewsBatchCreate: ( - data: { - /** - * Unique identifier for the product that the review belongs to. - * @format int64 - */ - product_id?: number; - /** Product name. */ - product_name?: string; - /** Status of the review. */ - status?: IStatusEnum5[]; - /** Reviewer name. */ - reviewer?: string; - /** - * Reviewer email. - * @format email - */ - reviewer_email?: string; - /** The content of the review. */ - review?: string; - /** - * Review rating (0 to 5). - * @format int64 - */ - rating?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/reviews/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsReviewsBatchUpdate - * @request PUT:/wc/v3/products/reviews/batch - * @secure - */ - v3ProductsReviewsBatchUpdate: ( - query?: { - /** - * Unique identifier for the product that the review belongs to. - * @format int64 - */ - product_id?: number; - /** Product name. */ - product_name?: string; - /** Status of the review. */ - status?: IV3ProductsReviewsBatchUpdateParamsStatusEnum[]; - /** Reviewer name. */ - reviewer?: string; - /** - * Reviewer email. - * @format email - */ - reviewer_email?: string; - /** The content of the review. */ - review?: string; - /** - * Review rating (0 to 5). - * @format int64 - */ - rating?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/reviews/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsReviewsBatchPartialUpdate - * @request PATCH:/wc/v3/products/reviews/batch - * @secure - */ - v3ProductsReviewsBatchPartialUpdate: ( - query?: { - /** - * Unique identifier for the product that the review belongs to. - * @format int64 - */ - product_id?: number; - /** Product name. */ - product_name?: string; - /** Status of the review. */ - status?: IV3ProductsReviewsBatchPartialUpdateParamsStatusEnum[]; - /** Reviewer name. */ - reviewer?: string; - /** - * Reviewer email. - * @format email - */ - reviewer_email?: string; - /** The content of the review. */ - review?: string; - /** - * Review rating (0 to 5). - * @format int64 - */ - rating?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/reviews/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsShippingClassesList - * @request GET:/wc/v3/products/shipping_classes - * @secure - */ - v3ProductsShippingClassesList: ( + v1ProductsShippingClassesList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsShippingClassesListParamsContextEnum[]; + context?: IV1ProductsShippingClassesListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -7358,9 +5682,9 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV3ProductsShippingClassesListParamsOrderEnum[]; + order?: IV1ProductsShippingClassesListParamsOrderEnum[]; /** Sort collection by resource attribute. */ - orderby?: IV3ProductsShippingClassesListParamsOrderbyEnum[]; + orderby?: IV1ProductsShippingClassesListParamsOrderbyEnum[]; /** Whether to hide resources not assigned to any products. */ hide_empty?: boolean; /** @@ -7379,7 +5703,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes`, + path: `/wc/v1/products/shipping_classes`, method: "GET", query: query, secure: true, @@ -7391,11 +5715,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesCreate - * @request POST:/wc/v3/products/shipping_classes + * @name V1ProductsShippingClassesCreate + * @request POST:/wc/v1/products/shipping_classes * @secure */ - v3ProductsShippingClassesCreate: ( + v1ProductsShippingClassesCreate: ( data: { /** Name for the resource. */ name: string; @@ -7407,7 +5731,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes`, + path: `/wc/v1/products/shipping_classes`, method: "POST", body: data, secure: true, @@ -7419,20 +5743,20 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesDetail - * @request GET:/wc/v3/products/shipping_classes/{id} + * @name V1ProductsShippingClassesDetail + * @request GET:/wc/v1/products/shipping_classes/{id} * @secure */ - v3ProductsShippingClassesDetail: ( + v1ProductsShippingClassesDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsShippingClassesDetailParamsContextEnum[]; + context?: IV1ProductsShippingClassesDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/${id}`, + path: `/wc/v1/products/shipping_classes/${id}`, method: "GET", query: query, secure: true, @@ -7444,13 +5768,13 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesCreate2 - * @request POST:/wc/v3/products/shipping_classes/{id} - * @originalName v3ProductsShippingClassesCreate + * @name V1ProductsShippingClassesCreate2 + * @request POST:/wc/v1/products/shipping_classes/{id} + * @originalName v1ProductsShippingClassesCreate * @duplicate * @secure */ - v3ProductsShippingClassesCreate2: ( + v1ProductsShippingClassesCreate2: ( id: number, data: { /** Shipping class name. */ @@ -7463,7 +5787,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/${id}`, + path: `/wc/v1/products/shipping_classes/${id}`, method: "POST", body: data, secure: true, @@ -7475,11 +5799,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesUpdate - * @request PUT:/wc/v3/products/shipping_classes/{id} + * @name V1ProductsShippingClassesUpdate + * @request PUT:/wc/v1/products/shipping_classes/{id} * @secure */ - v3ProductsShippingClassesUpdate: ( + v1ProductsShippingClassesUpdate: ( id: number, query?: { /** Shipping class name. */ @@ -7492,7 +5816,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/${id}`, + path: `/wc/v1/products/shipping_classes/${id}`, method: "PUT", query: query, secure: true, @@ -7504,11 +5828,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesPartialUpdate - * @request PATCH:/wc/v3/products/shipping_classes/{id} + * @name V1ProductsShippingClassesPartialUpdate + * @request PATCH:/wc/v1/products/shipping_classes/{id} * @secure */ - v3ProductsShippingClassesPartialUpdate: ( + v1ProductsShippingClassesPartialUpdate: ( id: number, query?: { /** Shipping class name. */ @@ -7521,7 +5845,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/${id}`, + path: `/wc/v1/products/shipping_classes/${id}`, method: "PATCH", query: query, secure: true, @@ -7533,11 +5857,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesDelete - * @request DELETE:/wc/v3/products/shipping_classes/{id} + * @name V1ProductsShippingClassesDelete + * @request DELETE:/wc/v1/products/shipping_classes/{id} * @secure */ - v3ProductsShippingClassesDelete: ( + v1ProductsShippingClassesDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -7546,7 +5870,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/${id}`, + path: `/wc/v1/products/shipping_classes/${id}`, method: "DELETE", query: query, secure: true, @@ -7558,11 +5882,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesBatchCreate - * @request POST:/wc/v3/products/shipping_classes/batch + * @name V1ProductsShippingClassesBatchCreate + * @request POST:/wc/v1/products/shipping_classes/batch * @secure */ - v3ProductsShippingClassesBatchCreate: ( + v1ProductsShippingClassesBatchCreate: ( data: { /** Shipping class name. */ name?: string; @@ -7574,7 +5898,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/batch`, + path: `/wc/v1/products/shipping_classes/batch`, method: "POST", body: data, secure: true, @@ -7586,11 +5910,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesBatchUpdate - * @request PUT:/wc/v3/products/shipping_classes/batch + * @name V1ProductsShippingClassesBatchUpdate + * @request PUT:/wc/v1/products/shipping_classes/batch * @secure */ - v3ProductsShippingClassesBatchUpdate: ( + v1ProductsShippingClassesBatchUpdate: ( query?: { /** Shipping class name. */ name?: string; @@ -7602,7 +5926,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/batch`, + path: `/wc/v1/products/shipping_classes/batch`, method: "PUT", query: query, secure: true, @@ -7614,11 +5938,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesBatchPartialUpdate - * @request PATCH:/wc/v3/products/shipping_classes/batch + * @name V1ProductsShippingClassesBatchPartialUpdate + * @request PATCH:/wc/v1/products/shipping_classes/batch * @secure */ - v3ProductsShippingClassesBatchPartialUpdate: ( + v1ProductsShippingClassesBatchPartialUpdate: ( query?: { /** Shipping class name. */ name?: string; @@ -7630,7 +5954,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/shipping_classes/batch`, + path: `/wc/v1/products/shipping_classes/batch`, method: "PATCH", query: query, secure: true, @@ -7642,42 +5966,14 @@ export class Api< * No description * * @tags products - * @name V3ProductsShippingClassesSlugSuggestionList - * @request GET:/wc/v3/products/shipping_classes/slug-suggestion + * @name V1ProductsTagsList + * @request GET:/wc/v1/products/tags * @secure */ - v3ProductsShippingClassesSlugSuggestionList: ( - query?: { - /** Shipping class name. */ - name?: string; - /** An alphanumeric identifier for the resource unique to its type. */ - slug?: string; - /** HTML description of the resource. */ - description?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/shipping_classes/slug-suggestion`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsTagsList - * @request GET:/wc/v3/products/tags - * @secure - */ - v3ProductsTagsList: ( + v1ProductsTagsList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsTagsListParamsContextEnum[]; + context?: IV1ProductsTagsListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -7703,9 +5999,9 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV3ProductsTagsListParamsOrderEnum[]; + order?: IV1ProductsTagsListParamsOrderEnum[]; /** Sort collection by resource attribute. */ - orderby?: IV3ProductsTagsListParamsOrderbyEnum[]; + orderby?: IV1ProductsTagsListParamsOrderbyEnum[]; /** Whether to hide resources not assigned to any products. */ hide_empty?: boolean; /** @@ -7724,7 +6020,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags`, + path: `/wc/v1/products/tags`, method: "GET", query: query, secure: true, @@ -7736,11 +6032,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsCreate - * @request POST:/wc/v3/products/tags + * @name V1ProductsTagsCreate + * @request POST:/wc/v1/products/tags * @secure */ - v3ProductsTagsCreate: ( + v1ProductsTagsCreate: ( data: { /** Name for the resource. */ name: string; @@ -7752,7 +6048,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags`, + path: `/wc/v1/products/tags`, method: "POST", body: data, secure: true, @@ -7764,20 +6060,20 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsDetail - * @request GET:/wc/v3/products/tags/{id} + * @name V1ProductsTagsDetail + * @request GET:/wc/v1/products/tags/{id} * @secure */ - v3ProductsTagsDetail: ( + v1ProductsTagsDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsTagsDetailParamsContextEnum[]; + context?: IV1ProductsTagsDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/${id}`, + path: `/wc/v1/products/tags/${id}`, method: "GET", query: query, secure: true, @@ -7789,13 +6085,13 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsCreate2 - * @request POST:/wc/v3/products/tags/{id} - * @originalName v3ProductsTagsCreate + * @name V1ProductsTagsCreate2 + * @request POST:/wc/v1/products/tags/{id} + * @originalName v1ProductsTagsCreate * @duplicate * @secure */ - v3ProductsTagsCreate2: ( + v1ProductsTagsCreate2: ( id: number, data: { /** Tag name. */ @@ -7808,7 +6104,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/${id}`, + path: `/wc/v1/products/tags/${id}`, method: "POST", body: data, secure: true, @@ -7820,11 +6116,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsUpdate - * @request PUT:/wc/v3/products/tags/{id} + * @name V1ProductsTagsUpdate + * @request PUT:/wc/v1/products/tags/{id} * @secure */ - v3ProductsTagsUpdate: ( + v1ProductsTagsUpdate: ( id: number, query?: { /** Tag name. */ @@ -7837,7 +6133,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/${id}`, + path: `/wc/v1/products/tags/${id}`, method: "PUT", query: query, secure: true, @@ -7849,11 +6145,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsPartialUpdate - * @request PATCH:/wc/v3/products/tags/{id} + * @name V1ProductsTagsPartialUpdate + * @request PATCH:/wc/v1/products/tags/{id} * @secure */ - v3ProductsTagsPartialUpdate: ( + v1ProductsTagsPartialUpdate: ( id: number, query?: { /** Tag name. */ @@ -7866,7 +6162,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/${id}`, + path: `/wc/v1/products/tags/${id}`, method: "PATCH", query: query, secure: true, @@ -7878,11 +6174,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsDelete - * @request DELETE:/wc/v3/products/tags/{id} + * @name V1ProductsTagsDelete + * @request DELETE:/wc/v1/products/tags/{id} * @secure */ - v3ProductsTagsDelete: ( + v1ProductsTagsDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -7891,7 +6187,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/${id}`, + path: `/wc/v1/products/tags/${id}`, method: "DELETE", query: query, secure: true, @@ -7903,11 +6199,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsBatchCreate - * @request POST:/wc/v3/products/tags/batch + * @name V1ProductsTagsBatchCreate + * @request POST:/wc/v1/products/tags/batch * @secure */ - v3ProductsTagsBatchCreate: ( + v1ProductsTagsBatchCreate: ( data: { /** Tag name. */ name?: string; @@ -7919,7 +6215,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/batch`, + path: `/wc/v1/products/tags/batch`, method: "POST", body: data, secure: true, @@ -7931,11 +6227,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsBatchUpdate - * @request PUT:/wc/v3/products/tags/batch + * @name V1ProductsTagsBatchUpdate + * @request PUT:/wc/v1/products/tags/batch * @secure */ - v3ProductsTagsBatchUpdate: ( + v1ProductsTagsBatchUpdate: ( query?: { /** Tag name. */ name?: string; @@ -7947,7 +6243,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/batch`, + path: `/wc/v1/products/tags/batch`, method: "PUT", query: query, secure: true, @@ -7959,11 +6255,11 @@ export class Api< * No description * * @tags products - * @name V3ProductsTagsBatchPartialUpdate - * @request PATCH:/wc/v3/products/tags/batch + * @name V1ProductsTagsBatchPartialUpdate + * @request PATCH:/wc/v1/products/tags/batch * @secure */ - v3ProductsTagsBatchPartialUpdate: ( + v1ProductsTagsBatchPartialUpdate: ( query?: { /** Tag name. */ name?: string; @@ -7975,7 +6271,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/tags/batch`, + path: `/wc/v1/products/tags/batch`, method: "PATCH", query: query, secure: true, @@ -7987,14 +6283,14 @@ export class Api< * No description * * @tags products - * @name V3ProductsList - * @request GET:/wc/v3/products + * @name V1ProductsList + * @request GET:/wc/v1/products * @secure */ - v3ProductsList: ( + v1ProductsList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsListParamsContextEnum[]; + context?: IV1ProductsListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -8020,18 +6316,6 @@ export class Api< * @format date-time */ before?: string; - /** - * Limit response to resources modified after a given ISO8601 compliant date. - * @format date-time - */ - modified_after?: string; - /** - * Limit response to resources modified before a given ISO8601 compliant date. - * @format date-time - */ - modified_before?: string; - /** Whether to consider GMT post dates when limiting response by published or modified date. */ - dates_are_gmt?: boolean; /** Ensure result set excludes specific IDs. */ exclude?: number[]; /** Limit result set to specific ids. */ @@ -8042,68 +6326,34 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV3ProductsListParamsOrderEnum[]; + order?: IV1ProductsListParamsOrderEnum[]; /** Sort collection by object attribute. */ - orderby?: IV3ProductsListParamsOrderbyEnum[]; - /** Limit result set to those of particular parent IDs. */ - parent?: number[]; - /** Limit result set to all items except those of a particular parent ID. */ - parent_exclude?: number[]; - /** Limit result set to products assigned a specific brand ID. */ - brand?: string; + orderby?: IV1ProductsListParamsOrderbyEnum[]; + /** Use WP Query arguments to modify the response; private query vars require appropriate authorization. */ + filter?: string; /** Limit result set to products with a specific slug. */ slug?: string; /** Limit result set to products assigned a specific status. */ - status?: IV3ProductsListParamsStatusEnum[]; + status?: IV1ProductsListParamsStatusEnum[]; /** Limit result set to products assigned a specific type. */ - type?: IV3ProductsListParamsTypeEnum[]; - /** Limit result set to products with specific SKU(s). Use commas to separate. */ - sku?: string; - /** Limit result set to featured products. */ - featured?: boolean; + type?: IV1ProductsListParamsTypeEnum[]; /** Limit result set to products assigned a specific category ID. */ category?: string; /** Limit result set to products assigned a specific tag ID. */ tag?: string; /** Limit result set to products assigned a specific shipping class ID. */ shipping_class?: string; - /** Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug. */ + /** Limit result set to products with a specific attribute. */ attribute?: string; /** Limit result set to products with a specific attribute term ID (required an assigned attribute). */ attribute_term?: string; - /** Limit result set to products on sale. */ - on_sale?: boolean; - /** Limit result set to products based on a minimum price. */ - min_price?: string; - /** Limit result set to products based on a maximum price. */ - max_price?: string; - /** Limit meta_data to specific keys. */ - include_meta?: string[]; - /** Ensure meta_data excludes specific keys. */ - exclude_meta?: string[]; - /** Limit result set to products with specified stock status. */ - stock_status?: IV3ProductsListParamsStockStatusEnum[]; - /** Limit results to those with a SKU that partial matches a string. This argument takes precedence over 'sku'. */ - search_sku?: string; - /** Limit results to those with a name or SKU that partial matches a string. This argument takes precedence over 'search', 'sku' and 'search_sku'. */ - search_name_or_sku?: string; - /** Limit result set to products with any of the statuses. */ - include_status?: string[]; - /** Exclude products with any of the statuses from result set. */ - exclude_status?: string[]; - /** Limit result set to products with any of the types. */ - include_types?: string[]; - /** Exclude products with any of the types from result set. */ - exclude_types?: string[]; - /** Limit result set to downloadable products. */ - downloadable?: boolean; - /** Limit result set to virtual products. */ - virtual?: boolean; + /** Limit result set to products with a specific SKU. */ + sku?: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products`, + path: `/wc/v1/products`, method: "GET", query: query, secure: true, @@ -8115,24 +6365,22 @@ export class Api< * No description * * @tags products - * @name V3ProductsCreate - * @request POST:/wc/v3/products + * @name V1ProductsCreate2 + * @request POST:/wc/v1/products + * @originalName v1ProductsCreate + * @duplicate * @secure */ - v3ProductsCreate: ( + v1ProductsCreate2: ( data: { /** Product name. */ name?: string; /** Product slug. */ slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: null; - /** The date the product was created, as GMT. */ - date_created_gmt?: null; /** Product type. */ type?: ITypeEnum3[]; /** Product status (post status). */ - status?: IStatusEnum6[]; + status?: IStatusEnum3[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ @@ -8141,22 +6389,16 @@ export class Api< description?: string; /** Product short description. */ short_description?: string; - /** Stock Keeping Unit. */ + /** Unique identifier. */ sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; /** Product regular price. */ regular_price?: string; /** Product sale price. */ sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; + /** Start date of sale price. */ + date_on_sale_from?: string; + /** End date of sale price. */ + date_on_sale_to?: string; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -8173,6 +6415,8 @@ export class Api< * @format int64 */ download_expiry?: number; + /** Download type, this controls the schema on the front-end. */ + download_type?: IDownloadTypeEnum[]; /** * Product external URL. Only for external products. * @format uri @@ -8191,12 +6435,10 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum[]; + /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ + in_stock?: boolean; /** If managing stock, this controls if backorders are allowed. */ backorders?: IBackordersEnum[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; /** Allow one item to be bought in a single order. */ sold_individually?: boolean; /** Product weight (kg). */ @@ -8207,9 +6449,7 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ + /** List of upsell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -8222,8 +6462,6 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; - /** List of brands. */ - brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -8232,18 +6470,18 @@ export class Api< attributes?: object[]; /** Defaults variation attributes. */ default_attributes?: object[]; + /** List of variations. */ + variations?: object[]; /** * Menu order, used to custom sort products. * @format int64 */ menu_order?: number; - /** Meta data. */ - meta_data?: object[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products`, + path: `/wc/v1/products`, method: "POST", body: data, secure: true, @@ -8255,20 +6493,22 @@ export class Api< * No description * * @tags products - * @name V3ProductsDetail - * @request GET:/wc/v3/products/{id} + * @name V1ProductsDetail2 + * @request GET:/wc/v1/products/{id} + * @originalName v1ProductsDetail + * @duplicate * @secure */ - v3ProductsDetail: ( + v1ProductsDetail2: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsDetailParamsContextEnum[]; + context?: IV1ProductsDetail2ParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/${id}`, + path: `/wc/v1/products/${id}`, method: "GET", query: query, secure: true, @@ -8280,27 +6520,23 @@ export class Api< * No description * * @tags products - * @name V3ProductsCreate2 - * @request POST:/wc/v3/products/{id} - * @originalName v3ProductsCreate + * @name V1ProductsCreate3 + * @request POST:/wc/v1/products/{id} + * @originalName v1ProductsCreate * @duplicate * @secure */ - v3ProductsCreate2: ( + v1ProductsCreate3: ( id: number, data: { /** Product name. */ name?: string; /** Product slug. */ slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: null; - /** The date the product was created, as GMT. */ - date_created_gmt?: null; /** Product type. */ type?: ITypeEnum4[]; /** Product status (post status). */ - status?: IStatusEnum7[]; + status?: IStatusEnum4[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ @@ -8309,22 +6545,16 @@ export class Api< description?: string; /** Product short description. */ short_description?: string; - /** Stock Keeping Unit. */ + /** Unique identifier. */ sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; /** Product regular price. */ regular_price?: string; /** Product sale price. */ sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; + /** Start date of sale price. */ + date_on_sale_from?: string; + /** End date of sale price. */ + date_on_sale_to?: string; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -8341,6 +6571,8 @@ export class Api< * @format int64 */ download_expiry?: number; + /** Download type, this controls the schema on the front-end. */ + download_type?: IDownloadTypeEnum1[]; /** * Product external URL. Only for external products. * @format uri @@ -8359,12 +6591,10 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum1[]; + /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ + in_stock?: boolean; /** If managing stock, this controls if backorders are allowed. */ backorders?: IBackordersEnum1[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; /** Allow one item to be bought in a single order. */ sold_individually?: boolean; /** Product weight (kg). */ @@ -8375,9 +6605,7 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ + /** List of upsell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -8390,8 +6618,6 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; - /** List of brands. */ - brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -8400,18 +6626,18 @@ export class Api< attributes?: object[]; /** Defaults variation attributes. */ default_attributes?: object[]; + /** List of variations. */ + variations?: object[]; /** * Menu order, used to custom sort products. * @format int64 */ menu_order?: number; - /** Meta data. */ - meta_data?: object[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/${id}`, + path: `/wc/v1/products/${id}`, method: "POST", body: data, secure: true, @@ -8423,49 +6649,41 @@ export class Api< * No description * * @tags products - * @name V3ProductsUpdate - * @request PUT:/wc/v3/products/{id} + * @name V1ProductsUpdate2 + * @request PUT:/wc/v1/products/{id} + * @originalName v1ProductsUpdate + * @duplicate * @secure */ - v3ProductsUpdate: ( + v1ProductsUpdate2: ( id: number, query?: { /** Product name. */ name?: string; /** Product slug. */ slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: any; - /** The date the product was created, as GMT. */ - date_created_gmt?: any; /** Product type. */ - type?: IV3ProductsUpdateParamsTypeEnum[]; + type?: IV1ProductsUpdate2ParamsTypeEnum[]; /** Product status (post status). */ - status?: IV3ProductsUpdateParamsStatusEnum[]; + status?: IV1ProductsUpdate2ParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: IV3ProductsUpdateParamsCatalogVisibilityEnum[]; + catalog_visibility?: IV1ProductsUpdate2ParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Stock Keeping Unit. */ + /** Unique identifier. */ sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; /** Product regular price. */ regular_price?: string; /** Product sale price. */ sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; + /** Start date of sale price. */ + date_on_sale_from?: string; + /** End date of sale price. */ + date_on_sale_to?: string; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -8482,6 +6700,8 @@ export class Api< * @format int64 */ download_expiry?: number; + /** Download type, this controls the schema on the front-end. */ + download_type?: IV1ProductsUpdate2ParamsDownloadTypeEnum[]; /** * Product external URL. Only for external products. * @format uri @@ -8490,7 +6710,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: IV3ProductsUpdateParamsTaxStatusEnum[]; + tax_status?: IV1ProductsUpdate2ParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -8500,12 +6720,10 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsUpdateParamsStockStatusEnum[]; + /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ + in_stock?: boolean; /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsUpdateParamsBackordersEnum[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; + backorders?: IV1ProductsUpdate2ParamsBackordersEnum[]; /** Allow one item to be bought in a single order. */ sold_individually?: boolean; /** Product weight (kg). */ @@ -8516,9 +6734,7 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ + /** List of upsell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -8531,8 +6747,6 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; - /** List of brands. */ - brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -8541,18 +6755,18 @@ export class Api< attributes?: object[]; /** Defaults variation attributes. */ default_attributes?: object[]; + /** List of variations. */ + variations?: object[]; /** * Menu order, used to custom sort products. * @format int64 */ menu_order?: number; - /** Meta data. */ - meta_data?: object[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/${id}`, + path: `/wc/v1/products/${id}`, method: "PUT", query: query, secure: true, @@ -8564,49 +6778,41 @@ export class Api< * No description * * @tags products - * @name V3ProductsPartialUpdate - * @request PATCH:/wc/v3/products/{id} + * @name V1ProductsPartialUpdate2 + * @request PATCH:/wc/v1/products/{id} + * @originalName v1ProductsPartialUpdate + * @duplicate * @secure */ - v3ProductsPartialUpdate: ( + v1ProductsPartialUpdate2: ( id: number, query?: { /** Product name. */ name?: string; /** Product slug. */ slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: any; - /** The date the product was created, as GMT. */ - date_created_gmt?: any; /** Product type. */ - type?: IV3ProductsPartialUpdateParamsTypeEnum[]; + type?: IV1ProductsPartialUpdate2ParamsTypeEnum[]; /** Product status (post status). */ - status?: IV3ProductsPartialUpdateParamsStatusEnum[]; + status?: IV1ProductsPartialUpdate2ParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: IV3ProductsPartialUpdateParamsCatalogVisibilityEnum[]; + catalog_visibility?: IV1ProductsPartialUpdate2ParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Stock Keeping Unit. */ + /** Unique identifier. */ sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; /** Product regular price. */ regular_price?: string; /** Product sale price. */ sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; + /** Start date of sale price. */ + date_on_sale_from?: string; + /** End date of sale price. */ + date_on_sale_to?: string; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -8623,6 +6829,8 @@ export class Api< * @format int64 */ download_expiry?: number; + /** Download type, this controls the schema on the front-end. */ + download_type?: IV1ProductsPartialUpdate2ParamsDownloadTypeEnum[]; /** * Product external URL. Only for external products. * @format uri @@ -8631,7 +6839,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: IV3ProductsPartialUpdateParamsTaxStatusEnum[]; + tax_status?: IV1ProductsPartialUpdate2ParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -8641,12 +6849,10 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsPartialUpdateParamsStockStatusEnum[]; + /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ + in_stock?: boolean; /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsPartialUpdateParamsBackordersEnum[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; + backorders?: IV1ProductsPartialUpdate2ParamsBackordersEnum[]; /** Allow one item to be bought in a single order. */ sold_individually?: boolean; /** Product weight (kg). */ @@ -8657,9 +6863,7 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ + /** List of upsell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -8672,8 +6876,6 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; - /** List of brands. */ - brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -8682,18 +6884,18 @@ export class Api< attributes?: object[]; /** Defaults variation attributes. */ default_attributes?: object[]; + /** List of variations. */ + variations?: object[]; /** * Menu order, used to custom sort products. * @format int64 */ menu_order?: number; - /** Meta data. */ - meta_data?: object[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/${id}`, + path: `/wc/v1/products/${id}`, method: "PATCH", query: query, secure: true, @@ -8705,11 +6907,13 @@ export class Api< * No description * * @tags products - * @name V3ProductsDelete - * @request DELETE:/wc/v3/products/{id} + * @name V1ProductsDelete2 + * @request DELETE:/wc/v1/products/{id} + * @originalName v1ProductsDelete + * @duplicate * @secure */ - v3ProductsDelete: ( + v1ProductsDelete2: ( id: number, query?: { /** Whether to bypass trash and force deletion. */ @@ -8718,7 +6922,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/${id}`, + path: `/wc/v1/products/${id}`, method: "DELETE", query: query, secure: true, @@ -8730,24 +6934,20 @@ export class Api< * No description * * @tags products - * @name V3ProductsBatchCreate - * @request POST:/wc/v3/products/batch + * @name V1ProductsBatchCreate + * @request POST:/wc/v1/products/batch * @secure */ - v3ProductsBatchCreate: ( + v1ProductsBatchCreate: ( data: { /** Product name. */ name?: string; /** Product slug. */ slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: null; - /** The date the product was created, as GMT. */ - date_created_gmt?: null; /** Product type. */ type?: ITypeEnum5[]; /** Product status (post status). */ - status?: IStatusEnum8[]; + status?: IStatusEnum5[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ @@ -8756,22 +6956,16 @@ export class Api< description?: string; /** Product short description. */ short_description?: string; - /** Stock Keeping Unit. */ + /** Unique identifier. */ sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; /** Product regular price. */ regular_price?: string; /** Product sale price. */ sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; + /** Start date of sale price. */ + date_on_sale_from?: string; + /** End date of sale price. */ + date_on_sale_to?: string; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -8788,6 +6982,8 @@ export class Api< * @format int64 */ download_expiry?: number; + /** Download type, this controls the schema on the front-end. */ + download_type?: IDownloadTypeEnum2[]; /** * Product external URL. Only for external products. * @format uri @@ -8806,12 +7002,10 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum2[]; + /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ + in_stock?: boolean; /** If managing stock, this controls if backorders are allowed. */ backorders?: IBackordersEnum2[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; /** Allow one item to be bought in a single order. */ sold_individually?: boolean; /** Product weight (kg). */ @@ -8822,9 +7016,7 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ + /** List of upsell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -8837,8 +7029,6 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; - /** List of brands. */ - brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -8847,18 +7037,18 @@ export class Api< attributes?: object[]; /** Defaults variation attributes. */ default_attributes?: object[]; + /** List of variations. */ + variations?: object[]; /** * Menu order, used to custom sort products. * @format int64 */ menu_order?: number; - /** Meta data. */ - meta_data?: object[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/batch`, + path: `/wc/v1/products/batch`, method: "POST", body: data, secure: true, @@ -8870,48 +7060,38 @@ export class Api< * No description * * @tags products - * @name V3ProductsBatchUpdate - * @request PUT:/wc/v3/products/batch + * @name V1ProductsBatchUpdate + * @request PUT:/wc/v1/products/batch * @secure */ - v3ProductsBatchUpdate: ( + v1ProductsBatchUpdate: ( query?: { /** Product name. */ name?: string; /** Product slug. */ slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: any; - /** The date the product was created, as GMT. */ - date_created_gmt?: any; /** Product type. */ - type?: IV3ProductsBatchUpdateParamsTypeEnum[]; + type?: IV1ProductsBatchUpdateParamsTypeEnum[]; /** Product status (post status). */ - status?: IV3ProductsBatchUpdateParamsStatusEnum[]; + status?: IV1ProductsBatchUpdateParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: IV3ProductsBatchUpdateParamsCatalogVisibilityEnum[]; + catalog_visibility?: IV1ProductsBatchUpdateParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Stock Keeping Unit. */ + /** Unique identifier. */ sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; /** Product regular price. */ regular_price?: string; /** Product sale price. */ sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; + /** Start date of sale price. */ + date_on_sale_from?: string; + /** End date of sale price. */ + date_on_sale_to?: string; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -8928,6 +7108,8 @@ export class Api< * @format int64 */ download_expiry?: number; + /** Download type, this controls the schema on the front-end. */ + download_type?: IV1ProductsBatchUpdateParamsDownloadTypeEnum[]; /** * Product external URL. Only for external products. * @format uri @@ -8936,7 +7118,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: IV3ProductsBatchUpdateParamsTaxStatusEnum[]; + tax_status?: IV1ProductsBatchUpdateParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -8946,321 +7128,54 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsBatchUpdateParamsStockStatusEnum[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsBatchUpdateParamsBackordersEnum[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; - /** Allow one item to be bought in a single order. */ - sold_individually?: boolean; - /** Product weight (kg). */ - weight?: string; - /** Product dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Allow reviews. */ - reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ - upsell_ids?: number[]; - /** List of cross-sell products IDs. */ - cross_sell_ids?: number[]; - /** - * Product parent ID. - * @format int64 - */ - parent_id?: number; - /** Optional note to send the customer after purchase. */ - purchase_note?: string; - /** List of categories. */ - categories?: object[]; - /** List of brands. */ - brands?: object[]; - /** List of tags. */ - tags?: object[]; - /** List of images. */ - images?: object[]; - /** List of attributes. */ - attributes?: object[]; - /** Defaults variation attributes. */ - default_attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsBatchPartialUpdate - * @request PATCH:/wc/v3/products/batch - * @secure - */ - v3ProductsBatchPartialUpdate: ( - query?: { - /** Product name. */ - name?: string; - /** Product slug. */ - slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: any; - /** The date the product was created, as GMT. */ - date_created_gmt?: any; - /** Product type. */ - type?: IV3ProductsBatchPartialUpdateParamsTypeEnum[]; - /** Product status (post status). */ - status?: IV3ProductsBatchPartialUpdateParamsStatusEnum[]; - /** Featured product. */ - featured?: boolean; - /** Catalog visibility. */ - catalog_visibility?: IV3ProductsBatchPartialUpdateParamsCatalogVisibilityEnum[]; - /** Product description. */ - description?: string; - /** Product short description. */ - short_description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Product regular price. */ - regular_price?: string; - /** Product sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; - /** If the product is virtual. */ - virtual?: boolean; - /** If the product is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** - * Product external URL. Only for external products. - * @format uri - */ - external_url?: string; - /** Product external button text. Only for external products. */ - button_text?: string; - /** Tax status. */ - tax_status?: IV3ProductsBatchPartialUpdateParamsTaxStatusEnum[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at product level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsBatchPartialUpdateParamsStockStatusEnum[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsBatchPartialUpdateParamsBackordersEnum[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; - /** Allow one item to be bought in a single order. */ - sold_individually?: boolean; - /** Product weight (kg). */ - weight?: string; - /** Product dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Allow reviews. */ - reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ - upsell_ids?: number[]; - /** List of cross-sell products IDs. */ - cross_sell_ids?: number[]; - /** - * Product parent ID. - * @format int64 - */ - parent_id?: number; - /** Optional note to send the customer after purchase. */ - purchase_note?: string; - /** List of categories. */ - categories?: object[]; - /** List of brands. */ - brands?: object[]; - /** List of tags. */ - tags?: object[]; - /** List of images. */ - images?: object[]; - /** List of attributes. */ - attributes?: object[]; - /** Defaults variation attributes. */ - default_attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsSuggestedProductsList - * @request GET:/wc/v3/products/suggested-products - * @secure - */ - v3ProductsSuggestedProductsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsSuggestedProductsListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** - * Limit response to resources published after a given ISO8601 compliant date. - * @format date-time - */ - after?: string; - /** - * Limit response to resources published before a given ISO8601 compliant date. - * @format date-time - */ - before?: string; - /** - * Limit response to resources modified after a given ISO8601 compliant date. - * @format date-time - */ - modified_after?: string; - /** - * Limit response to resources modified before a given ISO8601 compliant date. - * @format date-time - */ - modified_before?: string; - /** Whether to consider GMT post dates when limiting response by published or modified date. */ - dates_are_gmt?: boolean; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3ProductsSuggestedProductsListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3ProductsSuggestedProductsListParamsOrderbyEnum[]; - /** Limit result set to those of particular parent IDs. */ - parent?: number[]; - /** Limit result set to all items except those of a particular parent ID. */ - parent_exclude?: number[]; - /** Limit result set to products assigned a specific brand ID. */ - brand?: string; - /** Limit result set to products with a specific slug. */ - slug?: string; - /** Limit result set to products assigned a specific status. */ - status?: IV3ProductsSuggestedProductsListParamsStatusEnum[]; - /** Limit result set to products assigned a specific type. */ - type?: IV3ProductsSuggestedProductsListParamsTypeEnum[]; - /** Limit result set to products with specific SKU(s). Use commas to separate. */ - sku?: string; - /** Limit result set to featured products. */ - featured?: boolean; - /** Limit result set to products assigned a specific category ID. */ - category?: string; - /** Limit result set to products assigned a specific tag ID. */ - tag?: string; - /** Limit result set to products assigned a specific shipping class ID. */ - shipping_class?: string; - /** Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug. */ - attribute?: string; - /** Limit result set to products with a specific attribute term ID (required an assigned attribute). */ - attribute_term?: string; - /** Limit result set to products in stock or out of stock. */ + /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ in_stock?: boolean; - /** Limit result set to products on sale. */ - on_sale?: boolean; - /** Limit result set to products based on a minimum price. */ - min_price?: string; - /** Limit result set to products based on a maximum price. */ - max_price?: string; - /** Limit meta_data to specific keys. */ - include_meta?: string[]; - /** Ensure meta_data excludes specific keys. */ - exclude_meta?: string[]; - /** Limit result set to specific product categorie ids. */ - categories?: number[]; - /** Limit result set to specific product tag ids. */ - tags?: number[]; + /** If managing stock, this controls if backorders are allowed. */ + backorders?: IV1ProductsBatchUpdateParamsBackordersEnum[]; + /** Allow one item to be bought in a single order. */ + sold_individually?: boolean; + /** Product weight (kg). */ + weight?: string; + /** Product dimensions. */ + dimensions?: string; + /** Shipping class slug. */ + shipping_class?: string; + /** Allow reviews. */ + reviews_allowed?: boolean; + /** List of upsell products IDs. */ + upsell_ids?: number[]; + /** List of cross-sell products IDs. */ + cross_sell_ids?: number[]; /** - * Limit result set to specific amount of suggested products. + * Product parent ID. * @format int64 */ - limit?: number; + parent_id?: number; + /** Optional note to send the customer after purchase. */ + purchase_note?: string; + /** List of categories. */ + categories?: object[]; + /** List of tags. */ + tags?: object[]; + /** List of images. */ + images?: object[]; + /** List of attributes. */ + attributes?: object[]; + /** Defaults variation attributes. */ + default_attributes?: object[]; + /** List of variations. */ + variations?: object[]; + /** + * Menu order, used to custom sort products. + * @format int64 + */ + menu_order?: number; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/suggested-products`, - method: "GET", + path: `/wc/v1/products/batch`, + method: "PUT", query: query, secure: true, type: ContentType.UrlEncoded, @@ -9271,49 +7186,38 @@ export class Api< * No description * * @tags products - * @name V3ProductsDuplicateCreate - * @request POST:/wc/v3/products/{id}/duplicate + * @name V1ProductsBatchPartialUpdate + * @request PATCH:/wc/v1/products/batch * @secure */ - v3ProductsDuplicateCreate: ( - id: number, - data: { + v1ProductsBatchPartialUpdate: ( + query?: { /** Product name. */ name?: string; /** Product slug. */ slug?: string; - /** The date the product was created, in the site's timezone. */ - date_created?: null; - /** The date the product was created, as GMT. */ - date_created_gmt?: null; /** Product type. */ - type?: ITypeEnum6[]; + type?: IV1ProductsBatchPartialUpdateParamsTypeEnum[]; /** Product status (post status). */ - status?: IStatusEnum9[]; + status?: IV1ProductsBatchPartialUpdateParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: ICatalogVisibilityEnum3[]; + catalog_visibility?: IV1ProductsBatchPartialUpdateParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Stock Keeping Unit. */ + /** Unique identifier. */ sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; /** Product regular price. */ regular_price?: string; /** Product sale price. */ sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; + /** Start date of sale price. */ + date_on_sale_from?: string; + /** End date of sale price. */ + date_on_sale_to?: string; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -9330,6 +7234,8 @@ export class Api< * @format int64 */ download_expiry?: number; + /** Download type, this controls the schema on the front-end. */ + download_type?: IV1ProductsBatchPartialUpdateParamsDownloadTypeEnum[]; /** * Product external URL. Only for external products. * @format uri @@ -9338,7 +7244,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: ITaxStatusEnum3[]; + tax_status?: IV1ProductsBatchPartialUpdateParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -9348,12 +7254,10 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum3[]; + /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ + in_stock?: boolean; /** If managing stock, this controls if backorders are allowed. */ - backorders?: IBackordersEnum3[]; - /** Low Stock amount for the product. */ - low_stock_amount?: number; + backorders?: IV1ProductsBatchPartialUpdateParamsBackordersEnum[]; /** Allow one item to be bought in a single order. */ sold_individually?: boolean; /** Product weight (kg). */ @@ -9364,9 +7268,7 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** Post password. */ - post_password?: string; - /** List of up-sell products IDs. */ + /** List of upsell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -9379,8 +7281,6 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; - /** List of brands. */ - brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -9389,552 +7289,18 @@ export class Api< attributes?: object[]; /** Defaults variation attributes. */ default_attributes?: object[]; + /** List of variations. */ + variations?: object[]; /** * Menu order, used to custom sort products. * @format int64 */ menu_order?: number; - /** Meta data. */ - meta_data?: object[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/products/${id}/duplicate`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsVariationsList - * @request GET:/wc/v3/products/{product_id}/variations - * @secure - */ - v3ProductsVariationsList: ( - productId: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsVariationsListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** - * Limit response to resources published after a given ISO8601 compliant date. - * @format date-time - */ - after?: string; - /** - * Limit response to resources published before a given ISO8601 compliant date. - * @format date-time - */ - before?: string; - /** - * Limit response to resources modified after a given ISO8601 compliant date. - * @format date-time - */ - modified_after?: string; - /** - * Limit response to resources modified before a given ISO8601 compliant date. - * @format date-time - */ - modified_before?: string; - /** Whether to consider GMT post dates when limiting response by published or modified date. */ - dates_are_gmt?: boolean; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3ProductsVariationsListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3ProductsVariationsListParamsOrderbyEnum[]; - /** Limit result set to those of particular parent IDs. */ - parent?: number[]; - /** Limit result set to all items except those of a particular parent ID. */ - parent_exclude?: number[]; - /** Limit result set to products with a specific slug. */ - slug?: string; - /** Limit result set to products assigned a specific status. */ - status?: IV3ProductsVariationsListParamsStatusEnum[]; - /** Limit result set to products with specific SKU(s). Use commas to separate. */ - sku?: string; - /** Limit result set to products on sale. */ - on_sale?: boolean; - /** Limit result set to products based on a minimum price. */ - min_price?: string; - /** Limit result set to products based on a maximum price. */ - max_price?: string; - /** Limit meta_data to specific keys. */ - include_meta?: string[]; - /** Ensure meta_data excludes specific keys. */ - exclude_meta?: string[]; - /** Limit result set to products with specified stock status. */ - stock_status?: IV3ProductsVariationsListParamsStockStatusEnum[]; - /** Limit result set to products with or without price. */ - has_price?: boolean; - /** Limit result set to products with specified attributes. */ - attributes?: object[]; - /** Limit result set to virtual product variations. */ - virtual?: boolean; - /** Limit result set to downloadable product variations. */ - downloadable?: boolean; - /** Limit result set to product variations with any of the statuses. */ - include_status?: string[]; - /** Exclude product variations with any of the statuses from result set. */ - exclude_status?: string[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}/variations`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsVariationsCreate - * @request POST:/wc/v3/products/{product_id}/variations - * @secure - */ - v3ProductsVariationsCreate: ( - productId: number, - data: { - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; - /** Variation status. */ - status?: IStatusEnum10[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: ITaxStatusEnum4[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum4[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IBackordersEnum4[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}/variations`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsDetail2 - * @request GET:/wc/v3/products/{product_id} - * @originalName v3ProductsDetail - * @duplicate - * @secure - */ - v3ProductsDetail2: ( - productId: number, - query?: { - /** - * Unique identifier for the variation. - * @format int64 - */ - id?: number; - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ProductsDetail2ParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsCreate3 - * @request POST:/wc/v3/products/{product_id} - * @originalName v3ProductsCreate - * @duplicate - * @secure - */ - v3ProductsCreate3: ( - productId: number, - data: { - /** - * Unique identifier for the variation. - * @format int64 - */ - id?: number; - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; - /** Variation status. */ - status?: IStatusEnum11[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: ITaxStatusEnum5[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum5[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IBackordersEnum5[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsUpdate2 - * @request PUT:/wc/v3/products/{product_id} - * @originalName v3ProductsUpdate - * @duplicate - * @secure - */ - v3ProductsUpdate2: ( - productId: number, - query?: { - /** - * Unique identifier for the variation. - * @format int64 - */ - id?: number; - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; - /** Variation status. */ - status?: IV3ProductsUpdate2ParamsStatusEnum[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: IV3ProductsUpdate2ParamsTaxStatusEnum[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsUpdate2ParamsStockStatusEnum[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsUpdate2ParamsBackordersEnum[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsPartialUpdate2 - * @request PATCH:/wc/v3/products/{product_id} - * @originalName v3ProductsPartialUpdate - * @duplicate - * @secure - */ - v3ProductsPartialUpdate2: ( - productId: number, - query?: { - /** - * Unique identifier for the variation. - * @format int64 - */ - id?: number; - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; - /** Variation status. */ - status?: IV3ProductsPartialUpdate2ParamsStatusEnum[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: IV3ProductsPartialUpdate2ParamsTaxStatusEnum[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsPartialUpdate2ParamsStockStatusEnum[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsPartialUpdate2ParamsBackordersEnum[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}`, + path: `/wc/v1/products/batch`, method: "PATCH", query: query, secure: true, @@ -9942,517 +7308,20 @@ export class Api< ...params, }), - /** - * No description - * - * @tags products - * @name V3ProductsDelete2 - * @request DELETE:/wc/v3/products/{product_id} - * @originalName v3ProductsDelete - * @duplicate - * @secure - */ - v3ProductsDelete2: ( - productId: number, - query?: { - /** - * Unique identifier for the variation. - * @format int64 - */ - id?: number; - /** Whether to bypass trash and force deletion. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsVariationsBatchCreate - * @request POST:/wc/v3/products/{product_id}/variations/batch - * @secure - */ - v3ProductsVariationsBatchCreate: ( - productId: number, - data: { - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; - /** Variation status. */ - status?: IStatusEnum12[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: ITaxStatusEnum6[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum6[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IBackordersEnum6[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}/variations/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsVariationsBatchUpdate - * @request PUT:/wc/v3/products/{product_id}/variations/batch - * @secure - */ - v3ProductsVariationsBatchUpdate: ( - productId: number, - query?: { - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; - /** Variation status. */ - status?: IV3ProductsVariationsBatchUpdateParamsStatusEnum[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: IV3ProductsVariationsBatchUpdateParamsTaxStatusEnum[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsVariationsBatchUpdateParamsStockStatusEnum[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsVariationsBatchUpdateParamsBackordersEnum[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}/variations/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsVariationsBatchPartialUpdate - * @request PATCH:/wc/v3/products/{product_id}/variations/batch - * @secure - */ - v3ProductsVariationsBatchPartialUpdate: ( - productId: number, - query?: { - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: any; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: any; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: any; - /** Variation status. */ - status?: IV3ProductsVariationsBatchPartialUpdateParamsStatusEnum[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: IV3ProductsVariationsBatchPartialUpdateParamsTaxStatusEnum[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IV3ProductsVariationsBatchPartialUpdateParamsStockStatusEnum[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV3ProductsVariationsBatchPartialUpdateParamsBackordersEnum[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}/variations/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V3ProductsVariationsGenerateCreate - * @request POST:/wc/v3/products/{product_id}/variations/generate - * @secure - */ - v3ProductsVariationsGenerateCreate: ( - productId: number, - data: { - /** Deletes unused variations. */ - delete?: boolean; - /** Default values for generated variations. */ - default_values?: string; - /** Variation description. */ - description?: string; - /** Stock Keeping Unit. */ - sku?: string; - /** GTIN, UPC, EAN or ISBN. */ - global_unique_id?: string; - /** Variation regular price. */ - regular_price?: string; - /** Variation sale price. */ - sale_price?: string; - /** Start date of sale price, in the site's timezone. */ - date_on_sale_from?: null; - /** Start date of sale price, as GMT. */ - date_on_sale_from_gmt?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to?: null; - /** End date of sale price, in the site's timezone. */ - date_on_sale_to_gmt?: null; - /** Variation status. */ - status?: IStatusEnum13[]; - /** If the variation is virtual. */ - virtual?: boolean; - /** If the variation is downloadable. */ - downloadable?: boolean; - /** List of downloadable files. */ - downloads?: object[]; - /** - * Number of times downloadable files can be downloaded after purchase. - * @format int64 - */ - download_limit?: number; - /** - * Number of days until access to downloadable files expires. - * @format int64 - */ - download_expiry?: number; - /** Tax status. */ - tax_status?: ITaxStatusEnum7[]; - /** Tax class. */ - tax_class?: string; - /** Stock management at variation level. */ - manage_stock?: boolean; - /** - * Stock quantity. - * @format int64 - */ - stock_quantity?: number; - /** Controls the stock status of the product. */ - stock_status?: IStockStatusEnum7[]; - /** If managing stock, this controls if backorders are allowed. */ - backorders?: IBackordersEnum7[]; - /** Low Stock amount for the variation. */ - low_stock_amount?: number; - /** Variation weight (kg). */ - weight?: string; - /** Variation dimensions. */ - dimensions?: string; - /** Shipping class slug. */ - shipping_class?: string; - /** Variation image data. */ - image?: string; - /** List of attributes. */ - attributes?: object[]; - /** - * Menu order, used to custom sort products. - * @format int64 - */ - menu_order?: number; - /** Meta data. */ - meta_data?: object[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/products/${productId}/variations/generate`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags refunds - * @name V3RefundsList - * @request GET:/wc/v3/refunds - * @secure - */ - v3RefundsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3RefundsListParamsContextEnum[]; - /** - * Current page of the collection. - * @format int64 - * @min 1 - */ - page?: number; - /** - * Maximum number of items to be returned in result set. - * @format int64 - * @min 1 - * @max 100 - */ - per_page?: number; - /** Limit results to those matching a string. */ - search?: string; - /** - * Limit response to resources published after a given ISO8601 compliant date. - * @format date-time - */ - after?: string; - /** - * Limit response to resources published before a given ISO8601 compliant date. - * @format date-time - */ - before?: string; - /** - * Limit response to resources modified after a given ISO8601 compliant date. - * @format date-time - */ - modified_after?: string; - /** - * Limit response to resources modified before a given ISO8601 compliant date. - * @format date-time - */ - modified_before?: string; - /** Whether to consider GMT post dates when limiting response by published or modified date. */ - dates_are_gmt?: boolean; - /** Ensure result set excludes specific IDs. */ - exclude?: number[]; - /** Limit result set to specific ids. */ - include?: number[]; - /** - * Offset the result set by a specific number of items. - * @format int64 - */ - offset?: number; - /** Order sort attribute ascending or descending. */ - order?: IV3RefundsListParamsOrderEnum[]; - /** Sort collection by object attribute. */ - orderby?: IV3RefundsListParamsOrderbyEnum[]; - /** Limit result set to those of particular parent IDs. */ - parent?: number[]; - /** Limit result set to all items except those of a particular parent ID. */ - parent_exclude?: number[]; - /** - * Number of decimal points to use in each resource. - * @format int64 - */ - dp?: number; - /** Only show meta which is meant to be displayed for an order. */ - order_item_display_meta?: boolean; - /** Limit meta_data to specific keys. */ - include_meta?: string[]; - /** Ensure meta_data excludes specific keys. */ - exclude_meta?: string[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/refunds`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - /** * No description * * @tags reports - * @name V3ReportsSalesList - * @request GET:/wc/v3/reports/sales + * @name V1ReportsSalesList + * @request GET:/wc/v1/reports/sales * @secure */ - v3ReportsSalesList: ( + v1ReportsSalesList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsSalesListParamsContextEnum[]; + context?: IV1ReportsSalesListParamsContextEnum[]; /** Report period. */ - period?: IV3ReportsSalesListParamsPeriodEnum[]; + period?: IV1ReportsSalesListParamsPeriodEnum[]; /** * Return sales for a specific start date, the date need to be in the YYYY-MM-DD format. * @format date @@ -10467,7 +7336,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/reports/sales`, + path: `/wc/v1/reports/sales`, method: "GET", query: query, secure: true, @@ -10479,16 +7348,16 @@ export class Api< * No description * * @tags reports - * @name V3ReportsTopSellersList - * @request GET:/wc/v3/reports/top_sellers + * @name V1ReportsTopSellersList + * @request GET:/wc/v1/reports/top_sellers * @secure */ - v3ReportsTopSellersList: ( + v1ReportsTopSellersList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsTopSellersListParamsContextEnum[]; + context?: IV1ReportsTopSellersListParamsContextEnum[]; /** Report period. */ - period?: IV3ReportsTopSellersListParamsPeriodEnum[]; + period?: IV1ReportsTopSellersListParamsPeriodEnum[]; /** * Return sales for a specific start date, the date need to be in the YYYY-MM-DD format. * @format date @@ -10503,7 +7372,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/reports/top_sellers`, + path: `/wc/v1/reports/top_sellers`, method: "GET", query: query, secure: true, @@ -10515,940 +7384,19 @@ export class Api< * No description * * @tags reports - * @name V3ReportsOrdersTotalsList - * @request GET:/wc/v3/reports/orders/totals + * @name V1ReportsList + * @request GET:/wc/v1/reports * @secure */ - v3ReportsOrdersTotalsList: ( + v1ReportsList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsOrdersTotalsListParamsContextEnum[]; + context?: IV1ReportsListParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/reports/orders/totals`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags reports - * @name V3ReportsProductsTotalsList - * @request GET:/wc/v3/reports/products/totals - * @secure - */ - v3ReportsProductsTotalsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsProductsTotalsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/reports/products/totals`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags reports - * @name V3ReportsCustomersTotalsList - * @request GET:/wc/v3/reports/customers/totals - * @secure - */ - v3ReportsCustomersTotalsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsCustomersTotalsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/reports/customers/totals`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags reports - * @name V3ReportsCouponsTotalsList - * @request GET:/wc/v3/reports/coupons/totals - * @secure - */ - v3ReportsCouponsTotalsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsCouponsTotalsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/reports/coupons/totals`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags reports - * @name V3ReportsReviewsTotalsList - * @request GET:/wc/v3/reports/reviews/totals - * @secure - */ - v3ReportsReviewsTotalsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsReviewsTotalsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/reports/reviews/totals`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags reports - * @name V3ReportsList - * @request GET:/wc/v3/reports - * @secure - */ - v3ReportsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ReportsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/reports`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsList - * @request GET:/wc/v3/settings - * @secure - */ - v3SettingsList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/settings`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsBatchCreate - * @request POST:/wc/v3/settings/batch - * @secure - */ - v3SettingsBatchCreate: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/settings/batch`, - method: "POST", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsBatchUpdate - * @request PUT:/wc/v3/settings/batch - * @secure - */ - v3SettingsBatchUpdate: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/settings/batch`, - method: "PUT", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsBatchPartialUpdate - * @request PATCH:/wc/v3/settings/batch - * @secure - */ - v3SettingsBatchPartialUpdate: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/settings/batch`, - method: "PATCH", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsDetail - * @request GET:/wc/v3/settings/{group_id} - * @secure - */ - v3SettingsDetail: ( - groupId: string, - query?: { - /** Settings group ID. */ - group?: string; - /** Unique identifier for the resource. */ - id?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/settings/${groupId}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsCreate - * @request POST:/wc/v3/settings/{group_id} - * @secure - */ - v3SettingsCreate: ( - groupId: string, - data: { - /** Settings group ID. */ - group?: string; - /** Unique identifier for the resource. */ - id?: string; - /** Setting value. */ - value?: null; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/settings/${groupId}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsUpdate - * @request PUT:/wc/v3/settings/{group_id} - * @secure - */ - v3SettingsUpdate: ( - groupId: string, - query?: { - /** Settings group ID. */ - group?: string; - /** Unique identifier for the resource. */ - id?: string; - /** Setting value. */ - value?: any; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/settings/${groupId}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsPartialUpdate - * @request PATCH:/wc/v3/settings/{group_id} - * @secure - */ - v3SettingsPartialUpdate: ( - groupId: string, - query?: { - /** Settings group ID. */ - group?: string; - /** Unique identifier for the resource. */ - id?: string; - /** Setting value. */ - value?: any; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/settings/${groupId}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsBatchCreate2 - * @request POST:/wc/v3/settings/{group_id}/batch - * @originalName v3SettingsBatchCreate - * @duplicate - * @secure - */ - v3SettingsBatchCreate2: ( - groupId: string, - data: { - /** Settings group ID. */ - group?: string; - /** Setting value. */ - value?: null; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/settings/${groupId}/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsBatchUpdate2 - * @request PUT:/wc/v3/settings/{group_id}/batch - * @originalName v3SettingsBatchUpdate - * @duplicate - * @secure - */ - v3SettingsBatchUpdate2: ( - groupId: string, - query?: { - /** Settings group ID. */ - group?: string; - /** Setting value. */ - value?: any; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/settings/${groupId}/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags settings - * @name V3SettingsBatchPartialUpdate2 - * @request PATCH:/wc/v3/settings/{group_id}/batch - * @originalName v3SettingsBatchPartialUpdate - * @duplicate - * @secure - */ - v3SettingsBatchPartialUpdate2: ( - groupId: string, - query?: { - /** Settings group ID. */ - group?: string; - /** Setting value. */ - value?: any; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/settings/${groupId}/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesList - * @request GET:/wc/v3/shipping/zones - * @secure - */ - v3ShippingZonesList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/shipping/zones`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesCreate - * @request POST:/wc/v3/shipping/zones - * @secure - */ - v3ShippingZonesCreate: ( - data: { - /** Shipping zone name. */ - name: string; - /** - * Shipping zone order. - * @format int64 - */ - order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesDetail - * @request GET:/wc/v3/shipping/zones/{id} - * @secure - */ - v3ShippingZonesDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/shipping/zones/${id}`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesCreate2 - * @request POST:/wc/v3/shipping/zones/{id} - * @originalName v3ShippingZonesCreate - * @duplicate - * @secure - */ - v3ShippingZonesCreate2: ( - id: number, - data: { - /** Shipping zone name. */ - name?: string; - /** - * Shipping zone order. - * @format int64 - */ - order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesUpdate - * @request PUT:/wc/v3/shipping/zones/{id} - * @secure - */ - v3ShippingZonesUpdate: ( - id: number, - query?: { - /** Shipping zone name. */ - name?: string; - /** - * Shipping zone order. - * @format int64 - */ - order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesPartialUpdate - * @request PATCH:/wc/v3/shipping/zones/{id} - * @secure - */ - v3ShippingZonesPartialUpdate: ( - id: number, - query?: { - /** Shipping zone name. */ - name?: string; - /** - * Shipping zone order. - * @format int64 - */ - order?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesDelete - * @request DELETE:/wc/v3/shipping/zones/{id} - * @secure - */ - v3ShippingZonesDelete: ( - id: number, - query?: { - /** Whether to bypass trash and force deletion. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesLocationsList - * @request GET:/wc/v3/shipping/zones/{id}/locations - * @secure - */ - v3ShippingZonesLocationsList: (id: number, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/shipping/zones/${id}/locations`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesLocationsCreate - * @request POST:/wc/v3/shipping/zones/{id}/locations - * @secure - */ - v3ShippingZonesLocationsCreate: ( - id: number, - data: { - /** Shipping zone location code. */ - code?: string; - /** Shipping zone location type. */ - type?: ITypeEnum7[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${id}/locations`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesLocationsUpdate - * @request PUT:/wc/v3/shipping/zones/{id}/locations - * @secure - */ - v3ShippingZonesLocationsUpdate: ( - id: number, - query?: { - /** Shipping zone location code. */ - code?: string; - /** Shipping zone location type. */ - type?: IV3ShippingZonesLocationsUpdateParamsTypeEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${id}/locations`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesLocationsPartialUpdate - * @request PATCH:/wc/v3/shipping/zones/{id}/locations - * @secure - */ - v3ShippingZonesLocationsPartialUpdate: ( - id: number, - query?: { - /** Shipping zone location code. */ - code?: string; - /** Shipping zone location type. */ - type?: IV3ShippingZonesLocationsPartialUpdateParamsTypeEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${id}/locations`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesMethodsList - * @request GET:/wc/v3/shipping/zones/{zone_id}/methods - * @secure - */ - v3ShippingZonesMethodsList: (zoneId: number, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/shipping/zones/${zoneId}/methods`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesMethodsCreate - * @request POST:/wc/v3/shipping/zones/{zone_id}/methods - * @secure - */ - v3ShippingZonesMethodsCreate: ( - zoneId: number, - data: { - /** - * Shipping method sort order. - * @format int64 - */ - order?: number; - /** Shipping method enabled status. */ - enabled?: boolean; - /** Shipping method settings. */ - settings?: string; - /** Shipping method ID. */ - method_id: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${zoneId}/methods`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesDetail2 - * @request GET:/wc/v3/shipping/zones/{zone_id} - * @originalName v3ShippingZonesDetail - * @duplicate - * @secure - */ - v3ShippingZonesDetail2: ( - zoneId: number, - query?: { - /** - * Unique ID for the instance. - * @format int64 - */ - instance_id?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${zoneId}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesCreate3 - * @request POST:/wc/v3/shipping/zones/{zone_id} - * @originalName v3ShippingZonesCreate - * @duplicate - * @secure - */ - v3ShippingZonesCreate3: ( - zoneId: number, - data: { - /** - * Unique ID for the instance. - * @format int64 - */ - instance_id?: number; - /** - * Shipping method sort order. - * @format int64 - */ - order?: number; - /** Shipping method enabled status. */ - enabled?: boolean; - /** Shipping method settings. */ - settings?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${zoneId}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesUpdate2 - * @request PUT:/wc/v3/shipping/zones/{zone_id} - * @originalName v3ShippingZonesUpdate - * @duplicate - * @secure - */ - v3ShippingZonesUpdate2: ( - zoneId: number, - query?: { - /** - * Unique ID for the instance. - * @format int64 - */ - instance_id?: number; - /** - * Shipping method sort order. - * @format int64 - */ - order?: number; - /** Shipping method enabled status. */ - enabled?: boolean; - /** Shipping method settings. */ - settings?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${zoneId}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesPartialUpdate2 - * @request PATCH:/wc/v3/shipping/zones/{zone_id} - * @originalName v3ShippingZonesPartialUpdate - * @duplicate - * @secure - */ - v3ShippingZonesPartialUpdate2: ( - zoneId: number, - query?: { - /** - * Unique ID for the instance. - * @format int64 - */ - instance_id?: number; - /** - * Shipping method sort order. - * @format int64 - */ - order?: number; - /** Shipping method enabled status. */ - enabled?: boolean; - /** Shipping method settings. */ - settings?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${zoneId}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping - * @name V3ShippingZonesDelete2 - * @request DELETE:/wc/v3/shipping/zones/{zone_id} - * @originalName v3ShippingZonesDelete - * @duplicate - * @secure - */ - v3ShippingZonesDelete2: ( - zoneId: number, - query?: { - /** - * Unique ID for the instance. - * @format int64 - */ - instance_id?: number; - /** Whether to bypass trash and force deletion. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping/zones/${zoneId}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags taxes - * @name V3TaxesClassesList - * @request GET:/wc/v3/taxes/classes - * @secure - */ - v3TaxesClassesList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3TaxesClassesListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/taxes/classes`, + path: `/wc/v1/reports`, method: "GET", query: query, secure: true, @@ -11460,11 +7408,35 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesClassesCreate - * @request POST:/wc/v3/taxes/classes + * @name V1TaxesClassesList + * @request GET:/wc/v1/taxes/classes * @secure */ - v3TaxesClassesCreate: ( + v1TaxesClassesList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1TaxesClassesListParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v1/taxes/classes`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags taxes + * @name V1TaxesClassesCreate + * @request POST:/wc/v1/taxes/classes + * @secure + */ + v1TaxesClassesCreate: ( data: { /** Tax class name. */ name: string; @@ -11472,7 +7444,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/classes`, + path: `/wc/v1/taxes/classes`, method: "POST", body: data, secure: true, @@ -11484,28 +7456,11 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesClassesDetail - * @request GET:/wc/v3/taxes/classes/{slug} + * @name V1TaxesClassesDelete + * @request DELETE:/wc/v1/taxes/classes/{slug} * @secure */ - v3TaxesClassesDetail: (slug: string, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/taxes/classes/${slug}`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags taxes - * @name V3TaxesClassesDelete - * @request DELETE:/wc/v3/taxes/classes/{slug} - * @secure - */ - v3TaxesClassesDelete: ( + v1TaxesClassesDelete: ( slug: string, query?: { /** Required to be true, as resource does not support trashing. */ @@ -11514,7 +7469,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/classes/${slug}`, + path: `/wc/v1/taxes/classes/${slug}`, method: "DELETE", query: query, secure: true, @@ -11526,14 +7481,14 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesList - * @request GET:/wc/v3/taxes + * @name V1TaxesList + * @request GET:/wc/v1/taxes * @secure */ - v3TaxesList: ( + v1TaxesList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3TaxesListParamsContextEnum[]; + context?: IV1TaxesListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -11553,16 +7508,16 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV3TaxesListParamsOrderEnum[]; + order?: IV1TaxesListParamsOrderEnum[]; /** Sort collection by object attribute. */ - orderby?: IV3TaxesListParamsOrderbyEnum[]; + orderby?: IV1TaxesListParamsOrderbyEnum[]; /** Sort by tax class. */ - class?: IV3TaxesListParamsClassEnum[]; + class?: IV1TaxesListParamsClassEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes`, + path: `/wc/v1/taxes`, method: "GET", query: query, secure: true, @@ -11574,19 +7529,19 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesCreate - * @request POST:/wc/v3/taxes + * @name V1TaxesCreate + * @request POST:/wc/v1/taxes * @secure */ - v3TaxesCreate: ( + v1TaxesCreate: ( data: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ + /** Postcode / ZIP. */ postcode?: string; - /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ + /** City name. */ city?: string; /** Tax rate. */ rate?: string; @@ -11608,15 +7563,11 @@ export class Api< order?: number; /** Tax class. */ class?: IClassEnum[]; - /** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */ - postcodes?: string[]; - /** List of city names. Introduced in WooCommerce 5.3. */ - cities?: string[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes`, + path: `/wc/v1/taxes`, method: "POST", body: data, secure: true, @@ -11628,20 +7579,20 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesDetail - * @request GET:/wc/v3/taxes/{id} + * @name V1TaxesDetail + * @request GET:/wc/v1/taxes/{id} * @secure */ - v3TaxesDetail: ( + v1TaxesDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3TaxesDetailParamsContextEnum[]; + context?: IV1TaxesDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/${id}`, + path: `/wc/v1/taxes/${id}`, method: "GET", query: query, secure: true, @@ -11653,22 +7604,22 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesCreate2 - * @request POST:/wc/v3/taxes/{id} - * @originalName v3TaxesCreate + * @name V1TaxesCreate2 + * @request POST:/wc/v1/taxes/{id} + * @originalName v1TaxesCreate * @duplicate * @secure */ - v3TaxesCreate2: ( + v1TaxesCreate2: ( id: number, data: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ + /** Postcode / ZIP. */ postcode?: string; - /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ + /** City name. */ city?: string; /** Tax rate. */ rate?: string; @@ -11690,15 +7641,11 @@ export class Api< order?: number; /** Tax class. */ class?: IClassEnum1[]; - /** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */ - postcodes?: string[]; - /** List of city names. Introduced in WooCommerce 5.3. */ - cities?: string[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/${id}`, + path: `/wc/v1/taxes/${id}`, method: "POST", body: data, secure: true, @@ -11710,20 +7657,20 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesUpdate - * @request PUT:/wc/v3/taxes/{id} + * @name V1TaxesUpdate + * @request PUT:/wc/v1/taxes/{id} * @secure */ - v3TaxesUpdate: ( + v1TaxesUpdate: ( id: number, query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ + /** Postcode / ZIP. */ postcode?: string; - /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ + /** City name. */ city?: string; /** Tax rate. */ rate?: string; @@ -11744,16 +7691,12 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV3TaxesUpdateParamsClassEnum[]; - /** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */ - postcodes?: string[]; - /** List of city names. Introduced in WooCommerce 5.3. */ - cities?: string[]; + class?: IV1TaxesUpdateParamsClassEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/${id}`, + path: `/wc/v1/taxes/${id}`, method: "PUT", query: query, secure: true, @@ -11765,20 +7708,20 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesPartialUpdate - * @request PATCH:/wc/v3/taxes/{id} + * @name V1TaxesPartialUpdate + * @request PATCH:/wc/v1/taxes/{id} * @secure */ - v3TaxesPartialUpdate: ( + v1TaxesPartialUpdate: ( id: number, query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ + /** Postcode / ZIP. */ postcode?: string; - /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ + /** City name. */ city?: string; /** Tax rate. */ rate?: string; @@ -11799,16 +7742,12 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV3TaxesPartialUpdateParamsClassEnum[]; - /** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */ - postcodes?: string[]; - /** List of city names. Introduced in WooCommerce 5.3. */ - cities?: string[]; + class?: IV1TaxesPartialUpdateParamsClassEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/${id}`, + path: `/wc/v1/taxes/${id}`, method: "PATCH", query: query, secure: true, @@ -11820,11 +7759,11 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesDelete - * @request DELETE:/wc/v3/taxes/{id} + * @name V1TaxesDelete + * @request DELETE:/wc/v1/taxes/{id} * @secure */ - v3TaxesDelete: ( + v1TaxesDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -11833,7 +7772,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/${id}`, + path: `/wc/v1/taxes/${id}`, method: "DELETE", query: query, secure: true, @@ -11845,19 +7784,19 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesBatchCreate - * @request POST:/wc/v3/taxes/batch + * @name V1TaxesBatchCreate + * @request POST:/wc/v1/taxes/batch * @secure */ - v3TaxesBatchCreate: ( + v1TaxesBatchCreate: ( data: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ + /** Postcode / ZIP. */ postcode?: string; - /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ + /** City name. */ city?: string; /** Tax rate. */ rate?: string; @@ -11879,15 +7818,11 @@ export class Api< order?: number; /** Tax class. */ class?: IClassEnum2[]; - /** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */ - postcodes?: string[]; - /** List of city names. Introduced in WooCommerce 5.3. */ - cities?: string[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/batch`, + path: `/wc/v1/taxes/batch`, method: "POST", body: data, secure: true, @@ -11899,19 +7834,19 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesBatchUpdate - * @request PUT:/wc/v3/taxes/batch + * @name V1TaxesBatchUpdate + * @request PUT:/wc/v1/taxes/batch * @secure */ - v3TaxesBatchUpdate: ( + v1TaxesBatchUpdate: ( query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ + /** Postcode / ZIP. */ postcode?: string; - /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ + /** City name. */ city?: string; /** Tax rate. */ rate?: string; @@ -11932,16 +7867,12 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV3TaxesBatchUpdateParamsClassEnum[]; - /** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */ - postcodes?: string[]; - /** List of city names. Introduced in WooCommerce 5.3. */ - cities?: string[]; + class?: IV1TaxesBatchUpdateParamsClassEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/batch`, + path: `/wc/v1/taxes/batch`, method: "PUT", query: query, secure: true, @@ -11953,19 +7884,19 @@ export class Api< * No description * * @tags taxes - * @name V3TaxesBatchPartialUpdate - * @request PATCH:/wc/v3/taxes/batch + * @name V1TaxesBatchPartialUpdate + * @request PATCH:/wc/v1/taxes/batch * @secure */ - v3TaxesBatchPartialUpdate: ( + v1TaxesBatchPartialUpdate: ( query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ + /** Postcode / ZIP. */ postcode?: string; - /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ + /** City name. */ city?: string; /** Tax rate. */ rate?: string; @@ -11986,16 +7917,12 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV3TaxesBatchPartialUpdateParamsClassEnum[]; - /** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */ - postcodes?: string[]; - /** List of city names. Introduced in WooCommerce 5.3. */ - cities?: string[]; + class?: IV1TaxesBatchPartialUpdateParamsClassEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/taxes/batch`, + path: `/wc/v1/taxes/batch`, method: "PATCH", query: query, secure: true, @@ -12007,14 +7934,14 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksList - * @request GET:/wc/v3/webhooks + * @name V1WebhooksList + * @request GET:/wc/v1/webhooks * @secure */ - v3WebhooksList: ( + v1WebhooksList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3WebhooksListParamsContextEnum[]; + context?: IV1WebhooksListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -12050,16 +7977,16 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV3WebhooksListParamsOrderEnum[]; + order?: IV1WebhooksListParamsOrderEnum[]; /** Sort collection by object attribute. */ - orderby?: IV3WebhooksListParamsOrderbyEnum[]; + orderby?: IV1WebhooksListParamsOrderbyEnum[]; /** Limit result set to webhooks assigned a specific status. */ - status?: IV3WebhooksListParamsStatusEnum[]; + status?: IV1WebhooksListParamsStatusEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks`, + path: `/wc/v1/webhooks`, method: "GET", query: query, secure: true, @@ -12071,16 +7998,16 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksCreate - * @request POST:/wc/v3/webhooks + * @name V1WebhooksCreate + * @request POST:/wc/v1/webhooks * @secure */ - v3WebhooksCreate: ( + v1WebhooksCreate: ( data: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IStatusEnum14[]; + status?: IStatusEnum6[]; /** Webhook topic. */ topic: string; /** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */ @@ -12091,7 +8018,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks`, + path: `/wc/v1/webhooks`, method: "POST", body: data, secure: true, @@ -12103,20 +8030,20 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksDetail - * @request GET:/wc/v3/webhooks/{id} + * @name V1WebhooksDetail + * @request GET:/wc/v1/webhooks/{id} * @secure */ - v3WebhooksDetail: ( + v1WebhooksDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3WebhooksDetailParamsContextEnum[]; + context?: IV1WebhooksDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/${id}`, + path: `/wc/v1/webhooks/${id}`, method: "GET", query: query, secure: true, @@ -12128,19 +8055,19 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksCreate2 - * @request POST:/wc/v3/webhooks/{id} - * @originalName v3WebhooksCreate + * @name V1WebhooksCreate2 + * @request POST:/wc/v1/webhooks/{id} + * @originalName v1WebhooksCreate * @duplicate * @secure */ - v3WebhooksCreate2: ( + v1WebhooksCreate2: ( id: number, data: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IStatusEnum15[]; + status?: IStatusEnum7[]; /** Webhook topic. */ topic?: string; /** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */ @@ -12149,7 +8076,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/${id}`, + path: `/wc/v1/webhooks/${id}`, method: "POST", body: data, secure: true, @@ -12161,17 +8088,17 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksUpdate - * @request PUT:/wc/v3/webhooks/{id} + * @name V1WebhooksUpdate + * @request PUT:/wc/v1/webhooks/{id} * @secure */ - v3WebhooksUpdate: ( + v1WebhooksUpdate: ( id: number, query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV3WebhooksUpdateParamsStatusEnum[]; + status?: IV1WebhooksUpdateParamsStatusEnum[]; /** Webhook topic. */ topic?: string; /** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */ @@ -12180,7 +8107,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/${id}`, + path: `/wc/v1/webhooks/${id}`, method: "PUT", query: query, secure: true, @@ -12192,17 +8119,17 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksPartialUpdate - * @request PATCH:/wc/v3/webhooks/{id} + * @name V1WebhooksPartialUpdate + * @request PATCH:/wc/v1/webhooks/{id} * @secure */ - v3WebhooksPartialUpdate: ( + v1WebhooksPartialUpdate: ( id: number, query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV3WebhooksPartialUpdateParamsStatusEnum[]; + status?: IV1WebhooksPartialUpdateParamsStatusEnum[]; /** Webhook topic. */ topic?: string; /** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */ @@ -12211,7 +8138,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/${id}`, + path: `/wc/v1/webhooks/${id}`, method: "PATCH", query: query, secure: true, @@ -12223,11 +8150,11 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksDelete - * @request DELETE:/wc/v3/webhooks/{id} + * @name V1WebhooksDelete + * @request DELETE:/wc/v1/webhooks/{id} * @secure */ - v3WebhooksDelete: ( + v1WebhooksDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -12236,7 +8163,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/${id}`, + path: `/wc/v1/webhooks/${id}`, method: "DELETE", query: query, secure: true, @@ -12248,16 +8175,16 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksBatchCreate - * @request POST:/wc/v3/webhooks/batch + * @name V1WebhooksBatchCreate + * @request POST:/wc/v1/webhooks/batch * @secure */ - v3WebhooksBatchCreate: ( + v1WebhooksBatchCreate: ( data: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IStatusEnum16[]; + status?: IStatusEnum8[]; /** Webhook topic. */ topic?: string; /** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */ @@ -12266,7 +8193,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/batch`, + path: `/wc/v1/webhooks/batch`, method: "POST", body: data, secure: true, @@ -12278,16 +8205,16 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksBatchUpdate - * @request PUT:/wc/v3/webhooks/batch + * @name V1WebhooksBatchUpdate + * @request PUT:/wc/v1/webhooks/batch * @secure */ - v3WebhooksBatchUpdate: ( + v1WebhooksBatchUpdate: ( query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV3WebhooksBatchUpdateParamsStatusEnum[]; + status?: IV1WebhooksBatchUpdateParamsStatusEnum[]; /** Webhook topic. */ topic?: string; /** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */ @@ -12296,7 +8223,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/batch`, + path: `/wc/v1/webhooks/batch`, method: "PUT", query: query, secure: true, @@ -12308,16 +8235,16 @@ export class Api< * No description * * @tags webhooks - * @name V3WebhooksBatchPartialUpdate - * @request PATCH:/wc/v3/webhooks/batch + * @name V1WebhooksBatchPartialUpdate + * @request PATCH:/wc/v1/webhooks/batch * @secure */ - v3WebhooksBatchPartialUpdate: ( + v1WebhooksBatchPartialUpdate: ( query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV3WebhooksBatchPartialUpdateParamsStatusEnum[]; + status?: IV1WebhooksBatchPartialUpdateParamsStatusEnum[]; /** Webhook topic. */ topic?: string; /** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */ @@ -12326,7 +8253,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/webhooks/batch`, + path: `/wc/v1/webhooks/batch`, method: "PATCH", query: query, secure: true, @@ -12337,20 +8264,21 @@ export class Api< /** * No description * - * @tags system_status - * @name V3SystemStatusList - * @request GET:/wc/v3/system_status + * @tags webhooks + * @name V1WebhooksDeliveriesList + * @request GET:/wc/v1/webhooks/{webhook_id}/deliveries * @secure */ - v3SystemStatusList: ( + v1WebhooksDeliveriesList: ( + webhookId: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV3SystemStatusListParamsContextEnum[]; + context?: IV1WebhooksDeliveriesListParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/system_status`, + path: `/wc/v1/webhooks/${webhookId}/deliveries`, method: "GET", query: query, secure: true, @@ -12361,647 +8289,33 @@ export class Api< /** * No description * - * @tags system_status - * @name V3SystemStatusToolsList - * @request GET:/wc/v3/system_status/tools + * @tags webhooks + * @name V1WebhooksDetail2 + * @request GET:/wc/v1/webhooks/{webhook_id} + * @originalName v1WebhooksDetail + * @duplicate * @secure */ - v3SystemStatusToolsList: ( + v1WebhooksDetail2: ( + webhookId: number, query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3SystemStatusToolsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/system_status/tools`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags system_status - * @name V3SystemStatusToolsDetail - * @request GET:/wc/v3/system_status/tools/{id} - * @secure - */ - v3SystemStatusToolsDetail: (id: string, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/system_status/tools/${id}`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags system_status - * @name V3SystemStatusToolsCreate - * @request POST:/wc/v3/system_status/tools/{id} - * @secure - */ - v3SystemStatusToolsCreate: ( - id: string, - data: { - /** Tool name. */ - name?: string; - /** What running the tool will do. */ - action?: string; - /** Tool description. */ - description?: string; - /** Did the tool run successfully? */ - success?: boolean; - /** Tool return message. */ - message?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/system_status/tools/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags system_status - * @name V3SystemStatusToolsUpdate - * @request PUT:/wc/v3/system_status/tools/{id} - * @secure - */ - v3SystemStatusToolsUpdate: ( - id: string, - query?: { - /** Tool name. */ - name?: string; - /** What running the tool will do. */ - action?: string; - /** Tool description. */ - description?: string; - /** Did the tool run successfully? */ - success?: boolean; - /** Tool return message. */ - message?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/system_status/tools/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags system_status - * @name V3SystemStatusToolsPartialUpdate - * @request PATCH:/wc/v3/system_status/tools/{id} - * @secure - */ - v3SystemStatusToolsPartialUpdate: ( - id: string, - query?: { - /** Tool name. */ - name?: string; - /** What running the tool will do. */ - action?: string; - /** Tool description. */ - description?: string; - /** Did the tool run successfully? */ - success?: boolean; - /** Tool return message. */ - message?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/system_status/tools/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping_methods - * @name V3ShippingMethodsList - * @request GET:/wc/v3/shipping_methods - * @secure - */ - v3ShippingMethodsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ShippingMethodsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping_methods`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags shipping_methods - * @name V3ShippingMethodsDetail - * @request GET:/wc/v3/shipping_methods/{id} - * @secure - */ - v3ShippingMethodsDetail: ( - id: string, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3ShippingMethodsDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/shipping_methods/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags payment_gateways - * @name V3PaymentGatewaysList - * @request GET:/wc/v3/payment_gateways - * @secure - */ - v3PaymentGatewaysList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3PaymentGatewaysListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/payment_gateways`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags payment_gateways - * @name V3PaymentGatewaysDetail - * @request GET:/wc/v3/payment_gateways/{id} - * @secure - */ - v3PaymentGatewaysDetail: ( - id: string, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV3PaymentGatewaysDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/payment_gateways/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags payment_gateways - * @name V3PaymentGatewaysCreate - * @request POST:/wc/v3/payment_gateways/{id} - * @secure - */ - v3PaymentGatewaysCreate: ( - id: string, - data: { - /** Payment gateway title on checkout. */ - title?: string; - /** Payment gateway description on checkout. */ - description?: string; /** - * Payment gateway sort order. + * Unique identifier for the resource. * @format int64 */ - order?: number; - /** Payment gateway enabled status. */ - enabled?: boolean; - /** Payment gateway settings. */ - settings?: string; + id?: number; + /** Scope under which the request is made; determines fields present in response. */ + context?: IV1WebhooksDetail2ParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v3/payment_gateways/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags payment_gateways - * @name V3PaymentGatewaysUpdate - * @request PUT:/wc/v3/payment_gateways/{id} - * @secure - */ - v3PaymentGatewaysUpdate: ( - id: string, - query?: { - /** Payment gateway title on checkout. */ - title?: string; - /** Payment gateway description on checkout. */ - description?: string; - /** - * Payment gateway sort order. - * @format int64 - */ - order?: number; - /** Payment gateway enabled status. */ - enabled?: boolean; - /** Payment gateway settings. */ - settings?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/payment_gateways/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags payment_gateways - * @name V3PaymentGatewaysPartialUpdate - * @request PATCH:/wc/v3/payment_gateways/{id} - * @secure - */ - v3PaymentGatewaysPartialUpdate: ( - id: string, - query?: { - /** Payment gateway title on checkout. */ - title?: string; - /** Payment gateway description on checkout. */ - description?: string; - /** - * Payment gateway sort order. - * @format int64 - */ - order?: number; - /** Payment gateway enabled status. */ - enabled?: boolean; - /** Payment gateway settings. */ - settings?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/payment_gateways/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags data - * @name V3DataList - * @request GET:/wc/v3/data - * @secure - */ - v3DataList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/data`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags data - * @name V3DataContinentsList - * @request GET:/wc/v3/data/continents - * @secure - */ - v3DataContinentsList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/data/continents`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags data - * @name V3DataContinentsDetail - * @request GET:/wc/v3/data/continents/{location} - * @secure - */ - v3DataContinentsDetail: ( - location: string, - query?: { - /** 2 character continent code. */ - continent?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/data/continents/${location}`, + path: `/wc/v1/webhooks/${webhookId}`, method: "GET", query: query, secure: true, type: ContentType.UrlEncoded, ...params, }), - - /** - * No description - * - * @tags data - * @name V3DataCountriesList - * @request GET:/wc/v3/data/countries - * @secure - */ - v3DataCountriesList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/data/countries`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags data - * @name V3DataCountriesDetail - * @request GET:/wc/v3/data/countries/{location} - * @secure - */ - v3DataCountriesDetail: (location: string, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/data/countries/${location}`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags data - * @name V3DataCurrenciesList - * @request GET:/wc/v3/data/currencies - * @secure - */ - v3DataCurrenciesList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/data/currencies`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags data - * @name V3DataCurrenciesCurrentList - * @request GET:/wc/v3/data/currencies/current - * @secure - */ - v3DataCurrenciesCurrentList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/data/currencies/current`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags data - * @name V3DataCurrenciesDetail - * @request GET:/wc/v3/data/currencies/{currency} - * @secure - */ - v3DataCurrenciesDetail: ( - currency: string, - query?: { - /** ISO4217 currency code. */ - location?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/data/currencies/${currency}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersReceiptCreate - * @request POST:/wc/v3/orders/{id}/receipt - * @secure - */ - v3OrdersReceiptCreate: ( - id: number, - data: { - /** Expiration date formatted as yyyy-mm-dd. */ - expiration_date?: string; - /** - * Number of days to be added to the current date to get the expiration date. - * @format int64 - */ - expiration_days?: number; - /** True to force the creation of a new receipt even if one already exists and has not expired yet. */ - force_new?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}/receipt`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersReceiptList - * @request GET:/wc/v3/orders/{id}/receipt - * @secure - */ - v3OrdersReceiptList: (id: number, params: RequestParams = {}) => - this.request({ - path: `/wc/v3/orders/${id}/receipt`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersActionsEmailTemplatesList - * @request GET:/wc/v3/orders/{id}/actions/email_templates - * @secure - */ - v3OrdersActionsEmailTemplatesList: ( - id: number, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}/actions/email_templates`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersActionsSendEmailCreate - * @request POST:/wc/v3/orders/{id}/actions/send_email - * @secure - */ - v3OrdersActionsSendEmailCreate: ( - id: number, - data: { - /** - * Email address to send the order details to. - * @format email - */ - email?: string; - /** Whether to update the billing email of the order, even if it already has one. */ - force_email_update?: boolean; - /** The ID of the template to use for sending the email. */ - template_id: ITemplateIdEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}/actions/send_email`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersActionsSendOrderDetailsCreate - * @request POST:/wc/v3/orders/{id}/actions/send_order_details - * @secure - */ - v3OrdersActionsSendOrderDetailsCreate: ( - id: number, - data: { - /** - * Email address to send the order details to. - * @format email - */ - email?: string; - /** Whether to update the billing email of the order, even if it already has one. */ - force_email_update?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v3/orders/${id}/actions/send_order_details`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags orders - * @name V3OrdersStatusesList - * @request GET:/wc/v3/orders/statuses - * @secure - */ - v3OrdersStatusesList: (params: RequestParams = {}) => - this.request({ - path: `/wc/v3/orders/statuses`, - method: "GET", - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), }; } diff --git a/api/endpoints/getProductList.ts b/api/endpoints/getProductList.ts deleted file mode 100644 index 42ace73..0000000 --- a/api/endpoints/getProductList.ts +++ /dev/null @@ -1,4 +0,0 @@ -import api from '~/api/instance' - -export const getProductList = () => - api.wc.v3ProductsList() diff --git a/api/endpoints/getProductsDetail.ts b/api/endpoints/getProductsDetail.ts new file mode 100644 index 0000000..8040ef3 --- /dev/null +++ b/api/endpoints/getProductsDetail.ts @@ -0,0 +1,8 @@ +import api from '~/api/instance' + +export const getProductsDetail = (productId: number) => + api.wc.v1ProductsDetail(productId) + .then(({ data }) => { + console.log('data', data) + return data + }) diff --git a/api/endpoints/index.ts b/api/endpoints/index.ts index 2f52795..54995b2 100644 --- a/api/endpoints/index.ts +++ b/api/endpoints/index.ts @@ -1 +1 @@ -export * from './getProductList' +export * from './getProductsDetail' diff --git a/api/instance.ts b/api/instance.ts index c407844..d8f060f 100644 --- a/api/instance.ts +++ b/api/instance.ts @@ -3,37 +3,73 @@ import { Api } from '~/api/Api' const requestUrl = 'https://wp.koptilnya.xyz/wp-json' const consumerKey = 'ck_8b5477a1573ce6038ef1367f25d95cede1de4559' const consumerSecret = 'cs_d0ccaa93e8efe4f76eef0b70c9828a58fc53459f' + const authString = `${consumerKey}:${consumerSecret}` const encodedAuth = btoa(unescape(encodeURIComponent(authString))) +// Создаем инстанс API const api = new Api({ - baseUrl: String(requestUrl), -}) - -Object.keys(api.wc).forEach((methodName) => { - const nativeMethod = api.wc[methodName] as typeof Function - const argsNumber = nativeMethod.length - api.wc[methodName] = function (...args) { - let params: Record = {} - if (args.length > argsNumber) { - params = args.pop() - } - - return nativeMethod(...args, { - ...params, + baseUrl: requestUrl, + securityWorker: (securityData) => { + return { headers: { - ...(params.headers as Record ?? {}), - Authorization: `Basic ${encodedAuth}`, + 'Authorization': `Basic ${encodedAuth}`, + 'Content-Type': 'application/json', }, - } as unknown as string) - } + } + }, }) +// Модифицируем методы API для автоматической аутентификации +Object.keys(api.wc).forEach((namespace) => { + const namespaceObj = api.wc[namespace] + + Object.keys(namespaceObj).forEach((methodName) => { + const originalMethod = namespaceObj[methodName] + + namespaceObj[methodName] = async function (...args: any[]) { + try { + // Добавляем заголовки аутентификации + const lastArg = args[args.length - 1] + const options = typeof lastArg === 'object' ? lastArg : {} + + const modifiedOptions = { + ...options, + headers: { + ...(options.headers || {}), + Authorization: `Basic ${encodedAuth}`, + }, + } + + // Заменяем последний аргумент на модифицированные опции + const modifiedArgs = typeof lastArg === 'object' + ? [...args.slice(0, -1), modifiedOptions] + : [...args, modifiedOptions] + + const response = await originalMethod.apply(this, modifiedArgs) + return response.json() + } + catch (error) { + console.error(`API Error in ${namespace}.${methodName}:`, error) + throw error + } + } + }) +}) + +// Переопределяем базовый request для обработки ошибок const nativeRequest = api.request api.request = async function (...args) { - const response = await nativeRequest.call(api, ...args) - return await response.json() + try { + const response = await nativeRequest.call(api, ...args) + console.log('response', response.json()) + return response.data + } + catch (error) { + console.error('API Request Error:', error) + throw error + } } export default api diff --git a/api/queries/index.ts b/api/queries/index.ts index 6347f1c..d24de3a 100644 --- a/api/queries/index.ts +++ b/api/queries/index.ts @@ -1 +1 @@ -export * from './useGetProductList' +export * from './useGetProductsDetail' diff --git a/api/queries/useGetProductList.ts b/api/queries/useGetProductList.ts deleted file mode 100644 index 204595a..0000000 --- a/api/queries/useGetProductList.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { useQuery } from '@tanstack/vue-query' -import { getProductList } from '~/api/endpoints' - -export const useGetProductList = () => { - return useQuery({ - queryKey: ['get-product-list'], - queryFn: () => getProductList(), - }) -} diff --git a/api/queries/useGetProductsDetail.ts b/api/queries/useGetProductsDetail.ts new file mode 100644 index 0000000..6095221 --- /dev/null +++ b/api/queries/useGetProductsDetail.ts @@ -0,0 +1,14 @@ +import { useQuery } from '@tanstack/vue-query' +import { unref, watch } from 'vue' +import { getProductsDetail } from '~/api/endpoints' + +export const useGetProductsDetail = (productId: MaybeRef) => { + const q = useQuery({ + queryKey: ['get-products-detail', unref(productId)], + queryFn: () => getProductsDetail(unref(productId)), + }) + + watch(() => productId, () => q.refetch()) + + return q +} diff --git a/api/useGetProduct.ts b/api/useGetProduct.ts deleted file mode 100644 index c393c72..0000000 --- a/api/useGetProduct.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { useAsyncData } from '#app' - -export function useGetProducts() { - return useAsyncData( - 'products', - async () => { - const response = await $fetch('https://wp.koptilnya.xyz/wp-json/wp/v2/product') - return response - }, - { - server: false, - }, - ) -} diff --git a/pages/index.vue b/pages/index.vue index e65c11d..ac1001e 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -8,7 +8,7 @@