8322 lines
210 KiB
TypeScript
8322 lines
210 KiB
TypeScript
/* eslint-disable */
|
|
/* tslint:disable */
|
|
// @ts-nocheck
|
|
/*
|
|
* ---------------------------------------------------------------
|
|
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
* ## ##
|
|
* ## AUTHOR: acacode ##
|
|
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
* ---------------------------------------------------------------
|
|
*/
|
|
|
|
/** @default "view" */
|
|
export enum IV1CouponsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV1CouponsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV1CouponsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "fixed_cart" */
|
|
export enum IDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1CouponsDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IDiscountTypeEnum1 {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV1CouponsUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV1CouponsPartialUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IDiscountTypeEnum2 {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV1CouponsBatchUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV1CouponsBatchPartialUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1CustomersDownloadsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1CustomersListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV1CustomersListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV1CustomersListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
RegisteredDate = "registered_date",
|
|
}
|
|
|
|
/** @default "customer" */
|
|
export enum IV1CustomersListParamsRoleEnum {
|
|
All = "all",
|
|
Administrator = "administrator",
|
|
Editor = "editor",
|
|
Author = "author",
|
|
Contributor = "contributor",
|
|
Subscriber = "subscriber",
|
|
Customer = "customer",
|
|
ShopManager = "shop_manager",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1CustomersDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1OrdersNotesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1OrdersDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1OrdersRefundsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV1OrdersRefundsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV1OrdersRefundsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "any" */
|
|
export enum 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 {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV1OrdersListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV1OrdersListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "any" */
|
|
export enum IV1OrdersListParamsStatusEnum {
|
|
Any = "any",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
/** @default "pending" */
|
|
export enum IStatusEnum {
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
/** @default "RUB" */
|
|
export enum ICurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1OrdersDetail2ParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IStatusEnum1 {
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum ICurrencyEnum1 {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV1OrdersUpdateParamsStatusEnum {
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV1OrdersUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV1OrdersPartialUpdateParamsStatusEnum {
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV1OrdersPartialUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IStatusEnum2 {
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum ICurrencyEnum2 {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV1OrdersBatchUpdateParamsStatusEnum {
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV1OrdersBatchUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV1OrdersBatchPartialUpdateParamsStatusEnum {
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV1OrdersBatchPartialUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ProductsAttributesTermsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV1ProductsAttributesTermsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV1ProductsAttributesTermsListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
Slug = "slug",
|
|
TermGroup = "term_group",
|
|
Description = "description",
|
|
Count = "count",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ProductsAttributesDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ProductsAttributesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "select" */
|
|
export enum ITypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
/** @default "menu_order" */
|
|
export enum IOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ProductsAttributesDetail2ParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum ITypeEnum1 {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IOrderByEnum1 {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesUpdate2ParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesUpdate2ParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesPartialUpdate2ParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesPartialUpdate2ParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum ITypeEnum2 {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IOrderByEnum2 {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesBatchUpdateParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesBatchUpdateParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesBatchPartialUpdateParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV1ProductsAttributesBatchPartialUpdateParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ProductsCategoriesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV1ProductsCategoriesListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV1ProductsCategoriesListParamsOrderbyEnum {
|
|
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 IV1ProductsCategoriesDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IDisplayEnum1 {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV1ProductsCategoriesUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV1ProductsCategoriesPartialUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IDisplayEnum2 {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV1ProductsCategoriesBatchUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV1ProductsCategoriesBatchPartialUpdateParamsDisplayEnum {
|
|
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 {
|
|
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 {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV1ProductsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV1ProductsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "any" */
|
|
export enum IV1ProductsListParamsStatusEnum {
|
|
Any = "any",
|
|
Future = "future",
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV1ProductsListParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
/** @default "simple" */
|
|
export enum ITypeEnum3 {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
/** @default "publish" */
|
|
export enum IStatusEnum3 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
}
|
|
|
|
/** @default "visible" */
|
|
export enum ICatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
/** @default "standard" */
|
|
export enum IDownloadTypeEnum {
|
|
Standard = "standard",
|
|
}
|
|
|
|
/** @default "taxable" */
|
|
export enum ITaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
/** @default "no" */
|
|
export enum IBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ProductsDetail2ParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum ITypeEnum4 {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IStatusEnum4 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
}
|
|
|
|
export enum ICatalogVisibilityEnum1 {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IDownloadTypeEnum1 {
|
|
Standard = "standard",
|
|
}
|
|
|
|
export enum ITaxStatusEnum1 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IBackordersEnum1 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV1ProductsUpdate2ParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV1ProductsUpdate2ParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
}
|
|
|
|
export enum IV1ProductsUpdate2ParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV1ProductsUpdate2ParamsDownloadTypeEnum {
|
|
Standard = "standard",
|
|
}
|
|
|
|
export enum IV1ProductsUpdate2ParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV1ProductsUpdate2ParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV1ProductsPartialUpdate2ParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV1ProductsPartialUpdate2ParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
}
|
|
|
|
export enum IV1ProductsPartialUpdate2ParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV1ProductsPartialUpdate2ParamsDownloadTypeEnum {
|
|
Standard = "standard",
|
|
}
|
|
|
|
export enum IV1ProductsPartialUpdate2ParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV1ProductsPartialUpdate2ParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum ITypeEnum5 {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IStatusEnum5 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
}
|
|
|
|
export enum ICatalogVisibilityEnum2 {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IDownloadTypeEnum2 {
|
|
Standard = "standard",
|
|
}
|
|
|
|
export enum ITaxStatusEnum2 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IBackordersEnum2 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV1ProductsBatchUpdateParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV1ProductsBatchUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
}
|
|
|
|
export enum IV1ProductsBatchUpdateParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV1ProductsBatchUpdateParamsDownloadTypeEnum {
|
|
Standard = "standard",
|
|
}
|
|
|
|
export enum IV1ProductsBatchUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV1ProductsBatchUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV1ProductsBatchPartialUpdateParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV1ProductsBatchPartialUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
}
|
|
|
|
export enum IV1ProductsBatchPartialUpdateParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV1ProductsBatchPartialUpdateParamsDownloadTypeEnum {
|
|
Standard = "standard",
|
|
}
|
|
|
|
export enum IV1ProductsBatchPartialUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV1ProductsBatchPartialUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ReportsSalesListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
export enum IV1ReportsSalesListParamsPeriodEnum {
|
|
Week = "week",
|
|
Month = "month",
|
|
LastMonth = "last_month",
|
|
Year = "year",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ReportsTopSellersListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
export enum IV1ReportsTopSellersListParamsPeriodEnum {
|
|
Week = "week",
|
|
Month = "month",
|
|
LastMonth = "last_month",
|
|
Year = "year",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1ReportsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1TaxesClassesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1TaxesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV1TaxesListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "order" */
|
|
export enum IV1TaxesListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Order = "order",
|
|
Priority = "priority",
|
|
}
|
|
|
|
export enum IV1TaxesListParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
/** @default "standard" */
|
|
export enum IClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1TaxesDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IClassEnum1 {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV1TaxesUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV1TaxesPartialUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IClassEnum2 {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV1TaxesBatchUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV1TaxesBatchPartialUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1WebhooksListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV1WebhooksListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV1WebhooksListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Title = "title",
|
|
}
|
|
|
|
/** @default "all" */
|
|
export enum IV1WebhooksListParamsStatusEnum {
|
|
All = "all",
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
/** @default "active" */
|
|
export enum IStatusEnum6 {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1WebhooksDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IStatusEnum7 {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV1WebhooksUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV1WebhooksPartialUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IStatusEnum8 {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV1WebhooksBatchUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV1WebhooksBatchPartialUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1WebhooksDeliveriesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV1WebhooksDetail2ParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export type QueryParamsType = Record<string | number, any>;
|
|
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
|
|
export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
|
/** set parameter to `true` for call `securityWorker` for this request */
|
|
secure?: boolean;
|
|
/** request path */
|
|
path: string;
|
|
/** content type of request body */
|
|
type?: ContentType;
|
|
/** query params */
|
|
query?: QueryParamsType;
|
|
/** format of response (i.e. response.json() -> format: "json") */
|
|
format?: ResponseFormat;
|
|
/** request body */
|
|
body?: unknown;
|
|
/** base url */
|
|
baseUrl?: string;
|
|
/** request cancellation token */
|
|
cancelToken?: CancelToken;
|
|
}
|
|
|
|
export type RequestParams = Omit<
|
|
FullRequestParams,
|
|
"body" | "method" | "query" | "path"
|
|
>;
|
|
|
|
export interface ApiConfig<SecurityDataType = unknown> {
|
|
baseUrl?: string;
|
|
baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
|
|
securityWorker?: (
|
|
securityData: SecurityDataType | null,
|
|
) => Promise<RequestParams | void> | RequestParams | void;
|
|
customFetch?: typeof fetch;
|
|
}
|
|
|
|
export interface HttpResponse<D extends unknown, E extends unknown = unknown>
|
|
extends Response {
|
|
data: D;
|
|
error: E;
|
|
}
|
|
|
|
type CancelToken = Symbol | string | number;
|
|
|
|
export enum ContentType {
|
|
Json = "application/json",
|
|
JsonApi = "application/vnd.api+json",
|
|
FormData = "multipart/form-data",
|
|
UrlEncoded = "application/x-www-form-urlencoded",
|
|
Text = "text/plain",
|
|
}
|
|
|
|
export class HttpClient<SecurityDataType = unknown> {
|
|
public baseUrl: string = "https://wp.koptilnya.xyz/wp-json";
|
|
private securityData: SecurityDataType | null = null;
|
|
private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
|
|
private abortControllers = new Map<CancelToken, AbortController>();
|
|
private customFetch = (...fetchParams: Parameters<typeof fetch>) =>
|
|
fetch(...fetchParams);
|
|
|
|
private baseApiParams: RequestParams = {
|
|
credentials: "same-origin",
|
|
headers: {},
|
|
redirect: "follow",
|
|
referrerPolicy: "no-referrer",
|
|
};
|
|
|
|
constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
|
|
Object.assign(this, apiConfig);
|
|
}
|
|
|
|
public setSecurityData = (data: SecurityDataType | null) => {
|
|
this.securityData = data;
|
|
};
|
|
|
|
protected encodeQueryParam(key: string, value: any) {
|
|
const encodedKey = encodeURIComponent(key);
|
|
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
}
|
|
|
|
protected addQueryParam(query: QueryParamsType, key: string) {
|
|
return this.encodeQueryParam(key, query[key]);
|
|
}
|
|
|
|
protected addArrayQueryParam(query: QueryParamsType, key: string) {
|
|
const value = query[key];
|
|
return value.map((v: any) => this.encodeQueryParam(key, v)).join("&");
|
|
}
|
|
|
|
protected toQueryString(rawQuery?: QueryParamsType): string {
|
|
const query = rawQuery || {};
|
|
const keys = Object.keys(query).filter(
|
|
(key) => "undefined" !== typeof query[key],
|
|
);
|
|
return keys
|
|
.map((key) =>
|
|
Array.isArray(query[key])
|
|
? this.addArrayQueryParam(query, key)
|
|
: this.addQueryParam(query, key),
|
|
)
|
|
.join("&");
|
|
}
|
|
|
|
protected addQueryParams(rawQuery?: QueryParamsType): string {
|
|
const queryString = this.toQueryString(rawQuery);
|
|
return queryString ? `?${queryString}` : "";
|
|
}
|
|
|
|
private contentFormatters: Record<ContentType, (input: any) => any> = {
|
|
[ContentType.Json]: (input: any) =>
|
|
input !== null && (typeof input === "object" || typeof input === "string")
|
|
? JSON.stringify(input)
|
|
: input,
|
|
[ContentType.JsonApi]: (input: any) =>
|
|
input !== null && (typeof input === "object" || typeof input === "string")
|
|
? JSON.stringify(input)
|
|
: input,
|
|
[ContentType.Text]: (input: any) =>
|
|
input !== null && typeof input !== "string"
|
|
? JSON.stringify(input)
|
|
: input,
|
|
[ContentType.FormData]: (input: any) =>
|
|
Object.keys(input || {}).reduce((formData, key) => {
|
|
const property = input[key];
|
|
formData.append(
|
|
key,
|
|
property instanceof Blob
|
|
? property
|
|
: typeof property === "object" && property !== null
|
|
? JSON.stringify(property)
|
|
: `${property}`,
|
|
);
|
|
return formData;
|
|
}, new FormData()),
|
|
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
|
|
};
|
|
|
|
protected mergeRequestParams(
|
|
params1: RequestParams,
|
|
params2?: RequestParams,
|
|
): RequestParams {
|
|
return {
|
|
...this.baseApiParams,
|
|
...params1,
|
|
...(params2 || {}),
|
|
headers: {
|
|
...(this.baseApiParams.headers || {}),
|
|
...(params1.headers || {}),
|
|
...((params2 && params2.headers) || {}),
|
|
},
|
|
};
|
|
}
|
|
|
|
protected createAbortSignal = (
|
|
cancelToken: CancelToken,
|
|
): AbortSignal | undefined => {
|
|
if (this.abortControllers.has(cancelToken)) {
|
|
const abortController = this.abortControllers.get(cancelToken);
|
|
if (abortController) {
|
|
return abortController.signal;
|
|
}
|
|
return void 0;
|
|
}
|
|
|
|
const abortController = new AbortController();
|
|
this.abortControllers.set(cancelToken, abortController);
|
|
return abortController.signal;
|
|
};
|
|
|
|
public abortRequest = (cancelToken: CancelToken) => {
|
|
const abortController = this.abortControllers.get(cancelToken);
|
|
|
|
if (abortController) {
|
|
abortController.abort();
|
|
this.abortControllers.delete(cancelToken);
|
|
}
|
|
};
|
|
|
|
public request = async <T = any, E = any>({
|
|
body,
|
|
secure,
|
|
path,
|
|
type,
|
|
query,
|
|
format,
|
|
baseUrl,
|
|
cancelToken,
|
|
...params
|
|
}: FullRequestParams): Promise<HttpResponse<T, E>> => {
|
|
const secureParams =
|
|
((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
|
|
this.securityWorker &&
|
|
(await this.securityWorker(this.securityData))) ||
|
|
{};
|
|
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
const queryString = query && this.toQueryString(query);
|
|
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
|
const responseFormat = format || requestParams.format;
|
|
|
|
return this.customFetch(
|
|
`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
|
|
{
|
|
...requestParams,
|
|
headers: {
|
|
...(requestParams.headers || {}),
|
|
...(type && type !== ContentType.FormData
|
|
? { "Content-Type": type }
|
|
: {}),
|
|
},
|
|
signal:
|
|
(cancelToken
|
|
? this.createAbortSignal(cancelToken)
|
|
: requestParams.signal) || null,
|
|
body:
|
|
typeof body === "undefined" || body === null
|
|
? null
|
|
: payloadFormatter(body),
|
|
},
|
|
).then(async (response) => {
|
|
const r = response.clone() as HttpResponse<T, E>;
|
|
r.data = null as unknown as T;
|
|
r.error = null as unknown as E;
|
|
|
|
const data = !responseFormat
|
|
? r
|
|
: await response[responseFormat]()
|
|
.then((data) => {
|
|
if (r.ok) {
|
|
r.data = data;
|
|
} else {
|
|
r.error = data;
|
|
}
|
|
return r;
|
|
})
|
|
.catch((e) => {
|
|
r.error = e;
|
|
return r;
|
|
});
|
|
|
|
if (cancelToken) {
|
|
this.abortControllers.delete(cancelToken);
|
|
}
|
|
|
|
if (!response.ok) throw data;
|
|
return data;
|
|
});
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @title Paxton API
|
|
* @version 6.8.2
|
|
* @baseUrl https://wp.koptilnya.xyz/wp-json
|
|
* @contact <wraker6@gmail.com>
|
|
*/
|
|
export class Api<
|
|
SecurityDataType extends unknown,
|
|
> extends HttpClient<SecurityDataType> {
|
|
wc = {
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V1MarketplaceProductPreviewList
|
|
* @request GET:/wc/v1/marketplace/product-preview
|
|
* @secure
|
|
*/
|
|
v1MarketplaceProductPreviewList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/marketplace/product-preview`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V1CouponsList
|
|
* @request GET:/wc/v1/coupons
|
|
* @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 = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/coupons`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V1CouponsCreate
|
|
* @request POST:/wc/v1/coupons
|
|
* @secure
|
|
*/
|
|
v1CouponsCreate: (
|
|
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[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/coupons`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V1CouponsDetail
|
|
* @request GET:/wc/v1/coupons/{id}
|
|
* @secure
|
|
*/
|
|
v1CouponsDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1CouponsDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/coupons/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V1CouponsCreate2
|
|
* @request POST:/wc/v1/coupons/{id}
|
|
* @originalName v1CouponsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1CouponsCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IDiscountTypeEnum1[];
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** UTC DateTime when the coupon expires. */
|
|
expiry_date?: null;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
exclude_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/coupons/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V1CouponsUpdate
|
|
* @request PUT:/wc/v1/coupons/{id}
|
|
* @secure
|
|
*/
|
|
v1CouponsUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IV1CouponsUpdateParamsDiscountTypeEnum[];
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** UTC DateTime when the coupon expires. */
|
|
expiry_date?: any;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
exclude_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
path: `/wc/v1/orders/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsAttributesTermsList
|
|
* @request GET:/wc/v1/products/attributes/{attribute_id}/terms
|
|
* @secure
|
|
*/
|
|
v1ProductsAttributesTermsList: (
|
|
attributeId: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1ProductsAttributesTermsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @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?: IV1ProductsAttributesTermsListParamsOrderEnum[];
|
|
/** Sort collection by resource attribute. */
|
|
orderby?: IV1ProductsAttributesTermsListParamsOrderbyEnum[];
|
|
/** 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<void, void>({
|
|
path: `/wc/v1/products/attributes/${attributeId}/terms`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsAttributesTermsCreate
|
|
* @request POST:/wc/v1/products/attributes/{attribute_id}/terms
|
|
* @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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
path: `/wc/v1/products/categories`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesCreate
|
|
* @request POST:/wc/v1/products/categories
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesCreate: (
|
|
data: {
|
|
/** Name for the resource. */
|
|
name: string;
|
|
/** 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?: IDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesDetail
|
|
* @request GET:/wc/v1/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1ProductsCategoriesDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesCreate2
|
|
* @request POST:/wc/v1/products/categories/{id}
|
|
* @originalName v1ProductsCategoriesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesCreate2: (
|
|
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?: IDisplayEnum1[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesUpdate
|
|
* @request PUT:/wc/v1/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesUpdate: (
|
|
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?: IV1ProductsCategoriesUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesPartialUpdate
|
|
* @request PATCH:/wc/v1/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesPartialUpdate: (
|
|
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?: IV1ProductsCategoriesPartialUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesDelete
|
|
* @request DELETE:/wc/v1/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesBatchCreate
|
|
* @request POST:/wc/v1/products/categories/batch
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesBatchCreate: (
|
|
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?: IDisplayEnum2[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesBatchUpdate
|
|
* @request PUT:/wc/v1/products/categories/batch
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesBatchUpdate: (
|
|
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?: IV1ProductsCategoriesBatchUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCategoriesBatchPartialUpdate
|
|
* @request PATCH:/wc/v1/products/categories/batch
|
|
* @secure
|
|
*/
|
|
v1ProductsCategoriesBatchPartialUpdate: (
|
|
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?: IV1ProductsCategoriesBatchPartialUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/categories/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsReviewsList
|
|
* @request GET:/wc/v1/products/{product_id}/reviews
|
|
* @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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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: (
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
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[];
|
|
/**
|
|
* 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?: IV1ProductsListParamsOrderEnum[];
|
|
/** 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;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCreate2
|
|
* @request POST:/wc/v1/products
|
|
* @originalName v1ProductsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1ProductsCreate2: (
|
|
data: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** Product type. */
|
|
type?: ITypeEnum3[];
|
|
/** Product status (post status). */
|
|
status?: IStatusEnum3[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: ICatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Unique identifier. */
|
|
sku?: 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;
|
|
/** 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;
|
|
/** Download type, this controls the schema on the front-end. */
|
|
download_type?: IDownloadTypeEnum[];
|
|
/**
|
|
* 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?: ITaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @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;
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum[];
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** List of upsell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* 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 tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/** List of variations. */
|
|
variations?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsDetail2
|
|
* @request GET:/wc/v1/products/{id}
|
|
* @originalName v1ProductsDetail
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1ProductsDetail2: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1ProductsDetail2ParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsCreate3
|
|
* @request POST:/wc/v1/products/{id}
|
|
* @originalName v1ProductsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1ProductsCreate3: (
|
|
id: number,
|
|
data: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** Product type. */
|
|
type?: ITypeEnum4[];
|
|
/** Product status (post status). */
|
|
status?: IStatusEnum4[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: ICatalogVisibilityEnum1[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Unique identifier. */
|
|
sku?: 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;
|
|
/** 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;
|
|
/** Download type, this controls the schema on the front-end. */
|
|
download_type?: IDownloadTypeEnum1[];
|
|
/**
|
|
* 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?: ITaxStatusEnum1[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @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;
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum1[];
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** List of upsell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* 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 tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/** List of variations. */
|
|
variations?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsUpdate2
|
|
* @request PUT:/wc/v1/products/{id}
|
|
* @originalName v1ProductsUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1ProductsUpdate2: (
|
|
id: number,
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** Product type. */
|
|
type?: IV1ProductsUpdate2ParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV1ProductsUpdate2ParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV1ProductsUpdate2ParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Unique identifier. */
|
|
sku?: 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;
|
|
/** 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;
|
|
/** Download type, this controls the schema on the front-end. */
|
|
download_type?: IV1ProductsUpdate2ParamsDownloadTypeEnum[];
|
|
/**
|
|
* 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?: IV1ProductsUpdate2ParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @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;
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV1ProductsUpdate2ParamsBackordersEnum[];
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** List of upsell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* 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 tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/** List of variations. */
|
|
variations?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsPartialUpdate2
|
|
* @request PATCH:/wc/v1/products/{id}
|
|
* @originalName v1ProductsPartialUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1ProductsPartialUpdate2: (
|
|
id: number,
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** Product type. */
|
|
type?: IV1ProductsPartialUpdate2ParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV1ProductsPartialUpdate2ParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV1ProductsPartialUpdate2ParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Unique identifier. */
|
|
sku?: 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;
|
|
/** 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;
|
|
/** Download type, this controls the schema on the front-end. */
|
|
download_type?: IV1ProductsPartialUpdate2ParamsDownloadTypeEnum[];
|
|
/**
|
|
* 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?: IV1ProductsPartialUpdate2ParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @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;
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV1ProductsPartialUpdate2ParamsBackordersEnum[];
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** List of upsell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* 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 tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/** List of variations. */
|
|
variations?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsDelete2
|
|
* @request DELETE:/wc/v1/products/{id}
|
|
* @originalName v1ProductsDelete
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1ProductsDelete2: (
|
|
id: number,
|
|
query?: {
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsBatchCreate
|
|
* @request POST:/wc/v1/products/batch
|
|
* @secure
|
|
*/
|
|
v1ProductsBatchCreate: (
|
|
data: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** Product type. */
|
|
type?: ITypeEnum5[];
|
|
/** Product status (post status). */
|
|
status?: IStatusEnum5[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: ICatalogVisibilityEnum2[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Unique identifier. */
|
|
sku?: 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;
|
|
/** 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;
|
|
/** Download type, this controls the schema on the front-end. */
|
|
download_type?: IDownloadTypeEnum2[];
|
|
/**
|
|
* 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?: ITaxStatusEnum2[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @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;
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum2[];
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** List of upsell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* 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 tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/** List of variations. */
|
|
variations?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsBatchUpdate
|
|
* @request PUT:/wc/v1/products/batch
|
|
* @secure
|
|
*/
|
|
v1ProductsBatchUpdate: (
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** Product type. */
|
|
type?: IV1ProductsBatchUpdateParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV1ProductsBatchUpdateParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV1ProductsBatchUpdateParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Unique identifier. */
|
|
sku?: 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;
|
|
/** 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;
|
|
/** Download type, this controls the schema on the front-end. */
|
|
download_type?: IV1ProductsBatchUpdateParamsDownloadTypeEnum[];
|
|
/**
|
|
* 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?: IV1ProductsBatchUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @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;
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV1ProductsBatchUpdateParamsBackordersEnum[];
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** List of upsell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* 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 tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/** List of variations. */
|
|
variations?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V1ProductsBatchPartialUpdate
|
|
* @request PATCH:/wc/v1/products/batch
|
|
* @secure
|
|
*/
|
|
v1ProductsBatchPartialUpdate: (
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** Product type. */
|
|
type?: IV1ProductsBatchPartialUpdateParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV1ProductsBatchPartialUpdateParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV1ProductsBatchPartialUpdateParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Unique identifier. */
|
|
sku?: 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;
|
|
/** 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;
|
|
/** Download type, this controls the schema on the front-end. */
|
|
download_type?: IV1ProductsBatchPartialUpdateParamsDownloadTypeEnum[];
|
|
/**
|
|
* 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?: IV1ProductsBatchPartialUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @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;
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV1ProductsBatchPartialUpdateParamsBackordersEnum[];
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** List of upsell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* 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 tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/** List of variations. */
|
|
variations?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/products/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V1ReportsSalesList
|
|
* @request GET:/wc/v1/reports/sales
|
|
* @secure
|
|
*/
|
|
v1ReportsSalesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1ReportsSalesListParamsContextEnum[];
|
|
/** Report period. */
|
|
period?: IV1ReportsSalesListParamsPeriodEnum[];
|
|
/**
|
|
* 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<void, void>({
|
|
path: `/wc/v1/reports/sales`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V1ReportsTopSellersList
|
|
* @request GET:/wc/v1/reports/top_sellers
|
|
* @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<void, void>({
|
|
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<void, void>({
|
|
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<void, void>({
|
|
path: `/wc/v1/taxes/classes`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesClassesCreate
|
|
* @request POST:/wc/v1/taxes/classes
|
|
* @secure
|
|
*/
|
|
v1TaxesClassesCreate: (
|
|
data: {
|
|
/** Tax class name. */
|
|
name: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/classes`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesClassesDelete
|
|
* @request DELETE:/wc/v1/taxes/classes/{slug}
|
|
* @secure
|
|
*/
|
|
v1TaxesClassesDelete: (
|
|
slug: string,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/classes/${slug}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesList
|
|
* @request GET:/wc/v1/taxes
|
|
* @secure
|
|
*/
|
|
v1TaxesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1TaxesListParamsContextEnum[];
|
|
/**
|
|
* 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;
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV1TaxesListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV1TaxesListParamsOrderbyEnum[];
|
|
/** Sort by tax class. */
|
|
class?: IV1TaxesListParamsClassEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesCreate
|
|
* @request POST:/wc/v1/taxes
|
|
* @secure
|
|
*/
|
|
v1TaxesCreate: (
|
|
data: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode / ZIP. */
|
|
postcode?: string;
|
|
/** City name. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IClassEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesDetail
|
|
* @request GET:/wc/v1/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v1TaxesDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1TaxesDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesCreate2
|
|
* @request POST:/wc/v1/taxes/{id}
|
|
* @originalName v1TaxesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1TaxesCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode / ZIP. */
|
|
postcode?: string;
|
|
/** City name. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IClassEnum1[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesUpdate
|
|
* @request PUT:/wc/v1/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v1TaxesUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode / ZIP. */
|
|
postcode?: string;
|
|
/** City name. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV1TaxesUpdateParamsClassEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesPartialUpdate
|
|
* @request PATCH:/wc/v1/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v1TaxesPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode / ZIP. */
|
|
postcode?: string;
|
|
/** City name. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV1TaxesPartialUpdateParamsClassEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesDelete
|
|
* @request DELETE:/wc/v1/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v1TaxesDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesBatchCreate
|
|
* @request POST:/wc/v1/taxes/batch
|
|
* @secure
|
|
*/
|
|
v1TaxesBatchCreate: (
|
|
data: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode / ZIP. */
|
|
postcode?: string;
|
|
/** City name. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IClassEnum2[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesBatchUpdate
|
|
* @request PUT:/wc/v1/taxes/batch
|
|
* @secure
|
|
*/
|
|
v1TaxesBatchUpdate: (
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode / ZIP. */
|
|
postcode?: string;
|
|
/** City name. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV1TaxesBatchUpdateParamsClassEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V1TaxesBatchPartialUpdate
|
|
* @request PATCH:/wc/v1/taxes/batch
|
|
* @secure
|
|
*/
|
|
v1TaxesBatchPartialUpdate: (
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode / ZIP. */
|
|
postcode?: string;
|
|
/** City name. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV1TaxesBatchPartialUpdateParamsClassEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/taxes/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksList
|
|
* @request GET:/wc/v1/webhooks
|
|
* @secure
|
|
*/
|
|
v1WebhooksList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1WebhooksListParamsContextEnum[];
|
|
/**
|
|
* 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?: IV1WebhooksListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV1WebhooksListParamsOrderbyEnum[];
|
|
/** Limit result set to webhooks assigned a specific status. */
|
|
status?: IV1WebhooksListParamsStatusEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksCreate
|
|
* @request POST:/wc/v1/webhooks
|
|
* @secure
|
|
*/
|
|
v1WebhooksCreate: (
|
|
data: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IStatusEnum6[];
|
|
/** Webhook topic. */
|
|
topic: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
/** Webhook delivery URL. */
|
|
delivery_url: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksDetail
|
|
* @request GET:/wc/v1/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v1WebhooksDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1WebhooksDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksCreate2
|
|
* @request POST:/wc/v1/webhooks/{id}
|
|
* @originalName v1WebhooksCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1WebhooksCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IStatusEnum7[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksUpdate
|
|
* @request PUT:/wc/v1/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v1WebhooksUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV1WebhooksUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksPartialUpdate
|
|
* @request PATCH:/wc/v1/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v1WebhooksPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV1WebhooksPartialUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksDelete
|
|
* @request DELETE:/wc/v1/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v1WebhooksDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksBatchCreate
|
|
* @request POST:/wc/v1/webhooks/batch
|
|
* @secure
|
|
*/
|
|
v1WebhooksBatchCreate: (
|
|
data: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IStatusEnum8[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksBatchUpdate
|
|
* @request PUT:/wc/v1/webhooks/batch
|
|
* @secure
|
|
*/
|
|
v1WebhooksBatchUpdate: (
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV1WebhooksBatchUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksBatchPartialUpdate
|
|
* @request PATCH:/wc/v1/webhooks/batch
|
|
* @secure
|
|
*/
|
|
v1WebhooksBatchPartialUpdate: (
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV1WebhooksBatchPartialUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksDeliveriesList
|
|
* @request GET:/wc/v1/webhooks/{webhook_id}/deliveries
|
|
* @secure
|
|
*/
|
|
v1WebhooksDeliveriesList: (
|
|
webhookId: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1WebhooksDeliveriesListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/${webhookId}/deliveries`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V1WebhooksDetail2
|
|
* @request GET:/wc/v1/webhooks/{webhook_id}
|
|
* @originalName v1WebhooksDetail
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v1WebhooksDetail2: (
|
|
webhookId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV1WebhooksDetail2ParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v1/webhooks/${webhookId}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
};
|
|
}
|