diff --git a/api/Api.ts b/api/Api.ts index 7af0232..b5c7b06 100644 --- a/api/Api.ts +++ b/api/Api.ts @@ -11,19 +11,98 @@ */ /** @default "view" */ -export enum IV1CouponsListParamsContextEnum { +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 { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV1CouponsListParamsOrderEnum { +export enum IV3CouponsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV1CouponsListParamsOrderbyEnum { +export enum IV3CouponsListParamsOrderbyEnum { Date = "date", Id = "id", Include = "include", @@ -40,7 +119,7 @@ export enum IDiscountTypeEnum { } /** @default "view" */ -export enum IV1CouponsDetailParamsContextEnum { +export enum IV3CouponsDetailParamsContextEnum { View = "view", Edit = "edit", } @@ -51,13 +130,13 @@ export enum IDiscountTypeEnum1 { FixedProduct = "fixed_product", } -export enum IV1CouponsUpdateParamsDiscountTypeEnum { +export enum IV3CouponsUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", } -export enum IV1CouponsPartialUpdateParamsDiscountTypeEnum { +export enum IV3CouponsPartialUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", @@ -69,37 +148,37 @@ export enum IDiscountTypeEnum2 { FixedProduct = "fixed_product", } -export enum IV1CouponsBatchUpdateParamsDiscountTypeEnum { +export enum IV3CouponsBatchUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", } -export enum IV1CouponsBatchPartialUpdateParamsDiscountTypeEnum { +export enum IV3CouponsBatchPartialUpdateParamsDiscountTypeEnum { Percent = "percent", FixedCart = "fixed_cart", FixedProduct = "fixed_product", } /** @default "view" */ -export enum IV1CustomersDownloadsListParamsContextEnum { +export enum IV3CustomersDownloadsListParamsContextEnum { View = "view", } /** @default "view" */ -export enum IV1CustomersListParamsContextEnum { +export enum IV3CustomersListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV1CustomersListParamsOrderEnum { +export enum IV3CustomersListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV1CustomersListParamsOrderbyEnum { +export enum IV3CustomersListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -107,7 +186,7 @@ export enum IV1CustomersListParamsOrderbyEnum { } /** @default "customer" */ -export enum IV1CustomersListParamsRoleEnum { +export enum IV3CustomersListParamsRoleEnum { All = "all", Administrator = "administrator", Editor = "editor", @@ -119,37 +198,44 @@ export enum IV1CustomersListParamsRoleEnum { } /** @default "view" */ -export enum IV1CustomersDetailParamsContextEnum { +export enum IV3CustomersDetailParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV1OrdersNotesListParamsContextEnum { +export enum IV3OrdersNotesListParamsContextEnum { + View = "view", + Edit = "edit", +} + +/** @default "any" */ +export enum IV3OrdersNotesListParamsTypeEnum { + Any = "any", + Customer = "customer", + Internal = "internal", +} + +/** @default "view" */ +export enum IV3OrdersDetailParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV1OrdersDetailParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "view" */ -export enum IV1OrdersRefundsListParamsContextEnum { +export enum IV3OrdersRefundsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV1OrdersRefundsListParamsOrderEnum { +export enum IV3OrdersRefundsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV1OrdersRefundsListParamsOrderbyEnum { +export enum IV3OrdersRefundsListParamsOrderbyEnum { Date = "date", Id = "id", Include = "include", @@ -158,33 +244,20 @@ export enum IV1OrdersRefundsListParamsOrderbyEnum { Modified = "modified", } -/** @default "any" */ -export enum IV1OrdersRefundsListParamsStatusEnum { - Any = "any", - Pending = "pending", - Processing = "processing", - OnHold = "on-hold", - Completed = "completed", - Cancelled = "cancelled", - Refunded = "refunded", - Failed = "failed", - CheckoutDraft = "checkout-draft", -} - /** @default "view" */ -export enum IV1OrdersListParamsContextEnum { +export enum IV3OrdersListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV1OrdersListParamsOrderEnum { +export enum IV3OrdersListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV1OrdersListParamsOrderbyEnum { +export enum IV3OrdersListParamsOrderbyEnum { Date = "date", Id = "id", Include = "include", @@ -193,21 +266,9 @@ export enum IV1OrdersListParamsOrderbyEnum { 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", @@ -386,12 +447,13 @@ export enum ICurrencyEnum { } /** @default "view" */ -export enum IV1OrdersDetail2ParamsContextEnum { +export enum IV3OrdersDetail2ParamsContextEnum { View = "view", Edit = "edit", } export enum IStatusEnum1 { + AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -568,7 +630,8 @@ export enum ICurrencyEnum1 { ZMW = "ZMW", } -export enum IV1OrdersUpdateParamsStatusEnum { +export enum IV3OrdersUpdateParamsStatusEnum { + AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -579,7 +642,7 @@ export enum IV1OrdersUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV1OrdersUpdateParamsCurrencyEnum { +export enum IV3OrdersUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -745,7 +808,8 @@ export enum IV1OrdersUpdateParamsCurrencyEnum { ZMW = "ZMW", } -export enum IV1OrdersPartialUpdateParamsStatusEnum { +export enum IV3OrdersPartialUpdateParamsStatusEnum { + AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -756,7 +820,7 @@ export enum IV1OrdersPartialUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV1OrdersPartialUpdateParamsCurrencyEnum { +export enum IV3OrdersPartialUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -923,6 +987,7 @@ export enum IV1OrdersPartialUpdateParamsCurrencyEnum { } export enum IStatusEnum2 { + AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -1099,7 +1164,8 @@ export enum ICurrencyEnum2 { ZMW = "ZMW", } -export enum IV1OrdersBatchUpdateParamsStatusEnum { +export enum IV3OrdersBatchUpdateParamsStatusEnum { + AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -1110,7 +1176,7 @@ export enum IV1OrdersBatchUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV1OrdersBatchUpdateParamsCurrencyEnum { +export enum IV3OrdersBatchUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -1276,7 +1342,8 @@ export enum IV1OrdersBatchUpdateParamsCurrencyEnum { ZMW = "ZMW", } -export enum IV1OrdersBatchPartialUpdateParamsStatusEnum { +export enum IV3OrdersBatchPartialUpdateParamsStatusEnum { + AutoDraft = "auto-draft", Pending = "pending", Processing = "processing", OnHold = "on-hold", @@ -1287,7 +1354,7 @@ export enum IV1OrdersBatchPartialUpdateParamsStatusEnum { CheckoutDraft = "checkout-draft", } -export enum IV1OrdersBatchPartialUpdateParamsCurrencyEnum { +export enum IV3OrdersBatchPartialUpdateParamsCurrencyEnum { AED = "AED", AFN = "AFN", ALL = "ALL", @@ -1454,19 +1521,19 @@ export enum IV1OrdersBatchPartialUpdateParamsCurrencyEnum { } /** @default "view" */ -export enum IV1ProductsAttributesTermsListParamsContextEnum { +export enum IV3ProductsAttributesTermsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV1ProductsAttributesTermsListParamsOrderEnum { +export enum IV3ProductsAttributesTermsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV1ProductsAttributesTermsListParamsOrderbyEnum { +export enum IV3ProductsAttributesTermsListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -1477,13 +1544,13 @@ export enum IV1ProductsAttributesTermsListParamsOrderbyEnum { } /** @default "view" */ -export enum IV1ProductsAttributesDetailParamsContextEnum { +export enum IV3ProductsAttributesDetailParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV1ProductsAttributesListParamsContextEnum { +export enum IV3ProductsAttributesListParamsContextEnum { View = "view", Edit = "edit", } @@ -1502,7 +1569,7 @@ export enum IOrderByEnum { } /** @default "view" */ -export enum IV1ProductsAttributesDetail2ParamsContextEnum { +export enum IV3ProductsAttributesDetail2ParamsContextEnum { View = "view", Edit = "edit", } @@ -1518,22 +1585,22 @@ export enum IOrderByEnum1 { Id = "id", } -export enum IV1ProductsAttributesUpdate2ParamsTypeEnum { +export enum IV3ProductsAttributesUpdate2ParamsTypeEnum { Select = "select", } -export enum IV1ProductsAttributesUpdate2ParamsOrderByEnum { +export enum IV3ProductsAttributesUpdate2ParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", Id = "id", } -export enum IV1ProductsAttributesPartialUpdate2ParamsTypeEnum { +export enum IV3ProductsAttributesPartialUpdate2ParamsTypeEnum { Select = "select", } -export enum IV1ProductsAttributesPartialUpdate2ParamsOrderByEnum { +export enum IV3ProductsAttributesPartialUpdate2ParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", @@ -1551,22 +1618,22 @@ export enum IOrderByEnum2 { Id = "id", } -export enum IV1ProductsAttributesBatchUpdateParamsTypeEnum { +export enum IV3ProductsAttributesBatchUpdateParamsTypeEnum { Select = "select", } -export enum IV1ProductsAttributesBatchUpdateParamsOrderByEnum { +export enum IV3ProductsAttributesBatchUpdateParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", Id = "id", } -export enum IV1ProductsAttributesBatchPartialUpdateParamsTypeEnum { +export enum IV3ProductsAttributesBatchPartialUpdateParamsTypeEnum { Select = "select", } -export enum IV1ProductsAttributesBatchPartialUpdateParamsOrderByEnum { +export enum IV3ProductsAttributesBatchPartialUpdateParamsOrderByEnum { MenuOrder = "menu_order", Name = "name", NameNum = "name_num", @@ -1574,19 +1641,19 @@ export enum IV1ProductsAttributesBatchPartialUpdateParamsOrderByEnum { } /** @default "view" */ -export enum IV1ProductsCategoriesListParamsContextEnum { +export enum IV3ProductsCategoriesListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV1ProductsCategoriesListParamsOrderEnum { +export enum IV3ProductsCategoriesListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "name" */ -export enum IV1ProductsCategoriesListParamsOrderbyEnum { +export enum IV3ProductsCategoriesListParamsOrderbyEnum { Id = "id", Include = "include", Name = "name", @@ -1597,7 +1664,7 @@ export enum IV1ProductsCategoriesListParamsOrderbyEnum { } /** @default "default" */ -export enum IDisplayEnum { +export enum IDisplayEnum3 { Default = "default", Products = "products", Subcategories = "subcategories", @@ -1605,162 +1672,276 @@ export enum IDisplayEnum { } /** @default "view" */ -export enum IV1ProductsCategoriesDetailParamsContextEnum { +export enum IV3ProductsCategoriesDetailParamsContextEnum { View = "view", Edit = "edit", } -export enum IDisplayEnum1 { +export enum IDisplayEnum4 { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV1ProductsCategoriesUpdateParamsDisplayEnum { +export enum IV3ProductsCategoriesUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV1ProductsCategoriesPartialUpdateParamsDisplayEnum { +export enum IV3ProductsCategoriesPartialUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IDisplayEnum2 { +export enum IDisplayEnum5 { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV1ProductsCategoriesBatchUpdateParamsDisplayEnum { +export enum IV3ProductsCategoriesBatchUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -export enum IV1ProductsCategoriesBatchPartialUpdateParamsDisplayEnum { +export enum IV3ProductsCategoriesBatchPartialUpdateParamsDisplayEnum { Default = "default", Products = "products", Subcategories = "subcategories", Both = "both", } -/** @default "view" */ -export enum IV1ProductsReviewsListParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "view" */ -export enum IV1ProductsDetailParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "view" */ -export enum IV1ProductsShippingClassesListParamsContextEnum { - View = "view", - Edit = "edit", -} - /** @default "asc" */ -export enum IV1ProductsShippingClassesListParamsOrderEnum { +export enum IV3ProductsCustomFieldsNamesListParamsOrderEnum { Asc = "asc", Desc = "desc", } -/** @default "name" */ -export enum IV1ProductsShippingClassesListParamsOrderbyEnum { - Id = "id", - Include = "include", - Name = "name", - Slug = "slug", - TermGroup = "term_group", - Description = "description", - Count = "count", -} - /** @default "view" */ -export enum IV1ProductsShippingClassesDetailParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "view" */ -export enum IV1ProductsTagsListParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "asc" */ -export enum IV1ProductsTagsListParamsOrderEnum { - Asc = "asc", - Desc = "desc", -} - -/** @default "name" */ -export enum IV1ProductsTagsListParamsOrderbyEnum { - Id = "id", - Include = "include", - Name = "name", - Slug = "slug", - TermGroup = "term_group", - Description = "description", - Count = "count", -} - -/** @default "view" */ -export enum IV1ProductsTagsDetailParamsContextEnum { - View = "view", - Edit = "edit", -} - -/** @default "view" */ -export enum IV1ProductsListParamsContextEnum { +export enum IV3ProductsReviewsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV1ProductsListParamsOrderEnum { +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 { + 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 { + View = "view", + Edit = "edit", +} + +/** @default "asc" */ +export enum IV3ProductsShippingClassesListParamsOrderEnum { + Asc = "asc", + Desc = "desc", +} + +/** @default "name" */ +export enum IV3ProductsShippingClassesListParamsOrderbyEnum { + Id = "id", + Include = "include", + Name = "name", + Slug = "slug", + TermGroup = "term_group", + Description = "description", + Count = "count", +} + +/** @default "view" */ +export enum IV3ProductsShippingClassesDetailParamsContextEnum { + View = "view", + Edit = "edit", +} + +/** @default "view" */ +export enum IV3ProductsTagsListParamsContextEnum { + View = "view", + Edit = "edit", +} + +/** @default "asc" */ +export enum IV3ProductsTagsListParamsOrderEnum { + Asc = "asc", + Desc = "desc", +} + +/** @default "name" */ +export enum IV3ProductsTagsListParamsOrderbyEnum { + Id = "id", + Include = "include", + Name = "name", + Slug = "slug", + TermGroup = "term_group", + Description = "description", + Count = "count", +} + +/** @default "view" */ +export enum IV3ProductsTagsDetailParamsContextEnum { + View = "view", + Edit = "edit", +} + +/** @default "view" */ +export enum IV3ProductsListParamsContextEnum { + View = "view", + Edit = "edit", +} + +/** @default "desc" */ +export enum IV3ProductsListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV1ProductsListParamsOrderbyEnum { +export enum IV3ProductsListParamsOrderbyEnum { 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 IV1ProductsListParamsStatusEnum { +export enum IV3ProductsListParamsStatusEnum { Any = "any", Future = "future", + Trash = "trash", Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", } -export enum IV1ProductsListParamsTypeEnum { +export enum IV3ProductsListParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } +export enum IV3ProductsListParamsStockStatusEnum { + Instock = "instock", + Outofstock = "outofstock", + Onbackorder = "onbackorder", +} + /** @default "simple" */ export enum ITypeEnum3 { Simple = "simple", @@ -1770,12 +1951,14 @@ export enum ITypeEnum3 { } /** @default "publish" */ -export enum IStatusEnum3 { +export enum IStatusEnum6 { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", + AutoDraft = "auto-draft", + Trash = "trash", } /** @default "visible" */ @@ -1786,11 +1969,6 @@ export enum ICatalogVisibilityEnum { Hidden = "hidden", } -/** @default "standard" */ -export enum IDownloadTypeEnum { - Standard = "standard", -} - /** @default "taxable" */ export enum ITaxStatusEnum { Taxable = "taxable", @@ -1798,6 +1976,13 @@ export enum ITaxStatusEnum { None = "none", } +/** @default "instock" */ +export enum IStockStatusEnum { + Instock = "instock", + Outofstock = "outofstock", + Onbackorder = "onbackorder", +} + /** @default "no" */ export enum IBackordersEnum { No = "no", @@ -1806,7 +1991,7 @@ export enum IBackordersEnum { } /** @default "view" */ -export enum IV1ProductsDetail2ParamsContextEnum { +export enum IV3ProductsDetailParamsContextEnum { View = "view", Edit = "edit", } @@ -1818,12 +2003,14 @@ export enum ITypeEnum4 { Variable = "variable", } -export enum IStatusEnum4 { +export enum IStatusEnum7 { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", + AutoDraft = "auto-draft", + Trash = "trash", } export enum ICatalogVisibilityEnum1 { @@ -1833,93 +2020,103 @@ 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 IV1ProductsUpdate2ParamsTypeEnum { +export enum IV3ProductsUpdateParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV1ProductsUpdate2ParamsStatusEnum { +export enum IV3ProductsUpdateParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", + AutoDraft = "auto-draft", + Trash = "trash", } -export enum IV1ProductsUpdate2ParamsCatalogVisibilityEnum { +export enum IV3ProductsUpdateParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV1ProductsUpdate2ParamsDownloadTypeEnum { - Standard = "standard", -} - -export enum IV1ProductsUpdate2ParamsTaxStatusEnum { +export enum IV3ProductsUpdateParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV1ProductsUpdate2ParamsBackordersEnum { +export enum IV3ProductsUpdateParamsStockStatusEnum { + Instock = "instock", + Outofstock = "outofstock", + Onbackorder = "onbackorder", +} + +export enum IV3ProductsUpdateParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", } -export enum IV1ProductsPartialUpdate2ParamsTypeEnum { +export enum IV3ProductsPartialUpdateParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV1ProductsPartialUpdate2ParamsStatusEnum { +export enum IV3ProductsPartialUpdateParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", + AutoDraft = "auto-draft", + Trash = "trash", } -export enum IV1ProductsPartialUpdate2ParamsCatalogVisibilityEnum { +export enum IV3ProductsPartialUpdateParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV1ProductsPartialUpdate2ParamsDownloadTypeEnum { - Standard = "standard", -} - -export enum IV1ProductsPartialUpdate2ParamsTaxStatusEnum { +export enum IV3ProductsPartialUpdateParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV1ProductsPartialUpdate2ParamsBackordersEnum { +export enum IV3ProductsPartialUpdateParamsStockStatusEnum { + Instock = "instock", + Outofstock = "outofstock", + Onbackorder = "onbackorder", +} + +export enum IV3ProductsPartialUpdateParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", @@ -1932,12 +2129,14 @@ export enum ITypeEnum5 { Variable = "variable", } -export enum IStatusEnum5 { +export enum IStatusEnum8 { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", + AutoDraft = "auto-draft", + Trash = "trash", } export enum ICatalogVisibilityEnum2 { @@ -1947,104 +2146,482 @@ 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 IV1ProductsBatchUpdateParamsTypeEnum { +export enum IV3ProductsBatchUpdateParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV1ProductsBatchUpdateParamsStatusEnum { +export enum IV3ProductsBatchUpdateParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", + AutoDraft = "auto-draft", + Trash = "trash", } -export enum IV1ProductsBatchUpdateParamsCatalogVisibilityEnum { +export enum IV3ProductsBatchUpdateParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV1ProductsBatchUpdateParamsDownloadTypeEnum { - Standard = "standard", -} - -export enum IV1ProductsBatchUpdateParamsTaxStatusEnum { +export enum IV3ProductsBatchUpdateParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV1ProductsBatchUpdateParamsBackordersEnum { +export enum IV3ProductsBatchUpdateParamsStockStatusEnum { + Instock = "instock", + Outofstock = "outofstock", + Onbackorder = "onbackorder", +} + +export enum IV3ProductsBatchUpdateParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", } -export enum IV1ProductsBatchPartialUpdateParamsTypeEnum { +export enum IV3ProductsBatchPartialUpdateParamsTypeEnum { Simple = "simple", Grouped = "grouped", External = "external", Variable = "variable", } -export enum IV1ProductsBatchPartialUpdateParamsStatusEnum { +export enum IV3ProductsBatchPartialUpdateParamsStatusEnum { Draft = "draft", Pending = "pending", Private = "private", Publish = "publish", Future = "future", + AutoDraft = "auto-draft", + Trash = "trash", } -export enum IV1ProductsBatchPartialUpdateParamsCatalogVisibilityEnum { +export enum IV3ProductsBatchPartialUpdateParamsCatalogVisibilityEnum { Visible = "visible", Catalog = "catalog", Search = "search", Hidden = "hidden", } -export enum IV1ProductsBatchPartialUpdateParamsDownloadTypeEnum { - Standard = "standard", -} - -export enum IV1ProductsBatchPartialUpdateParamsTaxStatusEnum { +export enum IV3ProductsBatchPartialUpdateParamsTaxStatusEnum { Taxable = "taxable", Shipping = "shipping", None = "none", } -export enum IV1ProductsBatchPartialUpdateParamsBackordersEnum { +export enum IV3ProductsBatchPartialUpdateParamsStockStatusEnum { + Instock = "instock", + Outofstock = "outofstock", + Onbackorder = "onbackorder", +} + +export enum IV3ProductsBatchPartialUpdateParamsBackordersEnum { No = "no", Notify = "notify", Yes = "yes", } /** @default "view" */ -export enum IV1ReportsSalesListParamsContextEnum { +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 { View = "view", } -export enum IV1ReportsSalesListParamsPeriodEnum { +export enum IV3ReportsSalesListParamsPeriodEnum { Week = "week", Month = "month", LastMonth = "last_month", @@ -2052,11 +2629,11 @@ export enum IV1ReportsSalesListParamsPeriodEnum { } /** @default "view" */ -export enum IV1ReportsTopSellersListParamsContextEnum { +export enum IV3ReportsTopSellersListParamsContextEnum { View = "view", } -export enum IV1ReportsTopSellersListParamsPeriodEnum { +export enum IV3ReportsTopSellersListParamsPeriodEnum { Week = "week", Month = "month", LastMonth = "last_month", @@ -2064,36 +2641,82 @@ export enum IV1ReportsTopSellersListParamsPeriodEnum { } /** @default "view" */ -export enum IV1ReportsListParamsContextEnum { +export enum IV3ReportsOrdersTotalsListParamsContextEnum { View = "view", } /** @default "view" */ -export enum IV1TaxesClassesListParamsContextEnum { +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 { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV1TaxesListParamsContextEnum { +export enum IV3TaxesListParamsContextEnum { View = "view", Edit = "edit", } /** @default "asc" */ -export enum IV1TaxesListParamsOrderEnum { +export enum IV3TaxesListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "order" */ -export enum IV1TaxesListParamsOrderbyEnum { +export enum IV3TaxesListParamsOrderbyEnum { Id = "id", Order = "order", Priority = "priority", } -export enum IV1TaxesListParamsClassEnum { +export enum IV3TaxesListParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", @@ -2107,7 +2730,7 @@ export enum IClassEnum { } /** @default "view" */ -export enum IV1TaxesDetailParamsContextEnum { +export enum IV3TaxesDetailParamsContextEnum { View = "view", Edit = "edit", } @@ -2118,13 +2741,13 @@ export enum IClassEnum1 { ZeroRate = "zero-rate", } -export enum IV1TaxesUpdateParamsClassEnum { +export enum IV3TaxesUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", } -export enum IV1TaxesPartialUpdateParamsClassEnum { +export enum IV3TaxesPartialUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", @@ -2136,39 +2759,39 @@ export enum IClassEnum2 { ZeroRate = "zero-rate", } -export enum IV1TaxesBatchUpdateParamsClassEnum { +export enum IV3TaxesBatchUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", } -export enum IV1TaxesBatchPartialUpdateParamsClassEnum { +export enum IV3TaxesBatchPartialUpdateParamsClassEnum { Standard = "standard", ReducedRate = "reduced-rate", ZeroRate = "zero-rate", } /** @default "view" */ -export enum IV1WebhooksListParamsContextEnum { +export enum IV3WebhooksListParamsContextEnum { View = "view", Edit = "edit", } /** @default "desc" */ -export enum IV1WebhooksListParamsOrderEnum { +export enum IV3WebhooksListParamsOrderEnum { Asc = "asc", Desc = "desc", } /** @default "date" */ -export enum IV1WebhooksListParamsOrderbyEnum { +export enum IV3WebhooksListParamsOrderbyEnum { Date = "date", Id = "id", Title = "title", } /** @default "all" */ -export enum IV1WebhooksListParamsStatusEnum { +export enum IV3WebhooksListParamsStatusEnum { All = "all", Active = "active", Paused = "paused", @@ -2176,66 +2799,105 @@ export enum IV1WebhooksListParamsStatusEnum { } /** @default "active" */ -export enum IStatusEnum6 { +export enum IStatusEnum14 { Active = "active", Paused = "paused", Disabled = "disabled", } /** @default "view" */ -export enum IV1WebhooksDetailParamsContextEnum { +export enum IV3WebhooksDetailParamsContextEnum { View = "view", Edit = "edit", } -export enum IStatusEnum7 { +export enum IStatusEnum15 { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV1WebhooksUpdateParamsStatusEnum { +export enum IV3WebhooksUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV1WebhooksPartialUpdateParamsStatusEnum { +export enum IV3WebhooksPartialUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IStatusEnum8 { +export enum IStatusEnum16 { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV1WebhooksBatchUpdateParamsStatusEnum { +export enum IV3WebhooksBatchUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } -export enum IV1WebhooksBatchPartialUpdateParamsStatusEnum { +export enum IV3WebhooksBatchPartialUpdateParamsStatusEnum { Active = "active", Paused = "paused", Disabled = "disabled", } /** @default "view" */ -export enum IV1WebhooksDeliveriesListParamsContextEnum { +export enum IV3SystemStatusListParamsContextEnum { + View = "view", +} + +/** @default "view" */ +export enum IV3SystemStatusToolsListParamsContextEnum { View = "view", Edit = "edit", } /** @default "view" */ -export enum IV1WebhooksDetail2ParamsContextEnum { +export enum IV3ShippingMethodsListParamsContextEnum { + View = "view", +} + +/** @default "view" */ +export enum IV3ShippingMethodsDetailParamsContextEnum { + View = "view", +} + +/** @default "view" */ +export enum IV3PaymentGatewaysListParamsContextEnum { 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; @@ -2499,13 +3161,13 @@ export class Api< * No description * * @tags marketplace - * @name V1MarketplaceProductPreviewList - * @request GET:/wc/v1/marketplace/product-preview + * @name V3MarketplaceFeaturedList + * @request GET:/wc/v3/marketplace/featured * @secure */ - v1MarketplaceProductPreviewList: (params: RequestParams = {}) => + v3MarketplaceFeaturedList: (params: RequestParams = {}) => this.request({ - path: `/wc/v1/marketplace/product-preview`, + path: `/wc/v3/marketplace/featured`, method: "GET", secure: true, type: ContentType.UrlEncoded, @@ -2515,64 +3177,15 @@ export class Api< /** * No description * - * @tags coupons - * @name V1CouponsList - * @request GET:/wc/v1/coupons + * @tags marketplace + * @name V3MarketplaceRefreshCreate + * @request POST:/wc/v3/marketplace/refresh * @secure */ - 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 = {}, - ) => + v3MarketplaceRefreshCreate: (params: RequestParams = {}) => this.request({ - path: `/wc/v1/coupons`, - method: "GET", - query: query, + path: `/wc/v3/marketplace/refresh`, + method: "POST", secure: true, type: ContentType.UrlEncoded, ...params, @@ -2581,63 +3194,36 @@ export class Api< /** * No description * - * @tags coupons - * @name V1CouponsCreate - * @request POST:/wc/v1/coupons + * @tags marketplace + * @name V3MarketplaceSubscriptionsList + * @request GET:/wc/v3/marketplace/subscriptions * @secure */ - v1CouponsCreate: ( + 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: { - /** 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[]; + product_key: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/coupons`, + path: `/wc/v3/marketplace/subscriptions/connect`, method: "POST", body: data, secure: true, @@ -2648,21 +3234,88 @@ export class Api< /** * No description * - * @tags coupons - * @name V1CouponsDetail - * @request GET:/wc/v1/coupons/{id} + * @tags marketplace + * @name V3MarketplaceSubscriptionsActivatePluginCreate + * @request POST:/wc/v3/marketplace/subscriptions/activate-plugin * @secure */ - v1CouponsDetail: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV1CouponsDetailParamsContextEnum[]; + v3MarketplaceSubscriptionsActivatePluginCreate: ( + data: { + product_key: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/coupons/${id}`, + 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`, method: "GET", query: query, secure: true, @@ -2673,1612 +3326,22 @@ export class Api< /** * No description * - * @tags coupons - * @name V1CouponsCreate2 - * @request POST:/wc/v1/coupons/{id} - * @originalName v1CouponsCreate - * @duplicate + * @tags marketplace + * @name V3MarketplaceCreateOrderCreate + * @request POST:/wc/v3/marketplace/create-order * @secure */ - v1CouponsCreate2: ( - id: number, + v3MarketplaceCreateOrderCreate: ( 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[]; + product_id: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/coupons/${id}`, + path: `/wc/v3/marketplace/create-order`, 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, }), @@ -4287,15 +3350,14 @@ export class Api< * No description * * @tags products - * @name V1ProductsAttributesTermsList - * @request GET:/wc/v1/products/attributes/{attribute_id}/terms + * @name V3ProductsBrandsList + * @request GET:/wc/v3/products/brands * @secure */ - v1ProductsAttributesTermsList: ( - attributeId: number, + v3ProductsBrandsList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsAttributesTermsListParamsContextEnum[]; + context?: IV3ProductsBrandsListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -4321,9 +3383,9 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV1ProductsAttributesTermsListParamsOrderEnum[]; + order?: IV3ProductsBrandsListParamsOrderEnum[]; /** Sort collection by resource attribute. */ - orderby?: IV1ProductsAttributesTermsListParamsOrderbyEnum[]; + orderby?: IV3ProductsBrandsListParamsOrderbyEnum[]; /** Whether to hide resources not assigned to any products. */ hide_empty?: boolean; /** @@ -4342,7 +3404,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/attributes/${attributeId}/terms`, + path: `/wc/v3/products/brands`, method: "GET", query: query, secure: true, @@ -4354,703 +3416,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsAttributesTermsCreate - * @request POST:/wc/v1/products/attributes/{attribute_id}/terms + * @name V3ProductsBrandsCreate + * @request POST:/wc/v3/products/brands * @secure */ - 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: ( + v3ProductsBrandsCreate: ( data: { /** Name for the resource. */ name: string; @@ -5076,7 +3446,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories`, + path: `/wc/v3/products/brands`, method: "POST", body: data, secure: true, @@ -5088,20 +3458,20 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesDetail - * @request GET:/wc/v1/products/categories/{id} + * @name V3ProductsBrandsDetail + * @request GET:/wc/v3/products/brands/{id} * @secure */ - v1ProductsCategoriesDetail: ( + v3ProductsBrandsDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsCategoriesDetailParamsContextEnum[]; + context?: IV3ProductsBrandsDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/${id}`, + path: `/wc/v3/products/brands/${id}`, method: "GET", query: query, secure: true, @@ -5113,13 +3483,13 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesCreate2 - * @request POST:/wc/v1/products/categories/{id} - * @originalName v1ProductsCategoriesCreate + * @name V3ProductsBrandsCreate2 + * @request POST:/wc/v3/products/brands/{id} + * @originalName v3ProductsBrandsCreate * @duplicate * @secure */ - v1ProductsCategoriesCreate2: ( + v3ProductsBrandsCreate2: ( id: number, data: { /** Category name. */ @@ -5146,7 +3516,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/${id}`, + path: `/wc/v3/products/brands/${id}`, method: "POST", body: data, secure: true, @@ -5158,11 +3528,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesUpdate - * @request PUT:/wc/v1/products/categories/{id} + * @name V3ProductsBrandsUpdate + * @request PUT:/wc/v3/products/brands/{id} * @secure */ - v1ProductsCategoriesUpdate: ( + v3ProductsBrandsUpdate: ( id: number, query?: { /** Category name. */ @@ -5177,7 +3547,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV1ProductsCategoriesUpdateParamsDisplayEnum[]; + display?: IV3ProductsBrandsUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -5189,7 +3559,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/${id}`, + path: `/wc/v3/products/brands/${id}`, method: "PUT", query: query, secure: true, @@ -5201,11 +3571,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesPartialUpdate - * @request PATCH:/wc/v1/products/categories/{id} + * @name V3ProductsBrandsPartialUpdate + * @request PATCH:/wc/v3/products/brands/{id} * @secure */ - v1ProductsCategoriesPartialUpdate: ( + v3ProductsBrandsPartialUpdate: ( id: number, query?: { /** Category name. */ @@ -5220,7 +3590,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV1ProductsCategoriesPartialUpdateParamsDisplayEnum[]; + display?: IV3ProductsBrandsPartialUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -5232,7 +3602,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/${id}`, + path: `/wc/v3/products/brands/${id}`, method: "PATCH", query: query, secure: true, @@ -5244,11 +3614,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesDelete - * @request DELETE:/wc/v1/products/categories/{id} + * @name V3ProductsBrandsDelete + * @request DELETE:/wc/v3/products/brands/{id} * @secure */ - v1ProductsCategoriesDelete: ( + v3ProductsBrandsDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -5257,7 +3627,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/${id}`, + path: `/wc/v3/products/brands/${id}`, method: "DELETE", query: query, secure: true, @@ -5269,11 +3639,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesBatchCreate - * @request POST:/wc/v1/products/categories/batch + * @name V3ProductsBrandsBatchCreate + * @request POST:/wc/v3/products/brands/batch * @secure */ - v1ProductsCategoriesBatchCreate: ( + v3ProductsBrandsBatchCreate: ( data: { /** Category name. */ name?: string; @@ -5299,7 +3669,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/batch`, + path: `/wc/v3/products/brands/batch`, method: "POST", body: data, secure: true, @@ -5311,11 +3681,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesBatchUpdate - * @request PUT:/wc/v1/products/categories/batch + * @name V3ProductsBrandsBatchUpdate + * @request PUT:/wc/v3/products/brands/batch * @secure */ - v1ProductsCategoriesBatchUpdate: ( + v3ProductsBrandsBatchUpdate: ( query?: { /** Category name. */ name?: string; @@ -5329,7 +3699,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV1ProductsCategoriesBatchUpdateParamsDisplayEnum[]; + display?: IV3ProductsBrandsBatchUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -5341,7 +3711,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/batch`, + path: `/wc/v3/products/brands/batch`, method: "PUT", query: query, secure: true, @@ -5353,11 +3723,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsCategoriesBatchPartialUpdate - * @request PATCH:/wc/v1/products/categories/batch + * @name V3ProductsBrandsBatchPartialUpdate + * @request PATCH:/wc/v3/products/brands/batch * @secure */ - v1ProductsCategoriesBatchPartialUpdate: ( + v3ProductsBrandsBatchPartialUpdate: ( query?: { /** Category name. */ name?: string; @@ -5371,7 +3741,7 @@ export class Api< /** HTML description of the resource. */ description?: string; /** Category archive display type. */ - display?: IV1ProductsCategoriesBatchPartialUpdateParamsDisplayEnum[]; + display?: IV3ProductsBrandsBatchPartialUpdateParamsDisplayEnum[]; /** Image data. */ image?: string; /** @@ -5383,7 +3753,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/categories/batch`, + path: `/wc/v3/products/brands/batch`, method: "PATCH", query: query, secure: true, @@ -5394,903 +3764,15 @@ export class Api< /** * No description * - * @tags products - * @name V1ProductsReviewsList - * @request GET:/wc/v1/products/{product_id}/reviews + * @tags coupons + * @name V3CouponsList + * @request GET:/wc/v3/coupons * @secure */ - v1ProductsReviewsList: ( - 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?: IV1ProductsReviewsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/products/${productId}/reviews`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsReviewsCreate - * @request POST:/wc/v1/products/{product_id}/reviews - * @secure - */ - v1ProductsReviewsCreate: ( - productId: number, - data: { - /** - * Unique identifier for the variation. - * @format int64 - */ - id?: number; - /** 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/v1/products/${productId}/reviews`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsDetail - * @request GET:/wc/v1/products/{product_id} - * @secure - */ - v1ProductsDetail: ( - productId: number, - query?: { - /** - * Unique identifier for the resource. - * @format int64 - */ - 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: { - /** - * 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?: null; - /** - * 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: "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, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsPartialUpdate - * @request PATCH:/wc/v1/products/{product_id} - * @secure - */ - v1ProductsPartialUpdate: ( - 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: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsDelete - * @request DELETE:/wc/v1/products/{product_id} - * @secure - */ - 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/v1/products/${productId}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesList - * @request GET:/wc/v1/products/shipping_classes - * @secure - */ - v1ProductsShippingClassesList: ( + v3CouponsList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsShippingClassesListParamsContextEnum[]; - /** - * 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?: IV1ProductsShippingClassesListParamsOrderEnum[]; - /** Sort collection by resource attribute. */ - orderby?: IV1ProductsShippingClassesListParamsOrderbyEnum[]; - /** 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/shipping_classes`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesCreate - * @request POST:/wc/v1/products/shipping_classes - * @secure - */ - v1ProductsShippingClassesCreate: ( - 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; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/products/shipping_classes`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesDetail - * @request GET:/wc/v1/products/shipping_classes/{id} - * @secure - */ - v1ProductsShippingClassesDetail: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsShippingClassesDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/products/shipping_classes/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesCreate2 - * @request POST:/wc/v1/products/shipping_classes/{id} - * @originalName v1ProductsShippingClassesCreate - * @duplicate - * @secure - */ - v1ProductsShippingClassesCreate2: ( - id: number, - data: { - /** 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/v1/products/shipping_classes/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesUpdate - * @request PUT:/wc/v1/products/shipping_classes/{id} - * @secure - */ - v1ProductsShippingClassesUpdate: ( - id: number, - 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/v1/products/shipping_classes/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesPartialUpdate - * @request PATCH:/wc/v1/products/shipping_classes/{id} - * @secure - */ - v1ProductsShippingClassesPartialUpdate: ( - id: number, - 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/v1/products/shipping_classes/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesDelete - * @request DELETE:/wc/v1/products/shipping_classes/{id} - * @secure - */ - v1ProductsShippingClassesDelete: ( - id: number, - query?: { - /** Required to be true, as resource does not support trashing. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/products/shipping_classes/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesBatchCreate - * @request POST:/wc/v1/products/shipping_classes/batch - * @secure - */ - v1ProductsShippingClassesBatchCreate: ( - data: { - /** 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/v1/products/shipping_classes/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesBatchUpdate - * @request PUT:/wc/v1/products/shipping_classes/batch - * @secure - */ - v1ProductsShippingClassesBatchUpdate: ( - 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/v1/products/shipping_classes/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsShippingClassesBatchPartialUpdate - * @request PATCH:/wc/v1/products/shipping_classes/batch - * @secure - */ - v1ProductsShippingClassesBatchPartialUpdate: ( - 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/v1/products/shipping_classes/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsList - * @request GET:/wc/v1/products/tags - * @secure - */ - v1ProductsTagsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsTagsListParamsContextEnum[]; - /** - * 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?: IV1ProductsTagsListParamsOrderEnum[]; - /** Sort collection by resource attribute. */ - orderby?: IV1ProductsTagsListParamsOrderbyEnum[]; - /** 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/tags`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsCreate - * @request POST:/wc/v1/products/tags - * @secure - */ - v1ProductsTagsCreate: ( - 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; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/products/tags`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsDetail - * @request GET:/wc/v1/products/tags/{id} - * @secure - */ - v1ProductsTagsDetail: ( - id: number, - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsTagsDetailParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/products/tags/${id}`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsCreate2 - * @request POST:/wc/v1/products/tags/{id} - * @originalName v1ProductsTagsCreate - * @duplicate - * @secure - */ - v1ProductsTagsCreate2: ( - id: number, - data: { - /** Tag 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/v1/products/tags/${id}`, - method: "POST", - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsUpdate - * @request PUT:/wc/v1/products/tags/{id} - * @secure - */ - v1ProductsTagsUpdate: ( - id: number, - query?: { - /** Tag 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/v1/products/tags/${id}`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsPartialUpdate - * @request PATCH:/wc/v1/products/tags/{id} - * @secure - */ - v1ProductsTagsPartialUpdate: ( - id: number, - query?: { - /** Tag 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/v1/products/tags/${id}`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsDelete - * @request DELETE:/wc/v1/products/tags/{id} - * @secure - */ - v1ProductsTagsDelete: ( - id: number, - query?: { - /** Required to be true, as resource does not support trashing. */ - force?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/products/tags/${id}`, - method: "DELETE", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsBatchCreate - * @request POST:/wc/v1/products/tags/batch - * @secure - */ - v1ProductsTagsBatchCreate: ( - data: { - /** Tag 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/v1/products/tags/batch`, - method: "POST", - body: data, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsBatchUpdate - * @request PUT:/wc/v1/products/tags/batch - * @secure - */ - v1ProductsTagsBatchUpdate: ( - query?: { - /** Tag 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/v1/products/tags/batch`, - method: "PUT", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsTagsBatchPartialUpdate - * @request PATCH:/wc/v1/products/tags/batch - * @secure - */ - v1ProductsTagsBatchPartialUpdate: ( - query?: { - /** Tag 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/v1/products/tags/batch`, - method: "PATCH", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags products - * @name V1ProductsList - * @request GET:/wc/v1/products - * @secure - */ - v1ProductsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsListParamsContextEnum[]; + context?: IV3CouponsListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -6316,6 +3798,18 @@ 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. */ @@ -6326,34 +3820,1976 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV1ProductsListParamsOrderEnum[]; + order?: IV3CouponsListParamsOrderEnum[]; /** Sort collection by object attribute. */ - 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?: IV1ProductsListParamsStatusEnum[]; - /** Limit result set to products assigned a specific type. */ - 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. */ - 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 with a specific SKU. */ - sku?: string; + orderby?: IV3CouponsListParamsOrderbyEnum[]; + /** Limit result set to resources with a specific code. */ + code?: string; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products`, + 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, + 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. + * @format int64 + */ + id?: number; + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3OrdersDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/orders/${orderId}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags orders + * @name V3OrdersDelete + * @request DELETE:/wc/v3/orders/{order_id} + * @secure + */ + v3OrdersDelete: ( + 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/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, @@ -6365,22 +5801,2338 @@ export class Api< * No description * * @tags products - * @name V1ProductsCreate2 - * @request POST:/wc/v1/products - * @originalName v1ProductsCreate + * @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 */ - v1ProductsCreate2: ( + 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; + /** + * Review rating (0 to 5). + * @format int64 + */ + rating?: number; + }, + 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}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsReviewsUpdate + * @request PUT:/wc/v3/products/reviews/{id} + * @secure + */ + v3ProductsReviewsUpdate: ( + id: number, + 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?: IV3ProductsReviewsUpdateParamsStatusEnum[]; + /** 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}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsReviewsPartialUpdate + * @request PATCH:/wc/v3/products/reviews/{id} + * @secure + */ + v3ProductsReviewsPartialUpdate: ( + id: number, + 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?: IV3ProductsReviewsPartialUpdateParamsStatusEnum[]; + /** 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}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsReviewsDelete + * @request DELETE:/wc/v3/products/reviews/{id} + * @secure + */ + v3ProductsReviewsDelete: ( + id: number, + query?: { + /** Whether to bypass trash and force deletion. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/reviews/${id}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsReviewsBatchCreate + * @request POST:/wc/v3/products/reviews/batch + * @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: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ProductsShippingClassesListParamsContextEnum[]; + /** + * 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?: IV3ProductsShippingClassesListParamsOrderEnum[]; + /** Sort collection by resource attribute. */ + orderby?: IV3ProductsShippingClassesListParamsOrderbyEnum[]; + /** 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/shipping_classes`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesCreate + * @request POST:/wc/v3/products/shipping_classes + * @secure + */ + v3ProductsShippingClassesCreate: ( + 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; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/shipping_classes`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesDetail + * @request GET:/wc/v3/products/shipping_classes/{id} + * @secure + */ + v3ProductsShippingClassesDetail: ( + id: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ProductsShippingClassesDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/shipping_classes/${id}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesCreate2 + * @request POST:/wc/v3/products/shipping_classes/{id} + * @originalName v3ProductsShippingClassesCreate + * @duplicate + * @secure + */ + v3ProductsShippingClassesCreate2: ( + id: number, + data: { + /** 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/${id}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesUpdate + * @request PUT:/wc/v3/products/shipping_classes/{id} + * @secure + */ + v3ProductsShippingClassesUpdate: ( + id: number, + 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/${id}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesPartialUpdate + * @request PATCH:/wc/v3/products/shipping_classes/{id} + * @secure + */ + v3ProductsShippingClassesPartialUpdate: ( + id: number, + 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/${id}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesDelete + * @request DELETE:/wc/v3/products/shipping_classes/{id} + * @secure + */ + v3ProductsShippingClassesDelete: ( + id: number, + query?: { + /** Required to be true, as resource does not support trashing. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/shipping_classes/${id}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesBatchCreate + * @request POST:/wc/v3/products/shipping_classes/batch + * @secure + */ + v3ProductsShippingClassesBatchCreate: ( + data: { + /** 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/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesBatchUpdate + * @request PUT:/wc/v3/products/shipping_classes/batch + * @secure + */ + v3ProductsShippingClassesBatchUpdate: ( + 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/batch`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesBatchPartialUpdate + * @request PATCH:/wc/v3/products/shipping_classes/batch + * @secure + */ + v3ProductsShippingClassesBatchPartialUpdate: ( + 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/batch`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsShippingClassesSlugSuggestionList + * @request GET:/wc/v3/products/shipping_classes/slug-suggestion + * @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: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ProductsTagsListParamsContextEnum[]; + /** + * 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?: IV3ProductsTagsListParamsOrderEnum[]; + /** Sort collection by resource attribute. */ + orderby?: IV3ProductsTagsListParamsOrderbyEnum[]; + /** 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/tags`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsCreate + * @request POST:/wc/v3/products/tags + * @secure + */ + v3ProductsTagsCreate: ( + 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; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/tags`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsDetail + * @request GET:/wc/v3/products/tags/{id} + * @secure + */ + v3ProductsTagsDetail: ( + id: number, + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ProductsTagsDetailParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/tags/${id}`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsCreate2 + * @request POST:/wc/v3/products/tags/{id} + * @originalName v3ProductsTagsCreate + * @duplicate + * @secure + */ + v3ProductsTagsCreate2: ( + id: number, + data: { + /** Tag 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/tags/${id}`, + method: "POST", + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsUpdate + * @request PUT:/wc/v3/products/tags/{id} + * @secure + */ + v3ProductsTagsUpdate: ( + id: number, + query?: { + /** Tag 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/tags/${id}`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsPartialUpdate + * @request PATCH:/wc/v3/products/tags/{id} + * @secure + */ + v3ProductsTagsPartialUpdate: ( + id: number, + query?: { + /** Tag 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/tags/${id}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsDelete + * @request DELETE:/wc/v3/products/tags/{id} + * @secure + */ + v3ProductsTagsDelete: ( + id: number, + query?: { + /** Required to be true, as resource does not support trashing. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/tags/${id}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsBatchCreate + * @request POST:/wc/v3/products/tags/batch + * @secure + */ + v3ProductsTagsBatchCreate: ( + data: { + /** Tag 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/tags/batch`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsBatchUpdate + * @request PUT:/wc/v3/products/tags/batch + * @secure + */ + v3ProductsTagsBatchUpdate: ( + query?: { + /** Tag 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/tags/batch`, + method: "PUT", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsTagsBatchPartialUpdate + * @request PATCH:/wc/v3/products/tags/batch + * @secure + */ + v3ProductsTagsBatchPartialUpdate: ( + query?: { + /** Tag 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/tags/batch`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsList + * @request GET:/wc/v3/products + * @secure + */ + v3ProductsList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ProductsListParamsContextEnum[]; + /** + * 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?: IV3ProductsListParamsOrderEnum[]; + /** 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; + /** Limit result set to products with a specific slug. */ + slug?: string; + /** Limit result set to products assigned a specific status. */ + status?: IV3ProductsListParamsStatusEnum[]; + /** 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; + /** 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 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; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags products + * @name V3ProductsCreate + * @request POST:/wc/v3/products + * @secure + */ + v3ProductsCreate: ( 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?: IStatusEnum3[]; + status?: IStatusEnum6[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ @@ -6389,16 +8141,22 @@ export class Api< description?: string; /** Product short description. */ short_description?: string; - /** Unique identifier. */ + /** 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. */ - date_on_sale_from?: string; - /** End date of sale price. */ - date_on_sale_to?: 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; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -6415,8 +8173,6 @@ 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 @@ -6435,10 +8191,12 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ - in_stock?: boolean; + /** Controls the stock status of the product. */ + stock_status?: IStockStatusEnum[]; /** 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). */ @@ -6449,7 +8207,9 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** List of upsell products IDs. */ + /** Post password. */ + post_password?: string; + /** List of up-sell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -6462,6 +8222,8 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; + /** List of brands. */ + brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -6470,18 +8232,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/v1/products`, + path: `/wc/v3/products`, method: "POST", body: data, secure: true, @@ -6493,22 +8255,20 @@ export class Api< * No description * * @tags products - * @name V1ProductsDetail2 - * @request GET:/wc/v1/products/{id} - * @originalName v1ProductsDetail - * @duplicate + * @name V3ProductsDetail + * @request GET:/wc/v3/products/{id} * @secure */ - v1ProductsDetail2: ( + v3ProductsDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ProductsDetail2ParamsContextEnum[]; + context?: IV3ProductsDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/${id}`, + path: `/wc/v3/products/${id}`, method: "GET", query: query, secure: true, @@ -6520,23 +8280,27 @@ export class Api< * No description * * @tags products - * @name V1ProductsCreate3 - * @request POST:/wc/v1/products/{id} - * @originalName v1ProductsCreate + * @name V3ProductsCreate2 + * @request POST:/wc/v3/products/{id} + * @originalName v3ProductsCreate * @duplicate * @secure */ - v1ProductsCreate3: ( + v3ProductsCreate2: ( 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?: IStatusEnum4[]; + status?: IStatusEnum7[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ @@ -6545,16 +8309,22 @@ export class Api< description?: string; /** Product short description. */ short_description?: string; - /** Unique identifier. */ + /** 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. */ - date_on_sale_from?: string; - /** End date of sale price. */ - date_on_sale_to?: 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; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -6571,8 +8341,6 @@ 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 @@ -6591,10 +8359,12 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ - in_stock?: boolean; + /** Controls the stock status of the product. */ + stock_status?: IStockStatusEnum1[]; /** 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). */ @@ -6605,7 +8375,9 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** List of upsell products IDs. */ + /** Post password. */ + post_password?: string; + /** List of up-sell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -6618,6 +8390,8 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; + /** List of brands. */ + brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -6626,18 +8400,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/v1/products/${id}`, + path: `/wc/v3/products/${id}`, method: "POST", body: data, secure: true, @@ -6649,41 +8423,49 @@ export class Api< * No description * * @tags products - * @name V1ProductsUpdate2 - * @request PUT:/wc/v1/products/{id} - * @originalName v1ProductsUpdate - * @duplicate + * @name V3ProductsUpdate + * @request PUT:/wc/v3/products/{id} * @secure */ - v1ProductsUpdate2: ( + v3ProductsUpdate: ( 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?: IV1ProductsUpdate2ParamsTypeEnum[]; + type?: IV3ProductsUpdateParamsTypeEnum[]; /** Product status (post status). */ - status?: IV1ProductsUpdate2ParamsStatusEnum[]; + status?: IV3ProductsUpdateParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: IV1ProductsUpdate2ParamsCatalogVisibilityEnum[]; + catalog_visibility?: IV3ProductsUpdateParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Unique identifier. */ + /** 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. */ - date_on_sale_from?: string; - /** End date of sale price. */ - date_on_sale_to?: 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. */ @@ -6700,8 +8482,6 @@ 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 @@ -6710,7 +8490,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: IV1ProductsUpdate2ParamsTaxStatusEnum[]; + tax_status?: IV3ProductsUpdateParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -6720,10 +8500,12 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ - in_stock?: boolean; + /** Controls the stock status of the product. */ + stock_status?: IV3ProductsUpdateParamsStockStatusEnum[]; /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV1ProductsUpdate2ParamsBackordersEnum[]; + backorders?: IV3ProductsUpdateParamsBackordersEnum[]; + /** 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). */ @@ -6734,7 +8516,9 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** List of upsell products IDs. */ + /** Post password. */ + post_password?: string; + /** List of up-sell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -6747,6 +8531,8 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; + /** List of brands. */ + brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -6755,18 +8541,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/v1/products/${id}`, + path: `/wc/v3/products/${id}`, method: "PUT", query: query, secure: true, @@ -6778,41 +8564,49 @@ export class Api< * No description * * @tags products - * @name V1ProductsPartialUpdate2 - * @request PATCH:/wc/v1/products/{id} - * @originalName v1ProductsPartialUpdate - * @duplicate + * @name V3ProductsPartialUpdate + * @request PATCH:/wc/v3/products/{id} * @secure */ - v1ProductsPartialUpdate2: ( + v3ProductsPartialUpdate: ( 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?: IV1ProductsPartialUpdate2ParamsTypeEnum[]; + type?: IV3ProductsPartialUpdateParamsTypeEnum[]; /** Product status (post status). */ - status?: IV1ProductsPartialUpdate2ParamsStatusEnum[]; + status?: IV3ProductsPartialUpdateParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: IV1ProductsPartialUpdate2ParamsCatalogVisibilityEnum[]; + catalog_visibility?: IV3ProductsPartialUpdateParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Unique identifier. */ + /** 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. */ - date_on_sale_from?: string; - /** End date of sale price. */ - date_on_sale_to?: 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. */ @@ -6829,8 +8623,6 @@ 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 @@ -6839,7 +8631,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: IV1ProductsPartialUpdate2ParamsTaxStatusEnum[]; + tax_status?: IV3ProductsPartialUpdateParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -6849,10 +8641,12 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ - in_stock?: boolean; + /** Controls the stock status of the product. */ + stock_status?: IV3ProductsPartialUpdateParamsStockStatusEnum[]; /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV1ProductsPartialUpdate2ParamsBackordersEnum[]; + backorders?: IV3ProductsPartialUpdateParamsBackordersEnum[]; + /** 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). */ @@ -6863,7 +8657,9 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** List of upsell products IDs. */ + /** Post password. */ + post_password?: string; + /** List of up-sell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -6876,6 +8672,8 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; + /** List of brands. */ + brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -6884,18 +8682,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/v1/products/${id}`, + path: `/wc/v3/products/${id}`, method: "PATCH", query: query, secure: true, @@ -6907,13 +8705,11 @@ export class Api< * No description * * @tags products - * @name V1ProductsDelete2 - * @request DELETE:/wc/v1/products/{id} - * @originalName v1ProductsDelete - * @duplicate + * @name V3ProductsDelete + * @request DELETE:/wc/v3/products/{id} * @secure */ - v1ProductsDelete2: ( + v3ProductsDelete: ( id: number, query?: { /** Whether to bypass trash and force deletion. */ @@ -6922,7 +8718,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/products/${id}`, + path: `/wc/v3/products/${id}`, method: "DELETE", query: query, secure: true, @@ -6934,20 +8730,24 @@ export class Api< * No description * * @tags products - * @name V1ProductsBatchCreate - * @request POST:/wc/v1/products/batch + * @name V3ProductsBatchCreate + * @request POST:/wc/v3/products/batch * @secure */ - v1ProductsBatchCreate: ( + v3ProductsBatchCreate: ( 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?: IStatusEnum5[]; + status?: IStatusEnum8[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ @@ -6956,16 +8756,22 @@ export class Api< description?: string; /** Product short description. */ short_description?: string; - /** Unique identifier. */ + /** 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. */ - date_on_sale_from?: string; - /** End date of sale price. */ - date_on_sale_to?: 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; /** If the product is virtual. */ virtual?: boolean; /** If the product is downloadable. */ @@ -6982,8 +8788,6 @@ 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 @@ -7002,10 +8806,12 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ - in_stock?: boolean; + /** Controls the stock status of the product. */ + stock_status?: IStockStatusEnum2[]; /** 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). */ @@ -7016,7 +8822,9 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** List of upsell products IDs. */ + /** Post password. */ + post_password?: string; + /** List of up-sell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -7029,6 +8837,8 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; + /** List of brands. */ + brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -7037,18 +8847,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/v1/products/batch`, + path: `/wc/v3/products/batch`, method: "POST", body: data, secure: true, @@ -7060,38 +8870,48 @@ export class Api< * No description * * @tags products - * @name V1ProductsBatchUpdate - * @request PUT:/wc/v1/products/batch + * @name V3ProductsBatchUpdate + * @request PUT:/wc/v3/products/batch * @secure */ - v1ProductsBatchUpdate: ( + v3ProductsBatchUpdate: ( 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?: IV1ProductsBatchUpdateParamsTypeEnum[]; + type?: IV3ProductsBatchUpdateParamsTypeEnum[]; /** Product status (post status). */ - status?: IV1ProductsBatchUpdateParamsStatusEnum[]; + status?: IV3ProductsBatchUpdateParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: IV1ProductsBatchUpdateParamsCatalogVisibilityEnum[]; + catalog_visibility?: IV3ProductsBatchUpdateParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Unique identifier. */ + /** 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. */ - date_on_sale_from?: string; - /** End date of sale price. */ - date_on_sale_to?: 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. */ @@ -7108,8 +8928,6 @@ 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 @@ -7118,7 +8936,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: IV1ProductsBatchUpdateParamsTaxStatusEnum[]; + tax_status?: IV3ProductsBatchUpdateParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -7128,10 +8946,12 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ - in_stock?: boolean; + /** Controls the stock status of the product. */ + stock_status?: IV3ProductsBatchUpdateParamsStockStatusEnum[]; /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV1ProductsBatchUpdateParamsBackordersEnum[]; + 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). */ @@ -7142,7 +8962,9 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** List of upsell products IDs. */ + /** Post password. */ + post_password?: string; + /** List of up-sell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -7155,6 +8977,8 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; + /** List of brands. */ + brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -7163,18 +8987,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/v1/products/batch`, + path: `/wc/v3/products/batch`, method: "PUT", query: query, secure: true, @@ -7186,38 +9010,48 @@ export class Api< * No description * * @tags products - * @name V1ProductsBatchPartialUpdate - * @request PATCH:/wc/v1/products/batch + * @name V3ProductsBatchPartialUpdate + * @request PATCH:/wc/v3/products/batch * @secure */ - v1ProductsBatchPartialUpdate: ( + 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?: IV1ProductsBatchPartialUpdateParamsTypeEnum[]; + type?: IV3ProductsBatchPartialUpdateParamsTypeEnum[]; /** Product status (post status). */ - status?: IV1ProductsBatchPartialUpdateParamsStatusEnum[]; + status?: IV3ProductsBatchPartialUpdateParamsStatusEnum[]; /** Featured product. */ featured?: boolean; /** Catalog visibility. */ - catalog_visibility?: IV1ProductsBatchPartialUpdateParamsCatalogVisibilityEnum[]; + catalog_visibility?: IV3ProductsBatchPartialUpdateParamsCatalogVisibilityEnum[]; /** Product description. */ description?: string; /** Product short description. */ short_description?: string; - /** Unique identifier. */ + /** 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. */ - date_on_sale_from?: string; - /** End date of sale price. */ - date_on_sale_to?: 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. */ @@ -7234,8 +9068,6 @@ 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 @@ -7244,7 +9076,7 @@ export class Api< /** Product external button text. Only for external products. */ button_text?: string; /** Tax status. */ - tax_status?: IV1ProductsBatchPartialUpdateParamsTaxStatusEnum[]; + tax_status?: IV3ProductsBatchPartialUpdateParamsTaxStatusEnum[]; /** Tax class. */ tax_class?: string; /** Stock management at product level. */ @@ -7254,10 +9086,12 @@ export class Api< * @format int64 */ stock_quantity?: number; - /** Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend. */ - in_stock?: boolean; + /** Controls the stock status of the product. */ + stock_status?: IV3ProductsBatchPartialUpdateParamsStockStatusEnum[]; /** If managing stock, this controls if backorders are allowed. */ - backorders?: IV1ProductsBatchPartialUpdateParamsBackordersEnum[]; + 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). */ @@ -7268,7 +9102,9 @@ export class Api< shipping_class?: string; /** Allow reviews. */ reviews_allowed?: boolean; - /** List of upsell products IDs. */ + /** Post password. */ + post_password?: string; + /** List of up-sell products IDs. */ upsell_ids?: number[]; /** List of cross-sell products IDs. */ cross_sell_ids?: number[]; @@ -7281,6 +9117,8 @@ export class Api< purchase_note?: string; /** List of categories. */ categories?: object[]; + /** List of brands. */ + brands?: object[]; /** List of tags. */ tags?: object[]; /** List of images. */ @@ -7289,18 +9127,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/v1/products/batch`, + path: `/wc/v3/products/batch`, method: "PATCH", query: query, secure: true, @@ -7311,32 +9149,117 @@ export class Api< /** * No description * - * @tags reports - * @name V1ReportsSalesList - * @request GET:/wc/v1/reports/sales + * @tags products + * @name V3ProductsSuggestedProductsList + * @request GET:/wc/v3/products/suggested-products * @secure */ - v1ReportsSalesList: ( + v3ProductsSuggestedProductsList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ReportsSalesListParamsContextEnum[]; - /** Report period. */ - period?: IV1ReportsSalesListParamsPeriodEnum[]; + context?: IV3ProductsSuggestedProductsListParamsContextEnum[]; /** - * Return sales for a specific start date, the date need to be in the YYYY-MM-DD format. - * @format date + * Current page of the collection. + * @format int64 + * @min 1 */ - date_min?: string; + page?: number; /** - * Return sales for a specific end date, the date need to be in the YYYY-MM-DD format. - * @format date + * Maximum number of items to be returned in result set. + * @format int64 + * @min 1 + * @max 100 */ - date_max?: string; + 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. */ + 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[]; + /** + * Limit result set to specific amount of suggested products. + * @format int64 + */ + limit?: number; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/reports/sales`, + path: `/wc/v3/products/suggested-products`, method: "GET", query: query, secure: true, @@ -7347,104 +9270,1707 @@ export class Api< /** * No description * - * @tags reports - * @name V1ReportsTopSellersList - * @request GET:/wc/v1/reports/top_sellers + * @tags products + * @name V3ProductsDuplicateCreate + * @request POST:/wc/v3/products/{id}/duplicate * @secure */ - v1ReportsTopSellersList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ReportsTopSellersListParamsContextEnum[]; - /** Report period. */ - period?: IV1ReportsTopSellersListParamsPeriodEnum[]; - /** - * Return sales for a specific start date, the date need to be in the YYYY-MM-DD format. - * @format date - */ - date_min?: string; - /** - * Return sales for a specific end date, the date need to be in the YYYY-MM-DD format. - * @format date - */ - date_max?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/reports/top_sellers`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags reports - * @name V1ReportsList - * @request GET:/wc/v1/reports - * @secure - */ - v1ReportsList: ( - query?: { - /** Scope under which the request is made; determines fields present in response. */ - context?: IV1ReportsListParamsContextEnum[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/wc/v1/reports`, - method: "GET", - query: query, - secure: true, - type: ContentType.UrlEncoded, - ...params, - }), - - /** - * No description - * - * @tags taxes - * @name V1TaxesClassesList - * @request GET:/wc/v1/taxes/classes - * @secure - */ - 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: ( + v3ProductsDuplicateCreate: ( + id: number, data: { - /** Tax class name. */ - name: string; + /** 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[]; + /** Product status (post status). */ + status?: IStatusEnum9[]; + /** Featured product. */ + featured?: boolean; + /** Catalog visibility. */ + catalog_visibility?: ICatalogVisibilityEnum3[]; + /** 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?: 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; + /** 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?: ITaxStatusEnum3[]; + /** 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?: IStockStatusEnum3[]; + /** If managing stock, this controls if backorders are allowed. */ + backorders?: IBackordersEnum3[]; + /** 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/v1/taxes/classes`, + 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[]; + woo_variation_gallery_images?: string; + }, + 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[]; + woo_variation_gallery_images?: string; + }, + 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[]; + woo_variation_gallery_images?: string; + }, + 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[]; + woo_variation_gallery_images?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/products/${productId}`, + method: "PATCH", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...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[]; + woo_variation_gallery_images?: string; + }, + 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[]; + woo_variation_gallery_images?: string; + }, + 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[]; + woo_variation_gallery_images?: string; + }, + 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[]; + woo_variation_gallery_images?: string; + }, + 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 + * @secure + */ + v3ReportsSalesList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ReportsSalesListParamsContextEnum[]; + /** Report period. */ + period?: IV3ReportsSalesListParamsPeriodEnum[]; + /** + * Return sales for a specific start date, the date need to be in the YYYY-MM-DD format. + * @format date + */ + date_min?: string; + /** + * Return sales for a specific end date, the date need to be in the YYYY-MM-DD format. + * @format date + */ + date_max?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/reports/sales`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags reports + * @name V3ReportsTopSellersList + * @request GET:/wc/v3/reports/top_sellers + * @secure + */ + v3ReportsTopSellersList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ReportsTopSellersListParamsContextEnum[]; + /** Report period. */ + period?: IV3ReportsTopSellersListParamsPeriodEnum[]; + /** + * Return sales for a specific start date, the date need to be in the YYYY-MM-DD format. + * @format date + */ + date_min?: string; + /** + * Return sales for a specific end date, the date need to be in the YYYY-MM-DD format. + * @format date + */ + date_max?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/reports/top_sellers`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags reports + * @name V3ReportsOrdersTotalsList + * @request GET:/wc/v3/reports/orders/totals + * @secure + */ + v3ReportsOrdersTotalsList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3ReportsOrdersTotalsListParamsContextEnum[]; + }, + 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, @@ -7455,21 +10981,458 @@ export class Api< /** * No description * - * @tags taxes - * @name V1TaxesClassesDelete - * @request DELETE:/wc/v1/taxes/classes/{slug} + * @tags shipping + * @name V3ShippingZonesDetail + * @request GET:/wc/v3/shipping/zones/{id} * @secure */ - v1TaxesClassesDelete: ( - slug: string, + 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?: { - /** Required to be true, as resource does not support trashing. */ + /** 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/v1/taxes/classes/${slug}`, + 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, @@ -7481,14 +11444,104 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesList - * @request GET:/wc/v1/taxes + * @name V3TaxesClassesList + * @request GET:/wc/v3/taxes/classes * @secure */ - v1TaxesList: ( + v3TaxesClassesList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1TaxesListParamsContextEnum[]; + context?: IV3TaxesClassesListParamsContextEnum[]; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/taxes/classes`, + method: "GET", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags taxes + * @name V3TaxesClassesCreate + * @request POST:/wc/v3/taxes/classes + * @secure + */ + v3TaxesClassesCreate: ( + data: { + /** Tax class name. */ + name: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/taxes/classes`, + method: "POST", + body: data, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags taxes + * @name V3TaxesClassesDetail + * @request GET:/wc/v3/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: ( + slug: string, + query?: { + /** Required to be true, as resource does not support trashing. */ + force?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/wc/v3/taxes/classes/${slug}`, + method: "DELETE", + query: query, + secure: true, + type: ContentType.UrlEncoded, + ...params, + }), + + /** + * No description + * + * @tags taxes + * @name V3TaxesList + * @request GET:/wc/v3/taxes + * @secure + */ + v3TaxesList: ( + query?: { + /** Scope under which the request is made; determines fields present in response. */ + context?: IV3TaxesListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -7508,16 +11561,16 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV1TaxesListParamsOrderEnum[]; + order?: IV3TaxesListParamsOrderEnum[]; /** Sort collection by object attribute. */ - orderby?: IV1TaxesListParamsOrderbyEnum[]; + orderby?: IV3TaxesListParamsOrderbyEnum[]; /** Sort by tax class. */ - class?: IV1TaxesListParamsClassEnum[]; + class?: IV3TaxesListParamsClassEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/taxes`, + path: `/wc/v3/taxes`, method: "GET", query: query, secure: true, @@ -7529,19 +11582,19 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesCreate - * @request POST:/wc/v1/taxes + * @name V3TaxesCreate + * @request POST:/wc/v3/taxes * @secure */ - v1TaxesCreate: ( + v3TaxesCreate: ( data: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode / ZIP. */ + /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ postcode?: string; - /** City name. */ + /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ city?: string; /** Tax rate. */ rate?: string; @@ -7563,11 +11616,15 @@ 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/v1/taxes`, + path: `/wc/v3/taxes`, method: "POST", body: data, secure: true, @@ -7579,20 +11636,20 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesDetail - * @request GET:/wc/v1/taxes/{id} + * @name V3TaxesDetail + * @request GET:/wc/v3/taxes/{id} * @secure */ - v1TaxesDetail: ( + v3TaxesDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1TaxesDetailParamsContextEnum[]; + context?: IV3TaxesDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/taxes/${id}`, + path: `/wc/v3/taxes/${id}`, method: "GET", query: query, secure: true, @@ -7604,22 +11661,22 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesCreate2 - * @request POST:/wc/v1/taxes/{id} - * @originalName v1TaxesCreate + * @name V3TaxesCreate2 + * @request POST:/wc/v3/taxes/{id} + * @originalName v3TaxesCreate * @duplicate * @secure */ - v1TaxesCreate2: ( + v3TaxesCreate2: ( id: number, data: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode / ZIP. */ + /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ postcode?: string; - /** City name. */ + /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ city?: string; /** Tax rate. */ rate?: string; @@ -7641,11 +11698,15 @@ 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/v1/taxes/${id}`, + path: `/wc/v3/taxes/${id}`, method: "POST", body: data, secure: true, @@ -7657,20 +11718,20 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesUpdate - * @request PUT:/wc/v1/taxes/{id} + * @name V3TaxesUpdate + * @request PUT:/wc/v3/taxes/{id} * @secure */ - v1TaxesUpdate: ( + v3TaxesUpdate: ( id: number, query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode / ZIP. */ + /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ postcode?: string; - /** City name. */ + /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ city?: string; /** Tax rate. */ rate?: string; @@ -7691,12 +11752,16 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV1TaxesUpdateParamsClassEnum[]; + class?: IV3TaxesUpdateParamsClassEnum[]; + /** 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/v1/taxes/${id}`, + path: `/wc/v3/taxes/${id}`, method: "PUT", query: query, secure: true, @@ -7708,20 +11773,20 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesPartialUpdate - * @request PATCH:/wc/v1/taxes/{id} + * @name V3TaxesPartialUpdate + * @request PATCH:/wc/v3/taxes/{id} * @secure */ - v1TaxesPartialUpdate: ( + v3TaxesPartialUpdate: ( id: number, query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode / ZIP. */ + /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ postcode?: string; - /** City name. */ + /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ city?: string; /** Tax rate. */ rate?: string; @@ -7742,12 +11807,16 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV1TaxesPartialUpdateParamsClassEnum[]; + class?: IV3TaxesPartialUpdateParamsClassEnum[]; + /** 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/v1/taxes/${id}`, + path: `/wc/v3/taxes/${id}`, method: "PATCH", query: query, secure: true, @@ -7759,11 +11828,11 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesDelete - * @request DELETE:/wc/v1/taxes/{id} + * @name V3TaxesDelete + * @request DELETE:/wc/v3/taxes/{id} * @secure */ - v1TaxesDelete: ( + v3TaxesDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -7772,7 +11841,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/taxes/${id}`, + path: `/wc/v3/taxes/${id}`, method: "DELETE", query: query, secure: true, @@ -7784,19 +11853,19 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesBatchCreate - * @request POST:/wc/v1/taxes/batch + * @name V3TaxesBatchCreate + * @request POST:/wc/v3/taxes/batch * @secure */ - v1TaxesBatchCreate: ( + v3TaxesBatchCreate: ( data: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode / ZIP. */ + /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ postcode?: string; - /** City name. */ + /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ city?: string; /** Tax rate. */ rate?: string; @@ -7818,11 +11887,15 @@ 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/v1/taxes/batch`, + path: `/wc/v3/taxes/batch`, method: "POST", body: data, secure: true, @@ -7834,19 +11907,19 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesBatchUpdate - * @request PUT:/wc/v1/taxes/batch + * @name V3TaxesBatchUpdate + * @request PUT:/wc/v3/taxes/batch * @secure */ - v1TaxesBatchUpdate: ( + v3TaxesBatchUpdate: ( query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode / ZIP. */ + /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ postcode?: string; - /** City name. */ + /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ city?: string; /** Tax rate. */ rate?: string; @@ -7867,12 +11940,16 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV1TaxesBatchUpdateParamsClassEnum[]; + class?: IV3TaxesBatchUpdateParamsClassEnum[]; + /** 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/v1/taxes/batch`, + path: `/wc/v3/taxes/batch`, method: "PUT", query: query, secure: true, @@ -7884,19 +11961,19 @@ export class Api< * No description * * @tags taxes - * @name V1TaxesBatchPartialUpdate - * @request PATCH:/wc/v1/taxes/batch + * @name V3TaxesBatchPartialUpdate + * @request PATCH:/wc/v3/taxes/batch * @secure */ - v1TaxesBatchPartialUpdate: ( + v3TaxesBatchPartialUpdate: ( query?: { /** Country ISO 3166 code. */ country?: string; /** State code. */ state?: string; - /** Postcode / ZIP. */ + /** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */ postcode?: string; - /** City name. */ + /** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */ city?: string; /** Tax rate. */ rate?: string; @@ -7917,12 +11994,16 @@ export class Api< */ order?: number; /** Tax class. */ - class?: IV1TaxesBatchPartialUpdateParamsClassEnum[]; + class?: IV3TaxesBatchPartialUpdateParamsClassEnum[]; + /** 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/v1/taxes/batch`, + path: `/wc/v3/taxes/batch`, method: "PATCH", query: query, secure: true, @@ -7934,14 +12015,14 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksList - * @request GET:/wc/v1/webhooks + * @name V3WebhooksList + * @request GET:/wc/v3/webhooks * @secure */ - v1WebhooksList: ( + v3WebhooksList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1WebhooksListParamsContextEnum[]; + context?: IV3WebhooksListParamsContextEnum[]; /** * Current page of the collection. * @format int64 @@ -7977,16 +12058,16 @@ export class Api< */ offset?: number; /** Order sort attribute ascending or descending. */ - order?: IV1WebhooksListParamsOrderEnum[]; + order?: IV3WebhooksListParamsOrderEnum[]; /** Sort collection by object attribute. */ - orderby?: IV1WebhooksListParamsOrderbyEnum[]; + orderby?: IV3WebhooksListParamsOrderbyEnum[]; /** Limit result set to webhooks assigned a specific status. */ - status?: IV1WebhooksListParamsStatusEnum[]; + status?: IV3WebhooksListParamsStatusEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks`, + path: `/wc/v3/webhooks`, method: "GET", query: query, secure: true, @@ -7998,16 +12079,16 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksCreate - * @request POST:/wc/v1/webhooks + * @name V3WebhooksCreate + * @request POST:/wc/v3/webhooks * @secure */ - v1WebhooksCreate: ( + v3WebhooksCreate: ( data: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IStatusEnum6[]; + status?: IStatusEnum14[]; /** 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. */ @@ -8018,7 +12099,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks`, + path: `/wc/v3/webhooks`, method: "POST", body: data, secure: true, @@ -8030,20 +12111,20 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksDetail - * @request GET:/wc/v1/webhooks/{id} + * @name V3WebhooksDetail + * @request GET:/wc/v3/webhooks/{id} * @secure */ - v1WebhooksDetail: ( + v3WebhooksDetail: ( id: number, query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1WebhooksDetailParamsContextEnum[]; + context?: IV3WebhooksDetailParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/${id}`, + path: `/wc/v3/webhooks/${id}`, method: "GET", query: query, secure: true, @@ -8055,19 +12136,19 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksCreate2 - * @request POST:/wc/v1/webhooks/{id} - * @originalName v1WebhooksCreate + * @name V3WebhooksCreate2 + * @request POST:/wc/v3/webhooks/{id} + * @originalName v3WebhooksCreate * @duplicate * @secure */ - v1WebhooksCreate2: ( + v3WebhooksCreate2: ( id: number, data: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IStatusEnum7[]; + status?: IStatusEnum15[]; /** 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. */ @@ -8076,7 +12157,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/${id}`, + path: `/wc/v3/webhooks/${id}`, method: "POST", body: data, secure: true, @@ -8088,17 +12169,17 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksUpdate - * @request PUT:/wc/v1/webhooks/{id} + * @name V3WebhooksUpdate + * @request PUT:/wc/v3/webhooks/{id} * @secure */ - v1WebhooksUpdate: ( + v3WebhooksUpdate: ( id: number, query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV1WebhooksUpdateParamsStatusEnum[]; + status?: IV3WebhooksUpdateParamsStatusEnum[]; /** 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. */ @@ -8107,7 +12188,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/${id}`, + path: `/wc/v3/webhooks/${id}`, method: "PUT", query: query, secure: true, @@ -8119,17 +12200,17 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksPartialUpdate - * @request PATCH:/wc/v1/webhooks/{id} + * @name V3WebhooksPartialUpdate + * @request PATCH:/wc/v3/webhooks/{id} * @secure */ - v1WebhooksPartialUpdate: ( + v3WebhooksPartialUpdate: ( id: number, query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV1WebhooksPartialUpdateParamsStatusEnum[]; + status?: IV3WebhooksPartialUpdateParamsStatusEnum[]; /** 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. */ @@ -8138,7 +12219,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/${id}`, + path: `/wc/v3/webhooks/${id}`, method: "PATCH", query: query, secure: true, @@ -8150,11 +12231,11 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksDelete - * @request DELETE:/wc/v1/webhooks/{id} + * @name V3WebhooksDelete + * @request DELETE:/wc/v3/webhooks/{id} * @secure */ - v1WebhooksDelete: ( + v3WebhooksDelete: ( id: number, query?: { /** Required to be true, as resource does not support trashing. */ @@ -8163,7 +12244,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/${id}`, + path: `/wc/v3/webhooks/${id}`, method: "DELETE", query: query, secure: true, @@ -8175,16 +12256,16 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksBatchCreate - * @request POST:/wc/v1/webhooks/batch + * @name V3WebhooksBatchCreate + * @request POST:/wc/v3/webhooks/batch * @secure */ - v1WebhooksBatchCreate: ( + v3WebhooksBatchCreate: ( data: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IStatusEnum8[]; + status?: IStatusEnum16[]; /** 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. */ @@ -8193,7 +12274,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/batch`, + path: `/wc/v3/webhooks/batch`, method: "POST", body: data, secure: true, @@ -8205,16 +12286,16 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksBatchUpdate - * @request PUT:/wc/v1/webhooks/batch + * @name V3WebhooksBatchUpdate + * @request PUT:/wc/v3/webhooks/batch * @secure */ - v1WebhooksBatchUpdate: ( + v3WebhooksBatchUpdate: ( query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV1WebhooksBatchUpdateParamsStatusEnum[]; + status?: IV3WebhooksBatchUpdateParamsStatusEnum[]; /** 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. */ @@ -8223,7 +12304,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/batch`, + path: `/wc/v3/webhooks/batch`, method: "PUT", query: query, secure: true, @@ -8235,16 +12316,16 @@ export class Api< * No description * * @tags webhooks - * @name V1WebhooksBatchPartialUpdate - * @request PATCH:/wc/v1/webhooks/batch + * @name V3WebhooksBatchPartialUpdate + * @request PATCH:/wc/v3/webhooks/batch * @secure */ - v1WebhooksBatchPartialUpdate: ( + v3WebhooksBatchPartialUpdate: ( query?: { /** A friendly name for the webhook. */ name?: string; /** Webhook status. */ - status?: IV1WebhooksBatchPartialUpdateParamsStatusEnum[]; + status?: IV3WebhooksBatchPartialUpdateParamsStatusEnum[]; /** 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. */ @@ -8253,7 +12334,7 @@ export class Api< params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/batch`, + path: `/wc/v3/webhooks/batch`, method: "PATCH", query: query, secure: true, @@ -8264,21 +12345,20 @@ export class Api< /** * No description * - * @tags webhooks - * @name V1WebhooksDeliveriesList - * @request GET:/wc/v1/webhooks/{webhook_id}/deliveries + * @tags system_status + * @name V3SystemStatusList + * @request GET:/wc/v3/system_status * @secure */ - v1WebhooksDeliveriesList: ( - webhookId: number, + v3SystemStatusList: ( query?: { /** Scope under which the request is made; determines fields present in response. */ - context?: IV1WebhooksDeliveriesListParamsContextEnum[]; + context?: IV3SystemStatusListParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/${webhookId}/deliveries`, + path: `/wc/v3/system_status`, method: "GET", query: query, secure: true, @@ -8289,33 +12369,647 @@ export class Api< /** * No description * - * @tags webhooks - * @name V1WebhooksDetail2 - * @request GET:/wc/v1/webhooks/{webhook_id} - * @originalName v1WebhooksDetail - * @duplicate + * @tags system_status + * @name V3SystemStatusToolsList + * @request GET:/wc/v3/system_status/tools * @secure */ - v1WebhooksDetail2: ( - webhookId: number, + v3SystemStatusToolsList: ( query?: { - /** - * Unique identifier for the resource. - * @format int64 - */ - id?: number; /** Scope under which the request is made; determines fields present in response. */ - context?: IV1WebhooksDetail2ParamsContextEnum[]; + context?: IV3SystemStatusToolsListParamsContextEnum[]; }, params: RequestParams = {}, ) => this.request({ - path: `/wc/v1/webhooks/${webhookId}`, + 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. + * @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: "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}`, + 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/getProductsDetail.ts b/api/endpoints/getProductsDetail.ts index 06d3d18..e489d84 100644 --- a/api/endpoints/getProductsDetail.ts +++ b/api/endpoints/getProductsDetail.ts @@ -1,4 +1,4 @@ import api from '~/api/instance' export const getProductsDetail = async (productId: number) => - await api.wc.v1ProductsDetail(productId) + await api.wc.v3ProductsDetail(productId) diff --git a/api/endpoints/getProductsVariationsList.ts b/api/endpoints/getProductsVariationsList.ts new file mode 100644 index 0000000..6de83a0 --- /dev/null +++ b/api/endpoints/getProductsVariationsList.ts @@ -0,0 +1,4 @@ +import api from '~/api/instance' + +export const getProductsVariationsList = async (productId: number) => + await api.wc.v3ProductsVariationsList(productId) diff --git a/api/endpoints/index.ts b/api/endpoints/index.ts index 54995b2..839b8a7 100644 --- a/api/endpoints/index.ts +++ b/api/endpoints/index.ts @@ -1 +1,2 @@ export * from './getProductsDetail' +export * from './getProductsVariationsList' diff --git a/api/queries/index.ts b/api/queries/index.ts index d24de3a..4f39839 100644 --- a/api/queries/index.ts +++ b/api/queries/index.ts @@ -1 +1,2 @@ export * from './useGetProductsDetail' +export * from './useGetProductsVariationsList' diff --git a/api/queries/useGetProductsVariationsList.ts b/api/queries/useGetProductsVariationsList.ts new file mode 100644 index 0000000..22384c9 --- /dev/null +++ b/api/queries/useGetProductsVariationsList.ts @@ -0,0 +1,10 @@ +import { useQuery } from '@tanstack/vue-query' +import { unref } from 'vue' +import { getProductsVariationsList } from '~/api/endpoints' + +export const useGetProductsVariationsList = (productId: MaybeRef) => { + return useQuery({ + queryKey: ['get-products-variations-list', productId], + queryFn: () => getProductsVariationsList(unref(productId)), + }) +} diff --git a/pages/index.vue b/pages/index.vue index ce5aff0..a94348d 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -20,12 +20,12 @@
{{ variation?.id }} - +
@@ -37,9 +37,11 @@