@authyon/auth 0.2.0-beta.33 → 0.2.0-beta.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ability-C9xVi8HW.d.cts → ability-CJSA2QWi.d.cts} +487 -1
- package/dist/{ability-C9xVi8HW.d.ts → ability-CJSA2QWi.d.ts} +487 -1
- package/dist/index.cjs +458 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +456 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28,12 +28,14 @@ __export(index_exports, {
|
|
|
28
28
|
AuthyonSessionController: () => AuthyonSessionController,
|
|
29
29
|
ErrorCodes: () => ErrorCodes,
|
|
30
30
|
FetchHttpAdapter: () => FetchHttpAdapter,
|
|
31
|
+
Locales: () => Locales,
|
|
31
32
|
LoggingHttpAdapter: () => LoggingHttpAdapter,
|
|
32
33
|
SubtenantPermissions: () => SubtenantPermissions,
|
|
33
34
|
TENANT_FILTER_MAX_DEPTH: () => TENANT_FILTER_MAX_DEPTH,
|
|
34
35
|
TENANT_FILTER_MAX_VALUES: () => TENANT_FILTER_MAX_VALUES,
|
|
35
36
|
TENANT_FILTER_MAX_VALUE_LENGTH: () => TENANT_FILTER_MAX_VALUE_LENGTH,
|
|
36
37
|
TenantPermissions: () => TenantPermissions,
|
|
38
|
+
TimeZones: () => TimeZones,
|
|
37
39
|
createAuthyonAbility: () => createAuthyonAbility,
|
|
38
40
|
createAuthyonRules: () => createAuthyonRules,
|
|
39
41
|
createClient: () => createClient,
|
|
@@ -105,7 +107,11 @@ var ErrorCodes = {
|
|
|
105
107
|
CredentialThrottled: "credential_throttled",
|
|
106
108
|
ApprovalNotFound: "authorization_not_found",
|
|
107
109
|
SessionRevoked: "session_revoked",
|
|
108
|
-
TwoFactorTooManyFailures: "user.2fa.too_many_failures"
|
|
110
|
+
TwoFactorTooManyFailures: "user.2fa.too_many_failures",
|
|
111
|
+
/** Not an IANA time zone the API knows. See `TimeZones`. */
|
|
112
|
+
PreferencesTimeZoneInvalid: "preferences.time_zone.invalid",
|
|
113
|
+
/** Not a well-formed BCP 47 tag. See `Locales`. */
|
|
114
|
+
PreferencesLocaleInvalid: "preferences.locale.invalid"
|
|
109
115
|
};
|
|
110
116
|
var STANDARD_ERROR_FIELDS = /* @__PURE__ */ new Set([
|
|
111
117
|
"type",
|
|
@@ -657,6 +663,40 @@ var AuthyonClient = class {
|
|
|
657
663
|
this.user = {
|
|
658
664
|
/** GET /auth/me — fresh profile of the current user. */
|
|
659
665
|
me: () => this.request("/auth/me", { bearer: true }).then(normalizeUser),
|
|
666
|
+
/** Time zone (IANA) and language (BCP 47) the user chose. */
|
|
667
|
+
preferences: {
|
|
668
|
+
/**
|
|
669
|
+
* What the user chose, `null` where they follow the environment default
|
|
670
|
+
* (read from `GET /auth/me`). The value in effect is on `User.timeZone` /
|
|
671
|
+
* `User.locale`.
|
|
672
|
+
*/
|
|
673
|
+
get: async () => {
|
|
674
|
+
const me = await this.user.me();
|
|
675
|
+
return {
|
|
676
|
+
timeZone: me.preferences?.timeZone ?? null,
|
|
677
|
+
locale: me.preferences?.locale ?? null
|
|
678
|
+
};
|
|
679
|
+
},
|
|
680
|
+
/**
|
|
681
|
+
* PUT /auth/me/preferences — a replace: send both; `null` puts that one
|
|
682
|
+
* back on the environment default. Then rotates the session so the access
|
|
683
|
+
* token carries the new `zoneinfo` / `locale` right away (the rotation is
|
|
684
|
+
* single-flight, shared with any refresh already running) and returns the
|
|
685
|
+
* fresh profile.
|
|
686
|
+
*
|
|
687
|
+
* An unknown value rejects with `preferences.time_zone.invalid` or
|
|
688
|
+
* `preferences.locale.invalid` (400) and changes neither.
|
|
689
|
+
*/
|
|
690
|
+
update: async (input) => {
|
|
691
|
+
await this.request("/auth/me/preferences", {
|
|
692
|
+
method: "PUT",
|
|
693
|
+
bearer: true,
|
|
694
|
+
body: { timeZone: input.timeZone, locale: input.locale }
|
|
695
|
+
});
|
|
696
|
+
const session = await this.hydrateUser(await this.refresh());
|
|
697
|
+
return session.user ?? this.user.me();
|
|
698
|
+
}
|
|
699
|
+
},
|
|
660
700
|
/** GET /auth/sessions — active refresh-token sessions with device/IP data. */
|
|
661
701
|
sessions: () => this.request("/auth/sessions", { bearer: true }),
|
|
662
702
|
/** GET /auth/me/activities — paginated recent account activity for the current user. */
|
|
@@ -1801,6 +1841,421 @@ var SubtenantPermissions = {
|
|
|
1801
1841
|
*/
|
|
1802
1842
|
TreeSwitch: "subtenants:tree:switch"
|
|
1803
1843
|
};
|
|
1844
|
+
|
|
1845
|
+
// ../../internal/core/contracts/preferences.ts
|
|
1846
|
+
var TimeZones = {
|
|
1847
|
+
Utc: "UTC",
|
|
1848
|
+
AfricaAbidjan: "Africa/Abidjan",
|
|
1849
|
+
AfricaAlgiers: "Africa/Algiers",
|
|
1850
|
+
AfricaBissau: "Africa/Bissau",
|
|
1851
|
+
AfricaCairo: "Africa/Cairo",
|
|
1852
|
+
AfricaCasablanca: "Africa/Casablanca",
|
|
1853
|
+
AfricaCeuta: "Africa/Ceuta",
|
|
1854
|
+
AfricaElAaiun: "Africa/El_Aaiun",
|
|
1855
|
+
AfricaJohannesburg: "Africa/Johannesburg",
|
|
1856
|
+
AfricaJuba: "Africa/Juba",
|
|
1857
|
+
AfricaKhartoum: "Africa/Khartoum",
|
|
1858
|
+
AfricaLagos: "Africa/Lagos",
|
|
1859
|
+
AfricaMaputo: "Africa/Maputo",
|
|
1860
|
+
AfricaMonrovia: "Africa/Monrovia",
|
|
1861
|
+
AfricaNairobi: "Africa/Nairobi",
|
|
1862
|
+
AfricaNdjamena: "Africa/Ndjamena",
|
|
1863
|
+
AfricaSaoTome: "Africa/Sao_Tome",
|
|
1864
|
+
AfricaTripoli: "Africa/Tripoli",
|
|
1865
|
+
AfricaTunis: "Africa/Tunis",
|
|
1866
|
+
AfricaWindhoek: "Africa/Windhoek",
|
|
1867
|
+
AmericaAdak: "America/Adak",
|
|
1868
|
+
AmericaAnchorage: "America/Anchorage",
|
|
1869
|
+
AmericaAraguaina: "America/Araguaina",
|
|
1870
|
+
AmericaArgentinaBuenosAires: "America/Argentina/Buenos_Aires",
|
|
1871
|
+
AmericaArgentinaCatamarca: "America/Argentina/Catamarca",
|
|
1872
|
+
AmericaArgentinaCordoba: "America/Argentina/Cordoba",
|
|
1873
|
+
AmericaArgentinaJujuy: "America/Argentina/Jujuy",
|
|
1874
|
+
AmericaArgentinaLaRioja: "America/Argentina/La_Rioja",
|
|
1875
|
+
AmericaArgentinaMendoza: "America/Argentina/Mendoza",
|
|
1876
|
+
AmericaArgentinaRioGallegos: "America/Argentina/Rio_Gallegos",
|
|
1877
|
+
AmericaArgentinaSalta: "America/Argentina/Salta",
|
|
1878
|
+
AmericaArgentinaSanJuan: "America/Argentina/San_Juan",
|
|
1879
|
+
AmericaArgentinaSanLuis: "America/Argentina/San_Luis",
|
|
1880
|
+
AmericaArgentinaTucuman: "America/Argentina/Tucuman",
|
|
1881
|
+
AmericaArgentinaUshuaia: "America/Argentina/Ushuaia",
|
|
1882
|
+
AmericaAsuncion: "America/Asuncion",
|
|
1883
|
+
AmericaBahia: "America/Bahia",
|
|
1884
|
+
AmericaBahiaBanderas: "America/Bahia_Banderas",
|
|
1885
|
+
AmericaBarbados: "America/Barbados",
|
|
1886
|
+
AmericaBelem: "America/Belem",
|
|
1887
|
+
AmericaBelize: "America/Belize",
|
|
1888
|
+
AmericaBoaVista: "America/Boa_Vista",
|
|
1889
|
+
AmericaBogota: "America/Bogota",
|
|
1890
|
+
AmericaBoise: "America/Boise",
|
|
1891
|
+
AmericaCambridgeBay: "America/Cambridge_Bay",
|
|
1892
|
+
AmericaCampoGrande: "America/Campo_Grande",
|
|
1893
|
+
AmericaCancun: "America/Cancun",
|
|
1894
|
+
AmericaCaracas: "America/Caracas",
|
|
1895
|
+
AmericaCayenne: "America/Cayenne",
|
|
1896
|
+
AmericaChicago: "America/Chicago",
|
|
1897
|
+
AmericaChihuahua: "America/Chihuahua",
|
|
1898
|
+
AmericaCiudadJuarez: "America/Ciudad_Juarez",
|
|
1899
|
+
AmericaCostaRica: "America/Costa_Rica",
|
|
1900
|
+
AmericaCoyhaique: "America/Coyhaique",
|
|
1901
|
+
AmericaCuiaba: "America/Cuiaba",
|
|
1902
|
+
AmericaDanmarkshavn: "America/Danmarkshavn",
|
|
1903
|
+
AmericaDawson: "America/Dawson",
|
|
1904
|
+
AmericaDawsonCreek: "America/Dawson_Creek",
|
|
1905
|
+
AmericaDenver: "America/Denver",
|
|
1906
|
+
AmericaDetroit: "America/Detroit",
|
|
1907
|
+
AmericaEdmonton: "America/Edmonton",
|
|
1908
|
+
AmericaEirunepe: "America/Eirunepe",
|
|
1909
|
+
AmericaElSalvador: "America/El_Salvador",
|
|
1910
|
+
AmericaFortNelson: "America/Fort_Nelson",
|
|
1911
|
+
AmericaFortaleza: "America/Fortaleza",
|
|
1912
|
+
AmericaGlaceBay: "America/Glace_Bay",
|
|
1913
|
+
AmericaGooseBay: "America/Goose_Bay",
|
|
1914
|
+
AmericaGrandTurk: "America/Grand_Turk",
|
|
1915
|
+
AmericaGuatemala: "America/Guatemala",
|
|
1916
|
+
AmericaGuayaquil: "America/Guayaquil",
|
|
1917
|
+
AmericaGuyana: "America/Guyana",
|
|
1918
|
+
AmericaHalifax: "America/Halifax",
|
|
1919
|
+
AmericaHavana: "America/Havana",
|
|
1920
|
+
AmericaHermosillo: "America/Hermosillo",
|
|
1921
|
+
AmericaIndianaIndianapolis: "America/Indiana/Indianapolis",
|
|
1922
|
+
AmericaIndianaKnox: "America/Indiana/Knox",
|
|
1923
|
+
AmericaIndianaMarengo: "America/Indiana/Marengo",
|
|
1924
|
+
AmericaIndianaPetersburg: "America/Indiana/Petersburg",
|
|
1925
|
+
AmericaIndianaTellCity: "America/Indiana/Tell_City",
|
|
1926
|
+
AmericaIndianaVevay: "America/Indiana/Vevay",
|
|
1927
|
+
AmericaIndianaVincennes: "America/Indiana/Vincennes",
|
|
1928
|
+
AmericaIndianaWinamac: "America/Indiana/Winamac",
|
|
1929
|
+
AmericaInuvik: "America/Inuvik",
|
|
1930
|
+
AmericaIqaluit: "America/Iqaluit",
|
|
1931
|
+
AmericaJamaica: "America/Jamaica",
|
|
1932
|
+
AmericaJuneau: "America/Juneau",
|
|
1933
|
+
AmericaKentuckyLouisville: "America/Kentucky/Louisville",
|
|
1934
|
+
AmericaKentuckyMonticello: "America/Kentucky/Monticello",
|
|
1935
|
+
AmericaLaPaz: "America/La_Paz",
|
|
1936
|
+
AmericaLima: "America/Lima",
|
|
1937
|
+
AmericaLosAngeles: "America/Los_Angeles",
|
|
1938
|
+
AmericaMaceio: "America/Maceio",
|
|
1939
|
+
AmericaManagua: "America/Managua",
|
|
1940
|
+
AmericaManaus: "America/Manaus",
|
|
1941
|
+
AmericaMartinique: "America/Martinique",
|
|
1942
|
+
AmericaMatamoros: "America/Matamoros",
|
|
1943
|
+
AmericaMazatlan: "America/Mazatlan",
|
|
1944
|
+
AmericaMenominee: "America/Menominee",
|
|
1945
|
+
AmericaMerida: "America/Merida",
|
|
1946
|
+
AmericaMetlakatla: "America/Metlakatla",
|
|
1947
|
+
AmericaMexicoCity: "America/Mexico_City",
|
|
1948
|
+
AmericaMiquelon: "America/Miquelon",
|
|
1949
|
+
AmericaMoncton: "America/Moncton",
|
|
1950
|
+
AmericaMonterrey: "America/Monterrey",
|
|
1951
|
+
AmericaMontevideo: "America/Montevideo",
|
|
1952
|
+
AmericaNewYork: "America/New_York",
|
|
1953
|
+
AmericaNome: "America/Nome",
|
|
1954
|
+
AmericaNoronha: "America/Noronha",
|
|
1955
|
+
AmericaNorthDakotaBeulah: "America/North_Dakota/Beulah",
|
|
1956
|
+
AmericaNorthDakotaCenter: "America/North_Dakota/Center",
|
|
1957
|
+
AmericaNorthDakotaNewSalem: "America/North_Dakota/New_Salem",
|
|
1958
|
+
AmericaNuuk: "America/Nuuk",
|
|
1959
|
+
AmericaOjinaga: "America/Ojinaga",
|
|
1960
|
+
AmericaPanama: "America/Panama",
|
|
1961
|
+
AmericaParamaribo: "America/Paramaribo",
|
|
1962
|
+
AmericaPhoenix: "America/Phoenix",
|
|
1963
|
+
AmericaPortAuPrince: "America/Port-au-Prince",
|
|
1964
|
+
AmericaPortoVelho: "America/Porto_Velho",
|
|
1965
|
+
AmericaPuertoRico: "America/Puerto_Rico",
|
|
1966
|
+
AmericaPuntaArenas: "America/Punta_Arenas",
|
|
1967
|
+
AmericaRankinInlet: "America/Rankin_Inlet",
|
|
1968
|
+
AmericaRecife: "America/Recife",
|
|
1969
|
+
AmericaRegina: "America/Regina",
|
|
1970
|
+
AmericaResolute: "America/Resolute",
|
|
1971
|
+
AmericaRioBranco: "America/Rio_Branco",
|
|
1972
|
+
AmericaSantarem: "America/Santarem",
|
|
1973
|
+
AmericaSantiago: "America/Santiago",
|
|
1974
|
+
AmericaSantoDomingo: "America/Santo_Domingo",
|
|
1975
|
+
AmericaSaoPaulo: "America/Sao_Paulo",
|
|
1976
|
+
AmericaScoresbysund: "America/Scoresbysund",
|
|
1977
|
+
AmericaSitka: "America/Sitka",
|
|
1978
|
+
AmericaStJohns: "America/St_Johns",
|
|
1979
|
+
AmericaSwiftCurrent: "America/Swift_Current",
|
|
1980
|
+
AmericaTegucigalpa: "America/Tegucigalpa",
|
|
1981
|
+
AmericaThule: "America/Thule",
|
|
1982
|
+
AmericaTijuana: "America/Tijuana",
|
|
1983
|
+
AmericaToronto: "America/Toronto",
|
|
1984
|
+
AmericaVancouver: "America/Vancouver",
|
|
1985
|
+
AmericaWhitehorse: "America/Whitehorse",
|
|
1986
|
+
AmericaWinnipeg: "America/Winnipeg",
|
|
1987
|
+
AmericaYakutat: "America/Yakutat",
|
|
1988
|
+
AntarcticaCasey: "Antarctica/Casey",
|
|
1989
|
+
AntarcticaDavis: "Antarctica/Davis",
|
|
1990
|
+
AntarcticaMacquarie: "Antarctica/Macquarie",
|
|
1991
|
+
AntarcticaMawson: "Antarctica/Mawson",
|
|
1992
|
+
AntarcticaPalmer: "Antarctica/Palmer",
|
|
1993
|
+
AntarcticaRothera: "Antarctica/Rothera",
|
|
1994
|
+
AntarcticaTroll: "Antarctica/Troll",
|
|
1995
|
+
AntarcticaVostok: "Antarctica/Vostok",
|
|
1996
|
+
AsiaAlmaty: "Asia/Almaty",
|
|
1997
|
+
AsiaAmman: "Asia/Amman",
|
|
1998
|
+
AsiaAnadyr: "Asia/Anadyr",
|
|
1999
|
+
AsiaAqtau: "Asia/Aqtau",
|
|
2000
|
+
AsiaAqtobe: "Asia/Aqtobe",
|
|
2001
|
+
AsiaAshgabat: "Asia/Ashgabat",
|
|
2002
|
+
AsiaAtyrau: "Asia/Atyrau",
|
|
2003
|
+
AsiaBaghdad: "Asia/Baghdad",
|
|
2004
|
+
AsiaBaku: "Asia/Baku",
|
|
2005
|
+
AsiaBangkok: "Asia/Bangkok",
|
|
2006
|
+
AsiaBarnaul: "Asia/Barnaul",
|
|
2007
|
+
AsiaBeirut: "Asia/Beirut",
|
|
2008
|
+
AsiaBishkek: "Asia/Bishkek",
|
|
2009
|
+
AsiaChita: "Asia/Chita",
|
|
2010
|
+
AsiaColombo: "Asia/Colombo",
|
|
2011
|
+
AsiaDamascus: "Asia/Damascus",
|
|
2012
|
+
AsiaDhaka: "Asia/Dhaka",
|
|
2013
|
+
AsiaDili: "Asia/Dili",
|
|
2014
|
+
AsiaDubai: "Asia/Dubai",
|
|
2015
|
+
AsiaDushanbe: "Asia/Dushanbe",
|
|
2016
|
+
AsiaFamagusta: "Asia/Famagusta",
|
|
2017
|
+
AsiaGaza: "Asia/Gaza",
|
|
2018
|
+
AsiaHebron: "Asia/Hebron",
|
|
2019
|
+
AsiaHoChiMinh: "Asia/Ho_Chi_Minh",
|
|
2020
|
+
AsiaHongKong: "Asia/Hong_Kong",
|
|
2021
|
+
AsiaHovd: "Asia/Hovd",
|
|
2022
|
+
AsiaIrkutsk: "Asia/Irkutsk",
|
|
2023
|
+
AsiaJakarta: "Asia/Jakarta",
|
|
2024
|
+
AsiaJayapura: "Asia/Jayapura",
|
|
2025
|
+
AsiaJerusalem: "Asia/Jerusalem",
|
|
2026
|
+
AsiaKabul: "Asia/Kabul",
|
|
2027
|
+
AsiaKamchatka: "Asia/Kamchatka",
|
|
2028
|
+
AsiaKarachi: "Asia/Karachi",
|
|
2029
|
+
AsiaKathmandu: "Asia/Kathmandu",
|
|
2030
|
+
AsiaKhandyga: "Asia/Khandyga",
|
|
2031
|
+
AsiaKolkata: "Asia/Kolkata",
|
|
2032
|
+
AsiaKrasnoyarsk: "Asia/Krasnoyarsk",
|
|
2033
|
+
AsiaKuching: "Asia/Kuching",
|
|
2034
|
+
AsiaMacau: "Asia/Macau",
|
|
2035
|
+
AsiaMagadan: "Asia/Magadan",
|
|
2036
|
+
AsiaMakassar: "Asia/Makassar",
|
|
2037
|
+
AsiaManila: "Asia/Manila",
|
|
2038
|
+
AsiaNicosia: "Asia/Nicosia",
|
|
2039
|
+
AsiaNovokuznetsk: "Asia/Novokuznetsk",
|
|
2040
|
+
AsiaNovosibirsk: "Asia/Novosibirsk",
|
|
2041
|
+
AsiaOmsk: "Asia/Omsk",
|
|
2042
|
+
AsiaOral: "Asia/Oral",
|
|
2043
|
+
AsiaPontianak: "Asia/Pontianak",
|
|
2044
|
+
AsiaPyongyang: "Asia/Pyongyang",
|
|
2045
|
+
AsiaQatar: "Asia/Qatar",
|
|
2046
|
+
AsiaQostanay: "Asia/Qostanay",
|
|
2047
|
+
AsiaQyzylorda: "Asia/Qyzylorda",
|
|
2048
|
+
AsiaRiyadh: "Asia/Riyadh",
|
|
2049
|
+
AsiaSakhalin: "Asia/Sakhalin",
|
|
2050
|
+
AsiaSamarkand: "Asia/Samarkand",
|
|
2051
|
+
AsiaSeoul: "Asia/Seoul",
|
|
2052
|
+
AsiaShanghai: "Asia/Shanghai",
|
|
2053
|
+
AsiaSingapore: "Asia/Singapore",
|
|
2054
|
+
AsiaSrednekolymsk: "Asia/Srednekolymsk",
|
|
2055
|
+
AsiaTaipei: "Asia/Taipei",
|
|
2056
|
+
AsiaTashkent: "Asia/Tashkent",
|
|
2057
|
+
AsiaTbilisi: "Asia/Tbilisi",
|
|
2058
|
+
AsiaTehran: "Asia/Tehran",
|
|
2059
|
+
AsiaThimphu: "Asia/Thimphu",
|
|
2060
|
+
AsiaTokyo: "Asia/Tokyo",
|
|
2061
|
+
AsiaTomsk: "Asia/Tomsk",
|
|
2062
|
+
AsiaUlaanbaatar: "Asia/Ulaanbaatar",
|
|
2063
|
+
AsiaUrumqi: "Asia/Urumqi",
|
|
2064
|
+
AsiaUstNera: "Asia/Ust-Nera",
|
|
2065
|
+
AsiaVladivostok: "Asia/Vladivostok",
|
|
2066
|
+
AsiaYakutsk: "Asia/Yakutsk",
|
|
2067
|
+
AsiaYangon: "Asia/Yangon",
|
|
2068
|
+
AsiaYekaterinburg: "Asia/Yekaterinburg",
|
|
2069
|
+
AsiaYerevan: "Asia/Yerevan",
|
|
2070
|
+
AtlanticAzores: "Atlantic/Azores",
|
|
2071
|
+
AtlanticBermuda: "Atlantic/Bermuda",
|
|
2072
|
+
AtlanticCanary: "Atlantic/Canary",
|
|
2073
|
+
AtlanticCapeVerde: "Atlantic/Cape_Verde",
|
|
2074
|
+
AtlanticFaroe: "Atlantic/Faroe",
|
|
2075
|
+
AtlanticMadeira: "Atlantic/Madeira",
|
|
2076
|
+
AtlanticSouthGeorgia: "Atlantic/South_Georgia",
|
|
2077
|
+
AtlanticStanley: "Atlantic/Stanley",
|
|
2078
|
+
AustraliaAdelaide: "Australia/Adelaide",
|
|
2079
|
+
AustraliaBrisbane: "Australia/Brisbane",
|
|
2080
|
+
AustraliaBrokenHill: "Australia/Broken_Hill",
|
|
2081
|
+
AustraliaDarwin: "Australia/Darwin",
|
|
2082
|
+
AustraliaEucla: "Australia/Eucla",
|
|
2083
|
+
AustraliaHobart: "Australia/Hobart",
|
|
2084
|
+
AustraliaLindeman: "Australia/Lindeman",
|
|
2085
|
+
AustraliaLordHowe: "Australia/Lord_Howe",
|
|
2086
|
+
AustraliaMelbourne: "Australia/Melbourne",
|
|
2087
|
+
AustraliaPerth: "Australia/Perth",
|
|
2088
|
+
AustraliaSydney: "Australia/Sydney",
|
|
2089
|
+
EuropeAndorra: "Europe/Andorra",
|
|
2090
|
+
EuropeAstrakhan: "Europe/Astrakhan",
|
|
2091
|
+
EuropeAthens: "Europe/Athens",
|
|
2092
|
+
EuropeBelgrade: "Europe/Belgrade",
|
|
2093
|
+
EuropeBerlin: "Europe/Berlin",
|
|
2094
|
+
EuropeBrussels: "Europe/Brussels",
|
|
2095
|
+
EuropeBucharest: "Europe/Bucharest",
|
|
2096
|
+
EuropeBudapest: "Europe/Budapest",
|
|
2097
|
+
EuropeChisinau: "Europe/Chisinau",
|
|
2098
|
+
EuropeDublin: "Europe/Dublin",
|
|
2099
|
+
EuropeGibraltar: "Europe/Gibraltar",
|
|
2100
|
+
EuropeHelsinki: "Europe/Helsinki",
|
|
2101
|
+
EuropeIstanbul: "Europe/Istanbul",
|
|
2102
|
+
EuropeKaliningrad: "Europe/Kaliningrad",
|
|
2103
|
+
EuropeKirov: "Europe/Kirov",
|
|
2104
|
+
EuropeKyiv: "Europe/Kyiv",
|
|
2105
|
+
EuropeLisbon: "Europe/Lisbon",
|
|
2106
|
+
EuropeLondon: "Europe/London",
|
|
2107
|
+
EuropeMadrid: "Europe/Madrid",
|
|
2108
|
+
EuropeMalta: "Europe/Malta",
|
|
2109
|
+
EuropeMinsk: "Europe/Minsk",
|
|
2110
|
+
EuropeMoscow: "Europe/Moscow",
|
|
2111
|
+
EuropeParis: "Europe/Paris",
|
|
2112
|
+
EuropePrague: "Europe/Prague",
|
|
2113
|
+
EuropeRiga: "Europe/Riga",
|
|
2114
|
+
EuropeRome: "Europe/Rome",
|
|
2115
|
+
EuropeSamara: "Europe/Samara",
|
|
2116
|
+
EuropeSaratov: "Europe/Saratov",
|
|
2117
|
+
EuropeSimferopol: "Europe/Simferopol",
|
|
2118
|
+
EuropeSofia: "Europe/Sofia",
|
|
2119
|
+
EuropeTallinn: "Europe/Tallinn",
|
|
2120
|
+
EuropeTirane: "Europe/Tirane",
|
|
2121
|
+
EuropeUlyanovsk: "Europe/Ulyanovsk",
|
|
2122
|
+
EuropeVienna: "Europe/Vienna",
|
|
2123
|
+
EuropeVilnius: "Europe/Vilnius",
|
|
2124
|
+
EuropeVolgograd: "Europe/Volgograd",
|
|
2125
|
+
EuropeWarsaw: "Europe/Warsaw",
|
|
2126
|
+
EuropeZurich: "Europe/Zurich",
|
|
2127
|
+
IndianChagos: "Indian/Chagos",
|
|
2128
|
+
IndianMaldives: "Indian/Maldives",
|
|
2129
|
+
IndianMauritius: "Indian/Mauritius",
|
|
2130
|
+
PacificApia: "Pacific/Apia",
|
|
2131
|
+
PacificAuckland: "Pacific/Auckland",
|
|
2132
|
+
PacificBougainville: "Pacific/Bougainville",
|
|
2133
|
+
PacificChatham: "Pacific/Chatham",
|
|
2134
|
+
PacificEaster: "Pacific/Easter",
|
|
2135
|
+
PacificEfate: "Pacific/Efate",
|
|
2136
|
+
PacificFakaofo: "Pacific/Fakaofo",
|
|
2137
|
+
PacificFiji: "Pacific/Fiji",
|
|
2138
|
+
PacificGalapagos: "Pacific/Galapagos",
|
|
2139
|
+
PacificGambier: "Pacific/Gambier",
|
|
2140
|
+
PacificGuadalcanal: "Pacific/Guadalcanal",
|
|
2141
|
+
PacificGuam: "Pacific/Guam",
|
|
2142
|
+
PacificHonolulu: "Pacific/Honolulu",
|
|
2143
|
+
PacificKanton: "Pacific/Kanton",
|
|
2144
|
+
PacificKiritimati: "Pacific/Kiritimati",
|
|
2145
|
+
PacificKosrae: "Pacific/Kosrae",
|
|
2146
|
+
PacificKwajalein: "Pacific/Kwajalein",
|
|
2147
|
+
PacificMarquesas: "Pacific/Marquesas",
|
|
2148
|
+
PacificNauru: "Pacific/Nauru",
|
|
2149
|
+
PacificNiue: "Pacific/Niue",
|
|
2150
|
+
PacificNorfolk: "Pacific/Norfolk",
|
|
2151
|
+
PacificNoumea: "Pacific/Noumea",
|
|
2152
|
+
PacificPagoPago: "Pacific/Pago_Pago",
|
|
2153
|
+
PacificPalau: "Pacific/Palau",
|
|
2154
|
+
PacificPitcairn: "Pacific/Pitcairn",
|
|
2155
|
+
PacificPortMoresby: "Pacific/Port_Moresby",
|
|
2156
|
+
PacificRarotonga: "Pacific/Rarotonga",
|
|
2157
|
+
PacificTahiti: "Pacific/Tahiti",
|
|
2158
|
+
PacificTarawa: "Pacific/Tarawa",
|
|
2159
|
+
PacificTongatapu: "Pacific/Tongatapu"
|
|
2160
|
+
};
|
|
2161
|
+
var Locales = {
|
|
2162
|
+
/** Portuguese */
|
|
2163
|
+
Pt: "pt",
|
|
2164
|
+
/** Portuguese (Brazil) */
|
|
2165
|
+
PtBR: "pt-BR",
|
|
2166
|
+
/** Portuguese (Portugal) */
|
|
2167
|
+
PtPT: "pt-PT",
|
|
2168
|
+
/** English */
|
|
2169
|
+
En: "en",
|
|
2170
|
+
/** English (United States) */
|
|
2171
|
+
EnUS: "en-US",
|
|
2172
|
+
/** English (United Kingdom) */
|
|
2173
|
+
EnGB: "en-GB",
|
|
2174
|
+
/** English (Canada) */
|
|
2175
|
+
EnCA: "en-CA",
|
|
2176
|
+
/** English (Australia) */
|
|
2177
|
+
EnAU: "en-AU",
|
|
2178
|
+
/** English (India) */
|
|
2179
|
+
EnIN: "en-IN",
|
|
2180
|
+
/** Spanish */
|
|
2181
|
+
Es: "es",
|
|
2182
|
+
/** Spanish (Spain) */
|
|
2183
|
+
EsES: "es-ES",
|
|
2184
|
+
/** Spanish (Mexico) */
|
|
2185
|
+
EsMX: "es-MX",
|
|
2186
|
+
/** Spanish (Argentina) */
|
|
2187
|
+
EsAR: "es-AR",
|
|
2188
|
+
/** Spanish (Colombia) */
|
|
2189
|
+
EsCO: "es-CO",
|
|
2190
|
+
/** Spanish (Chile) */
|
|
2191
|
+
EsCL: "es-CL",
|
|
2192
|
+
/** Spanish (Latin America) */
|
|
2193
|
+
Es419: "es-419",
|
|
2194
|
+
/** French */
|
|
2195
|
+
Fr: "fr",
|
|
2196
|
+
/** French (France) */
|
|
2197
|
+
FrFR: "fr-FR",
|
|
2198
|
+
/** French (Canada) */
|
|
2199
|
+
FrCA: "fr-CA",
|
|
2200
|
+
/** German */
|
|
2201
|
+
De: "de",
|
|
2202
|
+
/** German (Germany) */
|
|
2203
|
+
DeDE: "de-DE",
|
|
2204
|
+
/** Italian */
|
|
2205
|
+
It: "it",
|
|
2206
|
+
/** Dutch */
|
|
2207
|
+
Nl: "nl",
|
|
2208
|
+
/** Polish */
|
|
2209
|
+
Pl: "pl",
|
|
2210
|
+
/** Russian */
|
|
2211
|
+
Ru: "ru",
|
|
2212
|
+
/** Ukrainian */
|
|
2213
|
+
Uk: "uk",
|
|
2214
|
+
/** Turkish */
|
|
2215
|
+
Tr: "tr",
|
|
2216
|
+
/** Arabic */
|
|
2217
|
+
Ar: "ar",
|
|
2218
|
+
/** Hebrew */
|
|
2219
|
+
He: "he",
|
|
2220
|
+
/** Hindi */
|
|
2221
|
+
Hi: "hi",
|
|
2222
|
+
/** Japanese */
|
|
2223
|
+
Ja: "ja",
|
|
2224
|
+
/** Korean */
|
|
2225
|
+
Ko: "ko",
|
|
2226
|
+
/** Chinese */
|
|
2227
|
+
Zh: "zh",
|
|
2228
|
+
/** Chinese (China) */
|
|
2229
|
+
ZhCN: "zh-CN",
|
|
2230
|
+
/** Chinese (Taiwan) */
|
|
2231
|
+
ZhTW: "zh-TW",
|
|
2232
|
+
/** Chinese (Simplified) */
|
|
2233
|
+
ZhHans: "zh-Hans",
|
|
2234
|
+
/** Chinese (Traditional) */
|
|
2235
|
+
ZhHant: "zh-Hant",
|
|
2236
|
+
/** Indonesian */
|
|
2237
|
+
Id: "id",
|
|
2238
|
+
/** Vietnamese */
|
|
2239
|
+
Vi: "vi",
|
|
2240
|
+
/** Thai */
|
|
2241
|
+
Th: "th",
|
|
2242
|
+
/** Swedish */
|
|
2243
|
+
Sv: "sv",
|
|
2244
|
+
/** Danish */
|
|
2245
|
+
Da: "da",
|
|
2246
|
+
/** Norwegian Bokmål */
|
|
2247
|
+
Nb: "nb",
|
|
2248
|
+
/** Finnish */
|
|
2249
|
+
Fi: "fi",
|
|
2250
|
+
/** Czech */
|
|
2251
|
+
Cs: "cs",
|
|
2252
|
+
/** Greek */
|
|
2253
|
+
El: "el",
|
|
2254
|
+
/** Romanian */
|
|
2255
|
+
Ro: "ro",
|
|
2256
|
+
/** Hungarian */
|
|
2257
|
+
Hu: "hu"
|
|
2258
|
+
};
|
|
1804
2259
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1805
2260
|
0 && (module.exports = {
|
|
1806
2261
|
AuthyonAbility,
|
|
@@ -1811,12 +2266,14 @@ var SubtenantPermissions = {
|
|
|
1811
2266
|
AuthyonSessionController,
|
|
1812
2267
|
ErrorCodes,
|
|
1813
2268
|
FetchHttpAdapter,
|
|
2269
|
+
Locales,
|
|
1814
2270
|
LoggingHttpAdapter,
|
|
1815
2271
|
SubtenantPermissions,
|
|
1816
2272
|
TENANT_FILTER_MAX_DEPTH,
|
|
1817
2273
|
TENANT_FILTER_MAX_VALUES,
|
|
1818
2274
|
TENANT_FILTER_MAX_VALUE_LENGTH,
|
|
1819
2275
|
TenantPermissions,
|
|
2276
|
+
TimeZones,
|
|
1820
2277
|
createAuthyonAbility,
|
|
1821
2278
|
createAuthyonRules,
|
|
1822
2279
|
createClient,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-
|
|
2
|
-
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as AcceptTenantInviteInput, i as Activity, j as Approval, k as ApprovalAssurance, l as ApprovalPayload, m as ApprovalStatus, n as ApprovalWebAuthnOptions, o as AuthEvent, p as AuthState, q as AuthStateListener, r as AuthenticatorSetup, s as AuthyonAbility, t as AuthyonAbilityBuilder, u as AuthyonAbilityOptions, v as AuthyonClientOptions, w as AuthyonPermissionSource, x as AuthyonSessionController, C as ConfirmApprovalInput, y as CreateOrganizationInput, z as CreateTenantInput, F as FetchHttpAdapter, B as HttpAdapterRequest, D as HttpLogEvent, E as HttpLogger, I as IntrospectResult, G as InviteMemberInput, L as
|
|
1
|
+
import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-CJSA2QWi.cjs';
|
|
2
|
+
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as AcceptTenantInviteInput, i as Activity, j as Approval, k as ApprovalAssurance, l as ApprovalPayload, m as ApprovalStatus, n as ApprovalWebAuthnOptions, o as AuthEvent, p as AuthState, q as AuthStateListener, r as AuthenticatorSetup, s as AuthyonAbility, t as AuthyonAbilityBuilder, u as AuthyonAbilityOptions, v as AuthyonClientOptions, w as AuthyonPermissionSource, x as AuthyonSessionController, C as ConfirmApprovalInput, y as CreateOrganizationInput, z as CreateTenantInput, F as FetchHttpAdapter, B as HttpAdapterRequest, D as HttpLogEvent, E as HttpLogger, I as IntrospectResult, G as InviteMemberInput, L as Locale, J as Locales, K as LoggingHttpAdapter, M as LoginInput, N as LoginResult, O as MemberListOptions, P as Organization, Q as OrganizationInvite, R as OrganizationInviteAccepted, S as OrganizationInviteInput, U as OrganizationInviteIssued, V as OrganizationInvitePreview, W as OrganizationInviteStatus, X as OrganizationMember, Y as Paged, Z as PaginationOptions, _ as PasswordResetCompleted, $ as PasswordResetPreview, a0 as PasswordResetRequestOptions, a1 as PermissionFilterOptions, a2 as PermissionGroup, a3 as RegisterInput, a4 as Role, a5 as SecurityMethods, a6 as Session, a7 as SessionControllerOptions, a8 as SessionInfo, a9 as SessionSnapshot, aa as SessionSnapshotListener, ab as SessionStatus, ac as SsoProvider, ad as SubOrganization, ae as SubOrganizationListOptions, af as SubTenant, ag as SubTenantListOptions, ah as SubjectApprovals, ai as SubjectSecurity, aj as Tenant, ak as TenantInvite, al as TenantInviteAccepted, am as TenantInviteInput, an as TenantInviteIssued, ao as TenantInvitePreview, ap as TenantInviteStatus, aq as TenantListParams, ar as TenantMember, as as TenantOrder, at as TenantOrderField, au as TenantParent, av as TimeZone, aw as TimeZones, ax as TwoFactorChallenge, ay as TwoFactorMethod, az as TwoFactorStatus, aA as User, aB as UserPreferences, aC as ValidateResult, aD as VerifyTwoFactorInput, aE as WebAuthnAssertion, aF as WebAuthnCeremonyStart, aG as WebAuthnCredential, aH as createAuthyonAbility, aI as createAuthyonRules, aJ as createClient, aK as hasPermission, aL as hasPermissionGroup } from './ability-CJSA2QWi.cjs';
|
|
3
3
|
|
|
4
4
|
declare const ErrorCodes: {
|
|
5
5
|
readonly Unknown: "unknown";
|
|
@@ -29,6 +29,10 @@ declare const ErrorCodes: {
|
|
|
29
29
|
readonly ApprovalNotFound: "authorization_not_found";
|
|
30
30
|
readonly SessionRevoked: "session_revoked";
|
|
31
31
|
readonly TwoFactorTooManyFailures: "user.2fa.too_many_failures";
|
|
32
|
+
/** Not an IANA time zone the API knows. See `TimeZones`. */
|
|
33
|
+
readonly PreferencesTimeZoneInvalid: "preferences.time_zone.invalid";
|
|
34
|
+
/** Not a well-formed BCP 47 tag. See `Locales`. */
|
|
35
|
+
readonly PreferencesLocaleInvalid: "preferences.locale.invalid";
|
|
32
36
|
};
|
|
33
37
|
type KnownErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
34
38
|
type AuthyonErrorCategory = "network" | "timeout" | "authentication" | "authorization" | "validation" | "not_found" | "conflict" | "rate_limit" | "server" | "unknown";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-
|
|
2
|
-
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as AcceptTenantInviteInput, i as Activity, j as Approval, k as ApprovalAssurance, l as ApprovalPayload, m as ApprovalStatus, n as ApprovalWebAuthnOptions, o as AuthEvent, p as AuthState, q as AuthStateListener, r as AuthenticatorSetup, s as AuthyonAbility, t as AuthyonAbilityBuilder, u as AuthyonAbilityOptions, v as AuthyonClientOptions, w as AuthyonPermissionSource, x as AuthyonSessionController, C as ConfirmApprovalInput, y as CreateOrganizationInput, z as CreateTenantInput, F as FetchHttpAdapter, B as HttpAdapterRequest, D as HttpLogEvent, E as HttpLogger, I as IntrospectResult, G as InviteMemberInput, L as
|
|
1
|
+
import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-CJSA2QWi.js';
|
|
2
|
+
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as AcceptTenantInviteInput, i as Activity, j as Approval, k as ApprovalAssurance, l as ApprovalPayload, m as ApprovalStatus, n as ApprovalWebAuthnOptions, o as AuthEvent, p as AuthState, q as AuthStateListener, r as AuthenticatorSetup, s as AuthyonAbility, t as AuthyonAbilityBuilder, u as AuthyonAbilityOptions, v as AuthyonClientOptions, w as AuthyonPermissionSource, x as AuthyonSessionController, C as ConfirmApprovalInput, y as CreateOrganizationInput, z as CreateTenantInput, F as FetchHttpAdapter, B as HttpAdapterRequest, D as HttpLogEvent, E as HttpLogger, I as IntrospectResult, G as InviteMemberInput, L as Locale, J as Locales, K as LoggingHttpAdapter, M as LoginInput, N as LoginResult, O as MemberListOptions, P as Organization, Q as OrganizationInvite, R as OrganizationInviteAccepted, S as OrganizationInviteInput, U as OrganizationInviteIssued, V as OrganizationInvitePreview, W as OrganizationInviteStatus, X as OrganizationMember, Y as Paged, Z as PaginationOptions, _ as PasswordResetCompleted, $ as PasswordResetPreview, a0 as PasswordResetRequestOptions, a1 as PermissionFilterOptions, a2 as PermissionGroup, a3 as RegisterInput, a4 as Role, a5 as SecurityMethods, a6 as Session, a7 as SessionControllerOptions, a8 as SessionInfo, a9 as SessionSnapshot, aa as SessionSnapshotListener, ab as SessionStatus, ac as SsoProvider, ad as SubOrganization, ae as SubOrganizationListOptions, af as SubTenant, ag as SubTenantListOptions, ah as SubjectApprovals, ai as SubjectSecurity, aj as Tenant, ak as TenantInvite, al as TenantInviteAccepted, am as TenantInviteInput, an as TenantInviteIssued, ao as TenantInvitePreview, ap as TenantInviteStatus, aq as TenantListParams, ar as TenantMember, as as TenantOrder, at as TenantOrderField, au as TenantParent, av as TimeZone, aw as TimeZones, ax as TwoFactorChallenge, ay as TwoFactorMethod, az as TwoFactorStatus, aA as User, aB as UserPreferences, aC as ValidateResult, aD as VerifyTwoFactorInput, aE as WebAuthnAssertion, aF as WebAuthnCeremonyStart, aG as WebAuthnCredential, aH as createAuthyonAbility, aI as createAuthyonRules, aJ as createClient, aK as hasPermission, aL as hasPermissionGroup } from './ability-CJSA2QWi.js';
|
|
3
3
|
|
|
4
4
|
declare const ErrorCodes: {
|
|
5
5
|
readonly Unknown: "unknown";
|
|
@@ -29,6 +29,10 @@ declare const ErrorCodes: {
|
|
|
29
29
|
readonly ApprovalNotFound: "authorization_not_found";
|
|
30
30
|
readonly SessionRevoked: "session_revoked";
|
|
31
31
|
readonly TwoFactorTooManyFailures: "user.2fa.too_many_failures";
|
|
32
|
+
/** Not an IANA time zone the API knows. See `TimeZones`. */
|
|
33
|
+
readonly PreferencesTimeZoneInvalid: "preferences.time_zone.invalid";
|
|
34
|
+
/** Not a well-formed BCP 47 tag. See `Locales`. */
|
|
35
|
+
readonly PreferencesLocaleInvalid: "preferences.locale.invalid";
|
|
32
36
|
};
|
|
33
37
|
type KnownErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
34
38
|
type AuthyonErrorCategory = "network" | "timeout" | "authentication" | "authorization" | "validation" | "not_found" | "conflict" | "rate_limit" | "server" | "unknown";
|