@oxy.so/core 7.12.0 → 7.13.1
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/cjs/api/apps.js +1 -1
- package/dist/cjs/api/auth.js +1 -1
- package/dist/cjs/api/billing.js +4 -3
- package/dist/cjs/api/devices.js +5 -4
- package/dist/cjs/api/follows.js +12 -10
- package/dist/cjs/api/privacy.js +8 -7
- package/dist/cjs/api/session.js +10 -7
- package/dist/cjs/api/topics.js +4 -3
- package/dist/cjs/api/users.js +5 -4
- package/dist/cjs/i18n/locales/compact/es-ES.generated.js +1 -1
- package/dist/cjs/i18n/locales/en-US.js +38 -15
- package/dist/cjs/i18n/locales/es-ES.js +38 -15
- package/dist/cjs/utils/identityCacheSweep.js +9 -1
- package/dist/esm/api/apps.js +1 -1
- package/dist/esm/api/auth.js +1 -1
- package/dist/esm/api/billing.js +4 -3
- package/dist/esm/api/devices.js +5 -4
- package/dist/esm/api/follows.js +12 -10
- package/dist/esm/api/privacy.js +8 -7
- package/dist/esm/api/session.js +10 -7
- package/dist/esm/api/topics.js +4 -3
- package/dist/esm/api/users.js +6 -5
- package/dist/esm/i18n/locales/compact/es-ES.generated.js +1 -1
- package/dist/esm/i18n/locales/en-US.js +38 -15
- package/dist/esm/i18n/locales/es-ES.js +38 -15
- package/dist/esm/utils/identityCacheSweep.js +8 -1
- package/dist/types/i18n/locales/en-US.d.ts +35 -12
- package/dist/types/i18n/locales/es-ES.d.ts +35 -12
- package/dist/types/utils/identityCacheSweep.d.ts +5 -0
- package/package.json +2 -2
- package/src/api/apps.ts +1 -1
- package/src/api/auth.ts +9 -4
- package/src/api/billing.ts +12 -5
- package/src/api/devices.ts +6 -4
- package/src/api/follows.ts +21 -10
- package/src/api/privacy.ts +9 -7
- package/src/api/session.ts +18 -9
- package/src/api/topics.ts +5 -3
- package/src/api/users.ts +11 -5
- package/src/i18n/locales/compact/es-ES.generated.ts +1 -1
- package/src/i18n/locales/en-US.ts +39 -15
- package/src/i18n/locales/es-ES.ts +40 -15
- package/src/utils/identityCacheSweep.ts +9 -1
|
@@ -182,6 +182,9 @@ const dict = {
|
|
|
182
182
|
requestExpired: 'This sign-in expired. Send a new email.',
|
|
183
183
|
secondFactorInvalid: "That code isn't right. Try the current one.",
|
|
184
184
|
originNotAllowed: "Sign-in isn't available here.",
|
|
185
|
+
network: "Couldn't reach Oxy. Check your connection and try again.",
|
|
186
|
+
invalidInput: "Something you entered isn't valid. Check it and try again.",
|
|
187
|
+
server: "Oxy couldn't finish this right now. Try again in a moment.",
|
|
185
188
|
generic: 'Something went wrong. Please try again.',
|
|
186
189
|
},
|
|
187
190
|
subtitleToApp: 'to continue to {{app}}',
|
|
@@ -247,6 +250,32 @@ const dict = {
|
|
|
247
250
|
'It expired or was already used. Ask for a new email in the app, or type the code from the latest one.',
|
|
248
251
|
},
|
|
249
252
|
},
|
|
253
|
+
actionErrors: {
|
|
254
|
+
updateProfile: "Couldn't update your profile. Please try again.",
|
|
255
|
+
uploadAvatar: "Couldn't upload the picture. Please try again.",
|
|
256
|
+
updateSettings: "Couldn't save your settings. Please try again.",
|
|
257
|
+
updatePrivacy: "Couldn't save your privacy settings. Please try again.",
|
|
258
|
+
updateNotifications: "Couldn't save your notification preferences. Please try again.",
|
|
259
|
+
updatePreferences: "Couldn't save your preferences. Please try again.",
|
|
260
|
+
revokeConnectedApp: "Couldn't disconnect the app. Please try again.",
|
|
261
|
+
switchSession: "Couldn't switch accounts. Please try again.",
|
|
262
|
+
logout: "Couldn't sign out. Please try again.",
|
|
263
|
+
logoutAll: "Couldn't sign out everywhere. Please try again.",
|
|
264
|
+
updateDeviceName: "Couldn't rename the device. Please try again.",
|
|
265
|
+
removeDevice: "Couldn't remove the device. Please try again.",
|
|
266
|
+
},
|
|
267
|
+
usernamePolicy: {
|
|
268
|
+
hint: 'Letters, numbers, - and _. No spaces.',
|
|
269
|
+
required: 'Choose a username.',
|
|
270
|
+
tooShort: 'Use at least {{min}} characters.',
|
|
271
|
+
tooLong: 'Use at most {{max}} characters.',
|
|
272
|
+
noSpaces: "Usernames can't contain spaces. Use - or _ instead.",
|
|
273
|
+
characters:
|
|
274
|
+
'Use only letters, numbers, - and _. Start and end with a letter or number, and never put two of - or _ together.',
|
|
275
|
+
onlyNumbers: "A username can't be only numbers. Add a letter.",
|
|
276
|
+
reserved: 'That username is reserved. Choose another one.',
|
|
277
|
+
mustEndInBot: 'A bot account’s username must end in “bot”.',
|
|
278
|
+
},
|
|
250
279
|
signup: {
|
|
251
280
|
title: 'Create your account',
|
|
252
281
|
subtitle: 'Choose your username. Then we confirm your email.',
|
|
@@ -255,7 +284,6 @@ const dict = {
|
|
|
255
284
|
username: {
|
|
256
285
|
label: 'Username',
|
|
257
286
|
placeholder: 'yourname',
|
|
258
|
-
required: 'Choose a username.',
|
|
259
287
|
taken: 'That username is taken.',
|
|
260
288
|
},
|
|
261
289
|
email: {
|
|
@@ -304,7 +332,6 @@ const dict = {
|
|
|
304
332
|
firstPlaceholder: 'Your first name',
|
|
305
333
|
lastLabel: 'Last name',
|
|
306
334
|
lastPlaceholder: 'Your last name',
|
|
307
|
-
saveFailed: 'Could not save your name',
|
|
308
335
|
},
|
|
309
336
|
avatar: {
|
|
310
337
|
title: 'Make It Yours',
|
|
@@ -632,8 +659,6 @@ const dict = {
|
|
|
632
659
|
label: 'Username',
|
|
633
660
|
placeholder: 'Choose a username',
|
|
634
661
|
choose: 'Choose a username',
|
|
635
|
-
required: 'Username is required',
|
|
636
|
-
tooShort: 'Username must be at least 3 characters',
|
|
637
662
|
},
|
|
638
663
|
email: {
|
|
639
664
|
title: 'Email',
|
|
@@ -1300,7 +1325,7 @@ const dict = {
|
|
|
1300
1325
|
rules: {
|
|
1301
1326
|
title: 'Username rules',
|
|
1302
1327
|
content:
|
|
1303
|
-
'Usernames
|
|
1328
|
+
'Usernames are 3 to 30 characters long and use letters, numbers, hyphens (-) and underscores (_). They start and end with a letter or number, never put two of - or _ together, and are not only numbers. Spaces are not allowed. Capital letters are kept as you type them, but Alice and alice are the same username.',
|
|
1304
1329
|
},
|
|
1305
1330
|
unique: {
|
|
1306
1331
|
title: 'Why must it be unique?',
|
|
@@ -1892,9 +1917,6 @@ const dict = {
|
|
|
1892
1917
|
label: 'Username',
|
|
1893
1918
|
available: 'Username is available',
|
|
1894
1919
|
taken: 'Username is taken',
|
|
1895
|
-
tooShort: 'Username must be at least 3 characters',
|
|
1896
|
-
invalidChars: 'Only letters, numbers, hyphens, and underscores',
|
|
1897
|
-
mustEndInBot: 'A bot account’s username must end in “bot”',
|
|
1898
1920
|
checkFailed: 'Could not check availability',
|
|
1899
1921
|
},
|
|
1900
1922
|
accountCategory: {
|
|
@@ -1929,16 +1951,15 @@ const dict = {
|
|
|
1929
1951
|
transfer: 'Transfer ownership',
|
|
1930
1952
|
},
|
|
1931
1953
|
errors: {
|
|
1932
|
-
|
|
1954
|
+
emailInvalid: 'Enter a valid email address, like name@example.com.',
|
|
1933
1955
|
missingAccount: 'No account selected.',
|
|
1934
1956
|
noPermission: 'You do not have permission to view members.',
|
|
1935
|
-
userNotFound: 'User not found',
|
|
1936
1957
|
},
|
|
1937
1958
|
invite: {
|
|
1938
|
-
title: '
|
|
1939
|
-
|
|
1959
|
+
title: 'Invite a member',
|
|
1960
|
+
emailLabel: 'Email',
|
|
1940
1961
|
roleLabel: 'Role',
|
|
1941
|
-
submit: '
|
|
1962
|
+
submit: 'Send invitation',
|
|
1942
1963
|
},
|
|
1943
1964
|
removeConfirm: {
|
|
1944
1965
|
title: 'Remove member',
|
|
@@ -1950,8 +1971,9 @@ const dict = {
|
|
|
1950
1971
|
'Transfer ownership of this account to this member? You will be demoted to admin. This cannot be undone.',
|
|
1951
1972
|
},
|
|
1952
1973
|
toasts: {
|
|
1953
|
-
|
|
1954
|
-
|
|
1974
|
+
invited: 'Invitation sent',
|
|
1975
|
+
inviteFailed: "Couldn't send the invitation. Please try again.",
|
|
1976
|
+
invitationUpdateFailed: "Couldn't update the invitation. Please try again.",
|
|
1955
1977
|
removed: 'Member removed',
|
|
1956
1978
|
removeFailed: 'Failed to remove member',
|
|
1957
1979
|
roleUpdated: 'Role updated',
|
|
@@ -2015,6 +2037,7 @@ const dict = {
|
|
|
2015
2037
|
warning:
|
|
2016
2038
|
'This action cannot be undone. Your account and all associated data will be permanently deleted.',
|
|
2017
2039
|
confirmLabel: 'Type "{{username}}" to confirm',
|
|
2040
|
+
confirmMismatch: 'That isn\'t your username. Type "{{username}}" exactly.',
|
|
2018
2041
|
confirm: 'Delete Forever',
|
|
2019
2042
|
error: 'Failed to delete account',
|
|
2020
2043
|
handoff: {
|
|
@@ -2447,6 +2470,7 @@ const dict = {
|
|
|
2447
2470
|
request: "Couldn't start the verification. Check the domain and try again.",
|
|
2448
2471
|
notYet: 'Not verified yet. Changes to DNS can take a while to show up.',
|
|
2449
2472
|
remove: "Couldn't remove the domain",
|
|
2473
|
+
invalid: 'Enter just the domain, like example.com — no https://, slashes or spaces.',
|
|
2450
2474
|
},
|
|
2451
2475
|
remove: {
|
|
2452
2476
|
title: 'Remove domain',
|
|
@@ -183,6 +183,9 @@ const dict = {
|
|
|
183
183
|
requestExpired: 'Este inicio de sesión ha caducado. Envía un email nuevo.',
|
|
184
184
|
secondFactorInvalid: 'Ese código no es correcto. Prueba con el actual.',
|
|
185
185
|
originNotAllowed: 'Aquí no se puede iniciar sesión.',
|
|
186
|
+
network: 'No se ha podido conectar con Oxy. Comprueba tu conexión e inténtalo de nuevo.',
|
|
187
|
+
invalidInput: 'Algo de lo que has escrito no es válido. Revísalo e inténtalo de nuevo.',
|
|
188
|
+
server: 'Oxy no ha podido terminar esto ahora. Inténtalo de nuevo en un momento.',
|
|
186
189
|
generic: 'Algo ha ido mal. Inténtalo de nuevo.',
|
|
187
190
|
},
|
|
188
191
|
subtitleToApp: 'para continuar en {{app}}',
|
|
@@ -249,6 +252,33 @@ const dict = {
|
|
|
249
252
|
'Ha caducado o ya se ha usado. Pide un email nuevo en la app o escribe el código del último.',
|
|
250
253
|
},
|
|
251
254
|
},
|
|
255
|
+
actionErrors: {
|
|
256
|
+
updateProfile: 'No se ha podido actualizar tu perfil. Inténtalo de nuevo.',
|
|
257
|
+
uploadAvatar: 'No se ha podido subir la foto. Inténtalo de nuevo.',
|
|
258
|
+
updateSettings: 'No se han podido guardar tus ajustes. Inténtalo de nuevo.',
|
|
259
|
+
updatePrivacy: 'No se han podido guardar tus ajustes de privacidad. Inténtalo de nuevo.',
|
|
260
|
+
updateNotifications:
|
|
261
|
+
'No se han podido guardar tus preferencias de notificaciones. Inténtalo de nuevo.',
|
|
262
|
+
updatePreferences: 'No se han podido guardar tus preferencias. Inténtalo de nuevo.',
|
|
263
|
+
revokeConnectedApp: 'No se ha podido desconectar la app. Inténtalo de nuevo.',
|
|
264
|
+
switchSession: 'No se ha podido cambiar de cuenta. Inténtalo de nuevo.',
|
|
265
|
+
logout: 'No se ha podido cerrar la sesión. Inténtalo de nuevo.',
|
|
266
|
+
logoutAll: 'No se ha podido cerrar la sesión en todas partes. Inténtalo de nuevo.',
|
|
267
|
+
updateDeviceName: 'No se ha podido cambiar el nombre del dispositivo. Inténtalo de nuevo.',
|
|
268
|
+
removeDevice: 'No se ha podido quitar el dispositivo. Inténtalo de nuevo.',
|
|
269
|
+
},
|
|
270
|
+
usernamePolicy: {
|
|
271
|
+
hint: 'Letras, números, - y _. Sin espacios.',
|
|
272
|
+
required: 'Elige un nombre de usuario.',
|
|
273
|
+
tooShort: 'Usa al menos {{min}} caracteres.',
|
|
274
|
+
tooLong: 'Usa como máximo {{max}} caracteres.',
|
|
275
|
+
noSpaces: 'El nombre de usuario no puede tener espacios. Usa - o _ en su lugar.',
|
|
276
|
+
characters:
|
|
277
|
+
'Usa solo letras, números, - y _. Empieza y termina con una letra o un número, y no pongas dos - o _ seguidos.',
|
|
278
|
+
onlyNumbers: 'El nombre de usuario no puede ser solo números. Añade una letra.',
|
|
279
|
+
reserved: 'Ese nombre de usuario está reservado. Elige otro.',
|
|
280
|
+
mustEndInBot: 'El nombre de usuario de una cuenta bot debe terminar en «bot».',
|
|
281
|
+
},
|
|
252
282
|
signup: {
|
|
253
283
|
title: 'Crea tu cuenta',
|
|
254
284
|
subtitle: 'Elige tu nombre de usuario. Después confirmamos tu email.',
|
|
@@ -257,7 +287,6 @@ const dict = {
|
|
|
257
287
|
username: {
|
|
258
288
|
label: 'Nombre de usuario',
|
|
259
289
|
placeholder: 'tunombre',
|
|
260
|
-
required: 'Elige un nombre de usuario.',
|
|
261
290
|
taken: 'Ese nombre de usuario ya está en uso.',
|
|
262
291
|
},
|
|
263
292
|
email: {
|
|
@@ -332,8 +361,6 @@ const dict = {
|
|
|
332
361
|
label: 'Usuario',
|
|
333
362
|
placeholder: 'Elige un usuario',
|
|
334
363
|
choose: 'Elige un usuario',
|
|
335
|
-
required: 'El usuario es obligatorio',
|
|
336
|
-
tooShort: 'El usuario debe tener al menos 3 caracteres',
|
|
337
364
|
},
|
|
338
365
|
email: {
|
|
339
366
|
title: 'Correo electrónico',
|
|
@@ -942,7 +969,6 @@ const dict = {
|
|
|
942
969
|
firstPlaceholder: 'Tu nombre',
|
|
943
970
|
lastLabel: 'Apellidos',
|
|
944
971
|
lastPlaceholder: 'Tus apellidos',
|
|
945
|
-
saveFailed: 'No se pudo guardar tu nombre',
|
|
946
972
|
},
|
|
947
973
|
avatar: {
|
|
948
974
|
title: 'Hazlo tuyo',
|
|
@@ -1306,7 +1332,7 @@ const dict = {
|
|
|
1306
1332
|
rules: {
|
|
1307
1333
|
title: 'Reglas del nombre de usuario',
|
|
1308
1334
|
content:
|
|
1309
|
-
'Los nombres de usuario
|
|
1335
|
+
'Los nombres de usuario tienen entre 3 y 30 caracteres y usan letras, números, guiones (-) y guiones bajos (_). Empiezan y terminan con una letra o un número, nunca llevan dos - o _ seguidos y no son solo números. No se permiten espacios. Las mayúsculas se guardan tal como las escribes, pero Alicia y alicia son el mismo nombre de usuario.',
|
|
1310
1336
|
},
|
|
1311
1337
|
unique: {
|
|
1312
1338
|
title: '¿Por qué debe ser único?',
|
|
@@ -1901,9 +1927,6 @@ const dict = {
|
|
|
1901
1927
|
label: 'Nombre de usuario',
|
|
1902
1928
|
available: 'El nombre de usuario está disponible',
|
|
1903
1929
|
taken: 'El nombre de usuario ya está en uso',
|
|
1904
|
-
tooShort: 'El nombre de usuario debe tener al menos 3 caracteres',
|
|
1905
|
-
invalidChars: 'Solo letras, números, guiones y guiones bajos',
|
|
1906
|
-
mustEndInBot: 'El nombre de usuario de una cuenta de bot debe terminar en “bot”',
|
|
1907
1930
|
checkFailed: 'No se pudo comprobar la disponibilidad',
|
|
1908
1931
|
},
|
|
1909
1932
|
accountCategory: {
|
|
@@ -1938,16 +1961,15 @@ const dict = {
|
|
|
1938
1961
|
transfer: 'Transferir propiedad',
|
|
1939
1962
|
},
|
|
1940
1963
|
errors: {
|
|
1941
|
-
|
|
1964
|
+
emailInvalid: 'Introduce un email válido, como nombre@ejemplo.com.',
|
|
1942
1965
|
missingAccount: 'Ninguna cuenta seleccionada.',
|
|
1943
1966
|
noPermission: 'No tienes permiso para ver los miembros.',
|
|
1944
|
-
userNotFound: 'Usuario no encontrado',
|
|
1945
1967
|
},
|
|
1946
1968
|
invite: {
|
|
1947
|
-
title: '
|
|
1948
|
-
|
|
1969
|
+
title: 'Invitar a un miembro',
|
|
1970
|
+
emailLabel: 'Email',
|
|
1949
1971
|
roleLabel: 'Rol',
|
|
1950
|
-
submit: '
|
|
1972
|
+
submit: 'Enviar invitación',
|
|
1951
1973
|
},
|
|
1952
1974
|
removeConfirm: {
|
|
1953
1975
|
title: 'Eliminar miembro',
|
|
@@ -1959,8 +1981,9 @@ const dict = {
|
|
|
1959
1981
|
'¿Transferir la propiedad de esta cuenta a este miembro? Pasarás a ser administrador. Esto no se puede deshacer.',
|
|
1960
1982
|
},
|
|
1961
1983
|
toasts: {
|
|
1962
|
-
|
|
1963
|
-
|
|
1984
|
+
invited: 'Invitación enviada',
|
|
1985
|
+
inviteFailed: 'No se ha podido enviar la invitación. Inténtalo de nuevo.',
|
|
1986
|
+
invitationUpdateFailed: 'No se ha podido actualizar la invitación. Inténtalo de nuevo.',
|
|
1964
1987
|
removed: 'Miembro eliminado',
|
|
1965
1988
|
removeFailed: 'No se pudo eliminar el miembro',
|
|
1966
1989
|
roleUpdated: 'Rol actualizado',
|
|
@@ -2024,6 +2047,7 @@ const dict = {
|
|
|
2024
2047
|
warning:
|
|
2025
2048
|
'Esta acción no se puede deshacer. Tu cuenta y todos los datos asociados se eliminarán de forma permanente.',
|
|
2026
2049
|
confirmLabel: 'Escribe "{{username}}" para confirmar',
|
|
2050
|
+
confirmMismatch: 'Ese no es tu nombre de usuario. Escribe "{{username}}" exactamente.',
|
|
2027
2051
|
confirm: 'Eliminar para siempre',
|
|
2028
2052
|
error: 'No se pudo eliminar la cuenta',
|
|
2029
2053
|
handoff: {
|
|
@@ -2459,6 +2483,7 @@ const dict = {
|
|
|
2459
2483
|
request: 'No se pudo empezar la verificación. Revisa el dominio e inténtalo otra vez.',
|
|
2460
2484
|
notYet: 'Aún no está verificado. Los cambios de DNS pueden tardar en aparecer.',
|
|
2461
2485
|
remove: 'No se pudo quitar el dominio',
|
|
2486
|
+
invalid: 'Escribe solo el dominio, como ejemplo.com, sin https://, barras ni espacios.',
|
|
2462
2487
|
},
|
|
2463
2488
|
remove: {
|
|
2464
2489
|
title: 'Quitar dominio',
|
|
@@ -74,12 +74,20 @@ export const OXY_IDENTITY_CACHE_PREFIXES: readonly string[] = [
|
|
|
74
74
|
'GET:/profiles/resolve',
|
|
75
75
|
];
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* The path `getUserById` reads, its id encoded. Built in one place so the
|
|
79
|
+
* request and every key that evicts it cannot spell the id differently.
|
|
80
|
+
*/
|
|
81
|
+
export function oxyUserByIdPath(userId: string): string {
|
|
82
|
+
return `/users/${encodeURIComponent(userId)}`;
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
/**
|
|
78
86
|
* Build the exact cache key `getUserById` reads under. The only identity key
|
|
79
87
|
* derivable from a user id, so the only one that does not need a prefix sweep.
|
|
80
88
|
*/
|
|
81
89
|
export function oxyUserByIdCacheKey(userId: string): string {
|
|
82
|
-
return `GET
|
|
90
|
+
return `GET:${oxyUserByIdPath(userId)}`;
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
/**
|