@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
|
@@ -161,6 +161,9 @@ const dict = {
|
|
|
161
161
|
requestExpired: 'This sign-in expired. Send a new email.',
|
|
162
162
|
secondFactorInvalid: "That code isn't right. Try the current one.",
|
|
163
163
|
originNotAllowed: "Sign-in isn't available here.",
|
|
164
|
+
network: "Couldn't reach Oxy. Check your connection and try again.",
|
|
165
|
+
invalidInput: "Something you entered isn't valid. Check it and try again.",
|
|
166
|
+
server: "Oxy couldn't finish this right now. Try again in a moment.",
|
|
164
167
|
generic: 'Something went wrong. Please try again.',
|
|
165
168
|
},
|
|
166
169
|
subtitleToApp: 'to continue to {{app}}',
|
|
@@ -223,6 +226,31 @@ const dict = {
|
|
|
223
226
|
invalidDescription: 'It expired or was already used. Ask for a new email in the app, or type the code from the latest one.',
|
|
224
227
|
},
|
|
225
228
|
},
|
|
229
|
+
actionErrors: {
|
|
230
|
+
updateProfile: "Couldn't update your profile. Please try again.",
|
|
231
|
+
uploadAvatar: "Couldn't upload the picture. Please try again.",
|
|
232
|
+
updateSettings: "Couldn't save your settings. Please try again.",
|
|
233
|
+
updatePrivacy: "Couldn't save your privacy settings. Please try again.",
|
|
234
|
+
updateNotifications: "Couldn't save your notification preferences. Please try again.",
|
|
235
|
+
updatePreferences: "Couldn't save your preferences. Please try again.",
|
|
236
|
+
revokeConnectedApp: "Couldn't disconnect the app. Please try again.",
|
|
237
|
+
switchSession: "Couldn't switch accounts. Please try again.",
|
|
238
|
+
logout: "Couldn't sign out. Please try again.",
|
|
239
|
+
logoutAll: "Couldn't sign out everywhere. Please try again.",
|
|
240
|
+
updateDeviceName: "Couldn't rename the device. Please try again.",
|
|
241
|
+
removeDevice: "Couldn't remove the device. Please try again.",
|
|
242
|
+
},
|
|
243
|
+
usernamePolicy: {
|
|
244
|
+
hint: 'Letters, numbers, - and _. No spaces.',
|
|
245
|
+
required: 'Choose a username.',
|
|
246
|
+
tooShort: 'Use at least {{min}} characters.',
|
|
247
|
+
tooLong: 'Use at most {{max}} characters.',
|
|
248
|
+
noSpaces: "Usernames can't contain spaces. Use - or _ instead.",
|
|
249
|
+
characters: 'Use only letters, numbers, - and _. Start and end with a letter or number, and never put two of - or _ together.',
|
|
250
|
+
onlyNumbers: "A username can't be only numbers. Add a letter.",
|
|
251
|
+
reserved: 'That username is reserved. Choose another one.',
|
|
252
|
+
mustEndInBot: 'A bot account’s username must end in “bot”.',
|
|
253
|
+
},
|
|
226
254
|
signup: {
|
|
227
255
|
title: 'Create your account',
|
|
228
256
|
subtitle: 'Choose your username. Then we confirm your email.',
|
|
@@ -231,7 +259,6 @@ const dict = {
|
|
|
231
259
|
username: {
|
|
232
260
|
label: 'Username',
|
|
233
261
|
placeholder: 'yourname',
|
|
234
|
-
required: 'Choose a username.',
|
|
235
262
|
taken: 'That username is taken.',
|
|
236
263
|
},
|
|
237
264
|
email: {
|
|
@@ -279,7 +306,6 @@ const dict = {
|
|
|
279
306
|
firstPlaceholder: 'Your first name',
|
|
280
307
|
lastLabel: 'Last name',
|
|
281
308
|
lastPlaceholder: 'Your last name',
|
|
282
|
-
saveFailed: 'Could not save your name',
|
|
283
309
|
},
|
|
284
310
|
avatar: {
|
|
285
311
|
title: 'Make It Yours',
|
|
@@ -602,8 +628,6 @@ const dict = {
|
|
|
602
628
|
label: 'Username',
|
|
603
629
|
placeholder: 'Choose a username',
|
|
604
630
|
choose: 'Choose a username',
|
|
605
|
-
required: 'Username is required',
|
|
606
|
-
tooShort: 'Username must be at least 3 characters',
|
|
607
631
|
},
|
|
608
632
|
email: {
|
|
609
633
|
title: 'Email',
|
|
@@ -1258,7 +1282,7 @@ const dict = {
|
|
|
1258
1282
|
},
|
|
1259
1283
|
rules: {
|
|
1260
1284
|
title: 'Username rules',
|
|
1261
|
-
content: 'Usernames
|
|
1285
|
+
content: '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.',
|
|
1262
1286
|
},
|
|
1263
1287
|
unique: {
|
|
1264
1288
|
title: 'Why must it be unique?',
|
|
@@ -1837,9 +1861,6 @@ const dict = {
|
|
|
1837
1861
|
label: 'Username',
|
|
1838
1862
|
available: 'Username is available',
|
|
1839
1863
|
taken: 'Username is taken',
|
|
1840
|
-
tooShort: 'Username must be at least 3 characters',
|
|
1841
|
-
invalidChars: 'Only letters, numbers, hyphens, and underscores',
|
|
1842
|
-
mustEndInBot: 'A bot account’s username must end in “bot”',
|
|
1843
1864
|
checkFailed: 'Could not check availability',
|
|
1844
1865
|
},
|
|
1845
1866
|
accountCategory: {
|
|
@@ -1874,16 +1895,15 @@ const dict = {
|
|
|
1874
1895
|
transfer: 'Transfer ownership',
|
|
1875
1896
|
},
|
|
1876
1897
|
errors: {
|
|
1877
|
-
|
|
1898
|
+
emailInvalid: 'Enter a valid email address, like name@example.com.',
|
|
1878
1899
|
missingAccount: 'No account selected.',
|
|
1879
1900
|
noPermission: 'You do not have permission to view members.',
|
|
1880
|
-
userNotFound: 'User not found',
|
|
1881
1901
|
},
|
|
1882
1902
|
invite: {
|
|
1883
|
-
title: '
|
|
1884
|
-
|
|
1903
|
+
title: 'Invite a member',
|
|
1904
|
+
emailLabel: 'Email',
|
|
1885
1905
|
roleLabel: 'Role',
|
|
1886
|
-
submit: '
|
|
1906
|
+
submit: 'Send invitation',
|
|
1887
1907
|
},
|
|
1888
1908
|
removeConfirm: {
|
|
1889
1909
|
title: 'Remove member',
|
|
@@ -1894,8 +1914,9 @@ const dict = {
|
|
|
1894
1914
|
description: 'Transfer ownership of this account to this member? You will be demoted to admin. This cannot be undone.',
|
|
1895
1915
|
},
|
|
1896
1916
|
toasts: {
|
|
1897
|
-
|
|
1898
|
-
|
|
1917
|
+
invited: 'Invitation sent',
|
|
1918
|
+
inviteFailed: "Couldn't send the invitation. Please try again.",
|
|
1919
|
+
invitationUpdateFailed: "Couldn't update the invitation. Please try again.",
|
|
1899
1920
|
removed: 'Member removed',
|
|
1900
1921
|
removeFailed: 'Failed to remove member',
|
|
1901
1922
|
roleUpdated: 'Role updated',
|
|
@@ -1957,6 +1978,7 @@ const dict = {
|
|
|
1957
1978
|
title: 'Delete Account',
|
|
1958
1979
|
warning: 'This action cannot be undone. Your account and all associated data will be permanently deleted.',
|
|
1959
1980
|
confirmLabel: 'Type "{{username}}" to confirm',
|
|
1981
|
+
confirmMismatch: 'That isn\'t your username. Type "{{username}}" exactly.',
|
|
1960
1982
|
confirm: 'Delete Forever',
|
|
1961
1983
|
error: 'Failed to delete account',
|
|
1962
1984
|
handoff: {
|
|
@@ -2371,6 +2393,7 @@ const dict = {
|
|
|
2371
2393
|
request: "Couldn't start the verification. Check the domain and try again.",
|
|
2372
2394
|
notYet: 'Not verified yet. Changes to DNS can take a while to show up.',
|
|
2373
2395
|
remove: "Couldn't remove the domain",
|
|
2396
|
+
invalid: 'Enter just the domain, like example.com — no https://, slashes or spaces.',
|
|
2374
2397
|
},
|
|
2375
2398
|
remove: {
|
|
2376
2399
|
title: 'Remove domain',
|
|
@@ -161,6 +161,9 @@ const dict = {
|
|
|
161
161
|
requestExpired: 'Este inicio de sesión ha caducado. Envía un email nuevo.',
|
|
162
162
|
secondFactorInvalid: 'Ese código no es correcto. Prueba con el actual.',
|
|
163
163
|
originNotAllowed: 'Aquí no se puede iniciar sesión.',
|
|
164
|
+
network: 'No se ha podido conectar con Oxy. Comprueba tu conexión e inténtalo de nuevo.',
|
|
165
|
+
invalidInput: 'Algo de lo que has escrito no es válido. Revísalo e inténtalo de nuevo.',
|
|
166
|
+
server: 'Oxy no ha podido terminar esto ahora. Inténtalo de nuevo en un momento.',
|
|
164
167
|
generic: 'Algo ha ido mal. Inténtalo de nuevo.',
|
|
165
168
|
},
|
|
166
169
|
subtitleToApp: 'para continuar en {{app}}',
|
|
@@ -223,6 +226,31 @@ const dict = {
|
|
|
223
226
|
invalidDescription: 'Ha caducado o ya se ha usado. Pide un email nuevo en la app o escribe el código del último.',
|
|
224
227
|
},
|
|
225
228
|
},
|
|
229
|
+
actionErrors: {
|
|
230
|
+
updateProfile: 'No se ha podido actualizar tu perfil. Inténtalo de nuevo.',
|
|
231
|
+
uploadAvatar: 'No se ha podido subir la foto. Inténtalo de nuevo.',
|
|
232
|
+
updateSettings: 'No se han podido guardar tus ajustes. Inténtalo de nuevo.',
|
|
233
|
+
updatePrivacy: 'No se han podido guardar tus ajustes de privacidad. Inténtalo de nuevo.',
|
|
234
|
+
updateNotifications: 'No se han podido guardar tus preferencias de notificaciones. Inténtalo de nuevo.',
|
|
235
|
+
updatePreferences: 'No se han podido guardar tus preferencias. Inténtalo de nuevo.',
|
|
236
|
+
revokeConnectedApp: 'No se ha podido desconectar la app. Inténtalo de nuevo.',
|
|
237
|
+
switchSession: 'No se ha podido cambiar de cuenta. Inténtalo de nuevo.',
|
|
238
|
+
logout: 'No se ha podido cerrar la sesión. Inténtalo de nuevo.',
|
|
239
|
+
logoutAll: 'No se ha podido cerrar la sesión en todas partes. Inténtalo de nuevo.',
|
|
240
|
+
updateDeviceName: 'No se ha podido cambiar el nombre del dispositivo. Inténtalo de nuevo.',
|
|
241
|
+
removeDevice: 'No se ha podido quitar el dispositivo. Inténtalo de nuevo.',
|
|
242
|
+
},
|
|
243
|
+
usernamePolicy: {
|
|
244
|
+
hint: 'Letras, números, - y _. Sin espacios.',
|
|
245
|
+
required: 'Elige un nombre de usuario.',
|
|
246
|
+
tooShort: 'Usa al menos {{min}} caracteres.',
|
|
247
|
+
tooLong: 'Usa como máximo {{max}} caracteres.',
|
|
248
|
+
noSpaces: 'El nombre de usuario no puede tener espacios. Usa - o _ en su lugar.',
|
|
249
|
+
characters: 'Usa solo letras, números, - y _. Empieza y termina con una letra o un número, y no pongas dos - o _ seguidos.',
|
|
250
|
+
onlyNumbers: 'El nombre de usuario no puede ser solo números. Añade una letra.',
|
|
251
|
+
reserved: 'Ese nombre de usuario está reservado. Elige otro.',
|
|
252
|
+
mustEndInBot: 'El nombre de usuario de una cuenta bot debe terminar en «bot».',
|
|
253
|
+
},
|
|
226
254
|
signup: {
|
|
227
255
|
title: 'Crea tu cuenta',
|
|
228
256
|
subtitle: 'Elige tu nombre de usuario. Después confirmamos tu email.',
|
|
@@ -231,7 +259,6 @@ const dict = {
|
|
|
231
259
|
username: {
|
|
232
260
|
label: 'Nombre de usuario',
|
|
233
261
|
placeholder: 'tunombre',
|
|
234
|
-
required: 'Elige un nombre de usuario.',
|
|
235
262
|
taken: 'Ese nombre de usuario ya está en uso.',
|
|
236
263
|
},
|
|
237
264
|
email: {
|
|
@@ -303,8 +330,6 @@ const dict = {
|
|
|
303
330
|
label: 'Usuario',
|
|
304
331
|
placeholder: 'Elige un usuario',
|
|
305
332
|
choose: 'Elige un usuario',
|
|
306
|
-
required: 'El usuario es obligatorio',
|
|
307
|
-
tooShort: 'El usuario debe tener al menos 3 caracteres',
|
|
308
333
|
},
|
|
309
334
|
email: {
|
|
310
335
|
title: 'Correo electrónico',
|
|
@@ -902,7 +927,6 @@ const dict = {
|
|
|
902
927
|
firstPlaceholder: 'Tu nombre',
|
|
903
928
|
lastLabel: 'Apellidos',
|
|
904
929
|
lastPlaceholder: 'Tus apellidos',
|
|
905
|
-
saveFailed: 'No se pudo guardar tu nombre',
|
|
906
930
|
},
|
|
907
931
|
avatar: {
|
|
908
932
|
title: 'Hazlo tuyo',
|
|
@@ -1258,7 +1282,7 @@ const dict = {
|
|
|
1258
1282
|
},
|
|
1259
1283
|
rules: {
|
|
1260
1284
|
title: 'Reglas del nombre de usuario',
|
|
1261
|
-
content: 'Los nombres de usuario
|
|
1285
|
+
content: '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.',
|
|
1262
1286
|
},
|
|
1263
1287
|
unique: {
|
|
1264
1288
|
title: '¿Por qué debe ser único?',
|
|
@@ -1837,9 +1861,6 @@ const dict = {
|
|
|
1837
1861
|
label: 'Nombre de usuario',
|
|
1838
1862
|
available: 'El nombre de usuario está disponible',
|
|
1839
1863
|
taken: 'El nombre de usuario ya está en uso',
|
|
1840
|
-
tooShort: 'El nombre de usuario debe tener al menos 3 caracteres',
|
|
1841
|
-
invalidChars: 'Solo letras, números, guiones y guiones bajos',
|
|
1842
|
-
mustEndInBot: 'El nombre de usuario de una cuenta de bot debe terminar en “bot”',
|
|
1843
1864
|
checkFailed: 'No se pudo comprobar la disponibilidad',
|
|
1844
1865
|
},
|
|
1845
1866
|
accountCategory: {
|
|
@@ -1874,16 +1895,15 @@ const dict = {
|
|
|
1874
1895
|
transfer: 'Transferir propiedad',
|
|
1875
1896
|
},
|
|
1876
1897
|
errors: {
|
|
1877
|
-
|
|
1898
|
+
emailInvalid: 'Introduce un email válido, como nombre@ejemplo.com.',
|
|
1878
1899
|
missingAccount: 'Ninguna cuenta seleccionada.',
|
|
1879
1900
|
noPermission: 'No tienes permiso para ver los miembros.',
|
|
1880
|
-
userNotFound: 'Usuario no encontrado',
|
|
1881
1901
|
},
|
|
1882
1902
|
invite: {
|
|
1883
|
-
title: '
|
|
1884
|
-
|
|
1903
|
+
title: 'Invitar a un miembro',
|
|
1904
|
+
emailLabel: 'Email',
|
|
1885
1905
|
roleLabel: 'Rol',
|
|
1886
|
-
submit: '
|
|
1906
|
+
submit: 'Enviar invitación',
|
|
1887
1907
|
},
|
|
1888
1908
|
removeConfirm: {
|
|
1889
1909
|
title: 'Eliminar miembro',
|
|
@@ -1894,8 +1914,9 @@ const dict = {
|
|
|
1894
1914
|
description: '¿Transferir la propiedad de esta cuenta a este miembro? Pasarás a ser administrador. Esto no se puede deshacer.',
|
|
1895
1915
|
},
|
|
1896
1916
|
toasts: {
|
|
1897
|
-
|
|
1898
|
-
|
|
1917
|
+
invited: 'Invitación enviada',
|
|
1918
|
+
inviteFailed: 'No se ha podido enviar la invitación. Inténtalo de nuevo.',
|
|
1919
|
+
invitationUpdateFailed: 'No se ha podido actualizar la invitación. Inténtalo de nuevo.',
|
|
1899
1920
|
removed: 'Miembro eliminado',
|
|
1900
1921
|
removeFailed: 'No se pudo eliminar el miembro',
|
|
1901
1922
|
roleUpdated: 'Rol actualizado',
|
|
@@ -1957,6 +1978,7 @@ const dict = {
|
|
|
1957
1978
|
title: 'Eliminar cuenta',
|
|
1958
1979
|
warning: 'Esta acción no se puede deshacer. Tu cuenta y todos los datos asociados se eliminarán de forma permanente.',
|
|
1959
1980
|
confirmLabel: 'Escribe "{{username}}" para confirmar',
|
|
1981
|
+
confirmMismatch: 'Ese no es tu nombre de usuario. Escribe "{{username}}" exactamente.',
|
|
1960
1982
|
confirm: 'Eliminar para siempre',
|
|
1961
1983
|
error: 'No se pudo eliminar la cuenta',
|
|
1962
1984
|
handoff: {
|
|
@@ -2371,6 +2393,7 @@ const dict = {
|
|
|
2371
2393
|
request: 'No se pudo empezar la verificación. Revisa el dominio e inténtalo otra vez.',
|
|
2372
2394
|
notYet: 'Aún no está verificado. Los cambios de DNS pueden tardar en aparecer.',
|
|
2373
2395
|
remove: 'No se pudo quitar el dominio',
|
|
2396
|
+
invalid: 'Escribe solo el dominio, como ejemplo.com, sin https://, barras ni espacios.',
|
|
2374
2397
|
},
|
|
2375
2398
|
remove: {
|
|
2376
2399
|
title: 'Quitar dominio',
|
|
@@ -64,12 +64,19 @@ export const OXY_IDENTITY_CACHE_PREFIXES = [
|
|
|
64
64
|
// `resolveProfile` — keyed by fediverse handle in the query payload.
|
|
65
65
|
'GET:/profiles/resolve',
|
|
66
66
|
];
|
|
67
|
+
/**
|
|
68
|
+
* The path `getUserById` reads, its id encoded. Built in one place so the
|
|
69
|
+
* request and every key that evicts it cannot spell the id differently.
|
|
70
|
+
*/
|
|
71
|
+
export function oxyUserByIdPath(userId) {
|
|
72
|
+
return `/users/${encodeURIComponent(userId)}`;
|
|
73
|
+
}
|
|
67
74
|
/**
|
|
68
75
|
* Build the exact cache key `getUserById` reads under. The only identity key
|
|
69
76
|
* derivable from a user id, so the only one that does not need a prefix sweep.
|
|
70
77
|
*/
|
|
71
78
|
export function oxyUserByIdCacheKey(userId) {
|
|
72
|
-
return `GET
|
|
79
|
+
return `GET:${oxyUserByIdPath(userId)}`;
|
|
73
80
|
}
|
|
74
81
|
/**
|
|
75
82
|
* Sweep an `OxyServices` GET response cache of everything that could carry the
|
|
@@ -161,6 +161,9 @@ declare const dict: {
|
|
|
161
161
|
requestExpired: string;
|
|
162
162
|
secondFactorInvalid: string;
|
|
163
163
|
originNotAllowed: string;
|
|
164
|
+
network: string;
|
|
165
|
+
invalidInput: string;
|
|
166
|
+
server: string;
|
|
164
167
|
generic: string;
|
|
165
168
|
};
|
|
166
169
|
subtitleToApp: string;
|
|
@@ -223,6 +226,31 @@ declare const dict: {
|
|
|
223
226
|
invalidDescription: string;
|
|
224
227
|
};
|
|
225
228
|
};
|
|
229
|
+
actionErrors: {
|
|
230
|
+
updateProfile: string;
|
|
231
|
+
uploadAvatar: string;
|
|
232
|
+
updateSettings: string;
|
|
233
|
+
updatePrivacy: string;
|
|
234
|
+
updateNotifications: string;
|
|
235
|
+
updatePreferences: string;
|
|
236
|
+
revokeConnectedApp: string;
|
|
237
|
+
switchSession: string;
|
|
238
|
+
logout: string;
|
|
239
|
+
logoutAll: string;
|
|
240
|
+
updateDeviceName: string;
|
|
241
|
+
removeDevice: string;
|
|
242
|
+
};
|
|
243
|
+
usernamePolicy: {
|
|
244
|
+
hint: string;
|
|
245
|
+
required: string;
|
|
246
|
+
tooShort: string;
|
|
247
|
+
tooLong: string;
|
|
248
|
+
noSpaces: string;
|
|
249
|
+
characters: string;
|
|
250
|
+
onlyNumbers: string;
|
|
251
|
+
reserved: string;
|
|
252
|
+
mustEndInBot: string;
|
|
253
|
+
};
|
|
226
254
|
signup: {
|
|
227
255
|
title: string;
|
|
228
256
|
subtitle: string;
|
|
@@ -231,7 +259,6 @@ declare const dict: {
|
|
|
231
259
|
username: {
|
|
232
260
|
label: string;
|
|
233
261
|
placeholder: string;
|
|
234
|
-
required: string;
|
|
235
262
|
taken: string;
|
|
236
263
|
};
|
|
237
264
|
email: {
|
|
@@ -270,7 +297,6 @@ declare const dict: {
|
|
|
270
297
|
firstPlaceholder: string;
|
|
271
298
|
lastLabel: string;
|
|
272
299
|
lastPlaceholder: string;
|
|
273
|
-
saveFailed: string;
|
|
274
300
|
};
|
|
275
301
|
avatar: {
|
|
276
302
|
title: string;
|
|
@@ -593,8 +619,6 @@ declare const dict: {
|
|
|
593
619
|
label: string;
|
|
594
620
|
placeholder: string;
|
|
595
621
|
choose: string;
|
|
596
|
-
required: string;
|
|
597
|
-
tooShort: string;
|
|
598
622
|
};
|
|
599
623
|
email: {
|
|
600
624
|
title: string;
|
|
@@ -1828,9 +1852,6 @@ declare const dict: {
|
|
|
1828
1852
|
label: string;
|
|
1829
1853
|
available: string;
|
|
1830
1854
|
taken: string;
|
|
1831
|
-
tooShort: string;
|
|
1832
|
-
invalidChars: string;
|
|
1833
|
-
mustEndInBot: string;
|
|
1834
1855
|
checkFailed: string;
|
|
1835
1856
|
};
|
|
1836
1857
|
accountCategory: {
|
|
@@ -1865,14 +1886,13 @@ declare const dict: {
|
|
|
1865
1886
|
transfer: string;
|
|
1866
1887
|
};
|
|
1867
1888
|
errors: {
|
|
1868
|
-
|
|
1889
|
+
emailInvalid: string;
|
|
1869
1890
|
missingAccount: string;
|
|
1870
1891
|
noPermission: string;
|
|
1871
|
-
userNotFound: string;
|
|
1872
1892
|
};
|
|
1873
1893
|
invite: {
|
|
1874
1894
|
title: string;
|
|
1875
|
-
|
|
1895
|
+
emailLabel: string;
|
|
1876
1896
|
roleLabel: string;
|
|
1877
1897
|
submit: string;
|
|
1878
1898
|
};
|
|
@@ -1885,8 +1905,9 @@ declare const dict: {
|
|
|
1885
1905
|
description: string;
|
|
1886
1906
|
};
|
|
1887
1907
|
toasts: {
|
|
1888
|
-
|
|
1889
|
-
|
|
1908
|
+
invited: string;
|
|
1909
|
+
inviteFailed: string;
|
|
1910
|
+
invitationUpdateFailed: string;
|
|
1890
1911
|
removed: string;
|
|
1891
1912
|
removeFailed: string;
|
|
1892
1913
|
roleUpdated: string;
|
|
@@ -1948,6 +1969,7 @@ declare const dict: {
|
|
|
1948
1969
|
title: string;
|
|
1949
1970
|
warning: string;
|
|
1950
1971
|
confirmLabel: string;
|
|
1972
|
+
confirmMismatch: string;
|
|
1951
1973
|
confirm: string;
|
|
1952
1974
|
error: string;
|
|
1953
1975
|
handoff: {
|
|
@@ -2362,6 +2384,7 @@ declare const dict: {
|
|
|
2362
2384
|
request: string;
|
|
2363
2385
|
notYet: string;
|
|
2364
2386
|
remove: string;
|
|
2387
|
+
invalid: string;
|
|
2365
2388
|
};
|
|
2366
2389
|
remove: {
|
|
2367
2390
|
title: string;
|
|
@@ -161,6 +161,9 @@ declare const dict: {
|
|
|
161
161
|
requestExpired: string;
|
|
162
162
|
secondFactorInvalid: string;
|
|
163
163
|
originNotAllowed: string;
|
|
164
|
+
network: string;
|
|
165
|
+
invalidInput: string;
|
|
166
|
+
server: string;
|
|
164
167
|
generic: string;
|
|
165
168
|
};
|
|
166
169
|
subtitleToApp: string;
|
|
@@ -223,6 +226,31 @@ declare const dict: {
|
|
|
223
226
|
invalidDescription: string;
|
|
224
227
|
};
|
|
225
228
|
};
|
|
229
|
+
actionErrors: {
|
|
230
|
+
updateProfile: string;
|
|
231
|
+
uploadAvatar: string;
|
|
232
|
+
updateSettings: string;
|
|
233
|
+
updatePrivacy: string;
|
|
234
|
+
updateNotifications: string;
|
|
235
|
+
updatePreferences: string;
|
|
236
|
+
revokeConnectedApp: string;
|
|
237
|
+
switchSession: string;
|
|
238
|
+
logout: string;
|
|
239
|
+
logoutAll: string;
|
|
240
|
+
updateDeviceName: string;
|
|
241
|
+
removeDevice: string;
|
|
242
|
+
};
|
|
243
|
+
usernamePolicy: {
|
|
244
|
+
hint: string;
|
|
245
|
+
required: string;
|
|
246
|
+
tooShort: string;
|
|
247
|
+
tooLong: string;
|
|
248
|
+
noSpaces: string;
|
|
249
|
+
characters: string;
|
|
250
|
+
onlyNumbers: string;
|
|
251
|
+
reserved: string;
|
|
252
|
+
mustEndInBot: string;
|
|
253
|
+
};
|
|
226
254
|
signup: {
|
|
227
255
|
title: string;
|
|
228
256
|
subtitle: string;
|
|
@@ -231,7 +259,6 @@ declare const dict: {
|
|
|
231
259
|
username: {
|
|
232
260
|
label: string;
|
|
233
261
|
placeholder: string;
|
|
234
|
-
required: string;
|
|
235
262
|
taken: string;
|
|
236
263
|
};
|
|
237
264
|
email: {
|
|
@@ -303,8 +330,6 @@ declare const dict: {
|
|
|
303
330
|
label: string;
|
|
304
331
|
placeholder: string;
|
|
305
332
|
choose: string;
|
|
306
|
-
required: string;
|
|
307
|
-
tooShort: string;
|
|
308
333
|
};
|
|
309
334
|
email: {
|
|
310
335
|
title: string;
|
|
@@ -893,7 +918,6 @@ declare const dict: {
|
|
|
893
918
|
firstPlaceholder: string;
|
|
894
919
|
lastLabel: string;
|
|
895
920
|
lastPlaceholder: string;
|
|
896
|
-
saveFailed: string;
|
|
897
921
|
};
|
|
898
922
|
avatar: {
|
|
899
923
|
title: string;
|
|
@@ -1828,9 +1852,6 @@ declare const dict: {
|
|
|
1828
1852
|
label: string;
|
|
1829
1853
|
available: string;
|
|
1830
1854
|
taken: string;
|
|
1831
|
-
tooShort: string;
|
|
1832
|
-
invalidChars: string;
|
|
1833
|
-
mustEndInBot: string;
|
|
1834
1855
|
checkFailed: string;
|
|
1835
1856
|
};
|
|
1836
1857
|
accountCategory: {
|
|
@@ -1865,14 +1886,13 @@ declare const dict: {
|
|
|
1865
1886
|
transfer: string;
|
|
1866
1887
|
};
|
|
1867
1888
|
errors: {
|
|
1868
|
-
|
|
1889
|
+
emailInvalid: string;
|
|
1869
1890
|
missingAccount: string;
|
|
1870
1891
|
noPermission: string;
|
|
1871
|
-
userNotFound: string;
|
|
1872
1892
|
};
|
|
1873
1893
|
invite: {
|
|
1874
1894
|
title: string;
|
|
1875
|
-
|
|
1895
|
+
emailLabel: string;
|
|
1876
1896
|
roleLabel: string;
|
|
1877
1897
|
submit: string;
|
|
1878
1898
|
};
|
|
@@ -1885,8 +1905,9 @@ declare const dict: {
|
|
|
1885
1905
|
description: string;
|
|
1886
1906
|
};
|
|
1887
1907
|
toasts: {
|
|
1888
|
-
|
|
1889
|
-
|
|
1908
|
+
invited: string;
|
|
1909
|
+
inviteFailed: string;
|
|
1910
|
+
invitationUpdateFailed: string;
|
|
1890
1911
|
removed: string;
|
|
1891
1912
|
removeFailed: string;
|
|
1892
1913
|
roleUpdated: string;
|
|
@@ -1948,6 +1969,7 @@ declare const dict: {
|
|
|
1948
1969
|
title: string;
|
|
1949
1970
|
warning: string;
|
|
1950
1971
|
confirmLabel: string;
|
|
1972
|
+
confirmMismatch: string;
|
|
1951
1973
|
confirm: string;
|
|
1952
1974
|
error: string;
|
|
1953
1975
|
handoff: {
|
|
@@ -2362,6 +2384,7 @@ declare const dict: {
|
|
|
2362
2384
|
request: string;
|
|
2363
2385
|
notYet: string;
|
|
2364
2386
|
remove: string;
|
|
2387
|
+
invalid: string;
|
|
2365
2388
|
};
|
|
2366
2389
|
remove: {
|
|
2367
2390
|
title: string;
|
|
@@ -65,6 +65,11 @@ export interface OxyIdentityCacheEvictor {
|
|
|
65
65
|
* reads whose key cannot be derived from a user id. Swept wholesale.
|
|
66
66
|
*/
|
|
67
67
|
export declare const OXY_IDENTITY_CACHE_PREFIXES: readonly string[];
|
|
68
|
+
/**
|
|
69
|
+
* The path `getUserById` reads, its id encoded. Built in one place so the
|
|
70
|
+
* request and every key that evicts it cannot spell the id differently.
|
|
71
|
+
*/
|
|
72
|
+
export declare function oxyUserByIdPath(userId: string): string;
|
|
68
73
|
/**
|
|
69
74
|
* Build the exact cache key `getUserById` reads under. The only identity key
|
|
70
75
|
* derivable from a user id, so the only one that does not need a prefix sweep.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/core",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.13.1",
|
|
4
4
|
"description": "OxyHQ SDK Foundation — API client, authentication, cryptographic identity, and shared utilities",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"dependencies": {
|
|
182
182
|
"@noble/ciphers": "^1.3.0",
|
|
183
183
|
"@noble/hashes": "^1.8.0",
|
|
184
|
-
"@oxy.so/contracts": "6.
|
|
184
|
+
"@oxy.so/contracts": "6.5.0",
|
|
185
185
|
"@oxy.so/protocol": "^1.5.1",
|
|
186
186
|
"@oxy.so/telemetry": "^2.1.0",
|
|
187
187
|
"@scure/bip39": "^1.6.0",
|
package/src/api/apps.ts
CHANGED
|
@@ -494,7 +494,7 @@ export class ConnectedAppsApi {
|
|
|
494
494
|
async revoke(applicationId: string): Promise<void> {
|
|
495
495
|
await this.ctx.request<{ revoked: boolean }>(
|
|
496
496
|
'DELETE',
|
|
497
|
-
`/auth/grants/${applicationId}`,
|
|
497
|
+
`/auth/grants/${enc(applicationId)}`,
|
|
498
498
|
undefined,
|
|
499
499
|
{ cache: false },
|
|
500
500
|
);
|
package/src/api/auth.ts
CHANGED
|
@@ -1622,10 +1622,15 @@ export class AuthApi {
|
|
|
1622
1622
|
*/
|
|
1623
1623
|
async checkUsername(username: string): Promise<{ available: boolean; message: string }> {
|
|
1624
1624
|
// Public availability lookup (pre-session) — skip the bearer preflight.
|
|
1625
|
-
return this.ctx.request(
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1625
|
+
return this.ctx.request(
|
|
1626
|
+
'GET',
|
|
1627
|
+
`/auth/check-username/${encodeURIComponent(username)}`,
|
|
1628
|
+
undefined,
|
|
1629
|
+
{
|
|
1630
|
+
cache: false,
|
|
1631
|
+
skipAuth: true,
|
|
1632
|
+
},
|
|
1633
|
+
);
|
|
1629
1634
|
}
|
|
1630
1635
|
|
|
1631
1636
|
/**
|
package/src/api/billing.ts
CHANGED
|
@@ -40,6 +40,8 @@ import {
|
|
|
40
40
|
} from '@oxy.so/contracts/client';
|
|
41
41
|
import type { OxyContext } from '../client/context';
|
|
42
42
|
|
|
43
|
+
const enc = encodeURIComponent;
|
|
44
|
+
|
|
43
45
|
const SUBSCRIPTION_TTL = 2 * 60 * 1000;
|
|
44
46
|
const WALLET_TTL = 60 * 1000;
|
|
45
47
|
|
|
@@ -282,7 +284,7 @@ export class BillingApi {
|
|
|
282
284
|
/** A user's subscription (default: the signed-in user's). */
|
|
283
285
|
async subscription(userId?: string): Promise<Subscription> {
|
|
284
286
|
const id = this.resolveUserId(userId);
|
|
285
|
-
return this.ctx.request<Subscription>('GET', `/subscription/${id}`, undefined, {
|
|
287
|
+
return this.ctx.request<Subscription>('GET', `/subscription/${enc(id)}`, undefined, {
|
|
286
288
|
cache: true,
|
|
287
289
|
cacheTTL: SUBSCRIPTION_TTL,
|
|
288
290
|
});
|
|
@@ -291,7 +293,7 @@ export class BillingApi {
|
|
|
291
293
|
/** A user's wallet (default: the signed-in user's). Cached briefly: the balance moves. */
|
|
292
294
|
async wallet(userId?: string): Promise<Wallet> {
|
|
293
295
|
const id = this.resolveUserId(userId);
|
|
294
|
-
return this.ctx.request<Wallet>('GET', `/wallet/${id}`, undefined, {
|
|
296
|
+
return this.ctx.request<Wallet>('GET', `/wallet/${enc(id)}`, undefined, {
|
|
295
297
|
cache: true,
|
|
296
298
|
cacheTTL: WALLET_TTL,
|
|
297
299
|
});
|
|
@@ -305,9 +307,14 @@ export class BillingApi {
|
|
|
305
307
|
const params: Record<string, number> = {};
|
|
306
308
|
if (options.limit) params.limit = options.limit;
|
|
307
309
|
if (options.offset) params.offset = options.offset;
|
|
308
|
-
return this.ctx.request<WalletTransactionsPage>(
|
|
309
|
-
|
|
310
|
-
|
|
310
|
+
return this.ctx.request<WalletTransactionsPage>(
|
|
311
|
+
'GET',
|
|
312
|
+
`/wallet/transactions/${enc(id)}`,
|
|
313
|
+
params,
|
|
314
|
+
{
|
|
315
|
+
cache: false,
|
|
316
|
+
},
|
|
317
|
+
);
|
|
311
318
|
}
|
|
312
319
|
|
|
313
320
|
private resolveUserId(userId?: string): string {
|