@oxy.so/services 14.2.0 → 14.2.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.
Files changed (96) hide show
  1. package/lib/commonjs/ui/components/accountSettings/AccountSettings.js +8 -7
  2. package/lib/commonjs/ui/components/accountSettings/AccountSettings.js.map +1 -1
  3. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js +0 -5
  4. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
  5. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +2 -1
  6. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
  7. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +13 -24
  8. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  9. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +11 -22
  10. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  11. package/lib/commonjs/ui/hooks/useApiErrorToast.js +24 -0
  12. package/lib/commonjs/ui/hooks/useApiErrorToast.js.map +1 -0
  13. package/lib/commonjs/ui/hooks/useUsernameAvailability.js +2 -2
  14. package/lib/commonjs/ui/hooks/useUsernameAvailability.js.map +1 -1
  15. package/lib/commonjs/ui/screens/AccountMembersScreen.js +14 -17
  16. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  17. package/lib/commonjs/ui/screens/DomainsScreen.js +5 -4
  18. package/lib/commonjs/ui/screens/DomainsScreen.js.map +1 -1
  19. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +2 -5
  20. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  21. package/lib/commonjs/ui/utils/apiErrorMessage.js +18 -27
  22. package/lib/commonjs/ui/utils/apiErrorMessage.js.map +1 -1
  23. package/lib/commonjs/ui/utils/followErrors.js +2 -3
  24. package/lib/commonjs/ui/utils/followErrors.js.map +1 -1
  25. package/lib/commonjs/ui/utils/usernamePolicy.js +10 -6
  26. package/lib/commonjs/ui/utils/usernamePolicy.js.map +1 -1
  27. package/lib/module/ui/components/accountSettings/AccountSettings.js +8 -7
  28. package/lib/module/ui/components/accountSettings/AccountSettings.js.map +1 -1
  29. package/lib/module/ui/components/signIn/OxyPasswordPanel.js +0 -5
  30. package/lib/module/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
  31. package/lib/module/ui/components/signIn/OxySignInPanel.js +3 -2
  32. package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
  33. package/lib/module/ui/hooks/mutations/useAccountMutations.js +13 -24
  34. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  35. package/lib/module/ui/hooks/mutations/useServicesMutations.js +11 -22
  36. package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  37. package/lib/module/ui/hooks/useApiErrorToast.js +21 -0
  38. package/lib/module/ui/hooks/useApiErrorToast.js.map +1 -0
  39. package/lib/module/ui/hooks/useUsernameAvailability.js +2 -2
  40. package/lib/module/ui/hooks/useUsernameAvailability.js.map +1 -1
  41. package/lib/module/ui/screens/AccountMembersScreen.js +14 -17
  42. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  43. package/lib/module/ui/screens/DomainsScreen.js +5 -4
  44. package/lib/module/ui/screens/DomainsScreen.js.map +1 -1
  45. package/lib/module/ui/screens/EditProfileFieldScreen.js +2 -5
  46. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  47. package/lib/module/ui/utils/apiErrorMessage.js +17 -24
  48. package/lib/module/ui/utils/apiErrorMessage.js.map +1 -1
  49. package/lib/module/ui/utils/followErrors.js +2 -3
  50. package/lib/module/ui/utils/followErrors.js.map +1 -1
  51. package/lib/module/ui/utils/usernamePolicy.js +11 -7
  52. package/lib/module/ui/utils/usernamePolicy.js.map +1 -1
  53. package/lib/typescript/commonjs/ui/components/accountSettings/AccountSettings.d.ts.map +1 -1
  54. package/lib/typescript/commonjs/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  58. package/lib/typescript/commonjs/ui/hooks/useApiErrorToast.d.ts +7 -0
  59. package/lib/typescript/commonjs/ui/hooks/useApiErrorToast.d.ts.map +1 -0
  60. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/ui/screens/DomainsScreen.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/ui/utils/apiErrorMessage.d.ts +6 -4
  64. package/lib/typescript/commonjs/ui/utils/apiErrorMessage.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/ui/utils/followErrors.d.ts.map +1 -1
  66. package/lib/typescript/commonjs/ui/utils/usernamePolicy.d.ts +2 -2
  67. package/lib/typescript/commonjs/ui/utils/usernamePolicy.d.ts.map +1 -1
  68. package/lib/typescript/module/ui/components/accountSettings/AccountSettings.d.ts.map +1 -1
  69. package/lib/typescript/module/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -1
  70. package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  71. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  72. package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  73. package/lib/typescript/module/ui/hooks/useApiErrorToast.d.ts +7 -0
  74. package/lib/typescript/module/ui/hooks/useApiErrorToast.d.ts.map +1 -0
  75. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  76. package/lib/typescript/module/ui/screens/DomainsScreen.d.ts.map +1 -1
  77. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  78. package/lib/typescript/module/ui/utils/apiErrorMessage.d.ts +6 -4
  79. package/lib/typescript/module/ui/utils/apiErrorMessage.d.ts.map +1 -1
  80. package/lib/typescript/module/ui/utils/followErrors.d.ts.map +1 -1
  81. package/lib/typescript/module/ui/utils/usernamePolicy.d.ts +2 -2
  82. package/lib/typescript/module/ui/utils/usernamePolicy.d.ts.map +1 -1
  83. package/package.json +2 -2
  84. package/src/ui/components/accountSettings/AccountSettings.tsx +8 -7
  85. package/src/ui/components/signIn/OxyPasswordPanel.tsx +0 -3
  86. package/src/ui/components/signIn/OxySignInPanel.tsx +3 -7
  87. package/src/ui/hooks/mutations/useAccountMutations.ts +13 -12
  88. package/src/ui/hooks/mutations/useServicesMutations.ts +11 -12
  89. package/src/ui/hooks/useApiErrorToast.ts +19 -0
  90. package/src/ui/hooks/useUsernameAvailability.ts +2 -2
  91. package/src/ui/screens/AccountMembersScreen.tsx +14 -24
  92. package/src/ui/screens/DomainsScreen.tsx +5 -4
  93. package/src/ui/screens/EditProfileFieldScreen.tsx +2 -5
  94. package/src/ui/utils/apiErrorMessage.ts +19 -24
  95. package/src/ui/utils/followErrors.ts +2 -3
  96. package/src/ui/utils/usernamePolicy.ts +13 -11
@@ -11,7 +11,9 @@
11
11
  * "Something went wrong".
12
12
  */
13
13
 
14
- import { BOT_USERNAME_INVALID_MESSAGE, NUMERIC_USERNAME_MESSAGE, RESERVED_USERNAME_MESSAGE, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, usernameCheckForAccountKind } from '@oxy.so/contracts/client';
14
+ import { ErrorCodes } from '@oxy.so/core';
15
+ import { BOT_USERNAME_INVALID_MESSAGE, NUMERIC_USERNAME_MESSAGE, RESERVED_USERNAME_MESSAGE, USERNAME_INVALID_MESSAGE, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, usernameCheckForAccountKind } from '@oxy.so/contracts/client';
16
+ import { errorCode } from "./apiErrorMessage.js";
15
17
  /**
16
18
  * Hold a typed username to the policy for `kind` (`bot` handles end in `bot`).
17
19
  * On success `username` is the trimmed handle to send; on failure `error` is
@@ -37,12 +39,12 @@ export function checkUsernameDraft(value, t, kind) {
37
39
  /**
38
40
  * The server's refusal of `username` (a 400 naming the `username` field, whose
39
41
  * message is the policy's), in the same words as {@link checkUsernameDraft};
40
- * `null` when `reason` is something else. The backstop for a rule this client
41
- * does not know yet: the person still reads which rule, in their language.
42
+ * `null` when `reason` is something else. A message this client does not know
43
+ * reads as "something you entered isn't valid", never as a rule it did not break.
42
44
  */
43
45
  export function describeUsernameRefusal(reason, username, t) {
44
46
  const error = reason;
45
- if (error?.code !== 'BAD_REQUEST' || error.details?.field !== 'username') return null;
47
+ if (errorCode(reason) !== ErrorCodes.BAD_REQUEST || error?.details?.field !== 'username') return null;
46
48
  const message = typeof error.message === 'string' ? error.message : '';
47
49
  return describeUsernameIssue(username.trim(), message, t);
48
50
  }
@@ -54,9 +56,9 @@ function describeUsernameIssue(username, message, t) {
54
56
  return t('usernamePolicy.reserved');
55
57
  case BOT_USERNAME_INVALID_MESSAGE:
56
58
  return t('usernamePolicy.mustEndInBot');
57
- default:
58
- // `USERNAME_INVALID_MESSAGE` covers length and shape alike; the length is
59
- // read here so the reason names the rule that actually failed.
59
+ case USERNAME_INVALID_MESSAGE:
60
+ // One message covers length and shape alike; the length is read here so
61
+ // the reason names the rule that actually failed.
60
62
  if (username.length < USERNAME_MIN_LENGTH) return t('usernamePolicy.tooShort', {
61
63
  min: USERNAME_MIN_LENGTH
62
64
  });
@@ -65,6 +67,8 @@ function describeUsernameIssue(username, message, t) {
65
67
  });
66
68
  if (/\s/.test(username)) return t('usernamePolicy.noSpaces');
67
69
  return t('usernamePolicy.characters');
70
+ default:
71
+ return t('signin.errors.invalidInput');
68
72
  }
69
73
  }
70
74
  //# sourceMappingURL=usernamePolicy.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BOT_USERNAME_INVALID_MESSAGE","NUMERIC_USERNAME_MESSAGE","RESERVED_USERNAME_MESSAGE","USERNAME_MAX_LENGTH","USERNAME_MIN_LENGTH","usernameCheckForAccountKind","checkUsernameDraft","value","t","kind","username","trim","ok","error","checked","describeUsernameIssue","issue","message","describeUsernameRefusal","reason","code","details","field","length","min","max","test"],"sourceRoot":"../../../../src","sources":["ui/utils/usernamePolicy.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SACEA,4BAA4B,EAC5BC,wBAAwB,EACxBC,yBAAyB,EACzBC,mBAAmB,EACnBC,mBAAmB,EACnBC,2BAA2B,QACtB,0BAA0B;AAKjC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,KAAa,EACbC,CAAY,EACZC,IAAyB,EACJ;EACrB,MAAMC,QAAQ,GAAGH,KAAK,CAACI,IAAI,CAAC,CAAC;EAC7B,IAAI,CAACD,QAAQ,EAAE,OAAO;IAAEE,EAAE,EAAE,KAAK;IAAEC,KAAK,EAAEL,CAAC,CAAC,yBAAyB;EAAE,CAAC;EACxE,MAAMM,OAAO,GAAGT,2BAA2B,CAACI,IAAI,CAAC,CAACC,QAAQ,EAAE,EAAE,CAAC;EAC/D,IAAII,OAAO,CAACF,EAAE,EAAE,OAAO;IAAEA,EAAE,EAAE,IAAI;IAAEF,QAAQ,EAAEI,OAAO,CAACP;EAAM,CAAC;EAC5D,OAAO;IAAEK,EAAE,EAAE,KAAK;IAAEC,KAAK,EAAEE,qBAAqB,CAACL,QAAQ,EAAEI,OAAO,CAACE,KAAK,CAACC,OAAO,EAAET,CAAC;EAAE,CAAC;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,uBAAuBA,CACrCC,MAAe,EACfT,QAAgB,EAChBF,CAAY,EACG;EACf,MAAMK,KAAK,GAAGM,MAIN;EACR,IAAIN,KAAK,EAAEO,IAAI,KAAK,aAAa,IAAIP,KAAK,CAACQ,OAAO,EAAEC,KAAK,KAAK,UAAU,EAAE,OAAO,IAAI;EACrF,MAAML,OAAO,GAAG,OAAOJ,KAAK,CAACI,OAAO,KAAK,QAAQ,GAAGJ,KAAK,CAACI,OAAO,GAAG,EAAE;EACtE,OAAOF,qBAAqB,CAACL,QAAQ,CAACC,IAAI,CAAC,CAAC,EAAEM,OAAO,EAAET,CAAC,CAAC;AAC3D;AAEA,SAASO,qBAAqBA,CAACL,QAAgB,EAAEO,OAAe,EAAET,CAAY,EAAU;EACtF,QAAQS,OAAO;IACb,KAAKhB,wBAAwB;MAC3B,OAAOO,CAAC,CAAC,4BAA4B,CAAC;IACxC,KAAKN,yBAAyB;MAC5B,OAAOM,CAAC,CAAC,yBAAyB,CAAC;IACrC,KAAKR,4BAA4B;MAC/B,OAAOQ,CAAC,CAAC,6BAA6B,CAAC;IACzC;MACE;MACA;MACA,IAAIE,QAAQ,CAACa,MAAM,GAAGnB,mBAAmB,EACvC,OAAOI,CAAC,CAAC,yBAAyB,EAAE;QAAEgB,GAAG,EAAEpB;MAAoB,CAAC,CAAC;MACnE,IAAIM,QAAQ,CAACa,MAAM,GAAGpB,mBAAmB,EACvC,OAAOK,CAAC,CAAC,wBAAwB,EAAE;QAAEiB,GAAG,EAAEtB;MAAoB,CAAC,CAAC;MAClE,IAAI,IAAI,CAACuB,IAAI,CAAChB,QAAQ,CAAC,EAAE,OAAOF,CAAC,CAAC,yBAAyB,CAAC;MAC5D,OAAOA,CAAC,CAAC,2BAA2B,CAAC;EACzC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["ErrorCodes","BOT_USERNAME_INVALID_MESSAGE","NUMERIC_USERNAME_MESSAGE","RESERVED_USERNAME_MESSAGE","USERNAME_INVALID_MESSAGE","USERNAME_MAX_LENGTH","USERNAME_MIN_LENGTH","usernameCheckForAccountKind","errorCode","checkUsernameDraft","value","t","kind","username","trim","ok","error","checked","describeUsernameIssue","issue","message","describeUsernameRefusal","reason","BAD_REQUEST","details","field","length","min","max","test"],"sourceRoot":"../../../../src","sources":["ui/utils/usernamePolicy.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AAO,GAAG,EAAE;EACtE,OAAOF,qBAAqB,CAACL,QAAQ,CAACC,IAAI,CAAC,CAAC,EAAEM,OAAO,EAAET,CAAC,CAAC;AAC3D;AAEA,SAASO,qBAAqBA,CAACL,QAAgB,EAAEO,OAAe,EAAET,CAAY,EAAU;EACtF,QAAQS,OAAO;IACb,KAAKlB,wBAAwB;MAC3B,OAAOS,CAAC,CAAC,4BAA4B,CAAC;IACxC,KAAKR,yBAAyB;MAC5B,OAAOQ,CAAC,CAAC,yBAAyB,CAAC;IACrC,KAAKV,4BAA4B;MAC/B,OAAOU,CAAC,CAAC,6BAA6B,CAAC;IACzC,KAAKP,wBAAwB;MAC3B;MACA;MACA,IAAIS,QAAQ,CAACa,MAAM,GAAGpB,mBAAmB,EACvC,OAAOK,CAAC,CAAC,yBAAyB,EAAE;QAAEgB,GAAG,EAAErB;MAAoB,CAAC,CAAC;MACnE,IAAIO,QAAQ,CAACa,MAAM,GAAGrB,mBAAmB,EACvC,OAAOM,CAAC,CAAC,wBAAwB,EAAE;QAAEiB,GAAG,EAAEvB;MAAoB,CAAC,CAAC;MAClE,IAAI,IAAI,CAACwB,IAAI,CAAChB,QAAQ,CAAC,EAAE,OAAOF,CAAC,CAAC,yBAAyB,CAAC;MAC5D,OAAOA,CAAC,CAAC,2BAA2B,CAAC;IACvC;MACE,OAAOA,CAAC,CAAC,4BAA4B,CAAC;EAC1C;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/accountSettings/AccountSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAQL,KAAK,WAAW,EAEhB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OA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AsE;IACtE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;EAYvD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqS1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxyPasswordPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyPasswordPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA4H5D,CAAC"}
1
+ {"version":3,"file":"OxyPasswordPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyPasswordPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyH5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6D/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkuBxD,CAAC"}
1
+ {"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyD/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkuBxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,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a;iBACX,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAO5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;YAMyB,MAAM;mBAAiB,MAAM;;;EAiBxF,CAAC"}
1
+ {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAoBtB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAOQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA2EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;sBAyFf,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CA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,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,uFAmBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,aAAa;iBACX,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAO5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;YAMyB,MAAM;mBAAiB,MAAM;;;EAiBxF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,gBAAgB,8GAwB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EAkD5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,qFAwBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;0BAwB/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,yFAqB3B,CAAC"}
1
+ {"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,gBAAgB,8GAwB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EAkD5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,qFAwBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;0BAwB/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,yFAqB3B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Toast a failed API call in the person's language: the reason when the error
3
+ * names one (offline, invalid input, rate limit, server fault), else the
4
+ * `fallbackKey` string saying what failed. Never the server's `message`.
5
+ */
6
+ export declare function useApiErrorToast(): (error: unknown, fallbackKey: string) => void;
7
+ //# sourceMappingURL=useApiErrorToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useApiErrorToast.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useApiErrorToast.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAQhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAigBnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAufnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAqM3D,wBAAyC"}
1
+ {"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAsM3D,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAqB3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AA4BZ,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AA+oBD,wBAAkD"}
1
+ {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAoB3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AA4BZ,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AA6oBD,wBAAkD"}
@@ -10,10 +10,12 @@ import type { Translate } from '../hooks/useI18n';
10
10
  export declare const RATE_LIMIT_SECONDS = 60;
11
11
  /** The API error code a thrown SDK error carries (`error.code`), if any. */
12
12
  export declare function errorCode(error: unknown): string | undefined;
13
- /** An HTTP status off a thrown SDK error. */
14
- export declare function errorStatus(error: unknown): number | undefined;
15
- /** A 429: too many attempts or emails. */
16
- export declare function isRateLimited(error: unknown): boolean;
13
+ /**
14
+ * The transport codes (core's `ErrorCodes`) for a request that never got an
15
+ * answer: offline, or timed out. Literals, so a module-load read never depends
16
+ * on core's values being initialised first.
17
+ */
18
+ export declare const OFFLINE_ERROR_CODES: ReadonlySet<string>;
17
19
  /** How long to wait after a 429, from the API's `retryAfterSeconds` when it sent one. */
18
20
  export declare function retryAfterSeconds(error: unknown): number;
19
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED,6CAA6C;AAC7C,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAK9D;AAED,0CAA0C;AAC1C,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAErD;AAED,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAqDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
1
+ {"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAIlD,CAAC;AAEH,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAiDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,oCAAoC;AAClC,aAAa;AACf,wCAAwC;GACtC,eAAe;AACjB,yEAAyE;GACvE,aAAa;AACf,4EAA4E;GAC1E,SAAS;AACX,6DAA6D;GAC3D,YAAY;AACd,6DAA6D;GAC3D,WAAW;AACb,uDAAuD;GACrD,WAAW;AACb,yCAAyC;GACvC,cAAc,CAAC;AAEnB,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,CAAC;AAIpF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,eAAe,CAYhG"}
1
+ {"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,oCAAoC;AAClC,aAAa;AACf,wCAAwC;GACtC,eAAe;AACjB,yEAAyE;GACvE,aAAa;AACf,4EAA4E;GAC1E,SAAS;AACX,6DAA6D;GAC3D,YAAY;AACd,6DAA6D;GAC3D,WAAW;AACb,uDAAuD;GACrD,WAAW;AACb,yCAAyC;GACvC,cAAc,CAAC;AAEnB,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,CAAC;AAEpF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,eAAe,CAYhG"}
@@ -26,8 +26,8 @@ export declare function checkUsernameDraft(value: string, t: Translate, kind?: A
26
26
  /**
27
27
  * The server's refusal of `username` (a 400 naming the `username` field, whose
28
28
  * message is the policy's), in the same words as {@link checkUsernameDraft};
29
- * `null` when `reason` is something else. The backstop for a rule this client
30
- * does not know yet: the person still reads which rule, in their language.
29
+ * `null` when `reason` is something else. A message this client does not know
30
+ * reads as "something you entered isn't valid", never as a rule it did not break.
31
31
  */
32
32
  export declare function describeUsernameRefusal(reason: unknown, username: string, t: Translate): string | null;
33
33
  //# sourceMappingURL=usernamePolicy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAShD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CASf"}
1
+ {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/accountSettings/AccountSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAQL,KAAK,WAAW,EAEhB,K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AAC,oBAAoB,CAoS1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/accountSettings/AccountSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAQL,KAAK,WAAW,EAEhB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,kCAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAS9D;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,0DAA0D;IAC1D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;QAAE,OAAO,EAAE,kBAAkB,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;EAYvD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqS1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxyPasswordPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyPasswordPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA4H5D,CAAC"}
1
+ {"version":3,"file":"OxyPasswordPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyPasswordPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyH5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6D/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkuBxD,CAAC"}
1
+ {"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyD/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkuBxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAmBtB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAOQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA2EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;sBAyFf,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;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AC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,aAAa;iBACX,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAO5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;YAMyB,MAAM;mBAAiB,MAAM;;;EAiBxF,CAAC"}
1
+ {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAoBtB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAOQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA2EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;sBAyFf,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IA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;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;EAgD5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;EAgDpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,uFAmBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,aAAa;iBACX,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAO5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;YAMyB,MAAM;mBAAiB,MAAM;;;EAiBxF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,gBAAgB,8GAwB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EAkD5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,qFAwBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;0BAwB/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,yFAqB3B,CAAC"}
1
+ {"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,gBAAgB,8GAwB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EAkD5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,qFAwBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;0BAwB/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,yFAqB3B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Toast a failed API call in the person's language: the reason when the error
3
+ * names one (offline, invalid input, rate limit, server fault), else the
4
+ * `fallbackKey` string saying what failed. Never the server's `message`.
5
+ */
6
+ export declare function useApiErrorToast(): (error: unknown, fallbackKey: string) => void;
7
+ //# sourceMappingURL=useApiErrorToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useApiErrorToast.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useApiErrorToast.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAQhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAigBnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAufnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;;AAqM3D,wBAAyC"}
1
+ {"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;;AAsM3D,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAqB3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AA4BZ,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AA+oBD,wBAAkD"}
1
+ {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAoB3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AA4BZ,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AA6oBD,wBAAkD"}
@@ -10,10 +10,12 @@ import type { Translate } from '../hooks/useI18n.js';
10
10
  export declare const RATE_LIMIT_SECONDS = 60;
11
11
  /** The API error code a thrown SDK error carries (`error.code`), if any. */
12
12
  export declare function errorCode(error: unknown): string | undefined;
13
- /** An HTTP status off a thrown SDK error. */
14
- export declare function errorStatus(error: unknown): number | undefined;
15
- /** A 429: too many attempts or emails. */
16
- export declare function isRateLimited(error: unknown): boolean;
13
+ /**
14
+ * The transport codes (core's `ErrorCodes`) for a request that never got an
15
+ * answer: offline, or timed out. Literals, so a module-load read never depends
16
+ * on core's values being initialised first.
17
+ */
18
+ export declare const OFFLINE_ERROR_CODES: ReadonlySet<string>;
17
19
  /** How long to wait after a 429, from the API's `retryAfterSeconds` when it sent one. */
18
20
  export declare function retryAfterSeconds(error: unknown): number;
19
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED,6CAA6C;AAC7C,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAK9D;AAED,0CAA0C;AAC1C,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAErD;AAED,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAqDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
1
+ {"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAIlD,CAAC;AAEH,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAiDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,oCAAoC;AAClC,aAAa;AACf,wCAAwC;GACtC,eAAe;AACjB,yEAAyE;GACvE,aAAa;AACf,4EAA4E;GAC1E,SAAS;AACX,6DAA6D;GAC3D,YAAY;AACd,6DAA6D;GAC3D,WAAW;AACb,uDAAuD;GACrD,WAAW;AACb,yCAAyC;GACvC,cAAc,CAAC;AAEnB,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,CAAC;AAIpF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,eAAe,CAYhG"}
1
+ {"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,oCAAoC;AAClC,aAAa;AACf,wCAAwC;GACtC,eAAe;AACjB,yEAAyE;GACvE,aAAa;AACf,4EAA4E;GAC1E,SAAS;AACX,6DAA6D;GAC3D,YAAY;AACd,6DAA6D;GAC3D,WAAW;AACb,uDAAuD;GACrD,WAAW;AACb,yCAAyC;GACvC,cAAc,CAAC;AAEnB,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,CAAC;AAEpF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,eAAe,CAYhG"}
@@ -26,8 +26,8 @@ export declare function checkUsernameDraft(value: string, t: Translate, kind?: A
26
26
  /**
27
27
  * The server's refusal of `username` (a 400 naming the `username` field, whose
28
28
  * message is the policy's), in the same words as {@link checkUsernameDraft};
29
- * `null` when `reason` is something else. The backstop for a rule this client
30
- * does not know yet: the person still reads which rule, in their language.
29
+ * `null` when `reason` is something else. A message this client does not know
30
+ * reads as "something you entered isn't valid", never as a rule it did not break.
31
31
  */
32
32
  export declare function describeUsernameRefusal(reason: unknown, username: string, t: Translate): string | null;
33
33
  //# sourceMappingURL=usernamePolicy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAShD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CASf"}
1
+ {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/services",
3
- "version": "14.2.0",
3
+ "version": "14.2.1",
4
4
  "description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -185,7 +185,7 @@
185
185
  "@commitlint/config-conventional": "^21.2.0",
186
186
  "@expo/app-integrity": "~58.0.2",
187
187
  "@expo/vector-icons": "^15.0.3",
188
- "@oxy.so/core": "7.13.0",
188
+ "@oxy.so/core": "7.13.1",
189
189
  "@react-native-async-storage/async-storage": "^2.0.0",
190
190
  "@react-native-community/netinfo": "^12.0.1",
191
191
  "@react-native/babel-preset": "^0.88.0",
@@ -35,7 +35,7 @@ import type { BaseScreenProps } from '../../types/navigation';
35
35
  import { OrganizationSettings } from '../organizations/OrganizationSettings';
36
36
  import { SettingsIcon } from '../SettingsIcon';
37
37
  import { AccountCategoriesSection, accountCategoriesEqual } from './AccountCategoriesSection';
38
- import { describeApiError } from '../../utils/apiErrorMessage';
38
+ import { useApiErrorToast } from '../../hooks/useApiErrorToast';
39
39
 
40
40
  const BIO_MAX = 160;
41
41
  const AVATAR_SIZE = 64;
@@ -132,6 +132,7 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
132
132
  }) => {
133
133
  const { colors } = useTheme();
134
134
  const { t } = useI18n();
135
+ const showApiError = useApiErrorToast();
135
136
  const { oxyServices, user, accounts, switchToAccount, showBottomSheet } = useOxy();
136
137
  const queryClient = useQueryClient();
137
138
  const id = accountId;
@@ -183,7 +184,7 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
183
184
  toast.success(t('accounts.settings.toasts.saved'));
184
185
  },
185
186
  onError: (error) => {
186
- toast.error(describeApiError(error, t, t('accounts.settings.toasts.saveFailed')));
187
+ showApiError(error, 'accounts.settings.toasts.saveFailed');
187
188
  },
188
189
  });
189
190
 
@@ -209,7 +210,7 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
209
210
  else onClose?.();
210
211
  },
211
212
  onError: (error) => {
212
- toast.error(describeApiError(error, t, t('accounts.settings.toasts.archiveFailed')));
213
+ showApiError(error, 'accounts.settings.toasts.archiveFailed');
213
214
  },
214
215
  });
215
216
 
@@ -227,11 +228,11 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
227
228
  destructive: true,
228
229
  });
229
230
  } catch (error) {
230
- toast.error(describeApiError(error, t, t('accounts.settings.toasts.archiveFailed')));
231
+ showApiError(error, 'accounts.settings.toasts.archiveFailed');
231
232
  return;
232
233
  }
233
234
  if (confirmed) archiveMutation.mutate(node);
234
- }, [archive, archiveMutation, node, t]);
235
+ }, [archive, archiveMutation, node, showApiError, t]);
235
236
 
236
237
  const handleDisplayNameChange = useCallback(
237
238
  (value: string) => {
@@ -285,9 +286,9 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
285
286
  });
286
287
  if (avatar !== undefined) updateMutation.mutate({ avatar });
287
288
  } catch (error) {
288
- toast.error(describeApiError(error, t, t('accounts.settings.toasts.saveFailed')));
289
+ showApiError(error, 'accounts.settings.toasts.saveFailed');
289
290
  }
290
- }, [account?.avatar, oxyServices, storedName, t, updateMutation]);
291
+ }, [account?.avatar, oxyServices, showApiError, storedName, updateMutation]);
291
292
 
292
293
  const avatarUri = useMemo(
293
294
  () => (account?.avatar ? oxyServices.assets.publicUrl(account.avatar, 'thumb') : undefined),
@@ -95,9 +95,6 @@ export const OxyPasswordPanel: React.FC<OxyPasswordPanelProps> = ({ onDone, onCa
95
95
  if (password.length < PASSWORD_MIN_LENGTH) {
96
96
  return t('signInSecurity.password.tooShort', { min: PASSWORD_MIN_LENGTH });
97
97
  }
98
- if (password.length > PASSWORD_MAX_LENGTH) {
99
- return t('signInSecurity.password.tooLong', { max: PASSWORD_MAX_LENGTH });
100
- }
101
98
  return password === repeat ? null : t('signInSecurity.password.mismatch');
102
99
  }}
103
100
  onSubmit={async (reauth) => {
@@ -35,6 +35,7 @@ import { Divider } from '@oxy.so/bloom/divider';
35
35
  import { useTheme } from '@oxy.so/bloom/theme';
36
36
  import { toast } from '@oxy.so/bloom/toast';
37
37
  import { Text } from '@oxy.so/bloom/typography';
38
+ import { isRateLimitError } from '@oxy.so/core';
38
39
  import type { SwitcherContextRow } from '@oxy.so/core/session';
39
40
  import type {
40
41
  EmailSignInAccountOption,
@@ -76,12 +77,7 @@ import {
76
77
  } from './accountFlowParts';
77
78
  import { readSignInFlow, writeSignInFlow } from './signInFlowStore';
78
79
  import { resolveSignInMethods } from './signInMethods';
79
- import {
80
- describeApiError,
81
- errorCode,
82
- isRateLimited,
83
- retryAfterSeconds,
84
- } from '../../utils/apiErrorMessage';
80
+ import { describeApiError, errorCode, retryAfterSeconds } from '../../utils/apiErrorMessage';
85
81
  import { withoutWhitespace } from '../../utils/withoutWhitespace';
86
82
 
87
83
  /** Bloom `AuthCard`'s split card width, which the account dialog grows to for it. */
@@ -237,7 +233,7 @@ export const OxySignInPanel: React.FC<OxySignInPanelProps> = ({
237
233
 
238
234
  const fail = useCallback(
239
235
  (reason: unknown) => {
240
- if (isRateLimited(reason)) setRateLimitSeconds(retryAfterSeconds(reason));
236
+ if (isRateLimitError(reason)) setRateLimitSeconds(retryAfterSeconds(reason));
241
237
  else setError(describeApiError(reason, t));
242
238
  },
243
239
  [t],
@@ -25,6 +25,7 @@ import { clearedFieldsFromProfileUpdate, upsertCachedUser } from '../queries/use
25
25
  import { removeAppAccessFromCache } from '../queries/useFileQueries';
26
26
  import { describeApiError } from '../../utils/apiErrorMessage';
27
27
  import { describeUsernameRefusal } from '../../utils/usernamePolicy';
28
+ import { useApiErrorToast } from '../useApiErrorToast';
28
29
  import { useI18n } from '../useI18n';
29
30
 
30
31
  /**
@@ -134,7 +135,7 @@ export const useUpdateProfile = () => {
134
135
  * Upload avatar with progress tracking and offline queue support
135
136
  */
136
137
  export const useUploadAvatar = () => {
137
- const { t } = useI18n();
138
+ const showApiError = useApiErrorToast();
138
139
  const { oxyServices, activeSessionId } = useOxy();
139
140
  const queryClient = useQueryClient();
140
141
 
@@ -196,7 +197,7 @@ export const useUploadAvatar = () => {
196
197
  }
197
198
  }
198
199
  }
199
- toast.error(describeApiError(error, t, t('actionErrors.uploadAvatar')));
200
+ showApiError(error, 'actionErrors.uploadAvatar');
200
201
  },
201
202
  onSuccess: (data) => {
202
203
  queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
@@ -254,7 +255,7 @@ interface UpdateAccountSettingsVariables {
254
255
  * underlying `.mutate({ updates, currentUser })` form via `.mutation`.
255
256
  */
256
257
  export const useUpdateAccountSettings = () => {
257
- const { t } = useI18n();
258
+ const showApiError = useApiErrorToast();
258
259
  const { oxyServices, activeSessionId, user } = useOxy();
259
260
  const queryClient = useQueryClient();
260
261
 
@@ -320,7 +321,7 @@ export const useUpdateAccountSettings = () => {
320
321
  });
321
322
  }
322
323
  }
323
- toast.error(describeApiError(error, t, t('actionErrors.updateSettings')));
324
+ showApiError(error, 'actionErrors.updateSettings');
324
325
  },
325
326
  onSuccess: (data) => {
326
327
  queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
@@ -366,7 +367,7 @@ export const useUpdateAccountSettings = () => {
366
367
  * Update privacy settings with optimistic updates and authentication handling
367
368
  */
368
369
  export const useUpdatePrivacySettings = () => {
369
- const { t } = useI18n();
370
+ const showApiError = useApiErrorToast();
370
371
  const { oxyServices, activeSessionId, user } = useOxy();
371
372
  const queryClient = useQueryClient();
372
373
 
@@ -482,7 +483,7 @@ export const useUpdatePrivacySettings = () => {
482
483
  queryClient.invalidateQueries({ queryKey: queryKeys.privacy.settings(targetUserId) });
483
484
  }
484
485
 
485
- toast.error(describeApiError(error, t, t('actionErrors.updatePrivacy')));
486
+ showApiError(error, 'actionErrors.updatePrivacy');
486
487
  },
487
488
  // On success, MERGE the server response into the cached state. Older
488
489
  // API builds returned only the changed field (or wiped the privacySettings
@@ -565,7 +566,7 @@ interface UploadResult {
565
566
  * invalidation behaviour as `useUpdateProfile`.
566
567
  */
567
568
  export const useUpdateNotificationPreferences = () => {
568
- const { t } = useI18n();
569
+ const showApiError = useApiErrorToast();
569
570
  const { oxyServices, activeSessionId } = useOxy();
570
571
  const queryClient = useQueryClient();
571
572
 
@@ -604,7 +605,7 @@ export const useUpdateNotificationPreferences = () => {
604
605
  });
605
606
  }
606
607
  }
607
- toast.error(describeApiError(error, t, t('actionErrors.updateNotifications')));
608
+ showApiError(error, 'actionErrors.updateNotifications');
608
609
  },
609
610
  onSuccess: (data) => {
610
611
  queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
@@ -620,7 +621,7 @@ export const useUpdateNotificationPreferences = () => {
620
621
  * `PUT /users/me`.
621
622
  */
622
623
  export const useUpdateUserPreferences = () => {
623
- const { t } = useI18n();
624
+ const showApiError = useApiErrorToast();
624
625
  const { oxyServices, activeSessionId } = useOxy();
625
626
  const queryClient = useQueryClient();
626
627
 
@@ -659,7 +660,7 @@ export const useUpdateUserPreferences = () => {
659
660
  });
660
661
  }
661
662
  }
662
- toast.error(describeApiError(error, t, t('actionErrors.updatePreferences')));
663
+ showApiError(error, 'actionErrors.updatePreferences');
663
664
  },
664
665
  onSuccess: (data) => {
665
666
  queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
@@ -676,7 +677,7 @@ export const useUpdateUserPreferences = () => {
676
677
  * re-consent.
677
678
  */
678
679
  export const useRevokeConnectedApp = () => {
679
- const { t } = useI18n();
680
+ const showApiError = useApiErrorToast();
680
681
  const { oxyServices, activeSessionId } = useOxy();
681
682
  const queryClient = useQueryClient();
682
683
 
@@ -691,7 +692,7 @@ export const useRevokeConnectedApp = () => {
691
692
  invalidateConnectedAppsQueries(queryClient);
692
693
  },
693
694
  onError: (error) => {
694
- toast.error(describeApiError(error, t, t('actionErrors.revokeConnectedApp')));
695
+ showApiError(error, 'actionErrors.revokeConnectedApp');
695
696
  },
696
697
  });
697
698
  };