@vendure/common
Advanced tools
Comparing version 0.14.1 to 0.15.0
@@ -0,1 +1,4 @@ | ||
/** | ||
* Performs a filter operation where the predicate is an async function returning a Promise. | ||
*/ | ||
export declare function filterAsync<T>(arr: T[], predicate: (item: T, index: number) => Promise<boolean> | boolean): Promise<T[]>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Performs a filter operation where the predicate is an async function returning a Promise. | ||
*/ | ||
async function filterAsync(arr, predicate) { | ||
@@ -4,0 +7,0 @@ const results = await Promise.all(arr.map(async (value, index) => predicate(value, index))); |
@@ -19,160 +19,323 @@ "use strict"; | ||
})(AssetType = exports.AssetType || (exports.AssetType = {})); | ||
/** | ||
* @description | ||
* ISO 4217 currency code | ||
* | ||
* @docsCategory common | ||
*/ | ||
var CurrencyCode; | ||
(function (CurrencyCode) { | ||
/** United Arab Emirates dirham */ | ||
CurrencyCode["AED"] = "AED"; | ||
/** Afghan afghani */ | ||
CurrencyCode["AFN"] = "AFN"; | ||
/** Albanian lek */ | ||
CurrencyCode["ALL"] = "ALL"; | ||
/** Armenian dram */ | ||
CurrencyCode["AMD"] = "AMD"; | ||
/** Netherlands Antillean guilder */ | ||
CurrencyCode["ANG"] = "ANG"; | ||
/** Angolan kwanza */ | ||
CurrencyCode["AOA"] = "AOA"; | ||
/** Argentine peso */ | ||
CurrencyCode["ARS"] = "ARS"; | ||
/** Australian dollar */ | ||
CurrencyCode["AUD"] = "AUD"; | ||
/** Aruban florin */ | ||
CurrencyCode["AWG"] = "AWG"; | ||
/** Azerbaijani manat */ | ||
CurrencyCode["AZN"] = "AZN"; | ||
/** Bosnia and Herzegovina convertible mark */ | ||
CurrencyCode["BAM"] = "BAM"; | ||
/** Barbados dollar */ | ||
CurrencyCode["BBD"] = "BBD"; | ||
/** Bangladeshi taka */ | ||
CurrencyCode["BDT"] = "BDT"; | ||
/** Bulgarian lev */ | ||
CurrencyCode["BGN"] = "BGN"; | ||
/** Bahraini dinar */ | ||
CurrencyCode["BHD"] = "BHD"; | ||
/** Burundian franc */ | ||
CurrencyCode["BIF"] = "BIF"; | ||
/** Bermudian dollar */ | ||
CurrencyCode["BMD"] = "BMD"; | ||
/** Brunei dollar */ | ||
CurrencyCode["BND"] = "BND"; | ||
/** Boliviano */ | ||
CurrencyCode["BOB"] = "BOB"; | ||
/** Brazilian real */ | ||
CurrencyCode["BRL"] = "BRL"; | ||
/** Bahamian dollar */ | ||
CurrencyCode["BSD"] = "BSD"; | ||
/** Bhutanese ngultrum */ | ||
CurrencyCode["BTN"] = "BTN"; | ||
/** Botswana pula */ | ||
CurrencyCode["BWP"] = "BWP"; | ||
/** Belarusian ruble */ | ||
CurrencyCode["BYN"] = "BYN"; | ||
/** Belize dollar */ | ||
CurrencyCode["BZD"] = "BZD"; | ||
/** Canadian dollar */ | ||
CurrencyCode["CAD"] = "CAD"; | ||
/** Congolese franc */ | ||
CurrencyCode["CDF"] = "CDF"; | ||
/** Swiss franc */ | ||
CurrencyCode["CHF"] = "CHF"; | ||
/** Chilean peso */ | ||
CurrencyCode["CLP"] = "CLP"; | ||
/** Renminbi (Chinese) yuan */ | ||
CurrencyCode["CNY"] = "CNY"; | ||
/** Colombian peso */ | ||
CurrencyCode["COP"] = "COP"; | ||
/** Costa Rican colon */ | ||
CurrencyCode["CRC"] = "CRC"; | ||
/** Cuban convertible peso */ | ||
CurrencyCode["CUC"] = "CUC"; | ||
/** Cuban peso */ | ||
CurrencyCode["CUP"] = "CUP"; | ||
/** Cape Verde escudo */ | ||
CurrencyCode["CVE"] = "CVE"; | ||
/** Czech koruna */ | ||
CurrencyCode["CZK"] = "CZK"; | ||
/** Djiboutian franc */ | ||
CurrencyCode["DJF"] = "DJF"; | ||
/** Danish krone */ | ||
CurrencyCode["DKK"] = "DKK"; | ||
/** Dominican peso */ | ||
CurrencyCode["DOP"] = "DOP"; | ||
/** Algerian dinar */ | ||
CurrencyCode["DZD"] = "DZD"; | ||
/** Egyptian pound */ | ||
CurrencyCode["EGP"] = "EGP"; | ||
/** Eritrean nakfa */ | ||
CurrencyCode["ERN"] = "ERN"; | ||
/** Ethiopian birr */ | ||
CurrencyCode["ETB"] = "ETB"; | ||
/** Euro */ | ||
CurrencyCode["EUR"] = "EUR"; | ||
/** Fiji dollar */ | ||
CurrencyCode["FJD"] = "FJD"; | ||
/** Falkland Islands pound */ | ||
CurrencyCode["FKP"] = "FKP"; | ||
/** Pound sterling */ | ||
CurrencyCode["GBP"] = "GBP"; | ||
/** Georgian lari */ | ||
CurrencyCode["GEL"] = "GEL"; | ||
/** Ghanaian cedi */ | ||
CurrencyCode["GHS"] = "GHS"; | ||
/** Gibraltar pound */ | ||
CurrencyCode["GIP"] = "GIP"; | ||
/** Gambian dalasi */ | ||
CurrencyCode["GMD"] = "GMD"; | ||
/** Guinean franc */ | ||
CurrencyCode["GNF"] = "GNF"; | ||
/** Guatemalan quetzal */ | ||
CurrencyCode["GTQ"] = "GTQ"; | ||
/** Guyanese dollar */ | ||
CurrencyCode["GYD"] = "GYD"; | ||
/** Hong Kong dollar */ | ||
CurrencyCode["HKD"] = "HKD"; | ||
/** Honduran lempira */ | ||
CurrencyCode["HNL"] = "HNL"; | ||
/** Croatian kuna */ | ||
CurrencyCode["HRK"] = "HRK"; | ||
/** Haitian gourde */ | ||
CurrencyCode["HTG"] = "HTG"; | ||
/** Hungarian forint */ | ||
CurrencyCode["HUF"] = "HUF"; | ||
/** Indonesian rupiah */ | ||
CurrencyCode["IDR"] = "IDR"; | ||
/** Israeli new shekel */ | ||
CurrencyCode["ILS"] = "ILS"; | ||
/** Indian rupee */ | ||
CurrencyCode["INR"] = "INR"; | ||
/** Iraqi dinar */ | ||
CurrencyCode["IQD"] = "IQD"; | ||
/** Iranian rial */ | ||
CurrencyCode["IRR"] = "IRR"; | ||
/** Icelandic króna */ | ||
CurrencyCode["ISK"] = "ISK"; | ||
/** Jamaican dollar */ | ||
CurrencyCode["JMD"] = "JMD"; | ||
/** Jordanian dinar */ | ||
CurrencyCode["JOD"] = "JOD"; | ||
/** Japanese yen */ | ||
CurrencyCode["JPY"] = "JPY"; | ||
/** Kenyan shilling */ | ||
CurrencyCode["KES"] = "KES"; | ||
/** Kyrgyzstani som */ | ||
CurrencyCode["KGS"] = "KGS"; | ||
/** Cambodian riel */ | ||
CurrencyCode["KHR"] = "KHR"; | ||
/** Comoro franc */ | ||
CurrencyCode["KMF"] = "KMF"; | ||
/** North Korean won */ | ||
CurrencyCode["KPW"] = "KPW"; | ||
/** South Korean won */ | ||
CurrencyCode["KRW"] = "KRW"; | ||
/** Kuwaiti dinar */ | ||
CurrencyCode["KWD"] = "KWD"; | ||
/** Cayman Islands dollar */ | ||
CurrencyCode["KYD"] = "KYD"; | ||
/** Kazakhstani tenge */ | ||
CurrencyCode["KZT"] = "KZT"; | ||
/** Lao kip */ | ||
CurrencyCode["LAK"] = "LAK"; | ||
/** Lebanese pound */ | ||
CurrencyCode["LBP"] = "LBP"; | ||
/** Sri Lankan rupee */ | ||
CurrencyCode["LKR"] = "LKR"; | ||
/** Liberian dollar */ | ||
CurrencyCode["LRD"] = "LRD"; | ||
/** Lesotho loti */ | ||
CurrencyCode["LSL"] = "LSL"; | ||
/** Libyan dinar */ | ||
CurrencyCode["LYD"] = "LYD"; | ||
/** Moroccan dirham */ | ||
CurrencyCode["MAD"] = "MAD"; | ||
/** Moldovan leu */ | ||
CurrencyCode["MDL"] = "MDL"; | ||
/** Malagasy ariary */ | ||
CurrencyCode["MGA"] = "MGA"; | ||
/** Macedonian denar */ | ||
CurrencyCode["MKD"] = "MKD"; | ||
/** Myanmar kyat */ | ||
CurrencyCode["MMK"] = "MMK"; | ||
/** Mongolian tögrög */ | ||
CurrencyCode["MNT"] = "MNT"; | ||
/** Macanese pataca */ | ||
CurrencyCode["MOP"] = "MOP"; | ||
/** Mauritanian ouguiya */ | ||
CurrencyCode["MRU"] = "MRU"; | ||
/** Mauritian rupee */ | ||
CurrencyCode["MUR"] = "MUR"; | ||
/** Maldivian rufiyaa */ | ||
CurrencyCode["MVR"] = "MVR"; | ||
/** Malawian kwacha */ | ||
CurrencyCode["MWK"] = "MWK"; | ||
/** Mexican peso */ | ||
CurrencyCode["MXN"] = "MXN"; | ||
/** Malaysian ringgit */ | ||
CurrencyCode["MYR"] = "MYR"; | ||
/** Mozambican metical */ | ||
CurrencyCode["MZN"] = "MZN"; | ||
/** Namibian dollar */ | ||
CurrencyCode["NAD"] = "NAD"; | ||
/** Nigerian naira */ | ||
CurrencyCode["NGN"] = "NGN"; | ||
/** Nicaraguan córdoba */ | ||
CurrencyCode["NIO"] = "NIO"; | ||
/** Norwegian krone */ | ||
CurrencyCode["NOK"] = "NOK"; | ||
/** Nepalese rupee */ | ||
CurrencyCode["NPR"] = "NPR"; | ||
/** New Zealand dollar */ | ||
CurrencyCode["NZD"] = "NZD"; | ||
/** Omani rial */ | ||
CurrencyCode["OMR"] = "OMR"; | ||
/** Panamanian balboa */ | ||
CurrencyCode["PAB"] = "PAB"; | ||
/** Peruvian sol */ | ||
CurrencyCode["PEN"] = "PEN"; | ||
/** Papua New Guinean kina */ | ||
CurrencyCode["PGK"] = "PGK"; | ||
/** Philippine peso */ | ||
CurrencyCode["PHP"] = "PHP"; | ||
/** Pakistani rupee */ | ||
CurrencyCode["PKR"] = "PKR"; | ||
/** Polish złoty */ | ||
CurrencyCode["PLN"] = "PLN"; | ||
/** Paraguayan guaraní */ | ||
CurrencyCode["PYG"] = "PYG"; | ||
/** Qatari riyal */ | ||
CurrencyCode["QAR"] = "QAR"; | ||
/** Romanian leu */ | ||
CurrencyCode["RON"] = "RON"; | ||
/** Serbian dinar */ | ||
CurrencyCode["RSD"] = "RSD"; | ||
/** Russian ruble */ | ||
CurrencyCode["RUB"] = "RUB"; | ||
/** Rwandan franc */ | ||
CurrencyCode["RWF"] = "RWF"; | ||
/** Saudi riyal */ | ||
CurrencyCode["SAR"] = "SAR"; | ||
/** Solomon Islands dollar */ | ||
CurrencyCode["SBD"] = "SBD"; | ||
/** Seychelles rupee */ | ||
CurrencyCode["SCR"] = "SCR"; | ||
/** Sudanese pound */ | ||
CurrencyCode["SDG"] = "SDG"; | ||
/** Swedish krona/kronor */ | ||
CurrencyCode["SEK"] = "SEK"; | ||
/** Singapore dollar */ | ||
CurrencyCode["SGD"] = "SGD"; | ||
/** Saint Helena pound */ | ||
CurrencyCode["SHP"] = "SHP"; | ||
/** Sierra Leonean leone */ | ||
CurrencyCode["SLL"] = "SLL"; | ||
/** Somali shilling */ | ||
CurrencyCode["SOS"] = "SOS"; | ||
/** Surinamese dollar */ | ||
CurrencyCode["SRD"] = "SRD"; | ||
/** South Sudanese pound */ | ||
CurrencyCode["SSP"] = "SSP"; | ||
/** São Tomé and Príncipe dobra */ | ||
CurrencyCode["STN"] = "STN"; | ||
/** Salvadoran colón */ | ||
CurrencyCode["SVC"] = "SVC"; | ||
/** Syrian pound */ | ||
CurrencyCode["SYP"] = "SYP"; | ||
/** Swazi lilangeni */ | ||
CurrencyCode["SZL"] = "SZL"; | ||
/** Thai baht */ | ||
CurrencyCode["THB"] = "THB"; | ||
/** Tajikistani somoni */ | ||
CurrencyCode["TJS"] = "TJS"; | ||
/** Turkmenistan manat */ | ||
CurrencyCode["TMT"] = "TMT"; | ||
/** Tunisian dinar */ | ||
CurrencyCode["TND"] = "TND"; | ||
/** Tongan paʻanga */ | ||
CurrencyCode["TOP"] = "TOP"; | ||
/** Turkish lira */ | ||
CurrencyCode["TRY"] = "TRY"; | ||
/** Trinidad and Tobago dollar */ | ||
CurrencyCode["TTD"] = "TTD"; | ||
/** New Taiwan dollar */ | ||
CurrencyCode["TWD"] = "TWD"; | ||
/** Tanzanian shilling */ | ||
CurrencyCode["TZS"] = "TZS"; | ||
/** Ukrainian hryvnia */ | ||
CurrencyCode["UAH"] = "UAH"; | ||
/** Ugandan shilling */ | ||
CurrencyCode["UGX"] = "UGX"; | ||
/** United States dollar */ | ||
CurrencyCode["USD"] = "USD"; | ||
/** Uruguayan peso */ | ||
CurrencyCode["UYU"] = "UYU"; | ||
/** Uzbekistan som */ | ||
CurrencyCode["UZS"] = "UZS"; | ||
/** Venezuelan bolívar soberano */ | ||
CurrencyCode["VES"] = "VES"; | ||
/** Vietnamese đồng */ | ||
CurrencyCode["VND"] = "VND"; | ||
/** Vanuatu vatu */ | ||
CurrencyCode["VUV"] = "VUV"; | ||
/** Samoan tala */ | ||
CurrencyCode["WST"] = "WST"; | ||
/** CFA franc BEAC */ | ||
CurrencyCode["XAF"] = "XAF"; | ||
/** East Caribbean dollar */ | ||
CurrencyCode["XCD"] = "XCD"; | ||
/** CFA franc BCEAO */ | ||
CurrencyCode["XOF"] = "XOF"; | ||
/** CFP franc (franc Pacifique) */ | ||
CurrencyCode["XPF"] = "XPF"; | ||
/** Yemeni rial */ | ||
CurrencyCode["YER"] = "YER"; | ||
/** South African rand */ | ||
CurrencyCode["ZAR"] = "ZAR"; | ||
/** Zambian kwacha */ | ||
CurrencyCode["ZMW"] = "ZMW"; | ||
/** Zimbabwean dollar */ | ||
CurrencyCode["ZWL"] = "ZWL"; | ||
@@ -182,3 +345,5 @@ })(CurrencyCode = exports.CurrencyCode || (exports.CurrencyCode = {})); | ||
(function (DeletionResult) { | ||
/** The entity was successfully deleted */ | ||
DeletionResult["DELETED"] = "DELETED"; | ||
/** Deletion did not take place, reason given in message */ | ||
DeletionResult["NOT_DELETED"] = "NOT_DELETED"; | ||
@@ -211,160 +376,326 @@ })(DeletionResult = exports.DeletionResult || (exports.DeletionResult = {})); | ||
})(HistoryEntryType = exports.HistoryEntryType || (exports.HistoryEntryType = {})); | ||
/** | ||
* @description | ||
* Languages in the form of a ISO 639-1 language code with optional | ||
* region or script modifier (e.g. de_AT). The selection available is based | ||
* on the [Unicode CLDR summary list](https://unicode-org.github.io/cldr-staging/charts/37/summary/root.html) | ||
* and includes the major spoken languages of the world and any widely-used variants. | ||
* | ||
* @docsCategory common | ||
*/ | ||
var LanguageCode; | ||
(function (LanguageCode) { | ||
/** Afrikaans */ | ||
LanguageCode["af"] = "af"; | ||
/** Akan */ | ||
LanguageCode["ak"] = "ak"; | ||
/** Albanian */ | ||
LanguageCode["sq"] = "sq"; | ||
/** Amharic */ | ||
LanguageCode["am"] = "am"; | ||
/** Arabic */ | ||
LanguageCode["ar"] = "ar"; | ||
/** Armenian */ | ||
LanguageCode["hy"] = "hy"; | ||
/** Assamese */ | ||
LanguageCode["as"] = "as"; | ||
/** Azerbaijani */ | ||
LanguageCode["az"] = "az"; | ||
/** Bambara */ | ||
LanguageCode["bm"] = "bm"; | ||
/** Bangla */ | ||
LanguageCode["bn"] = "bn"; | ||
/** Basque */ | ||
LanguageCode["eu"] = "eu"; | ||
/** Belarusian */ | ||
LanguageCode["be"] = "be"; | ||
/** Bosnian */ | ||
LanguageCode["bs"] = "bs"; | ||
/** Breton */ | ||
LanguageCode["br"] = "br"; | ||
/** Bulgarian */ | ||
LanguageCode["bg"] = "bg"; | ||
/** Burmese */ | ||
LanguageCode["my"] = "my"; | ||
/** Catalan */ | ||
LanguageCode["ca"] = "ca"; | ||
/** Chechen */ | ||
LanguageCode["ce"] = "ce"; | ||
/** Chinese */ | ||
LanguageCode["zh"] = "zh"; | ||
/** Simplified Chinese */ | ||
LanguageCode["zh_Hans"] = "zh_Hans"; | ||
/** Traditional Chinese */ | ||
LanguageCode["zh_Hant"] = "zh_Hant"; | ||
/** Church Slavic */ | ||
LanguageCode["cu"] = "cu"; | ||
/** Cornish */ | ||
LanguageCode["kw"] = "kw"; | ||
/** Corsican */ | ||
LanguageCode["co"] = "co"; | ||
/** Croatian */ | ||
LanguageCode["hr"] = "hr"; | ||
/** Czech */ | ||
LanguageCode["cs"] = "cs"; | ||
/** Danish */ | ||
LanguageCode["da"] = "da"; | ||
/** Dutch */ | ||
LanguageCode["nl"] = "nl"; | ||
/** Flemish */ | ||
LanguageCode["nl_BE"] = "nl_BE"; | ||
/** Dzongkha */ | ||
LanguageCode["dz"] = "dz"; | ||
/** English */ | ||
LanguageCode["en"] = "en"; | ||
/** Australian English */ | ||
LanguageCode["en_AU"] = "en_AU"; | ||
/** Canadian English */ | ||
LanguageCode["en_CA"] = "en_CA"; | ||
/** British English */ | ||
LanguageCode["en_GB"] = "en_GB"; | ||
/** American English */ | ||
LanguageCode["en_US"] = "en_US"; | ||
/** Esperanto */ | ||
LanguageCode["eo"] = "eo"; | ||
/** Estonian */ | ||
LanguageCode["et"] = "et"; | ||
/** Ewe */ | ||
LanguageCode["ee"] = "ee"; | ||
/** Faroese */ | ||
LanguageCode["fo"] = "fo"; | ||
/** Finnish */ | ||
LanguageCode["fi"] = "fi"; | ||
/** French */ | ||
LanguageCode["fr"] = "fr"; | ||
/** Canadian French */ | ||
LanguageCode["fr_CA"] = "fr_CA"; | ||
/** Swiss French */ | ||
LanguageCode["fr_CH"] = "fr_CH"; | ||
/** Fulah */ | ||
LanguageCode["ff"] = "ff"; | ||
/** Galician */ | ||
LanguageCode["gl"] = "gl"; | ||
/** Ganda */ | ||
LanguageCode["lg"] = "lg"; | ||
/** Georgian */ | ||
LanguageCode["ka"] = "ka"; | ||
/** German */ | ||
LanguageCode["de"] = "de"; | ||
/** Austrian German */ | ||
LanguageCode["de_AT"] = "de_AT"; | ||
/** Swiss High German */ | ||
LanguageCode["de_CH"] = "de_CH"; | ||
/** Greek */ | ||
LanguageCode["el"] = "el"; | ||
/** Gujarati */ | ||
LanguageCode["gu"] = "gu"; | ||
/** Haitian Creole */ | ||
LanguageCode["ht"] = "ht"; | ||
/** Hausa */ | ||
LanguageCode["ha"] = "ha"; | ||
/** Hebrew */ | ||
LanguageCode["he"] = "he"; | ||
/** Hindi */ | ||
LanguageCode["hi"] = "hi"; | ||
/** Hungarian */ | ||
LanguageCode["hu"] = "hu"; | ||
/** Icelandic */ | ||
LanguageCode["is"] = "is"; | ||
/** Igbo */ | ||
LanguageCode["ig"] = "ig"; | ||
/** Indonesian */ | ||
LanguageCode["id"] = "id"; | ||
/** Interlingua */ | ||
LanguageCode["ia"] = "ia"; | ||
/** Irish */ | ||
LanguageCode["ga"] = "ga"; | ||
/** Italian */ | ||
LanguageCode["it"] = "it"; | ||
/** Japanese */ | ||
LanguageCode["ja"] = "ja"; | ||
/** Javanese */ | ||
LanguageCode["jv"] = "jv"; | ||
/** Kalaallisut */ | ||
LanguageCode["kl"] = "kl"; | ||
/** Kannada */ | ||
LanguageCode["kn"] = "kn"; | ||
/** Kashmiri */ | ||
LanguageCode["ks"] = "ks"; | ||
/** Kazakh */ | ||
LanguageCode["kk"] = "kk"; | ||
/** Khmer */ | ||
LanguageCode["km"] = "km"; | ||
/** Kikuyu */ | ||
LanguageCode["ki"] = "ki"; | ||
/** Kinyarwanda */ | ||
LanguageCode["rw"] = "rw"; | ||
/** Korean */ | ||
LanguageCode["ko"] = "ko"; | ||
/** Kurdish */ | ||
LanguageCode["ku"] = "ku"; | ||
/** Kyrgyz */ | ||
LanguageCode["ky"] = "ky"; | ||
/** Lao */ | ||
LanguageCode["lo"] = "lo"; | ||
/** Latin */ | ||
LanguageCode["la"] = "la"; | ||
/** Latvian */ | ||
LanguageCode["lv"] = "lv"; | ||
/** Lingala */ | ||
LanguageCode["ln"] = "ln"; | ||
/** Lithuanian */ | ||
LanguageCode["lt"] = "lt"; | ||
/** Luba-Katanga */ | ||
LanguageCode["lu"] = "lu"; | ||
/** Luxembourgish */ | ||
LanguageCode["lb"] = "lb"; | ||
/** Macedonian */ | ||
LanguageCode["mk"] = "mk"; | ||
/** Malagasy */ | ||
LanguageCode["mg"] = "mg"; | ||
/** Malay */ | ||
LanguageCode["ms"] = "ms"; | ||
/** Malayalam */ | ||
LanguageCode["ml"] = "ml"; | ||
/** Maltese */ | ||
LanguageCode["mt"] = "mt"; | ||
/** Manx */ | ||
LanguageCode["gv"] = "gv"; | ||
/** Maori */ | ||
LanguageCode["mi"] = "mi"; | ||
/** Marathi */ | ||
LanguageCode["mr"] = "mr"; | ||
/** Mongolian */ | ||
LanguageCode["mn"] = "mn"; | ||
/** Nepali */ | ||
LanguageCode["ne"] = "ne"; | ||
/** North Ndebele */ | ||
LanguageCode["nd"] = "nd"; | ||
/** Northern Sami */ | ||
LanguageCode["se"] = "se"; | ||
/** Norwegian Bokmål */ | ||
LanguageCode["nb"] = "nb"; | ||
/** Norwegian Nynorsk */ | ||
LanguageCode["nn"] = "nn"; | ||
/** Nyanja */ | ||
LanguageCode["ny"] = "ny"; | ||
/** Odia */ | ||
LanguageCode["or"] = "or"; | ||
/** Oromo */ | ||
LanguageCode["om"] = "om"; | ||
/** Ossetic */ | ||
LanguageCode["os"] = "os"; | ||
/** Pashto */ | ||
LanguageCode["ps"] = "ps"; | ||
/** Persian */ | ||
LanguageCode["fa"] = "fa"; | ||
/** Dari */ | ||
LanguageCode["fa_AF"] = "fa_AF"; | ||
/** Polish */ | ||
LanguageCode["pl"] = "pl"; | ||
/** Portuguese */ | ||
LanguageCode["pt"] = "pt"; | ||
/** Brazilian Portuguese */ | ||
LanguageCode["pt_BR"] = "pt_BR"; | ||
/** European Portuguese */ | ||
LanguageCode["pt_PT"] = "pt_PT"; | ||
/** Punjabi */ | ||
LanguageCode["pa"] = "pa"; | ||
/** Quechua */ | ||
LanguageCode["qu"] = "qu"; | ||
/** Romanian */ | ||
LanguageCode["ro"] = "ro"; | ||
/** Moldavian */ | ||
LanguageCode["ro_MD"] = "ro_MD"; | ||
/** Romansh */ | ||
LanguageCode["rm"] = "rm"; | ||
/** Rundi */ | ||
LanguageCode["rn"] = "rn"; | ||
/** Russian */ | ||
LanguageCode["ru"] = "ru"; | ||
/** Samoan */ | ||
LanguageCode["sm"] = "sm"; | ||
/** Sango */ | ||
LanguageCode["sg"] = "sg"; | ||
/** Sanskrit */ | ||
LanguageCode["sa"] = "sa"; | ||
/** Scottish Gaelic */ | ||
LanguageCode["gd"] = "gd"; | ||
/** Serbian */ | ||
LanguageCode["sr"] = "sr"; | ||
/** Shona */ | ||
LanguageCode["sn"] = "sn"; | ||
/** Sichuan Yi */ | ||
LanguageCode["ii"] = "ii"; | ||
/** Sindhi */ | ||
LanguageCode["sd"] = "sd"; | ||
/** Sinhala */ | ||
LanguageCode["si"] = "si"; | ||
/** Slovak */ | ||
LanguageCode["sk"] = "sk"; | ||
/** Slovenian */ | ||
LanguageCode["sl"] = "sl"; | ||
/** Somali */ | ||
LanguageCode["so"] = "so"; | ||
/** Southern Sotho */ | ||
LanguageCode["st"] = "st"; | ||
/** Spanish */ | ||
LanguageCode["es"] = "es"; | ||
/** European Spanish */ | ||
LanguageCode["es_ES"] = "es_ES"; | ||
/** Mexican Spanish */ | ||
LanguageCode["es_MX"] = "es_MX"; | ||
/** Sundanese */ | ||
LanguageCode["su"] = "su"; | ||
/** Swahili */ | ||
LanguageCode["sw"] = "sw"; | ||
/** Congo Swahili */ | ||
LanguageCode["sw_CD"] = "sw_CD"; | ||
/** Swedish */ | ||
LanguageCode["sv"] = "sv"; | ||
/** Tajik */ | ||
LanguageCode["tg"] = "tg"; | ||
/** Tamil */ | ||
LanguageCode["ta"] = "ta"; | ||
/** Tatar */ | ||
LanguageCode["tt"] = "tt"; | ||
/** Telugu */ | ||
LanguageCode["te"] = "te"; | ||
/** Thai */ | ||
LanguageCode["th"] = "th"; | ||
/** Tibetan */ | ||
LanguageCode["bo"] = "bo"; | ||
/** Tigrinya */ | ||
LanguageCode["ti"] = "ti"; | ||
/** Tongan */ | ||
LanguageCode["to"] = "to"; | ||
/** Turkish */ | ||
LanguageCode["tr"] = "tr"; | ||
/** Turkmen */ | ||
LanguageCode["tk"] = "tk"; | ||
/** Ukrainian */ | ||
LanguageCode["uk"] = "uk"; | ||
/** Urdu */ | ||
LanguageCode["ur"] = "ur"; | ||
/** Uyghur */ | ||
LanguageCode["ug"] = "ug"; | ||
/** Uzbek */ | ||
LanguageCode["uz"] = "uz"; | ||
/** Vietnamese */ | ||
LanguageCode["vi"] = "vi"; | ||
/** Volapük */ | ||
LanguageCode["vo"] = "vo"; | ||
/** Welsh */ | ||
LanguageCode["cy"] = "cy"; | ||
/** Western Frisian */ | ||
LanguageCode["fy"] = "fy"; | ||
/** Wolof */ | ||
LanguageCode["wo"] = "wo"; | ||
/** Xhosa */ | ||
LanguageCode["xh"] = "xh"; | ||
/** Yiddish */ | ||
LanguageCode["yi"] = "yi"; | ||
/** Yoruba */ | ||
LanguageCode["yo"] = "yo"; | ||
/** Zulu */ | ||
LanguageCode["zu"] = "zu"; | ||
@@ -377,7 +708,19 @@ })(LanguageCode = exports.LanguageCode || (exports.LanguageCode = {})); | ||
})(LogicalOperator = exports.LogicalOperator || (exports.LogicalOperator = {})); | ||
/** | ||
* " | ||
* @description | ||
* Permissions for administrators and customers. Used to control access to | ||
* GraphQL resolvers via the {@link Allow} decorator. | ||
* | ||
* @docsCategory common | ||
*/ | ||
var Permission; | ||
(function (Permission) { | ||
/** The Authenticated role means simply that the user is logged in */ | ||
Permission["Authenticated"] = "Authenticated"; | ||
/** SuperAdmin can perform the most sensitive tasks */ | ||
Permission["SuperAdmin"] = "SuperAdmin"; | ||
/** Owner means the user owns this entity, e.g. a Customer's own Order */ | ||
Permission["Owner"] = "Owner"; | ||
/** Public means any unauthenticated user may perform the operation */ | ||
Permission["Public"] = "Public"; | ||
@@ -384,0 +727,0 @@ Permission["CreateCatalog"] = "CreateCatalog"; |
@@ -19,160 +19,323 @@ "use strict"; | ||
})(AssetType = exports.AssetType || (exports.AssetType = {})); | ||
/** | ||
* @description | ||
* ISO 4217 currency code | ||
* | ||
* @docsCategory common | ||
*/ | ||
var CurrencyCode; | ||
(function (CurrencyCode) { | ||
/** United Arab Emirates dirham */ | ||
CurrencyCode["AED"] = "AED"; | ||
/** Afghan afghani */ | ||
CurrencyCode["AFN"] = "AFN"; | ||
/** Albanian lek */ | ||
CurrencyCode["ALL"] = "ALL"; | ||
/** Armenian dram */ | ||
CurrencyCode["AMD"] = "AMD"; | ||
/** Netherlands Antillean guilder */ | ||
CurrencyCode["ANG"] = "ANG"; | ||
/** Angolan kwanza */ | ||
CurrencyCode["AOA"] = "AOA"; | ||
/** Argentine peso */ | ||
CurrencyCode["ARS"] = "ARS"; | ||
/** Australian dollar */ | ||
CurrencyCode["AUD"] = "AUD"; | ||
/** Aruban florin */ | ||
CurrencyCode["AWG"] = "AWG"; | ||
/** Azerbaijani manat */ | ||
CurrencyCode["AZN"] = "AZN"; | ||
/** Bosnia and Herzegovina convertible mark */ | ||
CurrencyCode["BAM"] = "BAM"; | ||
/** Barbados dollar */ | ||
CurrencyCode["BBD"] = "BBD"; | ||
/** Bangladeshi taka */ | ||
CurrencyCode["BDT"] = "BDT"; | ||
/** Bulgarian lev */ | ||
CurrencyCode["BGN"] = "BGN"; | ||
/** Bahraini dinar */ | ||
CurrencyCode["BHD"] = "BHD"; | ||
/** Burundian franc */ | ||
CurrencyCode["BIF"] = "BIF"; | ||
/** Bermudian dollar */ | ||
CurrencyCode["BMD"] = "BMD"; | ||
/** Brunei dollar */ | ||
CurrencyCode["BND"] = "BND"; | ||
/** Boliviano */ | ||
CurrencyCode["BOB"] = "BOB"; | ||
/** Brazilian real */ | ||
CurrencyCode["BRL"] = "BRL"; | ||
/** Bahamian dollar */ | ||
CurrencyCode["BSD"] = "BSD"; | ||
/** Bhutanese ngultrum */ | ||
CurrencyCode["BTN"] = "BTN"; | ||
/** Botswana pula */ | ||
CurrencyCode["BWP"] = "BWP"; | ||
/** Belarusian ruble */ | ||
CurrencyCode["BYN"] = "BYN"; | ||
/** Belize dollar */ | ||
CurrencyCode["BZD"] = "BZD"; | ||
/** Canadian dollar */ | ||
CurrencyCode["CAD"] = "CAD"; | ||
/** Congolese franc */ | ||
CurrencyCode["CDF"] = "CDF"; | ||
/** Swiss franc */ | ||
CurrencyCode["CHF"] = "CHF"; | ||
/** Chilean peso */ | ||
CurrencyCode["CLP"] = "CLP"; | ||
/** Renminbi (Chinese) yuan */ | ||
CurrencyCode["CNY"] = "CNY"; | ||
/** Colombian peso */ | ||
CurrencyCode["COP"] = "COP"; | ||
/** Costa Rican colon */ | ||
CurrencyCode["CRC"] = "CRC"; | ||
/** Cuban convertible peso */ | ||
CurrencyCode["CUC"] = "CUC"; | ||
/** Cuban peso */ | ||
CurrencyCode["CUP"] = "CUP"; | ||
/** Cape Verde escudo */ | ||
CurrencyCode["CVE"] = "CVE"; | ||
/** Czech koruna */ | ||
CurrencyCode["CZK"] = "CZK"; | ||
/** Djiboutian franc */ | ||
CurrencyCode["DJF"] = "DJF"; | ||
/** Danish krone */ | ||
CurrencyCode["DKK"] = "DKK"; | ||
/** Dominican peso */ | ||
CurrencyCode["DOP"] = "DOP"; | ||
/** Algerian dinar */ | ||
CurrencyCode["DZD"] = "DZD"; | ||
/** Egyptian pound */ | ||
CurrencyCode["EGP"] = "EGP"; | ||
/** Eritrean nakfa */ | ||
CurrencyCode["ERN"] = "ERN"; | ||
/** Ethiopian birr */ | ||
CurrencyCode["ETB"] = "ETB"; | ||
/** Euro */ | ||
CurrencyCode["EUR"] = "EUR"; | ||
/** Fiji dollar */ | ||
CurrencyCode["FJD"] = "FJD"; | ||
/** Falkland Islands pound */ | ||
CurrencyCode["FKP"] = "FKP"; | ||
/** Pound sterling */ | ||
CurrencyCode["GBP"] = "GBP"; | ||
/** Georgian lari */ | ||
CurrencyCode["GEL"] = "GEL"; | ||
/** Ghanaian cedi */ | ||
CurrencyCode["GHS"] = "GHS"; | ||
/** Gibraltar pound */ | ||
CurrencyCode["GIP"] = "GIP"; | ||
/** Gambian dalasi */ | ||
CurrencyCode["GMD"] = "GMD"; | ||
/** Guinean franc */ | ||
CurrencyCode["GNF"] = "GNF"; | ||
/** Guatemalan quetzal */ | ||
CurrencyCode["GTQ"] = "GTQ"; | ||
/** Guyanese dollar */ | ||
CurrencyCode["GYD"] = "GYD"; | ||
/** Hong Kong dollar */ | ||
CurrencyCode["HKD"] = "HKD"; | ||
/** Honduran lempira */ | ||
CurrencyCode["HNL"] = "HNL"; | ||
/** Croatian kuna */ | ||
CurrencyCode["HRK"] = "HRK"; | ||
/** Haitian gourde */ | ||
CurrencyCode["HTG"] = "HTG"; | ||
/** Hungarian forint */ | ||
CurrencyCode["HUF"] = "HUF"; | ||
/** Indonesian rupiah */ | ||
CurrencyCode["IDR"] = "IDR"; | ||
/** Israeli new shekel */ | ||
CurrencyCode["ILS"] = "ILS"; | ||
/** Indian rupee */ | ||
CurrencyCode["INR"] = "INR"; | ||
/** Iraqi dinar */ | ||
CurrencyCode["IQD"] = "IQD"; | ||
/** Iranian rial */ | ||
CurrencyCode["IRR"] = "IRR"; | ||
/** Icelandic króna */ | ||
CurrencyCode["ISK"] = "ISK"; | ||
/** Jamaican dollar */ | ||
CurrencyCode["JMD"] = "JMD"; | ||
/** Jordanian dinar */ | ||
CurrencyCode["JOD"] = "JOD"; | ||
/** Japanese yen */ | ||
CurrencyCode["JPY"] = "JPY"; | ||
/** Kenyan shilling */ | ||
CurrencyCode["KES"] = "KES"; | ||
/** Kyrgyzstani som */ | ||
CurrencyCode["KGS"] = "KGS"; | ||
/** Cambodian riel */ | ||
CurrencyCode["KHR"] = "KHR"; | ||
/** Comoro franc */ | ||
CurrencyCode["KMF"] = "KMF"; | ||
/** North Korean won */ | ||
CurrencyCode["KPW"] = "KPW"; | ||
/** South Korean won */ | ||
CurrencyCode["KRW"] = "KRW"; | ||
/** Kuwaiti dinar */ | ||
CurrencyCode["KWD"] = "KWD"; | ||
/** Cayman Islands dollar */ | ||
CurrencyCode["KYD"] = "KYD"; | ||
/** Kazakhstani tenge */ | ||
CurrencyCode["KZT"] = "KZT"; | ||
/** Lao kip */ | ||
CurrencyCode["LAK"] = "LAK"; | ||
/** Lebanese pound */ | ||
CurrencyCode["LBP"] = "LBP"; | ||
/** Sri Lankan rupee */ | ||
CurrencyCode["LKR"] = "LKR"; | ||
/** Liberian dollar */ | ||
CurrencyCode["LRD"] = "LRD"; | ||
/** Lesotho loti */ | ||
CurrencyCode["LSL"] = "LSL"; | ||
/** Libyan dinar */ | ||
CurrencyCode["LYD"] = "LYD"; | ||
/** Moroccan dirham */ | ||
CurrencyCode["MAD"] = "MAD"; | ||
/** Moldovan leu */ | ||
CurrencyCode["MDL"] = "MDL"; | ||
/** Malagasy ariary */ | ||
CurrencyCode["MGA"] = "MGA"; | ||
/** Macedonian denar */ | ||
CurrencyCode["MKD"] = "MKD"; | ||
/** Myanmar kyat */ | ||
CurrencyCode["MMK"] = "MMK"; | ||
/** Mongolian tögrög */ | ||
CurrencyCode["MNT"] = "MNT"; | ||
/** Macanese pataca */ | ||
CurrencyCode["MOP"] = "MOP"; | ||
/** Mauritanian ouguiya */ | ||
CurrencyCode["MRU"] = "MRU"; | ||
/** Mauritian rupee */ | ||
CurrencyCode["MUR"] = "MUR"; | ||
/** Maldivian rufiyaa */ | ||
CurrencyCode["MVR"] = "MVR"; | ||
/** Malawian kwacha */ | ||
CurrencyCode["MWK"] = "MWK"; | ||
/** Mexican peso */ | ||
CurrencyCode["MXN"] = "MXN"; | ||
/** Malaysian ringgit */ | ||
CurrencyCode["MYR"] = "MYR"; | ||
/** Mozambican metical */ | ||
CurrencyCode["MZN"] = "MZN"; | ||
/** Namibian dollar */ | ||
CurrencyCode["NAD"] = "NAD"; | ||
/** Nigerian naira */ | ||
CurrencyCode["NGN"] = "NGN"; | ||
/** Nicaraguan córdoba */ | ||
CurrencyCode["NIO"] = "NIO"; | ||
/** Norwegian krone */ | ||
CurrencyCode["NOK"] = "NOK"; | ||
/** Nepalese rupee */ | ||
CurrencyCode["NPR"] = "NPR"; | ||
/** New Zealand dollar */ | ||
CurrencyCode["NZD"] = "NZD"; | ||
/** Omani rial */ | ||
CurrencyCode["OMR"] = "OMR"; | ||
/** Panamanian balboa */ | ||
CurrencyCode["PAB"] = "PAB"; | ||
/** Peruvian sol */ | ||
CurrencyCode["PEN"] = "PEN"; | ||
/** Papua New Guinean kina */ | ||
CurrencyCode["PGK"] = "PGK"; | ||
/** Philippine peso */ | ||
CurrencyCode["PHP"] = "PHP"; | ||
/** Pakistani rupee */ | ||
CurrencyCode["PKR"] = "PKR"; | ||
/** Polish złoty */ | ||
CurrencyCode["PLN"] = "PLN"; | ||
/** Paraguayan guaraní */ | ||
CurrencyCode["PYG"] = "PYG"; | ||
/** Qatari riyal */ | ||
CurrencyCode["QAR"] = "QAR"; | ||
/** Romanian leu */ | ||
CurrencyCode["RON"] = "RON"; | ||
/** Serbian dinar */ | ||
CurrencyCode["RSD"] = "RSD"; | ||
/** Russian ruble */ | ||
CurrencyCode["RUB"] = "RUB"; | ||
/** Rwandan franc */ | ||
CurrencyCode["RWF"] = "RWF"; | ||
/** Saudi riyal */ | ||
CurrencyCode["SAR"] = "SAR"; | ||
/** Solomon Islands dollar */ | ||
CurrencyCode["SBD"] = "SBD"; | ||
/** Seychelles rupee */ | ||
CurrencyCode["SCR"] = "SCR"; | ||
/** Sudanese pound */ | ||
CurrencyCode["SDG"] = "SDG"; | ||
/** Swedish krona/kronor */ | ||
CurrencyCode["SEK"] = "SEK"; | ||
/** Singapore dollar */ | ||
CurrencyCode["SGD"] = "SGD"; | ||
/** Saint Helena pound */ | ||
CurrencyCode["SHP"] = "SHP"; | ||
/** Sierra Leonean leone */ | ||
CurrencyCode["SLL"] = "SLL"; | ||
/** Somali shilling */ | ||
CurrencyCode["SOS"] = "SOS"; | ||
/** Surinamese dollar */ | ||
CurrencyCode["SRD"] = "SRD"; | ||
/** South Sudanese pound */ | ||
CurrencyCode["SSP"] = "SSP"; | ||
/** São Tomé and Príncipe dobra */ | ||
CurrencyCode["STN"] = "STN"; | ||
/** Salvadoran colón */ | ||
CurrencyCode["SVC"] = "SVC"; | ||
/** Syrian pound */ | ||
CurrencyCode["SYP"] = "SYP"; | ||
/** Swazi lilangeni */ | ||
CurrencyCode["SZL"] = "SZL"; | ||
/** Thai baht */ | ||
CurrencyCode["THB"] = "THB"; | ||
/** Tajikistani somoni */ | ||
CurrencyCode["TJS"] = "TJS"; | ||
/** Turkmenistan manat */ | ||
CurrencyCode["TMT"] = "TMT"; | ||
/** Tunisian dinar */ | ||
CurrencyCode["TND"] = "TND"; | ||
/** Tongan paʻanga */ | ||
CurrencyCode["TOP"] = "TOP"; | ||
/** Turkish lira */ | ||
CurrencyCode["TRY"] = "TRY"; | ||
/** Trinidad and Tobago dollar */ | ||
CurrencyCode["TTD"] = "TTD"; | ||
/** New Taiwan dollar */ | ||
CurrencyCode["TWD"] = "TWD"; | ||
/** Tanzanian shilling */ | ||
CurrencyCode["TZS"] = "TZS"; | ||
/** Ukrainian hryvnia */ | ||
CurrencyCode["UAH"] = "UAH"; | ||
/** Ugandan shilling */ | ||
CurrencyCode["UGX"] = "UGX"; | ||
/** United States dollar */ | ||
CurrencyCode["USD"] = "USD"; | ||
/** Uruguayan peso */ | ||
CurrencyCode["UYU"] = "UYU"; | ||
/** Uzbekistan som */ | ||
CurrencyCode["UZS"] = "UZS"; | ||
/** Venezuelan bolívar soberano */ | ||
CurrencyCode["VES"] = "VES"; | ||
/** Vietnamese đồng */ | ||
CurrencyCode["VND"] = "VND"; | ||
/** Vanuatu vatu */ | ||
CurrencyCode["VUV"] = "VUV"; | ||
/** Samoan tala */ | ||
CurrencyCode["WST"] = "WST"; | ||
/** CFA franc BEAC */ | ||
CurrencyCode["XAF"] = "XAF"; | ||
/** East Caribbean dollar */ | ||
CurrencyCode["XCD"] = "XCD"; | ||
/** CFA franc BCEAO */ | ||
CurrencyCode["XOF"] = "XOF"; | ||
/** CFP franc (franc Pacifique) */ | ||
CurrencyCode["XPF"] = "XPF"; | ||
/** Yemeni rial */ | ||
CurrencyCode["YER"] = "YER"; | ||
/** South African rand */ | ||
CurrencyCode["ZAR"] = "ZAR"; | ||
/** Zambian kwacha */ | ||
CurrencyCode["ZMW"] = "ZMW"; | ||
/** Zimbabwean dollar */ | ||
CurrencyCode["ZWL"] = "ZWL"; | ||
@@ -182,3 +345,5 @@ })(CurrencyCode = exports.CurrencyCode || (exports.CurrencyCode = {})); | ||
(function (DeletionResult) { | ||
/** The entity was successfully deleted */ | ||
DeletionResult["DELETED"] = "DELETED"; | ||
/** Deletion did not take place, reason given in message */ | ||
DeletionResult["NOT_DELETED"] = "NOT_DELETED"; | ||
@@ -211,2 +376,8 @@ })(DeletionResult = exports.DeletionResult || (exports.DeletionResult = {})); | ||
})(HistoryEntryType = exports.HistoryEntryType || (exports.HistoryEntryType = {})); | ||
/** | ||
* @description | ||
* The state of a Job in the JobQueue | ||
* | ||
* @docsCategory common | ||
*/ | ||
var JobState; | ||
@@ -220,160 +391,326 @@ (function (JobState) { | ||
})(JobState = exports.JobState || (exports.JobState = {})); | ||
/** | ||
* @description | ||
* Languages in the form of a ISO 639-1 language code with optional | ||
* region or script modifier (e.g. de_AT). The selection available is based | ||
* on the [Unicode CLDR summary list](https://unicode-org.github.io/cldr-staging/charts/37/summary/root.html) | ||
* and includes the major spoken languages of the world and any widely-used variants. | ||
* | ||
* @docsCategory common | ||
*/ | ||
var LanguageCode; | ||
(function (LanguageCode) { | ||
/** Afrikaans */ | ||
LanguageCode["af"] = "af"; | ||
/** Akan */ | ||
LanguageCode["ak"] = "ak"; | ||
/** Albanian */ | ||
LanguageCode["sq"] = "sq"; | ||
/** Amharic */ | ||
LanguageCode["am"] = "am"; | ||
/** Arabic */ | ||
LanguageCode["ar"] = "ar"; | ||
/** Armenian */ | ||
LanguageCode["hy"] = "hy"; | ||
/** Assamese */ | ||
LanguageCode["as"] = "as"; | ||
/** Azerbaijani */ | ||
LanguageCode["az"] = "az"; | ||
/** Bambara */ | ||
LanguageCode["bm"] = "bm"; | ||
/** Bangla */ | ||
LanguageCode["bn"] = "bn"; | ||
/** Basque */ | ||
LanguageCode["eu"] = "eu"; | ||
/** Belarusian */ | ||
LanguageCode["be"] = "be"; | ||
/** Bosnian */ | ||
LanguageCode["bs"] = "bs"; | ||
/** Breton */ | ||
LanguageCode["br"] = "br"; | ||
/** Bulgarian */ | ||
LanguageCode["bg"] = "bg"; | ||
/** Burmese */ | ||
LanguageCode["my"] = "my"; | ||
/** Catalan */ | ||
LanguageCode["ca"] = "ca"; | ||
/** Chechen */ | ||
LanguageCode["ce"] = "ce"; | ||
/** Chinese */ | ||
LanguageCode["zh"] = "zh"; | ||
/** Simplified Chinese */ | ||
LanguageCode["zh_Hans"] = "zh_Hans"; | ||
/** Traditional Chinese */ | ||
LanguageCode["zh_Hant"] = "zh_Hant"; | ||
/** Church Slavic */ | ||
LanguageCode["cu"] = "cu"; | ||
/** Cornish */ | ||
LanguageCode["kw"] = "kw"; | ||
/** Corsican */ | ||
LanguageCode["co"] = "co"; | ||
/** Croatian */ | ||
LanguageCode["hr"] = "hr"; | ||
/** Czech */ | ||
LanguageCode["cs"] = "cs"; | ||
/** Danish */ | ||
LanguageCode["da"] = "da"; | ||
/** Dutch */ | ||
LanguageCode["nl"] = "nl"; | ||
/** Flemish */ | ||
LanguageCode["nl_BE"] = "nl_BE"; | ||
/** Dzongkha */ | ||
LanguageCode["dz"] = "dz"; | ||
/** English */ | ||
LanguageCode["en"] = "en"; | ||
/** Australian English */ | ||
LanguageCode["en_AU"] = "en_AU"; | ||
/** Canadian English */ | ||
LanguageCode["en_CA"] = "en_CA"; | ||
/** British English */ | ||
LanguageCode["en_GB"] = "en_GB"; | ||
/** American English */ | ||
LanguageCode["en_US"] = "en_US"; | ||
/** Esperanto */ | ||
LanguageCode["eo"] = "eo"; | ||
/** Estonian */ | ||
LanguageCode["et"] = "et"; | ||
/** Ewe */ | ||
LanguageCode["ee"] = "ee"; | ||
/** Faroese */ | ||
LanguageCode["fo"] = "fo"; | ||
/** Finnish */ | ||
LanguageCode["fi"] = "fi"; | ||
/** French */ | ||
LanguageCode["fr"] = "fr"; | ||
/** Canadian French */ | ||
LanguageCode["fr_CA"] = "fr_CA"; | ||
/** Swiss French */ | ||
LanguageCode["fr_CH"] = "fr_CH"; | ||
/** Fulah */ | ||
LanguageCode["ff"] = "ff"; | ||
/** Galician */ | ||
LanguageCode["gl"] = "gl"; | ||
/** Ganda */ | ||
LanguageCode["lg"] = "lg"; | ||
/** Georgian */ | ||
LanguageCode["ka"] = "ka"; | ||
/** German */ | ||
LanguageCode["de"] = "de"; | ||
/** Austrian German */ | ||
LanguageCode["de_AT"] = "de_AT"; | ||
/** Swiss High German */ | ||
LanguageCode["de_CH"] = "de_CH"; | ||
/** Greek */ | ||
LanguageCode["el"] = "el"; | ||
/** Gujarati */ | ||
LanguageCode["gu"] = "gu"; | ||
/** Haitian Creole */ | ||
LanguageCode["ht"] = "ht"; | ||
/** Hausa */ | ||
LanguageCode["ha"] = "ha"; | ||
/** Hebrew */ | ||
LanguageCode["he"] = "he"; | ||
/** Hindi */ | ||
LanguageCode["hi"] = "hi"; | ||
/** Hungarian */ | ||
LanguageCode["hu"] = "hu"; | ||
/** Icelandic */ | ||
LanguageCode["is"] = "is"; | ||
/** Igbo */ | ||
LanguageCode["ig"] = "ig"; | ||
/** Indonesian */ | ||
LanguageCode["id"] = "id"; | ||
/** Interlingua */ | ||
LanguageCode["ia"] = "ia"; | ||
/** Irish */ | ||
LanguageCode["ga"] = "ga"; | ||
/** Italian */ | ||
LanguageCode["it"] = "it"; | ||
/** Japanese */ | ||
LanguageCode["ja"] = "ja"; | ||
/** Javanese */ | ||
LanguageCode["jv"] = "jv"; | ||
/** Kalaallisut */ | ||
LanguageCode["kl"] = "kl"; | ||
/** Kannada */ | ||
LanguageCode["kn"] = "kn"; | ||
/** Kashmiri */ | ||
LanguageCode["ks"] = "ks"; | ||
/** Kazakh */ | ||
LanguageCode["kk"] = "kk"; | ||
/** Khmer */ | ||
LanguageCode["km"] = "km"; | ||
/** Kikuyu */ | ||
LanguageCode["ki"] = "ki"; | ||
/** Kinyarwanda */ | ||
LanguageCode["rw"] = "rw"; | ||
/** Korean */ | ||
LanguageCode["ko"] = "ko"; | ||
/** Kurdish */ | ||
LanguageCode["ku"] = "ku"; | ||
/** Kyrgyz */ | ||
LanguageCode["ky"] = "ky"; | ||
/** Lao */ | ||
LanguageCode["lo"] = "lo"; | ||
/** Latin */ | ||
LanguageCode["la"] = "la"; | ||
/** Latvian */ | ||
LanguageCode["lv"] = "lv"; | ||
/** Lingala */ | ||
LanguageCode["ln"] = "ln"; | ||
/** Lithuanian */ | ||
LanguageCode["lt"] = "lt"; | ||
/** Luba-Katanga */ | ||
LanguageCode["lu"] = "lu"; | ||
/** Luxembourgish */ | ||
LanguageCode["lb"] = "lb"; | ||
/** Macedonian */ | ||
LanguageCode["mk"] = "mk"; | ||
/** Malagasy */ | ||
LanguageCode["mg"] = "mg"; | ||
/** Malay */ | ||
LanguageCode["ms"] = "ms"; | ||
/** Malayalam */ | ||
LanguageCode["ml"] = "ml"; | ||
/** Maltese */ | ||
LanguageCode["mt"] = "mt"; | ||
/** Manx */ | ||
LanguageCode["gv"] = "gv"; | ||
/** Maori */ | ||
LanguageCode["mi"] = "mi"; | ||
/** Marathi */ | ||
LanguageCode["mr"] = "mr"; | ||
/** Mongolian */ | ||
LanguageCode["mn"] = "mn"; | ||
/** Nepali */ | ||
LanguageCode["ne"] = "ne"; | ||
/** North Ndebele */ | ||
LanguageCode["nd"] = "nd"; | ||
/** Northern Sami */ | ||
LanguageCode["se"] = "se"; | ||
/** Norwegian Bokmål */ | ||
LanguageCode["nb"] = "nb"; | ||
/** Norwegian Nynorsk */ | ||
LanguageCode["nn"] = "nn"; | ||
/** Nyanja */ | ||
LanguageCode["ny"] = "ny"; | ||
/** Odia */ | ||
LanguageCode["or"] = "or"; | ||
/** Oromo */ | ||
LanguageCode["om"] = "om"; | ||
/** Ossetic */ | ||
LanguageCode["os"] = "os"; | ||
/** Pashto */ | ||
LanguageCode["ps"] = "ps"; | ||
/** Persian */ | ||
LanguageCode["fa"] = "fa"; | ||
/** Dari */ | ||
LanguageCode["fa_AF"] = "fa_AF"; | ||
/** Polish */ | ||
LanguageCode["pl"] = "pl"; | ||
/** Portuguese */ | ||
LanguageCode["pt"] = "pt"; | ||
/** Brazilian Portuguese */ | ||
LanguageCode["pt_BR"] = "pt_BR"; | ||
/** European Portuguese */ | ||
LanguageCode["pt_PT"] = "pt_PT"; | ||
/** Punjabi */ | ||
LanguageCode["pa"] = "pa"; | ||
/** Quechua */ | ||
LanguageCode["qu"] = "qu"; | ||
/** Romanian */ | ||
LanguageCode["ro"] = "ro"; | ||
/** Moldavian */ | ||
LanguageCode["ro_MD"] = "ro_MD"; | ||
/** Romansh */ | ||
LanguageCode["rm"] = "rm"; | ||
/** Rundi */ | ||
LanguageCode["rn"] = "rn"; | ||
/** Russian */ | ||
LanguageCode["ru"] = "ru"; | ||
/** Samoan */ | ||
LanguageCode["sm"] = "sm"; | ||
/** Sango */ | ||
LanguageCode["sg"] = "sg"; | ||
/** Sanskrit */ | ||
LanguageCode["sa"] = "sa"; | ||
/** Scottish Gaelic */ | ||
LanguageCode["gd"] = "gd"; | ||
/** Serbian */ | ||
LanguageCode["sr"] = "sr"; | ||
/** Shona */ | ||
LanguageCode["sn"] = "sn"; | ||
/** Sichuan Yi */ | ||
LanguageCode["ii"] = "ii"; | ||
/** Sindhi */ | ||
LanguageCode["sd"] = "sd"; | ||
/** Sinhala */ | ||
LanguageCode["si"] = "si"; | ||
/** Slovak */ | ||
LanguageCode["sk"] = "sk"; | ||
/** Slovenian */ | ||
LanguageCode["sl"] = "sl"; | ||
/** Somali */ | ||
LanguageCode["so"] = "so"; | ||
/** Southern Sotho */ | ||
LanguageCode["st"] = "st"; | ||
/** Spanish */ | ||
LanguageCode["es"] = "es"; | ||
/** European Spanish */ | ||
LanguageCode["es_ES"] = "es_ES"; | ||
/** Mexican Spanish */ | ||
LanguageCode["es_MX"] = "es_MX"; | ||
/** Sundanese */ | ||
LanguageCode["su"] = "su"; | ||
/** Swahili */ | ||
LanguageCode["sw"] = "sw"; | ||
/** Congo Swahili */ | ||
LanguageCode["sw_CD"] = "sw_CD"; | ||
/** Swedish */ | ||
LanguageCode["sv"] = "sv"; | ||
/** Tajik */ | ||
LanguageCode["tg"] = "tg"; | ||
/** Tamil */ | ||
LanguageCode["ta"] = "ta"; | ||
/** Tatar */ | ||
LanguageCode["tt"] = "tt"; | ||
/** Telugu */ | ||
LanguageCode["te"] = "te"; | ||
/** Thai */ | ||
LanguageCode["th"] = "th"; | ||
/** Tibetan */ | ||
LanguageCode["bo"] = "bo"; | ||
/** Tigrinya */ | ||
LanguageCode["ti"] = "ti"; | ||
/** Tongan */ | ||
LanguageCode["to"] = "to"; | ||
/** Turkish */ | ||
LanguageCode["tr"] = "tr"; | ||
/** Turkmen */ | ||
LanguageCode["tk"] = "tk"; | ||
/** Ukrainian */ | ||
LanguageCode["uk"] = "uk"; | ||
/** Urdu */ | ||
LanguageCode["ur"] = "ur"; | ||
/** Uyghur */ | ||
LanguageCode["ug"] = "ug"; | ||
/** Uzbek */ | ||
LanguageCode["uz"] = "uz"; | ||
/** Vietnamese */ | ||
LanguageCode["vi"] = "vi"; | ||
/** Volapük */ | ||
LanguageCode["vo"] = "vo"; | ||
/** Welsh */ | ||
LanguageCode["cy"] = "cy"; | ||
/** Western Frisian */ | ||
LanguageCode["fy"] = "fy"; | ||
/** Wolof */ | ||
LanguageCode["wo"] = "wo"; | ||
/** Xhosa */ | ||
LanguageCode["xh"] = "xh"; | ||
/** Yiddish */ | ||
LanguageCode["yi"] = "yi"; | ||
/** Yoruba */ | ||
LanguageCode["yo"] = "yo"; | ||
/** Zulu */ | ||
LanguageCode["zu"] = "zu"; | ||
@@ -386,7 +723,19 @@ })(LanguageCode = exports.LanguageCode || (exports.LanguageCode = {})); | ||
})(LogicalOperator = exports.LogicalOperator || (exports.LogicalOperator = {})); | ||
/** | ||
* " | ||
* @description | ||
* Permissions for administrators and customers. Used to control access to | ||
* GraphQL resolvers via the {@link Allow} decorator. | ||
* | ||
* @docsCategory common | ||
*/ | ||
var Permission; | ||
(function (Permission) { | ||
/** The Authenticated role means simply that the user is logged in */ | ||
Permission["Authenticated"] = "Authenticated"; | ||
/** SuperAdmin can perform the most sensitive tasks */ | ||
Permission["SuperAdmin"] = "SuperAdmin"; | ||
/** Owner means the user owns this entity, e.g. a Customer's own Order */ | ||
Permission["Owner"] = "Owner"; | ||
/** Public means any unauthenticated user may perform the operation */ | ||
Permission["Public"] = "Public"; | ||
@@ -393,0 +742,0 @@ Permission["CreateCatalog"] = "CreateCatalog"; |
@@ -0,1 +1,6 @@ | ||
/** | ||
* Normalizes a string to replace non-alphanumeric and diacritical marks with | ||
* plain equivalents. | ||
* Based on https://stackoverflow.com/a/37511463/772859 | ||
*/ | ||
export declare function normalizeString(input: string, spaceReplacer?: string): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Normalizes a string to replace non-alphanumeric and diacritical marks with | ||
* plain equivalents. | ||
* Based on https://stackoverflow.com/a/37511463/772859 | ||
*/ | ||
function normalizeString(input, spaceReplacer = ' ') { | ||
@@ -4,0 +9,0 @@ return (input || '') |
export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; | ||
/** | ||
* Type-safe omit function - returns a new object which omits the specified keys. | ||
*/ | ||
export declare function omit<T extends object, K extends keyof T>(obj: T, keysToOmit: K[]): Omit<T, K>; | ||
export declare function omit<T extends object | any[], K extends keyof T>(obj: T, keysToOmit: string[], recursive: boolean): T; |
@@ -24,2 +24,5 @@ "use strict"; | ||
} | ||
/** | ||
* When running in the Node environment, there is no native File object. | ||
*/ | ||
function isFileObject(input) { | ||
@@ -26,0 +29,0 @@ if (typeof File === 'undefined') { |
@@ -0,1 +1,6 @@ | ||
/** | ||
* Returns a new object which is a subset of the input, including only the specified properties. | ||
* Can be called with a single argument (array of props to pick), in which case it returns a partially | ||
* applied pick function. | ||
*/ | ||
export declare function pick<T extends string>(props: T[]): <U>(input: U) => Pick<U, Extract<keyof U, T>>; | ||
@@ -2,0 +7,0 @@ export declare function pick<U, T extends keyof U>(input: U, props: T[]): { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* | ||
* This file contains constants which are shared between more than one sub-module | ||
* e.g. values required by both the server and admin-ui. | ||
*/ | ||
exports.API_PORT = 3000; | ||
@@ -4,0 +8,0 @@ exports.ADMIN_API_PATH = 'admin-api'; |
import { LanguageCode } from './generated-types'; | ||
/** | ||
* A recursive implementation of the Partial<T> type. | ||
* Source: https://stackoverflow.com/a/49936686/772859 | ||
*/ | ||
export declare type DeepPartial<T> = { | ||
[P in keyof T]?: null | (T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : DeepPartial<T[P]>); | ||
}; | ||
/** | ||
* A recursive implementation of Required<T>. | ||
* Source: https://github.com/microsoft/TypeScript/issues/15012#issuecomment-365453623 | ||
*/ | ||
export declare type DeepRequired<T, U extends object | undefined = undefined> = T extends object ? { | ||
[P in keyof T]-?: NonNullable<T[P]> extends NonNullable<U | Function | Type<any>> ? NonNullable<T[P]> : DeepRequired<NonNullable<T[P]>, U>; | ||
} : T; | ||
/** | ||
* A type representing the type rather than instance of a class. | ||
*/ | ||
export interface Type<T> extends Function { | ||
@@ -14,5 +25,15 @@ new (...args: any[]): T; | ||
}; | ||
/** | ||
* @description | ||
* A type representing JSON-compatible values. | ||
* From https://github.com/microsoft/TypeScript/issues/1897#issuecomment-580962081 | ||
* | ||
* @docsCategory common | ||
*/ | ||
export declare type JsonCompatible<T> = { | ||
[P in keyof T]: T[P] extends Json ? T[P] : Pick<T, P> extends Required<Pick<T, P>> ? never : JsonCompatible<T[P]>; | ||
}; | ||
/** | ||
* A type describing the shape of a paginated list response | ||
*/ | ||
export declare type PaginatedList<T> = { | ||
@@ -22,27 +43,207 @@ items: T[]; | ||
}; | ||
/** | ||
* @description | ||
* An entity ID. Depending on the configured {@link EntityIdStrategy}, it will be either | ||
* a `string` or a `number`; | ||
* | ||
* @docsCategory common | ||
*/ | ||
export declare type ID = string | number; | ||
/** | ||
* @description | ||
* A data type for a custom field. The CustomFieldType determines the data types used in the generated | ||
* database columns and GraphQL fields as follows (key: m = MySQL, p = Postgres, s = SQLite): | ||
* | ||
* Type | DB type | GraphQL type | ||
* ----- |--------- |--------------- | ||
* string | varchar | String | ||
* localeString | varchar | String | ||
* int | int | Int | ||
* float | double precision | Float | ||
* boolean | tinyint (m), bool (p), boolean (s) | Boolean | ||
* datetime | datetime (m,s), timestamp (p) | DateTime | ||
* | ||
* Additionally, the CustomFieldType also dictates which [configuration options](/docs/typescript-api/custom-fields/#configuration-options) | ||
* are available for that custom field. | ||
* | ||
* @docsCategory custom-fields | ||
*/ | ||
export declare type CustomFieldType = 'string' | 'localeString' | 'int' | 'float' | 'boolean' | 'datetime'; | ||
export declare type ConfigArgType = 'string' | 'int' | 'float' | 'boolean' | 'datetime' | 'facetValueIds'; | ||
export declare type ConfigArgSubset<T extends ConfigArgType> = T; | ||
/** | ||
* @description | ||
* Certain entities (those which implement {@link ConfigurableOperationDef}) allow arbitrary | ||
* configuration arguments to be specified which can then be set in the admin-ui and used in | ||
* the business logic of the app. These are the valid data types of such arguments. | ||
* The data type influences: | ||
* | ||
* 1. How the argument form field is rendered in the admin-ui | ||
* 2. The JavaScript type into which the value is coerced before being passed to the business logic. | ||
* | ||
* @docsCategory ConfigurableOperationDef | ||
*/ | ||
export declare type ConfigArgType = 'string' | 'int' | 'float' | 'boolean' | 'datetime' | 'ID'; | ||
/** | ||
* @description | ||
* The ids of the default form input components that ship with the | ||
* Admin UI. | ||
* | ||
* @docsCategory ConfigurableOperationDef | ||
*/ | ||
export declare type DefaultFormComponentId = 'boolean-form-input' | 'currency-form-input' | 'date-form-input' | 'facet-value-form-input' | 'number-form-input' | 'select-form-input' | 'product-selector-form-input' | 'customer-group-form-input' | 'text-form-input' | 'password-form-input'; | ||
/** | ||
* @description | ||
* Used to defined the expected arguments for a given default form input component. | ||
* | ||
* @docsCategory ConfigurableOperationDef | ||
*/ | ||
declare type DefaultFormConfigHash = { | ||
'date-form-input': { | ||
min?: string; | ||
max?: string; | ||
yearRange?: number; | ||
}; | ||
'number-form-input': { | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
prefix?: string; | ||
suffix?: string; | ||
}; | ||
'select-form-input': { | ||
options?: Array<{ | ||
value: string; | ||
label?: string; | ||
}>; | ||
}; | ||
'boolean-form-input': {}; | ||
'currency-form-input': {}; | ||
'facet-value-form-input': {}; | ||
'product-selector-form-input': {}; | ||
'customer-group-form-input': {}; | ||
'text-form-input': {}; | ||
'password-form-input': {}; | ||
}; | ||
export declare type DefaultFormComponentConfig<T extends DefaultFormComponentId> = DefaultFormConfigHash[T]; | ||
export declare type CustomFieldsObject = { | ||
[key: string]: any; | ||
}; | ||
/** | ||
* @description | ||
* This interface describes JSON config file (vendure-ui-config.json) used by the Admin UI. | ||
* The values are loaded at run-time by the Admin UI app, and allow core configuration to be | ||
* managed without the need to re-build the application. | ||
* | ||
* @docsCategory AdminUiPlugin | ||
*/ | ||
export interface AdminUiConfig { | ||
/** | ||
* @description | ||
* The hostname of the Vendure server which the admin ui will be making API calls | ||
* to. If set to "auto", the Admin UI app will determine the hostname from the | ||
* current location (i.e. `window.location.hostname`). | ||
* | ||
* @default 'http://localhost' | ||
*/ | ||
apiHost: string | 'auto'; | ||
/** | ||
* @description | ||
* The port of the Vendure server which the admin ui will be making API calls | ||
* to. If set to "auto", the Admin UI app will determine the port from the | ||
* current location (i.e. `window.location.port`). | ||
* | ||
* @default 3000 | ||
*/ | ||
apiPort: number | 'auto'; | ||
/** | ||
* @description | ||
* The path to the GraphQL Admin API. | ||
* | ||
* @default 'admin-api' | ||
*/ | ||
adminApiPath: string; | ||
/** | ||
* @description | ||
* Whether to use cookies or bearer tokens to track sessions. | ||
* Should match the setting of in the server's `tokenMethod` config | ||
* option. | ||
* | ||
* @default 'cookie' | ||
*/ | ||
tokenMethod: 'cookie' | 'bearer'; | ||
/** | ||
* @description | ||
* The header used when using the 'bearer' auth method. Should match the | ||
* setting of the server's `authOptions.authTokenHeaderKey` config | ||
* option. | ||
* | ||
* @default 'vendure-auth-token' | ||
*/ | ||
authTokenHeaderKey: string; | ||
/** | ||
* @description | ||
* The default language for the Admin UI. Must be one of the | ||
* items specified in the `availableLanguages` property. | ||
* | ||
* @default LanguageCode.en | ||
*/ | ||
defaultLanguage: LanguageCode; | ||
/** | ||
* @description | ||
* An array of languages for which translations exist for the Admin UI. | ||
* | ||
* @default [LanguageCode.en, LanguageCode.es] | ||
*/ | ||
availableLanguages: LanguageCode[]; | ||
/** | ||
* @description | ||
* If you are using an external {@link AuthenticationStrategy} for the Admin API, you can configure | ||
* a custom URL for the login page with this option. On logging out or redirecting an unauthenticated | ||
* user, the Admin UI app will redirect the user to this URL rather than the default username/password | ||
* screen. | ||
*/ | ||
loginUrl?: string; | ||
} | ||
/** | ||
* @description | ||
* Configures the path to a custom-build of the Admin UI app. | ||
* | ||
* @docsCategory common | ||
*/ | ||
export interface AdminUiAppConfig { | ||
/** | ||
* @description | ||
* The path to the compiled admin ui app files. If not specified, an internal | ||
* default build is used. This path should contain the `vendure-ui-config.json` file, | ||
* index.html, the compiled js bundles etc. | ||
*/ | ||
path: string; | ||
/** | ||
* @description | ||
* The function which will be invoked to start the app compilation process. | ||
*/ | ||
compile?: () => Promise<void>; | ||
} | ||
/** | ||
* @description | ||
* Information about the Admin UI app dev server. | ||
* | ||
* @docsCategory common | ||
*/ | ||
export interface AdminUiAppDevModeConfig { | ||
/** | ||
* @description | ||
* The path to the uncompiled ui app source files. This path should contain the `vendure-ui-config.json` file. | ||
*/ | ||
sourcePath: string; | ||
/** | ||
* @description | ||
* The port on which the dev server is listening. Overrides the value set by `AdminUiOptions.port`. | ||
*/ | ||
port: number; | ||
/** | ||
* @description | ||
* The function which will be invoked to start the app compilation process. | ||
*/ | ||
compile: () => Promise<void>; | ||
} | ||
export {}; |
@@ -0,5 +1,31 @@ | ||
/** | ||
* Predicate with type guard, used to filter out null or undefined values | ||
* in a filter operation. | ||
*/ | ||
export declare function notNullOrUndefined<T>(val: T | undefined | null): val is T; | ||
/** | ||
* Used in exhaustiveness checks to assert a codepath should never be reached. | ||
*/ | ||
export declare function assertNever(value: never): never; | ||
/** | ||
* Simple object check. | ||
* From https://stackoverflow.com/a/34749873/772859 | ||
*/ | ||
export declare function isObject(item: any): item is object; | ||
export declare function isClassInstance(item: any): boolean; | ||
/** | ||
* Given an array of option arrays `[['red, 'blue'], ['small', 'large']]`, this method returns a new array | ||
* containing all the combinations of those options: | ||
* | ||
* @example | ||
* ``` | ||
* generateAllCombinations([['red, 'blue'], ['small', 'large']]); | ||
* // => | ||
* // [ | ||
* // ['red', 'small'], | ||
* // ['red', 'large'], | ||
* // ['blue', 'small'], | ||
* // ['blue', 'large'], | ||
* // ] | ||
*/ | ||
export declare function generateAllCombinations<T>(optionGroups: T[][], combination?: T[], k?: number, output?: T[][]): T[][]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Predicate with type guard, used to filter out null or undefined values | ||
* in a filter operation. | ||
*/ | ||
function notNullOrUndefined(val) { | ||
@@ -7,6 +11,13 @@ return val !== undefined && val !== null; | ||
exports.notNullOrUndefined = notNullOrUndefined; | ||
/** | ||
* Used in exhaustiveness checks to assert a codepath should never be reached. | ||
*/ | ||
function assertNever(value) { | ||
throw new Error(`Expected never, got ${typeof value}`); | ||
throw new Error(`Expected never, got ${typeof value} (${JSON.stringify(value)})`); | ||
} | ||
exports.assertNever = assertNever; | ||
/** | ||
* Simple object check. | ||
* From https://stackoverflow.com/a/34749873/772859 | ||
*/ | ||
function isObject(item) { | ||
@@ -20,2 +31,17 @@ return item && typeof item === 'object' && !Array.isArray(item); | ||
exports.isClassInstance = isClassInstance; | ||
/** | ||
* Given an array of option arrays `[['red, 'blue'], ['small', 'large']]`, this method returns a new array | ||
* containing all the combinations of those options: | ||
* | ||
* @example | ||
* ``` | ||
* generateAllCombinations([['red, 'blue'], ['small', 'large']]); | ||
* // => | ||
* // [ | ||
* // ['red', 'small'], | ||
* // ['red', 'large'], | ||
* // ['blue', 'small'], | ||
* // ['blue', 'large'], | ||
* // ] | ||
*/ | ||
function generateAllCombinations(optionGroups, combination = [], k = 0, output = []) { | ||
@@ -30,5 +56,7 @@ if (k === 0) { | ||
else { | ||
// tslint:disable:prefer-for-of | ||
for (let i = 0; i < optionGroups[k].length; i++) { | ||
generateAllCombinations(optionGroups, combination.concat(optionGroups[k][i]), k + 1, output); | ||
} | ||
// tslint:enable:prefer-for-of | ||
return output; | ||
@@ -35,0 +63,0 @@ } |
@@ -0,1 +1,5 @@ | ||
/** | ||
* An extremely fast function for deep-cloning an object which only contains simple | ||
* values, i.e. primitives, arrays and nested simple objects. | ||
*/ | ||
export declare function simpleDeepClone<T extends string | number | any[] | object>(input: T): T; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const shared_utils_1 = require("./shared-utils"); | ||
/** | ||
* An extremely fast function for deep-cloning an object which only contains simple | ||
* values, i.e. primitives, arrays and nested simple objects. | ||
*/ | ||
function simpleDeepClone(input) { | ||
// if not array or object or is null return self | ||
if (typeof input !== 'object' || input === null) { | ||
@@ -10,2 +15,3 @@ return input; | ||
let i; | ||
// handle case: array | ||
if (input instanceof Array) { | ||
@@ -22,2 +28,3 @@ let l; | ||
} | ||
// handle case: object | ||
output = {}; | ||
@@ -24,0 +31,0 @@ for (i in input) { |
@@ -0,1 +1,6 @@ | ||
/** | ||
* Returns an array with only unique values. Objects are compared by reference, | ||
* unless the `byKey` argument is supplied, in which case matching properties will | ||
* be used to check duplicates | ||
*/ | ||
export declare function unique<T>(arr: T[], byKey?: keyof T): T[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Returns an array with only unique values. Objects are compared by reference, | ||
* unless the `byKey` argument is supplied, in which case matching properties will | ||
* be used to check duplicates | ||
*/ | ||
function unique(arr, byKey) { | ||
@@ -4,0 +9,0 @@ return arr.filter((item, index, self) => { |
{ | ||
"name": "@vendure/common", | ||
"version": "0.14.1", | ||
"version": "0.15.0", | ||
"main": "index.js", | ||
@@ -23,3 +23,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "c91b01ea3f5f4521e7fb92f85c10c003735dabf0" | ||
"gitHead": "3950c315ab732b09f401215f35d7fdd6019f4331" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
270100
7656